/* ===================================
   CSS Variables & Design System
   =================================== */
:root {
    /* Professional Blue Theme */

    /* Blue Palette - Professional Tones */
    --blue-dark: #1E3A8A;
    --blue-primary: #2563EB;
    --blue-medium: #3B82F6;
    --blue-light: #60A5FA;
    --blue-lighter: #93C5FD;
    --blue-lightest: #DBEAFE;

    /* White Accents */
    --white: #FFFFFF;
    --white-soft: #F9FAFB;
    --white-muted: #F3F4F6;

    /* Backgrounds - Light Professional Theme */
    --bg-primary: #F8FAFC;
    --bg-secondary: #F1F5F9;
    --bg-tertiary: #E2E8F0;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F8FAFC;

    /* Surfaces */
    --surface-dark: #1E293B;
    --surface-medium: #334155;
    --surface-light: #E2E8F0;

    /* Text Colors */
    --text-primary: #0F172A;
    --text-secondary: #475569;
    --text-tertiary: #64748B;
    --text-muted: #94A3B8;

    /* Borders */
    --border-primary: #3B82F6;
    --border-secondary: #CBD5E1;
    --border-light: #E2E8F0;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 300ms ease-in-out;
    --transition-slow: 500ms ease-in-out;
}

/* ===================================
   Dark Mode Variables
   =================================== */
body.dark-mode {
    /* Dark Mode Backgrounds */
    --bg-primary: #0F172A;
    --bg-secondary: #1E293B;
    --bg-tertiary: #334155;
    --bg-card: #1E293B;
    --bg-card-hover: #334155;

    /* Dark Mode Surfaces */
    --surface-dark: #0F172A;
    --surface-medium: #1E293B;
    --surface-light: #334155;

    /* Dark Mode Text Colors */
    --text-primary: #F1F5F9;
    --text-secondary: #CBD5E1;
    --text-tertiary: #94A3B8;
    --text-muted: #64748B;

    /* Dark Mode Borders */
    --border-primary: #3B82F6;
    --border-secondary: #334155;
    --border-light: #1E293B;
}

/* ===================================
   Reset & Base Styles
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

ul {
    list-style: none;
}

/* ===================================
   Container & Layout
   =================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-3xl) 0;
}

/* ===================================
   Header & Navigation
   =================================== */
.header {
    background: var(--white);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-secondary);
}

body.dark-mode .header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-primary);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.logo-image {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(37, 99, 235, 0.2);
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

.logo-text {
    display: none;
}

.logo-name {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.logo-tagline {
    font-size: 0.75rem;
    color: var(--blue-medium);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.nav-menu {
    display: flex;
    gap: var(--spacing-lg);
    align-items: center;
}

.nav-menu a {
    font-weight: 500;
    color: var(--text-secondary);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.nav-menu a:hover {
    color: var(--blue-light);
    background-color: var(--surface-light);
}

.nav-menu a.active {
    color: var(--blue-primary);
    font-weight: 600;
}

.nav-cta {
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-medium) 100%);
    color: var(--white) !important;
    padding: var(--spacing-xs) var(--spacing-md) !important;
    border-radius: var(--radius-md);
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.nav-cta:hover {
    background: linear-gradient(135deg, var(--blue-medium) 0%, var(--blue-light) 100%) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3), 0 10px 15px -3px rgba(59, 130, 246, 0.2);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: var(--spacing-xs);
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--blue-primary);
    border-radius: 2px;
    transition: var(--transition-base);
}

/* Theme Toggle Button */
.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--surface-light);
    border: 2px solid var(--border-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
}

.theme-toggle:hover {
    background: var(--blue-primary);
    border-color: var(--blue-primary);
    transform: translateY(-2px);
}

.theme-toggle:hover svg {
    color: var(--white);
}

.theme-toggle svg {
    position: absolute;
    color: var(--text-primary);
    transition: all var(--transition-base);
}

/* Show sun icon in light mode, moon in dark mode */
.sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.moon-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

body.dark-mode .sun-icon {
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

body.dark-mode .moon-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* ===================================
   Hero Section
   =================================== */
.hero-section {
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-primary) 40%, var(--blue-medium) 100%);
    color: var(--white);
    padding: var(--spacing-3xl) var(--spacing-md);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.4;
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.95;
    font-weight: 300;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xl);
    flex-wrap: wrap;
    margin-top: var(--spacing-xl);
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-md);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    min-width: 150px;
    transition: all var(--transition-base);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-display);
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
    text-align: center;
}

/* ===================================
   About Section (Nosotros) - 3D Carousel
   =================================== */

/* --- Keyframes --- */
@keyframes aboutIconFloat {

    0%,
    100% {
        transform: scale(1.1) translateY(0px);
    }

    50% {
        transform: scale(1.1) translateY(-7px);
    }
}

@keyframes aboutShimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

@keyframes dotPulse {

    0%,
    100% {
        box-shadow: 0 0 6px rgba(37, 99, 235, 0.5);
    }

    50% {
        box-shadow: 0 0 14px rgba(37, 99, 235, 0.9);
    }
}

