/* ===== RESET E BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f8f9fa;
    color: #333;
    line-height: 1.6;
    font-family: 'Open Sans', sans-serif;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ===== CONTAINER PRINCIPAL ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== CABEÇALHO FIXO ===== */
.header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 18px 0;
    background: transparent;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.header.scrolled {
    background: transparent;
    box-shadow: none;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 50px;
}

/* ===== LOGOTIPO ===== */
.logo {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.logo-img {
    height: 90px;
    width: auto;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.logo-img:hover {
    opacity: 0.8;
}

/* ===== MENU DE NAVEGAÇÃO ===== */
.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    transition: color 0.3s ease;
    padding: 1.25rem 0;
}

.nav-link:hover {
    color: #4da3ff;
}

/* ===== MENU HAMBURGUEIR (MOBILE) ===== */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
    
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: #ffffff;
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* ===== SEÇÃO HERO (CARROSSEL) ===== */
.hero {
    position: relative;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    color: white;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: -1;
}

.carousel-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-text {
    text-align: left;
}

.hero-title {
    text-align: left;
}

/* ===== SEÇÕES DE CONTEÚDO ===== */
.why-choose {
    background-color: #f8f9fa;
    padding: 60px 0;
}

.service-card {
    background-color: rgba(29, 77, 109, 0.3);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(255, 255, 255, 0.082);
    text-align: center;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.about {
    background-color: #ffffff;
    padding: 60px 0;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1.15;
}

.about-image img {
    display: block;
    width: 100%;
    max-width: 560px;
    height: auto;
    margin-left: auto;
}

/* ===== BOTÕES SAIBA MAIS COM FUNDO BRANCO (APENAS OS 3 DO CARDS-GRID) ===== */
/* Ajuste: fundo branco, texto escuro, borda branca */
.cards-grid .service-card .btn.btn-outline {
    color: #1a3a5c               !important;
    background-color: #ffffff    !important;
    border: 2px solid #ffffff    !important;
    font-weight: 600             !important;
    text-decoration: none        !important;
    padding: 0.75rem 1.5rem      !important;
}

/* No hover: fundo azul escuro, texto branco */
.cards-grid .service-card a.btn.btn-outline:hover {
    background-color: #1a3a5c     !important;
    border-color: #1a3a5c         !important;
    color: #ffffff               !important;
}

/* ===== RODAPÉ (ÁREA REDUZIDA) ===== */

/* ===== BOTÕES FLUTUANTES ===== */
.theme-toggle-btn,
.back-to-top-btn {
    position: fixed;
    border-radius: 50%;
    color: white;
    border: 2px solid #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.theme-toggle-btn {
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #1a3a5c;
    font-size: 28px;
    z-index: 9999;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    background-color: #2a4a6c;
}

#themeIcon {
    width: 37px;
    height: 40px;
}

.back-to-top-btn {
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background-color: #1a3a5c;
    font-size: 28px;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
}

.back-to-top-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top-btn:hover {
    transform: translateY(-5px);
    background-color: #2a4a6c;
}

/* ===== MODO ESCURO ===== */
body.dark-mode {
    background-color: #121212;
    color: #e0e0e0;
}

body.dark-mode .header {
    background-color: transparent !important;
    border-bottom: none;
}

body.dark-mode .hero-overlay {
    background: rgba(0, 0, 0, 0.7);
}

body.dark-mode .why-choose {
    background-color: #121212;
}

body.dark-mode .service-card {
    background-color: #1e1e1e;
    border: 1px solid #333;
}

body.dark-mode .about {
    background-color: #1a1a1a;
}

body.dark-mode .about-text h2 {
    color: #8ec5ff;
}

body.dark-mode .about-text p {
    color: #e0e0e0;
}

body.dark-mode .footer {
    background-color: #0f2a44;
}

body.dark-mode .back-to-top-btn {
    background-color: #1a3a5c;
    border-color: #fff;
}

body.dark-mode .theme-toggle-btn {
    background-color: #1a3a5c;
    border-color: #fff;
}

/* ===== RESPONSIVIDADE - TABLET ===== */
@media (max-width: 992px) {
    .hamburger {
        display: flex;
    }

    .header-content {
        padding: 1rem 20px;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 250px;
        background: rgba(27, 65, 102, 0.95);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: right 0.4s ease-in-out;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
        z-index: 1001;
    }

    .nav.active {
        right: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg);
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg);
    }

    .hamburger.active {
        position: fixed;
        top: 18px;
        right: 18px;
        z-index: 1002;
    }

    .about-content {
        flex-direction: column;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .cards-grid {
        grid-template-columns: repeat(2, minmax(280px, 1fr));
    }

    .about-text a {
        display: flex;
        justify-content: center;
        text-decoration: none;
    }

    .cards-grid .service-card:nth-child(3) {
        grid-column: 1 / -1;
        width: min(100%, 420px);
        margin: 0 auto;
    }
}

/* ===== RESPONSIVIDADE - MOBILE ===== */
@media (max-width: 767px) {
    .header-content {
        padding: 1rem 18px;
    }

    .hamburger {
        display: flex;
    }

    .theme-toggle-btn,
    .back-to-top-btn {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }

    .theme-toggle-btn {
        bottom: 15px;
        right: 15px;
    }

    #themeIcon {
        width: 30px;
        height: 33px;
    }

    .back-to-top-btn {
        bottom: 15px;
        left: 15px;
    }

    .about-text a {
        display: flex;
        justify-content: center;
        text-decoration: none;
    }



/* ===== REDUZIR MOVIMENTOS (ACESSIBILIDADE) ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* ===== UTILITÁRIOS DE ACESSIBILIDADE ===== */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

}