:root {
    --primary-color: #FF0000;
    --secondary-color: #000000;
    --light-bg: #FFFFFF;
    --dark-bg: #1a1a1a;
    --text-light: #FFFFFF;
    --text-dark: #333333;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --red-50: #fef2f2;
    --red-600: #dc2626;
    --red-700: #b91c1c;
    --red-800: #991b1b;
    --red-900: #741515;
    --green-600: #16a34a;
    --green-700: #15803d;
    --logo-jr-50: #f8f0d9;
    --logo-jr-300: #ffd95b;
    --logo-jr-400: #f6d158;
    --logo-jr-600: #DBB744;
    --logo-jr-700:#c9a736;
    --logo-jr-800:#a0852a;
    --telegram-800: rgb(0, 114, 168);
    --telegram-600: rgb(0, 140, 205);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--light-bg);
    transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
    background-color: var(--dark-bg);
    color: var(--text-light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

section.section[id] {
    scroll-margin-top: 6rem; /* <<-- REAJUSTE ESTE VALOR PARA O DESKTOP */
}

/* Aplica a todas as seções que são usadas como âncora */
section.section {
    /* Esta propriedade cria um novo Block Formatting Context,
       impedindo que a margem do primeiro filho "vaze" para fora. */
    overflow: hidden; 
}

/* Header Styles */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

body.dark-mode header {
    background-color: rgba(17, 24, 39, 0.95);
}

header.scrolled {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    background-color: var(--light-bg);
}

body.dark-mode header.scrolled {
    background-color: var(--gray-900);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
}

/* Estilo para o logo em SVG */
.logo-svg {
    height: 3rem; /* Define a altura desejada */
    width: auto;  /* A largura se ajustará automaticamente */
}

.logo img {
    height: 3rem;
    width: auto;
}

body.dark-mode .logo img {
    filter: brightness(0) invert(1);
}

/* Estilo base do logo SVG */
.logo-svg {
    height: 5rem;
    width: auto;
}

/* Define as cores para o tema claro (padrão) */
.logo-svg .logo-main-part {
    fill: #000000; /* Preto */
}
.logo-svg .logo-r {
    fill: var(--logo-jr-600); /* Dourado */
}

/* Altera as cores APENAS da parte principal no tema escuro */
body.dark-mode .logo-svg .logo-main-part {
    fill: var(--text-light); /* Branco */
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 400;
    transition: color 0.3s ease;
}

body.dark-mode .nav-link {
    color: var(--text-light);
}

body.dark-mode .nav-link:hover,
.nav-link:hover {
    color: var(--logo-jr-600);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
    font-size: 1.25rem;
}

.theme-toggle:hover {
    background-color: var(--gray-200);
}

body.dark-mode .theme-toggle:hover {
    background-color: var(--gray-800);
}

.theme-toggle .sun-icon {
    display: none;
}

.theme-toggle .moon-icon {
    display: inline;
}

body.dark-mode .theme-toggle .sun-icon {
    display: inline;
}

body.dark-mode .theme-toggle .moon-icon {
    display: none;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.menu-toggle:hover {
    background-color: var(--gray-200);
}

body.dark-mode .menu-toggle:hover {
    background-color: var(--gray-800);
}

.hamburger {
    display: block;
    width: 25px;
    height: 2px;
    background-color: var(--text-dark);
    position: relative;
    transition: background-color 0.3s ease;
}

body.dark-mode .hamburger {
    background-color: var(--text-light);
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 25px;
    height: 2px;
    background-color: var(--text-dark);
    transition: all 0.3s ease;
}

body.dark-mode .hamburger::before,
body.dark-mode .hamburger::after {
    background-color: var(--text-light);
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    bottom: -8px;
}

.menu-toggle.active .hamburger {
    background-color: transparent;
}

.menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
}

/* Main Content */
main {
    padding-top: 5rem;
}

.section {
    padding: 5rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
}

.section-description {
    font-size: 1.25rem;
    text-align: center;
    color: var(--gray-700);
    max-width: 50rem;
    margin: 0 auto 3rem;
}

body.dark-mode .section-description {
    color: var(--gray-300);
}

/* Seguros Section */
.seguros {
    background: var(--gray-100);
}

body.dark-mode .seguros {
    background: var(--gray-800);
}

.seguros-content {
    text-align: center;
    max-width: 60rem;
    margin: 0 auto;
}

.seguros-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.seguros-subtitle {
    font-size: 1.5rem;
    color: var(--gray-600);
}

body.dark-mode .seguros-subtitle {
    color: var(--gray-300);
}

.seguros-carousel-wrapper {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.seguros-carousel-container {
    position: relative;
    overflow: hidden;
    padding: 2rem 0;
    /* As 3 linhas abaixo foram removidas para dar controle total ao JavaScript */
    /* display: flex; */
    /* justify-content: center; */
    /* align-items: center; */
}

.seguros-carousel-container::before,
.seguros-carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 200px;
    z-index: 10;
    pointer-events: none;
}

.seguros-carousel-container::before {
    left: 0;
    background: linear-gradient(to right, var(--gray-100), transparent);
}

.seguros-carousel-container::after {
    right: 0;
    background: linear-gradient(to left, var(--gray-100), transparent);
}

body.dark-mode .seguros-carousel-container::before {
    background: linear-gradient(to right, var(--gray-800), transparent);
}

body.dark-mode .seguros-carousel-container::after {
    background: linear-gradient(to left, var(--gray-800), transparent);
}

.seguros-carousel {
    display: flex;
    gap: 2rem;
    will-change: transform;
}

.seguro-card {
    position: relative;
    width: 500px;
    height: 500px;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--gray-200), var(--gray-100));
}