@keyframes btnBounce {
    0% {
        transform: scale(1);
    }

    30% {
        transform: scale(0.88);
    }

    65% {
        transform: scale(1.12);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes trackFadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Section --- */
.about-section {
    background-color: var(--bg-primary);
    overflow: hidden;
    position: relative;
    z-index: 10;
}

/* --- Wrapper --- */
.about-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 60px 20px;
    perspective: 1500px;
}

/* --- Track --- */
.about-carousel-track {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 520px;
}

.about-section.is-visible .about-carousel-track {
    animation: trackFadeUp 0.5s ease 0.1s both;
}

/* --- Individual Cards --- */
.about-card {
    position: absolute;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    width: 450px;
    height: 480px;
    border-radius: 24px;
    cursor: pointer;
    overflow: hidden;
    /* clips shimmer to card shape */
    transition:
        transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        opacity 0.38s ease;
    will-change: auto;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Activate GPU layer only during transition */
.about-card.is-animating {
    will-change: transform, opacity;
}


/* --- Card inner --- */
.about-card-inner {
    width: 100%;
    height: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-secondary);
    border-radius: 24px;
    /* Matched to outer card to prevent border clipping */
    padding: 2rem 1.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    scrollbar-width: none;
    transition:
        border-color 0.3s ease,
        background 0.3s ease;
    position: relative;
}

.about-card-inner::-webkit-scrollbar {
    display: none;
}

/* Slide-in animation classes added by JS to .about-card-inner */
.about-card-inner.slide-from-right {
    animation: slideInFromRight 0.35s ease-out both;
}

.about-card-inner.slide-from-left {
    animation: slideInFromLeft 0.35s ease-out both;
}

/* ── Shimmer keyframes: full-width sweep, GPU-only (transform) ── */
@keyframes aboutShimmerGPU {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* ===========================================================
   SHIMMER — on .about-card::after (avoids preserve-3d conflicts)
   overflow:hidden on .about-card clips it. Works on all screens.
   =========================================================== */

/* Light mode streak */
.about-card.state-center::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 20;
    /* above everything inside the card */
    pointer-events: none;
    border-radius: 24px;
    background: linear-gradient(90deg,
            transparent 0%,
            transparent 38%,
            rgba(255, 255, 255, 0.22) 50%,
            transparent 62%,
            transparent 100%);
    animation: aboutShimmerGPU 2.6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    animation-delay: -0.8s;
    will-change: transform;
}

/* Dark mode: slightly brighter */
body.dark-mode .about-card.state-center::after {
    background: linear-gradient(90deg,
            transparent 0%,
            transparent 38%,
            rgba(255, 255, 255, 0.30) 50%,
            transparent 62%,
            transparent 100%);
}

/* Mobile: one tick softer */
@media (max-width: 768px) {
    .about-card.state-center::after {
        background: linear-gradient(90deg,
                transparent 0%,
                transparent 38%,
                rgba(255, 255, 255, 0.15) 50%,
                transparent 62%,
                transparent 100%);
        animation-duration: 3s;
    }

    body.dark-mode .about-card.state-center::after {
        background: linear-gradient(90deg,
                transparent 0%,
                transparent 38%,
                rgba(255, 255, 255, 0.22) 50%,
                transparent 62%,
                transparent 100%);
    }
}

/* ── Pulsing border glow ── */
@keyframes aboutGlow {

    0%,
    100% {
        box-shadow: 0 20px 60px rgba(37, 99, 235, 0.28),
            0 0 0 1px rgba(37, 99, 235, 0.15);
    }

    50% {
        box-shadow: 0 24px 70px rgba(37, 99, 235, 0.42),
            0 0 0 1.5px rgba(96, 165, 250, 0.55),
            0 0 32px rgba(59, 130, 246, 0.22);
    }
}

@keyframes aboutGlowMobile {

    0%,
    100% {
        box-shadow: 0 16px 40px rgba(37, 99, 235, 0.22),
            0 0 0 1px rgba(37, 99, 235, 0.12);
    }

    50% {
        box-shadow: 0 20px 50px rgba(37, 99, 235, 0.34),
            0 0 0 1.5px rgba(96, 165, 250, 0.4),
            0 0 20px rgba(59, 130, 246, 0.16);
    }
}

/* Glow — desktop */
.about-card.state-center .about-card-inner {
    animation: aboutGlow 3s ease-in-out infinite;
    animation-delay: -1s;
}

/* Glow — mobile override */
@media (max-width: 768px) {
    .about-card.state-center .about-card-inner {
        animation: aboutGlowMobile 3s ease-in-out infinite;
        animation-delay: -1s;
    }
}

/* --- State Classes (Physical 3D positions) --- */
.about-card.state-center {
    transform: translateX(0) translateY(-20px) scale(1) rotateY(0deg) rotateX(0deg);
    opacity: 1;
    z-index: 10;
}

.about-card.state-left {
    transform: translateX(-340px) translateY(15px) scale(0.75) rotateY(20deg);
    opacity: 0.4;
    z-index: 5;
    /* filter:blur removed — most expensive GPU effect on mobile */
}

.about-card.state-right {
    transform: translateX(340px) translateY(15px) scale(0.75) rotateY(-20deg);
    opacity: 0.4;
    z-index: 5;
}


/* Active card glow — desktop only (animation overridden to none on mobile) */
.about-card.state-center .about-card-inner {
    border-color: var(--blue-primary);
    background: var(--bg-card-hover);
    box-shadow: 0 20px 60px rgba(37, 99, 235, 0.28), 0 0 0 1px rgba(37, 99, 235, 0.15);
}

/* --- Card Icon --- */
.about-card-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-medium) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-bottom: 1.25rem;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    position: relative;
    z-index: 1;
}

