/* ============================================================
   Sentrum Tannklinikk – Luxury Glassmorphism Design System
   Primary: #7f7971 (Dark Beige)  |  Background: #F9F8F6 (Cream)
   Fonts: Playfair Display (headings) + Inter (body)
   ============================================================ */

/* --- CSS Custom Properties --- */
:root {
    --primary: #1b3d5a;
    --primary-hover: #4A9DB5;
    --primary-light: rgba(74, 157, 181, 0.12);
    --primary-glow: rgba(74, 157, 181, 0.25);

    --bg: #F9F8F6;
    --bg-warm: #F4F2EF;
    --text: #2C2C2C;
    --text-muted: #1A2F3A;
    --text-light: #71727f;

    --glass-bg: rgba(255, 255, 255, 0.55);
    --glass-bg-strong: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.45);
    --glass-blur: 18px;
    --glass-shadow: 0 8px 32px rgba(31, 38, 135, 0.08);
    --glass-shadow-lg: 0 16px 48px rgba(31, 38, 135, 0.12);

    --radius: 20px;
    --radius-sm: 12px;
    --radius-xs: 8px;

    --font-base: 16px;
    --font-heading: 'Playfair Display', 'Georgia', serif;
    --font-body: 'Inter', 'Helvetica Neue', Arial, sans-serif;

    --max-width: 1400px;
    --nav-height: 110px;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- High Contrast Mode --- */
.high-contrast {
    --primary: #000000;
    --primary-hover: #222222;
    --primary-light: rgba(0, 0, 0, 0.1);
    --bg: #FFFFFF;
    --bg-warm: #F5F5F5;
    --text: #000000;
    --text-muted: #333333;
    --glass-bg: rgba(255, 255, 255, 0.95);
    --glass-bg-strong: rgba(255, 255, 255, 1);
    --glass-border: rgba(0, 0, 0, 0.3);
    --glass-shadow: none;
    --glass-shadow-lg: none;
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: var(--font-base);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.7;
    overflow: hidden;
    min-height: 100vh;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.25;
    color: var(--text);
}

h1 { font-size: 2.8rem; letter-spacing: -0.02em; }
h2 { font-size: 2.2rem; letter-spacing: -0.01em; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

p { color: var(--text-muted); }

a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-hover); }

img { max-width: 100%; display: block; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; margin-top: 50px; }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-hover); }

/* --- Hidden utility --- */
.hidden { display: none !important; }

/* ============================================================
   NAVBAR – Floating Glass
   ============================================================ */
.glass-nav {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: var(--max-width);
    background: var(--glass-bg-strong);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 0.8rem 2rem;
    z-index: 1000;
    box-shadow: var(--glass-shadow);
    transition: all var(--transition);
}

.nav-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    position: relative;
    display: inline-block;
    overflow: hidden;
}

.logo-container img {
    height: 42px;
    transition: transform var(--transition);
    display: block;
}
.logo-container img:hover { transform: scale(1.04); }

.logo-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: linear-gradient(45deg, transparent 0%, rgba(255,255,255,0.7) 40%, rgba(255,255,255,0.9) 50%, rgba(255,255,255,0.7) 60%, transparent 100%);
        animation: sweepPause 15.5s cubic-bezier(0.4,0,0,1) 0s infinite; 
    pointer-events: none;
    opacity: 0.7;
}

.logo-container img {
    position: relative;
    z-index: 1;
}



.nav-info {
    display: flex;
    gap: 24px;
    font-size: 0.85rem;
    color: var(--text-muted);
    align-items: center;
}

.nav-info span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-info .fa-map-marker-alt,
.nav-info .fa-phone { color: var(--primary); font-size: 0.8rem; }

.fb-link {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color var(--transition);
    margin-left: 8px;
}
.fb-link:hover { color: #1877F2; }

.email-link {
    color: var(--text-muted);
    font-size: 1.1rem;
    transition: color var(--transition);
}
.email-link:hover { color: #1877F2; }

/* Language Picker */
.lang-picker {
    display: flex;
    gap: 4px;
    margin-left: 8px;
}
.lang-picker button {
    background: transparent;
    border: 1.5px solid transparent;
    border-radius: var(--radius-xs);
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all var(--transition);
}
.lang-picker button:hover {
    border-color: var(--primary-glow);
    background: var(--primary-light);
}
.lang-picker button.active {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--text);
    font-weight: 600;
}
.lang-picker .fi { font-size: 1rem; }

/* Nav Links */
.nav-links {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 8px;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(127, 121, 113, 0.08);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.92rem;
    padding: 6px 16px;
    border-radius: var(--radius-xs);
    position: relative;
    transition: all var(--transition);
    letter-spacing: 0.01em;
}

.nav-links a:hover {
    color: var(--text);
    background: var(--primary-light);
}

.nav-links a.active {
    color: var(--primary);
    font-weight: 600;
}
.nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-xs);
    transition: background var(--transition);
}
.mobile-menu-btn:hover { background: var(--primary-light); }

