/* ==========================================================================
   VARIABLES / THEME  (AESTHETIC UPDATE: less â€œagency blueâ€, more premium graphite)
   ========================================================================== */
:root {
    /* Brand accents (kept recognizable) */
    --primary: #FF6B35;
    --secondary: #3A2B8F; /* deeper violet (premium) instead of classic agency-blue */
    --accent: #22D3EE;    /* slightly softer cyan (still â€œtechâ€, less neon) */

    /* New dark identity: graphite / ink (less navy) */
    --dark: #0C0B10;      /* page background */
    --darker: #08070C;    /* section/surface background */
    --surface: #0F0E14;   /* elevated surfaces */

    /* Text */
    --white: #ffffff;
    --gray: #9AA3B8;      /* slightly clearer legibility */

    /* Helpful RGBs for rgba() (purely aesthetic) */
    --dark-rgb: 12, 11, 16;
    --darker-rgb: 8, 7, 12;
    --surface-rgb: 15, 14, 20;

    /* Subtle borders / glows */
    --border-soft: rgba(255, 255, 255, 0.06);
    --border-mid: rgba(255, 255, 255, 0.10);
    --shadow-soft: 0 20px 70px rgba(0, 0, 0, 0.55);
}

/* ==========================================================================
   RESET / BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    /* Aesthetic: subtle multi-layer background to avoid â€œflat navyâ€ */
    background:
        radial-gradient(900px 500px at 20% 10%, rgba(255, 107, 53, 0.08) 0%, transparent 60%),
        radial-gradient(900px 500px at 80% 20%, rgba(34, 211, 238, 0.06) 0%, transparent 55%),
        radial-gradient(800px 600px at 50% 100%, rgba(58, 43, 143, 0.06) 0%, transparent 60%),
        linear-gradient(180deg, rgba(var(--dark-rgb), 1) 0%, rgba(var(--darker-rgb), 1) 100%);
    color: var(--white);
    overflow-x: hidden;
    line-height: 1.6;
}

/* ==========================================================================
   CUSTOM CURSOR (FUNCTIONALITY: unchanged)
   ========================================================================== */
body {
    cursor: none;
}

.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: all 0.1s ease;
    mix-blend-mode: difference;
}

.cursor-follower {
    width: 8px;
    height: 8px;
    background: var(--accent);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: all 0.15s ease;
}

/* Disable custom cursor on tablet and below */
@media (max-width: 991px) {
  .custom-cursor,
  .cursor-follower {
    display: none !important;
  }

  body {
    cursor: auto;
  }
}


/* ==========================================================================
   NAVBAR (FUNCTIONALITY: unchanged, aesthetic updated)
   ========================================================================== */
.navbar-custom {
    background: rgb(12 11 16 / 25%);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
}

.navbar-custom.scrolled {
    padding: 1rem 0;
    background: rgba(var(--dark-rgb), 0.92);
}

.navbar-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--white) !important;
    letter-spacing: -1px;
    text-transform: uppercase;
}

.navbar-brand .highlight {
    color: var(--primary);
}

.nav-link {
    color: rgba(154, 163, 184, 0.92) !important;
    font-weight: 500;
    margin: 0 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.95rem;
    font-family: 'Space Grotesk', sans-serif;
}

.nav-link:hover {
    color: var(--white) !important;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), rgba(34, 211, 238, 0.9));
    transition: width 0.3s ease;
}

.nav-link:hover::before {
    width: 100%;
}

