/**
Theme Name: Astra
Description: CSS Unificado - Plataforma STEAM
*/

/* ==========================================================================
   RESET & VARIABLES
   ========================================================================== */
:root {
  --steam-primary: #6fcfcf;
  --steam-secondary: #5ee3e3;
  --steam-hover: #3b3b3b;
  --steam-bg-header: #ffffff;
  --steam-body-bg: #F5F5F5;
  --steam-accent: #8cdfee;
  --steam-active-bg: #c3e9ec;

  /* Ancho unificado para Header, Carrusel y Footer */
  --site-max-width: 1000px;
}

html, body {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
  background-color: var(--steam-body-bg);
  color: var(--steam-hover);
}

/* ==========================================================================
   HEADER Y NAVEGACIÓN
   ========================================================================== */
.site-header {
  width: 100%;
  background-color: var(--steam-bg-header);
  border-bottom: 2px solid var(--steam-active-bg);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.header-container {
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 0 20px;
  height: 65px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-branding .site-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--steam-secondary);
  text-decoration: none;
  letter-spacing: -0.5px;
}

.site-branding .logo-link {
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
}

.nav-menu .menu-link {
  text-decoration: none;
  color: var(--steam-primary);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 67px;
  transition: all 0.2s ease-in-out;
}

.nav-menu .menu-link:hover {
  color: #ffffff;
  background-color: var(--steam-hover);
}

.nav-menu .menu-link.active {
  color: #000000;
  background-color: var(--steam-active-bg);
  font-weight: 600;
}

/* BUSCADOR DESPLEGABLE */
.header-actions { 
  display: flex; 
  align-items: center; 
}

.search-wrapper { 
  position: relative; 
  display: flex; 
  align-items: center; 
}

.search-btn {
  background: transparent;
  border: none;
  color: #84d6d6;
  cursor: pointer;
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.search-btn:hover { 
  background-color: rgba(132, 214, 214, 0.15); 
}

.search-box {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%) scaleX(0);
  transform-origin: right;
  display: flex;
  align-items: center;
  background-color: #ffffff;
  border: 1px solid #84d6d6;
  border-radius: 50px;
  padding: 4px 6px 4px 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10;
  width: 250px;
}

.search-wrapper.active .search-box {
  transform: translateY(-50%) scaleX(1);
  opacity: 1;
  visibility: visible;
}

.search-box input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.9rem;
  color: #333;
  width: 100%;
  padding-right: 8px;
}

.search-submit {
  background-color: #84d6d6;
  border: none;
  color: #ffffff;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.2s ease;
}

.search-submit:hover { 
  background-color: #0073aa; 
}

/* ==========================================================================
   LAYOUT GENERAL DE CONTENIDO
   ========================================================================== */
.container {
  max-width: var(--site-max-width);
  margin: 0 auto;
  padding: 20px;
}

.card-grid { 
  display: grid; 
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
  gap: 20px; 
  margin-top: 20px; 
}

.card { 
  border: 1px solid #e0e0e0; 
  border-radius: 8px; 
  padding: 15px; 
  background: #fff; 
  box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
}

