/* === Background === */
.bg-background { background-color: var(--color-background); }

/* === Brand Colors === */
:root {
    --color-background: #ffffff;
    --color-foreground: #1a1a1a;
    --color-brand-obsidian: #0A0A0B;
    --color-brand-accent: #3B82F6;
    --color-brand-slate: #64748b;
    --color-slate-50: #f8fafc;
    --color-slate-100: #f1f5f9;
    --color-slate-400: #94a3b8;
    --color-slate-500: #64748b;
    --color-slate-600: #475569;
}

/* === Font Families (override Tailwind CDN) === */
.font-sans {
    font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

.font-display {
    font-family: 'Outfit', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* === Brand Color Utilities === */
.text-brand-accent { color: var(--color-brand-accent); }
.text-brand-obsidian { color: var(--color-brand-obsidian); }
.text-slate-400 { color: var(--color-slate-400); }
.text-slate-500 { color: var(--color-slate-500); }
.text-slate-600 { color: var(--color-slate-600); }
.bg-brand-obsidian { background-color: var(--color-brand-obsidian); }
.bg-brand-accent { background-color: var(--color-brand-accent); }
.bg-slate-50 { background-color: var(--color-slate-50); }
.bg-slate-50\/50 { background-color: rgba(248, 250, 252, 0.5); }
.border-slate-100 { border-color: var(--color-slate-100); }

/* === Button Hover State === */
.hover\:bg-brand-accent:hover {
    background-color: var(--color-brand-accent) !important;
}

.hover\:bg-white:hover {
    background-color: #ffffff !important;
}

.hover\:text-brand-obsidian:hover {
    color: var(--color-brand-obsidian) !important;
}

.bg-white.text-brand-obsidian.hover\:bg-brand-accent:hover {
    background-color: var(--color-brand-accent) !important;
    color: #ffffff !important;
}

/* === Nav Link Hover Effect === */
.nav-link {
    position: relative;
    color: var(--color-slate-600);
    transition: color 0.2s ease;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--color-brand-accent);
    transform: translateX(-50%);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: var(--color-brand-accent);
}

.nav-link:hover::after {
    width: 100%;
}

/* Navbar icons */
.nav-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.nav-link:hover .nav-icon {
    transform: translateY(-1px);
}

/* =============================================
   === HAMBURGER MENU (Mobile) ==================
   ============================================= */

/* Hamburger button */
.hamburger-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 60;
    position: relative;
}

.hamburger-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-slate-600);
    border-radius: 2px;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                opacity 0.3s ease;
}

.hamburger-btn.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-btn.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile menu overlay */
.mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--color-slate-100);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 55;
}

.mobile-menu.open {
    max-height: 100vh;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--color-slate-600);
    text-decoration: none;
    transition: color 0.2s ease;
    border-bottom: 1px solid rgba(71, 85, 105, 0.06);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

.mobile-nav-link:hover {
    color: var(--color-brand-accent);
}

.mobile-menu hr {
    margin: 0.5rem 0;
    border-color: rgba(71, 85, 105, 0.08);
}

/* Missões Críticas: dark navbar mobile override */
body.page-missoes .hamburger-btn span {
    background-color: #e2e8f0 !important;
}

body.page-missoes .mobile-menu {
    background: rgba(10, 10, 11, 0.97);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

body.page-missoes .mobile-nav-link {
    color: #e2e8f0 !important;
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

body.page-missoes .mobile-nav-link:hover {
    color: var(--color-brand-accent) !important;
}

/* === Card Hover Effects === */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

.group:hover .group-hover\:bg-brand-accent\/20 {
    background-color: rgba(59, 130, 246, 0.2);
}

.hover\:shadow-2xl:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.hover\:-translate-y-1:hover {
    transform: translateY(-4px);
}

/* === Card Border Radius (Tailwind v2 doesn't have rounded-3xl) === */
.rounded-3xl {
    border-radius: 1.5rem;
}

/* === Spacing Scale Additions === */
.gap-12 { gap: 3rem; }
.pb-24 { padding-bottom: 6rem; }

/* === Hero Section Responsivo === */
.hero-section {
    height: 65vh;
    min-height: 380px;
    max-height: 680px;
}

@media (max-width: 768px) {
    .hero-section {
        height: 50vh;
        min-height: 300px;
        max-height: 480px;
    }
}

@media (max-width: 480px) {
    .hero-section {
        height: 40vh;
        min-height: 260px;
        max-height: 380px;
    }
}

/* === Aspect Ratio (Tailwind v2 doesn't support aspect ratio) === */
.aspect-\[4\/3\] {
    aspect-ratio: 4 / 3;
}

.aspect-\[16\/9\] {
    aspect-ratio: 16 / 9;
}

/* === Opacity Utilities (Tailwind v2 CDN doesn't support /xx syntax) === */
.bg-brand-accent\/10 { background-color: rgba(59, 130, 246, 0.1); }
.bg-brand-accent\/20 { background-color: rgba(59, 130, 246, 0.2); }
.bg-white\/5 { background-color: rgba(255, 255, 255, 0.05); }
.bg-white\/10 { background-color: rgba(255, 255, 255, 0.1); }
.border-white\/10 { border-color: rgba(255, 255, 255, 0.1); }
.text-white\/80 { color: rgba(255, 255, 255, 0.8); }
.shadow-brand-accent\/10 { box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.1); }
.shadow-brand-accent\/20 { box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.2); }

