/**
 * Custom CSS for NISP Theme
 *
 * @package NISP_Theme
 * @since 1.0.0
 */

/*--------------------------------------------------------------
# Header
--------------------------------------------------------------*/
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bg-black {
    background-color: var(--color-black) !important;
}

/* Layout do header: Logo (esquerda) | Menu (centro) | Lupa (direita) */
.navbar-content-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    position: relative;
}

.site-branding {
    order: 1;
    z-index: 10;
    display: flex;
    align-items: center;
}

.navbar-collapse {
    order: 2;
    flex-grow: 0;
}

.header-search {
    order: 3;
    z-index: 10;
    display: flex;
    align-items: center;
}

/* Desktop: Menu centralizado */
@media (min-width: 992px) {
    .navbar-collapse {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
    }

    .navbar-nav {
        flex-direction: row;
    }
}

/* Mobile: Layout padrão */
@media (max-width: 991px) {
    .navbar-content-wrapper {
        flex-wrap: wrap;
    }

    .navbar-collapse {
        order: 4;
        width: 100%;
        margin-top: 1rem;
    }
}

.nisp-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 24px;
    letter-spacing: 2px;
}

.site-logo {
    max-height: 50px;
    width: auto;
    display: block;
    transition: opacity 0.3s ease;
}

.site-logo:hover {
    opacity: 0.8;
}

/* Ajuste para custom logo do WordPress Customizer */
.custom-logo {
    max-height: 50px;
    width: auto;
    display: block;
}

.navbar-nav .nav-link {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 14px;
    text-transform: uppercase;
    padding: 0.5rem 1rem !important;
    color: #ffffff !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: var(--color-tertiary) !important;
}

/* Dropdown Menu */
.navbar-nav .dropdown-toggle::after {
    display: none; /* Remove seta padrão do Bootstrap */
}

/* Ícone chevron no item pai */
.navbar-nav > .dropdown > a .bi-chevron-down {
    font-size: 0.75rem;
    margin-left: 0.25rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

.navbar-nav > .dropdown.show > a .bi-chevron-down {
    transform: rotate(180deg);
}

.navbar-nav .dropdown-menu {
    background-color: rgba(0, 0, 0, 0.95);
    border: none;
    border-radius: 0;
    margin-top: 0;
    padding: 0.5rem 0;
    min-width: 220px;
    box-shadow: none;
    /* Animação fade + slide */
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    display: block;
    visibility: hidden;
}

.navbar-nav .dropdown-menu.show {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

.navbar-nav .dropdown-item {
    font-family: var(--font-body);
    font-size: 13px;
    color: #ffffff;
    padding: 0.5rem 1.5rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.navbar-nav .dropdown-item:hover,
.navbar-nav .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-tertiary);
}

/* Mobile: Subitens sempre visíveis */
@media (max-width: 991px) {
    .navbar-nav .dropdown-menu {
        opacity: 1 !important;
        transform: translateY(0) !important;
        visibility: visible !important;
        display: block !important;
        position: static !important;
        background-color: transparent !important;
        padding: 0 0 0 1rem !important;
        margin: 0 !important;
        min-width: auto !important;
    }

    .navbar-nav .dropdown-item {
        padding: 0.5rem 1rem;
    }

    /* Esconde ícone chevron no mobile */
    .navbar-nav > .dropdown > a .bi-chevron-down {
        display: none;
    }
}

/* Hover behavior for desktop - será controlado via JS */
@media (min-width: 992px) {
    .navbar-nav .dropdown:hover .dropdown-menu {
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
    }
}

/*--------------------------------------------------------------
# Search Overlay - Full Screen
--------------------------------------------------------------*/
.search-overlay-modal .modal-content {
    background-color: rgba(0, 0, 0, 0.97);
    border: none;
    border-radius: 0;
}

.search-overlay-close {
    position: absolute;
    top: 2rem;
    right: 2rem;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 2rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1100;
    border-radius: 50%;
}

.search-overlay-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-primary);
    transform: rotate(90deg);
}

.search-overlay-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.search-overlay-inner {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.search-overlay-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 2rem;
    animation: fadeInDown 0.6s ease;
}

.search-overlay-hint {
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

/* Search Form Overlay */
.search-form-overlay {
    animation: fadeInUp 0.7s ease;
}

.search-form-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    transition: all 0.3s ease;
}

.search-form-wrapper:focus-within {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: var(--color-primary);
    box-shadow: 0 0 30px rgba(236, 102, 8, 0.3);
}

.search-form-icon {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-right: 1rem;
}

.search-form-input {
    flex: 1;
    background: transparent;
    border: none;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 1.25rem;
    padding: 1rem 0;
    outline: none;
}