.btn-nav-cta {
    background: linear-gradient(135deg, var(--primary) 0%, rgba(255, 107, 53, 0.85) 60%, rgba(34, 211, 238, 0.70) 140%);
    color: var(--white) !important;
    padding: 0.7rem 1.8rem;
    border-radius: 50px;
    font-weight: 600;
    margin-left: 1rem;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.btn-nav-cta:hover {
    background: linear-gradient(135deg, rgba(34, 211, 238, 0.95) 0%, var(--primary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 34px rgba(34, 211, 238, 0.22), 0 10px 30px rgba(255, 107, 53, 0.18);
}

/* Spacing for CTA button inside mobile / tablet navbar */
@media (max-width: 991px) {
  .navbar-nav .btn-nav-cta {
    margin-top: 1rem;
    padding: 0.9rem 2rem;
    width: 100%;
    text-align: center;
    padding: 10px 18px;
  }

  .navbar-nav .nav-item:last-child {
    margin-top: 0.5rem;
  }
}


/* ==========================================================================
   HERO VIDEO SECTION (FUNCTIONALITY: unchanged, aesthetic updated)
   ========================================================================== */
.hero-video {
    height: 100vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#hero-bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 1;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Aesthetic: remove â€œnavy washâ€ -> graphite + controlled brand glow */
    background:
        radial-gradient(900px 520px at 18% 18%, rgba(255, 107, 53, 0.14) 0%, transparent 60%),
        radial-gradient(900px 520px at 82% 22%, rgba(34, 211, 238, 0.12) 0%, transparent 58%),
        linear-gradient(135deg, rgba(var(--dark-rgb), 0.35) 0%, rgba(var(--darker-rgb), 0.82) 52%, rgba(var(--dark-rgb), 0.30) 100%);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    max-width: 1200px;
    padding: 0 2rem;
}

.hero-badge {
    display: inline-block;
    background: rgba(255, 107, 53, 0.10);
    border: 1px solid rgba(255, 107, 53, 0.25);
    color: var(--primary);
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 2rem;
    font-family: 'Space Grotesk', sans-serif;
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(3rem, 10vw, 7rem);
    font-weight: 700;
    line-height: 1;
    margin-bottom: 2rem;
    letter-spacing: -2px;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-title .gradient-text {
    /* Aesthetic: more premium gradient (still on-brand) */
    background: linear-gradient(135deg, var(--primary) 0%, rgba(255, 107, 53, 0.85) 45%, rgba(34, 211, 238, 0.95) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: clamp(1.2rem, 3vw, 2rem);
    color: rgba(154, 163, 184, 0.95);
    margin-bottom: 3rem;
    font-weight: 300;
    animation: fadeInUp 1s ease 0.6s both;
}

.hero-cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.8s both;
}

/* --- Hero Buttons (FUNCTIONALITY: unchanged) --- */
.btn-hero-primary {
    background: linear-gradient(135deg, var(--primary) 0%, rgba(255, 107, 53, 0.9) 60%, rgba(34, 211, 238, 0.65) 140%);
    color: var(--white);
    padding: 1.3rem 3rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 107, 53, 0.85);
}

.btn-hero-primary:hover {
    background: transparent;
    color: var(--primary);
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(255, 107, 53, 0.28);
}

.btn-hero-secondary {
    background: transparent;
    color: var(--white);
    padding: 1.3rem 3rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.1rem;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.85);
}

.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.95);
    color: var(--dark);
    transform: translateY(-3px);
}

/* --- Hero Scroll Indicator --- */
.scroll-indicator {
    position: absolute;
    bottom: 3rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    animation: bounce 2s infinite;
}

.scroll-indicator i {
    font-size: 2rem;
    color: var(--accent);
}

/* ==========================================================================
   HERO — Responsive fixes (no layout break)
   ========================================================================== */

/* 1) Viewport height fixes (iOS/Android address bar) */
.hero-video {
  min-height: 100vh;
  min-height: 100svh; /* modern browsers */
  height: 100vh;
  height: 100svh;
}

@supports (height: 100dvh) {
  .hero-video {
    min-height: 100dvh;
    height: 100dvh;
  }
}

/* 2) Video: cover always, no overflow issues */
#hero-bg-video {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: cover;
}

/* 3) Content spacing + safe area */
.hero-content {
  width: 100%;
  padding-left: max(1.25rem, env(safe-area-inset-left));
  padding-right: max(1.25rem, env(safe-area-inset-right));
  padding-top: max(6.5rem, env(safe-area-inset-top)); /* evita que choque con navbar fixed */
  padding-bottom: 5rem; /* deja aire para el scroll-indicator */
}

