/* Layout-specific styles */

/* Header and navigation */
header {
    background-color: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    z-index: 1001;
}

.logo a {
    color: #667eea;
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo a:hover,
.logo a:focus {
    color: #764ba2;
}

.logo-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav ul {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    gap: 0.5rem;
    flex-wrap: wrap;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
    color: #4a5568;
    display: block;
}

nav ul li a:hover:not(:focus),
nav ul li a.active {
    background-color: #f7fafc;
    color: #667eea;
}

nav ul li a:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Hero sections */
.hero, .sleep-hero, .stress-hero, .breathe-hero, .focus-hero, .release-hero, .listen-hero {
    text-align: center;
    padding: 6rem 2rem;
    background: linear-gradient(135deg, #f6f9fc 0%, #edf2f7 100%);
    margin-bottom: 2rem;
}

.hero-message {
    font-size: 1.25rem;
    margin: 2rem 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Modules grid */
.modules {
    padding: 4rem 2rem;
    text-align: center;
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.module-card {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.module-card h3 {
    margin-bottom: 1rem;
    color: #2d3748;
}

.module-card p {
    color: #718096;
}

/* FAQ section */
.faqs {
    padding: 4rem 2rem;
    background-color: #f7fafc;
}

.faqs h2 {
    text-align: center;
    margin-bottom: 3rem;
}

.faq-item {
    background-color: white;
    padding: 2rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.faq-item h3 {
    margin-bottom: 0.5rem;
    color: #2d3748;
}

.faq-item p {
    color: #718096;
}

/* Footer */
footer {
    background-color: #2d3748;
    color: white;
    padding: 3rem 2rem;
    margin-top: 4rem;
}

/* Modern Footer Layout */
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: white;
    font-weight: 600;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    text-align: left;
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: block;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: inline-block;
    font-size: 0.95rem;
}

.footer-section ul li a:hover,
.footer-section ul li a:focus {
    color: white;
    padding-left: 4px;
    outline: none;
}

.footer-bottom {
    text-align: center;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    transition: all 0.3s ease;
}

.footer-social a:hover,
.footer-social a:focus {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    outline: none;
}

/* Space page specific */
.space-page {
    background-color: #0f172a;
    color: white;
}

.space-page header {
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
}

.space-page nav ul li a {
    color: rgba(255,255,255,0.8);
}

.space-page nav ul li a:hover,
.space-page nav ul li a.active {
    background-color: rgba(255,255,255,0.1);
    color: white;
}

.space-page footer {
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
}

.space-page footer .footer-section h4,
.space-page footer .footer-section p,
.space-page footer .footer-section ul li a,
.space-page footer .footer-bottom {
    color: rgba(255,255,255,0.8);
}

.space-page footer .footer-section ul li a:hover {
    color: white;
}

.space-hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    text-align: center;
}

.space-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, #1e293b 0%, #0f172a 100%);
    z-index: -1;
}

.space-message {
    font-size: 1.5rem;
    max-width: 600px;
    margin: 0 auto;
    color: rgba(255,255,255,0.9);
}

.space-page footer {
    background-color: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(10px);
}

/* Breathing and focus pages */
.breathing-circle, .breathing-guide {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 2rem 0;
}

.breathing-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background-color: #e2e8f0;
    margin: 0 auto;
    animation: breathe 8s infinite ease-in-out;
}

@keyframes breathe {
    0%, 100% {
        transform: scale(1);
        opacity: 0.8;
    }
    50% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Sound lists */
.sound-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.sound-item {
    background-color: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Pattern and time selectors */
.pattern-selector, .time-options {
    display: flex;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.pattern-btn, .time-btn {
    padding: 0.75rem 1.5rem;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.pattern-btn:hover, .time-btn:hover {
    background-color: #f7fafc;
}

.pattern-btn.active, .time-btn.active {
    background-color: #4a5568;
    color: white;
    border-color: #4a5568;
}

/* Timer display */
.timer-display {
    text-align: center;
    margin: 2rem 0;
}

.time-left {
    font-size: 4rem;
    font-weight: 600;
    margin-bottom: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
    }
    
    nav ul li {
        margin: 0;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .footer-links {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .time-left {
        font-size: 3rem;
    }
}