/* Logo sweep animation */
@keyframes sweepPause {
    0% { transform: translateX(-120%) skewX(-40deg); opacity: 0; }
    3.33% { opacity: 1; }
    16.67% { opacity: 1; }
    33.33% { transform: translateX(120%) skewX(-40deg); opacity: 0; }
    100% { transform: translateX(120%) skewX(-40deg); opacity: 0; }
}

/* ============================================================
   MAIN LAYOUT – Split View (Content Left, 3D Right)
   ============================================================ */
.main-container {
    display: flex;
    height: calc(100vh - var(--nav-height));
    margin-top: var(--nav-height);
    max-width: 100%;
}

#content-wrapper {
    width: 55%;
    height: 100%;
    overflow-y: auto;
    padding: 2.5rem 4rem 4rem;
    position: relative;
}

#canvas-container {
    width: 45%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

#canvas-container canvas {
    outline: none;
    border-radius: var(--radius) 0 0 var(--radius);
}

/* Floating hero image above 3D model */
.hero-float-img {
    position: absolute;
    top: 2.5rem;
    left: calc(50% - 5%);
    transform: translateX(-50%);
    width: min(85%, 480px);
    height: auto;
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.08);
    z-index: 5;
    object-fit: cover;
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--transition-slow);
}
.hero-float-img.visible {
    opacity: 1;
}

/* Loading overlay */
#loading-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    color: var(--text-muted);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    letter-spacing: 0.03em;
    z-index: 10;
    transition: opacity 0.5s ease;
}
#loading-overlay.loaded {
    opacity: 0;
    pointer-events: none;
}

/* ============================================================
   PAGE SECTIONS – Content Transitions
   ============================================================ */
.page-section {
    display: none;
    opacity: 0;
    transform: translateY(16px);
}

.page-section.active {
    display: block;
    animation: sectionFadeIn var(--transition-slow) forwards;
}

.page-section.fade-out {
    animation: sectionFadeOut 0.3s forwards;
}

@keyframes sectionFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes sectionFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-10px); }
}

/* ============================================================
   WELCOME SECTION
   ============================================================ */
#welcome h1 {
    margin-bottom: 0.6rem;
}

#welcome .lead {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
    max-width: 540px;
}

/* Feature Grid */
.grid-menu {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    padding: 1.8rem;
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow);
    transition: all var(--transition);
    cursor: default;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background: var(--primary);
    border-radius: 3px 0 0 3px;
    transform: scaleY(0);
    transition: transform var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--glass-shadow-lg);
}
.feature-card:hover::before {
    transform: scaleY(1);
}

.feature-card h3 {
    font-family: var(--font-heading);
    color: var(--primary);
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}
.feature-card p {
    font-size: 0.92rem;
    line-height: 1.6;
}

/* Contact Us Button */
.contact-btn {
    display: block;
    width: 100%;
    margin-top: 20px;
    padding: 1rem;
    background: transparent;
    border: 3px solid var(--primary);
    border-radius: var(--radius);
    color: var(--primary);
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition);
    box-sizing: border-box;
}
.contact-btn i {
    margin-right: 0.5rem;
}
.contact-btn:hover {
    background: var(--primary);
    color: #fff;
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-content {
    max-width: 600px;
}

.about-content p {
    margin-bottom: 1.5rem;
    font-size: 1rem;
    line-height: 1.8;
}

.about-content h3 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: var(--primary);
    font-size: 1.3rem;
}

/* Team photo */
.team-photo {
    width: 100%;
    border-radius: var(--radius);
    margin: 1.5rem 0;
    box-shadow: var(--glass-shadow);
}

/* Team Grid */
.team-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 1.5rem 0 2rem;
}

.team-member {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100px;
}

.team-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--glass-bg-strong);
    border: 2px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
    transition: transform var(--transition), box-shadow var(--transition);
}

.team-member:hover .team-avatar {
    transform: translateY(-4px) scale(1.05);
    box-shadow: var(--glass-shadow-lg);
}

.team-name {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.3;
}

.team-role {
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.3;
}

