/* ================ GLOBAL STYLES ================ */
@import url('https://fonts.googleapis.com/css2?family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

:root {
    --cor-principal: #FF7B00;
    --cor-branca: white;
    --cor-preta: black;
    --cor-fundo: #012233;
    --cor-Clogo: #373435;
    --light: #ECF0F1;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

.header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
    transform: translateY(-60px);
}

/* Top Navigation Bar */
.mobile-contact-btn {
    display: none;
}

.top-nav {
    background: var(--cor-branca);
    box-shadow: 0 4px 20px rgba(255, 123, 0, 0.15);
    transition: all 0.3s ease;
    border-bottom: 3px solid var(--cor-principal);
}

.top-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    height: 85px;
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-areas: "logo nav contact";
}

.logo {
    height: 45px;
    width: auto;
    transition: transform 0.3s ease;
    grid-area: logo;
    justify-self: start;
}

.logo:hover {
    transform: scale(1.05);
}

.dropdown-arrow {
    font-size: 0.8rem;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--cor-branca);
    min-width: 200px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 1001;
    margin-top: 5px;
    padding: 0.5rem 0;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu a {
    display: block;
    padding: 0.6rem 1rem;
    text-decoration: none;
    color: var(--cor-Clogo);
    font-weight: 400;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.dropdown-menu a:hover {
    color: var(--cor-principal);
}

.contact-btn {
    background: transparent;
    color: var(--cor-principal);
    text-decoration: none;
    padding: 0.5rem 1.5rem;
    border: 2px solid var(--cor-principal);
    border-radius: 5px;
    font-weight: 405;
    transition: all 0.3s ease;
    box-shadow: none;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    grid-area: contact;
    justify-self: end;
}

.contact-btn::before {
    display: none;
}

.contact-btn:hover {
    transform: translateY(-2px);
    transition: 0.5s;
    background: var(--cor-principal);
    color: white;
    transform: none;
    box-shadow: 0 2px 8px rgba(255, 123, 0, 0.3);
}

/* Secondary Navigation Bar */
.secondary-nav {
    background-color: var(--cor-preta);
    color: var(--cor-branca);
    transition: all 0.3s ease;
    position: relative;
}

.secondary-nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
    height: 58px;
    align-items: center;
}

.services-nav {
    display: flex;
    list-style: none;
    gap: 0;
    align-items: stretch;
    width: 100%;
    justify-content: space-evenly;
    height: 100%;
    position: relative;
    z-index: 1;
}

.services-nav li {
    display: flex;
    align-items: stretch;
    position: relative;
    flex: 1;
    transition: all 0.3s ease;
    min-height: 58px;
}

.services-nav li:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 25%;
    bottom: 25%;
    width: 0.5px;
    background: rgba(255, 255, 255, 0.15);
    transition: opacity 0.3s ease;
    z-index: 1;
}

.services-nav li:hover::after,
.services-nav li.active::after,
.services-nav li:hover+li::before {
    opacity: 0;
}

.services-nav li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 25%;
    bottom: 25%;
    width: 0.5px;
    background: rgba(255, 255, 255, 0.15);
    transition: opacity 0.3s ease;
    z-index: 1;
}

.services-nav li:first-child::before {
    display: none;
}

.services-nav li:hover::before,
.services-nav li.active::before {
    opacity: 0;
}

.service-nav-link {
    text-decoration: none;
    color: var(--light);
    font-weight: 410;
    font-size: 0.95rem;
    padding: 0 1.5rem;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    min-height: 58px;
    line-height: 1.2;
    white-space: nowrap;
}

.services-nav li:hover .service-nav-link,
.service-nav-link:hover {
    background: var(--cor-principal);
    color: var(--cor-branca);
    border: none;
    outline: none;
}

.services-nav li.active .service-nav-link {
    background: var(--cor-principal);
    color: var(--cor-branca);
    border: none;
    outline: none;
}

/* Mobile Slide Navigation Controls */
.mobile-nav-controls {
    display: none;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 123, 0, 0.8);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.mobile-nav-controls:hover {
    background: var(--cor-principal);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 123, 0, 0.4);
}

