/* Patrimoniza Consórcios - Custom Styles */

/* Base typography override for Tailwind */
body { font-family: 'Inter', system-ui, sans-serif; }
h1,h2,h3,h4,h5,h6,.font-display { font-family: 'Poppins', system-ui, sans-serif; }

/* Primary CTA Button */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 16px;
    color: #FFFFFF;
    background: linear-gradient(to right, #002947, #0066CC);
    border-radius: 12px;
    box-shadow: 0 10px 15px -3px rgba(0, 41, 71, 0.25);
    transition: all 0.2s;
    text-decoration: none;
    border: none;
    cursor: pointer;
}
.btn-primary:hover {
    background: linear-gradient(to right, #002139, #0052A3);
    box-shadow: 0 20px 25px -5px rgba(0, 41, 71, 0.3);
    transform: translateY(-1px);
}

/* Secondary Button */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-weight: 600;
    font-size: 14px;
    color: #002947;
    background: transparent;
    border: 2px solid #002947;
    border-radius: 12px;
    transition: all 0.2s;
    text-decoration: none;
    cursor: pointer;
}
.btn-secondary:hover { background: #002947; color: #FFFFFF; }

/* Ghost Button (dark bg) */
.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    font-weight: 600;
    color: #FFFFFF;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    transition: all 0.2s;
    text-decoration: none;
    cursor: pointer;
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.1); }

/* Gradient text */
.gradient-text {
    background: linear-gradient(to right, #0066CC, #10B981);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass morphism */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}

/* Orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(48px);
    opacity: 0.15;
    pointer-events: none;
}

/* Sticky CTA (mobile) */
.sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    background: white;
    border-top: 1px solid #E5E7EB;
    padding: 12px 16px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.1);
    display: none;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
@media (max-width: 768px) {
    .sticky-cta.visible { display: block; transform: translateY(0); }
}

/* Counter animation */
.counter-value {
    font-variant-numeric: tabular-nums;
}

/* Scroll animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Card hover effect */
.card-hover {
    transition: all 0.3s ease;
}
.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Flip card */
.flip-card { perspective: 1000px; }
.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}
.flip-card:hover .flip-card-inner { transform: rotateY(180deg); }
.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 12px;
}
.flip-card-back { transform: rotateY(180deg); }

/* Accordion FAQ */
.faq-item { border-bottom: 1px solid #E5E7EB; }
.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    cursor: pointer;
    font-weight: 600;
    color: #111827;
    transition: color 0.2s;
}
.faq-question:hover { color: #002947; }
.faq-question .icon { transition: transform 0.3s; font-size: 20px; color: #6B7280; }
.faq-item.open .faq-question .icon { transform: rotate(180deg); }
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #4B5563;
    line-height: 1.7;
}
.faq-item.open .faq-answer {
    max-height: 800px;
    padding-bottom: 20px;
}

/* Video popup */
.video-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}
.video-overlay iframe { width: 90vw; max-width: 900px; aspect-ratio: 16/9; border-radius: 12px; }
.video-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 32px;
    cursor: pointer;
    line-height: 1;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Slide-in panel (for advanced calculators) */
.slide-panel {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    max-width: 560px;
    height: 100vh;
    background: white;
    z-index: 9998;
    box-shadow: -10px 0 30px rgba(0,0,0,0.15);
    transition: right 0.3s ease;
    overflow-y: auto;
}
.slide-panel.open { right: 0; }
.slide-panel-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 9997;
    display: none;
}
.slide-panel-overlay.open { display: block; }
@media (max-width: 640px) {
    .slide-panel { max-width: 100%; }
}

/* Range slider styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 8px;
    background: #E5E7EB;
    border-radius: 4px;
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    background: linear-gradient(to right, #002947, #0066CC);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,41,71,0.3);
}

/* Progress bars (for calculator scenarios) */
.scenario-bar {
    height: 8px;
    border-radius: 4px;
    background: #E5E7EB;
    overflow: hidden;
}
.scenario-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.8s ease;
}

/* Testimonial carousel */
.testimonial-track {
    display: flex;
    transition: transform 0.5s ease;
}

/* Cookie banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    background: #1F2937;
    color: #D1D5DB;
    padding: 16px 24px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 14px;
}
.cookie-banner.hidden { display: none; }
.cookie-banner a { color: #34D399; text-decoration: underline; }
.cookie-banner button { white-space: nowrap; }
@media (max-width: 640px) {
    .cookie-banner { flex-direction: column; text-align: center; }
}

/* Advanced calc panel improvements */
.slide-panel input[type="number"] {
    -moz-appearance: textfield;
}
.slide-panel input[type="number"]::-webkit-inner-spin-button,
.slide-panel input[type="number"]::-webkit-outer-spin-button {
    opacity: 1;
    height: 32px;
}

/* Selection bar (for cartas) */
.selection-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 950;
    background: #002947;
    color: white;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}
.selection-bar.active { transform: translateY(0); }

/* ============ SIMULATION RESULT (LP-identical) ============ */
.simulation-result {
    background: linear-gradient(135deg, #F9FAFB 0%, #E5E7EB 100%);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    animation: resultFadeIn 0.5s ease;
    max-width: 640px;
    margin: 0 auto;
}

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

.result-header { margin-bottom: 25px; }
.result-header .result-icon { font-size: 3rem; display: block; margin-bottom: 10px; }
.result-header h3 { color: #10B981; font-size: 1.5rem; margin: 0 0 8px; font-family: 'Poppins', system-ui, sans-serif; }
.result-header .result-subtitle { color: #4B5563; margin: 0; font-size: 1rem; }

.result-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}
@media (max-width: 480px) { .result-cards { grid-template-columns: 1fr; } }

.result-card {
    background: #ffffff;
    border-radius: 10px;
    padding: 18px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}
.result-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); }

.result-card--primary {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #002947 0%, #00699B 100%);
    color: white;
}

.result-card .result-label {
    display: block;
    font-size: 0.85rem;
    color: #4B5563;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.result-card--primary .result-label { color: rgba(255, 255, 255, 0.85); }

.result-card .result-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: #002947;
}
.result-card--primary .result-value { font-size: 1.8rem; color: white; }

.result-card .result-hint {
    display: block;
    font-size: 0.75rem;
    color: #4B5563;
    margin-top: 4px;
    opacity: 0.8;
}
.result-card--primary .result-hint { color: rgba(255, 255, 255, 0.75); }

.result-next-steps {
    background: #E6F0F5;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}
.result-next-steps h4 { color: #002947; margin: 0 0 10px; font-size: 1.1rem; font-family: 'Poppins', system-ui, sans-serif; }
.result-next-steps p { margin: 0 0 6px; color: #111827; font-size: 0.95rem; line-height: 1.5; }
.result-next-steps p:last-child { margin-bottom: 0; }

.result-contact-box {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}
.result-contact-title { color: #065F46; font-weight: 600; font-size: 1rem; margin: 0 0 6px; }
.result-contact-text { color: #047857; font-size: 0.9rem; margin: 0; }

.btn-new-simulation {
    background: transparent;
    color: #002947;
    border: 2px solid #002947;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn-new-simulation:hover { background: #002947; color: white; }
