/* BGLead - Main Styles */
/* Color Scheme: Navy Blue + Gold + Cream */

:root {
    --color-primary: #1e3a5f;
    --color-accent: #c9a962;
    --color-accent-hover: #b8963a;
    --color-bg: #f8f6f3;
    --color-white: #ffffff;
    --color-text: #2d3748;
    --color-text-light: #64748b;
    --color-border: #e2e8f0;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--color-primary);
    line-height: 1.3;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 3rem; }
h3 { font-size: 1.7rem; }
h4 { font-size: 1.35rem; }

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2.25rem; }
    h3 { font-size: 1.75rem; }
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--color-accent-hover);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-white);
}

.btn-primary:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-large {
    padding: 16px 32px;
    font-size: 1.125rem;
}

.btn-full {
    width: 100%;
}

.btn-header {
    background: var(--color-primary);
    color: #ffffff;
    border: 2px solid var(--color-primary);
    padding: 9px 22px;
    font-size: 0.875rem;
    white-space: nowrap;
    flex-shrink: 0;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.3s ease;
}

.btn-header:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: #0f2747;
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(201, 169, 98, 0.35);
}

/* ============================================
   Header — light, refined, with shimmer + gold underline
   ============================================ */

.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 2px 14px rgba(12, 33, 67, 0.06);
    border-bottom: 1px solid rgba(30, 58, 95, 0.07);
    animation: headerSlideDown 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
    overflow: visible;
}

.header::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(201, 169, 98, 0.25) 25%,
        rgba(201, 169, 98, 0.55) 50%,
        rgba(201, 169, 98, 0.25) 75%,
        transparent 100%);
    pointer-events: none;
    opacity: 0.7;
}

@keyframes headerSlideDown {
    from { opacity: 0; transform: translateY(-100%); }
    to   { opacity: 1; transform: translateY(0); }
}

.header .container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    gap: 32px;
}

.logo {
    display: inline-flex;
    align-items: center;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.logo:hover {
    transform: scale(1.04);
}

.logo img {
    height: 42px;
    width: auto;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.logo:hover img {
    filter: drop-shadow(0 4px 10px rgba(30, 58, 95, 0.25));
}

.nav {
    display: flex;
    gap: 38px;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 6px 2px;
    letter-spacing: 0.01em;
    white-space: nowrap;
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.25s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-accent) 0%, #e7c97a 100%);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.is-active,
.nav-dropdown.is-active > .nav-dropdown-toggle {
    color: var(--color-primary);
    outline: none;
}

.nav-link:hover::after,
.nav-link:focus-visible::after,
.nav-link.is-active::after,
.nav-dropdown.is-active > .nav-dropdown-toggle::after {
    transform: scaleX(1);
}

/* Dropdown */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle .nav-chevron {
    width: 14px;
    height: 14px;
    transition: transform 0.25s ease;
}

.nav-dropdown:hover .nav-dropdown-toggle .nav-chevron,
.nav-dropdown.open .nav-dropdown-toggle .nav-chevron {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(-6px);
    min-width: 320px;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(12, 33, 67, 0.16), 0 4px 14px rgba(12, 33, 67, 0.06);
    border: 1px solid rgba(30, 58, 95, 0.08);
    padding: 10px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
    z-index: 200;
}

.nav-dropdown-menu::before {
    content: '';
    position: absolute;
    top: -7px;
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
    width: 14px;
    height: 14px;
    background: #ffffff;
    border-top: 1px solid rgba(30, 58, 95, 0.08);
    border-left: 1px solid rgba(30, 58, 95, 0.08);
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    color: var(--color-text);
    border-radius: 8px;
    transition: background 0.2s ease, color 0.2s ease;
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.35;
}

.nav-dropdown-item:hover,
.nav-dropdown-item:focus-visible {
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.04) 0%, rgba(201, 169, 98, 0.06) 100%);
    color: var(--color-primary);
    outline: none;
}

.nav-dropdown-item-label {
    flex: 1;
    font-weight: 500;
}

.nav-dropdown-item-icon {
    width: 14px;
    height: 14px;
    color: var(--color-text-light);
    flex-shrink: 0;
}

