/* ==========================================================================
   AUTOSCUOLE GASPARELLA — Modern Design System v2.0
   A premium 2026 design system with CSS custom properties,
   glassmorphism, fluid typography, and micro-animations.
   ========================================================================== */

/* ---------- RESET ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

img,
video,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: inherit;
}

ul,
ol {
    list-style: none;
}

button {
    border: none;
    background: none;
    cursor: pointer;
    font: inherit;
}

input,
textarea,
select {
    font: inherit;
}

/* ---------- DESIGN TOKENS ---------- */
:root {
    /* Colors */
    --c-bg: #f8fafc;
    --c-bg-alt: #f1f5f9;
    --c-surface: #ffffff;
    --c-surface-alt: #e2e8f0;

    --c-primary: #1e56a0;
    --c-primary-light: #3b82f6;
    --c-primary-dark: #0f2d5e;
    --c-accent: #06b6d4;
    --c-accent-warm: #f59e0b;

    --c-text: #1e293b;
    --c-text-muted: #64748b;
    --c-text-light: #94a3b8;
    --c-text-inverse: #ffffff;

    --c-footer-bg: #0a1628;
    --c-footer-text: #cbd5e1;
    --c-footer-link: #94a3b8;

    --c-border: #e2e8f0;
    --c-overlay: rgba(10, 22, 40, 0.75);

    /* Gradients */
    --g-primary: linear-gradient(135deg, #1e56a0 0%, #06b6d4 100%);
    --g-hero: linear-gradient(170deg, rgba(15, 45, 94, 0.92) 0%, rgba(6, 182, 212, 0.82) 100%);
    --g-card-a: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --g-card-b: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --g-card-c: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --g-card-d: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    --g-card-e: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --g-card-cqc: linear-gradient(135deg, #fccb90 0%, #d57eeb 100%);
    --g-card-pts: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    --g-card-crono: linear-gradient(135deg, #ff9a9e 0%, #fecfef 100%);
    --g-cta: linear-gradient(135deg, #1e56a0 0%, #0f2d5e 100%);

    /* Typography */
    --ff-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --fs-xs: 0.75rem;
    --fs-sm: 0.875rem;
    --fs-base: 1rem;
    --fs-md: 1.125rem;
    --fs-lg: 1.25rem;
    --fs-xl: 1.5rem;
    --fs-2xl: clamp(1.75rem, 3vw, 2.25rem);
    --fs-3xl: clamp(2rem, 4vw, 3rem);
    --fs-hero: clamp(2.5rem, 6vw, 4.5rem);

    /* Spacing */
    --sp-xs: 0.25rem;
    --sp-sm: 0.5rem;
    --sp-md: 1rem;
    --sp-lg: 1.5rem;
    --sp-xl: 2rem;
    --sp-2xl: 3rem;
    --sp-3xl: 4rem;
    --sp-4xl: 6rem;
    --sp-section: clamp(4rem, 8vw, 7rem);

    /* Radii */
    --r-sm: 0.375rem;
    --r-md: 0.75rem;
    --r-lg: 1rem;
    --r-xl: 1.5rem;
    --r-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 50px rgba(0, 0, 0, 0.15);
    --shadow-glow: 0 0 30px rgba(30, 86, 160, 0.25);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-card-hover: 0 16px 40px rgba(0, 0, 0, 0.12);

    /* Transitions */
    --t-fast: 0.15s ease;
    --t-base: 0.3s ease;
    --t-slow: 0.5s ease;
    --t-spring: 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Layout */
    --container-max: 1200px;
    --container-px: clamp(1rem, 3vw, 2rem);
}

/* ---------- BASE ---------- */
body {
    font-family: var(--ff-sans);
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--c-text);
    background: var(--c-bg);
    overflow-x: hidden;
}

.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-px);
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--c-text);
}

p {
    color: var(--c-text-muted);
}

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--sp-md);
    background: var(--c-primary);
    color: #fff;
    padding: var(--sp-sm) var(--sp-md);
    border-radius: var(--r-md);
    z-index: 10000;
    transition: top var(--t-fast);
}

