/* ============================================
   Trion Healthcare - Global Stylesheet
   Responsive & Screen-Friendly Design
   ============================================ */

/* ============================================
   CSS Variables - Color Palette
   ============================================ */
:root {
    /* Primary Colors */
    --primary: #000f22;
    --primary-dark: #1A1A2E;
    --primary-container: #0a2540;
    --secondary: #206392;
    --secondary-container: #90c9fe;
    
    /* Tertiary Colors */
    --tertiary: #001305;
    --tertiary-container: #002b12;
    --clinical-green: #2ECC71;
    
    /* Surface Colors */
    --surface: #ffffff;
    --surface-bright: #ffffff;
    --surface-dim: #f1f4f6;
    --surface-container: #ffffff;
    --surface-container-low: #f9fafb;
    --surface-container-high: #f5f7fa;
    --surface-container-highest: #eff2f5;
    --surface-variant: #e8ebee;
    
    /* Text Colors */
    --on-surface: #181c1e;
    --on-surface-variant: #43474d;
    --on-primary: #ffffff;
    --on-primary-container: #768dad;
    --on-secondary: #ffffff;
    --on-secondary-container: #045583;
    --on-tertiary: #ffffff;
    --on-tertiary-fixed: #00210c;
    
    /* Error Colors */
    --error: #ba1a1a;
    --error-container: #ffdad6;
    --error-red: #D63031;
    
    /* Utility Colors */
    --pure-white: #FFFFFF;
    --outline: #74777e;
    --outline-variant: #c4c6ce;
    --inverse-surface: #2d3133;
    
    /* Spacing */
    --margin-desktop: 64px;
    --margin-mobile: 16px;
    --base: 8px;
    --gutter: 24px;
    --max-width: 1280px;
}

/* Dark Mode Overrides - Removed for white background design */
@media (prefers-color-scheme: light) {
    :root {
        --surface: #ffffff;
        --surface-bright: #ffffff;
        --surface-dim: #f1f4f6;
        --surface-container: #ffffff;
        --surface-container-low: #f9fafb;
        --surface-container-high: #f5f7fa;
        --surface-container-highest: #eff2f5;
    }
}

/* ============================================
   Global Styles
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: var(--surface);
    color: var(--on-surface);
    line-height: 1.6;
    font-size: 16px;
}

/* Selection Styles */
::selection {
    background-color: var(--secondary-container);
    color: var(--on-surface);
}

/* ============================================
   Typography
   ============================================ */
h1, h2, h3, h4, h5, h6 {
    font-family: "Lexend", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 600;
    line-height: 1.3;
    color: var(--primary);
}

h1 {
    font-size: 48px;
    line-height: 56px;
    letter-spacing: -0.02em;
    font-weight: 600;
}

h2 {
    font-size: 32px;
    line-height: 40px;
    font-weight: 500;
}

h3 {
    font-size: 24px;
    line-height: 32px;
    font-weight: 500;
}

h4 {
    font-size: 18px;
    line-height: 28px;
    font-weight: 500;
}

p {
    font-size: 16px;
    line-height: 24px;
    color: var(--on-surface);
}

