/* OHA Infotech - Base Styles & Variables */
/* Windows 11 Color Palette and Core Foundations */

:root {
    /* Windows 11 Color Palette */
    --primary-color: #0078d4;
    --primary-dark: #106ebe;
    --secondary-color: #00bcf2;
    --accent-color: #8764b8;
    --success-color: #107c10;
    --warning-color: #ffb900;
    --error-color: #d83b01;
    
    /* Windows 11 Neutral Colors - Enhanced for better readability */
    --bg-primary: rgba(243, 242, 251, 0.9);
    --bg-secondary: rgba(249, 249, 249, 0.85);
    --bg-glass: rgba(255, 255, 255, 0.3);
    --bg-glass-hover: rgba(255, 255, 255, 0.4);
    --bg-dark-glass: rgba(0, 0, 0, 0.2);
    
    /* Enhanced font colors for better contrast */
    --text-primary: #1a1a1a;
    --text-secondary: #2d2d2d;
    --text-light: #555555;
    --text-muted: #777777;
    --text-white: #ffffff;
    --text-glass: rgba(255, 255, 255, 0.98);
    --text-glass-dark: rgba(0, 0, 0, 0.85);
    --text-on-primary: #ffffff;
    --text-on-secondary: #1a1a1a;
    
    /* Interactive text colors */
    --text-link: var(--primary-color);
    --text-link-hover: var(--primary-dark);
    --text-success: var(--success-color);
    --text-warning: var(--warning-color);
    --text-error: var(--error-color);
    
    --border-color: rgba(0, 0, 0, 0.15);
    --shadow-glass: 0 8px 32px rgba(31, 38, 135, 0.37);
    --shadow-elevated: 0 8px 16px rgba(0, 0, 0, 0.12);
    --shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
    
    /* Typography */
    --font-primary: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-code: 'Cascadia Code', 'Fira Code', monospace;
    
    /* Spacing & Border Radius */
    --border-radius: 8px;
    --border-radius-large: 12px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    --transition-fast: all 0.15s ease;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 400;
    background: linear-gradient(135deg, 
        #667eea 0%, 
        #764ba2 20%, 
        #f093fb 40%, 
        #f5576c 60%, 
        #4facfe 80%, 
        #00f2fe 100%);
    background-attachment: fixed;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Windows 11 Background Pattern */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.03) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

/* Windows 11 Floating Particles */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255, 255, 255, 0.1), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(255, 255, 255, 0.1), transparent);
    background-repeat: repeat;
    background-size: 150px 150px;
    animation: float 20s linear infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes float {
    0% { transform: translateY(0px) translateX(0px); }
    33% { transform: translateY(-10px) translateX(5px); }
    66% { transform: translateY(5px) translateX(-5px); }
    100% { transform: translateY(0px) translateX(0px); }
}

html {
    scroll-behavior: smooth;
}