.about-card.state-center .about-card-icon {
    /* Float animation removed — perpetual animations cause mobile lag */
    box-shadow: 0 12px 30px rgba(37, 99, 235, 0.45);
}

.about-card.state-left .about-card-icon,
.about-card.state-right .about-card-icon {
    transform: scale(0.88);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.12);
}

/* --- Card Title --- */
.about-card-title {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--blue-primary);
    margin-bottom: 0.875rem;
    line-height: 1.3;
    position: relative;
    z-index: 1;
}

/* --- Card Text --- */
.about-card-text {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.65;
    margin-bottom: 0.625rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

/* --- Values List --- */
.about-card-values {
    list-style: none;
    padding: 0;
    width: 100%;
    text-align: left;
    margin-top: 0.25rem;
    position: relative;
    z-index: 1;
}

.about-card-values li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.375rem;
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 3px solid var(--blue-primary);
    font-size: 0.82rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.about-card-values li:hover {
    background: var(--bg-tertiary);
    transform: translateX(3px);
}

.about-card-values strong {
    color: var(--blue-primary);
    margin-right: 0.2rem;
    white-space: nowrap;
}

.value-dot {
    display: none;
}

/* --- Navigation Buttons --- */
.about-carousel-btn {
    position: absolute;
    z-index: 20;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-secondary);
    color: var(--text-primary);
    font-size: 1.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.about-carousel-btn:hover {
    background: var(--blue-primary);
    border-color: var(--blue-primary);
    color: white;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.about-carousel-btn.btn-clicked {
    animation: btnBounce 0.35s ease forwards;
}

.about-carousel-prev {
    left: 4px;
}

.about-carousel-next {
    right: 4px;
}

/* --- Dots --- */
.about-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}

.about-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-secondary);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.about-dot:hover {
    background: var(--blue-lighter);
    transform: scale(1.3);
}

.about-dot.active {
    background: var(--blue-primary);
    width: 26px;
    border-radius: 5px;
    /* dotPulse removed — perpetual box-shadow animation causes repaints */
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .about-carousel-wrapper {
        padding: 30px 48px 20px;
    }

    .about-card {
        width: 320px;
        min-height: 320px;
        height: auto;
        margin: 0 auto !important;
        left: 0;
        right: 0;
        transition: transform 0.38s ease-out, opacity 0.32s ease !important;
    }

    .about-card-inner {
        height: auto;
        min-height: 360px;
        overflow-y: visible;
    }

    .about-carousel-track {
        height: 440px;
    }

    .about-card.state-left {
        transform: translate3d(-190px, 10px, 0) scale(0.7) rotateY(15deg);
        opacity: 0.35;
        z-index: 5 !important;
    }

    .about-card.state-right {
        transform: translate3d(190px, 10px, 0) scale(0.7) rotateY(-15deg);
        opacity: 0.35;
        z-index: 5 !important;
    }

    .about-card.state-center {
        transform: translate3d(0, -12px, 80px) scale(1) rotateY(0);
        z-index: 10 !important;
    }

    /* Botones sobre las tarjetas laterales en móvil */
    .about-carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.375rem;
        z-index: 25;
    }

    .about-carousel-prev {
        left: 2px;
    }

    .about-carousel-next {
        right: 2px;
    }
}

@media (max-width: 480px) {
    .about-carousel-wrapper {
        padding: 24px 44px 16px;
    }

    .about-card {
        width: 290px;
        min-height: 290px;
        height: auto;
        margin: 0 auto !important;
        left: 0;
        right: 0;
        transition: transform 0.38s ease-out, opacity 0.32s ease !important;
    }

    .about-card-inner {
        height: auto;
        min-height: 360px;
        overflow-y: visible;
    }

    .about-carousel-track {
        height: 440px;
    }

    .about-card.state-left {
        transform: translate3d(-155px, 8px, 0) scale(0.65) rotateY(12deg);
        opacity: 0.32;
        z-index: 5 !important;
    }

    .about-card.state-right {
        transform: translate3d(155px, 8px, 0) scale(0.65) rotateY(-12deg);
        opacity: 0.32;
        z-index: 5 !important;
    }

    .about-card.state-center {
        transform: translate3d(0, -10px, 60px) scale(1) rotateY(0);
        z-index: 10 !important;
    }
}

/* ===================================
   Services Section (Servicios)
   =================================== */
