/**
 * embarcador.io - Estilos dinâmicos
 * Identidade visual: azul elétrico, cinza, preto, branco
 * Inspirado em endeken.com: seções limpas, cards, transições suaves
 * CDN: Bootstrap 5 (grid, utilities) - este arquivo sobrescreve e complementa
 */

:root {
    --azul-eletrico: #3783FF;
    --azul-hover: #2868d9;
    --azul-light: rgba(55, 131, 255, 0.08);
    --cinza: #E7E9EF;
    --cinza-escuro: #6c757d;
    --preto: #000000;
    --branco: #FFFFFF;
    --sombra-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --sombra-md: 0 10px 30px rgba(0, 0, 0, 0.08);
    --sombra-lg: 0 20px 50px rgba(55, 131, 255, 0.12);
    /* Design system: sombra pequena / média / azul */
    --sombra-pequena: rgba(0, 0, 0, 0.06);
    --sombra-media: rgba(0, 0, 0, 0.08);
    --sombra-azul: rgba(55, 131, 255, 0.12);
    --transicao: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 12px;
    --radius-lg: 16px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--preto);
    background-color: #F7F9FC;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header - sticky, identidade */
.site-header {
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(231, 233, 239, 0.7);
    padding: 0.9rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    transition: box-shadow var(--transicao), background var(--transicao);
}

.site-header.scrolled {
    box-shadow: var(--sombra-sm);
}

.logo {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--azul-eletrico);
    text-decoration: none;
    transition: transform var(--transicao);
}

.logo:hover {
    color: var(--azul-hover);
    transform: scale(1.02);
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: var(--azul-eletrico);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--branco);
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 6px 16px rgba(55, 131, 255, 0.25);
}

.lang-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--cinza);
    background: var(--branco);
    border-radius: 8px;
    font-family: inherit;
    font-weight: 500;
    color: var(--preto);
    text-decoration: none;
    transition: all var(--transicao);
}

.lang-btn:hover {
    background: var(--azul-light);
    border-color: var(--azul-eletrico);
    color: var(--azul-eletrico);
}

.lang-btn.active {
    background: var(--azul-eletrico);
    border-color: var(--azul-eletrico);
    color: var(--branco);
}

.login-link {
    color: var(--preto);
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transicao);
}
.login-link:hover {
    color: var(--azul-eletrico);
}

.cursor-pointer {
    cursor: pointer;
}

/* Modais */
.modal-content {
    border-radius: var(--radius-lg);
}
.modal-body .form-control,
.modal-body .form-select {
    border-radius: 8px;
    border: 1px solid var(--cinza);
}
.modal-body .form-control:focus {
    border-color: var(--azul-eletrico);
    box-shadow: 0 0 0 3px var(--azul-light);
    outline: 0;
}
.modal-body .btn-submit {
    margin-top: 0.25rem;
}

/* ========== Seção Mapa (na mesma linha visual do banner) ========== */
.map-section {
    position: relative;
    width: 100%;
    min-height: 420px;
    margin-top: 0;
    padding: 0;
    background: linear-gradient(180deg, transparent 0%, var(--azul-light) 30%, rgba(231, 233, 239, 0.5) 100%);
}

.map-container {
    width: 100%;
    height: 420px;
    border: none;
    border-radius: 0;
}

#map {
    width: 100%;
    height: 100%;
    min-height: 420px;
}

/* Leaflet: esconder ícone padrão e usar divIcon */
.leaflet-marker-icon.map-marker {
    border: none !important;
    background: none !important;
}

.map-marker-inner {
    display: block;
    text-align: center;
}

.map-marker-parcel-inner {
    display: block !important;
    font-size: 1.4rem !important;
    line-height: 1 !important;
    width: 28px !important;
    height: 28px !important;
    text-align: center !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35)) !important;
}

.map-marker-truck-inner {
    font-size: 1.1rem;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.3));
    animation: truck-pulse 2s ease-in-out infinite;
}