.nav-dropdown-empty {
    display: block;
    padding: 14px;
    color: var(--color-text-light);
    font-size: 0.9rem;
    text-align: center;
}

@media (max-width: 900px) {
    .nav {
        gap: 24px;
    }
}

@media (max-width: 768px) {
    .header .container {
        padding: 12px 18px;
        gap: 12px;
    }
    .logo img {
        height: 36px;
    }
    .nav {
        gap: 18px;
    }
    .nav-link {
        font-size: 0.88rem;
    }
    .btn-header {
        display: none;
    }
    .nav-dropdown-menu {
        min-width: 260px;
    }
}

@media (max-width: 540px) {
    .nav-link span,
    .nav-link {
        font-size: 0.82rem;
    }
}

/* Hero Section */
.hero {
    padding: 60px 0 80px;
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-white) 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 30px;
}

.hero-image {
    position: relative;
}

.hero-decoration {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--color-primary) 0%, #2d4a6f 100%);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.hero-decoration.has-image {
    background: none;
}

.hero-decoration img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-lg);
}

.hero-decoration:not(.has-image)::before {
    content: '';
    position: absolute;
    top: 20%;
    right: 10%;
    width: 150px;
    height: 150px;
    background: var(--color-accent);
    border-radius: 50%;
    opacity: 0.3;
}

.hero-decoration:not(.has-image)::after {
    content: '';
    position: absolute;
    bottom: 10%;
    left: 10%;
    width: 100px;
    height: 100px;
    border: 3px solid var(--color-accent);
    border-radius: 50%;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .hero .container {
        grid-template-columns: 1fr;
    }
    .hero-image {
        display: none;
    }
    .hero {
        padding: 40px 0 60px;
        text-align: center;
    }
}

/* ============================================
   Hero — Homepage (only). The legacy .hero above
   stays for the landing page (Актуализация…)
   ============================================ */

.hero-home {
    position: relative;
    overflow: hidden;
    padding: 110px 0 130px;
    background:
        radial-gradient(ellipse 1100px 700px at 20% 0%, rgba(91, 134, 199, 0.35) 0%, transparent 55%),
        radial-gradient(ellipse 900px 600px at 85% 100%, rgba(43, 80, 138, 0.55) 0%, transparent 55%),
        linear-gradient(135deg, #0c2143 0%, #1e3a5f 50%, #2a4570 100%);
    color: #ffffff;
}

/* Background decorations */
.hero-home-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
}

.hero-blob-1 {
    width: 520px;
    height: 520px;
    top: -140px;
    left: -180px;
    background: radial-gradient(circle, rgba(91, 134, 199, 0.65) 0%, transparent 70%);
    animation: heroBlob1 16s ease-in-out infinite;
}

.hero-blob-2 {
    width: 620px;
    height: 620px;
    bottom: -260px;
    right: -200px;
    background: radial-gradient(circle, rgba(201, 169, 98, 0.42) 0%, transparent 70%);
    animation: heroBlob2 19s ease-in-out infinite;
}

.hero-blob-3 {
    width: 400px;
    height: 400px;
    top: 35%;
    right: 12%;
    background: radial-gradient(circle, rgba(125, 165, 220, 0.4) 0%, transparent 70%);
    opacity: 0.5;
    animation: heroBlob3 22s ease-in-out infinite;
}

@keyframes heroBlob1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(40px, 60px) scale(1.08); }
}

@keyframes heroBlob2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(-50px, -40px) scale(1.06); }
}

@keyframes heroBlob3 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%      { transform: translate(-30px, 20px) scale(0.95); }
    66%      { transform: translate(20px, -30px) scale(1.05); }
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 700px 500px at 50% 40%, #000 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 700px 500px at 50% 40%, #000 30%, transparent 70%);
    opacity: 0.7;
}

/* Foreground content */
.hero-home .container {
    position: relative;
    z-index: 1;
}

.hero-home-content {
    max-width: 780px;
    margin: 0 auto;
    text-align: center;
    opacity: 0;
    animation: heroFadeUp 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
}