body.dark-mode .seguro-card {
    background: linear-gradient(135deg, var(--gray-800), var(--gray-700));
}

.seguro-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.seguro-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: var(--text-light);
}

.seguro-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.seguro-content p {
    font-size: 1.125rem;
    line-height: 1.75;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

body.dark-mode .carousel-nav {
    background-color: rgba(31, 41, 55, 0.9);
    color: var(--text-light);
}

.carousel-nav:hover {
    background-color: var(--red-600);
    color: var(--text-light);
    transform: translateY(-50%) scale(1.1);
}

.carousel-prev {
    left: 0.5rem;
}

.carousel-next {
    right: 0.5rem;
}

.carousel-nav svg {
    width: 24px;
    height: 24px;
}

.cta-button {
    display: inline-block;
    background-color: var(--logo-jr-400);
    color: var(--dark-bg);
    padding: 1rem 2rem;
    border-radius: 9999px;
    font-size: 1.125rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 15px rgba(123, 116, 11, 0.3);
}

.cta-button:hover {
    background-color: var(--logo-jr-300);
    transform: scale(1.05);
}

/* JR Section */
.jr-section {
    background-color: var(--light-bg);
    overflow: hidden;
}

body.dark-mode .jr-section {
    background-color: var(--gray-900);
}

.about-preview {
    max-width: 48rem;
    margin: 0 auto 4rem;
}

.about-preview h2 {
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
}

.about-preview p {
    font-size: 1.125rem;
    color: var(--gray-700);
    text-align: center;
    line-height: 1.75;
}

body.dark-mode .about-preview p {
    color: var(--gray-300);
}

.missao-card {
    background: linear-gradient(90deg, var(--logo-jr-700), var(--logo-jr-800));
    color: var(--text-light);
    max-width: 48rem;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 0.75rem;
}

.missao-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.missao-card p {
    font-size: 1.125rem;
    line-height: 1.75;
}

/* ================================================== */
/*        Seção de Parceiros (ATUALIZADA)             */
/* ================================================== */

#parceiros {
    padding: 4rem 0;
    background-color: #f9fafb;
}

body.dark-mode #parceiros {
    background-color: #1f2937;
}

.partners-carousel-wrapper {
    position: relative;
    margin: 3rem auto 0;
    max-width: 1090px;
}

.partners-carousel-container {
    position: relative;
    overflow: hidden;
    padding: 1rem;
}

.partners-carousel-container::before,
.partners-carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 200px;
    z-index: 10;
    pointer-events: none;
}

