/**
 * TherapyFusion - Responsive Design System
 * ---------------------------------------
 * This file contains the base responsive utilities, 
 * CSS variables, and layout breakpoints.
 */

:root {
    /* Color Palette - Premium & Modern */
    --primary-color: #4f46e5;
    --primary-hover: #4338ca;
    --secondary-color: #10b981;
    --accent-color: #f59e0b;
    --bg-dark: #0f172a;
    --bg-light: #f8fafc;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --white: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.2);

    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --heading-font: 'Outfit', sans-serif;

    /* Spacing & Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-premium: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

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


/* Responsive Typography - Fluid Design */
html {
    font-size: 16px;
}

@media (max-width: 1400px) {
    html { font-size: 15px; }
}

@media (max-width: 1024px) {
    html { font-size: 14px; }
}

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    color: var(--bg-dark);
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: clamp(2.5rem, 5vw, 4.5rem); font-weight: 800; letter-spacing: -1px; }
h2 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 700; letter-spacing: -0.5px; }
h3 { font-size: clamp(1.75rem, 3vw, 2.5rem); font-weight: 700; }
h4 { font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 600; }
h5 { font-size: clamp(1.25rem, 2vw, 1.5rem); font-weight: 600; }
h6 { font-size: 1.1rem; font-weight: 600; }

p {
    font-size: clamp(0.95rem, 1.5vw, 1.1rem);
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    h1, h2, h3 { font-weight: 700; }
    p { line-height: 1.5; }
}

/* Responsive Grid / Container */
.container {
    width: 100%;
    margin-right: auto;
    margin-left: auto;
    padding-right: 1.5rem;
    padding-left: 1.5rem;
}

/* Breakpoints */

/* Small devices (phones, 640px and up) */
@media (min-width: 640px) {
    .container { max-width: 640px; }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .container { max-width: 768px; }
}

/* Large devices (desktops, 1024px and up) */
@media (min-width: 1024px) {
    .container { max-width: 1024px; }
}

/* Extra large devices (large desktops, 1280px and up) */
@media (min-width: 1280px) {
    .container { max-width: 1280px; }
}

/* 2XL devices (1536px and up) */
@media (min-width: 1536px) {
    .container { max-width: 1536px; }
}

/* Utility Classes */
.hidden { display: none; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* Footer Grid Layout */
.footer-grid {
    display: grid;
    gap: 2rem;
    padding: 4rem 0;
    transition: var(--transition-smooth);
}

/* Default (Mobile): 1 Column */
.footer-grid {
    grid-template-columns: 1fr;
}

/* 768px and up: 2 Columns */
@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 1024px and up: 3 Columns */
@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* 1400px and up: 4 Columns */
@media (min-width: 1400px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}


/* --- New Header Structure Styles --- */
.header-top {
    background: #fff;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.header-bottom {
    background: #0b3948;
    padding: 0;
    min-height: 50px;
    display: flex;
    align-items: center;
}

/* Resetting old classes to use new structure */
.ors-header__top { display: none; } /* Old class no longer needed */

.ors-header__logo img {
    max-height: 60px;
    width: auto;
}

.ors-social a {
    width: 32px;
    height: 32px;
    background: #0b3948;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 8px;
    font-size: 14px;
}

.ors-contact-info {
    display: flex;
    gap: 15px;
    font-size: 14px;
    font-weight: 600;
}

.ors-contact-info a {
    color: var(--text-main);
    text-decoration: none;
}

/* Sidebar & Navigation Fixes for New Structure */
@media (max-width: 1024px) {
    .header-bottom {
        padding: 10px 0;
    }
    
    .ors-nav-toggle {
        display: flex;
        background: transparent !important;
        border: 2px solid rgba(255,255,255,0.2);
    }
}

@media (min-width: 1025px) {
    .ors-nav {
        background: transparent !important; /* Managed by header-bottom now */
        width: 100%;
    }
}


/* --- Header Fixes --- */
.ors-header {
    width: 100%;
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-premium);
}

.ors-header__meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
}

.ors-social a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}


.ors-nav__meta a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
}


/* --- Hamburger Toggle Button --- */
.ors-nav-toggle {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 45px;
    height: 40px;
    background: #0b3948 !important; /* Brand Blue */
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 8px;
    z-index: 10001;
    position: relative;
    box-shadow: 0 4px 10px rgba(11, 57, 72, 0.2);
}