.mobile-nav-controls:active {
    transform: translateY(-50%) scale(0.95);
    background: var(--cor-principal);
}

.nav-prev {
    left: 10px;
}

.nav-next {
    right: 10px;
}

/* Slide indicators */
.slide-indicators {
    display: none;
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    gap: 8px;
}

.slide-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.slide-indicator.active {
    background: var(--cor-principal);
    transform: scale(1.2);
}

/* Demo content */
.demo-content {
    margin-top: 160px;
    padding: 3rem 2rem;
    text-align: center;
    color: white;
    background: linear-gradient(135deg, #012233, #024b6b);
    min-height: 100vh;
}

.demo-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.demo-content p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Estilos para o sistema de busca */
.search-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    grid-area: nav;
}

.search-form {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 400px;
    position: relative;
    transition: all 0.3s ease;
}

.search-input {
    width: 100%;
    padding: 0.6rem 1rem;
    padding-right: 2.5rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 0.9rem;
    outline: none;
    transition: all 0.3s ease;
}

.search-input:focus {
    border-color: #FF7B00;
    box-shadow: 0 0 0 2px rgba(255, 123, 0, 0.2);
}

.search-button {
    position: absolute;
    right: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-icon {
    width: 18px;
    height: 18px;
    fill: #777;
    transition: fill 0.2s ease;
}

.search-input:focus+.search-button .search-icon {
    fill: #FF7B00;
}

/* Mobile Search Toggle - CORREÇÃO */
.mobile-search-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: 0.5rem;
}

.mobile-search-toggle svg {
    width: 20px;
    height: 20px;
    fill: #FF7B00;
}

/* Sugestões de busca */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

/* Mobile Search Toggle - Correção */
.mobile-search-toggle {
    display: none;
    /* Mantém oculto por padrão */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: 0.5rem;
}

.mobile-search-toggle svg {
    width: 20px;
    height: 20px;
    fill: #FF7B00;
}

/* Sugestões de busca */
.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    margin-top: 5px;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.search-suggestion {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}

.search-suggestion:last-child {
    border-bottom: none;
}

.search-suggestion:hover {
    background-color: #f9f9f9;
}

.suggestion-icon {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.suggestion-text {
    flex: 1;
}

.suggestion-title {
    font-weight: 500;
    color: #333;
    margin-bottom: 2px;
}

.suggestion-desc {
    font-size: 0.8rem;
    color: #666;
}

/* Modal de resultados */
.search-results-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: flex-start;
    padding-top: 80px;
}

.search-results-content {
    background: white;
    border-radius: 8px;
    width: 90%;
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
}

.search-results-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.search-results-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.close-results {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #999;
}

.close-results:hover {
    color: #333;
}

.search-results-body {
    padding: 20px;
}

.no-results {
    text-align: center;
    padding: 30px 20px;
}

/* Correção para centralizar o ícone */
.no-results-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 15px;
    width: 80px;
    height: 80px;
    color: #ddd;
}

.no-results-icon svg {
    width: 60px;
    height: 60px;
}

.no-results-title {
    font-size: 1.2rem;
    color: #666;
    margin-bottom: 10px;
}

.no-results-text {
    color: #888;
    margin-bottom: 20px;
}

.suggested-searches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.suggested-search {
    padding: 8px 15px;
    background-color: #f5f5f5;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.suggested-search:hover {
    background-color: #e9e9e9;
}

.results-list {
    list-style: none;
}

.result-item {
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
}

.result-item:last-child {
    border-bottom: none;
}

.result-link {
    display: block;
    text-decoration: none;
    color: #333;
}

.result-title {
    font-weight: 500;
    margin-bottom: 5px;
    color: #FF7B00;
}

.result-desc {
    font-size: 0.9rem;
    color: #666;
}

.result-category {
    display: inline-block;
    font-size: 0.75rem;
    padding: 3px 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    margin-top: 8px;
    color: #666;
}

@media (max-width: 968px) {
    .search-form {
        position: absolute;
        top: 100%;
        right: 2rem;
        width: 280px;
        background: white;
        padding: 0.5rem;
        border-radius: 5px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.3s ease;
    }

    .search-form.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .search-suggestions {
        width: 280px;
        right: 0;
        left: auto;
    }

    /* Mostrar o botão de toggle apenas em mobile */
    .mobile-search-toggle {
        display: block;
    }
}

