/* Basic Reset and Body Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    background-color: #f5f5f5; /* Fondo grisácito igual que presentaciones */
    color: #333333;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Contenedor principal */
.main-container {
    width: 100vw;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background-color: #f5f5f5;
}

/* Tarjeta principal tipo presentación */
.main-card {
    width: 1280px;
    min-height: 720px;
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border: 2px solid rgba(26, 58, 95, 0.2); /* Más visible para debug */
    padding: 70px;
    animation: slideIn 0.8s ease-out;
    /* Forzar visualización */
    display: block;
    overflow: visible;
    /* Permitir que crezca con el contenido */
    height: auto;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contenido centrado dentro de la tarjeta */
.card-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    position: relative;
    z-index: 5;
    padding-top: 40px;
    max-width: 100%;
}

/* Header del menú */
.menu-header {
    text-align: center;
    margin-bottom: 60px;
}

.main-title {
    font-size: 64px;
    font-weight: 700;
    color: #1a3a5f;
    margin-bottom: 20px;
    line-height: 1.1;
    letter-spacing: -1px;
}

.subtitle {
    font-size: 24px;
    color: #555555;
    font-weight: 400;
    line-height: 1.4;
}

/* Highlight color para texto específico */
.highlight-text {
    color: #c67c4e;
    font-weight: 600;
}

/* Línea divisoria */
.divider {
    height: 4px;
    width: 80px;
    background-color: #c67c4e;
    margin: 20px auto;
    border-radius: 2px;
}

/* Logo en esquina superior derecha */
.logo-container {
    position: absolute;
    top: 20px;
    right: 25px;
    z-index: 10;
}

.logo-container img {
    width: 140px;
    height: auto;
}

/* Puntos decorativos en esquinas */
.corner-dots {
    position: absolute;
    z-index: 1;
    width: 40px;
    height: 40px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 4px;
}

.top-left {
    top: 20px;
    left: 20px;
}

.bottom-right {
    bottom: 20px;
    right: 20px;
}

/* Puntos individuales */
.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.dot-blue {
    background-color: #1a3a5f;
}

.dot-brown {
    background-color: #c67c4e;
}

/* Loading States */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    color: #1a3a5f;
}

.loading-indicator i {
    font-size: 48px;
    margin-bottom: 20px;
    color: #c67c4e;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-indicator p {
    font-size: 18px;
    font-weight: 500;
}

.error-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background-color: #fee2e2;
    border-radius: 12px;
    border: 1px solid #fecaca;
    max-width: 500px;
    margin: 0 auto;
}

.error-message i {
    font-size: 48px;
    color: #dc2626;
    margin-bottom: 20px;
}

.error-message p {
    font-size: 16px;
    color: #991b1b;
    margin-bottom: 20px;
    text-align: center;
}

.retry-btn {
    background-color: #dc2626;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-btn:hover {
    background-color: #b91c1c;
    transform: translateY(-2px);
}

/* Cards Grid */
.presentations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1100px; /* Reducido para que quepa dentro de la tarjeta */
    width: 100%;
    margin-top: 40px;
    /* Asegurar que esté dentro de la tarjeta */
    position: relative;
    z-index: 6;
}

.presentation-card {
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%); /* Azul muy claro más vivo */
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(26, 58, 95, 0.15); /* Sombra más azulada */
    transition: all 0.3s ease;
    cursor: pointer;
    border: 3px solid rgba(26, 58, 95, 0.1); /* Borde más visible */
    overflow: hidden;
    position: relative;
    /* Altura fija para consistencia - más compacta */
    height: 390px;
    display: flex;
    flex-direction: column;
    /* Efecto de elevación */
    transform: translateY(0);
}