@keyframes truck-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.15); opacity: 0.9; }
}

/* Leaflet: controle de zoom e tooltip */
.leaflet-control-zoom { border: none !important; }
.leaflet-control-zoom a {
    background: var(--branco) !important;
    color: var(--azul-eletrico) !important;
    border-radius: 8px !important;
    box-shadow: var(--sombra-sm) !important;
    font-weight: 700 !important;
}
.leaflet-control-zoom a:hover { background: var(--azul-light) !important; }
.leaflet-tooltip { font-size: 0.75rem; padding: 4px 8px; border-radius: 6px; }

@media (max-width: 768px) {
    .map-section { min-height: 320px; }
    .map-container,
    #map { height: 320px !important; min-height: 320px !important; }
}

/* ========== Hero: texto à esquerda, globo laranja à direita (estilo referência) ========== */
.hero-globe-section,
#hero-map-section {
    min-height: 560px;
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
    display: flex;
    align-items: stretch;
    position: relative;
    overflow: hidden;
}

/* Banner estilo referência: fundo branco, limpo */
.hero-globe-section.hero-banner-style,
#hero-map-section.hero-banner-style {
    background: var(--branco);
    min-height: 520px;
}

.hero-banner-style .hero-two-cols {
    min-height: 0;
}

.hero-banner-style .hero-two-cols .row {
    min-height: 420px;
}

.hero-polygon-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    opacity: 0.4;
    background-size: cover;
    background-position: center;
    pointer-events: none;
}

.hero-two-cols {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 560px;
}

.hero-two-cols .row {
    min-height: 560px;
}

.hero-col-globe {
    position: relative;
    min-height: 560px;
}

/* Coluna do globo: altura fixa para o canvas Three.js ter dimensões */
.hero-banner-style .hero-col-globe {
    height: 420px;
    min-height: 420px;
    padding: 0;
    position: relative;
}

.hero-col-text {
    position: relative;
    min-height: 560px;
    padding: 0 2.5rem;
    border-left: 1px solid rgba(55, 131, 255, 0.1);
    box-sizing: border-box;
}

/* Banner estilo referência: texto à esquerda, sem card, alinhado ao container */
.hero-banner-style .hero-col-text {
    padding: 2rem 0 2rem 0;
    padding-right: 2rem;
    border-left: none;
    display: flex;
    align-items: center;
    min-height: 420px;
}

.hero-content-inline {
    text-align: left;
    max-width: 540px;
}

/* Hero: tipografia embarcador.io - hero-title clamp(2rem, 4.5vw, 3.25rem) */
.hero-content-inline .hero-title {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--preto);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.hero-title-accent {
    color: var(--azul-eletrico);
    display: inline;
}

/* hero-tagline: clamp(1rem, 1.8vw, 1.35rem) */
.hero-subtitle {
    font-size: clamp(1rem, 1.8vw, 1.35rem);
    font-weight: 400;
    color: var(--preto);
    line-height: 1.6;
    margin-bottom: 1.75rem;
}

.hero-content-inline .cta-buttons {
    margin-top: 0;
}

.hero-content-inline .cta-buttons .btn-hero-primary {
    background: var(--azul-eletrico);
    color: var(--branco);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: background var(--transicao), transform var(--transicao);
}

.hero-content-inline .cta-buttons .btn-hero-primary:hover {
    background: var(--azul-hover);
    color: var(--branco);
    transform: translateY(-1px);
}

.hero-content-inline .cta-buttons .btn-hero-secondary {
    background: var(--branco);
    color: var(--azul-eletrico);
    border: 2px solid rgba(55, 131, 255, 0.7);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.05rem;
    transition: border-color var(--transicao), color var(--transicao);
}

.hero-content-inline .cta-buttons .btn-hero-secondary:hover {
    background: var(--azul-eletrico);
    color: var(--branco);
    border-color: var(--azul-eletrico);
}