.skip-link:focus {
    top: var(--sp-md);
}

/* ---------- HEADER ---------- */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--sp-md) 0;
    transition: background var(--t-base), box-shadow var(--t-base), padding var(--t-base);
}

.site-header.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
    padding: var(--sp-sm) 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-lg);
}

.site-logo img {
    height: 48px;
    width: auto;
    transition: height var(--t-base);
}

.scrolled .site-logo img {
    height: 40px;
}

/* Desktop Nav */
.main-nav {
    display: flex;
    align-items: center;
    gap: var(--sp-xs);
}

.main-nav a,
.main-nav .menu-item>a {
    display: inline-flex;
    align-items: center;
    padding: var(--sp-sm) var(--sp-md);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--c-text-inverse);
    border-radius: var(--r-md);
    transition: background var(--t-fast), color var(--t-fast);
    white-space: nowrap;
}

.scrolled .main-nav a,
.scrolled .main-nav .menu-item>a {
    color: var(--c-text);
}

.main-nav a:hover,
.main-nav .menu-item>a:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.scrolled .main-nav a:hover,
.scrolled .main-nav .menu-item>a:hover {
    background: var(--c-bg-alt);
    color: var(--c-primary);
}

/* Dropdown */
.main-nav .menu-item-has-children {
    position: relative;
}

.main-nav .sub-menu,
.main-nav .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 260px;
    background: var(--c-surface);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-xl);
    padding: var(--sp-sm);
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all var(--t-base);
    z-index: 100;
    border: 1px solid var(--c-border);
}

.main-nav .menu-item-has-children:hover>.sub-menu,
.main-nav .menu-item-has-children:hover>.dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-nav .sub-menu a,
.main-nav .dropdown-menu a {
    color: var(--c-text) !important;
    padding: var(--sp-sm) var(--sp-md);
    border-radius: var(--r-sm);
    font-size: var(--fs-sm);
    display: block;
}

.main-nav .sub-menu a:hover,
.main-nav .dropdown-menu a:hover {
    background: var(--c-bg-alt) !important;
    color: var(--c-primary) !important;
}

/* Hamburger */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    border-radius: var(--r-md);
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    height: 2px;
    background: var(--c-text-inverse);
    border-radius: 2px;
    transition: all var(--t-base);
}

.scrolled .menu-toggle span {
    background: var(--c-text);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav */
@media (max-width: 991px) {
    .menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(320px, 85vw);
        height: 100vh;
        background: var(--c-surface);
        flex-direction: column;
        align-items: stretch;
        padding: 5rem var(--sp-xl) var(--sp-xl);
        gap: var(--sp-xs);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.15);
        transition: right var(--t-base);
        overflow-y: auto;
        z-index: 1000;
    }

    .main-nav.open {
        right: 0;
    }

    .main-nav a,
    .main-nav .menu-item>a {
        color: var(--c-text) !important;
        padding: var(--sp-md);
        border-radius: var(--r-md);
        font-size: var(--fs-base);
    }

    .main-nav a:hover,
    .main-nav .menu-item>a:hover {
        background: var(--c-bg-alt) !important;
        color: var(--c-primary) !important;
    }

    .main-nav .sub-menu,
    .main-nav .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        padding: 0 0 0 var(--sp-lg);
        min-width: auto;
        display: none;
    }

    .main-nav .menu-item-has-children.open>.sub-menu,
    .main-nav .menu-item-has-children.open>.dropdown-menu {
        display: block;
    }

    .mobile-overlay {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        opacity: 0;
        visibility: hidden;
        transition: all var(--t-base);
    }

    .mobile-overlay.active {
        opacity: 1;
        visibility: visible;
    }
}

