/* variables */
:root {
    --primary-bg: #FAFAFA;
    --black: #161616;
    --gray-text: #484848;
    --footer-bg: #161616;
    --radius-full: 30px;
    --block-bg: #FFFFFF; 
}

/* base */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { 
    background-color: var(--primary-bg); 
    font-family: 'Plus Jakarta Sans', sans-serif; 
    color: var(--black);
    line-height: 1.8; 
    text-align: center;
    overflow-x: hidden;
}

/* titulos */
h1, h2, h3 {
    font-family: "Plus Jakarta Sans", sans-serif;
    letter-spacing: 0px; 
    font-weight: normal;
}

h1 { font-size: 64px; margin-bottom: 25px; margin-top: 80px; }
h2 { font-size: 48px; margin-bottom: 30px; }

/* sticky nav */
.sticky-nav {
    position: sticky;
    top: 0;
    width: 100%;
    background-color: rgba(250, 250, 250, 0.8); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px);
    padding: 25px 0;
    z-index: 1000;
}

.logo { 
    font-size: 14px; 
    letter-spacing: 2px; 
    text-transform: uppercase; 
    margin-bottom: 0; 
}

/* hero */
.hero { padding: 60px 20px 80px; }
.star-main { 
    width: 197px; height: 197px; margin: 0 auto 60px; display: block; 
    animation: girarEstrella 6s linear infinite;
}
.hero-desc { color: var(--gray-text); margin: 0 auto 60px; font-weight: lighter; font-size: 24px; }

.hero-badges { 
    display: flex; 
    justify-content: center; 
    gap: 20px; 
    font-size: 18px; 
    font-weight: 300; 
    color: var(--gray-text);
}

/* secciones */
.selection-block { padding: 120px 20px; }
.tabs-block { padding: 100px 20px 0; margin-bottom: 80px; } 