.services-section {
    background-color: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-lg);
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    text-align: center;
    transition: all var(--transition-base);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.service-card:hover {
    border-color: var(--blue-primary);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2), 0 4px 6px -2px rgba(37, 99, 235, 0.1);
    transform: translateY(-8px);
    background: var(--bg-card-hover);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-medium) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: transform var(--transition-base);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.3), 0 2px 4px -1px rgba(37, 99, 235, 0.2);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.service-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ===================================
   Section Headers
   =================================== */
.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 300;
}

/* ===================================
   Blog Section
   =================================== */
.blog-section {
    background-color: var(--bg-secondary);
    overflow: hidden;
    position: relative;
    z-index: 5;
}

/* --- Wrapper --- */
.blog-carousel-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 60px 20px;
    perspective: 1500px;
}

/* --- Track --- */
.blog-carousel-track {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 100%;
    height: 540px;
}

.blog-section.is-visible .blog-carousel-track {
    animation: trackFadeUp 0.5s ease 0.1s both;
}

.blog-card {
    position: absolute;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
    width: 470px;
    height: 490px;
    border-radius: 24px;
    cursor: pointer;
    overflow: hidden;
    /* clips shimmer to card shape */
    transition:
        transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94),
        opacity 0.38s ease;
    will-change: auto;
}

.blog-card.is-animating {
    will-change: transform, opacity;
}

.blog-card-inner {
    width: 100%;
    height: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-secondary);
    border-radius: 24px;
    /* Matched to outer card to prevent border clipping */
    padding: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    transition:
        border-color 0.3s ease,
        background 0.3s ease;
    position: relative;
    isolation: isolate;
    /* ensures z-index works correctly for shimmer */
}

/* Pseudo-element to darken inactive cards instead of making them transparent */
.blog-card-inner::after {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(241, 245, 249, 0.85);
    /* Bg-secondary to match background, or white */
    z-index: 5;
    transition: opacity 0.7s ease;
    pointer-events: none;
    opacity: 0;
}

body.dark-mode .blog-card-inner::after {
    background-color: rgba(30, 41, 59, 0.85);
    /* Dark mode bg surface */
}

.blog-card-inner:hover {
    background: var(--bg-card-hover);
    border-color: var(--blue-primary);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2), 0 4px 6px -2px rgba(37, 99, 235, 0.1);
}

/* --- State Classes (Blog 3D positions) --- */
.blog-card.state-center {
    transform: translateX(0) translateY(-20px) scale(1) rotateY(0deg) rotateX(0deg);
    opacity: 1;
    z-index: 10;
}

.blog-card.state-left {
    transform: translateX(-350px) translateY(15px) scale(0.75) rotateY(20deg);
    opacity: 0.4;
    z-index: 5;
}

.blog-card.state-left .blog-card-inner::after {
    opacity: 1;
    /* Darken */
}

.blog-card.state-right {
    transform: translateX(350px) translateY(15px) scale(0.75) rotateY(-20deg);
    opacity: 0.4;
    z-index: 5;
}

.blog-card.state-right .blog-card-inner::after {
    opacity: 1;
    /* Darken */
}

.blog-card.state-hidden {
    transform: scale(0.5) translateZ(-500px);
    opacity: 0;
    z-index: 0;
    pointer-events: none;
}

/* --- Blog card active state glow is now handled by blogGlow animation above --- */

/* ── Blog shimmer: same GPU-only pattern as about-card ── */
@keyframes blogShimmerGPU {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

/* =============================================================
   BLOG SHIMMER — on .blog-card::after (avoids preserve-3d conflicts)
   blog-card has overflow:hidden via border-radius clipping.
   ============================================================= */

/* Light mode streak */
.blog-card.state-center::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 20;
    pointer-events: none;
    border-radius: 24px;
    background: linear-gradient(90deg,
            transparent 0%,
            transparent 38%,
            rgba(255, 255, 255, 0.22) 50%,
            transparent 62%,
            transparent 100%);
    animation: blogShimmerGPU 2.6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
    animation-delay: -0.8s;
    will-change: transform;
}

/* Dark mode: brighter */
body.dark-mode .blog-card.state-center::after {
    background: linear-gradient(90deg,
            transparent 0%,
            transparent 38%,
            rgba(255, 255, 255, 0.30) 50%,
            transparent 62%,
            transparent 100%);
}

/* Mobile: softer */
@media (max-width: 768px) {
    .blog-card.state-center::after {
        background: linear-gradient(90deg,
                transparent 0%,
                transparent 38%,
                rgba(255, 255, 255, 0.15) 50%,
                transparent 62%,
                transparent 100%);
        animation-duration: 3s;
    }

    body.dark-mode .blog-card.state-center::after {
        background: linear-gradient(90deg,
                transparent 0%,
                transparent 38%,
                rgba(255, 255, 255, 0.22) 50%,
                transparent 62%,
                transparent 100%);
    }
}