.text-label-lg {
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.text-label-md {
    font-size: 12px;
    line-height: 16px;
    font-weight: 500;
}

.text-body-sm {
    font-size: 14px;
    line-height: 20px;
}

.text-body-md {
    font-size: 16px;
    line-height: 24px;
}

.text-body-lg {
    font-size: 18px;
    line-height: 28px;
}

/* ============================================
   Header & Navigation
   ============================================ */
header {
    width: 100%;
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: var(--surface);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease-in-out;
}

header.shadow-md {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    padding: 0 var(--margin-desktop);
    max-width: var(--max-width);
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    height: 60px;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo img {
    height: 200px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

.logo:hover {
    transform: scale(1.05);
}

nav .nav-menu {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

nav a {
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: var(--on-surface-variant);
    text-decoration: none;
    transition: color 0.3s ease;
    padding-bottom: 4px;
}

nav a.active {
    color: var(--secondary);
    border-bottom: 2px solid var(--secondary);
}

nav a:hover {
    color: var(--secondary);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.search-box {
    display: none;
    position: relative;
}

.search-box input {
    padding-left: 40px;
    padding-right: 16px;
    padding-top: 8px;
    padding-bottom: 8px;
    border-radius: 9999px;
    border: none;
    background-color: var(--surface-container);
    font-size: 14px;
    width: 256px;
    transition: box-shadow 0.3s ease;
}

.search-box input:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--secondary);
}

@media (min-width: 1024px) {
    .search-box {
        display: block;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 24px;
    padding: 8px;
}

@media (max-width: 768px) {
    nav .nav-menu {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background-color: var(--surface);
        padding: 16px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 100;
        width: 100%;
    }

    nav .nav-menu.active {
        display: flex;
    }

    nav a {
        padding: 12px 16px;
        display: block;
        border: none;
        border-bottom: 1px solid var(--surface-container);
        font-size: 14px;
    }

    nav a.active {
        border: none;
        background-color: var(--surface-container);
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .search-box {
        display: none !important;
    }

    nav {
        padding: 0 var(--margin-mobile);
        height: 90px;
    }

    .nav-right {
        display: flex;
        flex-direction: row;
        gap: 8px;
        align-items: center;
    }

    .btn {
        padding: 8px 12px;
        font-size: 12px;
        white-space: nowrap;
    }

    .logo img {
        height: 80px;
        width: auto;
        max-width: 200px;
    }
}

/* ============================================
   Buttons
   ============================================ */
button, .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    font-family: "Inter", sans-serif;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--on-primary);
}

.btn-primary:hover {
    box-shadow: 0 8px 16px rgba(0, 15, 34, 0.3);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: transparent;
    color: var(--secondary);
    border: 2px solid var(--secondary);
}

.btn-secondary:hover {
    background-color: var(--secondary);
    color: var(--on-secondary);
}

.btn-gradient {
    background: linear-gradient(135deg, #0a2540 0%, #206392 100%);
    color: var(--on-primary);
}

.btn-gradient:hover {
    box-shadow: 0 16px 32px rgba(10, 37, 64, 0.4);
    transform: translateY(-2px);
}

.btn-white {
    background-color: var(--pure-white);
    color: var(--primary);
}

.btn-white:hover {
    background-color: var(--surface-container);
}

/* ============================================
   Layout & Containers
   ============================================ */
main {
    width: 100%;
}

section {
    width: 100%;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--margin-desktop);
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--margin-mobile);
    }
}

.grid {
    display: grid;
}

.grid-1 {
    grid-template-columns: 1fr;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.gap-base {
    gap: var(--base);
}

.gap-gutter {
    gap: var(--gutter);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    height: 85vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    min-height: 500px;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 15, 34, 0.9), rgba(0, 15, 34, 0.4), transparent);
    z-index: 10;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-content {
    position: relative;
    z-index: 20;
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
    padding: 0 var(--margin-desktop);
}

.hero-content h1 {
    color: var(--pure-white);
    margin-bottom: 24px;
    line-height: 1.3;
}

.hero-content p {
    color: var(--surface-container);
    max-width: 600px;
    margin-bottom: 32px;
    font-size: 18px;
    line-height: 28px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 9999px;
    background-color: rgba(144, 201, 254, 0.2);
    border: 1px solid rgba(144, 201, 254, 0.3);
    backdrop-filter: blur(12px);
    margin-bottom: 24px;
}

.hero-badge span {
    font-size: 12px;
    font-weight: 500;
    color: var(--secondary-container);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

@media (max-width: 768px) {
    .hero {
        height: 60vh;
        min-height: 400px;
    }

    .hero-content {
        padding: 0 var(--margin-mobile);
    }

    .hero-content h1 {
        font-size: 28px;
        line-height: 36px;
    }

    .hero-content p {
        font-size: 16px;
        line-height: 24px;
    }

    .hero-bg::before {
        background: linear-gradient(to right, rgba(0, 15, 34, 0.95), rgba(0, 15, 34, 0.6), transparent);
    }
}

/* ============================================
   Cards
   ============================================ */
.card {
    background-color: var(--pure-white);
    border-radius: 16px;
    padding: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid var(--surface-container-high);
}

.card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.card-dark {
    background-color: var(--primary-container);
    color: var(--on-primary);
}

.card-glass {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* ============================================
   Gradients & Effects
   ============================================ */
.medical-gradient {
    background: linear-gradient(135deg, #0a2540 0%, #206392 100%);
}

.clinical-border {
    border-left: 4px solid var(--secondary);
    padding-left: 24px;
}

.clinical-border-green {
    border-left-color: var(--clinical-green);
}

.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ============================================
   Footer
   ============================================ */
footer {
    width: 100%;
    background-color: var(--primary);
    color: var(--on-primary);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--gutter);
    padding: 64px var(--margin-desktop);
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-section h4 {
    color: var(--pure-white);
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 16px;
}

.footer-section a {
    color: var(--on-primary-container);
    text-decoration: none;
    font-size: 14px;
    line-height: 20px;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--pure-white);
}

.footer-brand {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--pure-white);
}

.footer-desc {
    font-size: 14px;
    line-height: 20px;
    color: var(--on-primary-container);
    margin-bottom: 16px;
}

.social-links {
    display: flex;
    gap: 16px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pure-white);
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: var(--secondary);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 32px var(--margin-desktop);
    text-align: center;
    max-width: var(--max-width);
    margin: 0 auto;
}

.footer-bottom p {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        padding: 48px var(--margin-mobile);
    }

    .footer-bottom {
        padding: 24px var(--margin-mobile);
    }
}

/* ============================================
   Utilities
   ============================================ */
.text-center {
    text-align: center;
}

.text-white {
    color: var(--pure-white);
}

.text-primary {
    color: var(--primary);
}

.text-secondary {
    color: var(--secondary);
}

.bg-primary {
    background-color: var(--primary);
}

.bg-secondary {
    background-color: var(--secondary);
}

.bg-surface {
    background-color: var(--surface);
}

