/* Base configuration and custom properties */
:root {
    scroll-behavior: smooth;
    --scrollbar-width: 8px;
    
    /* Brand Color Palette */
    --color-primary: #008BAC;         /* Teal primary color */
    --color-primary-dark: #006b84;    /* Darker teal for hover states */
    --color-primary-light: #1aa3c4;   /* Lighter teal for subtle elements */
    --color-secondary: #4CBCB7;       /* Aqua secondary color */
    --color-accent: #000000;          /* Black for text and accents */
    --color-background: #FFFFFF;      /* White background */
    --color-contextual-trust: #4CBCB7; /* Aqua for trust elements */
    --color-contextual-urgency: #FF6B6B; /* Soft red for urgency */
    --color-contextual-success: #51CF66; /* Green for success */
    --color-contextual-warning: #FFD43B; /* Yellow for warning */
    --color-text-primary: #000000;    /* Primary text color */
    --color-text-secondary: #666666;  /* Secondary text color (lighter black) */
    --color-text-muted: #999999;      /* Muted text color */
    --color-text-brand: #008BAC;      /* Brand text color */
    --color-text-light: #FFFFFF;      /* Light text on dark backgrounds */
    --color-border: #E5E5E5;          /* Light border color */
    --color-border-dark: #CCCCCC;     /* Darker border color */
    
    /* Typography Scale */
    --text-xs: 0.75rem;    /* 12px */
    --text-sm: 0.875rem;   /* 14px */
    --text-base: 1rem;     /* 16px */
    --text-lg: 1.125rem;   /* 18px */
    --text-xl: 1.25rem;    /* 20px */
    --text-2xl: 1.5rem;    /* 24px */
    --text-3xl: 1.875rem;  /* 30px */
    --text-4xl: 2.25rem;   /* 36px */
    --text-5xl: 3rem;      /* 48px */
}

/* Optimized Web Fonts with Critical Performance */
/* Using Google Fonts with font-display: swap for instant fallback */

/* Base Typography Settings */
html {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: "liga", "kern";
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-primary);
    background-color: var(--color-background);
    overflow-x: hidden;
    font-display: swap;
    font-weight: 400;
}

/* Headers */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    font-display: swap;
    margin: 0;
}

/* Global Typography Scale - Mobile First */
h1 { 
    font-size: 2.5rem; /* 40px */
    font-weight: 900; 
    line-height: 1.1; 
    margin-bottom: 1.5rem;
}
h2 { 
    font-size: 2rem; /* 32px */
    font-weight: 800; 
    line-height: 1.2; 
    margin-bottom: 1.25rem;
}
h3 { 
    font-size: 1.5rem; /* 24px */
    font-weight: 700; 
    line-height: 1.3; 
    margin-bottom: 1rem;
}
h4 { 
    font-size: 1.125rem; /* 18px */
    font-weight: 600; 
    line-height: 1.4; 
    margin-bottom: 0.75rem;
}

/* Desktop Scale */
@media (min-width: 768px) {
    h1 { font-size: 4rem; /* 64px */ margin-bottom: 2rem; }
    h2 { font-size: 3rem; /* 48px */ margin-bottom: 1.5rem; }
    h3 { font-size: 2rem; /* 32px */ margin-bottom: 1.25rem; }
    h4 { font-size: 1.25rem; /* 20px */ margin-bottom: 1rem; }
}

@media (min-width: 1024px) {
    h1 { font-size: 4.5rem; /* 72px */ }
    h2 { font-size: 3.5rem; /* 56px */ }
    h3 { font-size: 2.25rem; /* 36px */ }
}

/* Global Spacing System */
.section-spacing {
    padding-top: 4rem; /* 64px mobile */
    padding-bottom: 4rem;
}

@media (min-width: 768px) {
    .section-spacing {
        padding-top: 6rem; /* 96px desktop */
        padding-bottom: 6rem;
    }
}

.container-spacing {
    padding-left: 1rem; /* 16px mobile */
    padding-right: 1rem;
}

@media (min-width: 768px) {
    .container-spacing {
        padding-left: 1.5rem; /* 24px tablet */
        padding-right: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container-spacing {
        padding-left: 2rem; /* 32px desktop */
        padding-right: 2rem;
    }
}

/* Content Spacing */
.content-spacing-sm { margin-bottom: 3rem; } /* 48px */
.content-spacing-md { margin-bottom: 4rem; } /* 64px */
.content-spacing-lg { margin-bottom: 6rem; } /* 96px */

@media (min-width: 768px) {
    .content-spacing-sm { margin-bottom: 4rem; } /* 64px */
    .content-spacing-md { margin-bottom: 6rem; } /* 96px */
    .content-spacing-lg { margin-bottom: 8rem; } /* 128px */
}

/* Semantic Classes */
.hero-headline {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 900;
    line-height: 1.1;
    letter-spacing: -0.02em;
    font-display: swap;
}

.section-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    font-display: swap;
}

