/* ==========================================================================
   Right Track Physiotherapy — Shared CSS
   Covers: reset, variables, body, header/nav, language switcher, back button,
           buttons, footer, FAQ, common sections, and responsive base.
   ========================================================================== */

/* ---------- 1. Reset + CSS Variables ---------- */

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

:root {
    --navy: #0A1628;
    --orange: #FF6B35;
    --white: #ffffff;
    --off-white: #F8F9FA;
    --light-gray: #E9ECEF;
    --text-dark: #212529;
    --text-gray: #6C757D;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 140px;
}

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

/* ---------- 2. Header & Navigation (glass effect) ---------- */

header {
    padding: 1.2rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.7) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0.6) 100%
    );
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 4px 30px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    transition: padding 0.3s ease;
}

header.scrolled {
    padding: 0.6rem 0;
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.5rem 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 120px;
    width: auto;
    transition: height 0.3s ease;
}

header.scrolled .logo img {
    height: 60px;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.logo-text .first-word {
    color: var(--navy);
    font-size: 1.4rem;
    font-weight: 800;
}

.logo-text .second-word {
    color: var(--orange);
    font-size: 1.4rem;
    font-weight: 800;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    align-items: center;
    margin: 0;
    padding: 0;
    justify-content: center;
    flex: 1;
}

nav li {
    margin: 0;
}

nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
}

nav a:hover {
    color: var(--orange);
}

/* ---------- 3. Nav CTA Buttons (glass) ---------- */

