/* 1. Reset y Variables Generales */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
}

body { 
    background-color: #f9f9f9; 
    color: #333; 
    line-height: 1.6;
}

/* 2. Cabezal y Overlay */
.main-header {
    height: 300px;
    background: url('https://upload.wikimedia.org/wikipedia/commons/4/4a/Liceo_N%C2%BA_14_Treinta_y_Tres_Orientales.jpg') center/cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
}

.overlay { 
    text-align: center; 
    background: rgba(0, 51, 102, 0.4); 
    width: 100%; 
    padding: 20px; 
}

.overlay h1 { 
    font-size: 3rem; 
    text-transform: uppercase; 
}

/* 3. Navegación Principal */
.navbar {
    background-color: #003366;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
}

.navbar a {
    color: white;
    text-decoration: none;
    padding: 10px 15px;
    display: block;
    transition: transform 0.3s ease, color 0.3s;
}

.navbar a:hover { 
    transform: scale(1.1); /* Reducido un poco para que sea más sutil */
    color: #ffcc00; 
}

.navbar a.active { 
    border: 2px solid #00d4ff; 
    border-radius: 5px; 
}

/* 4. Menús Desplegables (Dropdown) */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 180px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    border-radius: 4px;
    overflow: hidden;
}

.dropdown-content a { 
    color: #003366 !important;
    padding: 12px 16px; 
    transform: none !important; /* Evita saltos visuales en el menú */
}

.dropdown-content a:hover { 
    background-color: #003366; 
    color: #ffcc00 !important; 
}

.dropdown:hover .dropdown-content { 
    display: block; 
}

/* 5. Estructura de Contenido (Posts) */
.container { 
    max-width: 900px; 
    margin: 20px auto; 
    padding: 20px; 
}

.post {
    background: white;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    border-left: 5px solid #003366;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.post h3:first-of-type {
    background-color: rgba(0, 51, 102, 0.1); /* Más suave para legibilidad */
    padding: 10px;
    border-radius: 4px;
    font-weight: bold;
    display: block;
    margin-bottom: 15px;
}

.post img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 10px 0;
}

/* 6. Utilidades y Botones */
.btn-comment {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 15px;
    background: #003366;
    color: white;
    text-decoration: none;
    border-radius: 4px;
}

.highlight-line {
    background-color: rgba(0, 51, 102, 0.1);
    padding: 2px 5px;
    border-radius: 4px;
}

/* 7. Gestión de iFrames */
iframe {
    width: 100%;
    border: none;
    display: block;
}

/* Escalar contenido del Horario */
.iframe-container {
    overflow: hidden;
    width: 100%;
    height: 600px; /* Altura visual en la página */
    border-radius: 4px;
    margin-top: 10px;
}

.iframe-small {
    transform: scale(0.8);
    transform-origin: 0 0;
    width: 125%; 
    height: 750px; /* Altura interna (600 / 0.8) */
    border: none;
}

/* Contenedor del Blog (Limpio) */
.blog-wrapper {
    background: white;
    border-radius: 8px;
    border-left: 5px solid #003366;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* 8. Formularios */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contact-form input, 
.contact-form textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.contact-form input:focus, 
.contact-form textarea:focus {
    outline: none;
    border-color: #003366;
    box-shadow: 0 0 5px rgba(0, 51, 102, 0.2);
}

/* 9. Footer */
.main-footer { 
    background: #333; 
    color: white; 
    padding: 30px; 
    margin-top: 40px; 
}

.footer-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 20px; 
}

/* Contenedor principal del escritorio */
.escritorio-grid {
    display: grid;
    /* Define columnas de mínimo 150px que llenan el espacio disponible */
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); 
    gap: 20px; /* Espacio entre botones */
    padding: 10px;
}

/* Estilo de cada "Botón/Tarjeta" */
.herramienta-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border: 2px solid #003366;
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
    text-align: center;
}

/* Efecto al pasar el mouse */
.herramienta-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 51, 102, 0.2);
    background-color: #f0f7ff;
}

/* Imágenes dentro de los botones */
.herramienta-item img {
    width: 100px;  /* Tamaño fijo para uniformidad */
    height: 100px;
    object-fit: contain;
    margin-bottom: 0px;
}

/* Texto debajo de la imagen */
.herramienta-item span {
    color: #003366;
    font-weight: bold;
    font-size: 0.9rem;
}