:root{
    /* Variables de Color */
    --dom:#00FE83;
    --sec:#E4EFF2;
    --acc1:#0556D2;
    --acc2:#C1A0FD; 
    --texto:#111;
    --padding-sm: 16px;
    --padding-lg: 20px;
}

*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{
    font-family:"Geologica", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    background:var(--sec);
    color:var(--texto);
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
}
html{scroll-behavior:smooth}

header{
    position:fixed;
    top:0;left:0;right:0;
    background:rgba(255,255,255,0.98);
    backdrop-filter: blur(4px);
    box-shadow:0 2px 6px rgba(0,0,0,0.08);
    z-index:40;
}
.nav-wrap{
    max-width:1200px;
    margin:0 auto;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:14px var(--padding-lg);
}
.logo{font-weight:700;font-size:20px;color:var(--acc1)}

nav{display:flex;align-items:center;gap:14px}
.menu{
    display:flex;
    gap:18px;
    list-style:none;
    align-items:center;
}
.menu > li{position:relative}

/* -- MENU PRINCIPAL -- */

.menu a {
    color: var(--texto);
    text-decoration: none;
    font-weight: 500;
    padding: 6px 0; 
    margin: 0 4px; 
    display: inline-block;
    position: relative; 
    transition: color 0.3s ease; 
}


.menu a::after {
    content: "";
    position: absolute;
    left: 50%; 
    bottom: -6px; 
    width: 0; 
    height: 3px; 
    background-color: var(--acc2); 
    transition: width 0.3s ease, left 0.3s ease; 
}


.menu > li > a.active {
    color: var(--dom); 
}
.menu > li > a.active::after {
    width: 100%; 
    left: 0; 
    background-color: var(--dom); 
}


.menu a:hover {
    color: var(--acc2); 
}

.menu a:hover::after {
    width: 100%; 
    left: 0; 
    background-color: var(--acc2); 
}

.menu > li.has-sub:hover > a::after,
.menu > li.has-sub:focus-within > a::after {
    content: "";
    width: 100%; 
    left: 0; 
    background-color: var(--acc2); 
}


.menu > li.has-sub.active > a { 
    color: var(--dom); 
}
.menu > li.has-sub.active > a::after {
    content: "";
    width: 100%; 
    left: 0; 
    background-color: var(--dom); 
}


.submenu{
    position:absolute;
    top:40px;
    left:0;
    background:#fff;
    border-radius:10px;
    box-shadow:0 8px 20px rgba(0,0,0,0.12);
    min-width:220px; 
    overflow:hidden;
    transform:translateY(-8px);
    opacity:0;
    pointer-events:none;
    transition:all .28s ease;
}


.menu > li:hover .submenu,
.menu > li:focus-within .submenu{
    transform:translateY(0);
    opacity:1;
    pointer-events:auto;
}

.submenu li{
    padding:0; 
    margin:0;
}

.submenu li a{
    display:flex; 
    align-items:center;
    gap:10px;
    padding:10px 14px; 
    color:#222;
    text-decoration:none;
    font-weight:400;
    border-bottom: none; 
    transition: background-color .2s, color .2s;
}


.submenu li a:hover,
.submenu li a:focus,
.submenu li a.active { 
    color: var(--acc1); /* Azul */
    background-color: #f7f7f7; 
    border-bottom: none; 
}


.submenu li a::after {
    content: none !important;
    width: 0 !important;
    height: 0 !important;
}


.submenu .icon {
    font-size: 18px;
    line-height: 1;
}
.icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    margin-right: 6px;
    vertical-align: middle;
}

/* -- BUSCADOR -- */

.search{
    background: #D9D9D9; 
    padding: 12px 6px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.3s ease; 
    padding-left: 15px;
}

.search:hover {
    background: var(--acc2);
}

.search i { 
    color: #0556D2;
    font-size: 16px; 
    /* Transición para un cambio de color suave */
    transition: color 0.3s ease; 
}

