/* ============================================
   Modern Design System - Freedom Health Systems
   ============================================ */

:root {
    /* Color Palette */
    --primary: #0293fe;
    --primary-dark: #0056b3;
    --primary-light: #4db3ff;
    --secondary: #6366f1;
    --accent: #10b981;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;
    --spacing-3xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --shadow-primary: 0 10px 30px -5px rgba(2, 147, 254, 0.3);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Section spacing – consistent across all pages */
    --section-padding-y: 4rem;
}
@media (min-width: 768px) {
    :root {
        --section-padding-y: 5rem;
    }
}
@media (min-width: 992px) {
    :root {
        --section-padding-y: 6rem;
    }
}

/* Modern Typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@400;500;600;700;800;900&display=swap');

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.7;
    color: var(--gray-700);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--gray-900);
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

/* Modern Header Styles */
.modern-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.modern-header.scrolled {
    box-shadow: var(--shadow-md);
    background: rgba(255, 255, 255, 0.98);
}

/* Global section spacing – used by all pages with .section-padding */
.section-padding {
    padding-top: var(--section-padding-y);
    padding-bottom: var(--section-padding-y);
}

/* Close dropdown when clicking outside */
body.dropdown-open::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: transparent;
}

.header-top {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 0.625rem 0;
    font-size: 0.8125rem;
}

.header-top .container {
    padding-left: 3rem;
    padding-right: 3rem;
}

@media (max-width: 768px) {
    .header-top .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

.header-top-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.header-top-link {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    transition: color var(--transition-fast);
    font-size: 0.8125rem;
    white-space: nowrap;
}

.header-top-link:hover {
    color: white;
}

.header-top-separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    margin: 0 0.25rem;
}

/* Page banner (e.g. Continuing Education, Terms, Privacy) – high contrast */
.careerbanner {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin-top: 0;
    margin-bottom: 0;
    min-height: 140px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
}
.careerbanner h1,
.careerbanner h2,
.careerbanner h3 {
    color: #fff;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.careerbanner h1 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    letter-spacing: 0.02em;
}
.careerbanner h2,
.careerbanner h3 {
    font-size: clamp(1.35rem, 3vw, 1.75rem);
}
@media (max-width: 768px) {
    .careerbanner {
        min-height: 120px;
        padding: 1.5rem 1rem;
    }
}

/* Modern Navigation - Compact Height */
.header-section {
    padding: 0 !important;
}

.header-main {
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    margin-bottom: 0;
}

.header-main .container {
    padding-left: 3rem;
    padding-right: 3rem;
}

