:root {
    --azul-marino: #0d1b2a;
    --naranja: #f05a28;
    --gris-claro: #f2f2f2;
    --gris-medio: #cccccc;
    --blanco: #ffffff;

}

/* ================= RESET ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Arial, sans-serif;
}

body {
    background: var(--gris-claro);
}

/* ================= TOPBAR ================= */
.topbar {
    background: #09121c;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 40px;
    font-size: 14px;
}

.topbar-left {
    display: flex;
    margin-left: auto;
}

.topbar-right {
    display: flex;
    margin-left: 30px;
}

.social-icons a {
    margin-left: 15px;
    margin-right: 0;
}

.topbar a {
    color: var(--gris-medio);
    margin-right: 15px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.topbar a:hover {
    color: var(--naranja);
}

/* ================= HEADER ================= */
.header {
    background:
        linear-gradient(rgba(10, 10, 10, 0.04) 2px, transparent 2px),
        linear-gradient(90deg, rgba(10, 10, 10, 0.04) 2px, transparent 2px),
        var(--blanco);
    background-size: 40px 40px;
    padding: 18px 40px;
    border-bottom: 4px solid var(--naranja);
}

.logo-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    max-width: 1200px;
    margin: auto;
}

.logo-container img {
    height: 70px;
    width: auto;
}

/* ================= MENÚ ================= */
.main-menu {
    background: var(--blanco);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    border-bottom: 2px solid var(--gris-medio);
}

.main-menu a {
    display: flex;
    align-items: center;
    padding: 14px 18px;
    text-decoration: none;
    color: var(--azul-marino);
    font-weight: bold;
    transition: all 0.3s ease;
}

.main-menu a:hover {
    background: var(--naranja);
    color: white;
}

/* ================= DROPDOWN ================= */
.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--blanco);
    min-width: 180px;
    box-shadow: 0 4px 8px rgba(0,0,0,.15);
    z-index: 999;
    border-top: 3px solid var(--naranja);
}

.dropdown-content a {
    padding: 12px 16px;
    display: block;
    color: var(--azul-marino);
    text-decoration: none;
}

.dropdown-content a:hover {
    background: var(--naranja);
    color: white;
}

.dropdown:hover .dropdown-content {
    display: block;
}

/* ================= SLIDER ================= */
.hero-slider {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 30px;
    box-shadow:0 10px 25px rgba(0,0,0,0.08);
}

.slide {
    display: none;
    position: relative;
}

.slide.active {
    display: block;
}

.slide img {
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.slide-text {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: rgba(0,0,0,.55);
    color: white;
    padding: 15px 20px;
    border-left: 5px solid var(--naranja);
}

.slide-text span {
    font-size: 13px;
    color: var(--naranja);
    text-transform: uppercase;
}

/* Flechas */
.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,.5);
    color: white;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.3s ease;
}

.prev { left: 10px; }
.next { right: 10px; }

.prev:hover, .next:hover {
    background: var(--naranja);
}

/* Puntitos del slider */
.dots {
    position: absolute;
    bottom: 15px;
    width: 100%;
    text-align: center;
}

.dot {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    display: inline-block;
    margin: 0 4px;
    opacity: .6;
    cursor: pointer;
    transition: all 0.3s ease;
}

.active-dot {
    background: var(--naranja);
    opacity: 1;
}




/* ================= GRID DE NOTICIAS ================= */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.news-grid article {
    background: white;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.news-grid article:hover {
    transform: translateY(-3px);
}

.news-grid img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.category {
    background: var(--naranja);
    color: white;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: bold;
}

/* ================= LISTA DE NOTICIAS ELEGANTE ================= */
.news-list {
    max-width: 1000px;
    margin: 40px auto;
}

.news-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
    transition: transform 0.2s ease;
}

.news-item:hover {
    transform: translateY(-3px);
}

.news-image img {
    width: 220px;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.news-image img:hover {
    transform: scale(1.05);
}

.news-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-category a {
    font-size: 13px;
    color: #28a745; /* verde elegante */
    text-decoration: none;
    font-weight: bold;
}

.news-title {
    margin: 5px 0;
    font-size: 20px;
    line-height: 1.3;
}

.news-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: #28a745;
}

