/* =========================
   VARIABLES
========================= */

@import url('../variables.css');


/* =========================
   RESET
========================= */

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

/* =========================
   GENERALES
========================= */

body{
    font-family:'Segoe UI',Tahoma,Geneva,Verdana,sans-serif;
    font-size:var(--fuente-size);
    background:var(--blanco);
    color:var(--texto);
    padding-top:60px;
    overflow-x:hidden;
}

main{
    width:100%;
    max-width:1400px;
    margin:auto;
    padding:30px 20px;
}

/* =========================
   NAVBAR
========================= */

.navbar{
    background:var(--guinda);
    height:60px;
    position:fixed;
    top:0;
    width:100%;
    display:flex;
    align-items:center;
    z-index:1000;
    box-shadow:0 2px 8px rgba(0,0,0,.1);
}

.nav-container{
    width:100%;
    max-width:1400px;
    margin:auto;
    padding:0 20px;
    display:flex;
    align-items:center;
    justify-content:space-between;
}

.nav-left{
    display:flex;
    align-items:center;
    gap:25px;
    flex-grow:1;
}

.nav-menu{
    display:flex;
    gap:20px;
    list-style:none;
}

.nav-link{
    color:#fff;
    text-decoration:none;
    font-weight:500;
    font-size:.85rem;
    position:relative;
    padding:4px 0;
}

.nav-link::after{
    content:"";
    position:absolute;
    bottom:-4px;
    left:0;
    width:0;
    height:3px;
    background:var(--amarillo);
    transition:.3s;
}

.nav-link:hover::after,
.nav-link.active::after{
    width:100%;
}

/* =========================
   HAMBURGUESA
========================= */

.nav-toggle{
    display:none;
    flex-direction:column;
    justify-content:space-between;
    width:25px;
    height:18px;
    border:none;
    background:none;
    cursor:pointer;
    padding:0;
}

.nav-toggle .hamburger,
.nav-toggle .hamburger::before,
.nav-toggle .hamburger::after{
    content:"";
    display:block;
    height:3px;
    background:#fff;
    border-radius:2px;
    transition:.3s;
}

.nav-toggle .hamburger::before{
    transform:translateY(-6px);
}

.nav-toggle .hamburger::after{
    transform:translateY(3px);
}

/* =========================
   PROFILE
========================= */

.profile-card{
    display:grid;
    grid-template-columns:380px 1fr;
    max-width:1250px;
    margin:40px auto;
    background:#fff;
    border-radius:30px;
    box-shadow:var(--sombra);
    overflow:hidden;
    border:1px solid rgba(0,0,0,.03);
}

.profile-sidebar{
    background:var(--fondo-gris);
    padding:50px 35px;
    border-right:1px solid #EDF2F7;
}

.profile-main{
    padding:50px 45px;
}

.sidebar-header{
    text-align:center;
    margin-bottom:35px;
}

.profile-img{
    width:190px;
    height:190px;
    border-radius:24px;
    object-fit:cover;
    margin-bottom:20px;
    box-shadow:0 15px 30px rgba(122,28,46,.15);
    border:5px solid #fff;
}

.status-badge{
    background:var(--dorado);
    color:#fff;
    padding:6px 16px;
    border-radius:50px;
    font-size:.75rem;
    font-weight:700;
}

.titular-nombre{
    font-weight:700;
    font-size:1.5rem;
    margin-top:15px;
    color:var(--texto-principal);
    line-height:1.1;
}

/* =========================
   CONTACTO
========================= */

.contact-section{
    margin-top:40px;
}

.contact-item{
    margin-bottom:25px;
    position:relative;
    padding-left:35px;
}

.contact-item i{
    position:absolute;
    left:0;
    top:0;
    font-style:normal;
    font-size:1.3rem;
}

.contact-label{
    display:block;
    font-weight:900;
    font-size:1.1rem;
    color:#000;
}

.contact-data{
    display:block;
    color:var(--texto-principal);
    text-decoration:none;
    word-break:break-word;
}

/* =========================
   TREEVIEW
========================= */

.section-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:30px;
    padding-bottom:15px;
    border-bottom:2px solid #F1F5F9;
}

.section-header h3{
    color:var(--guinda);
}

.tree-root,
.subtree{
    list-style:none;
    padding:0;
    margin:0;
}

.tree-node{
    margin-bottom:10px;
}

.tree-toggle{
    display:flex;
    align-items:center;
    width:100%;
    padding:16px 24px;
    border:none;
    border-radius:12px;
    cursor:pointer;
    color:#fff;
    text-align:left;
    font-family:'Montserrat',sans-serif;
    font-weight:600;
    transition:.3s;
}

.tree-root > .tree-node > .tree-toggle{
    background:var(--guinda);
}

.subtree .tree-node > .tree-toggle{
    background:#8B1C2E;
}

.subtree .subtree .tree-node > .tree-toggle{
    background:#BC5678;
}

.tree-toggle:hover{
    filter:brightness(1.08);
}

.chevron{
    margin-left:auto;
    width:8px;
    height:8px;
    border-right:3px solid #fff;
    border-bottom:3px solid #fff;
    transform:rotate(45deg);
    transition:.3s;
}

.tree-toggle.active .chevron{
    transform:rotate(-135deg);
}

.subtree{
    max-height:0;
    overflow:hidden;
    opacity:0;
    padding-left:30px;
    border-left:2px dashed var(--dorado);
    margin-left:20px;
    transition:.3s;
}

.tree-toggle.active ~ .subtree{
    max-height:none;
    opacity:1;
    margin-top:12px;
}

.info-box{
    max-height:0;
    overflow:hidden;
    opacity:0;
    background:#FCFCFD;
    margin-left:15px;
    border-left:4px solid var(--dorado);
    transition:.3s;
}

.tree-toggle.active + .info-box{
    max-height:none;
    opacity:1;
    padding:16px 20px;
    margin-top:5px;
}

.info-box img{
    display:block;
    width:100%;
    height:auto;
    margin:auto;
    border-radius:12px;
}

/* =========================
   BUSCADOR
========================= */

.search-container{
    margin-bottom:20px;
}

.search-input{
    width:100%;
    padding:10px 14px;
    border:1px solid #CED4DA;
    border-radius:10px;
    font-size:1rem;
}

.search-input:focus{
    outline:none;
    border-color:var(--guinda);
}

.highlight{
    background:var(--highlight);
    border-radius:4px;
}

/* =========================
   BOTONES
========================= */

.btn-reset{
    background:#fff;
    border:2px solid #EDF2F7;
    padding:8px 18px;
    border-radius:10px;
    cursor:pointer;
    font-weight:700;
}

.btn-reset:hover{
    border-color:var(--guinda);
    color:var(--guinda);
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width:950px){

    .profile-card{
        grid-template-columns:1fr;
    }

    .profile-sidebar,
    .profile-main{
        padding:25px;
    }

    .profile-img{
        width:140px;
        height:140px;
    }

    .info-box img{
        max-width:450px;
    }
}

@media (max-width:768px){

    .nav-toggle{
        display:flex;
    }

    .nav-menu{
        position:absolute;
        top:60px;
        left:-100%;
        width:100%;
        background:var(--guinda);
        flex-direction:column;
        padding:20px;
        gap:15px;
        transition:left .35s ease;
    }

    .nav-menu.active{
        left:0;
    }

    .nav-link{
        display:block;
        width:100%;
        padding:10px 20px;
    }

    .info-box img{
        max-width:100%;
    }
}

@media (max-width:480px){

    .info-box img{
        max-width:100%;
    }
}