@media (max-width: 768px) {
    .header-main .container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

.header-wrap {
    padding: 1rem 0 !important;
    min-height: auto !important;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-logo {
    flex-shrink: 0;
}

.logo-link {
    display: block;
    text-decoration: none;
}

.logo-img {
    max-height: 62px !important;
    width: auto;
    height: auto;
    display: block;
    transition: all var(--transition-base);
}

.header-menu {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    margin: 0;
}

.header-actions {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-header {
    padding: 0.75rem 1.5rem !important;
    font-size: 0.875rem !important;
    font-weight: 600 !important;
    white-space: nowrap;
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 2px 8px rgba(2, 147, 254, 0.2);
    transition: all var(--transition-base);
    height: 3rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.btn-header:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(2, 147, 254, 0.3);
}

.mobile-menu-toggle {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    border-radius: 2px;
    transition: all var(--transition-base);
}

.main-menu {
    display: flex;
    align-items: center;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.main-menu > li {
    position: relative;
    z-index: 1;
}

.main-menu > li:hover,
.main-menu > li.navdropdown {
    z-index: 1051;
}

.navdropdown {
    position: relative;
    z-index: 1051;
}

.main-menu > li > a,
.main-menu > li .dropdown-toggle {
    font-weight: 500;
    color: var(--gray-900);
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    position: relative;
}

.main-menu > li > a:hover,
.main-menu > li .dropdown-toggle:hover {
    color: var(--primary);
}

.main-menu > li > a::after {
    content: '';
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-base);
}

/* Hide native CSS chevron for dropdown items */
.main-menu > li .dropdown-toggle::after {
    display: none !important;
    content: none !important;
}

.main-menu > li:hover > a::after,
.main-menu > li:hover > .dropdown-toggle::after {
    width: calc(100% - 2.5rem);
}

/* No bullet separators - clean navigation */
.main-menu > li::after {
    display: none;
}

/* Modern Full-Width Mega Menu */
.dropdown-menu.mega-menu {
    border: none;
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-lg);
    padding: 0;
    margin-top: 0.75rem;
    min-width: 100vw;
    left: 50% !important;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    max-width: 1200px;
    width: calc(100vw - 2rem);
    position: absolute;
    z-index: 1050 !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out, visibility 0.3s ease-out;
    transform: translateX(-50%) translateY(-10px);
    top: 100% !important;
}

.dropdown-menu.mega-menu.show {
    display: block !important;
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.navdropdown.show .dropdown-menu.mega-menu {
    display: block !important;
}

.navdropdown .dropdown-toggle[aria-expanded="true"] {
    color: var(--primary);
    background: rgba(2, 147, 254, 0.1);
}

.navdropdown .dropdown-toggle[aria-expanded="true"]::after {
    display: none !important;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Mega Menu Content */
.mega-menu-content {
    padding: 2.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
}

.mega-menu-column {
    display: flex;
    flex-direction: column;
    padding-left: 1.5rem;
    border-left: 3px solid var(--primary);
    position: relative;
}

.mega-menu-column:first-of-type {
    padding-left: 0;
    border-left: none;
}

.mega-menu-header {
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--gray-200);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mega-menu-header i {
    font-size: 1rem;
}

.mega-menu-item {
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--gray-100);
    transition: all var(--transition-fast);
}

.mega-menu-item:last-child {
    border-bottom: none;
}

.mega-menu-item a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--gray-700);
    text-decoration: none;
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
}

.mega-menu-item a i {
    width: 20px;
    text-align: center;
    color: var(--primary);
    font-size: 0.875rem;
}

.mega-menu-item:hover {
    background: rgba(2, 147, 254, 0.05);
    padding-left: 0.5rem;
    border-radius: var(--radius-md);
}

.mega-menu-item:hover a {
    color: var(--primary);
    transform: translateX(4px);
}

.mega-menu-view-all {
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 2px solid var(--gray-200);
}

.mega-menu-view-all a {
    font-weight: 700;
    color: var(--primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.mega-menu-view-all:hover {
    background: rgba(2, 147, 254, 0.1);
}

/* Simple Dropdown (for smaller menus) */
.dropdown-menu.simple-dropdown {
    min-width: 260px;
    left: auto !important;
    transform: none !important;
    width: auto;
    padding: 0.75rem 0;
    position: absolute !important;
    z-index: 1050 !important;
    top: 100% !important;
    margin-top: 0.5rem;
    border: none;
    box-shadow: var(--shadow-xl);
    border-radius: var(--radius-lg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-out, transform 0.3s ease-out, visibility 0.3s ease-out;
    transform: translateY(-10px);
}

.dropdown-menu.simple-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.simple-dropdown {
    display: none;
}

.simple-dropdown.show {
    display: block !important;
}

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

.simple-dropdown .dropdown-item {
    padding: 0.75rem 1.25rem;
    border-radius: 0;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    list-style: none;
    margin: 0;
}

.simple-dropdown .dropdown-item i {
    width: 20px;
    text-align: center;
    color: var(--primary);
    font-size: 0.875rem;
    flex-shrink: 0;
}

.simple-dropdown .dropdown-item:hover {
    background: rgba(2, 147, 254, 0.1);
    color: var(--primary);
    padding-left: 1.5rem;
}

.simple-dropdown .dropdown-header {
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--primary);
    padding: 0.75rem 1.25rem 0.5rem;
    margin-bottom: 0.25rem;
}

.simple-dropdown .dropdown-divider {
    margin: 0.5rem 0;
    border-color: var(--gray-200);
}

/* Modern Buttons */
.btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
    border: none;
    font-size: 0.9375rem;
    letter-spacing: 0.01em;
}

.btn-primary,
.btn-3 {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: var(--shadow-primary);
}

.btn-primary:hover,
.btn-3:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    color: white;
}

.btn-outline-primary {
    border: 2px solid var(--primary);
    color: var(--primary);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* Modern Hero Section */
.modern-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, var(--primary) 50%, var(--primary-dark) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    position: relative;
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.modern-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.modern-hero .hero-content {
    position: relative;
    z-index: 2;
}

.modern-hero h1,
.modern-hero h2 {
    color: white;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.2);
    margin-bottom: 1.5rem;
}

.modern-hero p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.125rem;
    line-height: 1.8;
}

