/* ESTILOS GENERALES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* BARRA SUPERIOR REORDENADA */
.barra-superior {
    display: flex;
    justify-content: flex-end; /* Alinea a la derecha */
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(255,255,255,0.9);
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    gap: 15px;
}

/* RELOJ 12 HORAS */
#reloj-digital {
    font-size: 2em;
    font-weight: bold;
    color: #2e7d32;
    background: white;
    padding: 12px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* CUADRO IMAGEN 5x3 (MÁS LARGO) */
.recuadro-imagen {
    flex: 0 0 300px; /* Más ancho */
    height: 180px; /* Más bajo - proporción 5x3 */
}

.imagen-editable img {
    width: 100%;
    height: 120px; /* Altura fija para proporción 5x3 */
    object-fit: cover; /* Recorta la imagen si es necesario */
    border-radius: 5px;
}
.buscador-container {
    display: flex;
    align-items: center;
    flex-grow: 1;
    max-width: 500px;
}

.lupa-buscador {
    font-size: 1.2em;
    margin-right: 10px;
}

#buscador-bing {
    flex-grow: 1;
    padding: 10px 15px;
    border: 2px solid #4caf50;
    border-radius: 25px 0 0 25px;
    font-size: 1em;
}

.buscador-container button {
    padding: 10px 20px;
    background: #4caf50;
    color: white;
    border: none;
    border-radius: 0 25px 25px 0;
    cursor: pointer;
    font-size: 1em;
}

.btn-contact {
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    margin-left: 15px;
}

/* HEADER WIDGETS */
.header-widgets {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

#reloj-digital {
    font-size: 2.5em;
    font-weight: bold;
    color: #2e7d32;
    background: white;
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

#widget-tiempo {
    font-size: 1.2em;
    color: #2e7d32;
    background: white;
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* ENCABEZADO PRINCIPAL */
.encabezado-principal {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    gap: 30px;
}

.recuadro-imagen {
    flex: 0 0 200px;
}

.imagen-editable {
    background: white;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: center;
}

.imagen-editable img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

.credito-imagen {
    margin-top: 10px;
    font-size: 0.9em;
    color: #666;
    font-style: italic;
}

.titulo-principal {
    flex-grow: 1;
    text-align: center;
}

.titulo-principal h1 {
    font-size: 3.5em;
    color: #2e7d32;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin: 0;
}

/* BLOQUES CONTAINER */
.bloques-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    margin-top: 30px;
}

.bloque {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
    min-height: 300px;
}

.bloque h2 {
    color: #2e7d32;
    margin-bottom: 20px;
    text-align: center;
    font-size: 1.4em;
}

.contenido-editable {
    min-height: 200px;
}

/* NUMERO EMERGENCIA */
.numero-emergencia.principal {
    background: #ff4444;
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
    border: 3px solid #cc0000;
}

.numero-emergencia .icono-emergencia {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.numero-emergencia .numero {
    font-size: 2em;
    font-weight: bold;
    margin: 10px 0;
}

.numero-emergencia .descripcion {
    font-size: 1em;
    opacity: 0.9;
}

/* MODAL CONTACT */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-contact {
    background: white;
    width: 90%;
    max-width: 600px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5em;
}

.cerrar-modal {
    background: none;
    border: none;
    color: white;
    font-size: 2em;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
}

.modal-body {
    padding: 25px;
    max-height: 70vh;
    overflow-y: auto;
}

.contact-info {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 25px;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    border-bottom: 1px solid #e9ecef;
}

.contact-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.contact-icon {
    font-size: 1.5em;
    margin-right: 15px;
    width: 40px;
}

.contact-details a {
    color: #2e7d32;
    text-decoration: none;
}

.contact-details a:hover {
    text-decoration: underline;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #4caf50;
    outline: none;
}

.btn-enviar {
    background: linear-gradient(135deg, #2e7d32, #4caf50);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 1.1em;
    cursor: pointer;
    width: 100%;
    transition: transform 0.2s;
}

.btn-enviar:hover {
    transform: translateY(-2px);
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .bloques-container {
        grid-template-columns: 1fr;
    }
    
    .encabezado-principal {
        flex-direction: column;
        text-align: center;
    }
    
    .recuadro-imagen {
        flex: none;
        width: 100%;
        max-width: 200px;
    }
    
    .titulo-principal h1 {
        font-size: 2.5em;
    }
    
    .barra-superior {
        flex-direction: column;
        gap: 15px;
    }
    
    .buscador-container {
        max-width: 100%;
    }
}