/* ---------- HERO ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    color: var(--c-text-inverse);
    text-align: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--g-hero);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
    padding: var(--sp-4xl) var(--container-px);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-sm);
    padding: var(--sp-sm) var(--sp-lg);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--r-full);
    font-size: var(--fs-sm);
    font-weight: 500;
    margin-bottom: var(--sp-xl);
    animation: fadeInDown 0.8s ease both;
}

.hero-title {
    font-size: var(--fs-hero);
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    margin-bottom: var(--sp-lg);
    animation: fadeInDown 0.8s 0.15s ease both;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: var(--fs-xl);
    font-weight: 300;
    opacity: 0.95;
    margin-bottom: var(--sp-md);
    animation: fadeInUp 0.8s 0.3s ease both;
    color: #fff;
}

.hero-locations {
    font-size: var(--fs-md);
    opacity: 0.85;
    margin-bottom: var(--sp-2xl);
    animation: fadeIn 1s 0.5s ease both;
    color: rgba(255, 255, 255, 0.9);
}

.hero-locations strong {
    font-weight: 600;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--sp-md);
    justify-content: center;
    animation: fadeInUp 0.8s 0.6s ease both;
}

.hero-wave {
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    z-index: 2;
    line-height: 0;
}

.hero-wave svg {
    width: 100%;
    height: 80px;
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sp-sm);
    padding: var(--sp-md) var(--sp-2xl);
    font-size: var(--fs-base);
    font-weight: 600;
    border-radius: var(--r-full);
    transition: all var(--t-spring);
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary {
    background: var(--c-surface);
    color: var(--c-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    background: #f0f4ff;
}

.btn-outline {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.btn-outline:hover {
    background: #fff;
    color: var(--c-primary);
    border-color: #fff;
    transform: translateY(-3px);
}

.btn-blue {
    background: var(--c-primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(30, 86, 160, 0.3);
}

.btn-blue:hover {
    background: var(--c-primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(30, 86, 160, 0.4);
}

.btn-icon {
    font-size: 1.1em;
}

/* ---------- SECTION ---------- */
.section {
    padding: var(--sp-section) 0;
}

.section-alt {
    background: var(--c-bg-alt);
}

.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto var(--sp-3xl);
}

.section-header h2 {
    font-size: var(--fs-3xl);
    margin-bottom: var(--sp-md);
    letter-spacing: -0.02em;
}

.section-header p {
    font-size: var(--fs-md);
    color: var(--c-text-muted);
}

.section-divider {
    width: 60px;
    height: 4px;
    background: var(--g-primary);
    border-radius: 2px;
    margin: var(--sp-lg) auto 0;
}

/* ---------- STATS BAR ---------- */
.stats-bar {
    background: var(--c-surface);
    padding: var(--sp-3xl) 0;
    border-bottom: 1px solid var(--c-border);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-xl);
    text-align: center;
}

.stat-item {
    padding: var(--sp-md);
}

.stat-number {
    font-size: var(--fs-3xl);
    font-weight: 800;
    color: var(--c-primary);
    line-height: 1;
    margin-bottom: var(--sp-sm);
}

.stat-label {
    font-size: var(--fs-sm);
    color: var(--c-text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--sp-md);
    }
}

/* ---------- LICENSE CARDS ---------- */
.license-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-xl);
}

.license-card {
    background: var(--c-surface);
    padding: var(--sp-2xl) var(--sp-xl);
    border-radius: var(--r-xl);
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: all var(--t-spring);
    border: 1px solid var(--c-border);
    position: relative;
    overflow: hidden;
}

.license-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--card-gradient, var(--g-primary));
    opacity: 0;
    transition: opacity var(--t-base);
}

.license-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card-hover);
    border-color: transparent;
}

.license-card:hover::before {
    opacity: 1;
}

.license-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--sp-lg);
    font-size: 28px;
    color: #fff;
    transition: transform var(--t-spring);
}

.license-card:hover .license-icon {
    transform: scale(1.1) rotate(5deg);
}

.license-card h3 {
    font-size: var(--fs-lg);
    font-weight: 700;
    margin-bottom: var(--sp-sm);
}

.license-card p {
    font-size: var(--fs-sm);
    color: var(--c-text-muted);
    margin-bottom: var(--sp-lg);
}

