/* Emergency fix for display issues */
html, body {
    background-image: none !important;
}

html::before, body::before, html::after, body::after {
    content: none !important;
    display: none !important;
}

body > *:not(.compact-header):not(.article-preview):not(.features):not(.cta):not(footer):not(script):not(.container) {
    display: none !important;
}

:root {
    /* Brand Colors */
    --app-primary-blue: #0A84FF;
    --app-primary-blue-subtle: rgba(10, 132, 255, 0.15);
    
    /* Background Colors - Light Mode */
    --app-background-light: #FFFFFF;
    --app-background-secondary-light: #F2F2F7;
    --app-background-tertiary-light: #E5E5EA;
    
    /* Text Colors - Light Mode */
    --app-text-primary-light: #000000;
    --app-text-secondary-light: #6E6E72;
    --app-text-tertiary-light: #8E8E93;
    
    /* Background Colors - Dark Mode */
    --app-background-dark: #121212;
    --app-background-secondary-dark: #1C1C1E;
    --app-background-tertiary-dark: #2C2C2E;
    
    /* Text Colors - Dark Mode */
    --app-text-primary-dark: #FFFFFF;
    --app-text-secondary-dark: #AEAEB2;
    --app-text-tertiary-dark: #8E8E93;
    
    /* Status Colors */
    --app-success: #34C759;
    --app-warning: #FF9500;
    --app-error: #FF3B30;
    
    /* Initial theme (light by default) */
    --app-background: var(--app-background-light);
    --app-background-secondary: var(--app-background-secondary-light);
    --app-background-tertiary: var(--app-background-tertiary-light);
    --app-text-primary: var(--app-text-primary-light);
    --app-text-secondary: var(--app-text-secondary-light);
    --app-text-tertiary: var(--app-text-tertiary-light);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --app-background: var(--app-background-dark);
        --app-background-secondary: var(--app-background-secondary-dark);
        --app-background-tertiary: var(--app-background-tertiary-dark);
        --app-text-primary: var(--app-text-primary-dark);
        --app-text-secondary: var(--app-text-secondary-dark);
        --app-text-tertiary: var(--app-text-tertiary-dark);
    }
}

/* Base styles */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--app-background);
    color: var(--app-text-primary);
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

/* Added compact header class for a more cohesive look */
.compact-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-top: 0;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h2 {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 0.9rem;
}

h3 {
    font-size: 1.75rem;
    line-height: 1.4;
    margin-bottom: 0.8rem;
}

h4 {
    font-size: 1.5rem;
    line-height: 1.4;
    margin-bottom: 0.7rem;
}

p {
    margin-top: 0;
    margin-bottom: 1rem;
}

.text-primary {
    color: var(--app-text-primary);
}

.text-secondary {
    color: var(--app-text-secondary);
}

.text-tertiary {
    color: var(--app-text-tertiary);
}

/* Header styles */
header {
    padding: 1rem 0 0.5rem;
    text-align: center;
    margin-bottom: 0;
}

.logo {
    max-width: 80px;
    height: auto;
    border-radius: 16px;
    margin-bottom: 0;
}

/* Hero section */
.hero {
    text-align: center;
    padding: 0 0 2rem;
    margin-top: 0;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    margin-top: 0.5rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--app-text-secondary);
    max-width: 800px;
    margin: 0 auto 2.5rem;
}

/* Feature section */
.features {
    padding: 2rem 0;
    background-color: var(--app-background-secondary);
}

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

.feature-card {
    background-color: var(--app-background);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--app-primary-blue);
    margin-bottom: 1.5rem;
}

.feature-title {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* Article preview section */
.article-preview {
    padding: 2rem 0;
    display: none;
    margin-top: 0;
    background-color: var(--app-background);
    z-index: 100; /* Ensure it's above any background elements */
    position: relative;
}

.article-card {
    background-color: var(--app-background);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
}

.article-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--app-text-primary);
    line-height: 1.3;
}