/* Windows 11 Custom Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 120, 212, 0.6);
    border-radius: 6px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 120, 212, 0.8);
}

/* Firefox Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 120, 212, 0.6) rgba(255, 255, 255, 0.1);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-rendering: optimizeLegibility;
}

/* Responsive font sizes using clamp for better scaling */
h1 { 
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 { 
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    letter-spacing: -0.01em;
}

h3 { 
    font-size: clamp(1.5rem, 3vw, 2.25rem);
    font-weight: 600;
}

h4 { 
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 500;
}

h5 { 
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 500;
}

h6 { 
    font-size: clamp(1rem, 1.5vw, 1.25rem);
    font-weight: 500;
}

/* Enhanced paragraph styles */
p {
    font-size: clamp(1rem, 1.2vw, 1.125rem);
    line-height: 1.7;
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* Text utility classes for better color management */
.text-primary { color: var(--text-primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-light { color: var(--text-light) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-white { color: var(--text-white) !important; }
.text-glass { color: var(--text-glass) !important; }
.text-glass-dark { color: var(--text-glass-dark) !important; }
.text-on-primary { color: var(--text-on-primary) !important; }
.text-on-secondary { color: var(--text-on-secondary) !important; }

/* Interactive text styles */
.text-link { 
    color: var(--text-link);
    text-decoration: none;
    transition: var(--transition-fast);
}

.text-link:hover { 
    color: var(--text-link-hover);
    text-decoration: underline;
}

/* Status text colors */
.text-success { color: var(--text-success) !important; }
.text-warning { color: var(--text-warning) !important; }
.text-error { color: var(--text-error) !important; }

/* Text size variants */
.text-large { 
    font-size: clamp(1.125rem, 1.5vw, 1.25rem);
    line-height: 1.6;
}

.text-small { 
    font-size: clamp(0.875rem, 1vw, 1rem);
    line-height: 1.5;
}

.text-xs { 
    font-size: clamp(0.75rem, 0.9vw, 0.875rem);
    line-height: 1.4;
}

/* Text weight utilities */
.font-light { font-weight: 300; }
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Windows 11 Glass Container */
.glass-container {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-glass);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

/* Add subtle inner shadow for depth */
.glass-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(145deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 50%, 
        rgba(0, 0, 0, 0.02) 100%);
    pointer-events: none;
    border-radius: inherit;
}

.glass-container:hover {
    background: var(--bg-glass-hover);
    box-shadow: 0 12px 40px rgba(31, 38, 135, 0.4);
    transform: translateY(-3px);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Ensure text is readable on glass backgrounds */
.glass-container h1,
.glass-container h2,
.glass-container h3,
.glass-container h4,
.glass-container h5,
.glass-container h6 {
    color: var(--text-primary);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

.glass-container p,
.glass-container span,
.glass-container div {
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

.glass-container .text-light {
    color: var(--text-light);
}

/* Performance Optimizations */
* {
    will-change: auto;
}

.glass-container,
.service-card,
.course-card,
.contact-item {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Windows 11 Specific Animations and Effects */

/* Fluent Design Reveal Effect */
.fluent-reveal {
    position: relative;
    overflow: hidden;
}

.fluent-reveal::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), 
        rgba(255, 255, 255, 0.1) 0%, 
        transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.fluent-reveal:hover::before {
    opacity: 1;
}

/* Windows 11 Glow Effects */
.windows11-glow {
    box-shadow: 
        0 0 20px rgba(0, 120, 212, 0.2),
        0 0 40px rgba(0, 120, 212, 0.1),
        var(--shadow-glass);
}

/* Windows 11 Loading Animation */
.loading-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary-color);
    animation: loading-bounce 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loading-bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Windows 11 Fade In Animation */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.2, 0, 0, 1);
}

.fade-in-up.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Windows 11 Acrylic Material Effect */
.acrylic-material {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.1) 0%, 
        rgba(255, 255, 255, 0.05) 100%);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 
        0 8px 32px rgba(31, 38, 135, 0.37),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Windows 11 Mica Effect */
.mica-effect {
    background: linear-gradient(135deg, 
        rgba(243, 242, 251, 0.6) 0%, 
        rgba(249, 249, 249, 0.4) 100%);
    backdrop-filter: blur(40px) brightness(1.1);
    -webkit-backdrop-filter: blur(40px) brightness(1.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Accessibility: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .tech-card {
        animation: none;
    }
    
    .tech-card i,
    .tech-card span {
        animation: none;
    }
    
    .floating-cards::before {
        animation: none;
    }
    
    .tech-card:hover {
        transform: scale(1.05) !important;
    }
}

/* Dark mode compatibility */
@media (prefers-color-scheme: dark) {
    .logo-tagline {
        color: #001944;
    }
}

/* Course Viewer Embedded Section */
.course-viewer-section {
    margin-top: 3rem;
    background: var(--bg-glass);
    backdrop-filter: blur(14px) saturate(160%);
    -webkit-backdrop-filter: blur(14px) saturate(160%);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-glass);
    padding: 1rem 1rem 2rem;
    animation: fadeIn 0.4s ease;
}
.course-viewer-toolbar {
    display:flex;
    align-items:center;
    gap:1rem;
    padding:0.75rem 1rem 0.5rem;
    border-bottom:1px solid rgba(255,255,255,0.25);
    margin-bottom:1rem;
}
.course-viewer-title { 
    font-size:1.25rem; 
    margin:0; 
    font-weight:600; 
    color:var(--text-primary);
}
.course-viewer-frame-wrapper { 
    position:relative; 
    width:100%; 
    height:70vh; 
    border-radius:var(--border-radius); 
    overflow:hidden; 
    background:rgba(0,0,0,0.15);
}
#course-iframe { 
    width:100%; 
    height:100%; 
    border:0; 
    background:#fff; 
}
.course-viewer-section.loading #course-iframe { opacity:0; }
.course-viewer-loading-indicator { 
    position:absolute; 
    inset:0; 
    display:flex; 
    align-items:center; 
    justify-content:center; 
    background:linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0.2)); 
    backdrop-filter:blur(6px); 
    -webkit-backdrop-filter:blur(6px); 
    font-weight:600; 
    color:var(--primary-dark); 
    font-size:1rem;
}

@keyframes fadeIn { from { opacity:0; transform:translateY(12px);} to { opacity:1; transform:translateY(0);} }

/* Course cards hidden when viewer open */
.training-grid.hide-courses { display:none; }
.training-filters.hide-filters { display:none; }