@charset "utf-8";
/* CSS Document - Tema claro moderno totalmente responsivo */
:root {
    --bg: #8FBFEF;
    --card: #F0F0F3;
	--cardHisto: #DADFE1;
    --cardInput: #FFFFFF;
    --text: #433e3c;
    --muted: #353C47;
    --accent: #12314E;
    --accent-light: #4299e1;
    --border: #607BAD;
    --success: #0E2C1C;
    --error: #e53e3e;
    --warning: #dd6b20;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.1);
}

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

        /* Estilos para la imagen de fondo responsiva */
        body {
            margin: 0;
            padding: 0;
            min-height: 100vh;
            background-image: url('Images/FondoComentarios.jpg');
            background-size: cover;
            background-position: center;
            background-repeat: no-repeat;
            background-attachment: fixed;
            position: relative;
        }
        
        /* Capa overlay para mejorar la legibilidad del contenido */
        body::before {
            content: '';
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(255,255,255,0.82);
            z-index: -1;
        }

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    width: 100%;
}

/* Cards modernas */
.cardHisto {
    background: var(--cardHisto);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card {
    background: var(--card);
    padding: 1.5rem;
    border-radius: 16px;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border: 5px solid var(--border);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Títulos */
h1 {
	font-family: Cambria, "Hoefler Text", "Liberation Serif", Times, "Times New Roman", "serif";
    color: var(--accent);
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 700;
    padding: 0 1rem;
}

h2 {
    color: var(--accent);
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    font-weight: 600;
}
h3 {
	font-family: Cambria, "Hoefler Text", "Liberation Serif", Times, "Times New Roman", "serif";
    color: var(--accent);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 700;
    padding: 0 1rem;
}
/* Navegación */
nav {
    background: var(--card);
    padding: 1rem;
    border-radius: 12px;
    border: 5px solid var(--border);
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

nav a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
    padding: 0.7rem 1.2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    text-align: center;
    min-width: 120px;
}

nav a:hover {
    background: var(--accent);
    color: white;
    transform: translateY(-2px);
    border-color: var(--accent);
}

/* Formularios */
form {
    width: 100%;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text);
}

input, textarea, button {
    width: 100%;
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--cardInput);
    color: var(--text);
    font-size: 1rem;
    transition: all 0.3s ease;
    font-family: inherit;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

button {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    border: none;
    font-weight: 600;
    cursor: pointer;
    padding: 1.2rem;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(49, 130, 206, 0.3);
}

/* Notificaciones */
.notice {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 12px;
    background: var(--success);
    color: white;
    font-weight: 500;
    text-align: center;
}

.notice.error {
    background: var(--error);
}

/* Tabla */
.table-container {
    overflow-x: auto;
    margin: 1rem 0;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card);
    border-radius: 12px;
    min-width: 600px;
}

.table th {
    background: var(--accent);
    color: white;
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    position: sticky;
    top: 0;
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover {
    background: #f7fafc;
}

/* Badges de estrellas */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    min-width: 60px;
    text-align: center;
}

.star1 { background: #fed7d7; color: #c53030; }
.star2 { background: #feebcb; color: #dd6b20; }
.star3 { background: #bee3f8; color: #3182ce; }
.star4 { background: #c6f6d5; color: #38a169; }
.star5 { background: #9ae6b4; color: #2f855a; }

/* Contenedor del gráfico */
.chart-container {
    position: relative;
    height: 400px;
    width: 100%;
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin: 2rem 0;
    box-shadow: var(--shadow);
    border: 2px solid var(--border);
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 1.2rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
}

.legend-stars {
    background: linear-gradient(135deg, #3182ce, #4299e1);
    color: white;
}

.legend-count {
    background: linear-gradient(135deg, #38a169, #48bb78);
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0.5rem;
    }
    
    h1 {
        font-size: 1.8rem;
        padding: 0 0.5rem;
    }
    
    h2 {
        font-size: 1.4rem;
    }
	h3 {
		font-size: 1.0rem;
	}    
    .card {
        padding: 1.2rem;
        margin-bottom: 1rem;
    }
    
    nav {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.8rem;
    }
    
    nav a {
        width: 100%;
        margin: 0.2rem 0;
    }
    
    input, textarea, button {
        padding: 0.8rem;
        font-size: 16px; /* Previene zoom en iOS */
    }
    
    .chart-container {
        height: 300px;
        padding: 15px;
    }
    
    .table th, .table td {
        padding: 0.8rem 0.5rem;
        font-size: 0.9rem;
    }
    
    .badge {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
        min-width: 50px;
    }
    
    .legend-item {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
 	h3 {
		font-size: 1.0rem;
	}
    .card {
        padding: 1rem;
    }
    
    .chart-container {
        height: 250px;
        padding: 10px;
    }
    
    .table th, .table td {
        padding: 0.6rem 0.4rem;
        font-size: 0.8rem;
    }
    
    .badge {
        padding: 0.3rem 0.6rem;
        font-size: 0.7rem;
        min-width: 45px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(20px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.card {
    animation: fadeIn 0.6s ease-out;
}

/* Estados de carga */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible para accesibilidad */
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}