.search:hover i {
    color: #0556D2;
}

.search input{
    border: 0;
    background: transparent;
    outline: none;
    width: 140px;
    color: white;
}


.search input::placeholder {
    color: rgba(255, 255, 255, 0.8);
}

/* -- CARRUSEL -- */

#hero{
    margin-top:72px; 
    height:calc(100vh - 72px);
    position:relative;
    overflow:hidden;
}

.hero-text{
    position:absolute;
    z-index:30;
    left:50%;
    top:25%;
    transform:translateX(-50%);
    text-align:center;
    padding:0 var(--padding-lg);
    max-width:1100px;
    color:var(--texto);
}
.hero-text .sub{
    color:var(--acc1);
    letter-spacing:4px;
    margin-bottom:8px;
    font-weight:600
}

.hero-text h1{
    font-size:clamp(28px,5vw,56px);
    line-height:1.02;
    margin:6px 0 10px;
    font-weight:700;color:rgba(17,17,17,0.95)
}

.hero-text p{
    max-width:760px;
    margin:0 auto;
    color:rgba(0,0,0,0.6)
}

.hero-cta{
    margin-top:22px;
    display:flex;
    gap:14px;
    justify-content:center;
    flex-wrap:wrap
}

/* -- BOTONES -- */

.btn{
    padding:12px 20px;
    border-radius:10px;
    text-decoration:none;
    font-weight:700;
}
.btn-primary{
    background:var(--acc2);
    color:#fff;
    box-shadow:0 6px 18px rgba(213,165,227,0.18)
}

.btn-secondary{
    background:#fff;
    border:2px solid rgba(0,0,0,0.08);
    color:#111}

.carrusel{
    position:center;
    height:100%;
    width:100%;

}
.carrusel input[type="radio"]{display:none}
.slides{
    width:100%; 
    height:100%;
    display:flex;
    transition:transform .8s ease;
}
.slide{
    width:100%;
    height:100%;
    flex:0 0 100%;
    position:relative;

}

.slide img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
    filter:contrast(0.9) saturate(1.02);
    transform-origin:center center;
    opacity: 35%;
}

#r1:checked ~ .slides{transform:translateX(0%);}
#r2:checked ~ .slides{transform:translateX(-100%);}
#r3:checked ~ .slides{transform:translateX(-200%);}

.indicators{
    position:absolute;
    left:50%;bottom:28px;
    transform:translateX(-50%);
    display:flex;
    gap:10px;
    z-index:50;
}
.indicators label{
    width:12px;
    height:12px;
    border-radius:50%;
    background:rgba(255,255,255,0.8);
    cursor:pointer;opacity:.6;
    display:inline-block;
    box-shadow:0 2px 6px rgba(0,0,0,0.08);
}
#r1:checked ~ .indicators label[for="r1"],
#r2:checked ~ .indicators label[for="r2"],
#r3:checked ~ .indicators label[for="r3"]{
    background:var(--acc2);opacity:1;
}

.arrows{
    position:absolute;
    top:50%;
    left:0;
    right:0;
    transform:translateY(-50%);
    z-index:50;
    pointer-events:none}

.arrow{
    pointer-events:auto;
    position:absolute;
    background:#E4EFF2;
    border-radius:12px; 
    padding:12px 18px;
    font-size:24px;
    color:#111;
    box-shadow:0 6px 18px rgba(0,0,0,0.12);
    cursor:pointer;
    user-select:none;
    transition:background .2s;
    display:none; 
}

.arrow i {
    color: #0556D2; 
}

.arrow:hover {background: white;}
.arrow.left{left:18px}
.arrow.right{right:18px}

#r1:checked ~ .arrows label[for="r3"].left { display:inline-block; }
#r1:checked ~ .arrows label[for="r2"].right { display:inline-block; }
#r2:checked ~ .arrows label[for="r1"].left { display:inline-block; }
#r2:checked ~ .arrows label[for="r3"].right { display:inline-block; }
#r3:checked ~ .arrows label[for="r2"].left { display:inline-block; }
#r3:checked ~ .arrows label[for="r1"].right { display:inline-block; }