/* ==========================================================================
   BADGES / ETIQUETAS
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 50px; /* Bordes totalmente redondeados estilo Astra */
  background-color: var(--steam-secondary, #5ee3e3);
  color: #121111;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

/* Variantes de Badges por color (opcionales para distintas temáticas) */
.badge-primary {
  background-color: var(--steam-primary, #6fcfcf);
  color: #ffffff;
}

.badge-dark {
  background-color: var(--steam-hover, #3b3b3b);
  color: #ffffff;
}

.badge-outline {
  background-color: transparent;
  border: 1px solid var(--steam-primary, #6fcfcf);
  color: var(--steam-hover, #3b3b3b);
}

/* ==========================================================================
   CARRUSEL
   ========================================================================== */
.carousel-container {
  position: relative;
  max-width: var(--site-max-width);
  margin: 30px auto;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.carousel-track {
  position: relative;
  width: 100%;
  height: 400px;
  background-color: #1a1a1a;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.carousel-slide.active {
  display: block;
  opacity: 1;
}

.carousel-slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  border: none;
  font-size: 20px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: background 0.3s ease;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}

.carousel-btn.prev { left: 15px; }
.carousel-btn.next { right: 15px; }

.carousel-indicators {
  position: absolute;
  bottom: 15px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.carousel-indicators .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-indicators .dot.active, 
.carousel-indicators .dot:hover {
  background: #5ee3e3;
  transform: scale(1.2);
}

/* ==========================================================================
   FOOTER (Extensión al 100% de la pantalla)
   ========================================================================== */
.site-footer {
  width: 100vw; /* Ocupa el 100% de la pantalla sin importar el contenedor padre */
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  margin-top: 50px;
  background: linear-gradient(180deg, #94C3C2 0%, #BDDBDF 100%);
  color: #121111;
  text-align: center;
}

.footer-shape-top {
  width: 100%;
  overflow: hidden;
  line-height: 0;
  transform: rotate(180deg);
}

.footer-shape-top svg {
  display: block;
  width: calc(100% + 1.3px);
  height: 14px;
}

.footer-shape-top .shape-fill {
  fill: var(--steam-body-bg);
}

.footer-content {
  max-width: var(--site-max-width); /* Coincide exacto con los 1000px del Header */
  margin: 0 auto;
  padding: 25px 20px 30px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.5;
}

.footer-content p {
  margin: 0;
  color: #121111;
}

/* ==========================================================================
   RESPONSIVO (MÓVILES)
   ========================================================================== */
@media (max-width: 768px) {
  .header-container {
    flex-direction: column;
    height: auto;
    padding: 15px;
    gap: 12px;
  }

  .nav-menu {
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-menu .menu-link {
    font-size: 0.9rem;
    padding: 6px 10px;
  }

  .carousel-track {
    height: 250px;
  }
}

/* ==========================================================================
   ESTRUCTURA DE CÁPSULAS: IMAGEN + LISTA + INFORMACIÓN
   ========================================================================== */
.capsula-layout {
  display: grid;
  grid-template-columns: 320px 200px 1fr; /* 3 columnas: Imagen | Lista | Texto */
  gap: 25px;
  align-items: center;
  max-width: var(--site-max-width, 1000px);
  margin: 40px auto;
  padding: 0 20px;
}

/* 1. Columna Imagen */
.capsula-col-image img {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* 2. Columna Lista Vertical */
.capsula-col-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tab-list-btn {
  padding: 12px 16px;
  background-color: #ffffff;
  border: 1px solid var(--steam-active-bg, #c3e9ec);
  border-radius: 6px;
  color: var(--steam-hover, #3b3b3b);
  font-size: 0.85rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-list-btn:hover {
  background-color: rgba(111, 207, 207, 0.15);
  color: #000;
}

.tab-list-btn.active {
  background-color: var(--steam-primary, #6fcfcf);
  color: #ffffff;
  border-color: var(--steam-primary, #6fcfcf);
}

/* 3. Columna Contenido al costado */
.capsula-col-content {
  background-color: #ffffff;
  padding: 25px;
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  min-height: 160px;
  display: flex;
  align-items: center;
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.tab-panel p {
  color: var(--steam-hover, #3b3b3b);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* Adaptación a dispositivos móviles */
@media (max-width: 900px) {
  .capsula-layout {
    grid-template-columns: 1fr; /* En pantallas pequeñas se apilan verticalmente */
  }
}

/* ==========================================
   ESTILOS DE AUTENTICACIÓN (LOGIN / REGISTRO)
   ========================================== */

.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 3rem 1rem;
    min-height: 70vh;
}

.auth-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 440px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

/* Pestañas superiores */
.auth-tabs {
    display: flex;
    background-color: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.auth-tab-btn {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all 0.25s ease;
    border-bottom: 3px solid transparent;
}

.auth-tab-btn:hover {
    color: #1e293b;
}

.auth-tab-btn.active {
    color: #0284c7; /* Color principal de acento */
    background-color: #ffffff;
    border-bottom-color: #0284c7;
}

/* Cuerpo del contenedor */
.auth-body {
    padding: 2rem 1.75rem;
}

/* Formularios y alternancia */
.auth-form {
    display: none;
    flex-direction: column;
    gap: 1.25rem;
}

.auth-form.active {
    display: flex;
}

/* Campos de entrada */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.form-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
}

.form-group input {
    padding: 0.75rem 1rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 0.95rem;
    color: #1e293b;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

/* Botón de envío */
.btn-auth-submit {
    margin-top: 0.5rem;
    padding: 0.85rem;
    background-color: #0284c7;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%;
}

.btn-auth-submit:hover {
    background-color: #0369a1;
}

/* Alert Mensajes */
.auth-alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
}

.auth-alert.error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.auth-alert.success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}
/* ==========================================
   ESTILOS PARA EL DESPLEGABLE (SELECT)
   ========================================== */

/* Asegura que el select tenga el mismo estilo visual que los inputs de texto */
.form-group select.form-control,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    font-size: 1rem;
    font-family: inherit;
    color: #333;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
    appearance: none; /* Elimina la flecha nativa del navegador */
    -webkit-appearance: none;
    -moz-appearance: none;
    /* Agrega una flecha personalizada elegante */
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Efecto al hacer foco (focus) */
.form-group select.form-control:focus,
.form-group select:focus {
    border-color: #4a90e2; /* Cambia al color primario de tu paleta */
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.15);
}
/* Estado Focus al hacer clic */
.form-group select.form-control:focus {
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
    outline: none;
}

/* Opción deshabilitada por defecto (placeholder) */
.form-group select.form-control option[disabled] {
    color: #94a3b8;
}

/* Opciones desplegadas */
.form-group select.form-control option {
    color: #1e293b;
    padding: 0.5rem;
}
.d-none {
    display: none !important;
}

/* ==========================================
   MÓDULO DE CALENDARIO DINÁMICO
   ========================================== */

.calendar-container {
    max-width: 1000px;
    margin: 30px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    padding: 25px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Encabezado y Navegación */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.calendar-header h2 {
    margin: 0;
    color: #2c3e50;
    font-size: 1.6rem;
    font-weight: 700;
}

.btn-nav {
    background-color: #84d6d6;
    color: #ffffff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-nav:hover:not(:disabled) {
    background-color: #6bb8b8;
    transform: translateY(-1px);
}

.btn-nav:disabled {
    background-color: #e0e0e0;
    color: #a0a0a0;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Grilla del Calendario */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
}

.day-header {
    text-align: center;
    font-weight: 700;
    padding: 12px 5px;
    background: #84d6d6;
    color: #ffffff;
    border-radius: 6px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.days-container {
    display: contents;
}

.day-cell {
    min-height: 110px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    background: #fdfdfd;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.day-cell:hover:not(.empty) {
    border-color: #84d6d6;
    box-shadow: 0 2px 8px rgba(132, 214, 214, 0.2);
}

.day-cell.empty {
    background: #f8fafc;
    border-color: transparent;
}

.day-number {
    font-weight: 700;
    font-size: 0.85rem;
    color: #4a5568;
    margin-bottom: 6px;
}

/* Badges de Eventos */
.event-badge {
    background-color: #84d6d6;
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 4px;
    margin-top: 4px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.15s ease, filter 0.15s ease;
}

.event-badge:hover {
    transform: scale(1.02);
    filter: brightness(0.92);
}

/* Controles Admin */
.admin-controls {
    margin-top: 25px;
    display: flex;
    justify-content: flex-end;
}

.btn-admin {
    background-color: #2b6cb0;
    color: #ffffff;
    border: none;
    padding: 11px 22px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-admin:hover {
    background-color: #2c5282;
}

/* Ventanas Modales */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: #ffffff;
    margin: 6% auto;
    padding: 25px 30px;
    border-radius: 10px;
    width: 90%;
    max-width: 520px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    animation: fadeInModal 0.25s ease-out;
}

@keyframes fadeInModal {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 1.6rem;
    font-weight: bold;
    color: #a0aec0;
    cursor: pointer;
    transition: color 0.15s ease;
}

.close-btn:hover {
    color: #e53e3e;
}

/* Formularios dentro del Modal */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.88rem;
    color: #2d3748;
}

.form-group input, 
.form-group select, 
.form-group textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #cbd5e0;
    border-radius: 6px;
    font-size: 0.9rem;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

.form-group input:focus, 
.form-group select:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: #84d6d6;
    box-shadow: 0 0 0 3px rgba(132, 214, 214, 0.25);
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.btn-submit {
    width: 100%;
    background-color: #84d6d6;
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s ease;
}

.btn-submit:hover {
    background-color: #6bb8b8;
}

/* Adaptación Responsive */
@media (max-width: 768px) {
    .calendar-container {
        padding: 15px;
    }

    .day-cell {
        min-height: 75px;
        padding: 4px;
    }

    .event-badge {
        font-size: 0.7rem;
        padding: 2px 4px;
    }

    .day-header {
        font-size: 0.75rem;
        padding: 8px 2px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-input-wrapper input {
    width: 100%;
    padding-right: 40px; /* Espacio para el ojito */
}

.toggle-password-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 0 5px;
    user-select: none;
    opacity: 0.7;
}

.toggle-password-btn:hover {
    opacity: 1;
}

.form-hint {
    font-size: 0.8rem;
    color: #6c757d;
    margin-top: 4px;
    display: block;
}