.search-form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-form-submit {
    background: transparent;
    border: none;
    color: var(--color-primary);
    font-size: 2rem;
    padding: 0;
    margin-left: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-form-submit:hover {
    color: var(--color-tertiary);
    transform: scale(1.1);
}

/* Animações */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Responsivo */
@media (max-width: 768px) {
    .search-overlay-title {
        font-size: 1.75rem;
    }

    .search-form-input {
        font-size: 1rem;
    }

    .search-overlay-close {
        top: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

/*--------------------------------------------------------------
# Hero Carousel
--------------------------------------------------------------*/
.hero-section {
    height: 600px;
    overflow: hidden;
}

.hero-swiper {
    width: 100%;
    height: 100%;
}

.hero-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(236, 102, 8, 0.7);
}

.hero-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    text-align: center;
}

.hero-logo-banner {
    max-width: 600px;
    width: 100%;
}

.hero-banner-image {
    width: 100%;
    height: auto;
    display: block;
}

.hero-cta {
    margin-top: 1rem;
}

.hero-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 16px 40px;
    gap: 10px;
    background: transparent;
    border: 2px solid #FFFFFF;
    border-radius: 50px;
    color: #FFFFFF;
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
}

.hero-btn:hover {
    background-color: #FFFFFF;
    color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.swiper-button-next,
.swiper-button-prev {
    color: #ffffff;
}

.swiper-pagination-bullet {
    background: #ffffff;
}

.swiper-pagination-bullet-active {
    background: var(--color-tertiary);
}

@media (max-width: 768px) {
    .hero-section {
        height: 400px;
    }

    .hero-logo-banner {
        max-width: 90%;
    }

    .hero-btn {
        padding: 12px 30px;
        font-size: 0.875rem;
    }
}

/*--------------------------------------------------------------
# Info Cards
--------------------------------------------------------------*/
.info-cards-section {
    margin-top: 3rem;
    position: relative;
}

/* Link wrapper */
.info-card-link {
    display: block;
    color: inherit;
}

.info-card-link:hover {
    color: inherit;
}

/* Media Object */
.info-card-media {
    transition: transform 0.3s ease;
    cursor: pointer;
    padding: 1rem 0;
}

.info-card-link:hover .info-card-media,
.info-card-media:hover {
    transform: translateY(-5px);
}

/* Indicador visual de clicável */
.info-card-link:hover .info-card-title {
    color: var(--color-primary);
}

.info-card-icon img {
    width: 48px;
    height: 48px;
    display: block;
}

/* Título - Especificações do Figma */
.info-card-title {
    font-family: 'Zalando Sans', var(--font-heading);
    font-style: normal;
    font-weight: 600;
    font-size: 20px;
    line-height: 24px;
    color: var(--color-black);
    margin-bottom: 0.1rem;
    transition: color 0.3s ease;
}

/* Subtítulo - Especificações do Figma */
.info-card-description {
    font-family: 'Open Sans', var(--font-body);
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 22px;
    color: var(--color-black);
}

/* Responsivo */
@media (max-width: 768px) {
    .info-cards-section {
        margin-top: 2rem;
    }

    .info-card-media {
        padding: 1.5rem 0;
    }
}

/*--------------------------------------------------------------
# Recent Posts
--------------------------------------------------------------*/
.section-title {
    font-family: var(--font-heading);
    font-weight: 800;
    color: var(--color-black);
    margin-bottom: 1rem;
}

/* Featured Post (Destaque) */
.featured-post {
    display: block;
}

.featured-post-thumbnail img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

.featured-post-title {
    font-family: 'Zalando Sans', var(--font-heading);
    font-style: normal;
    font-weight: 600;
    font-size: 20px;
    line-height: 24px;
    margin-bottom: 1rem;
}

.featured-post-title a {
    color: var(--color-black);
    text-decoration: none;
    transition: color 0.3s ease;
}

.featured-post-title a:hover {
    color: var(--color-primary);
}

/* Badges NISP */
.badge-nisp {
    display: inline-block;
    padding: 6px 12px;
    font-family: 'Open Sans', var(--font-body);
    font-size: 14px;
    font-weight: 400;
    color: #54BBAB;
    border: 1px solid #54BBAB;
    border-radius: 8px;
    background-color: transparent;
    transition: all 0.3s ease;
}

.badge-nisp:hover {
    background-color: #54BBAB;
    color: #ffffff;
}

/* Recent Posts List (Media Object) */
.recent-posts-list {
    display: flex;
    flex-direction: column;
    /*gap: 1.5rem;*/
}

.recent-post-item {
    display: flex;
    align-items: flex-start;
    transition: transform 0.3s ease;
}

.recent-post-item:hover {
    transform: translateX(5px);
}

.recent-post-thumbnail {
    flex-shrink: 0;
}

.recent-post-thumbnail img {
    width: 80px;
    height: 80px;
    border-radius: 10px;
    object-fit: cover;
}

.recent-post-content {
    flex-grow: 1;
}

.recent-post-title {
    font-family: 'Zalando Sans', var(--font-heading);
    font-style: normal;
    font-weight: 600;
    font-size: 20px;
    line-height: 24px;
    margin-bottom: 0;
}

.recent-post-title a {
    color: var(--color-black);
    text-decoration: none;
    transition: color 0.3s ease;
}

.recent-post-title a:hover {
    color: var(--color-primary);
}

/*--------------------------------------------------------------
# Statistics
--------------------------------------------------------------*/
.statistics-section {
    background-color: var(--color-primary);
    padding-top: 5rem;
    padding-bottom: 5rem;
}

.statistics-icon {
    display: inline-block;
}

.statistics-icon img {
    width: 64px;
    height: 64px;
    filter: brightness(0) invert(1); /* Torna o ícone branco */
}

.statistics-title {
    font-family: 'Zalando Sans', var(--font-heading);
    font-style: normal;
    font-weight: 800;
    font-size: 40px;
    line-height: 49px;
    text-align: center;
    color: #FFFFFF;
    margin: 0;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-family: 'Zalando Sans', var(--font-heading);
    font-style: normal;
    font-weight: 800;
    font-size: 40px;
    line-height: 49px;
    color: #FFFFFF;
    margin-bottom: 1rem;
}

.stat-label {
    font-family: 'Open Sans', var(--font-body);
    font-style: normal;
    font-weight: 400;
    font-size: 18px;
    line-height: 25px;
    color: #FFFFFF;
    margin-bottom: 0.25rem;
}

.stat-period {
    font-family: 'Open Sans', var(--font-body);
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.25rem;
}

/* Responsive */
@media (max-width: 768px) {
    .statistics-section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .statistics-title {
        font-size: 28px;
        line-height: 35px;
    }

    .stat-number {
        font-size: 32px;
        line-height: 40px;
    }

    .stat-label {
        font-size: 16px;
        line-height: 22px;
    }

    .stat-period {
        font-size: 12px;
        line-height: 18px;
    }
}

/*--------------------------------------------------------------
# Projects
--------------------------------------------------------------*/
.projects-section {
    background-color: #ffffff;
}

/* Badge "Conheça nossos projetos" (não clicável) */
.projects-badge {
    display: inline-flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 16px 24px;
    gap: 10px;
    background: #54BBAB;
    border-radius: 16px;
    font-family: 'Open Sans', var(--font-body);
    font-style: normal;
    font-weight: 800;
    font-size: 1.75rem;
    color: #FFFFFF;
    cursor: default;
}

/* Project Card */
.project-card {
    display: block;
    transition: transform 0.3s ease;
}

.project-link {
    text-decoration: none;
    display: block;
}

.project-card:hover {
    transform: translateY(-5px);
}

/* Project Image */
.project-image {
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    transition: transform 0.3s ease;
}

.project-link:hover .project-image img {
    transform: scale(1.05);
}

/* Project Placeholder (se não houver imagem) */
.project-placeholder {
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #f5f5f5;
    border: 2px dashed var(--color-tertiary);
}

/* Project Title */
.project-title {
    font-family: 'Zalando Sans', var(--font-heading);
    font-style: normal;
    font-weight: 800;
    font-size: 20px;
    line-height: 24px;
    text-align: center;
    color: #000000;
    margin: 0;
    transition: color 0.3s ease;
}

.project-link:hover .project-title {
    color: var(--color-primary);
}

/* Responsive */
@media (max-width: 768px) {
    .projects-badge {
        font-size: 14px;
        padding: 12px 20px;
    }

    .project-title {
        font-size: 18px;
        line-height: 22px;
    }
}

/*--------------------------------------------------------------
# Team Section
--------------------------------------------------------------*/
.section-divider {
    border: none;
}

/*--------------------------------------------------------------
# Footer
--------------------------------------------------------------*/
.site-footer {
    margin-top: 0;
}

/* Primeira linha - Fundo preto */
.footer-main {
    background-color: var(--color-black);
}

.footer-title {
    font-family: 'Zalando Sans', var(--font-heading);
    font-style: normal;
    font-weight: 600;
    font-size: 20px;
    line-height: 24px;
    color: #FFFFFF;
    margin-bottom: 1rem;
}

.footer-email {
    font-family: 'Open Sans', var(--font-body);
    font-style: normal;
    font-weight: 400;
    font-size: 16px;
    line-height: 22px;
    margin-bottom: 0;
}

.footer-email a {
    color: #FFFFFF;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-email a:hover {
    color: var(--color-tertiary);
}

/* Redes Sociais */
.social-icons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
}