/* Opening Hours */
.hours-list {
    list-style: none;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 1.5rem 2rem;
    box-shadow: var(--glass-shadow);
    margin-bottom: 2rem;
}

.hours-list li {
    display: flex;
    justify-content: space-between;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(127, 121, 113, 0.06);
    font-size: 0.95rem;
    color: var(--text-muted);
}
.hours-list li:last-child { border-bottom: none; }
.hours-list li span:first-child {
    font-weight: 600;
    color: var(--text);
    min-width: 80px;
}

/* Map placeholder */
.map-container {
    width: 100%;
    height: 280px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--glass-shadow);
    margin-top: 1rem;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ============================================================
   PRICE LIST
   ============================================================ */
#prices h2 { margin-bottom: 0.4rem; }
#prices > p { margin-bottom: 2rem; }

.price-table {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--glass-shadow);
}

.price-row {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(127, 121, 113, 0.06);
    cursor: pointer;
    transition: background var(--transition);
}
.price-row:last-child { border-bottom: none; }
.price-row:hover { background: var(--primary-light); }

.price-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.price-header .price-name {
    font-weight: 500;
    color: var(--text);
    font-size: 0.95rem;
}

.price-header .price-amount {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--primary);
    font-size: 1rem;
    white-space: nowrap;
}

.price-expand-icon {
    color: var(--text-light);
    font-size: 0.75rem;
    margin-left: 8px;
    transition: transform var(--transition);
}
.price-row.expanded .price-expand-icon {
    transform: rotate(180deg);
}

.price-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    font-size: 0.88rem;
    color: var(--text-muted);
    padding: 0 0;
}
.price-row.expanded .price-details {
    max-height: 80px;
    padding: 0.5rem 0 0.2rem;
}

/* ============================================================
   CALCULATOR – Typeform-style Wizard
   ============================================================ */
.wizard-container {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 2.5rem;
    box-shadow: var(--glass-shadow);
    position: relative;
}

/* Progress bar */
.progress-bar {
    height: 3px;
    background: var(--primary-light);
    border-radius: 3px;
    margin-bottom: 2rem;
    overflow: hidden;
}
.progress-bar .fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width var(--transition-slow);
    width: 0%;
}

/* Step headings */
.calc-step h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text);
}

/* Category & Service cards */
.calc-card-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.calc-card {
    padding: 1.2rem 1.5rem;
    border: 1.5px solid rgba(127, 121, 113, 0.15);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.4);
    position: relative;
}

.calc-card:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    transform: translateX(4px);
}

.calc-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
    box-shadow: 0 0 0 3px var(--primary-glow);
}

.calc-card .card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.calc-card .card-label {
    font-weight: 500;
    font-size: 1rem;
    color: var(--text);
}

.calc-card .card-price {
    margin-left: auto;
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
    white-space: nowrap;
}

/* Quantity input */
.qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    border: 1px solid rgba(127, 121, 113, 0.1);
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
    background: rgba(255, 255, 255, 0.3);
}

.qty-row label {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text);
}

.qty-input {
    width: 70px;
    padding: 6px 10px;
    border: 1.5px solid rgba(127, 121, 113, 0.2);
    border-radius: var(--radius-xs);
    font-family: var(--font-body);
    font-size: 1rem;
    text-align: center;
    background: white;
    color: var(--text);
    transition: border-color var(--transition);
}
.qty-input:focus {
    outline: none;
    border-color: var(--primary);
}

/* Results */
.result-line {
    display: flex;
    justify-content: space-between;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(127, 121, 113, 0.06);
    font-size: 0.95rem;
}
.result-line:last-of-type { border-bottom: none; }
.result-line .result-label { color: var(--text-muted); }
.result-line .result-value {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text);
}

.discount-section {
    margin-top: 1.5rem;
    padding: 1.2rem;
    background: rgba(127, 121, 113, 0.04);
    border-radius: var(--radius-sm);
}
.discount-section label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.92rem;
    color: var(--text-muted);
    padding: 0.4rem 0;
}
.discount-section input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

.total-box {
    margin-top: 1.5rem;
    padding: 1.2rem 1.5rem;
    background: var(--primary);
    color: white;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.1rem;
}
.total-box .total-label { font-weight: 500; }
.total-box .total-amount {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.35rem;
}

.calc-disclaimer {
    margin-top: 1rem;
    font-size: 0.8rem;
    color: var(--text-light);
    font-style: italic;
}

/* Controls */
.calc-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    gap: 12px;
}

/* ============================================================
   INSTRUCTIONS SECTION
   ============================================================ */
