/* Global Styles - global-styles.css */
/* Modern CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #179B95;
    --primary-color-rgb: 23, 155, 149;
    --secondary-color: #E1CB36;
    --secondary-color-rgb: 225, 203, 54;
    --dark-color: #001716;
    --dark-color-rgb: 0, 23, 22;
    --light-color: #ecfafa;
    --light-color-rgb: rgb(236, 250, 250);
    --background-color: #f6fefc;
    --text-color: #333333;
    --light-text: #666666;
    --border-radius: 15px;
    --border-radius-circle: 50%;
    --card-color: #f1fcfc;
    --card-shadow: 0 8px 25px rgba(20, 141, 135, 0.2);
    --card-shadow-hover: 0 16px 35px rgba(var(--primary-color-rgb), 0.25);
    --card-shadow-dark: 0 4px 20px rgba(64, 224, 208, 0.1);
    --card-shadow-hover-dark: 0 12px 40px rgba(64, 224, 208, 0.2);
    --max-width: 1200px;

    --space-8: 8rem;
    --space-6: 6rem;
    --space-4: 4rem;
    --space-3: 3rem;
    --space-2-5: 2.5rem;
    --space-2: 2rem;
    --space-1-5: 1.5rem;
    --space-1-25: 1.25rem;
    --space-1: 1rem;
    --space-0-75: 0.75rem;

    /* How It Works shared sizes */
    --hiw-line-thickness: 4px;            /* repeated line thickness */
    --hiw-seg-length: 32px;               /* repeated segment length */
    --hiw-central-horizontal-inset: 25%;  /* left/right inset for central horizontals */
    --hiw-container-height: 70px;         /* container height */
    --hiw-split-horizontal-top: 32px;     /* top offset of split central horizontal */
    --hiw-merge-horizontal-top: 28px;     /* top offset of merge central horizontal */
}

[data-theme="dark"] {
    --background-color: #1a1a1a;
    --text-color: #ffffff;
    --light-text: #cccccc;
    --card-color: #1b1d1f;
}

/* Screen-reader only utility */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Navigation */
.nav-container {
    position: absolute;
    top: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    gap: 2rem;
    padding: 0.75rem 1.5rem;
    background: rgba(var(--light-color-rgb), 0.2);
    backdrop-filter: blur(8px);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: fit-content;
}

.nav-content {
    display: flex;
    gap: 2rem;
    align-items: center;
    padding: 0.75rem 1.5rem;
    max-width: var(--max-width);
    width: 100%;
}

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    position: relative;
    padding: 0.25rem 0;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.3s ease;
}

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

.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

.nav-link.active {
    color: var(--primary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Settings Container */
.settings-container {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 1001;
    background: rgba(var(--primary-color-rgb), 0.1);
    backdrop-filter: blur(8px);
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 0.75rem;
}

.toggle-container {
    display: flex;
    flex-direction: row;
    gap: 0.75rem;
}

/* Theme Toggle */
.theme-toggle {
    background: var(--primary-color);
    border: none;
    border-radius: var(--border-radius-circle);
    width: 2.25rem;
    height: 2.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
    background: var(--secondary-color);
}

.theme-toggle i {
    font-size: 1rem;
    color: var(--background-color);
}

/* Language Toggle Dropdown */
.lang-toggle {
    position: relative;
}

.lang-toggle-button {
    background: var(--primary-color);
    border: none;
    border-radius: 10px;
    min-width: 8rem;
    height: 2.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    transition: all 0.3s ease;
    padding: 0 0.75rem;
    color: var(--background-color);
    font-size: 0.9rem;
    font-weight: 500;
}

.lang-toggle-button:hover {
    background: var(--secondary-color);
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-arrow {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.lang-toggle.open .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--background-color);
    border: 1px solid rgba(var(--primary-color-rgb), 0.2);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 10rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    overflow: hidden;
}

.lang-toggle.open .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease;
    color: var(--text-color);
    font-size: 0.9rem;
}

.lang-option:hover {
    background: rgba(var(--primary-color-rgb), 0.1);
}

.lang-option.active {
    background: rgba(var(--primary-color-rgb), 0.15);
    font-weight: 600;
}

/* Flag Icons using flag-icons library */
.fi {
    width: 1.3rem;
    height: auto;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
}

/* Mobile Settings */
.mobile-settings-trigger {
    display: none;
    background: var(--primary-color);
    border: none;
    border-radius: var(--border-radius-circle);
    width: 2.5rem;
    height: 2.5rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--background-color);
    font-size: 1.2rem;
}

