/* ========================================
   DIRECTORIO INSTITUCIONAL - ESTILOS
   ======================================== */

/* Hero Section */
.directory-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-dark) 100%);
    color: var(--white);
    padding: 60px 20px;
    text-align: center;
}

.directory-hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.directory-hero-content p {
    font-size: 1.1rem;
    opacity: 0.95;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Container */
.directory-container {
    padding: 60px 20px;
    background-color: var(--bg-color);
}

/* Sections */
.directory-section {
    margin-bottom: 80px;
    padding-bottom: 60px;
    border-bottom: 1px solid #e2e8f0;
}

.directory-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.section-header h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

/* Director Card (Jefe de Área) */
.director-card {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
    align-items: center;
    margin-bottom: 50px;
    padding: 30px;
    background-color: var(--bg-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
}

.director-image {
    position: relative;
}

.director-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: var(--border-radius-sm);
    border: 4px solid var(--white);
    box-shadow: var(--shadow-md);
}

.director-info h3 {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.director-name {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 12px;
}

.director-links {
    font-size: 0.95rem;
    line-height: 1.8;
}

.director-links a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.director-links a:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

/* Team Heading */
.team-heading {
    font-size: 1.3rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

/* Grid Variations */
.team-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.team-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.team-grid-5 {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

/* Person Card */
.person-card {
    background-color: var(--white);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    text-align: center;
    border: 1px solid #f1f5f9;
}

.person-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.person-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background-color: var(--bg-light);
}

.person-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.person-card:hover .person-image img {
    transform: scale(1.05);
}

.person-info {
    padding: 15px;
}

.person-title {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    line-height: 1.3;
}

.person-name {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 6px;
}

/* Person Extension */
.person-extension {
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 8px;
}

/* Director Extension */
.director-extension {
    font-size: 0.95rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 8px;
}

/* Other Departments Grid */
.other-departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Simple Department Card */
.simple-dept-card {
    background-color: var(--bg-light);
    padding: 25px;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-sm);
}

.simple-dept-card h3 {
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 20px;
    font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
    .directory-hero-content h1 {
        font-size: 1.8rem;
    }

    .directory-hero-content p {
        font-size: 1rem;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }

    .director-card {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 20px;
    }

    .director-image {
        max-width: 250px;
        margin: 0 auto;
    }

    .team-grid {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 15px;
    }

    .team-grid-2 {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .team-grid-4,
    .team-grid-5 {
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    }

    .person-image {
        height: 130px;
    }

    .other-departments-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 480px) {
    .directory-hero {
        padding: 40px 15px;
    }

    .directory-container {
        padding: 30px 15px;
    }

    .directory-hero-content h1 {
        font-size: 1.5rem;
    }

    .section-header h2 {
        font-size: 1.3rem;
    }

    .director-card {
        padding: 15px;
    }

    .director-image {
        max-width: 100%;
    }

    .team-heading {
        font-size: 1.1rem;
        margin-bottom: 20px;
    }

    .team-grid,
    .team-grid-2,
    .team-grid-4,
    .team-grid-5 {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 12px;
    }

    .person-card {
        border-radius: 8px;
    }

    .person-image {
        height: 120px;
    }

    .person-info {
        padding: 12px;
    }

    .person-title {
        font-size: 0.75rem;
    }

    .person-name {
        font-size: 0.85rem;
    }

    .simple-dept-card {
        padding: 15px;
    }

    .simple-dept-card h3 {
        font-size: 1rem;
    }
}