/* ── Blog pulsing border glow (same as about-card) ── */
@keyframes blogGlow {

    0%,
    100% {
        box-shadow: 0 20px 60px rgba(37, 99, 235, 0.28),
            0 0 0 1px rgba(37, 99, 235, 0.15);
    }

    50% {
        box-shadow: 0 24px 70px rgba(37, 99, 235, 0.42),
            0 0 0 1.5px rgba(96, 165, 250, 0.55),
            0 0 32px rgba(59, 130, 246, 0.22);
    }
}

@keyframes blogGlowMobile {

    0%,
    100% {
        box-shadow: 0 16px 40px rgba(37, 99, 235, 0.22),
            0 0 0 1px rgba(37, 99, 235, 0.12);
    }

    50% {
        box-shadow: 0 20px 50px rgba(37, 99, 235, 0.34),
            0 0 0 1.5px rgba(96, 165, 250, 0.4),
            0 0 20px rgba(59, 130, 246, 0.16);
    }
}

/* Glow — desktop */
.blog-card.state-center .blog-card-inner {
    border-color: var(--blue-primary);
    background: var(--bg-card-hover);
    box-shadow: 0 20px 60px rgba(37, 99, 235, 0.28), 0 0 0 1px rgba(37, 99, 235, 0.15);
    animation: blogGlow 3s ease-in-out infinite;
    animation-delay: -1s;
}

/* Glow — mobile */
@media (max-width: 768px) {
    .blog-card.state-center .blog-card-inner {
        animation: blogGlowMobile 3s ease-in-out infinite;
        animation-delay: -1s;
    }
}

.blog-card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.blog-image-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-slow);
}

.blog-card:hover .blog-image-placeholder {
    transform: scale(1.05);
}

.blog-category {
    position: absolute;
    top: var(--spacing-sm);
    left: var(--spacing-sm);
    background: rgba(37, 99, 235, 0.95);
    color: var(--white);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.blog-card-content {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
    line-height: 1.4;
}

.blog-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
    flex-grow: 1;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border-secondary);
    width: 100%;
}

/* --- Navigation Buttons --- */
.blog-carousel-btn {
    position: absolute;
    z-index: 20;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 2px solid var(--border-secondary);
    color: var(--text-primary);
    font-size: 1.625rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.blog-carousel-btn:hover {
    background: var(--blue-primary);
    border-color: var(--blue-primary);
    color: white;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
}

.blog-carousel-prev {
    left: 4px;
}

.blog-carousel-next {
    right: 4px;
}

/* --- Dots --- */
.blog-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 28px;
}

.blog-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border-secondary);
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-dot:hover {
    background: var(--blue-lighter);
    transform: scale(1.3);
}

.blog-dot.active {
    background: var(--blue-primary);
    width: 26px;
    border-radius: 5px;
}

