/* Solana News App Page - Modern Dark Theme */

/* Override header visibility */
.header-area {
    display: block !important;
}

/* App Intro Section (below header) */
.app-intro {
    padding: 3rem 0 4rem;
    position: relative;
}

.intro-text {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

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

/* Download Button */
.download-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: white;
    color: var(--primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    margin-top: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.download-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    color: var(--primary);
}

.download-button i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/* Sections */
.app-features,
.app-stats,
.app-gallery,
.cta-section {
    padding: 80px 0;
}

.app-features {
    background: var(--bg-darker);
}

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

.section-heading h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-heading p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
}

/* Feature Cards */
.feature-card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    border: 1px solid var(--border);
    transition: all 0.4s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.feature-icon i {
    font-size: 2rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.feature-card p {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Stats Section */
.app-stats {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.stat-card {
    text-align: center;
    padding: 2rem 1rem;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Gallery Section */
.app-gallery {
    background: var(--bg-darker);
}

.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
}

.gallery-item {
    cursor: pointer;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    background: var(--card-bg);
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

/* Gallery Modal */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    cursor: pointer;
    padding: 2rem;
    /* Centering properties - always applied */
    align-items: center;
    justify-content: center;
}

.gallery-modal.active {
    display: flex;
}

.gallery-modal img {
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    display: block;
    border-radius: 10px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cta-section h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .app-hero h1 {
        font-size: 2.5rem;
    }

    .section-heading h2 {
        font-size: 2rem;
    }

    .gallery-container {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }
}

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

    .app-hero h1 {
        font-size: 2rem;
    }

    .app-hero p {
        font-size: 1rem;
    }

    .app-features,
    .app-stats,
    .app-gallery,
    .cta-section {
        padding: 60px 0;
    }

    /* Optimized gallery for tablet - 2 columns with controlled height */
    .gallery-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .gallery-item img {
        max-height: 400px;
        object-fit: cover;
        object-position: top;
    }

    .stat-number {
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    /* Compact gallery for mobile - smaller 2-column grid */
    .gallery-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .gallery-item {
        border-radius: 12px;
    }

    .gallery-item img {
        max-height: 300px;
        object-fit: cover;
        object-position: top;
    }

    /* Reduce section padding on mobile for more compact layout */
    .app-gallery {
        padding: 50px 0;
    }

    .section-heading {
        margin-bottom: 2rem;
    }

    .section-heading h2 {
        font-size: 1.75rem;
    }

    .section-heading p {
        font-size: 1rem;
    }
}

/* ============================================
   COLOR CONSISTENCY UPDATES
   ============================================ */

/* Ensure all gradients use theme colors */
.app-hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
}

.cta-section {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
}

.feature-icon {
    background: linear-gradient(135deg, var(--primary), var(--secondary)) !important;
}

.download-button {
    background: white !important;
    color: var(--primary) !important;
}

.download-button:hover {
    background: white !important;
    color: var(--primary) !important;
}

/* Stats gradient background */
.app-stats {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(139, 92, 246, 0.05)) !important;
}
