/* MetaGastos - Refined Design System */

/* ============================================
   RESET & BASE
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Colors - Light Mode */
    --primary: #204ce5;
    --primary-dark: #001AB3;
    --primary-light: #527EFF;
    --text-dark: #112337;
    --text-gray: #686e77;
    --border-gray: #EBEBEB;
    --bg-light: #f8fafb;
    --white: #ffffff;
    --bg-main: #ffffff;
    --card-bg: #ffffff;

    /* Spacing */
    --spacing-xs: 8px;
    --spacing-sm: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 48px;
    --spacing-2xl: 64px;
    --spacing-3xl: 80px;

    /* Typography */
    --font-base: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --line-height-tight: 1.2;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;

    /* Borders & Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Dark Mode */
body.dark-mode {
    --text-dark: #e8eaed;
    --text-gray: #b8bcc4;
    --border-gray: #2a2d35;
    --bg-light: #1a1d24;
    --white: #ffffff;
    --bg-main: #15171c;
    --card-bg: #1e2129;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.5);
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-base);
    line-height: var(--line-height-normal);
    color: var(--text-dark);
    background: var(--bg-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: var(--line-height-tight);
    color: var(--text-dark);
}

p {
    line-height: var(--line-height-relaxed);
    color: var(--text-gray);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.section {
    padding: var(--spacing-3xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

.section-description {
    font-size: 1.125rem;
    line-height: var(--line-height-relaxed);
    max-width: 600px;
    margin: 0 auto;
}

.section-cta {
    text-align: center;
    margin-top: var(--spacing-xl);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-xs);
    padding: 14px 28px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.9375rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
    box-shadow: 0 2px 8px rgba(32, 76, 229, 0.25);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(32, 76, 229, 0.35);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--white);
}

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

.btn-white:hover {
    background: var(--bg-light);
}

.btn-large {
    padding: 18px 36px;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

/* ============================================
   NAVBAR
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 var(--border-gray);
    z-index: 1000;
    transition: background-color 0.3s ease;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 72px;
}

.navbar-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-image {
    width: 180px;
    height: auto;
    display: block;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    list-style: none;
}

.navbar-menu li {
    display: flex;
    align-items: center;
}

.navbar-menu > li > a:not(.btn) {
    font-weight: 500;
    font-size: 0.9375rem;
    color: var(--text-dark);
}

.navbar-menu > li > a:not(.btn):hover {
    color: var(--primary);
}

/* Dark Mode Toggle */
.dark-mode-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-light);
    border: 1px solid var(--border-gray);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--text-gray);
    font-size: 16px;
}

.dark-mode-toggle:hover {
    background: var(--primary);
    color: var(--white);
    transform: scale(1.05);
}

body.dark-mode .dark-mode-toggle i::before {
    content: "\f185"; /* fa-sun */
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    padding-top: calc(72px + var(--spacing-3xl));
    padding-bottom: var(--spacing-lg);
    background: linear-gradient(180deg, #f8fafb 0%, #ffffff 100%);
    text-align: center;
}

body.dark-mode .hero {
    background: linear-gradient(180deg, #1a1d24 0%, #15171c 100%);
}

.hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.hero-headline {
    font-size: 2.75rem;
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-md);
}

.hero-description {
    font-size: 1.25rem;
    line-height: var(--line-height-relaxed);
    color: var(--text-gray);
    margin-bottom: var(--spacing-xl);
}

.hero-actions {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    margin-bottom: var(--spacing-xl);
}

.hero-features {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    flex-wrap: wrap;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: 0.9375rem;
    color: var(--text-gray);
}

.hero-feature i {
    color: #10b981;
    font-size: 1.125rem;
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.features {
    background: var(--bg-main);
    padding-top: var(--spacing-xl);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-lg);
}

.feature-card {
    padding: var(--spacing-lg);
    background: var(--card-bg);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
}

.feature-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin-bottom: var(--spacing-md);
    color: var(--primary);
}

.feature-icon svg {
    width: 100%;
    height: 100%;
}

.feature-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    line-height: var(--line-height-normal);
}

.feature-description {
    font-size: 0.9375rem;
    line-height: var(--line-height-relaxed);
    color: var(--text-gray);
}

/* ============================================
   SCREENSHOTS SECTION
   ============================================ */

.screenshots {
    background: var(--bg-light);
    overflow: hidden;
}

/* Carousel Container */
.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

/* Navigation Buttons - Apple style */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 100;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-gray);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dark);
    font-size: 18px;
}

.carousel-nav:hover {
    background: var(--primary);
    color: var(--white);
    box-shadow: var(--shadow-lg);
    transform: translateY(-50%) scale(1.05);
}

.carousel-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-nav-left {
    left: var(--spacing-md);
}

.carousel-nav-right {
    right: var(--spacing-md);
}

.carousel-nav.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Apple-style Carousel */
.screenshots-carousel-wrapper {
    width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.2) transparent;
    padding: var(--spacing-xl) 0;
    cursor: grab;
    scroll-behavior: smooth;
}

/* Custom scrollbar - Apple style */
.screenshots-carousel-wrapper::-webkit-scrollbar {
    height: 8px;
}

.screenshots-carousel-wrapper::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    margin: 0 var(--spacing-xl);
}

.screenshots-carousel-wrapper::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    transition: background 0.3s ease;
}

.screenshots-carousel-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.35);
}

.screenshots-carousel-wrapper:active {
    cursor: grabbing;
}

.screenshots-carousel {
    display: flex;
    gap: var(--spacing-md);
    padding: 0 var(--spacing-xl);
    width: max-content;
}

.screenshot-item {
    flex-shrink: 0;
    width: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.85;
    transform: scale(0.95);
    position: relative;
}

