.hero {
    padding: 160px 0 100px;
    background: var(--background);
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    display: flex;
    align-items: center;
    width: 100%;
    border-bottom: 1px solid var(--border-light);
}

@media (max-width: 640px) {
    .hero {
        padding: 140px 0 80px;
    }
}

/* Ensure hero content uses container properly */
.hero .container {
    width: 100%;
}

@media (prefers-color-scheme: dark) {
    .hero {
        background-color: var(--background);
        border-bottom: 1px solid var(--border);
    }
}


.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    margin-bottom: 28px;
    color: var(--text);
    line-height: 1.08;
    letter-spacing: -0.003em;
}

@media (min-width: 1200px) {
    .hero-title {
        font-size: 4rem;
    }
}

@media (prefers-color-scheme: dark) {
    .hero-title {
        color: var(--text);
    }
}

.hero-subtitle {
    font-size: 24px;
    color: var(--text-light);
    margin-bottom: 56px;
    font-weight: 400;
    line-height: 1.33337;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    flex-direction: row;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

/* Ensure buttons stay horizontal on desktop */
@media (min-width: 769px) {
    .hero-buttons {
        flex-direction: row !important;
        flex-wrap: nowrap;
    }
    
    .hero-buttons .btn {
        min-width: 160px;
    }
}

.apps-section {
    padding: 100px 0;
}

@media (max-width: 640px) {
    .apps-section {
        padding: 80px 0;
    }
}

.apps-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    flex-wrap: wrap;
    gap: 20px;
}

@media (min-width: 769px) {
    .apps-header {
        flex-wrap: nowrap;
    }
}

.apps-filter {
    display: flex;
    gap: 12px;
}

.filter-btn {
    padding: 10px 24px;
    border: 2px solid var(--border);
    background-color: transparent;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--text-light);
    white-space: nowrap;
}

@media (max-width: 480px) {
    .filter-btn {
        padding: 8px 20px;
        font-size: 0.875rem;
    }
}

.filter-btn.active,
.filter-btn:hover {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.app-card {
    background-color: var(--card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

/* Allow featured badge to show properly */
.app-card.card-featured {
    overflow: visible;
}

.app-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    border-color: var(--primary);
}

@media (prefers-color-scheme: dark) {
    .app-card {
        border: 1px solid var(--border);
    }
    
    .app-card:hover {
        border-color: var(--primary);
    }
}

.app-card-image {
    position: relative;
    height: 200px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.app-icon {
    width: 72px;
    height: 72px;
    background-color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
}

.app-card-content {
    padding: 30px;
}

.app-name {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--text);
}

.app-category {
    display: inline-block;
    padding: 4px 12px;
    background-color: var(--background);
    color: var(--text-light);
    border-radius: 4px;
    font-size: 0.875rem;
    margin-bottom: 16px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.app-description {
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 20px;
}

.app-buttons {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

.app-store-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background-color: var(--text);
    color: white;
    border-radius: 4px;
    font-size: 1.25rem;
    transition: all 0.2s ease;
}

.app-store-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: white;
}

.app-store-btn.apple {
    background-color: #000000;
}

.app-store-btn.apple:hover {
    background-color: #1a1a1a;
}

.app-store-btn.google {
    background-color: #4285F4;
}

.app-store-btn.google:hover {
    background-color: #5a95f5;
}

.features-section {
    padding: 100px 0;
    background-color: var(--background);
}

@media (max-width: 640px) {
    .features-section {
        padding: 80px 0;
    }
}

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

.feature-card {
    text-align: center;
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 28px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    box-shadow: 0 4px 14px 0 rgba(26, 54, 93, 0.15);
    transition: all 0.3s ease;
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
    box-shadow: 0 8px 20px 0 rgba(26, 54, 93, 0.2);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.feature-description {
    color: var(--text-light);
    line-height: 1.6;
}

.cta-section {
    padding: 120px 0;
    background: var(--gradient-primary);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.3; }
}

/* Ensure proper layout on very large screens */
@media (min-width: 1920px) {
    .hero {
        padding: 180px 0 120px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
        max-width: 800px;
    }
    
    .section {
        padding: 140px 0;
    }
}

@media (prefers-color-scheme: dark) {
    .cta-section {
        background-color: var(--primary-dark);
    }
}

.cta-title {
    font-size: 2.25rem;
    font-weight: 600;
    margin-bottom: 24px;
    line-height: 1.3;
    color: white;
}

.cta-description {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: white;
}

@media (max-width: 768px) {
    .hero {
        padding: 140px 0 80px;
        min-height: 60vh;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
        margin-bottom: 40px;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
        gap: 16px;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 320px;
    }
    
    .apps-header {
        flex-direction: column;
        gap: 24px;
        text-align: center;
    }
    
    .apps-filter {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    
    .apps-grid {
        grid-template-columns: 1fr;
    }
    
    .app-buttons {
        flex-direction: row;
    }
    
    .features-grid {
        gap: 32px;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .cta-description {
        font-size: 1.125rem;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 20px;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
        margin-bottom: 32px;
    }
    
    .hero-buttons .btn {
        padding: 14px 24px;
        font-size: 0.95rem;
    }
    
    .apps-grid {
        gap: 20px;
    }
    
    .app-card-content {
        padding: 24px;
    }
    
    .app-name {
        font-size: 1.25rem;
    }
    
    .app-description {
        font-size: 0.875rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .feature-icon {
        width: 64px;
        height: 64px;
        font-size: 1.5rem;
    }
    
    .cta-title {
        font-size: 1.75rem;
    }
    
    .cta-section {
        padding: 80px 0;
    }
}