.license-card .card-link {
    color: var(--c-primary);
    font-weight: 600;
    font-size: var(--fs-sm);
    display: inline-flex;
    align-items: center;
    gap: var(--sp-xs);
    transition: gap var(--t-fast), color var(--t-fast);
}

.license-card:hover .card-link {
    gap: var(--sp-sm);
    color: var(--c-primary-dark);
}

@media (max-width: 1024px) {
    .license-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .license-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- COURSE SEARCH ---------- */
.course-search {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-3xl);
    align-items: center;
}

.course-search-text h3 {
    font-size: var(--fs-2xl);
    margin-bottom: var(--sp-md);
}

.course-search-text p {
    font-size: var(--fs-md);
    line-height: 1.7;
    margin-bottom: var(--sp-xl);
}

.course-search-img img {
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
}

@media (max-width: 768px) {
    .course-search {
        grid-template-columns: 1fr;
    }

    .course-search-img {
        order: -1;
    }
}

/* ---------- TEAM ---------- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--sp-xl);
}

.team-card {
    text-align: center;
    background: var(--c-surface);
    border-radius: var(--r-xl);
    padding: var(--sp-xl);
    box-shadow: var(--shadow-card);
    transition: all var(--t-spring);
    border: 1px solid var(--c-border);
}

.team-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
}

.team-img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    margin: 0 auto var(--sp-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 4px solid var(--c-bg-alt);
}

.team-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow);
}

.team-card:hover .team-img img {
    transform: scale(1.08);
}

.team-card h4 {
    font-size: var(--fs-lg);
    margin-bottom: var(--sp-xs);
}

.team-role {
    color: var(--c-primary);
    font-weight: 600;
    font-size: var(--fs-sm);
    margin-bottom: var(--sp-xs);
}

.team-location {
    color: var(--c-text-muted);
    font-size: var(--fs-sm);
}

@media (max-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- CTA BANNER ---------- */
.cta-banner {
    background: var(--g-cta);
    padding: var(--sp-3xl) 0;
    color: #fff;
}

.cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-xl);
}

.cta-text h2 {
    font-size: var(--fs-2xl);
    color: #fff;
    margin-bottom: var(--sp-sm);
}

.cta-text p {
    font-size: var(--fs-md);
    color: rgba(255, 255, 255, 0.85);
}

.cta-banner .btn-primary {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .cta-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ---------- BLOG CARDS (Homepage preview) ---------- */
.blog-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-xl);
}

.blog-card {
    background: var(--c-surface);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: all var(--t-spring);
    border: 1px solid var(--c-border);
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-card-hover);
}

.blog-card-img {
    height: 200px;
    overflow: hidden;
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--t-slow);
}

.blog-card:hover .blog-card-img img {
    transform: scale(1.08);
}

.blog-card-body {
    padding: var(--sp-xl);
}