.social-icons a {
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.social-icons a:hover {
    transform: translateY(-3px);
    opacity: 0.8;
}

.social-icons img {
    width: 24px;
    height: 24px;
}

/* Segunda linha - Fundo laranja */
.footer-copyright {
    background-color: var(--color-primary);
}

.footer-copyright p {
    font-family: 'Open Sans', var(--font-body);
    font-size: 14px;
    font-weight: 400;
    color: #FFFFFF;
}

/* Botão flutuante "Voltar ao topo" */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--color-primary);
    color: #FFFFFF;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 999;
}

.scroll-to-top:hover {
    background-color: var(--color-secondary);
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

.scroll-to-top.show {
    display: flex;
}

/* Responsive */
@media (max-width: 768px) {
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 20px;
    }

    .footer-title {
        font-size: 18px;
        line-height: 22px;
    }

    .footer-email {
        font-size: 14px;
        line-height: 20px;
    }

    .social-icons {
        justify-content: flex-start;
        margin-top: 1rem;
    }
}

@media (min-width: 769px) {
    .social-icons {
        align-items: flex-start;
        justify-content: center;
        height: 100%;
    }
}

/*--------------------------------------------------------------
# Team Section (Nossa Equipe)
--------------------------------------------------------------*/
.team-section {
    background-color: #FFFFFF;
    padding-top: 5rem;
    padding-bottom: 5rem;
}

