:root {
        --primary: #0a2e5c;
        --primary-hover: #0c5197;
        --text-light: #ffffff;
        --text-dark: #0a2e5c;
        --top-bar-h: 45px;
        --header-h: 60px;
      }

      body {
        margin: 0;
        font-family: 'Poppins', sans-serif;
        display: flex;
        flex-direction: column;
        min-height: 100vh;
        font-size: 14px;
      }

      /* ===== TOP BAR SUPERIOR ===== */
      .top-bar {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        min-height: var(--top-bar-h);
        background: var(--primary-hover);
        color: #fff;
        font-size: 16px;
        font-weight: 600;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding: 0 16px;
        box-sizing: border-box;
        z-index: 1001;
        
      }

      .top-bar a {
        display: inline-flex;          /* 👈 CLAVE */
        align-items: center;
        gap: 6px;
        color: #fff;
        font-size: 12px;
        font-weight: 600;
        text-decoration: none;
        /*border: 1px solid #fff;*/
        background-color: var(--primary);
        padding: 7px;
        padding-left: 10PX;
        padding-right: 10PX;
        border-radius: 7px;
        transition: transform 0.3s ease;
      }

      .top-bar svg {
        width: 16px;
        height: 16px;
        stroke: #fff;
        flex-shrink: 0;
      }

  
      .top-bar a:hover {
        color: var(--primary-hover);
        background-color: #fff;
        opacity: 1;
      }

    .top-bar a:hover svg {
        stroke: var(--primary-hover);
      }


      /* ===== HEADER ===== */
      header {
        position: fixed;
        /*top: var(--top-bar-h); left: 0; right: 0;*/
        width: 100%;
        top: 0px; 
        background: var(--primary);
        display: flex;
        align-items: center;
        justify-content: space-between; /* brand izquierda, menú/drawer derecha */
        z-index: 1000;
        box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        height: var(--header-h);
        padding: 0 16px;
        box-sizing: border-box;
      }

      /* Bloque marca: foto + leyenda */
      .brand {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        text-decoration: none;
        color: var(--text-light);
        min-width: 0;
      }
      .brand img {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        object-fit: cover;
        border: 1px solid rgba(255,255,255,0.35);
        box-shadow: 0 2px 6px rgba(0,0,0,0.25);
        display: block;
      }
      .brand .brand-title {
        font-weight: 700;
        font-size: 15px;
        line-height: 1;
        white-space: nowrap;
      }

      /* Nav desktop */
      nav {
        display: flex;
        gap: 1rem;
        padding-right: 10px;
      }
      nav a {
        color: var(--text-light);
        font-size: 12px;
        text-decoration: none;
        font-weight: 600;
        padding: 0.5rem 1rem;
        border-radius: 6px;
        transition: background 0.3s;
        display: flex;
        align-items: center;
        gap: 0.5rem;
      }
      nav a:hover { background: var(--primary-hover); }

      /* Botón hamburguesa */
      .menu-toggle {
        display: none;
        flex-direction: column;
        justify-content: space-between;
        width: 26px;
        height: 20px;
        cursor: pointer;
        position: relative;
      }
      .menu-toggle span {
        display: block;
        height: 3px; width: 100%;
        background: var(--text-light);
        border-radius: 2px;
        transition: transform 0.3s ease;
      }

      /* Drawer + overlay */
      .overlay {
        display: none;
        position: fixed; inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 9998;
      }
      .overlay.show { display: block; }

      .sidebar {
        position: fixed;
        top: 0; right: -260px;
        width: 260px; height: 100%;
        background: var(--primary);
        display: flex; flex-direction: column;
        padding: 2rem 1rem; gap: 1rem;
        z-index: 9999;
        transition: right 0.3s ease;
        box-sizing: border-box;
      }
      .sidebar.show { right: 0; }
      .close-btn {
        align-self: flex-end;
        font-size: 2rem;
        background: none; border: none;
        color: var(--text-light);
        cursor: pointer;
        margin-bottom: 1rem;
        line-height: 1;
      }
      .sidebar a {
        color: var(--text-light);
        font-size: 12px;
        text-decoration: none;
        font-weight: 600;
        padding: 0.75rem 1rem;
        border-radius: 6px;
        transition: background 0.3s;
        display: flex; align-items: center; gap: 0.5rem;
      }
      .sidebar a:hover { background: var(--primary-hover); }

      .terminos{
        margin-top: 45px;
        display:flex;
        flex-direction:column;
        gap:8px;
      }

      .terminos-item{
          display:flex;
          align-items:center;
          gap:8px;
          font-size:14px;
      }

      .terminos-icon{
          width:18px;
          height:18px;
          color: var(--primary-hover);
      }


      .terminos a{
        text-decoration: none;
        color: var(--primary)
      }

      .terminos a:hover{
        text-decoration: underline;
        color: var(--primary-hover)
      }



      /* Responsive header */

      /*
      @media (min-width: 769px) {
        .menu-toggle { display: none; }
        .overlay, .sidebar { display: none !important; }
        nav { display: flex; }
      }*/

      @media (hover: none) and (pointer: coarse) {
        nav { display: none; }
        .menu-toggle { display: flex; }
      }    

      /* Mostrar menú normal solo en pantallas grandes (tablets horizontales y PCs) */
      @media (min-width: 1025px) {
        .menu-toggle { display: none; }
        .overlay, .sidebar { display: none !important; }
        nav { display: flex; }
      }


      /* ===== Ajuste del menú lateral en orientación apaisada (landscape mobile) ===== */
      @media screen and (orientation: landscape) and (max-width: 1024px) {
        .sidebar {
          padding: 1rem 0.5rem;  /* reduce espacio interno */
          gap: 0.5rem;
          overflow-y: auto;      /* permite hacer scroll si igual no entra */
        }

        .sidebar a {
          padding: 0.4rem 0.5rem;  /* menos alto */
          font-size: 11px;         /* texto un poco más chico */
        }

        .close-btn {
          margin-bottom: 0.5rem;
          font-size: 1.6rem;       /* botón más chico también */
        }
      }




      @media (max-width: 880px) {
        nav { display: none; }    /* oculto nav, uso drawer */
        .menu-toggle { display: flex; }
        header { padding: 0 12px; }

        .brand .brand-title {
          display: block !important;
        }      
      }

      /* Mantener SIEMPRE la leyenda en móviles (más chica, con ellipsis si hace falta) */
      @media (max-width: 480px) {
        .brand { gap: 8px; max-width: 70vw; overflow: hidden; }
        .brand img { width: 28px; height: 28px; }
        .brand .brand-title {
          font-size: 15px; line-height: 1.1; font-weight: 700;
          white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .1px;
        }
        .menu-toggle { flex: 0 0 26px; }
      }
      @media (max-width: 360px) {
        .brand img { width: 26px; height: 26px; }
        .brand .brand-title { font-size: 15px; }
      }

      /* ===== MAIN ===== */
      main { padding-top: calc(var(--header-h) + var(--top-bar-h)); }

      .subtitle {
        text-align: center; font-weight: 500; font-size: 20px; color: #284e84;
      }

      .text { max-width: 500px; text-align: center; margin-top: 45px ;}
      .text-center { text-align: center; }

      .text h1 {
        margin-top: 7px; margin-bottom: 1rem;
        color: var(--text-dark); font-weight: 600; font-size: 35px; line-height: 1.2;
      }

      .container {
        flex: 1;
        display: flex; justify-content: center; align-items: center;
        gap: 4rem; padding: 2rem; flex-wrap: wrap;
        position: relative; z-index: 1;
      }

      /* Foto grande central (se mantiene) */
      .hero-media img,
      .container img {
        margin-top: 40px;
        max-width: 300px; border-radius: 50%;
        border: 1px solid #cacaca;
        box-shadow: 7px 17px 20px 2px rgb(0 0 0 / 20%);
        -webkit-filter: drop-shadow(7px 17px 20px rgba(0, 0, 0, 0.20));
        filter: drop-shadow(7px 17px 20px rgba(0, 0, 0, 0.20));
        width: 100%; height: auto;
      }

      section#inicio img {
        border-radius: 50%; width: 220px; height: 220px; object-fit: cover; display: block; margin: 0 auto;
        box-shadow: 0 4px 12px rgba(0,0,0,0.2);
        transform: translateZ(0); -webkit-transform: translateZ(0);
      }

      .button-grid {
        display: grid; grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem 2.5rem; justify-items: center; margin-top: 20px;
      }
      .turnos-link {
        display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
        text-decoration: none; background: var(--primary); color: var(--text-light);
        padding: 0.5rem 1.0rem; border-radius: 8px; font-weight: 600;
        transition: background 0.5s, box-shadow 0.3s;
        box-shadow: 0px 6px 15px rgba(0, 0, 0, 0.35);
        width: 100%; max-width: 220px;
      }
      .turnos-link:hover { background: var(--primary-hover); box-shadow: 0px 8px 18px rgba(0,0,0,0.45); }

      footer {
        background: var(--primary); color: var(--text-light);
        text-align: center; padding: 1rem;
      }

      footer  a {
          text-decoration: none;
          color: #fff;
      }
      

      @media (max-width: 768px) {
        .container { flex-direction: column; text-align: center; gap: 10px; }
        .container img { max-width: 170px; }
        .text { max-width: 100%; text-align: center; }
        .button-grid { grid-template-columns: repeat(2, 1fr); gap: 0.8rem 1rem; }
        .turnos-link { font-size: 11px; max-width: 120px; padding: 0.4rem 0.65rem; }
        .text h1 {font-size: 22px}
        .button-grid {margin-top: 25px;}
        .subtitle {
            text-align: center;
            font-weight: 500;
            font-size: 18px;
            color: #284e84;
        }

      }

      @media (max-height: 1025px) {

        .hero-media img { max-width: 200px; }
        
        .container {
          padding-top: 1rem;
          /*margin-top: 75px*/
        }
      }



      /* Fondo decorativo derecha */
      .fondo-derecha { position: relative; overflow: hidden; }
      .fondo-derecha::after {
        content: "";
        position: absolute; top: 0; right: 0;
        width: 50%; height: 100%;
        background:
          linear-gradient(to right, rgba(255, 255, 255, 1), rgba(12, 81, 151, 0.25)),
          url("../../../img/fondos/fondo1.webp") no-repeat right center;
        /*background-size: contain; opacity: 1;*/
        -webkit-mask-image: linear-gradient(to right, transparent 0px, transparent 50px, black 100%);
        -webkit-mask-repeat: no-repeat; -webkit-mask-size: cover;
        mask-image: linear-gradient(to right, transparent 0px, transparent 50px, black 100%);
        mask-repeat: no-repeat; mask-size: cover;
        pointer-events: none; z-index: 0;
      }
      .fondo-derecha > * { position: relative; z-index: 1; }

      @media (max-width: 1024px) {
        .fondo-derecha::after {
          width: 100%; left: 0; right: 0;
          background:
            linear-gradient(to right, rgba(255, 255, 255, 0.8), rgba(223, 240, 254, 0.5)),
            url("../../../img/fondos/fondo1.webp") no-repeat center center;
          background-size: cover;
          -webkit-mask-image: none; mask-image: none;
        }
      }


      /* ===== HEADER responsive <= 1240px ===== */
      @media (max-width: 1240px) {

        /* Ocultar texto del nombre, mantener foto */
        .brand .brand-title {
          display: none;
        }

        /* Reducir tamaño de fuentes del header (≈40%) */
        header nav a {
          font-size: 10px; /* antes 12px */
          padding: 0.4rem 0.6rem;
        }

        /* Reducir íconos de navegación */
        header nav a svg,
        header nav a i,
        header .top-bar svg {
          width: 15px;
          height: 15px;
        }

        /* Reducir tamaño íconos Lucide (data-lucide) */
        i[data-lucide] {
          width: 15px;
          height: 15px;
        }

        /* Ajuste leve del brand (foto) */
        .brand img {
          width: 28px; /* antes 34px */
          height: 28px;
        }

        /* Ajustar altura visual del header */
        header {
          height: 52px; /* un poco más compacto */
        }

        /* Ajustar padding horizontal */
        header {
          padding: 0 12px;
        }
      }

      .matriculas {
          display: flex;
          justify-content: center;
          align-items: center;
          gap: 15px;
          margin-top: 5px;
          
      }
      .matriculas img{
        max-width: 30px;
      }

     /* Estilo para que el botón ocupe las dos columnas */
    .full-width-button {
      grid-column: span 2; /* Ocupa las 2 columnas de la grid */
      max-width: 100% !important; /* Ignora el max-width de 220px */
      margin-top: 5px;

      padding-top: 1.0rem !important; /* Padding extra arriba */
      padding-bottom: 1.0rem !important; /* Padding extra abajo */
      font-size: 18px !important; /* Opcional: un poco más grande para resaltar */
      background-color: var(--primary-hover) !important;
    }

    .full-width-button:last-child {
      margin-bottom: 40px;
    }

    .full-width-button:hover{
        background-color: #fff !important;
        color: var(--primary-hover);
    }

    /* Ajuste para móviles */
    @media (max-width: 768px) {
      .full-width-button {
        font-size: 14px !important;
        padding-top: 0.8rem !important;
        padding-bottom: 0.8rem !important;
        margin-bottom: 15px;
      }
    }