@media (max-width: 480px) {
    .search-form {
        right: 1rem;
        width: 250px;
    }

    .search-suggestions {
        width: 250px;
    }
}

/* Responsive Design */
@media (max-width: 1200px) {
    .service-nav-link {
        font-size: 0.85rem;
        padding: 0 1rem;
    }

    .top-nav-container,
    .secondary-nav-container {
        padding: 0 1rem;
    }
}

@media (max-width: 968px) {
    .contact-btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    /* Ativando slide navigation para tablets */
    .secondary-nav {
        position: relative;
        overflow: hidden;
        min-height: 58px;
    }

    .secondary-nav-container {
        position: relative;
        padding: 0;
        overflow: hidden;
        height: 58px;
    }

    .services-nav {
        display: flex;
        flex-wrap: nowrap;
        overflow: visible;
        scroll-behavior: smooth;
        transition: transform 0.3s ease;
        width: 100%;
        height: 100%;
    }

    .services-nav li {
        flex: 0 0 50%;
        min-width: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .services-nav li::before,
    .services-nav li::after {
        display: none;
    }

    .service-nav-link {
        font-size: 0.85rem;
        padding: 0 1rem;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        color: var(--light);
        background: transparent;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        line-height: 1.2;
        white-space: nowrap;
    }

    .mobile-nav-controls {
        display: block;
    }

    .slide-indicators {
        display: flex;
    }
}

@media (max-width: 768px) {
    .top-nav-container {
        height: 70px;
        padding: 0 1rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .logo {
        height: 40px;
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        margin: 0;
        padding: 0;
        background: rgba(255, 123, 0, 0.05);
        border-top: 1px solid rgba(255, 123, 0, 0.1);
    }

    .dropdown-menu a {
        padding: 0.8rem 3rem;
        font-size: 0.9rem;
    }

    .contact-btn:not(.mobile-contact-btn) {
        display: none;
    }

    .mobile-contact-btn {
        margin: 1rem 2rem;
        display: inline-block;
        text-align: center;
        padding: 0.8rem 1.5rem;
        background: transparent;
        color: var(--cor-principal);
        text-decoration: none;
        border: 2px solid var(--cor-principal);
        border-radius: 5px;
        font-weight: 405;
        transition: all 0.3s ease;
        text-transform: uppercase;
        width: calc(100% - 4rem);
    }

    .mobile-contact-btn:hover {
        background: var(--cor-principal);
        color: white;
        box-shadow: 0 2px 8px rgba(255, 123, 0, 0.3);
    }

    /* Enhanced mobile slide navigation */
    .secondary-nav-container {
        position: relative;
        padding: 0;
        overflow: hidden;
        min-height: 58px;
    }

    .services-nav {
        display: flex;
        flex-wrap: nowrap;
        overflow: visible;
        scroll-behavior: smooth;
        transition: transform 0.3s ease;
        width: 100%;
        height: 58px;
    }

    .services-nav li {
        flex: 0 0 100%;
        min-width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .service-nav-link {
        border-right: none;
        border-bottom: none;
        font-size: 0.9rem;
        padding: 1rem;
        color: var(--light);
        background: transparent;
        width: 100%;
        height: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        white-space: normal;
        line-height: 1.3;
    }

    .demo-content {
        margin-top: 130px;
    }
}

@media (max-width: 480px) {
    .top-nav-container {
        height: 65px;
        padding: 0 0.8rem;
    }

    .logo {
        height: 35px;
    }

    .dropdown-menu a {
        padding: 0.7rem 2.5rem;
        font-size: 0.85rem;
    }

    .mobile-contact-btn {
        margin: 0.8rem 1.5rem;
        padding: 0.7rem 1.2rem;
        font-size: 0.85rem;
        width: calc(100% - 3rem);
    }

    .demo-content {
        margin-top: 185px;
        padding: 2rem 1rem;
    }

    .demo-content h1 {
        font-size: 2rem;
    }

    .demo-content p {
        font-size: 1rem;
    }
}