.nav-cta {
    color: var(--white) !important;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    background: linear-gradient(
        135deg,
        rgba(10, 22, 40, 0.85) 0%,
        rgba(10, 22, 40, 0.6) 50%,
        rgba(10, 22, 40, 0.75) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.nav-cta:hover {
    background: linear-gradient(
        135deg,
        rgba(255, 107, 53, 0.9) 0%,
        rgba(255, 107, 53, 0.65) 50%,
        rgba(255, 107, 53, 0.8) 100%
    );
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow:
        0 8px 25px rgba(255, 107, 53, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.nav-cta-orange {
    color: var(--white) !important;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    white-space: nowrap;
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    background: linear-gradient(
        135deg,
        rgba(255, 107, 53, 0.95) 0%,
        rgba(255, 107, 53, 0.7) 50%,
        rgba(255, 107, 53, 0.85) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow:
        0 4px 15px rgba(255, 107, 53, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.nav-cta-orange:hover {
    background: linear-gradient(
        135deg,
        rgba(10, 22, 40, 0.9) 0%,
        rgba(10, 22, 40, 0.65) 50%,
        rgba(10, 22, 40, 0.8) 100%
    );
    color: var(--white) !important;
    transform: translateY(-2px);
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ---------- 4. Language Switcher — Nav variant (header pages) ---------- */

.language-switcher {
    display: flex;
    gap: 6px;
    align-items: center;
    margin-left: 15px;
}

.language-switcher .lang-btn {
    background: transparent;
    border: 2px solid var(--light-gray);
    color: var(--text-dark);
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.language-switcher .lang-btn:hover {
    border-color: var(--orange);
    color: var(--orange);
}

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

/* Mobile Language Switcher */
.mobile-lang-switcher {
    display: none;
    gap: 8px;
    align-items: center;
}

.mobile-lang-switcher .lang-btn {
    padding: 6px 12px;
    font-size: 0.85rem;
    border: none;
    background: transparent;
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s;
}

.mobile-lang-switcher .lang-btn.active {
    color: var(--navy);
    font-weight: 700;
}

.mobile-lang-switcher .lang-btn:hover {
    color: var(--orange);
}

/* ---------- 5. Language Switcher — Fixed variant (service / profile pages) ---------- */

.lang-switcher {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 8px;
}

.lang-switcher .lang-btn {
    padding: 8px 16px;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.lang-switcher .lang-btn.active {
    background: var(--navy);
    color: var(--white);
}

.lang-switcher .lang-btn:not(.active) {
    background: rgba(255, 255, 255, 0.9);
    color: var(--navy);
    backdrop-filter: blur(10px);
}

.lang-switcher .lang-btn:not(.active):hover {
    background: var(--orange);
    color: var(--white);
}

/* ---------- 6. Back Button (glass) ---------- */

.back-button {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    text-decoration: none;
    color: var(--navy);
    font-weight: 600;
    font-size: 1rem;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.85) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0.75) 100%
    );
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50px;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.back-button:hover {
    background: linear-gradient(
        135deg,
        rgba(10, 22, 40, 0.9) 0%,
        rgba(10, 22, 40, 0.65) 50%,
        rgba(10, 22, 40, 0.8) 100%
    );
    color: var(--white);
    transform: translateX(-3px);
    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.back-arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.back-button:hover .back-arrow {
    transform: translateX(-3px);
}

/* ---------- 7. Mobile Menu Button ---------- */

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--navy);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.mobile-overlay.active {
    display: block;
    opacity: 1;
}

/* ---------- 8. Dropdown (nav) ---------- */

.dropdown {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    font-size: 0.95rem;
    gap: 4px;
}

.dropdown-toggle:hover {
    color: var(--orange);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: -50px;
    background: var(--white);
    list-style: none;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    min-width: 300px;
    padding: 12px 0;
    z-index: 1001;
    border: 1px solid var(--light-gray);
    animation: slideDown 0.2s ease;
}

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

.dropdown.active .dropdown-menu {
    display: block;
}

.dropdown-menu li {
    margin: 0;
}

.dropdown-menu a {
    display: block;
    padding: 12px 24px;
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.dropdown-menu a:hover {
    background: var(--off-white);
    color: var(--orange);
    padding-left: 28px;
}

/* ---------- 9. Common Buttons ---------- */

/* Liquid Glass Buttons */
.btn {
    padding: 16px 36px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-primary {
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    background: linear-gradient(
        135deg,
        rgba(10, 22, 40, 0.9) 0%,
        rgba(10, 22, 40, 0.65) 50%,
        rgba(10, 22, 40, 0.8) 100%
    );
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
    background: linear-gradient(
        135deg,
        rgba(255, 107, 53, 0.95) 0%,
        rgba(255, 107, 53, 0.7) 50%,
        rgba(255, 107, 53, 0.85) 100%
    );
    transform: translateY(-2px);
    box-shadow:
        0 10px 30px rgba(255, 107, 53, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-secondary {
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.7) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0.6) 100%
    );
    color: var(--navy);
    border: 1px solid rgba(10, 22, 40, 0.2);
    box-shadow:
        0 4px 15px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 -1px 0 rgba(0, 0, 0, 0.05);
}

.btn-secondary:hover {
    background: linear-gradient(
        135deg,
        rgba(255, 107, 53, 0.95) 0%,
        rgba(255, 107, 53, 0.7) 50%,
        rgba(255, 107, 53, 0.85) 100%
    );
    color: var(--white);
    transform: translateY(-2px);
    box-shadow:
        0 10px 30px rgba(255, 107, 53, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.btn-orange {
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    background: linear-gradient(
        135deg,
        rgba(255, 107, 53, 0.95) 0%,
        rgba(255, 107, 53, 0.7) 50%,
        rgba(255, 107, 53, 0.85) 100%
    );
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow:
        0 4px 20px rgba(255, 107, 53, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.btn-orange:hover {
    background: linear-gradient(
        135deg,
        rgba(10, 22, 40, 0.9) 0%,
        rgba(10, 22, 40, 0.65) 50%,
        rgba(10, 22, 40, 0.8) 100%
    );
    color: var(--white);
    transform: translateY(-2px);
    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-book {
    background: var(--orange);
    color: var(--white) !important;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-book:hover {
    background: #e55a2b;
}

.btn-book-hero {
    display: inline-block;
    padding: 16px 40px;
    background: var(--orange);
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(255, 107, 53, 0.4);
}

.btn-book-hero:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.5);
}

.cta-button {
    display: inline-block;
    padding: 16px 36px;
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    background: linear-gradient(
        135deg,
        rgba(10, 22, 40, 0.9) 0%,
        rgba(10, 22, 40, 0.65) 50%,
        rgba(10, 22, 40, 0.8) 100%
    );
    color: var(--white);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.15),
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
    background: linear-gradient(
        135deg,
        rgba(255, 107, 53, 0.95) 0%,
        rgba(255, 107, 53, 0.7) 50%,
        rgba(255, 107, 53, 0.85) 100%
    );
    transform: translateY(-2px);
    box-shadow:
        0 10px 30px rgba(255, 107, 53, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        inset 0 -1px 0 rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* ---------- 10. Common Section Styles ---------- */

.section-content {
    max-width: 1200px;
    margin: 0 auto;
}

.section-alt {
    background: var(--off-white);
}

/* ---------- 11. FAQ Accordion ---------- */

.faq-section {
    max-width: 800px;
    margin: 0 auto;
}

/* FAQ: <details>/<summary> pattern (service & blog pages) */
details.faq-item {
    margin-bottom: 16px;
    border: 1px solid var(--light-gray);
    border-radius: 12px;
    overflow: hidden;
}

details.faq-item summary {
    padding: 18px 24px;
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    color: var(--navy);
    background: var(--off-white);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

details.faq-item summary::-webkit-details-marker {
    display: none;
}

details.faq-item summary::after {
    content: '+';
    font-size: 1.4rem;
    font-weight: 300;
    color: var(--orange);
    transition: transform 0.3s ease;
}

details.faq-item[open] summary::after {
    transform: rotate(45deg);
}

details.faq-item .faq-answer {
    padding: 18px 24px;
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

/* ---------- 12. Footer ---------- */

footer {
    background: var(--white);
    border-top: 1px solid var(--light-gray);
    padding: 60px 40px;
    text-align: center;
}

footer p {
    color: var(--text-gray);
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

footer a {
    color: var(--orange);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.footer-social a {
    color: var(--text-gray);
    transition: color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
}

.footer-social a:hover {
    color: var(--orange);
    transform: translateY(-2px);
}

/* ---------- 13. Breadcrumb ---------- */

.breadcrumb {
    max-width: 740px;
    margin: 0 auto;
    padding: 16px 24px 0;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.breadcrumb a {
    color: var(--orange);
    text-decoration: none;
    font-weight: 500;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* ---------- 14. Callout ---------- */

.callout {
    background: rgba(255, 107, 53, 0.08);
    border-left: 4px solid var(--orange);
    padding: 20px 24px;
    margin: 30px 0;
    border-radius: 0 12px 12px 0;
}

.callout p {
    margin: 0;
    font-weight: 500;
}

/* ---------- 15. Responsive — Shared breakpoints ---------- */

@media (max-width: 1024px) {
    .mobile-menu-btn {
        display: flex;
    }

    .mobile-lang-switcher {
        display: flex;
    }

    .language-switcher {
        display: none;
    }

    nav ul {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 350px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        padding: 80px 20px 20px;
        box-shadow: -5px 0 25px rgba(0, 0, 0, 0.2);
        transition: right 0.3s ease;
        z-index: 999;
        overflow-y: auto;
    }

    nav ul.mobile-active {
        right: 0;
    }

    nav li a {
        display: block;
        padding: 15px 0;
        border-bottom: 1px solid var(--light-gray);
    }
}

@media (max-width: 768px) {
    /* Lang switcher (fixed variant) */
    .lang-switcher {
        top: 15px;
        right: 15px;
    }

    .lang-switcher .lang-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    /* Back button */
    .back-button {
        top: 15px;
        left: 15px;
        padding: 10px 16px;
        font-size: 0.9rem;
    }

    /* Nav */
    nav {
        padding: 0 20px;
    }

    .logo img {
        height: 60px;
    }

    /* Footer */
    footer {
        padding: 40px 24px;
    }
}