.news-summary {
    font-size: 15px;
    color: #555;
    margin-bottom: 5px;
    line-height: 1.5;
}

.news-date {
    font-size: 13px;
    color: #999;
}

/* Links dentro del resumen */
.news-summary a {
    color: #333;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.news-summary a:hover {
    color: #28a745;
}

/* ================= SIDEBAR PUBLICIDAD ================= */
.sidebar {
    width: 100%;
}

.ads-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.ad-box {
    background: var(--gris-medio);
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #333;
    border: 1px solid #bbb;
}

.ad-vertical {
    background: var(--gris-medio);
    min-height: 1600px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    top: 140px;
}

/* ================= FOOTER ================= */
.footer {
    background: var(--azul-marino);
    color: white;
    text-align: center;
    padding: 25px;
    margin-top: 40px;
    border-top: 4px solid var(--naranja);
}

/* ================= RESPONSIVE ================= */
@media(max-width: 1100px){

    .layout{
        grid-template-columns:1fr;
    }

    .sidebar{
        flex-direction:row;
        justify-content:center;
        flex-wrap:wrap;
    }

    .ad-box{
        width:300px;
        height:250px;
    }

    .ad-banner-top .ad-container{
        width:100%;
        max-width:970px;
        height:auto;
        aspect-ratio: 970 / 90;
    }
}

/* ================= LAYOUT CENTRAL ================= */
.layout { 
    display:flex; 
    flex-direction:column; 
    align-items:flex-start; /* 🔹 ahora todo queda hacia la izquierda */
    width:90%; 
    max-width:900px; 
    margin:40px auto; 
    gap:40px; 
}

/* ================= ARTÍCULOS RELACIONADOS ================= */
.news-grid { 
    display:flex; 
    flex-wrap:wrap; 
    gap:20px; 
    justify-content:flex-start; /* 🔹 alineado a la izquierda */
}
.news-grid article { width:220px; } /* un poco más grande */

/* ===== LAYOUT CENTRAL ===== */
.layout {
    width:90%;
    max-width:1000px;
    margin:50px auto 80px auto;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    font-size:14px;
    color:#777;
    margin-bottom:15px;
}

.breadcrumb a {
    color:#777;
    text-decoration:none;
}

.breadcrumb a:hover {
    color:#f05a28;
}

.breadcrumb span {
    margin:0 6px;
}

/* ===== TITULOS SECCION ===== */
.categoria-titulo {
    font-size:36px;
    font-weight:800;
    margin-bottom:40px;
    border-left:5px solid #f05a28;
    padding-left:15px;
    color:#0d1b2a;
}

/* ===== LISTA ARTICULOS ===== */
.lista-articulos article {
    display:flex;
    gap:25px;
    margin-bottom:40px;
    padding-bottom:30px;
    border-bottom:1px solid #e5e5e5;
}

.lista-articulos img {
    width:300px;
    height:200px;
    object-fit:cover;
    border-radius:8px;
}

.lista-articulos .info {
    flex:1;
}

.lista-articulos h2 {
    font-size:22px;
    margin:0 0 10px 0;
}

.lista-articulos h2 a {
    text-decoration:none;
    color:#0d1b2a;
}

.lista-articulos h2 a:hover {
    color:#f05a28;
}

.lista-articulos .meta {
    font-size:13px;
    color:#999;
    margin-bottom:12px;
}

.lista-articulos .resumen {
    font-size:16px;
    line-height:1.6;
    color:#444;
}

/* ===== PAGINACION ===== */
.paginacion{
    margin-top:40px;
    text-align:center;
}

.btn-page{
    display:inline-block;
    margin:0 5px;
    padding:8px 14px;
    background:#fff;
    border:1px solid #ddd;
    border-radius:6px;
    text-decoration:none;
    color:#333;
    font-weight:600;
    transition:0.3s;
}

.btn-page:hover{
    background:#f05a28;
    color:#fff;
}

.btn-page.activo{
    background:#f05a28;
    color:#fff;
}

/* ===== RESPONSIVE ===== */
@media(max-width:768px){
    .lista-articulos article{
        flex-direction:column;
    }

    .lista-articulos img{
        width:100%;
        height:220px;
    }
}