.blog-date {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.blog-read-more {
    color: var(--blue-primary);
    font-weight: 600;
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
}

.blog-read-more:hover {
    color: var(--blue-medium);
    transform: translateX(4px);
}

/* --- Responsive Blog Section (moved here mapping cascading priorities) --- */
@media (max-width: 768px) {

    /* Blog Carousel Responsive */
    .blog-carousel-wrapper {
        padding: 30px 48px 20px;
    }

    .blog-card {
        width: 100vw;
        max-width: 480px;
        /* Aumentado para abarcar todo el dispositivo */
        height: 160vw;
        /* Elevado al máximo para acomodar texto y no hacer overlap */
        max-height: 680px;
        margin: 0 auto !important;
        left: 0;
        right: 0;
        transition: transform 0.38s ease-out, opacity 0.32s ease !important;
    }

    .blog-card-inner {
        width: 100%;
        height: 100%;
        /* Respetará el cuadrado perfecto */
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    /* Reglas internas inyectadas para 768px */
    .blog-card-image {
        height: 25% !important;
        /* Reducido al mínimo para maximizar texto */
        min-height: 0 !important;
        flex: 0 0 25% !important;
        border-radius: 24px 24px 0 0 !important;
        overflow: hidden;
    }

    .blog-card-content {
        height: 75% !important;
        padding: 1.2rem !important;
        gap: 6px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        overflow: hidden !important;
    }

    .blog-card-title {
        font-size: 1.35rem !important;
        /* Título más grande */
        margin-bottom: 6px !important;
        line-height: 1.3 !important;
    }

    .blog-card-excerpt {
        font-size: 1.05rem !important;
        /* Texto maximizado para celular/tablet */
        line-height: 1.45 !important;
        margin-bottom: 0 !important;
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        -webkit-line-clamp: 10 !important;
        /* Ampliado absurdamente de 6 a 10 para garantizar el todo */
        line-clamp: 10 !important;
        overflow: hidden !important;
        /* Frenar el solapamiento */
        flex: none !important;
    }

    .blog-carousel-track {
        height: 750px;
        /* Aumentado a tope para tarjetas gigantescas */
    }

    .blog-card.state-left {
        transform: translate3d(-42vw, 6px, 0) scale(0.72);
        opacity: 0.55;
        z-index: 5 !important;
    }

    .blog-card.state-right {
        transform: translate3d(42vw, 6px, 0) scale(0.72);
        opacity: 0.55;
        z-index: 5 !important;
    }

    .blog-card.state-center {
        transform: translate3d(0, -10px, 0) scale(1);
        z-index: 10 !important;
    }

    .blog-carousel-btn {
        width: 40px;
        height: 40px;
        font-size: 1.375rem;
    }

    .blog-carousel-prev {
        left: 2px;
    }

    .blog-carousel-next {
        right: 2px;
    }
}

@media (max-width: 480px) {

    /* Blog Carousel Responsive Mobile */
    .blog-carousel-wrapper {
        padding: 24px 10px 16px;
        /* Reducido padding lateral para más ancho */
    }

    .blog-card {
        width: 100vw;
        max-width: 480px;
        /* Expandido al máximo posible para celulares anchos */
        height: 160vw;
        /* Llevado a dimensiones superlativas  */
        max-height: 680px;
        margin: 0 auto !important;
        left: 0;
        right: 0;
        transition: transform 0.38s ease-out, opacity 0.32s ease !important;
    }

    .blog-card-inner {
        width: 100%;
        height: 100%;
        /* Respetará el cuadrado perfecto */
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .blog-carousel-track {
        height: 750px;
        /* Elevado al cielo para tarjetas masivas largas */
    }

    .blog-card.state-left {
        transform: translate3d(-48vw, 6px, 0) scale(0.68);
        opacity: 0.5;
        z-index: 5 !important;
    }

    .blog-card.state-right {
        transform: translate3d(48vw, 6px, 0) scale(0.68);
        opacity: 0.5;
        z-index: 5 !important;
    }

    .blog-card.state-center {
        transform: translate3d(0, -8px, 0) scale(1);
        z-index: 10 !important;
    }

    .blog-card-image {
        height: 25% !important;
        min-height: 0 !important;
        flex: 0 0 25% !important;
        border-radius: 24px 24px 0 0 !important;
        overflow: hidden;
    }

    .blog-card-content {
        height: 75% !important;
        /* Control absoluto para el desborde completo del extracto */
        padding: 1.2rem !important;
        gap: 6px !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        overflow: hidden !important;
    }

    .blog-card-title {
        font-size: 1.35rem !important;
        /* Letra mucho más grande */
        margin-bottom: 6px !important;
        line-height: 1.3 !important;
    }

    .blog-card-excerpt {
        font-size: 1.05rem !important;
        /* Letra sumamente clara de leer en el excerpt */
        line-height: 1.45 !important;
        margin-bottom: 0 !important;
        display: -webkit-box !important;
        -webkit-box-orient: vertical !important;
        -webkit-line-clamp: 10 !important;
        /* Frenar a unas seguras 10 líneas máximo por si acaso */
        line-clamp: 10 !important;
        overflow: hidden !important;
        /* Cortar el exceso salvajemente encimado */
        flex: none !important;
    }

    .blog-card-footer {
        padding-top: 5px !important;
    }
}

/* ===================================
   Resources Section
   =================================== */
.resources-section {
    background: var(--bg-primary);
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-lg);
}

.resource-card {
    background: var(--bg-card);
    border: 1px solid var(--border-secondary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    text-align: center;
    transition: all var(--transition-base);
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.resource-card:hover {
    border-color: var(--blue-primary);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2), 0 4px 6px -2px rgba(37, 99, 235, 0.1);
    transform: translateY(-5px);
    background: var(--bg-card-hover);
}

.resource-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--spacing-md);
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-medium) 100%);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: transform var(--transition-base);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
}

.resource-card:hover .resource-icon {
    transform: scale(1.1) rotate(5deg);
}

.resource-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.resource-description {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.6;
}

.resource-download-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-medium) 100%);
    color: var(--white);
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: all var(--transition-base);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 15px rgba(37, 99, 235, 0.2);
}

.resource-download-btn:hover {
    background: linear-gradient(135deg, var(--blue-medium) 0%, var(--blue-light) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px -3px rgba(37, 99, 235, 0.3), 0 5px 15px -3px rgba(59, 130, 246, 0.2), 0 0 25px rgba(37, 99, 235, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

/* ===================================
   Video Section
   =================================== */
.video-section {
    background: var(--bg-secondary);
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--spacing-lg);
}

.video-card {
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    transition: all var(--transition-base);
    cursor: pointer;
    border: 1px solid var(--border-secondary);
}

.video-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.2), 0 4px 6px -2px rgba(37, 99, 235, 0.1);
    background: var(--bg-card-hover);
    border-color: var(--blue-primary);
}

.video-thumbnail {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.video-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-medium) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
}

.video-card:hover .video-placeholder {
    transform: scale(1.05);
}

.video-card:hover .video-placeholder svg {
    transform: scale(1.2);
}

.video-content {
    padding: var(--spacing-md);
}

.video-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-xs);
}

.video-duration {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* ===================================
   CTA Section
   =================================== */
.cta-section {
    background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-primary) 50%, var(--blue-medium) 100%);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
}

.cta-content {
    position: relative;
    z-index: 1;
}

