/* --- 1. RESET Y COMPATIBILIDAD --- */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary-color:    #1a5f7a;
    --nav-bg-color:     #0d3b4c;
    --secondary-color:  #f4a261;
    --background-color: #f1faee;
}

body {
    font-family: 'Inter', Arial, sans-serif;
    background: var(--background-color) url('/imagenes/fondo_radio1.png') no-repeat center center fixed;
    background-size: cover;
    color: #333;
    line-height: 1.6;
}

/* --- 2. ESTRUCTURA --- */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
    display: block;
    width: 100%;
}

header {
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 30px 10px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.header-logo {
    width: 110px;
    height: 31px;
    object-fit: contain;
    flex-shrink: 0;
}

/* --- 3. MENÚ --- */
.main-nav {
    background-color: var(--nav-bg-color);
    width: 100%;
    display: block;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.main-nav ul {
    list-style: none;
    text-align: center;
    padding: 15px 10px;
    max-width: 1000px;
    margin: 0 auto;
}

.main-nav li {
    display: inline-block;
    margin: 5px 25px;
    vertical-align: middle;
}

.main-nav a {
    color: #fff !important;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    display: block;
    white-space: nowrap;
    padding-bottom: 3px;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
    border-bottom-color: var(--secondary-color);
}

/* --- 4. SECCIONES --- */
.info-section {
    background: rgba(255,255,255,0.97);
    padding: 25px;
    margin: 20px 0;
    border-radius: 12px;
}

/* --- 5. GRID DE ENLACES --- */
.links-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 0;
}

.link-card {
    background: #fff;
    border-bottom: 5px solid var(--secondary-color);
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    flex: 1 1 220px;
    transition: transform 0.3s ease;
}

.link-card:hover { transform: translateY(-5px); }

/* --- 6. FORMULARIO --- */
.contact-form { display: flex; flex-direction: column; gap: 15px; }
.form-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.contact-form input,
.contact-form textarea {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    width: 100%;
    font-family: inherit;
}
.privacy-notice { font-size: 0.85rem; color: #555; background: #eee; padding: 15px; border-radius: 6px; margin: 10px 0; }
.submit-btn { background: var(--primary-color); color: #fff; padding: 15px; border: none; border-radius: 6px; font-weight: bold; cursor: pointer; font-size: 1rem; }
.submit-btn:hover { background: #145068; }

/* --- 7. FOOTER --- */
.site-footer {
    background-color: var(--nav-bg-color);
    color: #aac;
    text-align: center;
    padding: 20px 10px;
    margin-top: 40px;
    font-size: 0.9rem;
}

.site-footer .footer-links {
    margin-top: 8px;
}

.site-footer a {
    color: #fff;
    text-decoration: none;
}

.site-footer a:hover {
    text-decoration: underline;
}

/* --- 8. RESPONSIVE --- */
@media (max-width: 768px) {
    .main-nav li { display: block; margin: 8px 0; }
    .form-row { grid-template-columns: 1fr; }
}

/* --- 9. LOGO --- */
.logo-wrapper {
    width: 100%;
    margin: 20px auto;
    border-radius: 12px;
    overflow: hidden;
}

.final-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    transition: transform 0.4s ease-out, filter 0.4s ease-out;
}

.final-image:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
    cursor: pointer;
}

@keyframes fadeInZoom {
    0%   { opacity: 0; transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

.animated-wrapper {
    animation: fadeInZoom 1.5s ease-out forwards;
}

/* --- 10. BLOG --- */

/* Imagen de cabecera del artículo */
.blog-imagen-principal {
    width: 100%;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 24px;
    box-sizing: border-box;
}
.blog-imagen-principal img {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 420px;
    object-fit: cover;
    border-radius: 10px;
}

/* Imágenes dentro del contenido del artículo */
.blog-contenido img {
    display: block;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    border-radius: 8px;
    margin: 12px auto;
    box-sizing: border-box;
}

/* Regla general de seguridad para todas las imágenes */
img {
    max-width: 100%;
    height: auto;
}