@keyframes heroFadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 18px;
    margin-bottom: 28px;
    background: rgba(201, 169, 98, 0.14);
    border: 1px solid rgba(201, 169, 98, 0.45);
    color: #e7c97a;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
}

.hero-eyebrow-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-accent);
    box-shadow: 0 0 0 0 rgba(201, 169, 98, 0.5);
    animation: heroDotPulse 2.2s ease-in-out infinite;
}

@keyframes heroDotPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(201, 169, 98, 0.5); }
    50%      { box-shadow: 0 0 0 8px rgba(201, 169, 98, 0); }
}

.hero-home h1 {
    font-size: 4.2rem;
    line-height: 1.08;
    margin-bottom: 28px;
    color: #ffffff;
    letter-spacing: -0.025em;
    font-weight: 700;
    text-shadow: 0 4px 30px rgba(12, 33, 67, 0.35);
}

.hero-divider {
    width: 88px;
    height: 3px;
    margin: 0 auto 32px;
    background: linear-gradient(90deg, transparent 0%, var(--color-accent) 50%, transparent 100%);
    border-radius: 2px;
    transform: scaleX(0);
    transform-origin: center;
    animation: heroDividerGrow 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.6s forwards;
}

@keyframes heroDividerGrow {
    to { transform: scaleX(1); }
}

.hero-home-subtitle {
    font-size: 1.22rem;
    line-height: 1.65;
    color: rgba(232, 240, 255, 0.85);
    max-width: 620px;
    margin: 0 auto 44px;
}

.hero-scroll {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 999px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.hero-scroll svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
    animation: heroScrollBob 2s ease-in-out infinite;
}

.hero-scroll:hover {
    background: var(--color-accent);
    color: #0c2143;
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(201, 169, 98, 0.4);
}

.hero-scroll:hover svg {
    animation: none;
    transform: translateY(2px);
}

@keyframes heroScrollBob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(4px); }
}

@media (max-width: 768px) {
    .hero-home {
        padding: 70px 0 90px;
    }
    .hero-home h1 {
        font-size: 2.6rem;
    }
    .hero-home-subtitle {
        font-size: 1.05rem;
    }
    .hero-blob-1, .hero-blob-2, .hero-blob-3 {
        filter: blur(50px);
        opacity: 0.4;
    }
}

/* ============================================
   Embed wrapper (view.php) — BGLead header + iframe
   ============================================ */
.embed-page {
    margin: 0;
    overflow-x: hidden;
}

.embed-toolbar {
    background: #f5f3ee;
    border-bottom: 1px solid rgba(30, 58, 95, 0.08);
}

.embed-toolbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 24px;
}

.embed-toolbar-info {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}

.embed-toolbar-info > svg {
    width: 16px;
    height: 16px;
    color: var(--color-primary);
    flex-shrink: 0;
}

.embed-toolbar-label {
    font-weight: 600;
    color: var(--color-primary);
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.embed-toolbar-host {
    color: var(--color-text-light);
    font-size: 0.82rem;
    font-family: 'Menlo', 'Consolas', monospace;
    padding: 2px 8px;
    background: rgba(30, 58, 95, 0.06);
    border-radius: 4px;
    white-space: nowrap;
}

.embed-toolbar-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    color: var(--color-primary);
    border: 1px solid rgba(30, 58, 95, 0.18);
    background: #ffffff;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.embed-toolbar-link svg {
    width: 13px;
    height: 13px;
}