.cta-title {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.cta-subtitle {
    font-size: 1.125rem;
    margin-bottom: var(--spacing-xl);
    opacity: 0.95;
}

.cta-buttons {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    padding: var(--spacing-md) var(--spacing-xl);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    transition: all var(--transition-base);
}

.btn-primary {
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-medium) 100%);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 0 20px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--blue-medium) 0%, var(--blue-light) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px -3px rgba(37, 99, 235, 0.3), 0 5px 15px -3px rgba(59, 130, 246, 0.3), 0 0 30px rgba(37, 99, 235, 0.4);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border: 2px solid var(--white);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--surface-dark);
    color: var(--text-secondary);
    padding: var(--spacing-3xl) 0 var(--spacing-lg);
    border-top: 1px solid var(--border-primary);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-column {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

.footer-logo-image {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(37, 99, 235, 0.3);
}

.footer-logo-text {
    display: none;
}

.footer-logo-name {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--text-primary);
}

.footer-logo-tagline {
    font-size: 0.75rem;
    color: var(--blue-medium);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.footer-about {
    font-size: 0.9375rem;
    line-height: 1.6;
    margin-bottom: var(--spacing-md);
    color: var(--text-tertiary);
}

.footer-social {
    display: flex;
    gap: var(--spacing-sm);
}

.footer-social a {
    width: 40px;
    height: 40px;
    background: rgba(37, 99, 235, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blue-primary);
    transition: all var(--transition-base);
}

.footer-social a:hover {
    background: var(--blue-primary);
    color: var(--white);
    transform: translateY(-3px);
}

.footer-column-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.footer-links a {
    color: var(--text-tertiary);
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
    padding: var(--spacing-xs) 0;
}

.footer-links a:hover {
    color: var(--blue-primary);
    padding-left: var(--spacing-xs);
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-tertiary);
    font-size: 0.9375rem;
}

.footer-contact svg {
    flex-shrink: 0;
    color: var(--blue-primary);
}

.footer-contact a:hover {
    color: var(--blue-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-secondary);
    padding-top: var(--spacing-md);
    margin-top: var(--spacing-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-legal {
    display: flex;
    gap: var(--spacing-md);
}

.footer-legal a {
    color: var(--text-muted);
    font-size: 0.875rem;
}

.footer-legal a:hover {
    color: var(--blue-primary);
}

/* ===================================
   Responsive Design
   =================================== */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        gap: var(--spacing-md);
    }

    .stat-item {
        min-width: 120px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .section {
        padding: var(--spacing-2xl) 0;
    }

    .blog-grid,
    .resources-grid,
    .video-grid {
        grid-template-columns: 1fr;
    }

    .cta-title {
        font-size: 1.75rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {

    .blog-grid,
    .resources-grid,
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===================================
   Animations
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-card,
.resource-card,
.video-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Stagger animation for cards */
.blog-card:nth-child(1) {
    animation-delay: 0.1s;
}

.blog-card:nth-child(2) {
    animation-delay: 0.2s;
}

.blog-card:nth-child(3) {
    animation-delay: 0.3s;
}

.blog-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* ===================================
   Accessibility
   =================================== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

:focus-visible {
    outline: 2px solid var(--blue-primary);
    outline-offset: 2px;
}

/* ===================================
   Print Styles
   =================================== */
@media print {

    .header,
    .footer,
    .cta-section,
    .mobile-menu-toggle {
        display: none;
    }

    body {
        font-size: 12pt;
    }

    .section {
        page-break-inside: avoid;
    }
}

/* ===================================
   Article Page Styles
   =================================== */
.article-page {
    background: var(--bg-primary);
    min-height: 100vh;
    padding: var(--spacing-3xl) 0;
}

.article-header {
    text-align: center;
    margin-bottom: var(--spacing-3xl);
    padding-bottom: var(--spacing-xl);
    border-bottom: 2px solid var(--border-primary);
}

.article-category {
    display: inline-block;
    background: linear-gradient(135deg, var(--blue-primary) 0%, var(--blue-medium) 100%);
    color: var(--white);
    padding: var(--spacing-xs) var(--spacing-md);
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--spacing-md);
}

.article-title {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-md);
    line-height: 1.2;
}

.article-meta {
    color: var(--text-tertiary);
    font-size: 0.9375rem;
}

.article-content {
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1.0625rem;
}

.article-content h2 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: var(--spacing-2xl);
    margin-bottom: var(--spacing-md);
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-sm);
}

.article-content p {
    margin-bottom: var(--spacing-md);
}

.article-content ul,
.article-content ol {
    margin-bottom: var(--spacing-md);
    padding-left: var(--spacing-xl);
}

.article-content li {
    margin-bottom: var(--spacing-sm);
}

.article-content strong {
    color: var(--blue-primary);
    font-weight: 600;
}

.article-cta {
    background: var(--bg-card);
    border: 2px solid var(--blue-primary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    text-align: center;
    margin-top: var(--spacing-3xl);
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.2);
}

.article-cta h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.article-cta p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.article-footer {
    max-width: 800px;
    margin: var(--spacing-3xl) auto 0;
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-secondary);
}