.partners-carousel-container::before {
    left: 0;
    background: linear-gradient(to right, #f9fafb, transparent);
}

.partners-carousel-container::after {
    right: 0;
    background: linear-gradient(to left, #f9fafb, transparent);
}

body.dark-mode .partners-carousel-container::before {
    background: linear-gradient(to right, #1f2937, transparent);
}

body.dark-mode .partners-carousel-container::after {
    background: linear-gradient(to left, #1f2937, transparent);
}

.partners-carousel {
    display: flex;
    gap: 2rem;
    will-change: transform;
}

.partner-card {
    background-color: var(--light-bg);
    width: 150px; /* Largura fixa para cada card de parceiro */
    padding: 1.5rem;
    border-radius: 0.5rem;
    flex-shrink: 0; /* Impede que os cards encolham */
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    align-items: center;
    text-align: center;
    font-weight: 600;
    transition: all 0.3s ease;
}

body.dark-mode .partner-card {
    background-color: var(--gray-900);
}

.partner-card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.partner-logo-wrapper {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background-color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.partner-card:hover .partner-logo-wrapper {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.partner-logo {
    max-width: 70%;
    max-height: 70%;
    object-fit: contain;
}

.partner-name {
    font-weight: 600;
    color: var(--text-dark);
}

body.dark-mode .partner-name {
    color: var(--text-light);
}

body.dark-mode .partner-logo-wrapper {
    background-color: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

/* Sobre Nós Section */
.sobrenos-section {
    background-color: var(--light-bg);
}

body.dark-mode .sobrenos-section {
    background-color: var(--gray-900);
}

.sobrenos-content {
    max-width: 60rem;
    margin: 0 auto;
}

.historia {
    margin-bottom: 3rem;
}

.historia p {
    font-size: 1.125rem;
    color: var(--gray-700);
    margin-bottom: 1.5rem;
    line-height: 1.75;
}

body.dark-mode .historia p {
    color: var(--gray-300);
}

.valores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.valor-card {
    background-color: var(--logo-jr-50);
    padding: 2rem;
    border-radius: 0.75rem;
}

body.dark-mode .valor-card {
    background-color: var(--gray-800);
}

.valor-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--logo-jr-600);
    margin-bottom: 1rem;
}

body.dark-mode .valor-card h3 {
    color: var(--logo-jr-400);
}

.valor-card p {
    color: var(--gray-700);
}

body.dark-mode .valor-card p {
    color: var(--gray-300);
}

/* Contato Section */
.contato-section {
    background-color: var(--gray-50);
}

body.dark-mode .contato-section {
    background-color: var(--gray-800);
}

.contact-icon {
    width: 80px;  /* Tamanho do ícone */
    height: 80px; /* Tamanho do ícone */
}

.contato-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
    max-width: 60rem;
    margin-left: auto;
    margin-right: auto;
}

.contato-card {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

body.dark-mode .contato-card {
    background-color: var(--gray-700);
}

.contato-card:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.2);
}

.contato-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.contato-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.contato-card p {
    color: var(--gray-600);
}

body.dark-mode .contato-card p {
    color: var(--gray-300);
}

.mapa-card {
    background-color: var(--light-bg);
    padding: 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 60rem;
    margin: 0 auto;
}

body.dark-mode .mapa-card {
    background-color: var(--gray-700);
}

.mapa-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.map-icon {
    font-size: 2rem;
    color: var(--red-600);
}

.mapa-container {
    width: 100%;
    height: 24rem;
    background-color: var(--gray-200);
    border-radius: 0.5rem;
    overflow: hidden;
}

body.dark-mode .mapa-container {
    background-color: var(--gray-600);
}

/* Footer */
.footer {
    background-color: var(--gray-900);
    color: var(--text-light);
    padding: 3rem 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-logo {
    height: 4rem;
    margin-bottom: 1rem;
}

.footer-column p {
    color: #9ca3af;
}

.footer-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-nav .nav-link {
    color: #9ca3af;
}

.footer-nav .nav-link:hover {
    color: var(--logo-jr-600);
}

.whatsapp-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--green-600);
    color: var(--text-light);
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.whatsapp-button:hover {
    background-color: var(--green-700);
    transform: scale(1.05);
}

.telegram-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--telegram-600);
    color: var(--text-light);
    padding: 0.5rem 0.75rem;
    border-radius: 9999px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
}

.telegram-button:hover {
    background-color: var(--telegram-800);
    transform: scale(1.05);
}

.contact-icon-footer {
    width: 30px;
    height: 30px;
    filter: brightness(0) invert(1);
}

.contact-icon-footer-telegram {
    width: 30px;
    height: 30px;
}

.footer-bottom {
    border-top: 1px solid var(--gray-800);
    padding-top: 2rem;
    text-align: center;
    color: #9ca3af;
}

/* Responsive Styles */
@media (max-width: 768px) {
    section.section[id] {
        /* Este valor precisa ser maior para compensar o header mobile */
        scroll-margin-top: 5rem; /* <<-- REAJUSTE ESTE VALOR PARA O MOBILE */
    }

    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--light-bg);
        flex-direction: column;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        gap: 0;
    }

    body.dark-mode .nav {
        background-color: var(--gray-900);
    }

    .nav.active {
        display: flex;
    }

    .nav-link {
        padding: 1rem;
        border-bottom: 1px solid var(--gray-200);
    }

    body.dark-mode .nav-link {
        border-bottom-color: var(--gray-700);
    }

    .menu-toggle {
        display: block;
    }

    .logo img {
        height: 2.5rem;
    }

    .seguros-title {
        font-size: 2rem;
    }

    .seguros-subtitle {
        font-size: 1.125rem;
    }

    .section-title {
        font-size: 1.875rem;
    }

    .valores-grid,
    .contato-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    /* Mobile Seguros Carousel */
    .seguros-carousel-wrapper {
        padding: 0 3rem;
    }

    .seguros-carousel-container::before,
    .seguros-carousel-container::after,
    .partners-carousel-container::before,
    .partners-carousel-container::after {
        display: none;
    }

    .seguro-card {
        width: 100%;
        min-width: 100%;
        height: 400px;
    }

    .partner-card {
        width: 100%;
        min-width: 100%;
        /* A altura do partner-card será controlada pelo seu conteúdo, 
           então não precisamos definir uma altura fixa aqui. */
    }

    .seguro-content {
        text-align: left;
        padding: 1rem;
    }

    .seguro-content h3 {
        font-size: 1.5rem;
    }

    .seguro-content p {
        font-size: 1rem;
    }

    .carousel-nav {
        width: 40px;
        height: 40px;
    }

    .carousel-nav svg {
        width: 20px;
        height: 20px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .seguro-card {
        min-width: 350px;
        height: 450px;
    }
}