.blog-card-date {
    font-size: var(--fs-xs);
    color: var(--c-text-light);
    margin-bottom: var(--sp-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.blog-card-body h3 {
    font-size: var(--fs-lg);
    margin-bottom: var(--sp-sm);
    line-height: 1.3;
}

.blog-card-body p {
    font-size: var(--fs-sm);
    margin-bottom: var(--sp-md);
}

.blog-card-body .card-link {
    color: var(--c-primary);
    font-weight: 600;
    font-size: var(--fs-sm);
}

@media (max-width: 768px) {
    .blog-preview-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- BLOG ARCHIVE ---------- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--sp-xl);
}

.blog-archive-header {
    text-align: center;
    padding: calc(var(--sp-section) + 5rem) 0 var(--sp-3xl);
    background: var(--g-cta);
    color: #fff;
    margin-bottom: var(--sp-3xl);
}

.blog-archive-header h1 {
    font-size: var(--fs-3xl);
    color: #fff;
}

/* ---------- PAGE TEMPLATE ---------- */
.page-hero {
    padding: calc(5rem + var(--sp-3xl)) 0 var(--sp-3xl);
    background: var(--g-cta);
    color: #fff;
    text-align: center;
}

.page-hero h1 {
    font-size: var(--fs-3xl);
    color: #fff;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: var(--sp-sm);
    font-size: var(--fs-sm);
    color: rgba(255, 255, 255, 0.7);
    justify-content: center;
    margin-top: var(--sp-md);
}

.breadcrumbs a {
    color: rgba(255, 255, 255, 0.8);
    transition: color var(--t-fast);
}

.breadcrumbs a:hover {
    color: #fff;
}

.breadcrumbs .sep {
    opacity: 0.5;
}

.page-content-wrapper {
    padding: var(--sp-section) 0;
}

.page-content-inner {
    max-width: 800px;
    margin: 0 auto;
    font-size: var(--fs-md);
    line-height: 1.8;
}

.page-content-inner h1,
.page-content-inner h2,
.page-content-inner h3,
.page-content-inner h4 {
    margin: var(--sp-2xl) 0 var(--sp-md);
}

.page-content-inner p {
    margin-bottom: var(--sp-lg);
}

.page-content-inner ul,
.page-content-inner ol {
    padding-left: var(--sp-xl);
    margin-bottom: var(--sp-lg);
    list-style: disc;
}

.page-content-inner li {
    margin-bottom: var(--sp-sm);
}

.page-content-inner img {
    border-radius: var(--r-lg);
    margin: var(--sp-xl) 0;
}

.page-content-inner a {
    color: var(--c-primary);
    text-decoration: underline;
    text-decoration-color: rgba(30, 86, 160, 0.3);
    transition: text-decoration-color var(--t-fast);
}

.page-content-inner a:hover {
    text-decoration-color: var(--c-primary);
}

/* ---------- FOOTER ---------- */
.site-footer {
    background: var(--c-footer-bg);
    color: var(--c-footer-text);
    padding: var(--sp-4xl) 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--sp-2xl);
}

.footer-col h4 {
    color: #fff;
    font-size: var(--fs-base);
    font-weight: 700;
    margin-bottom: var(--sp-lg);
    letter-spacing: 0.02em;
}

.footer-about p {
    font-size: var(--fs-sm);
    line-height: 1.8;
    color: var(--c-footer-text);
    margin-bottom: var(--sp-lg);
}

.footer-social {
    display: flex;
    gap: var(--sp-md);
}

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--c-footer-text);
    font-size: var(--fs-md);
    transition: all var(--t-base);
}

.footer-social a:hover {
    background: var(--c-primary);
    color: #fff;
    transform: translateY(-3px);
}

.footer-links li {
    margin-bottom: var(--sp-sm);
}

.footer-links a {
    font-size: var(--fs-sm);
    color: var(--c-footer-link);
    transition: color var(--t-fast), padding-left var(--t-fast);
}

.footer-links a:hover {
    color: #fff;
    padding-left: var(--sp-sm);
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: var(--sp-md);
    margin-bottom: var(--sp-md);
    font-size: var(--fs-sm);
    color: var(--c-footer-link);
}

.footer-contact i {
    color: var(--c-accent);
    margin-top: 3px;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.footer-contact a {
    color: var(--c-footer-link);
    transition: color var(--t-fast);
}

.footer-contact a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: var(--sp-3xl);
    padding: var(--sp-xl) 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--sp-md);
}

.footer-bottom p {
    font-size: var(--fs-sm);
    color: var(--c-footer-link);
}

.footer-bottom-links {
    display: flex;
    gap: var(--sp-lg);
}

.footer-bottom-links a {
    font-size: var(--fs-sm);
    color: var(--c-footer-link);
    transition: color var(--t-fast);
}

.footer-bottom-links a:hover {
    color: #fff;
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

/* Scroll-triggered animations */
[data-animate] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].visible {
    opacity: 1;
    transform: translateY(0);
}

[data-animate="fade-left"] {
    transform: translateX(-30px);
}

[data-animate="fade-left"].visible {
    transform: translateX(0);
}

[data-animate="fade-right"] {
    transform: translateX(30px);
}