/* Bloco centralizado (quando não usa hero-banner-style) */
.hero-content-wrap {
    position: absolute;
    top: 52%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 3rem);
    max-width: 420px;
    text-align: center;
    margin: 0;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(231, 233, 239, 0.9);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(55, 131, 255, 0.08);
    backdrop-filter: blur(6px);
}

.hero-content-centered {
    text-align: center;
    padding: 0;
}

.hero-content-wrap .hero-title {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--preto);
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.hero-content-wrap .hero-tagline {
    font-size: clamp(1rem, 1.8vw, 1.35rem);
    font-weight: 300;
    color: var(--azul-eletrico);
    margin-bottom: 2.25rem;
    line-height: 1.5;
}

.hero-content-wrap .cta-buttons {
    margin-top: 0.5rem;
}

.hero-content-wrap .cta-buttons .btn {
    min-width: 170px;
    padding: 0.9rem 1.5rem;
    border-radius: 14px;
}

.hero-globe-canvas {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    min-height: 420px;
    pointer-events: none;
}

.hero-banner-style .hero-col-globe .hero-globe-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero-globe-canvas canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
}

@media (max-width: 991px) {
    .hero-globe-section,
    #hero-map-section { min-height: 520px; }
    .hero-banner-style .hero-col-text {
        padding: 2rem 0;
        min-height: auto;
    }
    .hero-banner-style .hero-two-cols .row { min-height: 380px; }
    .hero-two-cols .row { min-height: 0; }
    .hero-col-globe { min-height: 380px; }
    .hero-banner-style .hero-col-globe {
        height: 380px;
        min-height: 380px;
    }
    .hero-col-text {
        min-height: 400px;
        padding: 2.5rem 1.5rem;
        border-left: none;
        border-top: 1px solid rgba(55, 131, 255, 0.12);
    }
    .hero-banner-style .hero-col-text { border-top: none; padding-top: 1.5rem; }
    .hero-content-wrap { width: calc(100% - 2rem); }
}

@media (max-width: 768px) {
    .hero-globe-section,
    #hero-map-section { min-height: 480px; }
    .hero-col-text,
    .hero-col-globe { min-height: auto; }
    .hero-col-globe { min-height: 320px; }
    .hero-banner-style .hero-col-globe {
        height: 320px;
        min-height: 320px;
    }
    .hero-content-inline { max-width: 100%; }
}

/* Hero - fallback se usar .hero sem globo */
.hero {
    text-align: center;
    padding: 5rem 1.5rem 2.5rem;
    background: linear-gradient(160deg, var(--azul-light) 0%, rgba(231, 233, 239, 0.4) 50%, transparent 100%);
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: radial-gradient(ellipse 80% 50% at 50% 0%, var(--azul-light), transparent 60%);
    pointer-events: none;
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--preto);
    letter-spacing: -0.02em;
}

.hero-tagline {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 300;
    color: var(--azul-eletrico);
    margin-bottom: 2.5rem;
}