.embed-toolbar-link:hover {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

/* iframe takes remaining viewport (header is sticky, ~78px on desktop). */
.embed-frame {
    display: block;
    width: 100%;
    height: calc(100vh - 78px);
    border: 0;
    background: #ffffff;
}

/* ============================================
   Articles — hero, grid, cards, single, pagination
   ============================================ */

.articles-hero {
    position: relative;
    overflow: hidden;
    padding: 90px 0 60px;
    background:
        radial-gradient(ellipse 900px 500px at 20% 0%, rgba(91, 134, 199, 0.30) 0%, transparent 55%),
        radial-gradient(ellipse 800px 500px at 85% 100%, rgba(201, 169, 98, 0.20) 0%, transparent 55%),
        linear-gradient(135deg, #0c2143 0%, #1e3a5f 100%);
    color: #ffffff;
    text-align: center;
}

.articles-hero h1 {
    color: #ffffff;
    font-size: 3rem;
    margin-bottom: 18px;
}

.articles-hero-subtitle {
    color: rgba(232, 240, 255, 0.85);
    font-size: 1.15rem;
    max-width: 620px;
    margin: 0 auto;
}

.article-breadcrumb {
    margin-bottom: 18px;
    font-size: 0.9rem;
    color: rgba(232, 240, 255, 0.75);
    display: flex;
    gap: 8px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.article-breadcrumb a {
    color: rgba(232, 240, 255, 0.85);
    transition: color 0.2s;
}

.article-breadcrumb a:hover {
    color: var(--color-accent);
}

.article-meta {
    display: flex;
    gap: 14px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 20px;
    color: rgba(232, 240, 255, 0.75);
    font-size: 0.92rem;
}

.article-category-badge {
    display: inline-block;
    padding: 5px 14px;
    background: rgba(201, 169, 98, 0.18);
    border: 1px solid rgba(201, 169, 98, 0.45);
    color: #e7c97a;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    transition: all 0.2s;
}

.article-category-badge:hover {
    background: rgba(201, 169, 98, 0.32);
    color: #ffffff;
}

.articles-section {
    padding: 70px 0 100px;
    background: linear-gradient(180deg, #f9f7f3 0%, #ffffff 100%);
}

.article-cat-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 50px;
}

.article-cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 18px;
    background: #ffffff;
    border: 1px solid rgba(30, 58, 95, 0.12);
    color: var(--color-text);
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
}

.article-cat-chip:hover {
    border-color: var(--color-accent);
    color: var(--color-primary);
}

.article-cat-chip.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
}

.article-cat-chip .cat-count {
    background: rgba(0, 0, 0, 0.08);
    color: inherit;
    font-size: 0.75rem;
    padding: 1px 8px;
    border-radius: 999px;
    font-weight: 600;
}

.article-cat-chip.is-active .cat-count {
    background: rgba(255, 255, 255, 0.18);
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 28px;
}

.articles-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
    .articles-grid-3 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
}

.article-card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(30, 58, 95, 0.06);
    box-shadow: 0 1px 3px rgba(12, 33, 67, 0.06);
    overflow: hidden;
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(12, 33, 67, 0.12);
    border-color: rgba(201, 169, 98, 0.3);
    color: var(--color-text);
}

.article-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, #1e3a5f, #2a4570);
    overflow: hidden;
    position: relative;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.article-card:hover .article-card-image img {
    transform: scale(1.04);
}

.article-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.35);
}

.article-card-placeholder svg {
    width: 56px;
    height: 56px;
}

.article-card-body {
    padding: 22px 22px 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-card-category {
    display: inline-block;
    align-self: flex-start;
    padding: 3px 10px;
    background: rgba(201, 169, 98, 0.14);
    color: #8a6f2c;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.article-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-primary);
    line-height: 1.35;
    margin-bottom: 10px;
}

.article-card-excerpt {
    color: var(--color-text-light);
    font-size: 0.93rem;
    line-height: 1.6;
    margin-bottom: 16px;
    flex-grow: 1;
}

.article-card-date {
    color: var(--color-text-light);
    font-size: 0.82rem;
    margin-top: auto;
}

.articles-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--color-text-light);
}

/* Pagination */
.pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 50px;
}

.pagination-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    background: #ffffff;
    border: 1px solid rgba(30, 58, 95, 0.12);
    border-radius: 8px;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.93rem;
    font-weight: 500;
    transition: all 0.2s;
}

.pagination-link:hover {
    border-color: var(--color-accent);
    color: var(--color-primary);
}

.pagination-link.is-active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: #ffffff;
}

/* Single article page */
.article-page {
    background: #ffffff;
}

.article-featured-image {
    background: #ffffff;
    padding: 30px 0 0;
    margin: 0;
}

