/* ============================================
   GLOBAL STYLES - style.css
   ============================================ */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    /* Smooth theme transitions */
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Disable transitions during page load */
body.loading * {
    transition: none !important;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    width: 100%;
}

:root {
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-normal: 0.5s ease;
    --transition-slow: 0.8s ease;
    
    /* Global Button Color */
    --button-color: #F5B800;
    
    /* Global Icon Color */
    --icon-color: #F5B800;
    
    /* Typography Colors - Consistent across all files */
    --heading-color: var(--text);
    --subheading-color: var(--text);
    --paragraph-color: var(--muted);
}

/* ============================================
   THEME VARIABLES - DARK (Default)
   ============================================ */
:root[data-theme="dark"] {
    /* Color Palette - Dark Theme - Medical/Professional */
    --bg: #0a0e1a;
    --text: #ffffff;
    --muted: #94a3b8;
    --panel: #1e293b;
    --accent: #06b6d4;
    --accent-hover: #0891b2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --card: rgba(30, 41, 59, 0.8);
    --card-hover: rgba(30, 41, 59, 0.95);
    
    /* Tint colors for dark mode */
    --tint-left: #0d1b2a;
    --tint-right: #1b263b;
    --tint-opacity: 0.3;
    
    /* Legacy variables for compatibility */
    --dark-bg: #0a0e1a;
    --dark-card: rgba(0, 180, 216, 0.05);
    --neon-teal: #00b4d8;
    --neon-teal-glow: rgba(0, 180, 216, 0.5);
    --text-white: #e8f4f8;
    --text-gray: #8b9cb5;
    --text-light-gray: #8b9cb5;
    
    /* Shadows - disabled to remove card glows */
    --shadow-glow: none;
    --shadow-glow-strong: none;
    --container-shadow: none;
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
    --shadow-xl: none;
}

/* ============================================
   THEME VARIABLES - LIGHT
   ============================================ */
:root[data-theme="light"] {
    /* Color Palette - Light Theme - Clean Medical */
    --bg: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --panel: #f1f5f9;
    --accent: #06b6d4;
    --accent-hover: #0891b2;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --card: #ffffff;
    --card-hover: #fafafa;
    
    /* Tint colors for light mode */
    --tint-left: #e0f2fe;
    --tint-right: #bae6fd;
    --tint-opacity: 0.4;
    
    /* Legacy variables for compatibility */
    --dark-bg: #ffffff;
    --dark-card: #ffffff;
    --neon-teal: #00b4d8;
    --neon-teal-glow: rgba(0, 180, 216, 0.3);
    --text-white: #1a2332;
    --text-gray: #64748b;
    --text-light-gray: #64748b;
    
    /* Shadows - disabled to remove card glows */
    --shadow-glow: none;
    --shadow-glow-strong: none;
    --container-shadow: none;
    --shadow-sm: none;
    --shadow-md: none;
    --shadow-lg: none;
    --shadow-xl: none;
}

/* Default to dark theme if no theme is set */
:root:not([data-theme]) {
    /* Color Palette - Dark Theme (Default) */
    --bg: #0b0d0f;
    --text: #e6f7f5;
    --muted: #9aa4a8;
    --panel: #0f1315;
    --accent: #06b6d4;
    --card: rgba(255, 255, 255, 0.05);
    
    /* Tint colors for dark mode (subtle dark gradient) */
    --tint-left: #1a1d22;
    --tint-right: #151820;
    --tint-opacity: 0.3;
    
    /* Legacy variables for compatibility */
    --dark-bg: #0b0d0f;
    --dark-card: rgba(255, 255, 255, 0.05);
    --neon-teal: #FF8C42;
    --neon-teal-glow: rgba(255, 140, 66, 0.5);
    --text-white: #e6f7f5;
    --text-gray: #9aa4a8;
    --text-light-gray: #9aa4a8;
    
    /* Shadows - disabled to remove card glows */
    --shadow-glow: none;
    --shadow-glow-strong: none;
    --container-shadow: none;
}

html {
    scroll-behavior: smooth;
    height: auto;
    min-height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    overflow-y: auto;
    position: relative;
    min-height: 100%;
    height: auto;
    /* Ensure body allows scrolling */
    padding-top: 0;
}

/* Global tinted background for light mode */
:root[data-theme="light"] body {
    background: linear-gradient(
        to right,
        rgba(6, 182, 212, 0.08) 0%,
        rgba(16, 185, 129, 0.05) 15%,
        #ffffff 25%,
        #ffffff 75%,
        rgba(16, 185, 129, 0.05) 85%,
        rgba(6, 182, 212, 0.08) 100%
    );
}

/* Global tinted background for dark mode - solid black, no tint */
:root[data-theme="dark"] body {
    background: var(--bg);
}

/* Default dark mode background - solid black, no tint */
:root:not([data-theme]) body {
    background: var(--bg);
}

/* Typography - Consistent Colors */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
}

/* Light mode heading colors */
:root[data-theme="light"] h1,
:root[data-theme="light"] h2,
:root[data-theme="light"] h3,
:root[data-theme="light"] h4,
:root[data-theme="light"] h5,
:root[data-theme="light"] h6 {
    color: #0f172a;
}

p {
    color: var(--paragraph-color);
}

/* Links */
a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

/* Buttons Base */
button {
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    border: none;
    outline: none;
    transition: var(--transition-normal);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    /* Ensure images scale properly */
    img {
        max-width: 100%;
        height: auto;
    }

    /* Better touch targets */
    button,
    a {
        min-height: 44px;
        min-width: 44px;
    }

    /* Prevent text overflow */
    h1, h2, h3, h4, h5, h6 {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

@media (max-width: 480px) {
    /* Smaller container padding */
    .container {
        padding: 0 15px;
    }
}


.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mt-3 { margin-top: var(--spacing-lg); }

.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
.mb-3 { margin-bottom: var(--spacing-lg); }

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 2.5rem;
        --spacing-xl: 3.5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 2rem;
        --spacing-xl: 3rem;
    }

    body {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-xs: 0.4rem;
        --spacing-sm: 0.8rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
    }

    body {
        font-size: 0.9rem;
    }


    .container {
        padding: 0 var(--spacing-sm);
    }
}

@media (max-width: 360px) {
    :root {
        --spacing-xs: 0.3rem;
        --spacing-sm: 0.6rem;
        --spacing-md: 0.8rem;
        --spacing-lg: 1.2rem;
        --spacing-xl: 1.5rem;
    }
}

/* ============================================
   SCROLL TO TOP BUTTON
   ============================================ */
#scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--success));
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
    box-shadow: none;
}

#scroll-to-top:hover {
    box-shadow: none;
    transform: none;
}

#scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
}



@media (max-width: 768px) {
    #scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 1.3rem;
    }
}