#article-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--app-text-primary);
    line-height: 1.3;
}

.article-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.article-description {
    color: var(--app-text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.6;
    position: relative;
    overflow: hidden;
}

/* Blurred content effect */
.article-description.has-blur {
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
}

.article-description .visible-content {
    margin-bottom: 0.5rem;
}

.article-description .blurred-content {
    position: relative;
    color: transparent;
    text-shadow: 0 0 8px var(--app-text-secondary);
    user-select: none;
    max-height: 150px;
    overflow: hidden;
}

.article-description .blurred-content::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        transparent 0%,
        var(--app-background) 90%
    );
    pointer-events: none;
}

/* Remove the fade effect as it's interfering with readability */
.article-description::after {
    display: none;
}

/* CTA section */
.cta {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(135deg, var(--app-primary-blue), #0063CE);
    color: white;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.cta-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Button styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-sizing: border-box; /* Include padding in width calculation */
    max-width: 100%; /* Ensure button doesn't exceed container width */
    overflow: hidden; /* Hide overflow text */
    text-overflow: ellipsis; /* Add ellipsis for overflow text */
}

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

.btn-primary:hover {
    background-color: #007AE1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.btn-secondary:hover {
    background-color: #F5F5F5;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.app-store-button {
    display: inline-block;
    margin-top: 1rem;
}

.app-store-button img {
    height: 50px;
    transition: transform 0.2s ease;
}

.app-store-button:hover img {
    transform: translateY(-2px);
}

/* Footer */
footer {
    background-color: var(--app-background-secondary);
    padding: 3rem 0;
    color: var(--app-text-secondary);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2rem;
}

.footer-logo {
    max-width: 80px;
    margin-bottom: 1rem;
    border-radius: 15px;
}

.footer-section h4 {
    color: var(--app-text-primary);
    margin-bottom: 1.5rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--app-text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--app-primary-blue);
}

/* Footer logo link styles */
.footer-logo-link {
    text-decoration: none;
    color: var(--app-text-secondary);
    display: inline-block;
    transition: transform 0.2s ease;
}

.footer-logo-link:hover {
    transform: translateY(-2px);
}

.footer-logo-link p {
    color: var(--app-text-secondary);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--app-background-tertiary);
    margin-top: 2rem;
}

/* Media queries for responsive design */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
}

/* When article is shown, adjust the spacing of other sections */
body.has-article .compact-header {
    padding-bottom: 0;
}

body.has-article .hero {
    display: none;
}

body.has-article .features {
    display: none;
}

/* Create a more compact CTA section */
.cta-buttons {
    margin-top: 2rem;
    text-align: center;
    width: 100%; /* Ensure full width containment */
    padding: 0; /* Remove any padding that might cause overflow */
    box-sizing: border-box; /* Include padding in width calculation */
}

.cta-buttons .btn-primary {
    margin-bottom: 1rem;
    width: 100%;
    padding: 1rem;
    font-size: 1.2rem;
    box-sizing: border-box; /* Include padding in width calculation */
    max-width: 100%; /* Ensure button doesn't exceed container width */
    white-space: normal; /* Allow text to wrap if needed */
    display: block; /* Change from inline-block to block for better width control */
}

/* Fix for oversized logo */
body::before {
    content: none !important; /* Remove any potential background content */
}

.preview-logo {
    width: 60px;
    height: 60px;
    display: block;
    margin: 0 auto 1rem;
    border-radius: 12px;
    max-width: 100%;
    object-fit: contain;
}

/* Specific mobile adjustments */
@media (max-width: 480px) {
    .article-card {
        padding: 1rem; /* Reduce padding on small screens */
    }
    
    .cta-buttons .btn-primary {
        padding: 0.8rem; /* Slightly reduce padding on very small screens */
        font-size: 1.1rem; /* Slightly smaller font on very small screens */
    }
} 