.article-featured-image img {
    width: 100%;
    max-height: 540px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(12, 33, 67, 0.12);
    display: block;
}

.article-content {
    padding: 50px 0 80px;
    background: #ffffff;
}

.article-content .container {
    max-width: 760px;
}

.article-lead {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    line-height: 1.55;
    color: var(--color-primary);
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(30, 58, 95, 0.1);
}

.article-body {
    font-size: 1.08rem;
    line-height: 1.78;
    color: var(--color-text);
}

.article-body p { margin: 0 0 1.2em; }
.article-body h2 {
    font-size: 1.8rem;
    margin: 2em 0 0.6em;
    color: var(--color-primary);
}
.article-body h3 {
    font-size: 1.35rem;
    margin: 1.6em 0 0.5em;
    color: var(--color-primary);
}
.article-body ul, .article-body ol {
    margin: 0 0 1.2em 1.4em;
    padding: 0;
}
.article-body li { margin-bottom: 0.5em; }
.article-body a {
    color: var(--color-accent);
    border-bottom: 1px solid rgba(201, 169, 98, 0.4);
}
.article-body a:hover {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1.5em 0;
    box-shadow: 0 6px 20px rgba(12, 33, 67, 0.08);
}
.article-body blockquote {
    border-left: 4px solid var(--color-accent);
    padding: 6px 0 6px 24px;
    margin: 1.5em 0;
    color: var(--color-text-light);
    font-style: italic;
}

.article-back {
    margin-top: 60px;
    padding-top: 24px;
    border-top: 1px solid rgba(30, 58, 95, 0.1);
}

.article-back a {
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 500;
}

.article-back a:hover {
    color: var(--color-primary);
}

