:root {
    --primary: #dc2626; /* Crimson Red for Safir */
    --primary-hover: #b91c1c;
    --secondary: #1e3a8a; /* Deep Blue base for trust */
    --dark: #111827;
    --light: #ffffff;
    --grey-50: #f9fafb;
    --grey-100: #f3f4f6;
    --grey-200: #e5e7eb;
    --grey-300: #d1d5db;
    --grey-800: #1f2937;
    --success: #059669;
    --warning: #d97706;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', 'Inter', sans-serif;
}

body {
    background-color: var(--grey-50);
    color: var(--grey-800);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Glassmorphism utilities */
.glass-panel {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Common Components */
.btn-primary {
    background-color: var(--primary);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.3);
}

.text-gradient {
    background: linear-gradient(135deg, var(--dark) 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navbar */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 2rem;
    transition: all 0.4s ease;
}

nav.scrolled {
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 800;
    color: var(--dark);
    text-decoration: none;
}

.logo span {
    color: var(--primary);
}

.logo img.nav-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
}

nav.scrolled .logo img.nav-logo {
    height: 40px;
}

.nav-links {
    display: flex;
    gap: 32px;
}

.nav-links a {
    text-decoration: none;
    color: var(--grey-800);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

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

/* Hero Section */
.hero {
    padding: 160px 20px 100px;
    background: radial-gradient(circle at top right, rgba(220, 38, 38, 0.05), transparent),
                radial-gradient(circle at bottom left, rgba(30, 58, 138, 0.05), transparent);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

.hero-container {
    max-width: 1200px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

@media (max-width: 968px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

.hero-content h1 {
    font-size: 56px;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--dark);
}

.hero-content p {
    font-size: 18px;
    color: #4b5563;
    line-height: 1.6;
    margin-bottom: 40px;
}

/* Simulator styling */
.simulator-card {
    border-radius: 24px;
    padding: 32px;
    background: white;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--grey-200);
}

.simulator-tabs {
    display: flex;
    background: var(--grey-100);
    padding: 6px;
    border-radius: 12px;
    margin-bottom: 28px;
}

.tab-btn {
    flex: 1;
    border: none;
    background: none;
    padding: 12px;
    border-radius: 10px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-btn.active {
    background: white;
    color: var(--dark);
    box-shadow: var(--shadow-sm);
}

.input-slider-group {
    margin-bottom: 28px;
}

.range-header {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--dark);
}

.range-header .value {
    color: var(--primary);
    font-size: 24px;
}

input[type=range] {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    background: var(--grey-200);
    border-radius: 3px;
    outline: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(220, 38, 38, 0.4);
}

.installments-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
    margin-bottom: 24px;
}

.install-btn {
    border: 1px solid var(--grey-200);
    background: white;
    padding: 12px 0;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
}

.install-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* Gauge Meter */
.gauge-container {
    text-align: center;
    margin-bottom: 24px;
    position: relative;
    height: 120px;
    overflow: hidden;
}

.gauge-canvas {
    width: 220px;
    height: 110px;
}

.gauge-value {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 18px;
    font-weight: 700;
}

/* Results panel */
.results-panel {
    background: var(--grey-50);
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 14px;
}

.result-row:last-child {
    margin-bottom: 0;
    padding-top: 12px;
    border-top: 1px dashed var(--grey-300);
    font-weight: 700;
    font-size: 18px;
    color: var(--dark);
}

.result-row .val {
    color: var(--primary);
}

/* Services Section */
.services-section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.section-badge {
    background: rgba(220, 38, 38, 0.1);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 13px;
    display: inline-block;
    margin-bottom: 16px;
}

.section-title {
    font-size: 42px;
    color: var(--dark);
    font-weight: 800;
    margin-bottom: 16px;
}

.section-title span {
    color: var(--primary);
}

.section-subtitle {
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto 60px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 968px) {
    .services-grid { grid-template-columns: 1fr; }
}

.service-card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    border: 1px solid var(--grey-200);
    transition: all 0.3s ease;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(220,38,38,0.2);
}

.service-card.highlighted {
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(220,38,38,0.1);
}

.service-card .icon-box {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: rgba(220, 38, 38, 0.05);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 24px;
}

.service-card.highlighted .icon-box {
    background: var(--primary);
    color: white;
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: 12px;
    color: var(--dark);
}

.service-card p {
    color: #6b7280;
    font-size: 15px;
    margin-bottom: 24px;
    line-height: 1.5;
}

.service-card ul {
    list-style: none;
    margin-bottom: 30px;
}

.service-card ul li {
    font-size: 14px;
    color: #4b5563;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.service-card ul li i {
    color: var(--success);
    font-size: 12px;
}

.btn-card {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.2s;
}

.btn-card:hover { gap: 10px; }

/* About / Nosotros */
.about-section {
    padding: 100px 20px;
    background: linear-gradient(135deg, var(--dark) 0%, #1e293b 100%);
    color: white;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

@media (max-width: 968px) {
    .about-container { grid-template-columns: 1fr; gap: 40px; }
}

.about-content h2 {
    font-size: 42px;
    font-weight: 800;
    margin-bottom: 20px;
}

.about-content h2 span { color: var(--primary); }

.about-content p {
    color: #cbd5e1;
    line-height: 1.7;
    margin-bottom: 40px;
}

.mission-vision {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.mv-box {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 24px;
    border-radius: 16px;
}

.mv-box h4 {
    color: var(--primary);
    font-size: 18px;
    margin-bottom: 10px;
    font-weight: 700;
}

.mv-box p {
    font-size: 14px;
    color: #94a3b8;
    margin-bottom: 0;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stat-item {
    background: rgba(255,255,255,0.02);
    padding: 30px;
    border-radius: 16px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.05);
}

.stat-item span {
    font-size: 36px;
    font-weight: 800;
    color: white;
    display: block;
    margin-bottom: 8px;
}

.stat-item p {
    color: #94a3b8;
    font-size: 14px;
    margin-bottom: 0;
}

/* Testimonials */
.testimonials-section {
    padding: 100px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 968px) { .testimonials-grid { grid-template-columns: 1fr; } }

.testimonial-card {
    background: white;
    padding: 30px;
    border-radius: 16px;
    border: 1px solid var(--grey-200);
}

.testimonial-card p {
    color: #4b5563;
    font-style: italic;
    margin-bottom: 24px;
    line-height: 1.6;
}

.test-profile {
    border-top: 1px solid var(--grey-200);
    padding-top: 16px;
}

.test-profile strong { display: block; color: var(--dark); font-size: 15px; }
.test-profile span { color: #6b7280; font-size: 13px; }

/* Footer */
footer {
    background: var(--dark);
    color: white;
    padding: 80px 20px 40px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
}

@media (max-width: 768px) { .footer-container { grid-template-columns: 1fr; } }

.footer-col h3 { font-size: 24px; margin-bottom: 16px; }
.footer-col h3 span { color: var(--primary); }
.footer-col h4 { font-size: 16px; margin-bottom: 20px; color: #94a3b8; }
.footer-col p { color: #94a3b8; font-size: 14px; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.footer-col p i { color: var(--primary); }

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff !important;
    font-size: 18px;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-link i {
    color: #ffffff !important;
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
    border-color: var(--primary);
}

/* ==========================================
   FAQ & Chat Widget Styles
   ========================================== */

/* FAQ Accordion Enhancements */
.faq-item details summary::-webkit-details-marker {
    display: none;
}

.faq-item details summary {
    outline: none;
}

.faq-item details[open] summary i {
    transform: rotate(180deg);
}

.faq-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: rgba(220,38,38,0.3) !important;
}

/* Chat Widget */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999;
}

.chat-fab {
    width: 56px;
    height: 56px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    border: none;
    box-shadow: 0 4px 16px rgba(220, 38, 38, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.3s ease, background 0.3s ease;
}

.chat-fab:hover {
    transform: scale(1.1);
    background: var(--primary-hover);
}

.chat-window {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 350px;
    height: 480px;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    border: 1px solid var(--grey-200);
}

.chat-window.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.chat-header {
    background: var(--grey-50);
    padding: 15px;
    border-bottom: 1px solid var(--grey-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-body {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #fdfdfd;
}

.chat-message {
    padding: 10px 14px;
    border-radius: 14px;
    max-width: 80%;
    font-size: 14px;
    line-height: 1.4;
    word-break: break-word;
}

.chat-message.bot {
    background: var(--grey-100);
    color: var(--dark);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.chat-message.user {
    background: var(--primary);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-footer {
    padding: 12px;
    border-top: 1px solid var(--grey-100);
    display: flex;
    gap: 8px;
    background: white;
}

.chat-footer input {
    flex: 1;
    border: 1px solid var(--grey-200);
    padding: 10px 14px;
    border-radius: 20px;
    outline: none;
    font-size: 14px;
    transition: border 0.2s;
}

.chat-footer input:focus {
    border-color: var(--primary);
}

.chat-footer button {
    background: var(--primary);
    color: white;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.chat-footer button:hover {
    background: var(--primary-hover);
}

@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 40px);
        right: -10px;
        height: 70vh;
    }
}