/* -- RESPONSIVE -- */

.hamburger{
    display:none; 
    width:42px;
    height:36px;
    border-radius:8px;
    border:1px solid rgba(0,0,0,0.06);
    background:white;
    align-items:center;
    justify-content:center;
    cursor:pointer;
}

.btn-primary i {
    margin-left: 8px;
}

@media (max-width: 1024px){
    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 35;
        background: #fff;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    }
    
    .hamburger{
        display: flex;
        font-size: 20px;
    }

    .search{
        display: none;
    }

    #menu-checkbox:checked + .hamburger + nav {
        display: block;
    }

    .menu{
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 0;
        gap: 0;
    }

    .menu > li {
        width: 100%;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    .menu > li:last-child {
        border-bottom: none;
    }

    .menu a {
        padding: 12px var(--padding-sm);
        width: 100%;
    }
    
    .submenu {
        position: static;
        opacity: 1;
        transform: none;
        box-shadow: none;
        min-width: unset;
        width: 100%;
        padding-left: var(--padding-sm);
        background: #f7f7f7;
        margin-top: 0;
        border-radius: 0;
    }
    
    .menu > li:hover .submenu,
    .menu > li:focus-within .submenu{
    }
    
    .submenu li a{
        padding: 8px 10px; 
    }
}


@media (max-width:900px){
    .nav-wrap{padding:12px var(--padding-sm)}
    #hero{margin-top:60px;height:calc(100vh - 60px);
    }
}

@media (max-width:700px){
    .hero-text{
        top:18%
    }

    .hero-text h1{
        font-size:clamp(22px,6vw,36px)
    }

    .hero-text p{
        font-size:14px
    }

    .btn{
        padding:10px 14px
    }

    .indicators{
        bottom:18px
    }
}

/* -- ESTILOS CATEGORÍA-- */


.category-page {
    padding-top: 90px; 
    max-width: 1200px;
    margin: 0 auto;
    padding-left: var(--padding-lg);
    padding-right: var(--padding-lg);
    padding-bottom: 40px; 
}

.content-grid-wrap {
    display: flex;
    gap: 30px; 
}

/* -- BARRA LATERAL DE FILTROS -- */

.sidebar-filters {
    flex: 0 0 280px; 
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    height: fit-content; 
    position: sticky; 
    top: 90px; 
}

.content-grid {
    flex-grow: 1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

/* -- Responsive para filtros y contenido -- */
@media (max-width: 900px) {
    .content-grid-wrap {
        flex-direction: column;
        gap: 20px;
    }

    .sidebar-filters {
        flex: 1 1 100%; 
        position: static;
        top: auto;
    }
}

@media (max-width: 600px) {
    .content-grid {
        grid-template-columns: 1fr; /* 1 columna en móvil */
    }
}


/* -- ESTILOS DEL ARTÍCULO -- */


.article-page {
    padding-top: 90px; 
    max-width: 1200px;
    margin: 0 auto;
    padding-left: var(--padding-lg);
    padding-right: var(--padding-lg);
    padding-bottom: 40px; 
}


.article-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px; 
}

@media (max-width: 900px) {
    .article-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}


.similar-articles-section {
    max-width: 1200px;
    margin: 30px auto 60px;
    padding: 0 var(--padding-lg);
}

.similar-cards-wrap {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 900px) {
    .similar-cards-wrap {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 600px) {
    .similar-cards-wrap {
        grid-template-columns: 1fr;
    }
}

/* -- FOOTER -- */

.footer {
    padding-top: 40px;
    background-color: #333; 
    color: white;
}

.footer-wrap {
    max-width: 1200px;
    margin: 0 auto;
    display: flex; 
    flex-wrap: wrap;
}

.footer-col {
    margin-bottom: 25px; 
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 0;
    text-align: center;
    font-size: 14px;
}