.back-link {
    display: inline-flex;
    align-items: center;
    color: var(--blue-primary);
    font-weight: 600;
    transition: all var(--transition-fast);
}

.back-link:hover {
    color: var(--blue-medium);
    transform: translateX(-5px);
}

/* ===================================
   MOBILE RESPONSIVE STYLES
   =================================== */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Tablet and Mobile */
@media (max-width: 768px) {

    /* Show mobile menu toggle */
    .mobile-menu-toggle {
        display: flex !important;
    }

    /* Backdrop overlay when menu is open - transparent in light mode */
    .nav-menu::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: -1;
    }

    .nav-menu.active::before {
        opacity: 1;
        visibility: visible;
    }

    /* Dark mode - show dark overlay */
    body.dark-mode .nav-menu::before {
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(4px);
    }

    /* Mobile Navigation - Professional side drawer */
    .nav-menu {
        display: flex;
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 300px;
        height: 100vh;
        background: #ffffff !important;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        padding: 5rem 0 2rem 0;
        gap: 0.25rem;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        z-index: 999;
        overflow-y: auto;
        transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
        text-align: left;
        list-style: none;
        border-left: 3px solid transparent;
        transition: border-color 0.2s ease;
    }

    .nav-menu li:hover {
        border-left-color: var(--blue-primary);
        background: rgba(37, 99, 235, 0.05);
    }

    .nav-menu a {
        display: block;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        font-weight: 500;
        color: var(--text-primary);
        text-decoration: none;
        transition: all 0.2s ease;
    }

    .nav-menu a:hover {
        color: var(--blue-primary);
        padding-left: 2rem;
    }

    .nav-menu a.active {
        color: var(--blue-primary);
        background: rgba(37, 99, 235, 0.1);
    }

    .nav-cta {
        margin: 1.5rem 1.5rem 0.5rem 1.5rem;
        width: calc(100% - 3rem);
        text-align: center;
    }

    /* Typography */
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.6;
    }

    .section-title {
        font-size: 1.75rem;
        text-align: center;
    }

    .section-subtitle {
        font-size: 0.9375rem;
        line-height: 1.6;
        text-align: center;
    }

    /* 3D Carousel Effect - Center focused with side cards visible */
    .services-grid,
    .blog-grid,
    .resources-grid {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        gap: 1rem;
        padding: 2rem 0;
        scrollbar-width: none;
        justify-content: center;
        align-items: center;
        perspective: 1000px;
    }

    .services-grid::-webkit-scrollbar,
    .blog-grid::-webkit-scrollbar,
    .resources-grid::-webkit-scrollbar {
        display: none;
    }

    .service-card,
    .blog-card,
    .resource-card {
        min-width: 70%;
        max-width: 70%;
        scroll-snap-align: center;
        flex-shrink: 0;
        margin: 0 0.5rem;
        transition: transform 0.3s ease, opacity 0.3s ease, scale 0.3s ease;
        transform-origin: center;
        opacity: 0.6;
        scale: 0.85;
    }

    /* Center card is larger and fully visible */
    .service-card:nth-child(1),
    .blog-card:nth-child(1),
    .resource-card:nth-child(1) {
        opacity: 1;
        scale: 1;
        z-index: 2;
    }

    /* Add padding to first and last cards */
    .service-card:first-child,
    .blog-card:first-child,
    .resource-card:first-child {
        margin-left: 15%;
    }

    .service-card:last-child,
    .blog-card:last-child,
    .resource-card:last-child {
        margin-right: 15%;
    }

    /* Container */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
        max-width: 100%;
    }

    /* Hero */
    .hero {
        padding: 2rem 0;
        min-height: auto;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    /* Article Page */
    .article-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .article-content {
        font-size: 1rem;
        line-height: 1.8;
    }

    .article-content h2 {
        font-size: 1.5rem;
        margin-top: 2rem;
    }

    .article-content p {
        margin-bottom: 1rem;
    }
}

/* ===================================
   MOBILE MENU WHITE BACKGROUND FIX
   =================================== */
@media (max-width: 768px) {

    /* Force white background on mobile menu */
    .nav-menu,
    .nav-menu.active,
    nav .nav-menu,
    .nav-container .nav-menu {
        background: #ffffff !important;
        background-color: #ffffff !important;
    }

    /* Force dark text on white background */
    .nav-menu li a,
    .nav-menu a {
        color: #1f2937 !important;
    }

    .nav-menu li a:hover,
    .nav-menu a:hover {
        color: #2563eb !important;
    }
}

/* ===================================
   Floating Social Buttons
   =================================== */
.floating-social {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 9999;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    text-decoration: none;
}

.floating-btn:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    color: white;
}

.floating-whatsapp {
    background: #25d366;
}

.floating-instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2361 75%, #bc1888 100%);
}

.floating-btn svg {
    transition: transform 0.3s ease;
}

.floating-btn:hover svg {
    transform: rotate(10deg);
}

@media (max-width: 768px) {
    .floating-social {
        bottom: 20px;
        right: 20px;
        gap: 10px;
    }

    .floating-btn {
        width: 50px;
        height: 50px;
    }
}