/* Home visual effects and non-critical styling. Loaded asynchronously to reduce render blocking. */
:root {
      --primary: #123f68;
      --primary-light: #1a5a94;
      --accent: #00d4ff;
      --white: #ffffff;
      --bg: #f8f9fc;
      --text: #2d3436;
      --shadow-3d: 0 15px 35px rgba(18, 63, 104, 0.2), inset 0 2px 0 rgba(255,255,255,0.6);
      --relief: 0 6px 0 #0a2640, 0 10px 20px rgba(0,0,0,0.3);
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      font-family: 'Manrope', sans-serif;
      background-color: var(--bg);
      color: var(--text);
      margin: 0;
      line-height: 1.6;
      perspective: 1200px;
    }

    a { text-decoration: none !important; color: inherit; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

    /* Cabecera Optimizada para Fila única */
    .site-nav {
      background: var(--white);
      padding: 0.8rem 0;
      box-shadow: 0 10px 30px rgba(0,0,0,0.15), inset 0 -2px 5px rgba(0,0,0,0.05);
      position: sticky;
      top: 0;
      z-index: 1000;
    }

    .wrap { max-width: 1300px; margin: 0 auto; padding: 0 20px; }
    
    .nav-shell { 
      display: flex; 
      align-items: center; 
      justify-content: space-between; 
      flex-wrap: nowrap; /* Fuerza una sola línea en escritorio */
      gap: 15px; 
    }

    .brand { display: flex; align-items: center; gap: 20px; flex-shrink: 0; transition: transform 0.4s ease; }
    .brand:hover { transform: scale(1.02); }
    
    .brand img { 
      width: 180px; 
      height: auto; 
      filter: drop-shadow(4px 8px 12px rgba(0,0,0,0.15)); 
      transition: filter 0.3s ease;
    }
    .brand img:hover { filter: drop-shadow(6px 12px 20px rgba(0,212,255,0.4)); }
    
    .brand-text { display: flex; flex-direction: column; justify-content: center; }
    
    .brand small { 
      white-space: nowrap; 
      font-size: 1rem; 
      color: var(--primary-light); 
      text-transform: uppercase; 
      letter-spacing: 2px; 
      font-weight: 800; 
      margin-bottom: 2px;
      text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    }
    
    .brand strong { 
      font-family: 'Orbitron', sans-serif;
      font-size: 2.6rem; 
      line-height: 0.9;
      letter-spacing: 1px;
      background: linear-gradient(90deg, var(--primary) 0%, var(--accent) 50%, var(--primary) 100%);
      background-size: 200% auto;
      color: transparent;
      -webkit-background-clip: text;
      background-clip: text;
      animation: textShine 4s linear infinite;
      text-shadow: 2px 4px 6px rgba(0,0,0,0.2);
      white-space: nowrap;
    }

    @keyframes textShine {
      to { background-position: 200% center; }
    }

    .menu { 
      display: flex; 
      align-items: center; 
      white-space: nowrap; 
      flex-wrap: nowrap;
      gap: 5px;
    }
    
    .menu a { 
      font-weight: 800; 
      color: var(--primary); 
      position: relative; 
      padding: 10px 14px; 
      border-radius: 10px; 
      font-size: 0.95rem;
    }
    
    .menu a:hover, .menu a.active { 
      color: var(--white);
      background: var(--primary);
      box-shadow: 0 5px 15px rgba(18, 63, 104, 0.4), inset 0 2px 0 rgba(255,255,255,0.2);
      transform: translateY(-3px);
    }

    .header-call {
      display: none;
    }

    .hero {
      background: linear-gradient(145deg, var(--primary) 0%, #0d2b47 100%);
      color: var(--white);
      padding: 100px 0;
      position: relative;
      overflow: hidden;
      box-shadow: inset 0 -15px 40px rgba(0,0,0,0.4);
    }

    .hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }

    @keyframes fadeInUp {
      0% { opacity: 0; transform: translateY(30px) translateZ(-30px); }
      100% { opacity: 1; transform: translateY(0) translateZ(0); }
    }

    .animated-title {
      animation: fadeInUp 1s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    }

    .hero h1 { 
      font-family: 'Space Grotesk', sans-serif;
      font-size: 3.8rem; 
      line-height: 1.1; 
      margin-bottom: 2rem;
      text-shadow: 3px 6px 15px rgba(0,0,0,0.5);
    }

    .slideshow-container {
      width: 100%;
      aspect-ratio: 4 / 3;
      position: relative;
      border-radius: 30px;
      overflow: hidden;
      box-shadow: 0 25px 50px rgba(0,0,0,0.5), inset 0 0 0 6px rgba(255,255,255,0.15);
      transform: perspective(1000px) rotateY(-8deg) rotateX(4deg);
      transition: transform 0.5s ease;
    }

    .slideshow-container:hover {
      transform: perspective(1000px) rotateY(0deg) rotateX(0deg) scale(1.02);
    }

    .slide {
      position: absolute;
      width: 100%;
      height: 100%;
      opacity: 0;
      animation: slideAnim 28s infinite;
      object-fit: cover;
    }

    .slide:nth-child(1) { animation-delay: 0s; }
    .slide:nth-child(2) { animation-delay: 4s; }
    .slide:nth-child(3) { animation-delay: 8s; }
    .slide:nth-child(4) { animation-delay: 12s; }
    .slide:nth-child(5) { animation-delay: 16s; }
    .slide:nth-child(6) { animation-delay: 20s; }
    .slide:nth-child(7) { animation-delay: 24s; }

    @keyframes slideAnim {
      0% { opacity: 0; transform: scale(1.05); }
      5% { opacity: 1; transform: scale(1); }
      12% { opacity: 1; transform: scale(1); }
      16% { opacity: 0; transform: scale(1.02); }
      100% { opacity: 0; }
    }

    .btn {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      padding: 16px 35px;
      border-radius: 15px;
      font-weight: 800;
      text-transform: uppercase;
      box-shadow: var(--relief);
      transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      cursor: pointer;
    }

    .btn:hover {
      transform: translateY(-5px);
      box-shadow: 0 11px 0 #0a2640, 0 20px 25px rgba(0,0,0,0.4);
    }

    .btn:active { 
      transform: translateY(6px); 
      box-shadow: 0 0 0 #0a2640, 0 5px 10px rgba(0,0,0,0.3); 
    }

    .btn-primary { 
      background: linear-gradient(135deg, var(--accent), #008cb3);
      color: var(--white) !important;
      text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    }

    .grid-4 { 
      display: grid; 
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
      gap: 35px; 
      padding-top: 70px;
      perspective: 1200px;
    }

    .card {
      display: block;
      background: linear-gradient(145deg, var(--white), #f0f4f8);
      padding: 40px 25px;
      border-radius: 25px;
      box-shadow: var(--shadow-3d);
      text-align: center;
      border-top: 2px solid rgba(255,255,255,1);
      border-left: 2px solid rgba(255,255,255,0.8);
      transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
      transform-style: preserve-3d;
    }

    .card:hover {
      transform: translateY(-15px) rotateX(4deg) rotateY(-4deg) scale(1.03);
      box-shadow: 20px 30px 45px rgba(18, 63, 104, 0.25), inset 0 2px 0 rgba(255,255,255,1);
    }

    .card i { 
      font-size: 3.5rem; 
      background: linear-gradient(135deg, var(--primary), var(--accent));
      -webkit-background-clip: text;
      -webkit-text-fill-color: transparent;
      margin-bottom: 20px;
      filter: drop-shadow(2px 8px 8px rgba(0, 212, 255, 0.3));
      transition: transform 0.3s ease;
    }
    
    .card:hover i {
      transform: translateZ(25px) scale(1.1);
    }

    .card h3 { font-family: 'Space Grotesk', sans-serif; font-size: 1.8rem; color: var(--primary); text-shadow: 1px 2px 3px rgba(0,0,0,0.1); }

    .featured-shortcuts {
      margin-top: -34px;
      position: relative;
      z-index: 3;
      padding-bottom: 18px;
    }

    .featured-shortcuts-panel {
      background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(229,244,255,0.94));
      border: 1px solid rgba(0, 212, 255, 0.24);
      border-radius: 32px;
      padding: 28px;
      box-shadow: 18px 24px 48px rgba(18, 63, 104, 0.2), inset 0 2px 0 rgba(255,255,255,0.95);
    }

    .featured-shortcuts-head {
      display: flex;
      align-items: flex-end;
      justify-content: space-between;
      gap: 24px;
      margin-bottom: 22px;
    }

    .featured-shortcuts h2 {
      font-family: 'Space Grotesk', sans-serif;
      font-size: clamp(1.8rem, 3vw, 2.8rem);
      color: var(--primary);
      margin: 0;
      text-shadow: 0 0 18px rgba(0, 212, 255, 0.18);
    }

    .featured-shortcuts p {
      max-width: 520px;
      margin: 0;
      color: #526a81;
      text-align: left;
    }

    .shortcut-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 18px;
    }

    .shortcut-card {
      display: flex;
      flex-direction: column;
      gap: 12px;
      min-height: 210px;
      padding: 24px;
      border-radius: 24px;
      background: linear-gradient(145deg, #ffffff, #edf6ff);
      border: 1px solid rgba(18, 63, 104, 0.1);
      box-shadow: 0 10px 0 rgba(18, 63, 104, 0.12), 0 20px 34px rgba(18, 63, 104, 0.14), inset 0 2px 0 #ffffff;
      transform: translateZ(0);
    }

    .shortcut-card:hover,
    .shortcut-card:focus-visible {
      transform: translateY(-8px) rotateX(3deg);
      box-shadow: 0 14px 0 rgba(18, 63, 104, 0.14), 0 28px 42px rgba(18, 63, 104, 0.2), inset 0 2px 0 #ffffff;
    }

    .shortcut-card i {
      width: 54px;
      height: 54px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 18px;
      color: var(--primary);
      background: linear-gradient(145deg, #eaf8ff, #ffffff);
      box-shadow: 0 12px 24px rgba(0, 212, 255, 0.18);
      font-size: 1.45rem;
    }

    .shortcut-card strong {
      color: var(--primary);
      font-family: 'Space Grotesk', sans-serif;
      font-size: 1.25rem;
      line-height: 1.15;
    }

    .shortcut-card span {
      color: #526a81;
      line-height: 1.55;
    }

    .shortcut-card em {
      margin-top: auto;
      font-style: normal;
      font-weight: 800;
      color: var(--primary-light);
    }

    .tooltip-word {
      color: var(--accent);
      font-weight: 800;
      transition: all 0.3s ease;
      cursor: help;
      display: inline-block;
    }

    .card:hover .tooltip-word, .tooltip-word:hover {
      text-shadow: 0 0 12px rgba(0, 212, 255, 0.8), 0 0 20px rgba(0, 212, 255, 0.5);
      transform: scale(1.05) translateZ(5px);
    }

    .local-trust {
      padding: 105px 0 20px;
    }

    .local-trust-panel {
      background:
        radial-gradient(circle at 14% 18%, rgba(0, 212, 255, 0.18), transparent 32%),
        linear-gradient(145deg, #ffffff 0%, #eef7ff 100%);
      border: 1px solid rgba(18, 63, 104, 0.12);
      border-radius: 34px;
      box-shadow: var(--shadow-3d);
      padding: clamp(34px, 5vw, 64px);
      overflow: hidden;
      position: relative;
    }

    .local-trust-panel::after {
      content: "";
      position: absolute;
      inset: auto -80px -120px auto;
      width: 280px;
      height: 280px;
      background: radial-gradient(circle, rgba(0, 212, 255, 0.18), transparent 68%);
      pointer-events: none;
    }

    .local-trust-head {
      max-width: 860px;
      margin: 0 auto 36px;
      text-align: center;
      position: relative;
      z-index: 1;
    }

    .local-trust-kicker {
      display: inline-flex;
      align-items: center;
      gap: 10px;
      color: var(--primary-light);
      font-size: 0.84rem;
      font-weight: 900;
      letter-spacing: 2px;
      text-transform: uppercase;
      margin-bottom: 16px;
    }

    .local-trust-kicker::before {
      content: "";
      width: 10px;
      height: 10px;
      border-radius: 999px;
      background: var(--accent);
      box-shadow: 0 0 18px rgba(0, 212, 255, 0.85);
    }

    .local-trust h2 {
      color: var(--primary);
      font-family: 'Space Grotesk', sans-serif;
      font-size: clamp(2.25rem, 5vw, 4rem);
      line-height: 1.04;
      margin: 0 0 18px;
      text-shadow: 0 8px 18px rgba(18, 63, 104, 0.16);
    }

    .local-trust p {
      color: #496174;
      font-size: 1.08rem;
      line-height: 1.82;
      margin: 0;
    }

    .trust-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 20px;
      position: relative;
      z-index: 1;
    }

    .trust-card {
      background: rgba(255, 255, 255, 0.84);
      border: 1px solid rgba(18, 63, 104, 0.12);
      border-radius: 24px;
      box-shadow: 0 16px 32px rgba(18, 63, 104, 0.1), inset 0 1px 0 rgba(255,255,255,0.9);
      padding: 28px;
      min-height: 210px;
    }

    .trust-card i {
      width: 58px;
      height: 58px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 18px;
      margin-bottom: 18px;
      color: var(--primary);
      background: linear-gradient(145deg, #effaff, #ffffff);
      box-shadow: 0 12px 24px rgba(0, 212, 255, 0.16);
      font-size: 1.45rem;
    }

    .trust-card h3 {
      color: var(--primary);
      font-family: 'Space Grotesk', sans-serif;
      font-size: 1.42rem;
      margin: 0 0 10px;
    }

    .trust-card p {
      font-size: 0.98rem;
      line-height: 1.72;
      text-align: left;
    }

    .footer {
      background: linear-gradient(180deg, #081b2d 0%, #030a12 100%);
      color: var(--white);
      padding: 80px 0 40px;
      margin-top: 100px;
      border-top: 6px solid var(--accent);
      box-shadow: 0 -10px 25px rgba(0,0,0,0.3);
    }
    
    .footer-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
      gap: 50px;
      align-items: start;
    }

    .footer-heading {
      font-family: 'Space Grotesk', sans-serif;
      font-size: 1.4rem;
      color: var(--accent);
      margin-bottom: 25px;
      text-transform: uppercase;
      letter-spacing: 1.5px;
      text-shadow: 0 0 8px rgba(0,212,255,0.2);
    }

    .footer-brand h3 {
      font-family: 'Space Grotesk', sans-serif;
      font-size: 2.2rem;
      margin-bottom: 15px;
      color: var(--white);
      text-shadow: 2px 4px 6px rgba(0,0,0,0.4);
    }

    .footer-links {
      display: flex;
      flex-direction: column;
      gap: 12px;
    }

    .footer-seo-links {
      grid-column: 1 / -1;
      display: flex;
      align-items: center;
      flex-wrap: wrap;
      gap: 12px;
      padding: 18px 0 4px;
      border-top: 1px solid rgba(255,255,255,0.15);
    }

    .footer-seo-links strong {
      color: var(--accent);
      text-transform: uppercase;
      letter-spacing: 1px;
      margin-right: 4px;
    }

    .footer-seo-links a {
      display: inline-flex;
      align-items: center;
      min-height: 38px;
      padding: 0 14px;
      border-radius: 999px;
      background: rgba(255,255,255,0.11);
      color: var(--white);
      font-weight: 800;
    }

    .footer-seo-links a:hover,
    .footer-seo-links a:focus-visible {
      transform: translateY(-2px);
      background: rgba(0,212,255,0.2);
    }

    .float-wa {
      position: fixed;
      right: 16px;
      bottom: 16px;
      z-index: 70;
      width: 60px;
      height: 60px;
      border-radius: 50%;
      display: none;
      place-items: center;
      color: #fff;
      background: linear-gradient(135deg, #1fad5f, #25d366);
      border: 1px solid rgba(255,255,255,0.34);
      box-shadow: 0 12px 0 rgba(16,116,72,0.28), 0 20px 36px rgba(15,39,64,0.28), inset 0 2px 0 rgba(255,255,255,0.32);
      font-size: 1.12rem;
    }

    .float-wa:hover,
    .float-wa:focus-visible {
      transform: translateY(-3px);
    }

    .footer-contact p {
      display: flex;
      align-items: center;
      gap: 15px;
      margin-bottom: 15px;
      opacity: 0.9;
    }

    .footer-contact i {
      color: var(--accent);
      font-size: 1.3rem;
      width: 28px;
      text-align: center;
      filter: drop-shadow(0 0 4px rgba(0,212,255,0.4));
    }

    .qr-card {
      background: linear-gradient(145deg, var(--white), #f8f9fc);
      padding: 20px;
      border-radius: 20px;
      text-align: center;
      box-shadow: 0 10px 25px rgba(0,0,0,0.4), inset 0 2px 0 #ffffff;
      max-width: 220px;
      transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .qr-card:hover {
      transform: translateY(-8px) scale(1.03);
      box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    }

    .qr-card p {
      color: var(--primary);
      font-family: 'Space Grotesk', sans-serif;
      font-size: 1.2rem;
      margin: 0 0 5px;
      font-weight: 800;
    }

    .qr-card small {
      color: #666;
      font-size: 0.9rem;
      display: block;
      margin-bottom: 15px;
      font-weight: 600;
    }

    .qr-card img {
      width: 100%;
      height: auto;
      border-radius: 12px;
      margin-bottom: 15px;
      box-shadow: inset 0 0 8px rgba(0,0,0,0.1);
    }

    .btn-wa-qr {
      display: block;
      background: linear-gradient(135deg, #25D366, #128C7E);
      color: white !important;
      padding: 12px;
      border-radius: 12px;
      font-weight: 800;
      font-size: 1rem;
      box-shadow: 0 5px 0 #0a6b5f, 0 8px 12px rgba(0,0,0,0.2);
      transition: all 0.2s ease;
    }

    .btn-wa-qr:active {
      transform: translateY(5px);
      box-shadow: 0 0 0 #0a6b5f, 0 2px 4px rgba(0,0,0,0.2);
    }

    @media (max-width: 1150px) {
      .nav-shell { flex-wrap: wrap; justify-content: center; gap: 20px; }
      .menu { flex-wrap: wrap; justify-content: center; gap: 10px; }
    }

    @media (max-width: 992px) {
      .hero-grid { grid-template-columns: 1fr; text-align: center; }
      .brand strong { font-size: 2.2rem; }
      .hero h1 { font-size: 2.8rem; }
      .qr-card { margin: 0 auto; }
      .featured-shortcuts-head { display: block; }
      .featured-shortcuts p { margin-top: 12px; }
      .shortcut-grid { grid-template-columns: 1fr; }
    }

    @media (max-width: 980px) {
      html, body { max-width: 100%; overflow-x: hidden; }
      .wrap { padding: 0 14px; }
      .site-nav { position: static; padding: 0.7rem 0; }
      .nav-shell {
        display: grid;
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 14px;
      }
      .brand {
        justify-content: center;
        width: 100%;
        gap: 12px;
      }
      .brand img { width: clamp(76px, 18vw, 128px); }
      .brand small {
        white-space: normal;
        font-size: clamp(0.72rem, 2.4vw, 0.95rem);
        letter-spacing: 1.4px;
      }
      .brand strong {
        white-space: normal;
        font-size: clamp(1.75rem, 6vw, 2.45rem);
      }
      .menu {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
        white-space: normal;
      }
      .menu a {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 42px;
        padding: 9px 10px;
        text-align: center;
        line-height: 1.15;
        font-size: 0.9rem;
      }
      .menu .btn-primary {
        grid-column: 1 / -1;
        padding: 12px 16px !important;
      }
      .hero {
        padding: 58px 0 48px;
      }
      .hero h1 {
        font-size: clamp(2.35rem, 8vw, 3.4rem);
      }
      .hero-copy p {
        font-size: 1.08rem !important;
      }
      .slideshow-container {
        max-width: 680px;
        margin: 0 auto;
        transform: none;
        background: linear-gradient(180deg, #f8fbff, #e8f1fa);
      }
      .slideshow-container:hover {
        transform: scale(1.01);
      }
      .slide {
        object-fit: contain;
        background: linear-gradient(180deg, #f8fbff, #e8f1fa);
      }
      .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px;
        padding-top: 46px;
      }
      .trust-grid {
        grid-template-columns: 1fr;
      }
      .local-trust {
        padding: 72px 0 0;
      }
    }

    @media (max-width: 640px) {
      body {
        padding-bottom: 82px;
      }
      p,
      .hero-copy p,
      .card p,
      .trust-card p,
      .featured-shortcuts p {
        font-size: clamp(1rem, 4.1vw, 1.08rem) !important;
        line-height: 1.72 !important;
        text-align: left;
        hyphens: auto;
        -webkit-hyphens: auto;
        overflow-wrap: normal;
      }
      .menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .header-call {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
      }
      .hero {
        padding: 44px 0 36px;
      }
      .hero h1 {
        font-size: clamp(1.9rem, 9.6vw, 2.75rem);
        line-height: 1.08;
        max-width: 17ch;
        margin-inline: auto;
      }
      .hero-copy > div[style*="display: flex"] {
        display: grid !important;
        grid-template-columns: 1fr;
        gap: 12px !important;
      }
      .btn {
        width: 100%;
        padding: 14px 18px;
      }
      .slideshow-container {
        border-radius: 22px;
        aspect-ratio: 4 / 3;
      }
      .slide {
        object-fit: contain;
      }
      .grid-4 {
        grid-template-columns: 1fr;
        gap: 18px;
        padding-top: 34px;
      }
      .card {
        padding: 28px 20px;
        border-radius: 22px;
      }
      .card h3 {
        font-size: 1.55rem;
      }
      .footer {
        margin-top: 56px;
        padding: 56px 0 34px;
      }
      .footer-contact p {
        align-items: flex-start;
      }
      section.wrap[style*="padding: 120px"] {
        padding: 64px 14px !important;
      }
      section.wrap[style*="padding: 120px"] h2 {
        font-size: clamp(2rem, 9vw, 2.7rem) !important;
      }
      .local-trust-panel {
        border-radius: 24px;
        padding: 30px 20px;
      }
      .trust-card {
        padding: 24px 20px;
      }
      .float-wa {
        display: grid;
      }
    }

    @media (max-width: 420px) {
      .wrap { padding: 0 9px; }
      .brand img { width: 70px; }
      .brand small { font-size: 0.68rem; letter-spacing: 1px; }
      .brand strong { font-size: 1.55rem; }
      .menu { grid-template-columns: 1fr; }
      .menu a { font-size: 0.88rem; }
      .hero h1 {
        font-size: clamp(1.75rem, 9.2vw, 2.35rem);
        line-height: 1.09;
        max-width: 16ch;
      }
    }