/* Modern Cards */
.modern-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    border: 1px solid var(--gray-200);
    height: 100%;
}

.modern-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-light);
}

.modern-card-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-primary);
}

.modern-card-icon i {
    font-size: 1.75rem;
    color: white;
}

/* Modern Section Styles */
.modern-section {
    padding: var(--spacing-3xl) 0;
}

.modern-section-alt {
    background: var(--gray-50);
}

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

.section-title h2 {
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title p {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

/* Modern Service Categories */
.service-category {
    margin-bottom: var(--spacing-2xl);
}

.service-category-title {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

.service-category-title h3 {
    margin: 0;
    color: var(--primary);
    font-size: 1.75rem;
}

.service-category-title i {
    font-size: 2rem;
    color: var(--primary);
}

/* Modern Footer */
.modern-footer {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    color: rgba(255, 255, 255, 0.8);
    padding: var(--spacing-2xl) 0 var(--spacing-lg);
}

.modern-footer h5 {
    color: white;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.modern-footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.modern-footer a:hover {
    color: white;
    transform: translateX(4px);
}

.modern-footer ul {
    list-style: none;
    padding: 0;
}

.modern-footer ul li {
    margin-bottom: 0.75rem;
}

/* Trust Signals */
.trust-signal {
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
    transition: all var(--transition-base);
}

.trust-signal:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.05);
}

.trust-signal img {
    filter: brightness(0) invert(1);
    max-height: 50px;
}

/* Modern Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Glassmorphism Effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Modern Stats */
.modern-stat {
    text-align: center;
    padding: 2rem;
}

.modern-stat-number {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.modern-stat-label {
    font-size: 1.125rem;
    color: var(--gray-600);
    font-weight: 500;
}

/* Modern CTA Section */
.modern-cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: var(--spacing-3xl) 0;
    position: relative;
    overflow: hidden;
}

.modern-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.modern-cta .container {
    position: relative;
    z-index: 2;
}

/* Responsive Improvements */
@media (max-width: 991px) {
    .header-menu {
        display: none !important;
    }
    
    .header-actions .btn-header:not(.mobile-menu-toggle) {
        display: none;
    }
}

@media (max-width: 768px) {
    .modern-hero {
        min-height: 70vh;
        padding: 2rem 0;
    }
    
    .modern-section {
        padding: var(--spacing-xl) 0;
    }
    
    .modern-card {
        padding: 1.5rem;
    }
    
    .dropdown-menu.mega-menu {
        width: calc(100vw - 1rem);
        left: 0.5rem !important;
        transform: none !important;
    }
    
    .mega-menu-content {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        gap: 1.5rem;
    }
    
    .header-top-content {
        justify-content: center;
        font-size: 0.75rem;
    }
    
    .header-top-separator {
        margin: 0 0.15rem;
    }
    
    .header-wrap {
        padding: 0.75rem 0 !important;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Selection Color */
::selection {
    background: var(--primary);
    color: white;
}

/* Focus Styles */
*:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}