.mt-4 {
    margin-top: 16px;
}

.mt-8 {
    margin-top: 32px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-8 {
    margin-bottom: 32px;
}

.p-4 {
    padding: 16px;
}

.p-8 {
    padding: 32px;
}

.rounded {
    border-radius: 4px;
}

.rounded-lg {
    border-radius: 8px;
}

.rounded-xl {
    border-radius: 12px;
}

.rounded-full {
    border-radius: 9999px;
}

.shadow-sm {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.shadow-md {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.shadow-lg {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.shadow-xl {
    box-shadow: 0 20px 25px rgba(0, 0, 0, 0.1);
}

/* ============================================
   Responsive Utilities
   ============================================ */
@media (max-width: 1024px) {
    h1 {
        font-size: 36px;
        line-height: 44px;
    }

    h2 {
        font-size: 28px;
        line-height: 36px;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 28px;
        line-height: 36px;
    }

    h2 {
        font-size: 24px;
        line-height: 32px;
    }

    h3 {
        font-size: 20px;
        line-height: 28px;
    }

    p {
        font-size: 14px;
        line-height: 20px;
    }

    button, .btn {
        padding: 10px 20px;
        font-size: 13px;
    }
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-up {
    animation: slideUp 0.6s ease-out;
}

/* ============================================
   Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: more) {
    button, .btn {
        border: 2px solid currentColor;
    }

    a {
        text-decoration: underline;
    }
}

/* ============================================
   Comprehensive Responsive Design
   Mobile First Approach
   ============================================ */

/* Extra Small Devices (< 480px) */
@media (max-width: 480px) {
    :root {
        --margin-desktop: 16px;
        --margin-mobile: 12px;
    }

    nav {
        height: 70px;
        padding: 0 var(--margin-mobile);
    }

    .logo img {
        height: 80px;
    }

    .nav-menu li {
        width: 100%;
    }

    nav a {
        font-size: 13px;
        padding: 10px 12px;
    }

    .mobile-menu-btn {
        font-size: 20px;
        padding: 4px;
    }

    section {
        padding: 32px var(--margin-mobile) !important;
    }

    h1 {
        font-size: 24px;
        line-height: 32px;
    }

    h2 {
        font-size: 20px;
        line-height: 28px;
    }

    h3 {
        font-size: 18px;
        line-height: 24px;
    }

    p {
        font-size: 13px;
        line-height: 20px;
    }

    .card {
        padding: 16px;
        border-radius: 12px;
    }

    button, .btn {
        padding: 8px 16px;
        font-size: 12px;
        width: 100%;
    }
}

/* Small Devices - Mobile (480px - 640px) */
@media (min-width: 481px) and (max-width: 640px) {
    :root {
        --margin-desktop: 16px;
        --margin-mobile: 16px;
    }

    nav {
        height: 70px;
        padding: 0 var(--margin-mobile);
    }

    .logo img {
        height: 50px;
    }

    section {
        padding: 40px var(--margin-mobile) !important;
    }

    h1 {
        font-size: 26px;
        line-height: 34px;
    }

    h2 {
        font-size: 22px;
        line-height: 30px;
    }

    .card {
        padding: 20px;
    }

    button, .btn {
        padding: 10px 20px;
        font-size: 13px;
        width: auto;
    }
}

/* Tablet - Small (640px - 768px) */
@media (min-width: 641px) and (max-width: 768px) {
    :root {
        --margin-desktop: 24px;
    }

    nav {
        height: 75px;
        padding: 0 var(--margin-desktop);
    }

    .logo img {
        height: 100px;
    }

    section {
        padding: 48px var(--margin-desktop) !important;
    }

    h1 {
        font-size: 32px;
        line-height: 40px;
    }

    h2 {
        font-size: 26px;
        line-height: 34px;
    }

    .card {
        padding: 24px;
    }

    [style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    [style*="grid-template-columns: 2fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    [style*="grid-template-columns: 1.4fr 1fr"] {
        grid-template-columns: 1fr !important;
    }
}

/* Tablet - Large (768px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
    :root {
        --margin-desktop: 40px;
    }

    nav {
        height: 80px;
        padding: 0 var(--margin-desktop);
    }

    .logo img {
        height: 200px;
    }

    section {
        padding: 64px var(--margin-desktop) !important;
    }

    h1 {
        font-size: 36px;
        line-height: 44px;
    }

    h2 {
        font-size: 28px;
        line-height: 36px;
    }

    .card {
        padding: 28px;
    }

    [style*="grid-template-columns: 1fr 1fr 1fr"] {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* Desktop (1025px and above) */
@media (min-width: 1025px) {
    :root {
        --margin-desktop: 64px;
    }

    nav {
        height: 80px;
        padding: 0 var(--margin-desktop);
    }

    .logo img {
        height: 200px;
    }

    section {
        padding: 96px var(--margin-desktop) !important;
    }
}

/* Large Desktop (1440px and above) */
@media (min-width: 1440px) {
    :root {
        --max-width: 1400px;
    }

    body {
        font-size: 16px;
    }
}