.mobile-settings-trigger:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

/* Settings Popup */
.settings-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2000;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding-top: 5rem;
}

.settings-popup.active {
    display: flex;
}

.settings-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: -1;
}

.settings-popup-content {
    background: var(--background-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    padding-bottom: 2rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease;
    position: relative;
    z-index: 2001;
    overflow: visible;
}

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

.settings-popup-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 1.5rem 0;
    text-align: center;
}

.settings-section {
    margin-bottom: 1.5rem;
    min-height: 5rem;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.settings-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 0.75rem;
    opacity: 0.8;
}

/* Theme Switch */
.theme-switch-container {
    width: 100%;
}

.theme-switch {
    position: relative;
    width: 100%;
    height: 3rem;
    background: var(--background-color);
    border: 2px solid rgba(var(--primary-color-rgb), 0.3);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 0.3rem;
    gap: 0.3rem;
    transition: all 0.3s ease;
}

.theme-switch:hover {
    border-color: var(--primary-color);
}

.theme-switch-option {
    flex: 1;
    text-align: center;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 2;
    transition: color 0.3s ease;
    padding: 0.5rem;
    color: var(--text-color);
    opacity: 0.6;
}

.theme-switch-option.theme-dark {
    margin-right: 0.25rem;
}

.theme-switch-slider {
    position: absolute;
    top: 0.3rem;
    left: 0.3rem;
    width: calc(50% - 0.45rem);
    height: calc(100% - 0.6rem);
    background: var(--primary-color);
    border-radius: 8px;
    transition: transform 0.3s ease;
    z-index: 1;
}

.theme-switch[aria-checked="true"] .theme-switch-slider {
    transform: translateX(calc(100% + 0.3rem));
}

.theme-switch[aria-checked="false"] .theme-light {
    color: var(--background-color);
    opacity: 1;
}

.theme-switch[aria-checked="true"] .theme-dark {
    color: var(--background-color);
    opacity: 1;
}

/* Mobile Language Toggle in Popup */
.mobile-lang-toggle {
    position: relative;
    z-index: 1;
}

.mobile-lang-toggle .lang-toggle-button {
    width: 100%;
    justify-content: space-between;
}