.instr-subtitle {
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.instr-card-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.instr-card {
    background: rgba(255, 255, 255, 0.5);
    border: 1.5px solid rgba(127, 121, 113, 0.12);
    border-radius: var(--radius-sm);
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition);
    font-weight: 500;
    color: var(--text);
}

.instr-card .instr-card-icon {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 0.8rem;
}

.instr-card:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--glass-shadow);
}

.instr-result {
    animation: sectionFadeIn var(--transition-slow) forwards;
}

.instr-result h3 {
    color: var(--primary);
    margin-bottom: 1rem;
}

.instr-result p {
    line-height: 1.8;
    font-size: 1rem;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-pri {
    padding: 10px 28px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius-xs);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    letter-spacing: 0.02em;
}
.btn-pri:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px var(--primary-glow);
}
.btn-pri:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-sec {
    padding: 10px 28px;
    background: transparent;
    color: var(--primary);
    border: 1.5px solid var(--primary);
    border-radius: var(--radius-xs);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-sec:hover {
    background: var(--primary-light);
}

.btn-text {
    padding: 8px 16px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.88rem;
    cursor: pointer;
    transition: color var(--transition);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.btn-text:hover { color: var(--primary); }

/* ============================================================
   ACCESSIBILITY PANEL – Floating Glass
   ============================================================ */
#accessibility-panel {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 2000;
}

#a11y-toggle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--primary);
    transition: all var(--transition);
}
#a11y-toggle:hover {
    transform: scale(1.08);
    box-shadow: var(--glass-shadow-lg);
}

.a11y-controls {
    position: absolute;
    bottom: 60px;
    left: 0;
    width: 280px;
    background: var(--glass-bg-strong);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--glass-shadow-lg);
    padding: 1.5rem;
    animation: sectionFadeIn 0.3s ease forwards;
}

.a11y-controls h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text);
    margin-bottom: 1.2rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid rgba(127, 121, 113, 0.08);
}

.a11y-controls label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 1rem;
}

.a11y-controls button {
    padding: 8px 16px;
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid rgba(127, 121, 113, 0.15);
    border-radius: var(--radius-xs);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    width: 100%;
}
.a11y-controls button:hover {
    background: var(--primary);
    color: white;
}

.a11y-controls input[type="range"] {
    width: 100%;
    accent-color: var(--primary);
    cursor: pointer;
}

/* ============================================================
   MOBILE / RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    :root {
        --nav-height: 0px;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.7rem; }

    .main-container {
        flex-direction: column;
        margin-top: 0;
        height: 100vh;
        overflow-y: auto;
    }

    .glass-nav {
        position: relative;
        top: 0;
        width: 100%;
        border-radius: 0;
        transform: none;
        left: 0;
        padding: 0.6rem 1.2rem;
    }

    .nav-info {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        gap: 2px;
        padding-top: 0.6rem;
        border-top: 1px solid rgba(127, 121, 113, 0.08);
    }
    .nav-links.mobile-open {
        display: flex;
    }
    .nav-links a {
        padding: 10px 12px;
        display: block;
    }

    #canvas-container {
        height: 220px;
        width: 100%;
        order: -1;
    }

    .hero-float-img {
        top: 1rem;
        width: min(70%, 320px);
        border-radius: var(--radius-sm);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    }

    #content-wrapper {
        width: 100%;
        height: auto;
        overflow: visible;
        padding: 1.5rem 1.2rem 3rem;
    }

    .grid-menu {
        grid-template-columns: 1fr;
    }

    .instr-card-grid {
        grid-template-columns: 1fr;
    }

    .wizard-container {
        padding: 1.5rem;
    }

    .calc-controls {
        flex-wrap: wrap;
    }

    #accessibility-panel {
        bottom: 12px;
        left: 12px;
    }

    #a11y-toggle {
        width: 42px;
        height: 42px;
        font-size: 1rem;
    }

    .a11y-controls {
        width: 260px;
    }
}

@media (max-width: 600px) {
    h1 { font-size: 1.65rem; }
    h2 { font-size: 1.4rem; }
    
    .feature-card { padding: 1.3rem; }
    
    .total-box {
        flex-direction: column;
        gap: 6px;
        text-align: center;
    }
}

/* ============================================================
   DESKTOP 4K SCALING – Center content
   ============================================================ */
@media (min-width: 2000px) {
    #content-wrapper {
        padding-left: 6rem;
        padding-right: 6rem;
    }
    h1 { font-size: 3.2rem; }
}