/* === Gradient Overlay (Hero) === */
.from-brand-obsidian\/90 { --tw-gradient-from: rgba(10, 10, 11, 0.9); }
.via-brand-obsidian\/40 { --tw-gradient-via: rgba(10, 10, 11, 0.4); }
.to-brand-obsidian\/10 { --tw-gradient-to: rgba(10, 10, 11, 0.1); }
.via-brand-obsidian\/60 { --tw-gradient-via: rgba(10, 10, 11, 0.6); }
.from-brand-obsidian { --tw-gradient-from: #0A0A0B; }
.to-transparent { --tw-gradient-to: transparent; }
.bg-gradient-to-t {
    background-image: linear-gradient(to top, var(--tw-gradient-from), var(--tw-gradient-via, var(--tw-gradient-from)), var(--tw-gradient-to));
}

/* === Star / Rating Colors === */
.text-yellow-400 { color: #facc15; }

/* === Tracking === */
.tracking-\[0\.4em\] { letter-spacing: 0.4em; }

/* === Responsive Text === */
@media (min-width: 768px) {
    .md\:text-5xl {
        font-size: 3rem;
        line-height: 1;
    }
}

/* =============================================
   === ANIMAÇÕES ============================= */
/* =============================================

/* === Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(32px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}


/* === Animation Utility Classes === */
.animate-fade-in-up {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.animate-fade-in {
    opacity: 0;
    transition: opacity 0.6s ease;
}

.animate-fade-in.visible {
    opacity: 1;
}

.animate-slide-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-slide-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.animate-slide-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-slide-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.animate-scale-in {
    opacity: 0;
    transform: scale(0.92);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* === Stagger Delays (applied after .visible) */
.visible.delay-100  { transition-delay: 0.1s; }
.visible.delay-200  { transition-delay: 0.2s; }
.visible.delay-300  { transition-delay: 0.3s; }
.visible.delay-400  { transition-delay: 0.4s; }
.visible.delay-500  { transition-delay: 0.5s; }
.visible.delay-600  { transition-delay: 0.6s; }
.visible.delay-700  { transition-delay: 0.7s; }

/* === Page Load Fade In === */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

body {
    animation: fadeIn 0.4s ease;
}

/* === Enhanced Card Hover === */
.hover\:shadow-xl:hover {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* === WhatsApp Floating Button === */
.whatsapp-float {
    position: fixed;
    bottom: 80px;
    right: 24px;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background-color: #25D366;
    color: #ffffff;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
}

.whatsapp-float:active {
    transform: scale(0.95);
}

.whatsapp-icon {
    width: 28px;
    height: 28px;
}

/* Pulse ring animation */
.whatsapp-float::before {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 3px solid #25D366;
    animation: whatsappPulse 2s ease-out infinite;
    opacity: 0;
}

@keyframes whatsappPulse {
    0% {
        transform: scale(1);
        opacity: 0.6;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Tooltip */
.whatsapp-tooltip {
    position: absolute;
    right: calc(100% + 12px);
    background: #1a1a1a;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    font-family: 'Inter', sans-serif;
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: #1a1a1a;
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 480px) {
    .whatsapp-float {
        bottom: 62px;
        right: 16px;
        width: 48px;
        height: 48px;
    }
    .whatsapp-icon {
        width: 24px;
        height: 24px;
    }
    .whatsapp-tooltip {
        display: none;
    }
}

/* === Missões Críticas: Navbar escura === */
body.page-missoes nav .nav-link {
    color: #e2e8f0 !important;
}

body.page-missoes nav .nav-link:hover {
    color: var(--color-brand-accent) !important;
}

body.page-missoes nav .nav-link::after {
    background-color: var(--color-brand-accent);
}

body.page-missoes nav a.font-display {
    color: #ffffff !important;
}

/* === Missões Críticas: Footer escuro === */
body.page-missoes footer {
    background-color: var(--color-brand-obsidian) !important;
    border-top-color: rgba(255, 255, 255, 0.08) !important;
}

body.page-missoes footer p {
    color: var(--color-slate-500) !important;
}

/* === Back to Top Button === */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 30px;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background-color: var(--color-brand-obsidian);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transition: opacity 0.4s ease, transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, background-color 0.3s ease;
    opacity: 0;
    transform: translateY(12px) scale(0.9);
    pointer-events: none;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.back-to-top:hover {
    background-color: var(--color-brand-accent);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.back-to-top:active {
    transform: scale(0.95);
}

.back-to-top-icon {
    width: 20px;
    height: 20px;
}

/* Tooltip */
.back-to-top-tooltip {
    position: absolute;
    right: calc(100% + 12px);
    background: #1a1a1a;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
    font-family: 'Inter', sans-serif;
}

.back-to-top-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: #1a1a1a;
}

.back-to-top:hover .back-to-top-tooltip {
    opacity: 1;
    transform: translateX(0);
}

@media (max-width: 480px) {
    .back-to-top {
        bottom: 16px;
        right: 21px;
        width: 38px;
        height: 38px;
    }
    .back-to-top-icon {
        width: 16px;
        height: 16px;
    }
    .back-to-top-tooltip {
        display: none;
    }
}

/* =============================================
   === SERVIÇOS — Carousel Transitions ==========
   ============================================= */

.service-slides-container {
    position: relative;
}

.service-slide {
    display: none;
}

.service-slide.active {
    display: block;
    position: relative;
    z-index: 2;
    animation: serviceFadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.service-slide.inactive {
    display: block;
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
    animation: serviceFadeOut 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes serviceFadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes serviceFadeOut {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-20px);
    }
}

.service-dot {
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.service-dot:hover {
    transform: scale(1.3);
}

@media (max-width: 768px) {
    @keyframes serviceFadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to   { opacity: 1; transform: translateY(0); }
    }
    @keyframes serviceFadeOut {
        from { opacity: 1; transform: translateY(0); }
        to   { opacity: 0; transform: translateY(-10px); }
    }
}

/* =============================================
   === CASES DE SUCESSO — Partner Logo Grid =====
   ============================================= */

.partner-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem 1.5rem;
    padding: 1rem 0;
}

.partner-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    width: 140px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.partner-logo:hover {
    transform: translateY(-6px) scale(1.02);
}

.partner-icon {
    width: 110px;
    height: 110px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    padding: 18px;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.partner-logo:hover .partner-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

.partner-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.partner-name {
    font-family: 'Outfit', ui-sans-serif, system-ui, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #ffffff;
    text-align: center;
    line-height: 1.2;
    white-space: nowrap;
}

/* Responsivo */
@media (max-width: 1024px) {
    .partner-grid {
        gap: 1.75rem 1.25rem;
    }
    .partner-logo {
        width: 120px;
    }
    .partner-icon {
        width: 90px;
        height: 90px;
        padding: 14px;
        border-radius: 16px;
    }
}

@media (max-width: 640px) {
    .partner-grid {
        gap: 1.5rem 1rem;
    }
    .partner-logo {
        width: 100px;
    }
    .partner-icon {
        width: 75px;
        height: 75px;
        padding: 12px;
        border-radius: 14px;
    }
    .partner-name {
        font-size: 0.7rem;
    }
}

@media (max-width: 420px) {
    .partner-grid {
        gap: 1.25rem 0.75rem;
    }
    .partner-logo {
        width: 85px;
    }
    .partner-icon {
        width: 65px;
        height: 65px;
        padding: 10px;
        border-radius: 12px;
    }
    .partner-name {
        font-size: 0.6rem;
    }
}