[data-animate="fade-right"].visible {
    transform: translateX(0);
}

[data-animate="scale"] {
    transform: scale(0.9);
}

[data-animate="scale"].visible {
    transform: scale(1);
}

/* Stagger children */
[data-animate].visible:nth-child(1) {
    transition-delay: 0.05s;
}

[data-animate].visible:nth-child(2) {
    transition-delay: 0.1s;
}

[data-animate].visible:nth-child(3) {
    transition-delay: 0.15s;
}

[data-animate].visible:nth-child(4) {
    transition-delay: 0.2s;
}

[data-animate].visible:nth-child(5) {
    transition-delay: 0.25s;
}

[data-animate].visible:nth-child(6) {
    transition-delay: 0.3s;
}

[data-animate].visible:nth-child(7) {
    transition-delay: 0.35s;
}

[data-animate].visible:nth-child(8) {
    transition-delay: 0.4s;
}

/* ---------- UTILITIES ---------- */
.text-center {
    text-align: center;
}

.relative {
    position: relative;
}

.overflow-hidden {
    overflow: hidden;
}

/* WordPress specifics */
.wp-block-image img {
    border-radius: var(--r-lg);
}

.aligncenter {
    display: block;
    margin: 0 auto;
}

.alignleft {
    float: left;
    margin-right: var(--sp-xl);
    margin-bottom: var(--sp-md);
}

.alignright {
    float: right;
    margin-left: var(--sp-xl);
    margin-bottom: var(--sp-md);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--sp-sm);
    padding: var(--sp-3xl) 0;
}

.pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 var(--sp-md);
    border-radius: var(--r-md);
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--c-text);
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    transition: all var(--t-fast);
}

.pagination .page-numbers:hover,
.pagination .page-numbers.current {
    background: var(--c-primary);
    color: #fff;
    border-color: var(--c-primary);
}

/* ---------- RESPONSIVE GLOBAL ---------- */
@media (max-width: 768px) {
    .hero {
        min-height: 90vh;
    }

    .hero-title {
        letter-spacing: -0.01em;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

/* Print */
@media print {

    .site-header,
    .hero-wave,
    .cta-banner,
    .stats-bar,
    .whatsapp-widget {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }
}

/* ---------- WHATSAPP WIDGET ---------- */
.whatsapp-widget {
    position: fixed;
    bottom: var(--sp-xl);
    right: var(--sp-xl);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: var(--sp-md);
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all var(--t-spring);
    position: relative;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.55);
}

.whatsapp-btn svg {
    display: block;
}

.whatsapp-btn-pulse {
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid #25d366;
    animation: wa-pulse 2s ease-out infinite;
    pointer-events: none;
}

@keyframes wa-pulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }

    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* WhatsApp Popup */
.whatsapp-popup {
    width: 320px;
    background: var(--c-surface);
    border-radius: var(--r-xl);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.95);
    transition: all var(--t-base);
    border: 1px solid var(--c-border);
}

.whatsapp-popup.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.whatsapp-popup-close {
    position: absolute;
    top: var(--sp-sm);
    right: var(--sp-md);
    font-size: 1.4rem;
    color: rgba(255, 255, 255, 0.7);
    z-index: 2;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--t-fast);
}

.whatsapp-popup-close:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.whatsapp-popup-header {
    display: flex;
    align-items: center;
    gap: var(--sp-md);
    padding: var(--sp-lg);
    background: #075e54;
    color: #fff;
    position: relative;
}

.whatsapp-popup-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--fs-lg);
    flex-shrink: 0;
}

.whatsapp-popup-info strong {
    display: block;
    font-size: var(--fs-sm);
    font-weight: 600;
}

.whatsapp-popup-info span {
    font-size: var(--fs-xs);
    opacity: 0.8;
}

.whatsapp-popup-body {
    padding: var(--sp-lg);
    background: #e5ddd5;
    background-image: url("data:image/svg+xml,%3Csvg width='200' height='200' xmlns='http://www.w3.org/2000/svg'%3E%3Crect fill='%23e5ddd5'/%3E%3C/svg%3E");
}