.hero-badge {
  max-width: 100%;
  white-space: normal;
}

/* 4) CTA: stack nicely on small screens */
.hero-cta {
  align-items: center;
}

@media (max-width: 991px) {
  .hero-title {
    letter-spacing: -1px;
    line-height: 1.05;
  }

  .hero-subtitle {
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 768px) {
  .hero-content {
    padding-top: 6rem;
    padding-bottom: 4.5rem;
  }

  .hero-cta {
    flex-direction: column;
    gap: 1rem;
  }

  .btn-hero-primary,
  .btn-hero-secondary {
    width: min(520px, 100%);
    justify-content: center;
    padding: 1.05rem 2rem;
    font-size: 1.02rem;
  }

  /* Scroll indicator: smaller + a bit higher so it doesn't overlap */
  .scroll-indicator {
    bottom: 1.75rem;
  }

  .scroll-indicator i {
    font-size: 1.6rem;
  }
}

@media (max-width: 420px) {
  .hero-badge {
    font-size: 0.78rem;
    letter-spacing: 1.5px;
    padding: 0.55rem 1.1rem;
  }

  .hero-title {
    font-size: clamp(2.2rem, 10.5vw, 3.2rem);
  }

  .hero-subtitle {
    font-size: 1.05rem;
    margin-bottom: 2.2rem;
  }
}

/* 5) Reduced motion: stop bounce on accessibility preference */
@media (prefers-reduced-motion: reduce) {
  .scroll-indicator {
    animation: none;
  }
}


/* ==========================================================================
   ANIMATIONS (FUNCTIONALITY: unchanged)
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    40% {
        transform: translateX(-50%) translateY(-20px);
    }
    60% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* ==========================================================================
   SECTIONS (GLOBAL)
   ========================================================================== */
section {
    padding: 8rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-label {
    display: inline-block;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-bottom: 1rem;
    font-family: 'Space Grotesk', sans-serif;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    letter-spacing: -1px;
}

.section-description {
    font-size: 1.2rem;
    color: rgba(154, 163, 184, 0.95);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* ==========================================================================
   SERVICES SECTION - NARRATIVE GRID (COMPACT & OPTIMIZED)
   ========================================================================== */
.services-section {
    background:
        radial-gradient(900px 540px at 15% 15%, rgba(255, 107, 53, 0.06) 0%, transparent 60%),
        radial-gradient(900px 540px at 85% 20%, rgba(34, 211, 238, 0.05) 0%, transparent 58%),
        linear-gradient(180deg, rgba(var(--darker-rgb), 1) 0%, rgba(var(--dark-rgb), 1) 100%);
    padding: 4.5rem 0;
    position: relative;
    overflow: hidden;
}

.services-section::before {
    content: '';
    position: absolute;
    top: 18%;
    right: -10%;
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, rgba(255, 107, 53, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* Header */
.section-header {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.section-label {
    display: inline-block;
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 1rem;
    font-family: 'Space Grotesk', sans-serif;
}

.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: 0.9rem;
    line-height: 1.2;
    letter-spacing: -1px;
}

.section-description {
    font-size: 1rem;
    color: rgba(154, 163, 184, 0.95);
    line-height: 1.65;
}

/* Narrative Grid Layout */
/* Masonry layout usando columns (desktop) */
.services-narrative-grid{
  column-count: 2;
  column-gap: 1.4rem;
}

/* Cada card se comporta como "bloque" dentro de la columna */
.service-card{
  display: inline-block;    /* clave para columns */
  width: 100%;
  break-inside: avoid;      /* evita que se parta entre columnas */
  margin: 0 0 1.4rem;       /* spacing vertical consistente */
}


.services-narrative-grid::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 2px;
    height: 0;
    background: linear-gradient(180deg, rgba(255, 107, 53, 0.9) 0%, rgba(34, 211, 238, 0.9) 100%);
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: height 0.8s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.8s ease;
    pointer-events: none;
}

.services-narrative-grid:hover::after {
    height: 60%;
    opacity: 0.15;
}

/* Service Card Base */
.service-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 1.8rem;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
/*
.service-card:nth-child(odd) {
    margin-top: 1.2rem;
}

.service-card:nth-child(even) {
    margin-bottom: 1.2rem;
}
*/
.service-card:hover {
    background: rgba(255, 255, 255, 0.035);
    border-color: rgba(255, 107, 53, 0.22);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, rgba(255, 107, 53, 0.95) 0%, rgba(34, 211, 238, 0.9) 100%);
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover::before {
    height: 100%;
}

/* Service number indicator */
.service-number {
    position: absolute;
    top: 1.4rem;
    right: 1.4rem;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.95) 0%, rgba(34, 211, 238, 0.95) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.1;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-number {
    opacity: 0.2;
    transform: scale(1.08);
}

/* Icon */
.service-icon {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: rgba(255, 107, 53, 0.95);
    margin-bottom: 1.1rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.service-card:hover .service-icon {
    background: rgba(255, 107, 53, 0.10);
    border-color: rgba(255, 107, 53, 0.18);
    transform: scale(1.05);
}

/* Title */
.service-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.6rem;
    color: var(--white);
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
    line-height: 1.3;
}

.service-card:hover h3 {
    color: var(--primary);
}

/* Description */
.service-card > p {
    color: rgba(154, 163, 184, 0.9);
    line-height: 1.55;
    margin-bottom: 1rem;
    font-size: 0.88rem;
    position: relative;
    z-index: 1;
}

/* Toggle Button */
.service-toggle {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.65rem 1rem;
    color: rgba(154, 163, 184, 0.9);
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    margin-bottom: 0;
}

.service-toggle:hover {
    background: rgba(255, 107, 53, 0.08);
    border-color: rgba(255, 107, 53, 0.2);
    color: rgba(255, 107, 53, 1);
}

.service-toggle i {
    font-size: 0.7rem;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card.expanded .service-toggle i {
    transform: rotate(180deg);
}

.service-card.expanded .service-toggle .toggle-text::after {
    content: 'Ocultar detalles';
}

.service-card:not(.expanded) .service-toggle .toggle-text::after {
    content: 'Ver detalles';
}

.service-toggle .toggle-text {
    font-size: 0;
}

.service-toggle .toggle-text::after {
    font-size: 0.8rem;
}

/* Collapsible Content */
.service-content {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                margin-top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.service-card.expanded .service-content {
    max-height: 1000px;
    opacity: 1;
    margin-top: 1.2rem;
}

/* Subsections */
.service-subsection {
    margin-top: 1.1rem;
}

.service-subsection:first-child {
    margin-top: 0;
}

.service-subsection-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255, 107, 53, 0.82);
    margin-bottom: 0.6rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    position: relative;
    z-index: 1;
}

.service-subsection-title i {
    font-size: 0.65rem;
    opacity: 0.75;
}

.service-subsection-extra {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.service-subsection-extra .service-subsection-title {
    color: rgba(34, 211, 238, 0.82);
}

.service-card:hover .service-subsection-title {
    color: rgba(255, 107, 53, 1);
}

.service-card:hover .service-subsection-extra .service-subsection-title {
    color: rgba(34, 211, 238, 1);
}

/* Features list */
.service-features {
    list-style: none;
    padding: 0;
    margin: 0;
    position: relative;
    z-index: 1;
}

.service-features li {
    padding: 0.32rem 0;
    color: rgba(154, 163, 184, 0.85);
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-size: 0.82rem;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.service-card:hover .service-features li {
    color: rgba(154, 163, 184, 0.95);
}

.service-features li i {
    color: rgba(255, 107, 53, 0.9);
    font-size: 0.68rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
    opacity: 0.65;
    transition: opacity 0.3s ease;
}

.service-card:hover .service-features li i {
    opacity: 0.95;
}

/* Glow effect */
.service-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(34, 211, 238, 0.05) 0%, rgba(255, 107, 53, 0.04) 35%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 0;
}

.service-card:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.6;
}

/* Responsive */
@media (max-width: 968px) {
    .services-section {
        padding: 3.5rem 0;
    }

    .services-narrative-grid {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }

    .service-card:nth-child(odd),
    .service-card:nth-child(even) {
        margin-top: 0;
        margin-bottom: 0;
    }

    .service-card {
        padding: 1.6rem;
    }

    .service-number {
        font-size: 1.6rem;
        top: 1.2rem;
        right: 1.2rem;
    }

    .service-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    .service-card h3 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
    }

    .service-card > p {
        font-size: 0.85rem;
        margin-bottom: 0.9rem;
    }

    .service-toggle {
        padding: 0.6rem 0.9rem;
        font-size: 0.75rem;
    }

    .service-toggle .toggle-text::after {
        font-size: 0.75rem;
    }

    .service-card.expanded .service-content {
        margin-top: 1rem;
    }

    .service-subsection {
        margin-top: 0.9rem;
    }

    .service-subsection-extra {
        margin-top: 0.85rem;
        padding-top: 0.85rem;
    }

    .service-subsection-title {
        font-size: 0.7rem;
        margin-bottom: 0.5rem;
    }

    .service-features li {
        padding: 0.28rem 0;
        font-size: 0.8rem;
        gap: 0.5rem;
    }

    .section-header {
        margin-bottom: 2.5rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .service-card:hover {
        transform: none;
    }

    .services-narrative-grid::after {
        display: none;
    }

    .service-content {
        transition: none;
    }
}

/* Agregar al final del CSS existente */

/* Fix: Prevenir que el grid se expanda horizontalmente */
.services-narrative-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.4rem;
    position: relative;
    align-items: start; /* IMPORTANTE: esto previene el estiramiento */
}

.service-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 20px;
    padding: 1.8rem;
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    align-self: start; /* IMPORTANTE: cada card se posiciona independiente */
}

/* ==========================================================================
   PROJECTS SECTION - COMPACT & POLISHED
   ========================================================================== */
.projects-section {
    background: var(--dark);
    padding: 5rem 0;
    position: relative;
}

.projects-section .section-header {
    margin-bottom: 3rem;
}

.projects-section .section-title {
    font-size: clamp(2rem, 4vw, 2.8rem);
    margin-bottom: 1rem;
}

.projects-section .section-description {
    font-size: 1rem;
    max-width: 700px;
}

/* Featured Project Card */
.featured-project-card {
    background: var(--darker);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 3rem;
    transition: all 0.3s ease;
}

.featured-project-card:hover {
    border-color: rgba(255, 107, 53, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.featured-project-image {
    height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 1.5rem;
}

.featured-badge {
    background: var(--primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: 'Space Grotesk', sans-serif;
}

.featured-project-content {
    padding: 2.5rem;
}

.featured-project-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.featured-project-description {
    color: var(--gray);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.featured-project-meta {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1.5rem;
}

.featured-project-meta strong {
    color: var(--white);
    font-weight: 600;
}

.featured-project-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.btn-project-primary {
    background: var(--primary);
    color: white;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-size: 0.95rem;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.3s ease;
    border: 2px solid var(--primary);
}

.btn-project-primary:hover {
    background: transparent;
    color: var(--primary);
    transform: translateY(-2px);
}

.btn-project-secondary {
    background: transparent;
    color: var(--white);
    padding: 0.85rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-size: 0.95rem;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-project-secondary:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.05);
    color: var(--white);
}

/* Supporting Projects Grid */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.project-card {
    background: var(--darker);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.project-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 107, 53, 0.4);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.project-card-image {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.project-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.9) 0%, rgba(34, 211, 238, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-card-overlay {
    opacity: 1;
}

.project-card-overlay i {
    font-size: 2.5rem;
    color: white;
}

.project-card-content {
    padding: 1.8rem;
}

.project-card-category {
    color: var(--primary);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: 'Space Grotesk', sans-serif;
    display: block;
    margin-bottom: 0.8rem;
}

.project-card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.8rem;
    line-height: 1.3;
}

.project-card-description {
    color: var(--gray);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary);
    padding: 0.35rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(255, 107, 53, 0.3);
    font-family: 'Space Grotesk', sans-serif;
}

.projects-cta {
    text-align: center;
    margin-top: 3rem;
}

/* Responsive */
@media (max-width: 968px) {
    .projects-section {
        padding: 4rem 0;
    }

    .featured-project-image {
        height: 280px;
    }

    .featured-project-content {
        padding: 2rem;
    }

    .featured-project-title {
        font-size: 1.6rem;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .featured-project-actions {
        flex-direction: column;
    }

    .btn-project-primary,
    .btn-project-secondary {
        width: 100%;
        justify-content: center;
    }
}

/* Global spacing adjustments for compactness */
section {
    padding: 5rem 0 !important;
}

.section-header {
    margin-bottom: 3rem !important;
}

.section-title {
    margin-bottom: 1rem !important;
}

.hero-video {
    height: 100vh !important;
}

.services-section {
    padding: 5rem 0 !important;
}

.contact-cta {
    padding: 4rem 0 !important;
}

.contact-section {
    padding: 5rem 0 !important;
}

footer {
    padding: 3rem 0 1.5rem !important;
}

/* ==========================================================================
   CONTACT CTA (BANNER) (FUNCTIONALITY: unchanged, aesthetic updated)
   ========================================================================== */
.contact-cta {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.95) 0%, rgba(34, 211, 238, 0.90) 100%);
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><circle cx="30" cy="30" r="2" fill="white" opacity="0.1"/></svg>');
    opacity: 0.25;
}

.contact-cta h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    margin-bottom: 2rem;
    position: relative;
    z-index: 2;
}

.contact-cta p {
    font-size: 1.3rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.btn-cta-large {
    background: rgba(255, 255, 255, 0.96);
    color: rgba(255, 107, 53, 0.95);
    padding: 1.5rem 4rem;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.2rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    font-family: 'Space Grotesk', sans-serif;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.btn-cta-large:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.30);
    color: rgba(255, 107, 53, 0.95);
}

/* ==========================================================================
   CONTACT SECTION (CARDS) (FUNCTIONALITY: unchanged, aesthetic updated)
   ========================================================================== */
.contact-section {
    background: linear-gradient(180deg, rgba(var(--darker-rgb), 1) 0%, rgba(var(--dark-rgb), 1) 100%);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.contact-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    transition: all 0.3s ease;
}

.contact-card:hover {
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-5px);
    border-color: rgba(255, 107, 53, 0.22);
}

.contact-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.95) 0%, rgba(34, 211, 238, 0.90) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    font-size: 1.8rem;
}

.contact-card h4 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.contact-card a {
    color: rgba(154, 163, 184, 0.95);
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-card a:hover {
    color: var(--primary);
}

/* ==========================================================================
   FOOTER (FUNCTIONALITY: unchanged, aesthetic updated)
   ========================================================================== */
footer {
    background: rgba(var(--darker-rgb), 1);
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-brand {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-brand .highlight {
    color: var(--primary);
}

/* ==========================================================================
   RESPONSIVE (FUNCTIONALITY: unchanged)
   ========================================================================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }

    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .nav-link {
        margin: 0.5rem 0;
    }

    .btn-nav-cta {
        margin: 1rem 0 0 0;
    }

    section {
        padding: 4rem 0;
    }
}

@media (max-width:1700px) {

    h1.hero-title {
        font-size: 3rem;
    }

    span.hero-badge {
        margin-top: 50px;
    }
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255,255,255,1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}


.navbar-toggler:hover .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba(255,107,53,1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}
