* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Poppins", sans-serif;
    background: #f3f5fb;
    color: #222;
    line-height: 1.6;
}

/* CABECERA */

.site-header {
    background: linear-gradient(120deg, #041735, #0a3a7a);
    color: #ffffff;
    padding: 14px 20px 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    position: sticky;
    top: 0;
    z-index: 50;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 1120px;
    margin: 0 auto 6px;
}

.logo-circle {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #ffd54f;
    color: #0a1840;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}
.logo-title {
    font-weight: 600;
    letter-spacing: 0.6px;
}
.logo-subtitle {
    font-size: 13px;
    opacity: 0.9;
}

/* NAVEGACIÓN */

.main-nav {
    max-width: 1120px;
    margin: 4px auto 0;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.main-nav a,
.dropbtn {
    color: #d7e3ff;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
}

.nav-link {
    padding: 4px 8px;
    border-radius: 999px;
}
.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* MENÚ DESPLEGABLE */

.dropdown {
    position: relative;
}

.dropbtn {
    border: 1px solid transparent;
    background: none;
    border-radius: 999px;
    padding: 4px 12px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: inherit;
}

.dropbtn:hover {
    background: rgba(255, 255, 255, 0.06);
}

.chevron {
    font-size: 11px;
}

.dropdown.open .dropbtn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
}

.dropdown-content {
    position: absolute;
    top: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #05152e;
    border-radius: 12px;
    min-width: 210px;
    padding: 8px 0;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease, visibility 0s linear 0.18s;
    z-index: 40;
}

.dropdown.open .dropdown-content {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
}

.dropdown-content a {
    display: block;
    padding: 9px 16px;
    font-size: 14px;
    color: #e0e7ff;
}

.dropdown-content a:hover {
    background: #10254b;
}

/* CONTENIDO PRINCIPAL */

main {
    max-width: 1120px;
    margin: 24px auto 40px;
    padding: 0 16px;
}

/* SECCIÓN SUPERIOR / HERO */

.top-news {
    display: grid;
    grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
    gap: 26px;
    align-items: center;
    margin-bottom: 32px;
}

.top-news-main h1 {
    margin: 6px 0 10px;
    font-size: 28px;
}
.kicker {
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #0a3a7a;
    font-size: 12px;
    font-weight: 600;
}
.intro {
    margin-top: 0;
    margin-bottom: 16px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
}

.primary-btn,
.secondary-btn {
    border-radius: 999px;
    padding: 9px 18px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.primary-btn {
    background: #ffd54f;
    color: #1b243b;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}
.primary-btn:hover {
    background: #ffca28;
}

.secondary-btn {
    background: #1e3c72;
    color: #ffffff;
}
.secondary-btn:hover {
    background: #162d55;
}

.hero-list {
    font-size: 14px;
    padding-left: 18px;
    margin: 6px 0 0;
}

.top-news-side {
    border-radius: 16px;
    background: #101c3a;
    padding: 14px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.18);
    color: #e3e7ff;
}
.hero-image {
    width: 100%;
    border-radius: 12px;
    display: block;
    margin-bottom: 8px;
}
.hero-caption {
    font-size: 13px;
    margin: 0;
    opacity: 0.9;
}

/* NOTICIAS */

.news-section {
    margin-top: 8px;
}

.news-section h2 {
    font-size: 22px;
    margin-bottom: 16px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.news-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 14px 14px 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.news-card h3 {
    margin: 0 0 6px;
    font-size: 18px;
}
.news-card h3 a {
    color: inherit;
    text-decoration: none;
}
.news-card h3 a:hover {
    text-decoration: underline;
}
.news-card p {
    margin: 0 0 10px;
    font-size: 14px;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 12px;
}
.tag {
    padding: 3px 8px;
    border-radius: 999px;
    background: #e3f2fd;
    color: #0d47a1;
}
.meta {
    color: #555;
}

/* HERRAMIENTAS */

.tools-section {
    margin-top: 32px;
}
.tools-section h2 {
    font-size: 22px;
    margin-bottom: 12px;
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.tool-card {
    background: #ffffff;
    border-radius: 14px;
    padding: 16px 16px 14px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}
.tool-card h3 {
    margin-top: 0;
    margin-bottom: 6px;
}
.tool-card p {
    font-size: 14px;
    margin-bottom: 10px;
}
.tool-link {
    font-size: 14px;
    text-decoration: none;
    color: #0a3a7a;
    font-weight: 500;
}
.tool-link:hover {
    text-decoration: underline;
}

/* PÁGINAS DE NOTICIAS Y HERRAMIENTAS */

.content-page {
    margin-top: 24px;
}
.article-card,
.form-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 20px 18px 18px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}
.article-card h1,
.form-card h1,
.form-card h2 {
    margin-top: 0;
}
.article-meta {
    font-size: 13px;
    color: #555;
    margin-bottom: 10px;
}
.article-card img {
    width: 100%;
    border-radius: 12px;
    margin: 6px 0 10px;
}

.video-frame {
    width: 100%;
    max-width: 100%;
    border-radius: 12px;
    border: none;
    margin-top: 14px;
    aspect-ratio: 16 / 9;
}

.back-link {
    display: inline-flex;
    margin-top: 14px;
    font-size: 14px;
    text-decoration: none;
    color: #0a3a7a;
}
.back-link:hover {
    text-decoration: underline;
}

/* FORMULARIOS */

.form-card label {
    display: block;
    font-weight: 600;
    margin-top: 10px;
    font-size: 14px;
}
.form-card input {
    width: 100%;
    padding: 8px 10px;
    margin-top: 4px;
    border-radius: 8px;
    border: 1px solid #c0c4d6;
    font-family: inherit;
    font-size: 14px;
}
.form-card input:focus-visible {
    outline: 2px solid #0a3a7a;
    border-color: #0a3a7a;
}
.form-card button {
    margin-top: 12px;
}

.btn {
    background: #0a3a7a;
    padding: 9px 18px;
    color: #ffffff;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
}
.btn:hover {
    background: #06264f;
}

.output-box {
    margin-top: 10px;
    min-height: 38px;
    background: #eef2ff;
    border-radius: 10px;
    padding: 8px 10px;
    font-size: 14px;
}

/* FOOTER */

.site-footer {
    background: #020919;
    color: #cfd8ff;
    font-size: 13px;
    text-align: center;
    padding: 16px 10px;
    margin-top: 20px;
}

/* RESPONSIVE */

@media (max-width: 900px) {
    .top-news {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    .main-nav {
        gap: 10px;
    }
    .news-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .tools-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
