@import url('../variables.css');

/* ====================================
   RESET
==================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ====================================
   BASE
==================================== */

body {
    font-family: 'Montserrat', sans-serif;
    background: var(--blanco);
    color: var(--texto);
    line-height: 1.6;
    overflow-x: hidden;
}

main {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* ====================================
   TITULOS
==================================== */

.bg-title {
    background: var(--guinda);
}

/* ====================================
   ORGANIGRAMA
==================================== */

#organigrama {
    background: #fff;
    padding: 4rem 1.5rem;
    text-align: center;
    margin-bottom: 60px;
}

#organigrama h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 10px;
}

#organigrama .line {
    width: 80px;
    height: 4px;
    margin: .75rem auto 3rem;
    background: var(--dorado);
    border-radius: 4px;
}

/* ====================================
   ESTRUCTURA ORGANICA
==================================== */

.tree {
    display:flex;
    flex-direction:column;
    align-items:center;
}

.tree-row {
    display:flex;
    justify-content:center;
    align-items:flex-start;
    gap:1.25rem;
    flex-wrap:wrap;
    margin-bottom:2rem;
}

.tree-block {

    background:#fff;

    border-top:5px solid var(--guinda);

    border-radius:16px;

    padding:.75rem;

    width:280px;

    box-shadow:
        0 4px 12px rgba(
            0,
            0,
            0,
            .12
        );

    transition:
        transform .3s ease,
        box-shadow .3s ease;
}

.tree-block:hover {

    transform:translateY(-4px);

    box-shadow:
        0 8px 20px rgba(
            0,
            0,
            0,
            .16
        );
}

.tree-block img {

    display:block;

    width:100%;

    max-width:250px;

    height:auto;

    margin:0 auto;

    border-radius:12px;

    object-fit:contain;
}

/* ====================================
   APP
==================================== */

#app {
    width: 100%;
    max-width: 1800px;
    margin: 40px auto 0;
}

/* ====================================
   TARJETAS
==================================== */

.card {
    background: #fff;

    border: none;

    border-radius: 10px;

    overflow: hidden;

    margin-bottom: 30px;

    box-shadow:
        0 4px 15px rgba(0,
            0,
            0,
            .08);
}

summary {
    position: relative;

    background: var(--guinda);

    color: #fff;

    cursor: pointer;

    padding: 24px 30px 24px 65px;

    font-size: 1.4rem;
    font-weight: 600;

    letter-spacing: .3px;

    list-style: none;

    transition: background .25s ease;
}

summary::before {

    content: "+";

    position: absolute;

    left: 25px;

    top: 50%;

    transform: translateY(-50%);

    font-size: 1.6rem;
    font-weight: 700;
}

details[open] summary::before {
    content: "−";
}

summary:hover {
    background: #8d1e3a;
}

summary::-webkit-details-marker {
    display: none;
}

.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.4;
}

.section-subtitle {
    margin-top: 6px;
    font-size: .95rem;
    opacity: .9;
}

/* ====================================
   AÑOS
==================================== */

.year-panel {
    background: #fff;

    padding: 30px;

    border-radius: 8px;

    box-shadow:
        0 2px 8px rgba(0,
            0,
            0,
            .05);
}

.year-title {

    position: relative;

    text-align: center;

    font-size: 4rem;
    font-weight: 300;

    letter-spacing: 2px;

    color: #333;

    margin: 35px 0 50px;
}

.year-title::after {

    content: "";

    display: block;

    width: 120px;

    height: 4px;

    margin: 15px auto 0;

    background: var(--dorado);

    border-radius: 10px;
}

/* ====================================
   CATEGORIAS
==================================== */

.session-section {
    margin-bottom: 40px;
}

.session-title {
    font-size: 1.9rem;
    font-weight: 500;

    color: #222;

    margin: 35px 0 15px;

    padding-left: 10px;

    border-left: 5px solid var(--guinda);
}

/* ====================================
   GRID
==================================== */

.session-grid{

    display:grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(250px,1fr)
        );

    gap:0;
}

.session-col {

    background: #f8f9fa;

    min-height: 260px;

    padding: 20px;

    border-right: 1px solid #d0d0d0;

    transition:
        transform .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}

.session-col:hover {

    background: #f2f4f6;

    transform: translateY(-2px);

    box-shadow:
        0 3px 10px rgba(0,
            0,
            0,
            .08);
}

.session-col:last-child {
    border-right: none;
}

.session-col h4 {

    background: #e3e5e7;

    margin: -20px -20px 20px;

    padding: 15px;

    text-align: center;

    font-size: 1.25rem;

    font-weight: 700;

    color: #333;

    border-bottom:
        1px solid #d0d0d0;
}

/* ====================================
   LISTAS
==================================== */

.actas-list {
    margin: 0;
    padding-left: 25px;
}

.actas-list li {
    margin-bottom: 14px;
    line-height: 1.5;
}

.actas-list a {

    color: #0066cc;

    text-decoration: none;

    word-break: break-word;

    overflow-wrap: anywhere;

    transition:
        color .2s ease,
        padding-left .2s ease;
}

.actas-list a::before {

    content: "\f1c1";

    font-family: "Font Awesome 6 Free";

    font-weight: 900;

    margin-right: 8px;
}

.actas-list a:hover {
    color: #004a99;

    padding-left: 4px;

    text-decoration: underline;
}

.section-title {

    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.4;

    word-break: break-word;
}

.actas-list li {

    margin-bottom: 14px;

    line-height: 1.5;

    padding-right: 8px;
}

.empty{

    margin-top:20px;

    text-align:center;

    color:#777;

    font-style:italic;

    font-size:.95rem;
}

/* ====================================
   VACIO
==================================== */

.empty {

    text-align: center;

    color: #777;

    font-style: italic;

    padding: 20px;

    background: #fafafa;

    border-radius: 6px;
}

/* ====================================
   SUBTITULO
==================================== */

.session-subtitle{

    margin:0 0 20px;

    color:#666;

    font-size:1rem;

    line-height:1.5;

    padding-left:15px;
}

/* ====================================
   TABLET
==================================== */

@media(max-width:992px) {

    .year-title {
        font-size: 2.8rem;
    }

    .session-title {
        font-size: 1.5rem;
    }

    .tree-block img {
        max-width: 320px;
    }
}

/* ====================================
   MOVIL
==================================== */

@media(max-width:768px) {

    main {
        padding: 20px 15px;
    }

    #organigrama {
        padding: 3rem 1rem;
    }

    .tree-row {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .tree-block img {
        max-width: 260px;
    }

    .year-title {
        font-size: 2.2rem;
        margin: 25px 0;
    }

    .session-title {
        font-size: 1.3rem;
    }

    .session-grid {
        grid-template-columns: 1fr;
    }

    .session-col {
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid #d0d0d0;
    }

    .session-col:last-child {
        border-bottom: none;
    }

    summary {
        padding: 18px 20px 18px 55px;
    }
}

/* ====================================
   MOVIL PEQUEÑO
==================================== */

@media(max-width:480px) {

    .year-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1rem;
    }

    .session-col {
        padding: 15px;
    }

    #organigrama h2 {
        font-size: 1.5rem;
    }
}

.card[open] .year-panel {
    animation:
        fadeIn .35s ease;
}

@keyframes fadeIn {

    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

@media(max-width:768px) {

    summary::before {
        left: 18px;
        font-size: 1.3rem;
    }

}
