/*==================================================
    SolucionaPC
    style.css
    Versión: 1.0
==================================================*/


/*==================================================
    RESET
==================================================*/

*,
*::before,
*::after{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

body{
    min-height:100vh;
}


/*==================================================
    VARIABLES
==================================================*/

:root{

    /* Colores */

    --primary:#0071E3;
    --primary-hover:#005BB5;

    --background:#FFFFFF;
    --background-secondary:#F5F5F7;

    --text:#1D1D1F;
    --text-secondary:#6E6E73;

    --success:#34C759;
    --warning:#FF9F0A;
    --danger:#FF3B30;

    --border:#E5E5E7;

    /* Sombras — varias capas (una ceñida + una difusa), como la
       profundidad real de macOS/iOS en vez de una sombra plana */

    --shadow-small:0 1px 2px rgba(0,0,0,.04), 0 3px 10px rgba(0,0,0,.05);

    --shadow-medium:0 2px 6px rgba(0,0,0,.05), 0 14px 28px rgba(0,0,0,.09);

    --shadow-large:0 6px 14px rgba(0,0,0,.06), 0 26px 48px rgba(0,0,0,.13);

    /* Halo de acento: para hover de tarjetas y botones primarios — un
       azul apenas perceptible en vez de negro puro */

    --shadow-accent:0 6px 14px rgba(0,113,227,.08), 0 26px 44px rgba(0,113,227,.16);

    /* Bordes */

    --radius-small:8px;
    --radius-medium:14px;
    --radius-large:24px;

    /* Transiciones — curva con salida suave, y una variante rápida para
       cambios de color/opacidad que no deben "notarse" animados */

    --transition:.35s cubic-bezier(.16,1,.3,1);
    --transition-fast:.18s ease-out;

    /* Anchura */

    --container:1280px;

}


/*==================================================
    BASE
==================================================*/

body{

    font-family:"Poppins",sans-serif;

    background:var(--background);

    color:var(--text);

    line-height:1.7;

    overflow-x:hidden;

}

img{

    display:block;

    max-width:100%;

}

a{

    text-decoration:none;

    color:inherit;

}

ul{

    list-style:none;

}

button{

    font-family:inherit;

    cursor:pointer;

    border:none;

    transition:var(--transition);

}

input,
textarea,
select{

    font-family:inherit;

    outline:none;

}


/*==================================================
    CONTENEDOR
==================================================*/

.container{

    width:min(92%,var(--container));

    margin:auto;

}


/*==================================================
    TITULOS
==================================================*/

h1{

    font-size:clamp(2.8rem,6vw,4.8rem);

    font-weight:700;

    line-height:1.1;

    letter-spacing:-.03em;

    text-wrap:balance;

    overflow-wrap:break-word;

    word-break:break-word;

}

h2{

    font-size:clamp(2rem,4vw,3rem);

    font-weight:700;

    line-height:1.18;

    letter-spacing:-.02em;

    margin-bottom:1rem;

    text-wrap:balance;

}

h3{

    font-size:1.3rem;

    font-weight:600;

    line-height:1.3;

    letter-spacing:-.01em;

}

p{

    color:var(--text-secondary);

    font-size:1.1rem;

    line-height:1.7;

}


/*==================================================
    SECCIONES
==================================================*/

section{

    padding:100px 0;

}

/*==================================================
    NAVBAR
==================================================*/

header{
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}

.navbar{

    max-width: var(--container);
    margin: auto;

    display: flex;
    justify-content: space-between;
    align-items: center;

    height: 80px;

    padding: 18px 0;

    position: relative;

}

.logo{

    display:flex;
    align-items:center;
    gap:12px;

    font-size:1.4rem;
    font-weight:700;

    color:var(--text);

}

.logo img{

    width:55px;
    height:auto;

}

.nav-links{

    display:flex;
    align-items:center;
    gap:35px;

}

.nav-links a{

    position:relative;

    font-size:.97rem;

    font-weight:500;

    color:var(--text-secondary);

    transition:var(--transition);

}

.nav-links a:hover,
.nav-links a:focus-visible{

    color:var(--primary);

}

.nav-links a:focus-visible{

    outline:2px solid var(--primary);
    outline-offset:4px;
    border-radius:4px;

}

.nav-links a::after{

    content:"";

    position:absolute;

    left:0;
    bottom:-8px;

    width:0;
    height:2px;

    background:var(--primary);

    transition:var(--transition);

}

.nav-links a:hover::after{

    width:100%;

}

.menu-btn{

    display:none;
    align-items:center;
    gap:8px;

    min-width:44px;
    min-height:44px;

    padding:10px 14px;

    background:none;
    border:1px solid var(--border);
    border-radius:12px;

    font-size:1.15rem;
    font-weight:600;
    font-family:inherit;

    color:var(--text);

    cursor:pointer;

    transition:background var(--transition-fast), border-color var(--transition-fast);

}

.menu-btn:hover{

    background:rgba(0,0,0,.05);

}

.menu-btn:focus-visible{

    outline:2px solid var(--primary);
    outline-offset:3px;

}

body.dark-mode .menu-btn:hover{

    background:rgba(255,255,255,.08);

}

.menu-btn-icon{

    display:inline-block;

    font-size:1.4rem;
    line-height:1;

    transition:transform .3s cubic-bezier(.16,1,.3,1);

}

.menu-btn[aria-expanded="true"] .menu-btn-icon{

    transform:rotate(90deg);

}
/*==================================================
    HERO
==================================================*/

.hero{

    position:relative;
    overflow:hidden;

    min-height: 85vh;

    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;

    text-align:center;

    padding:40px 20px;

    background:
    linear-gradient(
    180deg,
    #ffffff 0%,
    #f8f9fb 60%,
    #f5f5f7 100%
    );
}

/* Halo ambiental muy tenue detrás del titular — profundidad sin ruido */
.hero::before{

    content:"";
    position:absolute;
    top:-20%;
    left:50%;
    width:1100px;
    height:700px;
    transform:translateX(-50%);

    background:radial-gradient(closest-side, rgba(0,113,227,.09), rgba(0,113,227,0) 70%);

    pointer-events:none;
}

.hero > *{
    position:relative;
}

.hero h1{

    max-width:900px;

    margin-bottom:20px;

    font-size:clamp(3rem,6vw,4.8rem);

    font-weight:700;

    color:var(--text);

    animation:heroSubeYAparece .7s cubic-bezier(.16,1,.3,1) both;

}

.hero p{

    max-width:700px;

    font-size:1.25rem;

    margin-bottom:50px;

    color:var(--text-secondary);

    animation:heroSubeYAparece .7s cubic-bezier(.16,1,.3,1) .1s both;

}
/*==================================================
    SEARCH BOX
==================================================*/

.search-box{

    width:100%;
    max-width:850px;

    display:flex;

    background:#fff;

    border-radius:18px;

    overflow:hidden;

    box-shadow:var(--shadow-medium);

    border:1px solid var(--border);

    transition:border-color var(--transition-fast), box-shadow var(--transition);

}

.search-box:focus-within{

    border-color:var(--primary);

    box-shadow:var(--shadow-medium), 0 0 0 4px rgba(0,113,227,.12);

}

.search-box input{

    flex:1;

    padding:22px 30px;

    font-size:1.1rem;

    border:none;

}

.search-box input::placeholder{

    color:#9ca3af;

}

.search-box button{

    background:var(--primary);

    color:white;

    padding:0 35px;

    font-size:1rem;

    font-weight:600;

    transition:background var(--transition-fast), transform var(--transition-fast);

}

.search-box button:hover{

    background:var(--primary-hover);

}
/*==================================================
    HERO RESPONSIVE
==================================================*/

@media (max-width:768px){

    .hero{

        min-height:70vh;

    }

    .search-box{

        flex-direction:column;

    }

    .search-box button{

        width:100%;

        padding:20px;

    }

}
/*==================================================
    FOOTER
==================================================*/

footer{

    background:#f5f5f7;

    margin-top:120px;

    padding-top:80px;

}

.footer-top{

    display:flex;

    justify-content:space-between;

    gap:80px;

    padding-bottom:60px;

}

.footer-brand{

    max-width:420px;

}

.footer-brand img{

    width:70px;

    margin-bottom:20px;

}

.footer-brand h3{

    margin-bottom:15px;

}

.footer-links{

    display:flex;

    gap:80px;

}

.footer-links h4{

    margin-bottom:20px;

    font-size:.78rem;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.06em;

    color:var(--text-secondary);

}

.footer-links a{

    display:block;

    width:fit-content;

    margin-bottom:12px;

    color:var(--text-secondary);

    transition:color var(--transition-fast), transform var(--transition-fast);

}

.footer-links a:hover{

    color:var(--primary);

    transform:translateX(3px);

}

.footer-bottom{

    border-top:1px solid var(--border);

    padding:30px 0;

    text-align:center;

}

.theme-toggle{

    width:44px;
    height:44px;

    border-radius:50%;

    background:transparent;

    border:none;

    font-size:1.2rem;

    cursor:pointer;

    transition:.3s;

}

.theme-toggle:hover{

    background:rgba(0,0,0,.06);

}

.theme-toggle:focus-visible,
.logo:focus-visible{

    outline:2px solid var(--primary);
    outline-offset:3px;
    border-radius:8px;

}

body.dark-mode .theme-toggle:hover{

    background:rgba(255,255,255,.08);

}

body.dark-mode header{
    background: rgba(18,18,18,.92);
    border-bottom: 1px solid var(--border);
}
body.dark-mode .categories{
    background:#18181B;
}

body.dark-mode .why{
    background:#121212;
}

:root{
    --surface:#FFFFFF;
    --surface-secondary:#F5F5F7;
}

.categories{
    background:var(--surface-secondary);
}

footer{
    background:var(--surface-secondary);
}

/*==================================================
    TRANSICIONES GLOBALES
==================================================*/

body,
header,
section,
footer,
.category-card,
.why-card,
.article-card,
.search-box,
button,
input,
a{

    transition:
    background-color .35s ease,
    color .35s ease,
    border-color .35s ease,
    box-shadow .35s ease,
    transform .35s ease;

}

.category-card:hover,
.why-card:hover,
.article-card:hover{

    transform:translateY(-10px);

    box-shadow:0 25px 45px rgba(0,0,0,.18);

}

body.dark-mode .category-card:hover,
body.dark-mode .why-card:hover,
body.dark-mode .article-card:hover{

    box-shadow:0 25px 45px rgba(0,0,0,.45);

}

.search-box{
    transition: .3s ease;
}

.search-box:hover{
    box-shadow: 0 18px 35px rgba(0,0,0,.18);
}

.search-box:focus-within{

    box-shadow:0 20px 40px rgba(0,0,0,.18);

    border-color:var(--primary);

}
.nav-actions{

    display:flex;
    align-items:center;
    gap:12px;

}