/* Estilos específicos para os cards de núcleos com efeito hover */
.nucleos-grid {
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
}

.nucleo-card {
    flex: 1;
    min-width: 280px;
    max-width: 380px;
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
}

/* Estado normal (fechado) - imagem de fundo */
.nucleo-card-front {
    position: relative;
    min-height: 350px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px 25px 35px;
    transition: all 0.3s ease;
    border-radius: 20px;
}

/* Overlay escuro para contraste */
.nucleo-card-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    z-index: 0;
}

.nucleo-card-front > * {
    position: relative;
    z-index: 1;
}

/* Ícone no card fechado */
.nucleo-card-front i {
    font-size: 48px;
    color: #e6c24c;
    margin-bottom: 15px;
    background: rgba(255,255,255,0.9);
    width: 70px;
    height: 70px;
    line-height: 70px;
    text-align: center;
    border-radius: 50%;
}

/* Badge do núcleo no front */
.badge-nucleo-front {
    display: inline-block;
    background: rgba(230, 194, 76, 0.95);
    color: #2b3c6b;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 12px;
    align-self: flex-start;
}

/* Título do card fechado */
.nucleo-card-front h3 {
    font-size: 26px;
    color: #fff;
    font-weight: 800;
    margin-bottom: 8px;
    font-family: 'M PLUS Rounded 1c', sans-serif;
}

.nucleo-card-front p {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    line-height: 1.4;
}

/* Botão visível no card fechado */
.btn-nucleo-card {
    display: inline-block;
    background: #e6c24c;
    color: #2b3c6b;
    padding: 10px 24px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    margin-top: 15px;
    transition: all 0.3s ease;
    text-align: center;
    border: none;
    cursor: pointer;
    font-family: 'M PLUS Rounded 1c', sans-serif;
}

.btn-nucleo-card:hover {
    background: #fff;
    color: #2b3c6b;
    transform: translateY(-2px);
}

/* Conteúdo expandido (aparece no hover) */
.nucleo-card-expanded {
    display: none;
    padding: 35px 25px;
    background: #fff;
}

.nucleo-card-expanded i {
    font-size: 52px;
    color: #e6c24c;
    margin-bottom: 15px;
}

.nucleo-card-expanded .badge-nucleo {
    background: rgba(230, 194, 76, 0.15);
    color: #e6c24c;
    border-radius: 50px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 15px;
}

.nucleo-card-expanded h3 {
    font-size: 24px;
    color: #2b3c6b;
    margin-bottom: 15px;
    font-weight: 800;
}

.nucleo-card-expanded p {
    font-size: 15px;
    line-height: 1.6;
    color: #615e5d;
    margin-bottom: 20px;
}

.btn-outline-custom {
    display: inline-block;
    background: transparent;
    border: 2px solid #e6c24c;
    color: #e6c24c;
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    font-family: 'M PLUS Rounded 1c', sans-serif;
}

.btn-outline-custom:hover {
    background: #e6c24c;
    color: #2b3c6b;
    transform: translateY(-2px);
}

/* Estado do card no hover - EXPANDE */
.nucleo-card:hover {
    flex: 2;
    max-width: 500px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.nucleo-card:hover .nucleo-card-front {
    display: none;
}

.nucleo-card:hover .nucleo-card-expanded {
    display: block;
    animation: fadeInUp 0.4s ease;
}

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

/* Responsividade dos núcleos */
@media (max-width: 992px) {
    .nucleos-grid {
        gap: 20px;
    }
    .nucleo-card {
        min-width: 260px;
    }
    .nucleo-card:hover {
        flex: 1.5;
    }
}

@media (max-width: 768px) {
    .nucleos-grid {
        flex-direction: column;
        align-items: center;
    }
    .nucleo-card {
        width: 100%;
        max-width: 100%;
    }
    .nucleo-card:hover {
        flex: 1;
        max-width: 100%;
    }
    .nucleo-card-front {
        min-height: 300px;
    }
}

/* CTA Section Melhorada */
.cta-section .values-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin: 40px 0 30px;
}

.cta-section .value-item {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 15px 30px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-section .value-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.25);
    border-color: #e6c24c;
}

.cta-section .value-item i {
    font-size: 24px;
    color: #e6c24c;
}

.cta-section .value-item span {
    color: #fff;
    font-weight: 600;
    font-size: 16px;
}

/* Programs Grid */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.program-card {
    background: white;
    border-radius: 20px;
    padding: 40px 25px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    cursor: pointer;
}

.program-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.program-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #e6c24c, #f5d67b);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    transition: all 0.3s ease;
}

.program-icon i {
    font-size: 40px;
    color: #253b70;
}

.program-card:hover .program-icon {
    transform: scale(1.1);
}

.program-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    color: #253b70;
}

.program-card p {
    color: #666;
    font-size: 14px;
}

.program-hover {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    background: #e6c24c;
    color: #253b70;
    padding: 12px;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 600;
}

.program-card:hover .program-hover {
    bottom: 0;
}