.mobile-lang-toggle .lang-dropdown {
    width: 100%;
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.settings-section {
    position: relative;
    z-index: 1;
    overflow: visible;
}

/* Responsive Design */
@media (max-width: 655px) {
    .desktop-settings {
        display: none !important;
    }
    
    .mobile-settings-trigger {
        display: flex;
    }
    
    .nav-container {
        gap: 1rem;
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding-top: 6rem;
    padding-bottom: 2rem;
    background: linear-gradient(rgba(23, 155, 149, 0.1), rgba(142, 226, 220, 0.1));
    overflow: hidden;
}

.hero-content {
    max-width: 1200px;
    padding: var(--space-2);
    text-align: center;
    position: relative;
    z-index: 1;
    margin: 0 auto;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    animation: fadeInUp 1s ease forwards;
    padding-bottom: 0.2em;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    margin-bottom: 1.5rem !important;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    color: var(--text-color);
    opacity: 0.9;
    padding: 0;
}

[data-theme="dark"] .hero-subtitle {
    color: white;
    opacity: 0.95;
}

/* Section Titles */
.section-title {
    text-align: center;
    font-size: clamp(2rem, 5vw, 3rem);
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

.section-subtitle {
    text-align: center;
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin-bottom: 3rem;
    color: var(--light-text);
    line-height: 1.6;
}

[data-theme="dark"] .section-subtitle {
    color: #cccccc;
    opacity: 0.9;
}

/* Footer */
.footer {
    text-align: center;
    padding: 2rem;
    background-color: var(--background-color);
    color: var(--light-text);
    z-index: 2;
}

.footer p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.footer-separator {
    color: var(--light-text);
}

.footer-link {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--secondary-color);
}

/* Ensure Font Awesome icons are loaded */
.fab, .fas {
    display: inline-block !important;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

.scroll-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 2.75rem;
    height: 2.75rem;
    border: none;
    border-radius: var(--border-radius-circle);
    background: var(--primary-color);
    color: var(--background-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(var(--primary-color-rgb), 0.3);
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 1002;
}

.scroll-top:hover {
    background: var(--secondary-color);
    transform: translateY(0) scale(1.05);
}

.scroll-top.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.scroll-top i {
    font-size: 1rem;
}

/* Animations */
.animate-in {
    animation: fadeInUp 1s ease forwards;
    opacity: 0;
}

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

@keyframes floatUpDown {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Primary Button Styles */
.cta-button {
    display: inline-block;
    padding: 1rem 2rem !important;
    background: var(--primary-color) !important;
    color: var(--background-color) !important;
    text-decoration: none;
    border: none !important;
    border-radius: var(--border-radius) !important;
    font-weight: 600 !important;
    font-size: clamp(1rem, 2vw, 1.1rem) !important;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease !important;
    box-shadow: 0 4px 15px rgba(23, 155, 149, 0.2);
}

.cta-button:hover {
    background: var(--secondary-color) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(225, 203, 54, 0.3) !important;
}

/* Ripple Effect - Diagonal Sweep */
.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.cta-button:active::before {
    left: 100%;
    transition: left 0s;
}

.cta-button:active {
    transform: translateY(0) !important;
}

/* Dark mode adjustments for nav */
[data-theme="dark"] .nav-container {
    background: rgba(var(--primary-color-rgb), 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Media queries for mobile responsiveness */
@media (max-width: 480px) {
    .header-container {
        padding: 0 1rem;
    }

    .nav-container {
        padding: 0.5rem 1rem;
        gap: 1rem;
        display: flex;
        align-items: center;
    }
    
    .settings-container {
        padding: 0.5rem;
    }
    
    /* Mobile settings already handled by 655px breakpoint */
    .desktop-settings {
        display: none !important;
    }
    
    .mobile-settings-trigger {
        display: flex !important;
    }

    /* Footer responsive adjustments */
    .footer p {
        flex-direction: column;
        gap: 0.5rem;
        align-items: center;
    }

    .footer-separator {
        display: none;
    }

    .footer-social {
        margin-left: 0;
    }

    .social-link {
        padding: 0.5rem 1rem;
    }
}

/* Decorative Circles */
.decorative-circle {
    position: absolute;
    border-radius: 50%;
    background: var(--primary-color);
    opacity: 0.2;
    z-index: 0;
    animation: floatUpDown 10s ease-in-out infinite;
}

[data-theme="dark"] .decorative-circle {
    opacity: 0.1;
}

.circle-1 {
    width: 350px;
    height: 350px;
    top: -150px;
    left: -150px;
    animation-duration: 4s;
}

.circle-2 {
    width: 250px;
    height: 250px;
    bottom: -90px;
    right: -100px;
    background: var(--secondary-color);
    animation-duration: 4s;
    animation-delay: 1s;
    z-index: -1;
}

/* Success Icon styles */
.success-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    display: inline-block;
}

.success-icon i {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* App Cards */
.app-card {
    width: 100%;
    padding: clamp(1.5rem, 3vw, 2rem);
    background: var(--card-color);
    border-radius: var(--border-radius);
    border: 1px solid var(--primary-color);
    text-align: center;
    position: relative;
    box-shadow: var(--card-shadow);
    margin: 0;
    transition: all 0.3s ease;
    overflow: hidden;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.app-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--card-shadow-hover);
}

.app-card:hover::before {
    transform: scaleX(1);
}

.app-card .feature-icon {
    font-size: 3rem;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.app-card:hover .feature-icon {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.app-card h3 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    margin-bottom: 1rem;
    color: var(--text-color);
}

.app-card p {
    font-size: clamp(0.9rem, 2vw, 1rem);
    color: var(--light-text);
    line-height: 1.6;
}

[data-theme="dark"] .app-card {
    box-shadow: var(--card-shadow-dark);
    border: none;
    background: var(--card-color);
}

[data-theme="dark"] .app-card:hover {
    box-shadow: var(--card-shadow-hover-dark);
}

@media (max-width: 1200px) {
    .app-card { padding: clamp(1.25rem, 2.5vw, 1.75rem); }
    .app-card .feature-icon { width: 72px; height: 72px; font-size: 2.5rem; margin: 0 auto 1.25rem; }
}
@media (max-width: 900px) {
    .app-card { padding: 1rem; }
    .app-card .feature-icon { width: 64px; height: 64px; font-size: 2.25rem; margin: 0 auto 0.75rem; }
}
@media (max-width: 600px) {
    .app-card .feature-icon { width: 56px; height: 46px; font-size: 2rem; margin: 0 auto 0; }
}