/* ============================================================
   Ultra-Tech Laboratories — Global Stylesheet
   Professional Corporate Design System
   ============================================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---------- CSS Custom Properties (Design Tokens) ---------- */
:root {
    /* Brand Colors */
    --primary: #355872;
    --primary-dark: #2a475d;
    --primary-light: #4a6f8a;
    --secondary: #7AAACE;
    --secondary-dark: #5e92b8;
    --accent: #9CD5FF;
    --accent-dark: #7ac0f0;
    --accent-light: #bce3ff;

    /* Neutrals */
    --white: #ffffff;
    --gray-50: #F7F8F0;
    --gray-100: #f0f1ea;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Semantic */
    --success: #059669;
    --success-bg: #ecfdf5;
    --danger: #dc2626;
    --danger-bg: #fef2f2;
    --warning: #d97706;
    --warning-bg: #fffbeb;
    --info: #0284c7;
    --info-bg: #f0f9ff;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    --gradient-hero: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 40%, var(--secondary) 100%);
    --gradient-accent: linear-gradient(135deg, var(--accent) 0%, var(--accent-light) 100%);
    --gradient-dark: linear-gradient(135deg, var(--gray-800) 0%, var(--gray-700) 100%);

    /* Shadows */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.12);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 1.875rem;
    --font-size-4xl: 2.25rem;

    /* Spacing */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: all 0.15s ease;
    --transition: all 0.3s ease;
    --transition-slow: all 0.5s ease;

    /* Legacy aliases (backward compatibility) */
    --deep-blue: var(--primary);
    --teal: var(--secondary);
    --golden: var(--accent);
    --dark: var(--gray-800);
}

/* ---------- Base Reset & Typography ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.7;
    color: var(--gray-800);
    background-color: var(--gray-50);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-family);
    font-weight: 700;
    line-height: 1.3;
    color: var(--gray-900);
    margin-bottom: 0.5em;
}

h1 {
    font-size: var(--font-size-4xl);
}

h2 {
    font-size: var(--font-size-3xl);
}

h3 {
    font-size: var(--font-size-2xl);
}

h4 {
    font-size: var(--font-size-xl);
}

p {
    color: var(--gray-600);
    line-height: 1.7;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ---------- Utility Classes ---------- */
.text-primary {
    color: var(--primary) !important;
}

.text-secondary {
    color: var(--secondary) !important;
}

.text-accent {
    color: var(--accent) !important;
}

.text-muted {
    color: var(--gray-500) !important;
}

.bg-primary-gradient {
    background: var(--gradient-primary) !important;
}

.bg-hero-gradient {
    background: var(--gradient-hero) !important;
}

.section-title {
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

/* ---------- Button Overrides ---------- */
.btn {
    font-family: var(--font-family);
    font-weight: 600;
    border-radius: var(--radius-sm);
    padding: 0.55rem 1.5rem;
    transition: var(--transition);
    font-size: var(--font-size-sm);
    letter-spacing: 0.01em;
}

.btn-primary {
    background: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background: var(--primary-dark) !important;
    border-color: var(--primary-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(53, 88, 114, 0.35);
}

.btn-outline-primary {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
    background: transparent !important;
}

.btn-outline-primary:hover {
    background: var(--primary) !important;
    color: var(--white) !important;
    transform: translateY(-1px);
}

.btn-accent {
    background: var(--accent) !important;
    border-color: var(--accent) !important;
    color: var(--primary-dark) !important;
    font-weight: 700;
}

.btn-accent:hover {
    background: var(--accent-dark) !important;
    border-color: var(--accent-dark) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(156, 213, 255, 0.4);
}

/* ---------- Card Overrides ---------- */
.card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    background: var(--white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.card-header {
    background: var(--primary) !important;
    color: var(--white);
    border-bottom: none;
    padding: 1rem 1.25rem;
    font-weight: 600;
}

/* ---------- Form Overrides ---------- */
.form-control,
.form-select {
    font-family: var(--font-family);
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 0.6rem 0.85rem;
    font-size: var(--font-size-sm);
    transition: var(--transition-fast);
    color: var(--gray-800);
    background-color: var(--white);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(53, 88, 114, 0.12);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--gray-700);
    font-size: var(--font-size-sm);
    margin-bottom: 0.35rem;
}

/* ---------- Modal Overrides ---------- */
.modal-content {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
}

.modal-header {
    background: var(--primary);
    color: var(--white);
    border-bottom: none;
    padding: 1rem 1.5rem;
}

.modal-header .modal-title {
    font-weight: 700;
    font-size: var(--font-size-lg);
}

/* ---------- Badge Overrides ---------- */
.badge {
    font-family: var(--font-family);
    font-weight: 600;
    font-size: var(--font-size-xs);
    padding: 0.35em 0.65em;
    border-radius: var(--radius-sm);
}

.badge.bg-golden,
.badge.bg-accent {
    background-color: var(--accent) !important;
    color: var(--primary-dark) !important;
}

/* ---------- Alert Overrides ---------- */
.alert {
    border-radius: var(--radius-md);
    border: none;
    font-size: var(--font-size-sm);
}

/* ---------- Page Container ---------- */
.page-section {
    padding: 4rem 0;
}

.page-header {
    text-align: center;
    padding: 3rem 0 2rem;
}

.page-header h2 {
    color: var(--primary);
    font-weight: 800;
    position: relative;
    display: inline-block;
    padding-bottom: 0.75rem;
}

.page-header h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

/* ---------- Dropdown Overrides ---------- */
.dropdown-menu {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown-item {
    font-size: var(--font-size-sm);
    padding: 0.5rem 1.25rem;
    color: var(--gray-700);
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background-color: var(--gray-100);
    color: var(--primary);
}

/* ---------- Scrollbar Styling ---------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-400);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-500);
}

/* ---------- Selection ---------- */
::selection {
    background: rgba(53, 88, 114, 0.15);
    color: var(--primary-dark);
}

/* ---------- Responsive Typography ---------- */
@media (max-width: 768px) {
    h1 {
        font-size: var(--font-size-3xl);
    }

    h2 {
        font-size: var(--font-size-2xl);
    }

    h3 {
        font-size: var(--font-size-xl);
    }
}