/* Sleep Calculator - styles.css v10 */

/* Reset & Variables */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --navy: #2D4A6D;
    --navy-light: #3D5A7D;
    --cream: #F8F4E8;
    --cream-dark: #EDE9DD;
    --gold: #D4A853;
    --gold-light: #E8C77B;
    --text-dark: #1A2A3A;
    --text-light: #5A6A7A;
    --white: #FFFFFF;
    --border: #D8D4C8;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--cream);
}

/* Header */
header {
    background: var(--navy);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(45, 74, 109, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.5rem;
    font-weight: 700;
    cursor: pointer;
}

.logo-icon {
    width: 40px;
    height: 40px;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.nav-links a {
    color: var(--cream);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    cursor: pointer;
}

.nav-links a:hover {
    color: var(--gold);
    text-decoration: none;
}

/* Main Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 2rem 0 3rem;
}

.hero-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 1.5rem;
}

h1 {
    font-size: 2rem;
    color: var(--navy);
    margin-bottom: 1rem;
}

h2 {
    font-size: 1.5rem;
    color: var(--navy);
    margin: 2rem 0 1rem;
}

h3 {
    font-size: 1.25rem;
    color: var(--navy-light);
    margin: 1.5rem 0 0.75rem;
}

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

/* Calculator Card */
.calculator-card {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(45, 74, 109, 0.1);
    margin: 2rem 0;
    border: 1px solid var(--border);
}

.calc-tabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tab-btn {
    flex: 1;
    min-width: 140px;
    padding: 0.75rem 1rem;
    background: var(--cream);
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.3s;
}

.tab-btn:hover {
    border-color: var(--gold);
    color: var(--navy);
}

.tab-btn.active {
    background: var(--navy);
    color: var(--white);
    border-color: var(--navy);
}

.calc-content {
    display: none;
}

.calc-content.active {
    display: block;
}

.input-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

input[type="time"],
input[type="number"] {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    background: var(--white);
}

input[type="time"]:focus,
input[type="number"]:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212, 168, 83, 0.2);
}

.btn {
    background: var(--gold);
    color: var(--text-dark);
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    width: 100%;
}

.btn:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
}

.results {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--cream);
    border-radius: 12px;
    display: none;
    border: 1px solid var(--border);
}

.results.show {
    display: block;
}

.result-item {
    padding: 0.75rem;
    margin: 0.5rem 0;
    background: var(--white);
    border-radius: 8px;
    border-left: 4px solid var(--gold);
}

.result-time {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
}

/* Content Sections */
.content-section {
    background: var(--white);
    border-radius: 16px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 2px 10px rgba(45, 74, 109, 0.05);
    border: 1px solid var(--border);
}

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

.benefit-card {
    padding: 1.5rem;
    background: var(--cream);
    border-radius: 12px;
    border-top: 4px solid var(--gold);
    transition: transform 0.3s, box-shadow 0.3s;
}

.benefit-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(212, 168, 83, 0.2);
}

.benefit-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.tips-list {
    list-style: none;
    margin-top: 1rem;
}

.tips-list li {
    padding: 1rem;
    margin: 0.75rem 0;
    background: var(--cream);
    border-radius: 8px;
    border-left: 4px solid var(--navy);
}

.tips-list li strong {
    color: var(--navy);
}

.faq-item {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--cream);
    border-radius: 12px;
}

.faq-question {
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background: var(--navy);
    color: var(--cream);
    padding: 2rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    text-align: center;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.footer-logo svg {
    width: 36px;
    height: 36px;
}

.footer-logo span {
    font-size: 1.25rem;
    font-weight: 700;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.footer-links a {
    color: var(--cream);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--gold);
    text-decoration: underline;
}

.footer-disclaimer {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.25rem; }
    h3 { font-size: 1.1rem; }
    
    .nav-links {
        width: 100%;
        justify-content: center;
    }
    
    .calculator-card,
    .content-section {
        padding: 1.5rem;
    }
    
    .calc-tabs {
        flex-direction: column;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .logo-icon {
        width: 32px;
        height: 32px;
    }
    
    .footer-links {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    h1 { font-size: 1.5rem; }
    
    .hero-logo {
        width: 60px;
        height: 60px;
    }
    
    .benefits-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 0.75rem;
    }
}