/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    /* Prevent horizontal scrolling on mobile */
    overflow-x: hidden;
    /* Better text rendering on mobile */
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile-first container with better padding */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Mobile-optimized touch targets */
a, button, .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Header - Mobile Optimized */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    /* Safe area for devices with notches */
    padding-top: env(safe-area-inset-top);
}

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

.nav-logo img.logo-image {
    height: 16px;
    width: auto;
    display: block;
}

.nav-logo a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

.nav-logo a:hover {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

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

.nav-links a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #2563eb;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    padding: 120px 0 80px;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

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

.hero-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 300;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    gap: 20px;
}

.btn {
    display: inline-block;
    padding: 16px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: white;
    color: #2563eb;
}

.btn-primary:hover {
    background: #f8fafc;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

.btn-secondary:hover {
    background: white;
    color: #2563eb;
}

/* Phone Mockup */
.phone-mockup {
    width: 280px;
    height: 560px;
    background: #1f2937;
    border-radius: 40px;
    padding: 12px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: #f8fafc;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
}

.app-preview {
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.app-preview-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 20px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Features Section */
.features {
    padding: 100px 0;
    background: #f8fafc;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 60px;
    color: #1f2937;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature-card {
    background: white;
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1f2937;
}

.feature-card p {
    color: #6b7280;
    line-height: 1.6;
}

/* Download Section */
.download {
    padding: 100px 0;
    background: white;
    text-align: center;
}

.section-subtitle {
    font-size: 20px;
    color: #6b7280;
    margin-bottom: 50px;
}

.download-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.download-btn img {
    height: 60px;
    transition: transform 0.3s ease;
}

/* Compensate for Google Play badge's extra padding */
.download-btn img[alt*="Google Play"] {
    height: 90px;
}

.download-btn:hover img {
    transform: scale(1.05);
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    padding: 60px 0 20px;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 20px;
    color: #f9fafb;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #2563eb;
}

/* Disclaimer text styling */
.footer-section .disclaimer {
    font-size: 12px;
    line-height: 1.4;
    color: #9ca3af;
    margin-top: 15px;
    font-style: italic;
}

/* Legal Pages Styles */
.page-content {
    padding: 120px 0 80px;
    min-height: 100vh;
}

.page-header {
    text-align: center;
    margin-bottom: 60px;
}

.page-header h1 {
    font-size: 42px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 18px;
    color: #6b7280;
}

.legal-content,
.support-sections {
    max-width: 800px;
    margin: 0 auto;
}

.legal-section,
.support-section {
    margin-bottom: 50px;
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.legal-section h2,
.support-section h2 {
    font-size: 28px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 10px;
}

.legal-section h3,
.support-section h3 {
    font-size: 20px;
    font-weight: 600;
    color: #374151;
    margin: 25px 0 15px 0;
}

.legal-section p,
.support-section p {
    margin-bottom: 16px;
    line-height: 1.7;
    color: #4b5563;
}

.legal-section ul,
.support-section ul {
    margin: 16px 0;
    padding-left: 20px;
}

.legal-section li,
.support-section li {
    margin-bottom: 8px;
    line-height: 1.6;
    color: #4b5563;
}

.legal-section a,
.support-section a {
    color: #2563eb;
    text-decoration: none;
}

.legal-section a:hover,
.support-section a:hover {
    text-decoration: underline;
}

/* Support Page Specific Styles */
.faq-item,
.troubleshooting-item {
    margin-bottom: 30px;
    padding: 25px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #2563eb;
}

.faq-item h3,
.troubleshooting-item h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1f2937;
}

.contact-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.contact-method {
    background: #f8fafc;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.contact-method h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #1f2937;
}

.contact-method .btn {
    margin-top: 15px;
    display: inline-block;
}

/* Navigation logo link */
.nav-logo a {
    text-decoration: none;
    color: inherit;
}

.nav-logo a:hover {
    color: #2563eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-subtitle {
        font-size: 18px;
    }

    .hero-cta {
        justify-content: center;
        flex-wrap: wrap;
    }

    .nav-links {
        display: none;
    }

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

    .download-buttons {
        flex-direction: column;
        align-items: center;
    }

    .page-content {
        padding: 100px 0 60px;
    }

    .page-header h1 {
        font-size: 32px;
    }

    .legal-section,
    .support-section {
        padding: 25px 20px;
        margin-bottom: 30px;
    }

    .legal-section h2,
    .support-section h2 {
        font-size: 24px;
    }

    .contact-options {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 100px 0 60px;
    }

    .hero-title {
        font-size: 28px;
    }

    .section-title {
        font-size: 28px;
    }

    .phone-mockup {
        width: 240px;
        height: 480px;
    }
}

/* Advanced Mobile Optimizations */

/* In-app browser detection and optimization */
@supports (-webkit-touch-callout: none) {
    /* iOS Safari/WebView specific styles */
    body {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }

    /* Allow text selection for content areas */
    .legal-content, .support-sections, p, li {
        -webkit-user-select: text;
        user-select: text;
    }
}

/* Improved mobile typography */
@media (max-width: 768px) {
    body {
        font-size: 16px;
        line-height: 1.5;
    }

    /* Better spacing for mobile */
    .container {
        padding: 0 12px;
    }

    /* Optimize header for mobile */
    .header {
        backdrop-filter: blur(8px);
    }

    .nav-container {
        min-height: 56px;
        padding: 0 12px;
    }

    .nav-logo img.logo-image {
        height: 16px;
    }

    .nav-links {
        gap: 16px;
        font-size: 14px;
    }

    .nav-links a {
        padding: 8px 12px;
        border-radius: 6px;
        transition: background-color 0.2s ease;
    }

    .nav-links a:hover, .nav-links a:active {
        background-color: rgba(37, 99, 235, 0.1);
    }

    /* Mobile page content */
    .page-content {
        padding: 80px 0 60px;
    }

    .page-header {
        margin-bottom: 40px;
        text-align: center;
    }

    .page-header h1 {
        font-size: 28px;
        line-height: 1.2;
        margin-bottom: 8px;
    }

    .page-header p {
        font-size: 14px;
        color: #6b7280;
    }

    /* Mobile legal sections */
    .legal-section,
    .support-section {
        padding: 24px 16px;
        margin-bottom: 24px;
        border-radius: 8px;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    }

    .legal-section h2,
    .support-section h2 {
        font-size: 20px;
        margin-bottom: 16px;
        padding-bottom: 8px;
    }

    .legal-section h3,
    .support-section h3 {
        font-size: 16px;
        margin: 20px 0 12px 0;
    }

    .legal-section p,
    .support-section p {
        font-size: 15px;
        line-height: 1.6;
        margin-bottom: 16px;
    }

    .legal-section li,
    .support-section li {
        font-size: 15px;
        line-height: 1.5;
        margin-bottom: 8px;
        padding-left: 8px;
    }

    /* Mobile FAQ and troubleshooting */
    .faq-item,
    .troubleshooting-item {
        padding: 20px 16px;
        margin-bottom: 20px;
        border-radius: 6px;
        border-left-width: 3px;
    }

    .faq-item h3,
    .troubleshooting-item h3 {
        font-size: 16px;
        margin-top: 0;
        margin-bottom: 12px;
    }

    /* Mobile contact methods */
    .contact-method {
        padding: 24px 16px;
        border-radius: 8px;
        text-align: center;
    }

    .contact-method h3 {
        font-size: 16px;
        margin-bottom: 12px;
    }

    .contact-method .btn {
        font-size: 15px;
        padding: 12px 20px;
        margin-top: 12px;
        min-height: 44px;
    }

    /* Mobile footer */
    .footer {
        padding: 40px 0 20px;
    }

    .footer-content {
        gap: 32px;
        text-align: center;
    }

    .footer-section h3,
    .footer-section h4 {
        font-size: 16px;
        margin-bottom: 16px;
    }

    .footer-section p,
    .footer-section li {
        font-size: 14px;
    }

    .footer-bottom {
        padding-top: 16px;
        font-size: 12px;
    }
}

/* Extra small screens and in-app browsers */
@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .container {
        padding: 0 10px;
    }

    .nav-container {
        padding: 0 10px;
    }

    .nav-links {
        gap: 12px;
        font-size: 13px;
    }

    .nav-links a {
        padding: 6px 10px;
    }

    .page-content {
        padding: 70px 0 50px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .legal-section,
    .support-section {
        padding: 20px 12px;
        margin-bottom: 20px;
    }

    .legal-section h2,
    .support-section h2 {
        font-size: 18px;
    }

    .faq-item,
    .troubleshooting-item {
        padding: 16px 12px;
    }

    .contact-method {
        padding: 20px 12px;
    }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .page-content {
        padding: 70px 0 40px;
    }

    .page-header {
        margin-bottom: 30px;
    }

    .legal-section,
    .support-section {
        margin-bottom: 20px;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Accessibility improvements for mobile */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* In-app browser specific styles */
.in-app-browser .header {
    /* Ensure header doesn't interfere with in-app browser controls */
    position: absolute;
    top: 0;
}

.in-app-browser .page-content {
    padding-top: 100px;
}

.standalone-mode .header {
    /* Add extra padding for devices with notches in standalone mode */
    padding-top: env(safe-area-inset-top);
}

/* Improve tap targets for mobile */
@media (max-width: 768px) {
    a, button, .btn, .nav-links a {
        /* Ensure minimum 44px touch target */
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        position: relative;
    }

    /* Add visual feedback for touches */
    a:active, button:active, .btn:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }

    /* Prevent text selection on navigation elements */
    .nav-links a {
        -webkit-user-select: none;
        user-select: none;
    }

    /* Improve readability on small screens */
    .legal-section p, .support-section p {
        text-align: left;
        hyphens: auto;
        -webkit-hyphens: auto;
        word-break: break-word;
    }
}