.presentation-card:hover {
    transform: translateY(-12px) scale(1.03); /* Más elevación */
    box-shadow: 0 25px 50px rgba(26, 58, 95, 0.2); /* Sombra más intensa */
    border-color: #1a3a5f;
    background: linear-gradient(135deg, #ffffff 0%, #e6f3ff 100%); /* Fondo más azul en hover */
}

.presentation-card.active {
    border-color: #c67c4e;
    box-shadow: 0 15px 35px rgba(198, 124, 78, 0.2);
}

.card-header {
    padding: 20px 25px 15px 25px; /* Menos padding */
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    /* Altura fija para el header */
    min-height: 70px; /* Más compacto */
}

.card-header h3 {
    font-size: 26px; /* Más grande */
    font-weight: 700; /* Más bold */
    color: #1a3a5f;
    margin: 0;
    letter-spacing: -0.5px; /* Mejor legibilidad */
}

.period-badge {
    background-color: #c67c4e;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.period-badge.next {
    background-color: #3b82f6;
}

.period-badge.previous {
    background-color: #6b7280;
}

.period-badge.historical {
    background-color: #9333ea;
}

.presentation-card .card-content {
    padding: 0 25px 35px 25px; /* MÁS padding inferior para el botón */
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Asegurar espacio para el status */
    min-height: 280px;
}

.date-range {
    font-size: 20px; /* Más grande */
    color: #1a3a5f;
    font-weight: 600;
    margin-bottom: 15px; /* Menos espacio */
    letter-spacing: 0.2px;
}

.metrics-preview {
    display: flex;
    gap: 20px;
    margin: 15px 0; /* Menos margen */
    /* Centrar métricas con tamaño fijo */
    min-height: 100px; /* Más compacto */
    align-items: center;
    justify-content: center;
}

.metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px;
    background-color: rgba(26, 58, 95, 0.12); /* Más vivo */
    border-radius: 12px;
    /* Mismo ancho y alto - más compactos */
    width: 110px;
    height: 85px;
    text-align: center;
    /* Sombra sutil para más profundidad */
    box-shadow: 0 2px 8px rgba(26, 58, 95, 0.08);
    transition: all 0.3s ease;
}

.metric:hover {
    background-color: rgba(26, 58, 95, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 58, 95, 0.12);
}

.metric .value {
    font-size: 28px; /* Más grande */
    font-weight: 700;
    color: #1a3a5f;
    line-height: 1.1;
    margin-bottom: 8px;
    /* Asegurar que textos largos se ajusten */
    word-wrap: break-word;
    hyphens: auto;
}

/* Regla especial para textos largos de entregables */
.metric .value:not([data-numeric]) {
    font-size: 18px; /* Más pequeño para textos largos */
    line-height: 1.2;
}

.metric .label {
    font-size: 11px;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 5px;
    font-weight: 600;
}

.description {
    font-size: 14px; /* Más grande y legible */
    color: #2c3e50; /* Color más oscuro para mejor contraste */
    line-height: 1.4;
    margin: 10px 0; /* Menos margen */
    padding: 12px; /* Menos padding */
    background-color: rgba(52, 152, 219, 0.12); /* Azul más vivo */
    border-radius: 10px;
    border-left: none; /* Sin borde izquierdo */
    /* Altura fija para consistencia */
    min-height: 50px; /* Más compacto */
    display: flex;
    align-items: center;
    font-weight: 600; /* Más bold para mejor legibilidad */
    /* Borde sutil en todo el perímetro */
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.status-indicator {
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-transform: uppercase;
    /* Más espacio desde el borde inferior */
    margin-bottom: 0px; /* Sin margen extra ya que el padding lo maneja */
    margin-top: auto; /* Empuja hacia abajo pero con margen */
}

.status-indicator.revisada {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-indicator.por-revisar {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Card Click Effect */
.presentation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background-color: #1a3a5f;
    transition: width 0.6s ease;
    border-radius: 20px 20px 0 0;
}

.presentation-card:hover::before {
    width: 100%;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .main-card {
        width: 95vw;
        padding: 50px;
    }
}

@media (max-width: 1200px) {
    .presentations-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 25px;
    }
    
    .main-card {
        padding: 40px;
    }
}

@media (max-width: 768px) {
    .main-title {
        font-size: 48px;
    }
    
    .subtitle {
        font-size: 18px;
    }
    
    .presentations-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .main-container {
        padding: 20px;
    }
    
    .main-card {
        width: 100%;
        min-height: auto;
        padding: 30px;
    }
    
    .logo-container img {
        width: 100px;
    }
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.notification.success {
    background: #10b981;
    color: white;
}

.notification.warning {
    background: #f59e0b;
    color: white;
}

.notification.info {
    background: #3b82f6;
    color: white;
}