/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --background: #ffffff;
    --foreground: #0a0a0a;
    --card: #ffffff;
    --card-foreground: #0a0a0a;
    --popover: #ffffff;
    --popover-foreground: #0a0a0a;
    --primary: #171717;
    --primary-foreground: #fafafa;
    --secondary: #f5f5f5;
    --secondary-foreground: #171717;
    --muted: #f5f5f5;
    --muted-foreground: #737373;
    --accent: #f5f5f5;
    --accent-foreground: #171717;
    --destructive: #ef4444;
    --destructive-foreground: #fafafa;
    --border: #e5e5e5;
    --input: #e5e5e5;
    --ring: #171717;
    --radius: 0.5rem;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: #0a0a0a;
        --foreground: #fafafa;
        --card: #0a0a0a;
        --card-foreground: #fafafa;
        --popover: #0a0a0a;
        --popover-foreground: #fafafa;
        --primary: #fafafa;
        --primary-foreground: #171717;
        --secondary: #171717;
        --secondary-foreground: #fafafa;
        --muted: #171717;
        --muted-foreground: #a3a3a3;
        --accent: #171717;
        --accent-foreground: #fafafa;
        --destructive: #7f1d1d;
        --destructive-foreground: #fafafa;
        --border: #262626;
        --input: #262626;
        --ring: #d4d4d8;
    }
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--foreground);
    background-color: var(--background);
    scroll-behavior: smooth;
}

/* Navigation */
.navbar {
    position: sticky;
    top: 0;
    background: var(--background);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

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

.nav-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--foreground);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: var(--muted-foreground);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

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

@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
    }
    
    .nav-link {
        font-size: 0.9rem;
    }
    
    .nav-title {
        font-size: 1.25rem;
    }
}

/* Main content */
.main-content {
    min-height: calc(100vh - 140px);
}

.section {
    padding: 4rem 0;
}

.section:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--foreground);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--muted-foreground);
}

/* Hero section styles */
.hero-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, var(--background) 0%, var(--muted) 100%);
}

.hero-content {
    text-align: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    color: var(--foreground);
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Feature grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.feature-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--foreground);
}

.feature-card p {
    color: var(--muted-foreground);
    line-height: 1.6;
}

/* CTA section */
.cta-section {
    margin-top: 4rem;
}

.cta-section h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--foreground);
}

.cta-section > p {
    font-size: 1.1rem;
    color: var(--muted-foreground);
    margin-bottom: 3rem;
}

/* Legal links */
.legal-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.legal-link-card {
    display: block;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    position: relative;
}

.legal-link-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.legal-link-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--foreground);
}

.legal-link-card p {
    color: var(--muted-foreground);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.link-arrow {
    position: absolute;
    bottom: 1.5rem;
    right: 2rem;
    font-size: 1.25rem;
    color: var(--muted-foreground);
    transition: transform 0.2s ease;
}

.legal-link-card:hover .link-arrow {
    transform: translateX(4px);
    color: var(--primary);
}

/* Page navigation */
.page-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    gap: 1rem;
}

.nav-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

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

.nav-btn.primary:hover {
    background: var(--primary);
    opacity: 0.9;
    transform: translateX(2px);
}

.nav-btn.secondary {
    background: var(--secondary);
    color: var(--secondary-foreground);
    border: 1px solid var(--border);
}

.nav-btn.secondary:hover {
    background: var(--accent);
    transform: translateX(-2px);
}

/* Active navigation state */
.nav-link.active {
    color: var(--foreground);
    font-weight: 600;
    position: relative;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -0.5rem;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary);
    border-radius: 1px;
}

/* Loading states and animations */
.submit-btn.loading {
    position: relative;
    color: transparent;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary-foreground);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Success message */
.success-message {
    background: #dcfce7;
    color: #166534;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border: 1px solid #bbf7d0;
}

.error-message {
    background: #fef2f2;
    color: #dc2626;
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    border: 1px solid #fecaca;
}

