/* ═══════════════════════════════════════════════════════════════════
   SCANDINAVIAN MINIMAL + MATERIAL DESIGN 3 CSS
   Apex Fitness Center
═══════════════════════════════════════════════════════════════════ */

:root {
    /* Scandinavian Neutrals */
    --primary: #2c3e50;
    --secondary: #7f8c8d;
    --accent: #95a5a6;
    --accent-2: #bdc3c7;
    
    /* Soft Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #ecf0f1;
    
    /* Text */
    --text-primary: #2c3e50;
    --text-secondary: #7f8c8d;
    --text-tertiary: #95a5a6;
    
    /* Borders */
    --border-color: #ecf0f1;
    
    /* Spacing */
    --space-xs: 12px;
    --space-sm: 24px;
    --space-md: 36px;
    --space-lg: 48px;
    --space-xl: 72px;
    --space-2xl: 96px;
    
    /* Border Radius (Material 3) */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 2px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 4px 12px rgba(0,0,0,0.08);
    
    /* Typography */
    --font-sans: 'Inter', 'Helvetica Neue', system-ui, sans-serif;
    
    color-scheme: light;
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2a2a2a;
    --bg-tertiary: #333333;
    --text-primary: #ecf0f1;
    --text-secondary: #bdc3c7;
    --text-tertiary: #95a5a6;
    --border-color: #444444;
    color-scheme: dark;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.35rem, 3vw, 2rem); }

p {
    font-size: clamp(1rem, 2vw, 1.125rem);
    line-height: 1.7;
    color: var(--text-secondary);
}

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

/* Header & Navigation */
header {
    position: sticky;
    top: 0;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-primary);
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
}

/* Theme Toggle */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* Hero */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: linear-gradient(rgba(44, 62, 80, 0.65), rgba(44, 62, 80, 0.65)), url('https://images.unsplash.com/photo-1518611012118-696072aa579a?w=1280&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 2rem 0;
}

.hero-content {
    max-width: 680px;
}

.hero h1 {
    color: white;
    margin-bottom: 1.5rem;
}

.hero p {
    color: rgba(255,255,255,0.9);
    margin-bottom: 2rem;
}

/* Buttons - Material 3 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 24px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    border-radius: 24px;
}

/* Sections */
section {
    padding: var(--space-2xl) 0;
}

.section-title {
    text-align: center;
    margin-bottom: var(--space-lg);
}

/* Cards - Material 3 */
.card {
    background: var(--bg-primary);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
}

.card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    transform: translateY(-4px);
}

.card img {
    border-radius: 12px;
    width: 100%;
    height: 220px;
    object-fit: cover;
    margin-bottom: 1.25rem;
}

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

@media (max-width: 1024px) {
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .grid {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        flex-direction: column;
        padding: 1.5rem;
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--border-color);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .mobile-nav-toggle {
        display: flex;
    }
}

/* Form */
form {
    max-width: 600px;
    margin: 0 auto;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input, textarea, select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    font-size: 1rem;
    font-family: inherit;
    background: var(--bg-secondary);
    color: var(--text-primary);
    transition: all 0.3s ease;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-primary);
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.form-status {
    padding: 1rem;
    border-radius: 12px;
    margin-top: 1rem;
    font-weight: 500;
    text-align: center;
}

.form-status.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-status.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

[data-theme="dark"] .form-status.success {
    background: #1e3a2f;
    color: #a3d9b5;
    border-color: #2d5a45;
}

[data-theme="dark"] .form-status.error {
    background: #3a1f24;
    color: #f5a9a9;
    border-color: #5c2f35;
}

/* Footer */
footer {
    background: var(--bg-secondary);
    padding: var(--space-xl) 0;
    border-top: 1px solid var(--border-color);
}

/* Schedule Table */
table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-primary);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

th, td {
    padding: 1rem 1.25rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--bg-secondary);
    font-weight: 600;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .hero {
        min-height: 70vh;
    }
    
    section {
        padding: var(--space-xl) 0;
    }
}