.ors-nav-toggle span {
    width: 100%;
    height: 3px;
    background-color: #fff !important; /* White lines */
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

@media (max-width: 1024px) {
    .ors-nav-toggle {
        display: flex; /* Show on mobile/tablet */
    }
    
    .ors-nav {
        display: flex !important; /* Ensure flex is active when fixed */
    }

    /* Active State (X shape) */
    .ors-nav-toggle.active span {
        background-color: var(--white) !important;
    }
    .ors-nav-toggle.active span:nth-child(1) {
        transform: translateY(10px) rotate(45deg);
    }
    .ors-nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .ors-nav-toggle.active span:nth-child(3) {
        transform: translateY(-11px) rotate(-45deg);
    }
}



/* Mobile specific header adjustment */
@media (max-width: 1024px) {
    .ors-header__top {
        background: #fff !important; /* Back to White */
        padding: 15px 5%;
        border-bottom: 1px solid #eee;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    .ors-header__meta {
        display: flex; /* Show meta again */
        color: var(--text-main);
    }
    .ors-header__logo img {
        max-height: 50px;
        filter: none; /* Logo original color */
    }
    
    .ors-nav {
        background: #0b3948 !important; /* Sidebar remains Blue */
    }

    .ors-nav-toggle {
        background: #0b3948 !important; /* Toggle button stays Blue */
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
}


/* Mobile Sidebar / Aside Bar (1023px and below) */

/* Mobile Sidebar / Aside Bar (1024px and below) */



@media (max-width: 1024px) {
    .ors-nav {
        position: fixed;
        top: 0;
        left: -330px;
        width: 290px;
        height: 100vh;
        background: #0b3948 !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        padding: 0 !important;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 10005;
        box-shadow: 5px 0 20px rgba(0,0,0,0.2);
        overflow: hidden;
    }
    .sidebar-menu-links {
        flex: 1 1 auto !important;
        overflow-y: auto !important;
        display: flex !important;
        flex-direction: column !important;
        width: 100% !important;
        -ms-overflow-style: none !important;
        scrollbar-width: none !important;
    }
    .sidebar-menu-links::-webkit-scrollbar {
        display: none !important;
    }
    /* Hide floating action buttons (headset) when nav is open */
    body.nav-open .hero-fab {
        display: none !important;
    }

    .ors-nav-close {
        display: block !important;
        position: relative !important;
        align-self: flex-end !important;
        margin: 15px 20px 5px 0 !important;
        color: #fff !important;
        font-size: 36px !important;
        background: transparent !important;
        border: none !important;
        cursor: pointer !important;
        line-height: 1 !important;
        padding: 0 !important;
        z-index: 100 !important;
    }


    .sidebar-header {
        display: flex !important;
        flex-direction: column !important;
        width: 100%;
        padding: 0 20px 15px 20px !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        margin-bottom: 15px !important;
        position: relative !important;
        background: transparent !important;
    }


    .sidebar-logo-box {
        background: #fff;
        padding: 8px 18px;
        border-radius: 6px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: auto;
        min-width: 160px; 
    }

    .sidebar-logo {
        max-height: 40px;
        width: auto;
        filter: none !important;
    }

    .ors-nav.open {
        left: 0;
    }





    .ors-nav a, .ors-nav__item {
        margin: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        min-height: auto !important;
    }
    .ors-nav a {
        color: #fff !important;
        font-size: 1.25rem !important;
        font-family: 'Outfit', sans-serif !important;
        font-weight: 400;
        width: 100% !important;
        display: block !important;
        text-decoration: none;
        text-align: left !important;
        border-left: 4px solid transparent;
        line-height: 1.2 !important;
        padding-left: 20px !important;
    }
    .ors-nav a:hover, .ors-nav a.active {
        background: rgba(255, 255, 255, 0.1);
        color: #f3c95e !important;
        border-left: 4px solid #f3c95e;
        padding-left: 16px !important;
    }












    /* Admin Style Narrow Box Dropdown - Final Width */
    .ors-nav__dropdown {
        width: 150px !important;
        max-width: 150px !important;
        margin-left: 30px !important;
        margin-right: auto !important;
        background: #fff !important;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        display: flex !important;
        flex-direction: column !important;
        border-left: 3px solid #f3c95e;
        border-radius: 4px;
        box-shadow: 2px 2px 10px rgba(0,0,0,0.1);
    }

    .ors-nav__dropdown.active {
        max-height: 500px;
        padding: 3px 0; /* Reduced padding */
        margin-bottom: 5px;
    }


    .ors-nav__dropdown a {
        color: #0b3948 !important;
        padding: 8px 15px 8px 25px !important; /* Compact padding */
        font-size: 0.85rem !important;
        opacity: 0.9;
        font-weight: 500;
        border-left: none !important;
        white-space: normal !important; /* Force text to wrap */
        line-height: 1.2 !important;
        width: 100% !important;
        display: block !important;
    }

    .ors-nav__dropdown a:hover {
        background: rgba(0, 0, 0, 0.05) !important;
        opacity: 1;
    }











    .ors-nav__cta {
        width: 100% !important;
        padding: 10px 20px !important; 
        margin: 0 !important; /* Perfect alignment */
        min-height: auto !important;
        color: #f3c95e !important;
        font-weight: 600;
        font-size: 1.25rem !important;
        font-family: 'Outfit', sans-serif !important;
        text-decoration: none;
        background: transparent !important;
        display: block !important;
        text-align: left !important;
        border-left: 4px solid transparent !important;
    }
    .ors-nav__cta:hover {
        background: rgba(255, 255, 255, 0.1) !important;
        color: #f3c95e !important;
    }
}