/* Smooth scrolling enhancements */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Focus styles for accessibility */
.nav-link:focus,
.form-input:focus,
.form-textarea:focus,
.submit-btn:focus,
.footer-link:focus {
    outline: 2px solid var(--ring);
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .navbar,
    .footer,
    #contact {
        display: none;
    }
    
    .section {
        page-break-inside: avoid;
    }
    
    .content-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Additional responsive styles for new components */
@media (max-width: 768px) {
    /* Hero section mobile */
    .hero-section {
        padding: 4rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 3rem;
    }
    
    /* Feature grid mobile */
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }
    
    .feature-card {
        padding: 1.5rem;
    }
    
    /* Legal links mobile */
    .legal-links {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .legal-link-card {
        padding: 1.5rem;
    }
    
    /* Page navigation mobile */
    .page-navigation {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-btn {
        width: 100%;
        text-align: center;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .feature-card {
        padding: 1rem;
    }
    
    .legal-link-card {
        padding: 1rem;
    }
}

/* Contact page specific fixes - moved above media queries for priority */
.contact-card .contact-form {
    margin-bottom: 2rem !important;
    max-width: 600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    background: none !important;
    box-shadow: none !important;
}

.contact-card .contact-info {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 2rem !important;
    margin-top: 2rem !important;
    max-width: 600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
}

@media (max-width: 768px) {
    .contact-card .contact-info {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        margin-top: 1.5rem !important;
    }
    .contact-card .contact-form {
        padding: 0 !important;
    }
}

/* Contact page navigation override */
.contact-card ~ .page-navigation {
    margin-top: 2rem !important;
    padding-top: 1.5rem !important;
    border-top: 1px solid var(--border) !important;
    display: flex !important;
    justify-content: space-between !important;
    gap: 1rem !important;
    max-width: 600px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
}

@media (max-width: 480px) {
    .contact-card ~ .page-navigation {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
}

/* Content card base styles */
.content-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

/* Form styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--foreground);
    font-size: 0.875rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background-color: var(--background);
    color: var(--foreground);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--muted-foreground);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--primary);
    color: var(--primary-foreground);
    border: none;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    background: var(--primary);
    opacity: 0.9;
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.contact-info {
    margin-top: 2rem;
    display: grid;
    gap: 1.5rem;
}

.info-item h4 {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--foreground);
}

.info-item p {
    color: var(--muted-foreground);
}

.info-item a {
    color: var(--primary);
    text-decoration: none;
}

.info-item a:hover {
    text-decoration: underline;
}

/* Contact card container */
.contact-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Footer styles */
.footer {
    background: var(--muted);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: 4rem;
}

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

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-link {
    color: var(--muted-foreground);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s ease;
}

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

/* Policy content styles */
.policy-content {
    max-width: none;
    line-height: 1.7;
}

.policy-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--foreground);
}

.policy-content h3:first-child {
    margin-top: 0;
}

.policy-content p {
    margin-bottom: 1rem;
    color: var(--foreground);
}

.policy-content ul {
    margin: 1rem 0;
    padding-left: 1.5rem;
}

.policy-content li {
    margin-bottom: 0.5rem;
    color: var(--foreground);
}

.policy-content strong {
    font-weight: 600;
    color: var(--foreground);
}

.policy-content a {
    color: var(--primary);
    text-decoration: none;
}

.policy-content a:hover {
    text-decoration: underline;
}

/* Mobile responsive styles for footer and policy pages */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer-links {
        gap: 1rem;
    }
    
    .policy-content {
        font-size: 0.95rem;
    }
    
    .policy-content h3 {
        font-size: 1.1rem;
        margin-top: 1.5rem;
    }
    
    .policy-content ul {
        padding-left: 1.25rem;
    }
}

@media (max-width: 480px) {
    .footer {
        padding: 1.5rem 0;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .policy-content {
        font-size: 0.9rem;
    }
    
    .policy-content h3 {
        font-size: 1rem;
    }
}