.competitive-card {
    background: linear-gradient(135deg, #253b70, #1a2c52);
}

.competitive-card h3,
.competitive-card p {
    color: white;
}

.competitive-card .program-icon {
    background: rgba(255, 255, 255, 0.2);
}

.competitive-card .program-icon i {
    color: #e6c24c;
}

.badge {
    display: inline-block;
    background: #e6c24c;
    color: #253b70;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    margin-top: 15px;
}

/* Galeria de Imagens */
.image-gallery-section {
    padding: 80px 0;
    background: #f8f9fa;
    position: relative;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin: 40px 0;
}

.filter-btn {
    padding: 12px 28px;
    border: none;
    background: white;
    border-radius: 40px;
    font-weight: 600;
    color: #253b70;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    z-index: 3;
}

.filter-btn.active,
.filter-btn:hover {
    background: #e6c24c;
    color: #253b70;
    transform: translateY(-2px);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 0.9;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: -100%;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(37, 59, 112, 0.95));
    padding: 20px;
    transition: all 0.3s ease;
    color: white;
}

.gallery-item:hover .gallery-overlay {
    bottom: 0;
}

.gallery-overlay h4 {
    font-size: 16px;
    margin-bottom: 5px;
    font-weight: 600;
}

.gallery-overlay p {
    font-size: 12px;
    color: #e6c24c;
    margin: 0;
}

.gallery-load-more {
    text-align: center;
    margin-top: 30px;
}

/* Estilos para itens de vídeo na galeria */
.gallery-item.video-item {
    position: relative;
}

.gallery-item.video-item .thumbnail-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-item.video-item .thumbnail-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-item.video-item .play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 2;
}

.gallery-item.video-item .play-overlay i {
    font-size: 60px;
    color: white;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.gallery-item.video-item:hover .play-overlay {
    background: rgba(0, 0, 0, 0.2);
}

.gallery-item.video-item:hover .play-overlay i {
    transform: scale(1.2);
    color: #e6c24c;
}

.gallery-item.video-item .video-badge {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 11px;
    padding: 5px 10px;
    border-radius: 20px;
    z-index: 2;
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    gap: 5px;
}

.gallery-item.video-item .video-badge i {
    font-size: 10px;
}

/* Lightbox Melhorado */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    animation: fadeIn 0.3s ease;
}

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

.lightbox-container {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    margin: auto;
    cursor: default;
}

.lightbox-content {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}

/* Container de vídeo */
.video-container {
    position: relative;
    width: 80vw;
    height: 45vw;
    max-width: 1200px;
    max-height: 675px;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.video-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Botão Close */
.close-lightbox {
    position: absolute;
    top: 20px;
    right: 40px;
    color: #fff;
    font-size: 48px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.3s ease;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    backdrop-filter: blur(5px);
}

.close-lightbox:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.8);
}

/* Botão Tela Cheia */
.fullscreen-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    z-index: 10000;
    transition: all 0.3s ease;
    width: 45px;
    height: 45px;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    backdrop-filter: blur(5px);
    border: none;
}

.fullscreen-btn:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.8);
}

/* Botões de Navegação */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 10000;
}

.lightbox-nav button {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.lightbox-nav button:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

/* Caption do Lightbox */
#lightboxCaption {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    text-align: center;
    color: white;
    padding: 15px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    font-size: 16px;
    margin-top: 10px;
    border-radius: 0 0 8px 8px;
}

/* Responsividade */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .cta-section .values-grid {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-section .value-item {
        width: 100%;
        max-width: 280px;
    }
    
    /* Lightbox responsivo */
    .close-lightbox {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
        font-size: 32px;
    }
    
    .video-container {
        width: 95vw;
        height: 54vw;
    }
    
    .lightbox-nav button {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
    
    #lightboxCaption {
        font-size: 14px;
        padding: 10px;
        bottom: 10px;
    }
    
    .fullscreen-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
        bottom: 10px;
        right: 10px;
    }
    
    /* Vídeos na galeria mobile */
    .gallery-item.video-item .play-overlay i {
        font-size: 40px;
    }
    
    .video-container iframe {
        height: 50vh;
        min-height: 250px;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .video-container {
        width: 85vw;
        height: 48vw;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* Desktop grande */
@media (min-width: 1400px) {
    .video-container {
        width: 70vw;
        height: 39vw;
        max-width: 1400px;
        max-height: 787px;
    }
}

/* Suporte para touch */
@media (hover: none) {
    .gallery-overlay {
        bottom: 0;
        background: linear-gradient(transparent, rgba(37, 59, 112, 0.95));
    }
    
    .gallery-item.video-item .play-overlay {
        background: rgba(0, 0, 0, 0.3);
    }
}

/* Animações adicionais */
@keyframes slideIn {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.gallery-item {
    animation: slideIn 0.5s ease forwards;
}

/* Estilo para o botão de carregar mais */
.theme-btn {
    display: inline-block;
    background: #e6c24c;
    color: #253b70;
    padding: 12px 30px;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 700;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

.theme-btn:hover {
    background: #d4b03a;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}