.cta-buttons .btn {
    padding: 1rem 2.25rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1.05rem;
    transition: all var(--transicao);
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.cta-buttons .btn-primary {
    background: var(--azul-eletrico);
    color: var(--branco);
    box-shadow: 0 10px 24px rgba(55, 131, 255, 0.35);
}

.cta-buttons .btn-primary:hover {
    background: var(--azul-hover);
    transform: translateY(-2px);
    box-shadow: var(--sombra-lg);
}

.cta-buttons .btn-secondary {
    background: var(--branco);
    color: var(--azul-eletrico);
    border: 2px solid rgba(55, 131, 255, 0.7);
}

.cta-buttons .btn-secondary:hover {
    background: var(--azul-eletrico);
    color: var(--branco);
    transform: translateY(-2px);
}

/* Seções - dinâmicas tipo endeken */
.section {
    padding: 5.5rem 1.5rem;
}

.section-title {
    text-align: center;
    font-size: clamp(1.85rem, 4vw, 2.6rem);
    font-weight: 700;
    margin-bottom: 3.25rem;
    color: var(--preto);
    letter-spacing: -0.02em;
}

/* Como Funciona - cards com hover */
.section-how {
    background: var(--branco);
}

.step {
    padding: 2.25rem 1.75rem;
    border-radius: 18px;
    background: var(--branco);
    border: 1px solid rgba(231, 233, 239, 0.9);
    transition: all var(--transicao);
    text-align: center;
    position: relative;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
}

.step:hover {
    transform: translateY(-6px);
    box-shadow: var(--sombra-md);
    border-color: rgba(55, 131, 255, 0.2);
}

.step-number {
    width: 56px;
    height: 56px;
    background: var(--azul-eletrico);
    color: var(--branco);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.25rem;
}

.step h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--preto);
}

/* Benefícios - grid de cards */
.section-benefits {
    background: linear-gradient(180deg, var(--azul-light) 0%, rgba(231, 233, 239, 0.3) 100%);
}

.benefit-card {
    padding: 2.25rem 1.75rem;
    border-radius: 18px;
    background: var(--branco);
    border: 1px solid rgba(231, 233, 239, 0.9);
    transition: all var(--transicao);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.05);
}

.benefit-card:hover {
    border-color: var(--azul-eletrico);
    box-shadow: var(--sombra-md);
    transform: translateY(-4px);
}

.benefit-icon {
    font-size: 2.25rem;
    margin-bottom: 1rem;
    line-height: 1;
}

.benefit-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--azul-eletrico);
}

/* Formulários */
.section-forms {
    background: var(--branco);
}

.form-card {
    border-radius: var(--radius-lg);
    background: var(--branco);
    border: 1px solid var(--cinza);
    transition: all var(--transicao);
}

.form-card:hover {
    border-color: rgba(55, 131, 255, 0.3);
    box-shadow: var(--sombra-sm);
}

.form-card h3 {
    color: var(--azul-eletrico);
    font-weight: 700;
}

.form-card .form-control,
.form-card .form-select {
    border-radius: 8px;
    border: 1px solid var(--cinza);
    padding: 0.65rem 1rem;
    transition: border-color var(--transicao), box-shadow var(--transicao);
}

.form-card .form-control:focus,
.form-card .form-select:focus {
    border-color: var(--azul-eletrico);
    box-shadow: 0 0 0 3px var(--azul-light);
    outline: 0;
}

.btn-submit {
    padding: 1rem 1.5rem;
    background: var(--azul-eletrico);
    color: var(--branco);
    border: none;
    border-radius: var(--radius);
    font-family: inherit;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transicao);
}

.btn-submit:hover {
    background: var(--azul-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(55, 131, 255, 0.35);
}

/* Footer */
.site-footer {
    background: var(--preto);
    color: var(--branco);
    padding: 2.5rem 1.5rem;
    text-align: center;
}

.site-footer .footer-copyright {
    font-weight: 300;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.site-footer .footer-links a {
    color: var(--azul-eletrico);
    text-decoration: none;
    margin: 0 1rem;
    font-weight: 500;
    transition: color var(--transicao);
}

.site-footer .footer-links a:hover {
    color: var(--branco);
}

/* Scroll suave e animações sutis */
@media (prefers-reduced-motion: no-preference) {
    .step,
    .benefit-card,
    .form-card {
        will-change: transform;
    }
}

/* Responsivo */
@media (max-width: 768px) {
    .hero {
        padding: 3rem 1rem 4rem;
    }

    .section {
        padding: 3rem 1rem;
    }

    .cta-buttons {
        flex-direction: column;
    }

    .cta-buttons .btn {
        width: 100%;
    }

    .lang-selector {
        flex-wrap: wrap;
        justify-content: flex-end;
    }
}