.whatsapp-popup-message {
    background: #fff;
    padding: var(--sp-md) var(--sp-lg);
    border-radius: 0 var(--r-lg) var(--r-lg) var(--r-lg);
    font-size: var(--fs-sm);
    line-height: 1.6;
    color: var(--c-text);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
    max-width: 85%;
    position: relative;
}

.whatsapp-popup-message::before {
    content: '';
    position: absolute;
    top: 0;
    left: -8px;
    border: 8px solid transparent;
    border-top-color: #fff;
    border-right-color: #fff;
}

.whatsapp-popup-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-sm);
    padding: var(--sp-md);
    background: #25d366;
    color: #fff;
    font-weight: 600;
    font-size: var(--fs-sm);
    transition: background var(--t-fast);
}

.whatsapp-popup-cta:hover {
    background: #1da851;
    color: #fff;
}

.whatsapp-popup-cta i {
    font-size: var(--fs-lg);
}

@media (max-width: 480px) {
    .whatsapp-widget {
        bottom: var(--sp-md);
        right: var(--sp-md);
    }

    .whatsapp-popup {
        width: calc(100vw - 2rem);
    }

    .whatsapp-btn {
        width: 54px;
        height: 54px;
    }
}

/* ---------- SINGLE POST ---------- */
.single-post-hero {
    padding: calc(5rem + var(--sp-3xl)) 0 var(--sp-3xl);
    background: var(--g-cta);
    color: #fff;
    text-align: center;
}

.single-post-hero h1 {
    font-size: var(--fs-3xl);
    color: #fff;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.2;
}

.single-post-meta-top {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--sp-lg);
    margin-bottom: var(--sp-lg);
    font-size: var(--fs-sm);
}

.single-post-category {
    background: rgba(255, 255, 255, 0.15);
    padding: var(--sp-xs) var(--sp-md);
    border-radius: var(--r-full);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: var(--fs-xs);
}

.single-post-date {
    opacity: 0.8;
}

.single-post-content {
    padding: var(--sp-section) 0;
}

.single-post-inner {
    max-width: 800px;
    margin: 0 auto;
}

.single-post-thumbnail {
    margin-bottom: var(--sp-2xl);
    border-radius: var(--r-xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.single-post-thumbnail img {
    width: 100%;
    height: auto;
}

.single-post-body {
    font-size: var(--fs-md);
    line-height: 1.8;
}

/* Tags */
.single-post-tags {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--sp-sm);
    padding: var(--sp-2xl) 0;
    margin-top: var(--sp-2xl);
    border-top: 1px solid var(--c-border);
}

.single-post-tags i {
    color: var(--c-text-muted);
    margin-right: var(--sp-xs);
}

.post-tag {
    padding: var(--sp-xs) var(--sp-md);
    background: var(--c-bg-alt);
    border-radius: var(--r-full);
    font-size: var(--fs-xs);
    font-weight: 500;
    color: var(--c-text-muted);
    transition: all var(--t-fast);
}

.post-tag:hover {
    background: var(--c-primary);
    color: #fff;
}

/* Post Navigation */
.single-post-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-xl);
    padding: var(--sp-2xl) 0;
    border-top: 1px solid var(--c-border);
}

.post-nav-link {
    padding: var(--sp-lg);
    background: var(--c-bg-alt);
    border-radius: var(--r-lg);
    transition: all var(--t-base);
    display: block;
}

.post-nav-link:hover {
    background: var(--c-surface);
    box-shadow: var(--shadow-md);
}

.post-nav-next {
    text-align: right;
}

.post-nav-label {
    display: block;
    font-size: var(--fs-xs);
    color: var(--c-text-muted);
    margin-bottom: var(--sp-xs);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.post-nav-title {
    display: block;
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--c-text);
    line-height: 1.4;
}

@media (max-width: 768px) {
    .single-post-nav {
        grid-template-columns: 1fr;
    }

    .post-nav-next {
        text-align: left;
    }
}