.subtitle {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    line-height: 1.4;
    font-display: swap;
}

.body-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 400;
    line-height: 1.6;
    font-display: swap;
}

.highlight-text {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 600;
    font-display: swap;
}

@media (min-width: 768px) {
    .hero-headline {
        font-size: var(--text-5xl);
    }
}

/* Navigation Typography */
.nav-link {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 500;
    font-size: var(--text-sm);
    font-display: swap;
}

@media (min-width: 768px) {
    .nav-link {
        font-size: var(--text-base);
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: var(--scrollbar-width);
}

::-webkit-scrollbar-track {
    background: var(--color-border);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: calc(var(--scrollbar-width) / 2);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-dark);
}

/* Optimized Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    will-change: transform, opacity;
    backface-visibility: hidden;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Performance optimized variants */
.reveal[data-animation="fade"] {
    transform: none;
}

.reveal[data-animation="slide-left"] {
    transform: translateX(-10px);
}

.reveal[data-animation="slide-right"] {
    transform: translateX(10px);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    inset: 0;
    background: var(--color-secondary);
    color: var(--color-text-light);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Prevent scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
    touch-action: none;
}

/* Before/After Slider */
.comparison-slider {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    touch-action: none;
    contain: strict;
    will-change: transform;
}

.comparison-before,
.comparison-after {
    position: absolute;
    top: 0;
    height: 100%;
    width: 100%;
    overflow: hidden;
    backface-visibility: hidden;
    will-change: transform;
}

.comparison-before { left: 0; }
.comparison-after { right: 0; }

.comparison-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    will-change: transform;
}

.comparison-after {
    clip-path: inset(0 50% 0 0);
}

.slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: var(--color-background);
    transform: translateX(-50%);
    cursor: ew-resize;
    z-index: 10;
    will-change: transform;
    touch-action: manipulation;
}

.handle-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    background: var(--color-background);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

