/* ==================== ABAS E CORPO DIRETIVO ==================== */

.abas-section {
    padding: 100px 0;
    background: linear-gradient(135deg, #ffffff 0%, rgba(48, 130, 174, 0.03) 50%, #ffffff 100%);
    position: relative;
    overflow: hidden;
    border-top: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
}

.abas-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(48, 130, 174, 0.02) 0%, transparent 100%);
    animation: float 25s ease-in-out infinite;
}

.abas-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    animation: pulse-soft 8s ease-in-out infinite;
}

@keyframes pulse-soft {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.2); opacity: 0.3; }
}

@keyframes float {
    0%, 100% { transform: translateX(0) translateY(0); }
    50% { transform: translateX(20px) translateY(-20px); }
}

.abas-container {
    position: relative;
    z-index: 1;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    animation: slideDown 0.6s ease-out;
}

.section-title h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
    font-weight: 700;
}

.section-title p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* ==================== SISTEMA DE ABAS ==================== */

.tabs-header {
    display: flex;
    gap: 15px;
    margin-bottom: 60px;
    border-bottom: 3px solid #f0f0f0;
    position: relative;
    flex-wrap: wrap;
    justify-content: center;
    padding-bottom: 0;
}

.tab-btn {
    background: linear-gradient(135deg, transparent 0%, rgba(48, 130, 174, 0.02) 100%);
    border: 2px solid transparent;
    border-radius: 12px 12px 0 0;
    padding: 18px 35px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #888;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    box-shadow: 0 -2px 0 rgba(0, 0, 0, 0.03) inset;
    font-family: 'Open Sans', sans-serif;
}

.tab-btn:hover {
    color: var(--primary);
    background: linear-gradient(135deg, rgba(48, 130, 174, 0.08) 0%, rgba(139, 92, 246, 0.04) 100%);
    border-color: rgba(48, 130, 174, 0.2);
    transform: translateY(-3px);
    box-shadow: 
        0 -2px 0 rgba(0, 0, 0, 0.03) inset,
        0 4px 12px rgba(48, 130, 174, 0.15);
}

.tab-btn.active {
    color: white;
    background: linear-gradient(135deg, var(--primary) 0%, #1a4b8c 100%);
    border-color: var(--primary);
    box-shadow: 
        0 8px 25px rgba(48, 130, 174, 0.25),
        0 -2px 0 rgba(0, 0, 0, 0.03) inset;
    transform: translateY(-2px);
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--primary), var(--primary), transparent);
    animation: slideInUnderline 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
}

@keyframes slideInUnderline {
    from {
        width: 0;
        left: 50%;
    }
    to {
        width: 100%;
        left: 0;
    }
}

.tab-icon {
    margin-right: 8px;
    font-size: 1.3rem;
}

/* ==================== CONTEÚDO DAS ABAS ==================== */

.tab-content {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.tab-content.active {
    display: block;
    animation: fadeInTab 0.5s ease;
}

@keyframes fadeInTab {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== GRID DO DIRETÓRIO ==================== */

#diretorio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    margin-bottom: 50px;
    animation: staggerGridAnimation 0.6s ease;
}

.diretor-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(48, 130, 174, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
}

.diretor-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.diretor-card:hover::before {
    left: 100%;
}

.diretor-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(48, 130, 174, 0.25),
        0 0 0 1px rgba(48, 130, 174, 0.2);
    border-color: var(--primary);
}

.diretor-card:nth-child(1) { animation: slideUpCard 0.5s ease 0.1s both; }
.diretor-card:nth-child(2) { animation: slideUpCard 0.5s ease 0.2s both; }
.diretor-card:nth-child(3) { animation: slideUpCard 0.5s ease 0.3s both; }
.diretor-card:nth-child(4) { animation: slideUpCard 0.5s ease 0.4s both; }
.diretor-card:nth-child(5) { animation: slideUpCard 0.5s ease 0.5s both; }
.diretor-card:nth-child(6) { animation: slideUpCard 0.5s ease 0.6s both; }