.article-related {
    background: linear-gradient(180deg, #f9f7f3 0%, #ffffff 100%);
    padding: 70px 0 90px;
}

.article-related h2 {
    text-align: center;
    margin-bottom: 36px;
}

/* Homepage — Latest articles section */
.section-latest-articles {
    background: linear-gradient(180deg, #ffffff 0%, #f9f7f3 100%);
    padding: 90px 0 100px;
}

.section-head-row {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 24px;
    margin-bottom: 40px;
}

.section-head-row .section-title,
.section-head-row .section-intro {
    text-align: left;
    margin: 0;
}

.section-head-row .section-title { margin-bottom: 8px; }

.section-view-all {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-primary);
    font-weight: 600;
    text-decoration: none;
    flex-shrink: 0;
    padding: 8px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.section-view-all:hover {
    border-bottom-color: var(--color-accent);
    color: var(--color-accent);
}

.section-view-all svg {
    width: 14px;
    height: 14px;
}

@media (max-width: 700px) {
    .section-head-row { flex-direction: column; align-items: flex-start; }
    .articles-hero h1 { font-size: 2.2rem; }
    .article-content { padding: 30px 0 60px; }
    .article-lead { font-size: 1.15rem; }
}

@media (max-width: 768px) {
    .embed-toolbar-inner {
        padding: 8px 14px;
        gap: 10px;
        flex-wrap: wrap;
    }
    .embed-toolbar-host {
        display: none;
    }
    .embed-toolbar-label {
        font-size: 0.85rem;
    }
    .embed-toolbar-link {
        font-size: 0.78rem;
        padding: 6px 10px;
    }
    .embed-frame {
        height: calc(100vh - 64px);
    }
}

/* ============================================
   Contact page
   ============================================ */
.contact-hero {
    position: relative;
    overflow: hidden;
    padding: 90px 0 60px;
    background:
        radial-gradient(ellipse 900px 500px at 20% 0%, rgba(91, 134, 199, 0.30) 0%, transparent 55%),
        radial-gradient(ellipse 800px 500px at 85% 100%, rgba(201, 169, 98, 0.25) 0%, transparent 55%),
        linear-gradient(135deg, #0c2143 0%, #1e3a5f 100%);
    color: #ffffff;
    text-align: center;
}

.contact-hero h1 {
    color: #ffffff;
    font-size: 3.2rem;
    margin-bottom: 18px;
}

.contact-hero-subtitle {
    color: rgba(232, 240, 255, 0.85);
    font-size: 1.15rem;
    max-width: 620px;
    margin: 0 auto;
}

.contact-cards-section {
    padding: 80px 0 100px;
    background: linear-gradient(180deg, #f9f7f3 0%, #ffffff 100%);
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.contact-card {
    display: block;
    background: #ffffff;
    padding: 36px 28px;
    border-radius: 16px;
    border: 1px solid rgba(30, 58, 95, 0.08);
    box-shadow: 0 1px 3px rgba(12, 33, 67, 0.06);
    text-decoration: none;
    color: var(--color-text);
    transition: all 0.3s ease;
    text-align: center;
}

.contact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(12, 33, 67, 0.10);
    border-color: rgba(201, 169, 98, 0.4);
    color: var(--color-text);
}

.contact-card-static:hover {
    transform: none;
    box-shadow: 0 1px 3px rgba(12, 33, 67, 0.06);
    border-color: rgba(30, 58, 95, 0.08);
}

.contact-card-icon {
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2a4570 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-accent);
}

.contact-card-icon svg {
    width: 26px;
    height: 26px;
}

.contact-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 8px;
    color: var(--color-primary);
}

.contact-card > p {
    color: var(--color-text);
    font-size: 1rem;
    margin-bottom: 14px;
    font-weight: 500;
}

.contact-card-action {
    color: var(--color-accent);
    font-size: 0.9rem;
    font-weight: 500;
}

.contact-card:hover .contact-card-action {
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .contact-hero {
        padding: 60px 0 40px;
    }
    .contact-hero h1 {
        font-size: 2.2rem;
    }
    .contact-cards-section {
        padding: 50px 0 70px;
    }
}

/* Homepage service cards (inline styles moved here so they get cached) */
.section-services .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    max-width: 900px;
    margin: 0 auto;
    gap: 24px;
}

.service-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    background: #fff;
    padding: 36px 32px;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(12, 33, 67, 0.06);
    border: 1px solid rgba(30, 58, 95, 0.06);
    transition: box-shadow 0.3s, transform 0.3s, border-color 0.3s;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary) 0%, var(--color-accent) 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 40px rgba(12, 33, 67, 0.10);
    border-color: rgba(201, 169, 98, 0.3);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    margin-bottom: 14px;
    color: var(--color-primary);
    line-height: 1.3;
}

.service-card p {
    color: var(--color-text-light);
    line-height: 1.65;
    margin-bottom: 28px;
    flex-grow: 1;
    font-size: 0.97rem;
}

.service-card .btn {
    align-self: flex-start;
    padding: 10px 22px;
    font-size: 0.92rem;
}

/* Sections */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 15px;
}

.section-intro {
    text-align: center;
    color: var(--color-text-light);
    max-width: 600px;
    margin: 0 auto 50px;
}