.handle-circle img {
    width: 60%;
    height: 60%;
    object-fit: contain;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

@media (hover: hover) {
    .slider-handle:hover .handle-circle {
        transform: translate(-50%, -50%) scale(1.1);
    }
}


/* Typography Utility Classes */
.text-body-large {
    font-size: var(--text-lg);
    line-height: 1.75;
}

.text-body {
    font-size: var(--text-base);
    line-height: 1.5;
}

.text-caption {
    font-size: var(--text-sm);
    line-height: 1.25;
}

/* Section Headers */
.section-title {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 700;
    font-size: var(--text-3xl);
    letter-spacing: -0.025em;
    line-height: 1.2;
    font-display: swap;
}

@media (min-width: 768px) {
    .section-title {
        font-size: var(--text-4xl);
    }
}

/* CTA Buttons */
.cta-button {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: var(--text-lg);
    letter-spacing: 0.025em;
}

@media (min-width: 768px) {
    .cta-button {
        font-size: var(--text-xl);
    }
}

/* Form Typography */
.form-label {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: var(--text-sm);
    color: var(--color-text-primary);
}

.form-input {
    font-family: 'Inter', sans-serif;
    font-size: var(--text-base);
    color: var(--color-text-primary);
}

/* Ensure dropdown options are black */
select option {
    color: #000000 !important;
    background-color: #ffffff;
}

select {
    color: #000000 !important;
}

/* Input and Select Styles */
input[type="text"],
input[type="email"],
select {
    color: #000000 !important;
    background-color: rgba(255, 255, 255, 0.9);
}

input[type="text"]::placeholder,
input[type="email"]::placeholder {
    color: #666666;
}

/* Prevent text selection while dragging */
.comparison-slider {
    user-select: none;
    -webkit-user-select: none;
}


/* Optimized Card Styles */
.analysis-card {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    will-change: transform;
}

.analysis-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Static Trust Indicators - Performance Optimized */
.trust-indicator {
    /* Removed animation for better performance */
    opacity: 0.6;
}

/* Simplified static background */
.water-bg {
    background: linear-gradient(135deg, #000000 0%, #008BAC 100%);
    color: white;
}

/* Static Water Background - Performance Optimized */
.water-section {
    background: linear-gradient(135deg, #000000 0%, #008BAC 100%);
    position: relative;
    color: white;
}

/* Garante que o conteúdo dentro da seção fique acima do fundo/overlay */
.water-section > .container {
    position: relative;
    z-index: 2;
}

/* Only keep essential animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.drop-shadow-glow {
    filter: drop-shadow(0 0 12px rgba(22, 163, 74, 0.4));
}

/* Using a valid class name instead of Tailwind-like syntax */
.bg-dark-gray {
    background-color: var(--color-accent);
    color: var(--color-text-light);
}

.hero-content {
    z-index: 10;
}

/* Carousel Styles */
.carousel-container {
    position: relative;
    overflow: hidden;
}

[data-carousel-slide] {
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.carousel-content {
    z-index: 20;
    transition: opacity 0.5s ease-in-out;
}

/* Carousel Animations */
.carousel-slide-enter {
    opacity: 0;
}

.carousel-slide-enter-active {
    opacity: 1;
}

.carousel-slide-exit {
    opacity: 1;
}

.carousel-slide-exit-active {
    opacity: 0;
}

.slide-content {
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
}

.slide-content.active {
    pointer-events: auto;
}

.slide-content {
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: opacity;
}

[data-carousel-slide] {
    backface-visibility: hidden;
    transform: translateZ(0);
    will-change: opacity;
}

.carousel-indicator {
    transition: all 0.3s ease-in-out;
}

/* Hero Background Image (Agende Analise Page) */
.hero-bg-image {
    /* Background image removed - file not available */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Custom Subheadline Stroke */
.subheadline-stroke {
    -webkit-text-stroke-width: 1.5px; /* Adjust thickness (e.g., 1px, 2px) */
    -webkit-text-stroke-color: #001f3f; /* Navy Blue */
    paint-order: stroke fill; /* Draw stroke behind text fill */
}

/* Prevent text selection while dragging */

/* Adicionar estilos para a calculadora moderna */

/* Static water drops - Performance optimized */
.water-drop {
    position: absolute;
    width: 20px;
    height: 20px;
    background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.1));
    border-radius: 50%;
    opacity: 0.2;
    z-index: 1;
}

/* Estilos para os inputs da calculadora */
.calculator-input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.calculator-input-group .relative {
    position: relative;
    height: 2px;
    border-radius: 9999px;
    overflow: hidden;
    cursor: pointer;
}

.slider-track {
    position: absolute;
    height: 100%;
    top: 0;
    left: 0;
    background: linear-gradient(to right, var(--color-primary), var(--color-primary-light));
    border-radius: 9999px;
    transition: width 0.2s ease;
}

/* Certifique-se de que os sliders ocupem o espaço necessário */
.slider-input {
    position: relative;
    cursor: pointer;
    width: 100%;
    height: 30px;
    margin-top: -28px;
    z-index: 10;
    opacity: 0.001;
    -webkit-appearance: none;
    appearance: none;
}

/* Aumentar a área clicável para melhor usabilidade em dispositivos touch */
.slider-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0,0,0,0);
    cursor: pointer;
}

.slider-input::-moz-range-thumb {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0,0,0,0);
    cursor: pointer;
    border: none;
}

/* Efeito de hover no slider track */
.calculator-input-group:hover .slider-track {
    background: linear-gradient(to right, var(--color-primary-dark), var(--color-primary));
}

/* Animação dos valores da calculadora */
@keyframes pulse-value {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

#total-savings.updating {
    animation: pulse-value 0.5s ease;
}

/* Estilo para contador de economia */
.savings-counter {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    padding: 0.75rem;
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.savings-counter::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
}

/* Melhorar responsividade para mobile */
@media (max-width: 768px) {
    .calculator-input-group {
        margin-bottom: 1rem;
    }
    
    #modern-roi-calculator {
        padding: 1rem;
    }
}

/* Modern Checkbox Tags Styling */
.checkbox-tag {
    display: inline-block;
}

.checkbox-tag .tag-button {
    cursor: pointer;
    user-select: none;
    position: relative;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.checkbox-tag .tag-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.checkbox-tag.selected .tag-button {
    background: var(--color-primary) !important;
    border-color: var(--color-primary) !important;
    color: white !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 139, 172, 0.3);
}

.checkbox-tag.selected .tag-button::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--color-contextual-success);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

@media (max-width: 768px) {
    .checkbox-tag .tag-button {
        font-size: 13px;
        padding: 0.5rem 0.75rem;
    }
}