@keyframes slideUpCard {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.diretor-header {
    position: relative;
    overflow: hidden;
    height: 280px;
    background: linear-gradient(135deg, var(--primary) 0%, #1a4b8c 100%);
}

.diretor-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.diretor-card:hover .diretor-img {
    transform: scale(1.12) rotate(2deg);
}

.diretor-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(48, 130, 174, 0.95), rgba(26, 75, 140, 0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(4px);
}

.diretor-card:hover .diretor-overlay {
    opacity: 1;
}

.btn-ver-detalhes {
    background: white;
    color: var(--primary);
    border: none;
    padding: 13px 28px;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.98rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.3px;
}

.btn-ver-detalhes:hover {
    background: #f8f9fa;
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.btn-ver-detalhes i {
    transition: transform 0.3s ease;
}

.btn-ver-detalhes:hover i {
    transform: scale(1.3);
}

.diretor-body {
    padding: 28px;
    background: white;
}

.diretor-body h3 {
    font-size: 1.35rem;
    color: var(--primary);
    margin-bottom: 8px;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

.diretor-body .cargo {
    font-size: 1rem;
    color: #555;
    margin-bottom: 6px;
    font-weight: 600;
}

.diretor-body .departamento {
    font-size: 0.9rem;
    color: #999;
    margin-bottom: 15px;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 6px;
}

.diretor-body .departamento::before {
    content: '📍';
}

.diretor-contact {
    display: flex;
    gap: 10px;
    padding-top: 16px;
    border-top: 2px solid #f0f0f0;
    margin-top: 16px;
    justify-content: flex-start;
}

.diretor-contact a {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(48, 130, 174, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.1rem;
    text-decoration: none;
    border: 2px solid transparent;
    position: relative;
}

.diretor-contact a:hover {
    background: linear-gradient(135deg, var(--primary) 0%, #1a4b8c 100%);
    color: white;
    transform: translateY(-4px) scale(1.1);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(48, 130, 174, 0.25);
}

.diretor-contact a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
}

/* ==================== MODAL DO DIRETÓRIO ==================== */

.diretor-detail {
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.diretor-detail-header {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #e8e8e8;
    align-items: center;
    flex-wrap: wrap;
}

.diretor-detail-img {
    width: 160px;
    height: 160px;
    border-radius: 16px;
    object-fit: cover;
    border: 4px solid var(--primary);
    box-shadow: 0 8px 25px rgba(48, 130, 174, 0.2);
    flex-shrink: 0;
}

.diretor-detail-info h2 {
    font-size: 2.1rem;
    color: var(--primary);
    margin-bottom: 12px;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.cargo-badge, .dept-badge {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    margin-right: 10px;
    margin-bottom: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.cargo-badge {
    background: linear-gradient(135deg, var(--primary) 0%, #1a4b8c 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(48, 130, 174, 0.2);
}

.dept-badge {
    background: linear-gradient(135deg, #f8f9fa 0%, #f0f0f0 100%);
    color: var(--primary);
    border: 2px solid rgba(48, 130, 174, 0.2);
}

.diretor-detail-body h3 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-top: 30px;
    margin-bottom: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.diretor-detail-body p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 20px;
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-list li {
    padding: 12px 0;
    display: flex;
    align-items: center;
    gap: 15px;
    color: #666;
    font-weight: 500;
}

.contact-list i {
    color: var(--primary);
    font-size: 1.3rem;
    width: 24px;
    transition: all 0.3s ease;
}

.contact-list li:hover i {
    transform: scale(1.2) rotate(10deg);
}

.contact-list a {
    color: var(--primary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    position: relative;
}

.contact-list a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.contact-list a:hover::after {
    width: 100%;
}

.contact-list a:hover {
    color: #1a4b8c;
}

/* ==================== GRID DE INSTALAÇÕES ==================== */

#instalacoes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
    margin-bottom: 50px;
    animation: staggerGridAnimation 0.6s ease;
}

.instalacao-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(48, 130, 174, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
}

.instalacao-card:nth-child(1) { animation: slideUpCard 0.5s ease 0.1s both; }
.instalacao-card:nth-child(2) { animation: slideUpCard 0.5s ease 0.2s both; }
.instalacao-card:nth-child(3) { animation: slideUpCard 0.5s ease 0.3s both; }
.instalacao-card:nth-child(4) { animation: slideUpCard 0.5s ease 0.4s both; }
.instalacao-card:nth-child(5) { animation: slideUpCard 0.5s ease 0.5s both; }
.instalacao-card:nth-child(6) { animation: slideUpCard 0.5s ease 0.6s both; }
.instalacao-card:nth-child(7) { animation: slideUpCard 0.5s ease 0.7s both; }
.instalacao-card:nth-child(8) { animation: slideUpCard 0.5s ease 0.8s both; }

.instalacao-card:hover {
    transform: translateY(-14px) scale(1.02);
    box-shadow: 
        0 20px 40px rgba(48, 130, 174, 0.25),
        0 0 0 1px rgba(48, 130, 174, 0.2);
    border-color: var(--primary);
}

.instalacao-img {
    position: relative;
    height: 260px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.instalacao-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.35);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.instalacao-card:hover .instalacao-img::before {
    background: rgba(48, 130, 174, 0.65);
}

.instalacao-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 2;
}

.instalacao-card:hover .instalacao-overlay {
    opacity: 1;
}

.btn-ver-instalacao {
    background: white;
    color: var(--primary);
    border: none;
    padding: 13px 28px;
    border-radius: 30px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.3px;
}

.btn-ver-instalacao:hover {
    background: linear-gradient(135deg, var(--primary), #1a4b8c);
    color: white;
    transform: scale(1.08);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.categoria-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--primary) 0%, #8b5cf6 100%);
    color: white;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 700;
    z-index: 2;
    box-shadow: 0 4px 15px rgba(48, 130, 174, 0.25);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.instalacao-body {
    padding: 26px;
    background: white;
}

.instalacao-body h3 {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 10px;
    font-weight: 700;
    font-family: 'Playfair Display', serif;
}

.instalacao-body p {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
}

.instalacao-info {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--primary);
    font-weight: 700;
    font-size: 0.9rem;
    padding: 8px 0;
}

.instalacao-info i {
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.instalacao-info:hover i {
    transform: scale(1.3) rotate(-10deg);
}

/* ==================== FILTROS DE INSTALAÇÕES ==================== */

.instalacoes-filters {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 50px;
    padding: 20px;
    background: linear-gradient(135deg, rgba(48, 130, 174, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-radius: 12px;
}

.instalacoes-filter-btn {
    background: white;
    border: 2px solid #e0e0e0;
    padding: 11px 24px;
    border-radius: 28px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.instalacoes-filter-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(48, 130, 174, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(48, 130, 174, 0.15);
}

.instalacoes-filter-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, #1a4b8c 100%);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 8px 25px rgba(48, 130, 174, 0.3);
    transform: translateY(-2px) scale(1.05);
}

/* ==================== MODAL DE INSTALAÇÕES ==================== */

.instalacao-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.instalacao-detail-img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    object-fit: cover;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 4px solid var(--primary);
}

.instalacao-detail-content {
    display: flex;
    flex-direction: column;
}

.instalacao-detail-content h2 {
    font-size: 2.1rem;
    color: var(--primary);
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.categoria-badge-detail {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, #1a4b8c 100%);
    color: white;
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 700;
    width: fit-content;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(48, 130, 174, 0.2);
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.instalacao-detail-content h3 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-top: 25px;
    margin-bottom: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.instalacao-detail-content p {
    color: #666;
    line-height: 1.8;
    margin-bottom: 15px;
    font-weight: 500;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
}

.info-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid var(--primary);
}

.info-item h4 {
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-item p {
    color: #555;
    font-weight: 600;
    margin: 0;
}

.recursos-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.recurso-badge {
    background: linear-gradient(135deg, rgba(48, 130, 174, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 2px solid rgba(48, 130, 174, 0.2);
    color: var(--primary);
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.3px;
}

.recurso-badge:hover {
    background: linear-gradient(135deg, var(--primary) 0%, #1a4b8c 100%);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(48, 130, 174, 0.2);
}

.recurso-badge i {
    color: #28a745;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.recurso-badge:hover i {
    transform: scale(1.4) rotate(15deg);
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .abas-section {
        padding: 50px 0;
    }

    .section-title h2 {
        font-size: 1.8rem;
    }

    .tabs-header {
        flex-direction: column;
        gap: 10px;
    }

    .tab-btn {
        width: 100%;
        text-align: center;
        padding: 12px 15px;
    }

    #diretorio-grid,
    #instalacoes-grid {
        grid-template-columns: 1fr;
    }

    .diretor-detail-header {
        flex-direction: column;
        text-align: center;
    }

    .instalacao-detail {
        grid-template-columns: 1fr;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .instalacoes-filters {
        margin-bottom: 25px;
    }
}

@media (max-width: 480px) {
    .section-title h2 {
        font-size: 1.5rem;
    }

    .tab-btn {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .diretor-card,
    .instalacao-card {
        margin-bottom: 15px;
    }
}

/* ==================== ANIMAÇÕES DE ENTRADA ==================== */

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.diretor-card {
    animation: fadeIn 0.6s ease-out backwards;
}

.diretor-card:nth-child(1) { animation-delay: 0.1s; }
.diretor-card:nth-child(2) { animation-delay: 0.2s; }
.diretor-card:nth-child(3) { animation-delay: 0.3s; }
.diretor-card:nth-child(4) { animation-delay: 0.4s; }
.diretor-card:nth-child(5) { animation-delay: 0.5s; }
.diretor-card:nth-child(6) { animation-delay: 0.6s; }

.instalacao-card {
    animation: fadeIn 0.6s ease-out backwards;
}

.instalacao-card:nth-child(1) { animation-delay: 0.1s; }
.instalacao-card:nth-child(2) { animation-delay: 0.2s; }
.instalacao-card:nth-child(3) { animation-delay: 0.3s; }
.instalacao-card:nth-child(4) { animation-delay: 0.4s; }
.instalacao-card:nth-child(5) { animation-delay: 0.5s; }
.instalacao-card:nth-child(6) { animation-delay: 0.6s; }