/* Feature Cards */
.features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.feature-card {
    background: var(--color-white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: rgba(201, 169, 98, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.feature-icon svg {
    width: 30px;
    height: 30px;
    color: var(--color-accent);
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* Steps */
.section-steps {
    background: var(--color-white);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

@media (max-width: 768px) {
    .steps-grid {
        grid-template-columns: 1fr;
    }
}

.step-card {
    text-align: center;
    padding: 30px;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--color-accent);
    color: var(--color-white);
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.step-card h3 {
    margin-bottom: 10px;
}

.step-card p {
    color: var(--color-text-light);
}

/* CTA Section */
.section-cta {
    background: var(--color-bg);
}

.cta-box {
    background: linear-gradient(135deg, var(--color-primary) 0%, #2d4a6f 100%);
    color: var(--color-white);
    padding: 80px 60px;
    border-radius: var(--radius-lg);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-box.has-bg-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.cta-box.has-bg-image::before {
    display: none;
}

.cta-box.has-bg-image > * {
    position: relative;
    z-index: 2;
}

.cta-box h2 {
    color: var(--color-white);
    margin-bottom: 15px;
    font-size: 2.5rem;
}

.cta-box p {
    opacity: 0.9;
    margin-bottom: 30px;
    font-size: 1.125rem;
}

/* Disclaimer */
.section-disclaimer {
    padding: 40px 0;
    background: var(--color-bg);
}

.disclaimer-box {
    background: var(--color-white);
    padding: 20px 30px;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-accent);
}

.disclaimer-box p {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.footer-logo {
    height: 35px;
    margin-bottom: 15px;
    filter: brightness(0) invert(1);
}

.footer-brand p {
    opacity: 0.8;
    font-size: 0.9rem;
}

.footer h4 {
    color: var(--color-white);
    margin-bottom: 15px;
    font-size: 1rem;
}

.footer-links a,
.footer-contact p,
.footer-contact a {
    display: block;
    color: rgba(255,255,255,0.8);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--color-accent);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    opacity: 0.7;
}

.footer-legal {
    display: flex;
    gap: 20px;
}

.footer-legal a {
    color: rgba(255,255,255,0.7);
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
    }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--color-white);
    padding: 40px 50px;
    border-radius: var(--radius-lg);
    max-width: 680px;
    width: 95%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s;
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--color-text-light);
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--color-text);
}

.modal h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.modal > p {
    color: var(--color-text-light);
    margin-bottom: 25px;
}

/* Form */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--color-text);
    font-size: 0.9rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-body);
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--color-accent);
}

.form-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.form-checkbox input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--color-accent);
}

.form-checkbox label {
    margin-bottom: 0;
    font-weight: 400;
}

/* Modal Form Grid */
.modal-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px 20px;
}

.modal-form-grid .form-group {
    margin-bottom: 0;
}

.modal-form-grid .form-group.full-width {
    grid-column: 1 / -1;
}

.modal-form-grid .form-group label {
    white-space: nowrap;
}

@media (max-width: 576px) {
    .modal-form-grid {
        grid-template-columns: 1fr;
    }
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0f2138;
    color: var(--color-white);
    padding: 15px 20px;
    z-index: 999;
    transform: translateY(100%);
    transition: transform 0.3s;
}

.cookie-banner.active {
    transform: translateY(0);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.cookie-banner p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.cookie-banner a {
    color: var(--color-accent);
}

.btn-cookie {
    background: var(--color-accent);
    color: var(--color-white);
    white-space: nowrap;
}

@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
}

/* Success Page Styles */
.success-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.success-container {
    max-width: 600px;
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: #22c55e;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
}

.success-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.success-container h1 {
    margin-bottom: 15px;
}

.success-container > p {
    color: var(--color-text-light);
    margin-bottom: 30px;
}

.download-box {
    background: var(--color-white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
}

.btn-download {
    background: var(--color-accent);
    color: var(--color-white);
    padding: 16px 40px;
    font-size: 1.125rem;
}

.btn-download:hover {
    background: var(--color-accent-hover);
    color: var(--color-white);
}

.upsell-box {
    background: linear-gradient(135deg, var(--color-primary) 0%, #2d4a6f 100%);
    color: var(--color-white);
    padding: 40px;
    border-radius: var(--radius-lg);
}

.upsell-box h2 {
    color: var(--color-white);
    margin-bottom: 15px;
}

.upsell-box > p {
    opacity: 0.9;
    margin-bottom: 25px;
}

.upsell-features {
    text-align: left;
    margin-bottom: 30px;
}

.upsell-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    opacity: 0.9;
}

.upsell-features svg {
    width: 20px;
    height: 20px;
    color: var(--color-accent);
}

.btn-upsell {
    background: var(--color-accent);
    color: var(--color-white);
    padding: 14px 30px;
    font-size: 1rem;
    margin-bottom: 15px;
}

.btn-upsell:hover {
    background: var(--color-accent-hover);
    color: var(--color-white);
}

.phone-number {
    font-size: 1.25rem;
    font-family: var(--font-heading);
    opacity: 0.9;
}

.phone-cta {
    font-size: 1.5rem;
    font-family: var(--font-heading);
}

.phone-cta a {
    color: var(--color-accent);
}