/* Header */
.team-icon {
    display: inline-block;
}

.team-icon img {
    width: 64px;
    height: 64px;
}

.team-title {
    font-family: 'Zalando Sans', var(--font-heading);
    font-style: normal;
    font-weight: 800;
    font-size: 40px;
    line-height: 49px;
    text-align: center;
    color: var(--color-black);
    margin: 0;
}

/* Category Section */
.team-category-section {
    margin-bottom: 4rem;
}

.team-divider {
    border: 0;
    border-top: 2px solid #000000;
    margin: 0 0 2rem 0;
    opacity: 1;
}

.team-category-title {
    font-family: 'Anybody', 'Zalando Sans', var(--font-heading);
    font-style: normal;
    font-weight: 800;
    font-size: 40px;
    line-height: 49px;
    font-stretch: expanded;
    color: #000000;
    margin-bottom: 0.25rem;
    text-align: left;
}

.team-category-subtitle {
    font-family: 'Zalando Sans', var(--font-heading);
    font-style: normal;
    font-weight: 600;
    font-size: 20px;
    line-height: 24px;
    color: #000000;
    margin-bottom: 1rem;
    text-align: left;
}

/* Team Member Card */
.team-member {
    text-align: center;
}

.team-member-photo {
    width: 146px;
    height: 146px;
    border-radius: 20px;
    overflow: hidden;
    margin: 0 auto 1rem auto;
    background-color: var(--color-gray-light);
}

.team-member-photo img {
    width: 146px;
    height: 146px;
    object-fit: cover;
}

.team-member-photo-placeholder {
    width: 146px;
    height: 146px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-tertiary-light);
}

.team-member-photo-placeholder span {
    font-family: 'Zalando Sans', var(--font-heading);
    font-size: 48px;
    font-weight: 800;
    color: var(--color-tertiary);
}

.team-member-name {
    font-family: 'Zalando Sans', var(--font-heading);
    font-style: normal;
    font-weight: 600;
    font-size: 18px;
    line-height: 22px;
    text-align: center;
    color: var(--color-black);
    margin-bottom: 0.5rem;
}

.team-member-lattes {
    font-family: 'Open Sans', var(--font-body);
    font-style: normal;
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    color: var(--color-tertiary);
    text-decoration: none;
    display: inline-block;
}

.team-member-lattes:hover {
    color: var(--color-tertiary);
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    .team-section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    .team-title {
        font-size: 28px;
        line-height: 35px;
    }

    .team-category-title {
        font-size: 24px;
        line-height: 30px;
    }

    .team-category-subtitle {
        font-size: 14px;
        line-height: 20px;
    }

    .team-member-name {
        font-size: 16px;
        line-height: 20px;
    }

    .team-member-lattes {
        font-size: 12px;
        line-height: 18px;
    }
}

/*--------------------------------------------------------------
# Utilities
--------------------------------------------------------------*/
.bg-primary {
    background-color: var(--color-primary) !important;
}

.text-primary {
    color: var(--color-primary) !important;
}

.text-tertiary {
    color: var(--color-tertiary) !important;
}

.bg-light {
    background-color: var(--color-gray-light) !important;
}

/*--------------------------------------------------------------
# Responsive
--------------------------------------------------------------*/
@media (max-width: 991px) {
    .navbar-collapse {
        background-color: var(--color-black);
        padding: 1rem;
        margin-top: 1rem;
    }
}