.screenshot-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.03) 100%);
    opacity: 0;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.screenshot-item:hover {
    transform: scale(1.05);
    opacity: 1;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.screenshot-item:hover::after {
    opacity: 1;
}

.screenshot-item:hover ~ .screenshot-item {
    opacity: 0.6;
    transform: scale(0.92);
}

.screenshots-carousel:has(.screenshot-item:hover) .screenshot-item:not(:hover) {
    opacity: 0.6;
    transform: scale(0.92);
}

.screenshot-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.screenshot-item:hover img {
    transform: scale(1.02);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .screenshot-item {
        width: 320px;
    }

    .screenshots-carousel {
        padding: 0 var(--spacing-md);
        gap: var(--spacing-sm);
    }

    .screenshot-item:hover {
        transform: scale(1.02);
    }

    .screenshot-item:hover ~ .screenshot-item {
        opacity: 0.7;
        transform: scale(0.95);
    }

    .screenshots-carousel:has(.screenshot-item:hover) .screenshot-item:not(:hover) {
        opacity: 0.7;
        transform: scale(0.95);
    }

    .carousel-nav {
        display: none;
    }
}

/* ============================================
   BENEFITS SECTION
   ============================================ */

.benefits {
    background: var(--bg-main);
}

.benefits-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: start;
}

.benefits-intro {
    font-size: 1.125rem;
    line-height: var(--line-height-relaxed);
    margin-bottom: var(--spacing-xl);
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

.benefit-item {
    display: flex;
    gap: var(--spacing-md);
}

.benefit-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: rgba(32, 76, 229, 0.1);
    color: var(--primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.benefit-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--spacing-xs);
    line-height: var(--line-height-normal);
}

.benefit-description {
    font-size: 0.9375rem;
    line-height: var(--line-height-relaxed);
}

/* Comparison Card */
.comparison-card {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    color: var(--white);
}

.comparison-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-lg);
    color: var(--white);
}

.comparison-items {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.comparison-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.comparison-item-highlight {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
}

.comparison-info strong {
    display: block;
    font-size: 1rem;
    margin-bottom: 4px;
}

.comparison-info p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    margin: 0;
}

.comparison-icon-negative { color: #ef4444; font-size: 1.5rem; }
.comparison-icon-neutral { color: #fbbf24; font-size: 1.5rem; }
.comparison-icon-positive { color: #10b981; font-size: 1.5rem; }

/* ============================================
   TESTIMONIALS SECTION
   ============================================ */

.testimonials {
    background: var(--bg-light);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-lg);
}

.testimonial-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--primary), #a855f7);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.testimonial-name {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 2px;
    line-height: var(--line-height-normal);
}

.testimonial-role {
    font-size: 0.875rem;
    color: var(--text-gray);
    margin: 0;
}

.testimonial-stars {
    color: #fbbf24;
    margin-bottom: var(--spacing-md);
    font-size: 0.875rem;
}

.testimonial-text {
    font-size: 0.9375rem;
    line-height: var(--line-height-relaxed);
    color: var(--text-dark);
    font-style: italic;
}

/* ============================================
   FAQ SECTION
   ============================================ */

.faq {
    background: var(--bg-main);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border-gray);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary);
}

.faq-question {
    padding: var(--spacing-md) var(--spacing-lg);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1rem;
    line-height: var(--line-height-normal);
    user-select: none;
}

.faq-question:hover {
    background: var(--bg-light);
}

.faq-question i {
    color: var(--primary);
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 var(--spacing-lg) var(--spacing-md);
    font-size: 0.9375rem;
    line-height: var(--line-height-relaxed);
}

/* ============================================
   CTA SECTION
   ============================================ */

.cta {
    background: linear-gradient(135deg, var(--primary), #7c3aed);
    color: var(--white);
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    line-height: var(--line-height-tight);
    margin-bottom: var(--spacing-md);
    color: var(--white);
}

.cta-description {
    font-size: 1.125rem;
    line-height: var(--line-height-relaxed);
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: var(--spacing-xl);
}

.cta-note {
    margin-top: var(--spacing-md);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--text-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
}

body.dark-mode .footer {
    background: #0a0c0f;
    color: rgba(255, 255, 255, 0.85);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-xl);
    margin-bottom: var(--spacing-xl);
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: var(--spacing-md);
}

.footer-logo-image {
    width: 180px;
    height: auto;
    display: block;
}

.footer-description {
    font-size: 0.875rem;
    line-height: var(--line-height-relaxed);
}

.footer-title {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--spacing-md);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.footer-links a {
    font-size: 0.875rem;
    line-height: var(--line-height-normal);
}

.footer-links a:hover {
    color: #ffffff;
}

.footer-bottom {
    padding-top: var(--spacing-lg);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

body.dark-mode .footer-bottom p {
    color: rgba(255, 255, 255, 0.75);
}

/* ============================================
   FLOATING BUTTONS
   ============================================ */

.whatsapp-btn {
    position: fixed;
    bottom: var(--spacing-lg);
    right: var(--spacing-lg);
    width: 56px;
    height: 56px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 28px;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: all 0.3s ease;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.6);
}

.back-to-top {
    position: fixed;
    bottom: var(--spacing-lg);
    left: var(--spacing-lg);
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(32, 76, 229, 0.3);
    z-index: 999;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

.back-to-top:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 16px rgba(32, 76, 229, 0.4);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 1024px) {
    .benefits-content {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section {
        padding: var(--spacing-2xl) 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .navbar-menu {
        display: none;
    }

    .hero-headline {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1.125rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .screenshots-grid {
        grid-template-columns: 1fr;
    }

    .cta-title {
        font-size: 2rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Focus States */
a:focus,
button:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}
