  /* Reset y base */
  * {
    box-sizing: border-box;
    margin: 0; padding: 0;
  }
  body, html {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #fff;
    color: #444;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
  }

  /* Header */
  header {
    display: flex;
    align-items: center;
    background-color: #1abb9c;
    padding: 20px 30px;
    position: fixed; /* fijo para que no se mueva al hacer scroll */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    gap: 15px;
  }
  .logo {
    order: 1;
    max-width: 80px;
    max-height: 60px;
    overflow: hidden;
    flex-shrink: 0;
  }
  .logo img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
  }
  .school-name {
    color: white;
    font-size: 1.8em;
    font-weight: 700;
    white-space: nowrap;
    order: 2;
    margin-left: 10px;
    display: none;
  }
  @media(min-width: 769px) {
    .school-name {
      display: block;
    }
  }
  nav {
    flex-grow: 1;
    margin-left: 20px;
    order: 3;
  }
  ul.menu {
    list-style: none;
    display: flex;
    gap: 20px;
    justify-content: flex-start;
  }
  ul.menu li a {
    text-decoration: none;
    color: white;
    font-weight: 600;
    padding: 10px 14px;
    border-radius: 6px;
    transition: background-color 0.3s, color 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  ul.menu li a:hover {
    background-color: rgba(13,138,127,0.85);
    color: white;
  }
  .buttons {
    display: flex;
    gap: 12px;
    order: 4;
  }
  .buttons button {
    background-color: white;
    border: none;
    color: #1abb9c;
    padding: 10px 20px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s, box-shadow 0.3s;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1em;
    box-shadow: 0 2px 6px rgba(26,187,156,0.3);
  }
  .buttons button:hover {
    background-color: #0d8a7f;
    color: white;
    box-shadow: 0 4px 12px rgba(13,138,127,0.7);
  }
  .buttons button.inscripciones {
    animation: pulse 2.5s infinite;
  }
  @keyframes pulse {
    0% { box-shadow: 0 0 0 0 #2f4050; }
    70% { box-shadow: 0 0 0 10px rgba(26,187,156, 0); }
    100% { box-shadow: 0 0 0 0 rgba(26,187,156, 0); }
  }
  .menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    position: relative;
    z-index: 1100;
  }
  .menu-toggle span {
    height: 3px;
    width: 25px;
    background: white;
    margin-bottom: 5px;
    border-radius: 2px;
  }
  @media (max-width: 768px) {
    header {
      flex-wrap: wrap;
      justify-content: center;
      padding: 15px 20px;
      gap: 10px;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
    }
    .school-name {
      display: none;
    }
    .logo {
      order: 1;
      flex-basis: auto;
      max-width: 120px;
      margin-bottom: 0;
      display: flex;
      justify-content: center;
      background: #1abb9c;
      z-index: 1100;
    }
    nav {
      order: 3;
      flex-basis: 100%;
      display: none;
      margin-left: 0;
      width: 100%;
      background-color: #1abb9c;
      padding-top: 10px;
      position: fixed;
      top: 60px;
      left: 0;
      right: 0;
      z-index: 1090;
    }
    nav.active {
      display: block;
    }
    ul.menu {
      flex-direction: column;
      gap: 10px;
      padding: 0 20px 10px 20px;
      justify-content: center;
    }
    ul.menu li a {
      padding: 10px 0;
      display: flex;
      color: white;
      justify-content: center;
    }
    ul.menu li a:hover {
      background-color: rgba(13,138,127,0.85);
      color: white;
    }
    .menu-toggle {
      display: flex;
      order: 2;
      background: #1abb9c;
      padding: 10px 0;
      z-index: 1110;
    }
  }

  main {
    max-width: 1200px;
    margin: 110px auto 60px; /* margen top aumentado para compensar header fijo */
    padding: 0 15px;
    flex-grow: 1;
  }

  /* Misión, Visión, Valores, Objetivos - más compactos */
  #mision-vision {
    display: flex;
    gap: 15px; /* menos espacio */
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 40px;
  }
  #mision-vision .card {
    background: #fafafa;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    flex: 1 1 200px;
    padding: 20px 15px; /* menos padding */
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    font-size: 0.9em; /* texto más pequeño */
  }
  #mision-vision .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(26,187,156,0.3);
  }
  #mision-vision .card i {
    font-size: 3em; /* iconos más pequeños */
    color: #1abb9c;
    margin-bottom: 12px;
  }
  #mision-vision .card h3 {
    font-size: 1.2em;
    color: #2f4050;
    margin-bottom: 12px;
  }
  #mision-vision .card p, 
  #mision-vision .card ul {
    color: #555;
    font-size: 0.95em;
    line-height: 1.4;
  }
  #mision-vision .card ul {
    list-style: disc inside;
    padding-left: 0;
    margin-top: 0;
  }

  /* Footer */
  footer {
    background-color: #2f4050;
    color: white;
    padding: 25px 30px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
  }
  footer nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
  }
  footer nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.3s;
  }
  footer nav ul li a:hover {
    color: #f39c12;
  }
  .social-icons {
    display: flex;
    gap: 15px;
    font-size: 1.4em;
  }
  .social-icons a {
    color: white;
    transition: color 0.3s;
  }
  .social-icons a:hover {
    color: #f39c12;
  }

  /* Botón flotante WhatsApp */
  #whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    box-shadow: 0 6px 12px rgba(37,211,102,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1200;
     text-decoration: none; /* Elimina el subrayado */
  outline: none;
    animation: pulse-whatsapp 2.5s infinite;
    transition: background-color 0.3s ease;
  }
  #whatsapp-float:hover {
    background-color: #1ebe57;
    box-shadow: 0 8px 20px rgba(30,190,80,0.8);
  }
  #whatsapp-float i {
    color: white;
    font-size: 28px;
  }
  @keyframes pulse-whatsapp {
    0% { box-shadow: 0 0 0 0 rgba(37,211,102, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(37,211,102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37,211,102, 0); }
  }

  /* Secciones Títulos y Descripciones */
  .section-title {
    color: #1abb9c;
    margin-bottom: 20px;
    font-size: 2em;
    border-bottom: 3px solid #1abb9c;
    display: inline-flex;
    align-items: center;
    gap: 12px;
  }
  .section-description {
    color: #555;
    font-size: 1.15em;
    max-width: 700px;
    margin-bottom: 25px;
  }

  /* Grid contenedor para carruseles */
  .grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px 20px; /* 30px fila, 20px columna para espacio vertical y horizontal */
  }

  /* Tarjetas */
  .event-card {
    background: #fff;
    border: 2px solid #1abb9c;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(26,187,156,0.2);
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    padding-bottom: 15px;
    margin: 7px;
  }
  .event-card:hover {
    box-shadow: 0 8px 24px rgba(26,187,156,0.4);
  }
  .event-card-image-wrapper {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    margin-bottom: 15px; /* espacio entre imagen y contenido */
  }
  .event-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
  .event-card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background-color: #1abb9c;
    color: white;
    padding: 6px 14px;
    border-radius: 24px;
    font-weight: 700;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 12px rgba(26,187,156,0.5);
    user-select: none;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    z-index: 10;
  }
  .event-card-title {
    text-align: center;
    color: #1a5a52;
    font-weight: 700;
    margin: 0 10px 8px;
    font-size: 1.2em;
  }
  .event-card-date {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #b8860b;
    font-weight: 600;
    margin-bottom: 12px;
    font-size: 0.95em;
  }
  .event-card-description {
    color: #3a3a3a;
    font-size: 0.95em;
    line-height: 1.4;
    text-align: center;
    margin: 0 10px 20px;
    flex-grow: 1;
  }
  .event-card-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
    margin-top: auto;
  }
  .event-card-actions a,
  .event-card-actions button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.6em;
    padding: 0;
    transition: color 0.3s ease;
  }
  .event-card-actions .fa-facebook-f { color: #1877F2; }
  .event-card-actions .fa-tiktok { color: #000000; }
  .event-card-actions .fa-instagram { 
    background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%);
     -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }
  .event-card-actions .fa-heart { color: #FF4500; }

  
#authForm {
    display: flex;                /* Usar Flexbox para centrar */
    flex-direction: column;      /* Alinear los elementos en columna */
    align-items: center;         /* Centrar horizontalmente */
    justify-content: center;     /* Centrar verticalmente */
    text-align: center;          /* Centrar el texto dentro del div */
   
     z-index: 1000; /* Asegúrate de que sea mayor que otros elementos */
}

#loginButton:hover {
    background-color: #1ABB9C; /* Color al pasar el ratón sobre el botón */
}
#authForm {
    display: none; /* Ocultar el formulario inicialmente */
    position: fixed; /* Posición fija para que se mantenga en la vista */
    top: 50%; /* Centrado verticalmente */
    left: 50%; /* Centrado horizontalmente */
    transform: translate(-50%, -50%); /* Ajuste para centrar completamente */
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
   width: 300px;
}
.logo-cpanel {
    max-width: 80%; /* Ancho máximo del logo para que sea responsivo */
    height: auto; /* Mantiene la proporción del logo */
    margin-bottom: 20px; /* Espacio debajo del logo */
}
h2 {
    font-size: 1.5em; /* Tamaño de fuente responsivo para el título */
    margin-bottom: 20px; /* Espacio debajo del título */
}
.input-auth {
    width: calc(100% - 20px); /* Ancho completo menos el padding */
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid #ccc;
}
.btn-auth {
    width: 100%;
    padding: 10px;
    background-color: #1ABB9C;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
     width: calc(100% - 20px);
}
.btn-auth:hover {
     width: calc(100% - 20px);
    background-color: #1ABB9C; /* Color al pasar el ratón sobre el botón */
}
.error-message {
    color: red; /* Color rojo para el mensaje de error */
    margin-top: 10px; /* Espacio encima del mensaje de error */
}
.closeButton {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
}