/* botones categoria */
.category-grid { display: flex; justify-content: center; gap: 40px; margin-top: 60px; }
.cat-btn {
    background: #E0E0E0; 
    color: var(--black);
    border: none;
    padding: 12px 50px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 32px; 
    font-weight: lighter; 
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: all 0.2s ease;
}
.cat-btn.active { background: var(--black); color: white; opacity: 1; }
.cat-btn:hover:not(.active) { background: #D5D5D5; }

/* segmented control */
.tabs-wrapper { display: flex; justify-content: center; margin-top: 60px; }
.segmented-control {
    display: flex;
    background: var(--block-bg);
    border: 1px solid #E5E5E5; 
    border-radius: 20px;
    padding: 8px;
    min-width: 900px; 
    justify-content: space-around;
    box-shadow: 0 8px 30px rgba(0,0,0,0.05); 
    position: relative;
    z-index: 10;
    margin-bottom: -20px; 
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 16px 20px; 
    border-radius: 14px;
    display: flex;
    flex: 1; 
    align-items: center;
    justify-content: center;
    gap: 12px; 
    cursor: pointer;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 17px; 
    color: var(--black);
    transition: all 0.2s ease;
}

.tab-btn.active { background: #F3F3F3; font-weight: 500; }
.tab-icon { width: 22px; height: 22px; }

.small-text { 
    font-size: 19px; 
    font-weight: 400; 
    color: var(--gray-text); 
    max-width: 100%; 
    margin: 35px auto 40px;
    line-height: 1.6;
    display: block;
}

.finish-desc {
    font-size: 20px; 
    color: var(--gray-text);
    max-width: 900px;
    margin: 0 auto 20px; 
    font-weight: 300;
    line-height: 1.6;
}

.action-instruction {
    font-size: 14px;
    font-weight: 500;
    color: var(--black);
    margin: 40px auto;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    opacity: 0.6;
    line-height: 1.8;
}

/* resultados */
.results-container { 
    background-color: var(--block-bg); 
    padding: 70px 8%; 
    border-radius: 40px;    
    margin: 0 4%;           
    box-shadow: 0 4px 40px rgba(0,0,0,0.02); 
    border: 1px solid #F0F0F0; 
}

.block-header { 
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px; 
    margin-bottom: 20px; 
}

.header-icon-svg { width: 48px; height: 48px; }
.results-title { font-size: 38px; margin: 0; }

/* cards grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.card {
    background: var(--primary-bg); 
    border: 1px solid var(--black);
    border-radius: var(--radius-full);
    padding: 35px 25px;
    display: flex;
    flex-direction: column;
    height: 100%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    background-color: #FFFFFF;
}

/* seleccion por colores */
.card.selected-usabilidad { border-color: #6418EE !important; background-color: #F9F7FF; }
.card.selected-accesibilidad { border-color: #EE18EE !important; background-color: #FFF7FF; }
.card.selected-psicologia { border-color: #184DEE !important; background-color: #F7F9FF; }

.card-icon-svg { width: 24px; height: 24px; margin-bottom: 15px; }

.card h3 { 
    font-size: 17px; 
    margin-bottom: 15px; 
    text-align: left; 
    font-weight: 500; 
    letter-spacing: 0; 
}

.card p { 
    font-size: 16px; 
    color: var(--gray-text); 
    line-height: 1.6; 
    text-align: left; 
}

.card .source-link { 
    margin-top: auto; 
    padding-top: 25px;
    font-size: 15px; 
    font-weight: 600; 
    text-decoration: underline; 
    color: var(--black); 
    display: flex;
    align-items: center;
    gap: 8px;
}

/* audit finish */
.audit-finish { padding: 140px 20px; }

#copy-btn {
    background: var(--black);
    color: white;
    border: none;
    padding: 16px 40px;
    border-radius: var(--radius-full);
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    transition: transform 0.2s ease;
    font-family: 'Plus Jakarta Sans';
    display: inline-block;
    margin-top: 40px; 
}

/* footer */
.main-footer { 
    padding: 50px 20px; 
    background-color: var(--footer-bg); 
    color: #FFFFFF; 
}

.main-footer p { 
    opacity: 0.8; 
    font-weight: 300; 
    line-height: 1.4; 
    margin-bottom: 20px; 
}

.footer-sources, 
.footer-social {
    display: flex;
    flex-direction: column; 
    align-items: center;    
    gap: 12px;             
    margin-bottom: 5px;
}

.footer-sources a, 
.footer-social a { 
    color: #FFFFFF; 
    text-decoration: underline; 
    opacity: 1; 
    display: flex;        
    align-items: center;
    gap: 4px;
}

.social-icon { 
    width: 18px;
    height: 18px;
    filter: invert(1);
    opacity: 0.9;
    display: block;
}

@keyframes girarEstrella {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@media (max-width: 1366px) {
    body { line-height: 1.4; font-size: 14px; }
    h1 { font-size: 32px; margin-top: 40px; width: 100%; padding: 0 5%; }
    .hero-desc { font-size: 20px; width: 100%; padding: 0 5%; margin-bottom: 30px; line-height: 1.8; }
    h2 { font-size: 28px; padding: 0 15px; margin-top: 0; }
    
    .small-text { max-width: 100%; font-size: 16px; line-height: 1.8; }

    .hero-badges { flex-direction: column; align-items: center; gap: 15px; margin-bottom: 0px; }
    .selection-block { padding: 10px 20px 40px; } 
    .category-grid { flex-direction: column; align-items: center; gap: 20px; margin-top: 20px; }
    .cat-btn { font-size: 20px; padding: 12px 30px; width: 100%; max-width: 400px; }
    
    .tabs-block { padding: 20px 20px 0; margin-bottom: 20px; } 
    .block-header { flex-direction: row; justify-content: center; align-items: center; gap: 8px; margin-bottom: 30px; }
    .header-icon-svg { width: 26px; height: 26px; }
    .results-title { font-size: 19px; text-align: left; font-weight: 500; } 
    
    .tabs-wrapper { margin-top: 20px; margin-bottom: 45px; display: flex; justify-content: center; }
    .segmented-control { min-width: 0; width: auto; max-width: 100%; overflow-x: auto; justify-content: flex-start; padding: 8px; gap: 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .segmented-control::-webkit-scrollbar { display: none; }
    
    .tab-btn { flex: 0 0 auto; white-space: nowrap; font-size: 16px; padding: 10px 12px; min-width: 180px; border-radius: 12px; gap: 6px; }
    
    .results-container { padding: 40px 20px; margin: 0 10px; border-radius: 24px; }
    
    .cards-grid { 
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
        gap: 20px;
        justify-content: center;
        justify-items: center;
        width: 100%;
        max-width: 1200px;
        margin: 0 auto;
    }
    
    .card { 
        padding: 35px 25px; 
        display: flex;
        flex-direction: column;
        width: 100%;
    }

    .card .source-link { 
        display: flex;
        align-items: center;
        justify-content: flex-start;
        font-size: 15px;
        white-space: nowrap;
        text-align: left;
        gap: 10px;
        width: 100%;
        margin-top: 20px;
    }

    .card .source-link svg, 
    .card .source-link img { 
        width: 18px; 
        height: 18px; 
        flex-shrink: 0;
        order: -1;
    }

    .audit-finish { padding: 80px 10px; }
    #copy-btn { width: 100%; max-width: 400px; font-size: 18px; padding: 16px 20px; margin: 20px auto 0; display: block; }

    .main-footer { padding: 50px 20px; }
    .footer-sources, .footer-social { display: flex; flex-direction: column; align-items: center; gap: 5px; margin-bottom: 20px; }
    .footer-social a { display: flex; align-items: center; gap: 8px; }
}