/* ==========================================================================
   FairS IT Solutions - High-Impact, Ultra-Readable Glassmorphism Design System
   Founder: Shakeel Juman & Team
   Full Form: FairS : Future-Ready Artificial Intelligence & Reliable Solutions
   Tagline: Innovating Technology. Empowering Students & Innovators.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');
@import url('https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css');

:root {
    /* High-Impact Deep Tech Dark Theme (Default) */
    --bg-main: #060913;
    --bg-surface: rgba(13, 20, 40, 0.88);
    --bg-surface-elevated: #0d152a;
    --bg-glass: rgba(8, 13, 27, 0.94);
    --bg-glass-card: rgba(15, 24, 48, 0.75);
    --border-glass: rgba(255, 255, 255, 0.15);
    --border-glass-hover: rgba(0, 242, 254, 0.6);
    
    --primary: #00f2fe;
    --primary-glow: rgba(0, 242, 254, 0.45);
    --secondary: #38bdf8;
    --accent: #a855f7;
    --accent-glow: rgba(168, 85, 247, 0.4);
    --gradient-hero: linear-gradient(135deg, #00f2fe 0%, #38bdf8 45%, #a855f7 100%);
    --gradient-card: linear-gradient(135deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 100%);
    --gradient-glow: radial-gradient(circle, rgba(0,242,254,0.2) 0%, rgba(6,9,19,0) 70%);

    --text-main: #ffffff;
    --text-muted: #cbd5e1; /* High-contrast readable secondary text */
    --text-dim: #94a3b8;
    --text-heading: #ffffff;
    
    --card-shadow: 0 16px 40px 0 rgba(0, 0, 0, 0.6);
    --glow-shadow: 0 0 35px rgba(0, 242, 254, 0.3);
    
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-pill: 50px;
    --transition-smooth: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* High-Readability Light Theme Variables */
[data-theme="light"] {
    --bg-main: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-surface-elevated: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.96);
    --bg-glass-card: #ffffff;
    --border-glass: rgba(0, 0, 0, 0.12);
    --border-glass-hover: rgba(2, 132, 199, 0.7);

    --primary: #0284c7;
    --primary-glow: rgba(2, 132, 199, 0.3);
    --secondary: #2563eb;
    --accent: #7c3aed;
    --accent-glow: rgba(124, 58, 237, 0.25);

    --text-main: #0f172a;
    --text-muted: #334155; /* Deep, crisp, clear contrast */
    --text-dim: #64748b;
    --text-heading: #020617;
    
    --card-shadow: 0 12px 32px 0 rgba(0, 0, 0, 0.08);
    --glow-shadow: 0 0 25px rgba(2, 132, 199, 0.2);
}

/* Base Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
    transition: background-color 0.35s ease, color 0.35s ease;
    background-image: 
        radial-gradient(circle at 15% 15%, rgba(0, 242, 254, 0.07) 0%, transparent 45%),
        radial-gradient(circle at 85% 85%, rgba(168, 85, 247, 0.07) 0%, transparent 45%),
        linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 40px 40px, 40px 40px;
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-heading);
    font-weight: 700;
    letter-spacing: -0.025em;
}

p {
    color: var(--text-muted);
    font-size: 1.02rem;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--secondary);
}

/* Futuristic Text Gradients */
.text-gradient {
    background: var(--gradient-hero);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.text-cyan { color: var(--primary) !important; }
.text-violet { color: var(--accent) !important; }
.text-muted { color: var(--text-muted) !important; }

/* Glassmorphism Surface Classes */
.glass-panel {
    background: var(--bg-surface);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    box-shadow: var(--card-shadow);
}

.glass-card {
    background: var(--bg-glass-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(0, 242, 254, 0.4), transparent);
}

.glass-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-glass-hover);
    box-shadow: var(--card-shadow), var(--glow-shadow);
}

/* ==========================================================================
   SOLID ULTRA-READABLE NAVBAR & TWO-LINE WRAP
   ========================================================================== */
.navbar-fairs {
    background: var(--bg-glass) !important;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(0, 242, 254, 0.25);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    padding: 0.65rem 0;
    transition: var(--transition-smooth);
    z-index: 1050;
}

.navbar-fairs.scrolled {
    padding: 0.45rem 0;
    background: var(--bg-surface-elevated) !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.6);
}

.navbar-fairs .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.navbar-fairs .navbar-collapse {
    flex-grow: 1;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.navbar-fairs .navbar-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.4rem;
}

@media (min-width: 992px) {
    .navbar-fairs .navbar-nav {
        flex-wrap: wrap;
        row-gap: 0.3rem;
    }
}

.navbar-brand {
    font-size: 1.45rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: #ffffff !important;
}

.brand-badge {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    background: rgba(0, 242, 254, 0.15);
    border: 1px solid rgba(0, 242, 254, 0.4);
    color: var(--primary);
    font-weight: 700;
}

/* Highly Readable Menu Links */
.nav-link {
    color: #ffffff !important; /* Pure solid readable white */
    font-weight: 600;
    font-size: 0.94rem;
    padding: 0.4rem 0.8rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
    white-space: nowrap;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] .nav-link {
    color: #0f172a !important;
    text-shadow: none;
}

.nav-link:hover, .nav-link.active {
    color: #00f2fe !important;
    background: rgba(0, 242, 254, 0.12);
}

[data-theme="light"] .nav-link:hover, [data-theme="light"] .nav-link.active {
    color: #0284c7 !important;
    background: rgba(2, 132, 199, 0.1);
}

/* Crystal-Clear Dropdown Menus */
.dropdown-menu {
    background: var(--bg-surface-elevated) !important;
    border: 1px solid rgba(0, 242, 254, 0.3) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.85), 0 0 25px rgba(0, 242, 254, 0.15) !important;
    padding: 0.5rem !important;
    z-index: 1060;
}

[data-theme="light"] .dropdown-menu {
    background: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15) !important;
}

.dropdown-item {
    color: #f8fafc !important; /* Crystal clear high-contrast white */
    font-weight: 500;
    font-size: 0.93rem;
    padding: 0.55rem 0.9rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-smooth);
}

[data-theme="light"] .dropdown-item {
    color: #0f172a !important;
}

.dropdown-item:hover, .dropdown-item:focus {
    background: rgba(0, 242, 254, 0.18) !important;
    color: #00f2fe !important;
    font-weight: 600;
    transform: translateX(4px);
}

[data-theme="light"] .dropdown-item:hover {
    background: rgba(2, 132, 199, 0.12) !important;
    color: #0284c7 !important;
}

/* Modern Glow Buttons */
.btn-fairs-primary {
    background: var(--gradient-hero);
    color: #000000 !important;
    font-weight: 700;
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.75rem 1.75rem;
    box-shadow: 0 4px 20px var(--primary-glow);
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-fairs-primary:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 30px var(--primary-glow);
}

.btn-fairs-outline {
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff !important;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-pill);
    padding: 0.75rem 1.75rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

[data-theme="light"] .btn-fairs-outline {
    color: #0f172a !important;
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.15);
}

.btn-fairs-outline:hover {
    background: rgba(0, 242, 254, 0.15);
    border-color: var(--primary);
    color: var(--primary) !important;
    transform: translateY(-2px);
}

.btn-fairs-sm {
    padding: 0.45rem 1rem;
    font-size: 0.85rem;
}

/* Hero Section with 3D Canvas & AI Animation */
.hero-section {
    position: relative;
    min-height: 92vh;
    display: flex;
    align-items: center;
    padding: 7.5rem 0 4.5rem 0;
    overflow: hidden;
}

#three-hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: all;
    opacity: 0.92;
}

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

.hero-title {
    font-size: 3.8rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 1.5rem;
    letter-spacing: -0.035em;
}

@media (max-width: 991px) {
    .hero-title { font-size: 2.6rem; }
    .hero-section { padding: 5.5rem 0 3.5rem 0; min-height: auto; }
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 700px;
    margin-bottom: 2.2rem;
    line-height: 1.65;
}

/* AI Neural Pulse Badge */
.ai-pulse-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.45rem 1.25rem;
    border-radius: var(--radius-pill);
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.4);
    color: var(--primary);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 25px rgba(0, 242, 254, 0.2);
    animation: floatGlow 4s ease-in-out infinite alternate;
}

@keyframes floatGlow {
    0% { transform: translateY(0px); box-shadow: 0 0 15px rgba(0, 242, 254, 0.15); }
    100% { transform: translateY(-4px); box-shadow: 0 0 30px rgba(0, 242, 254, 0.35); }
}

.ai-pulse-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #00f2fe;
    box-shadow: 0 0 12px #00f2fe;
    animation: pulseRing 1.8s infinite;
}

@keyframes pulseRing {
    0% { transform: scale(0.9); opacity: 1; }
    50% { transform: scale(1.4); opacity: 0.4; }
    100% { transform: scale(0.9); opacity: 1; }
}

/* Interactive AI Neural Visualizer Card */
.ai-matrix-card {
    background: rgba(13, 20, 42, 0.88);
    border: 1px solid rgba(0, 242, 254, 0.35);
    border-radius: var(--radius-lg);
    box-shadow: 0 15px 45px rgba(0, 242, 254, 0.18);
    backdrop-filter: blur(18px);
    overflow: hidden;
    position: relative;
}

.ai-matrix-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00f2fe, #a855f7, transparent);
    animation: scanLine 3s linear infinite;
}

@keyframes scanLine {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Modern Form Controls */
.form-fairs {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    color: var(--text-main) !important;
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    transition: var(--transition-smooth);
}

.form-fairs:focus {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
    outline: none;
}

[data-theme="light"] .form-fairs {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.15);
    color: #0f172a !important;
}

/* Tables */
.table-fairs {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.table-fairs th {
    color: var(--text-dim);
    font-size: 0.82rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 0.75rem 1rem;
    border: none;
}

.table-fairs td {
    background: rgba(255, 255, 255, 0.04);
    padding: 1rem;
    border: none;
    border-top: 1px solid var(--border-glass);
    border-bottom: 1px solid var(--border-glass);
}

.table-fairs tr td:first-child {
    border-top-left-radius: var(--radius-sm);
    border-bottom-left-radius: var(--radius-sm);
    border-left: 1px solid var(--border-glass);
}

.table-fairs tr td:last-child {
    border-top-right-radius: var(--radius-sm);
    border-bottom-right-radius: var(--radius-sm);
    border-right: 1px solid var(--border-glass);
}

[data-theme="light"] .table-fairs td {
    background: #ffffff;
}

.badge-fairs-success {
    background: rgba(34, 197, 94, 0.18);
    color: #22c55e;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
}

/* Footer Styling */
.footer-fairs {
    background: #04070e;
    border-top: 1px solid rgba(0, 242, 254, 0.2);
    padding: 5rem 0 2.5rem 0;
    margin-top: 6rem;
}

[data-theme="light"] .footer-fairs {
    background: #ffffff;
    border-top-color: rgba(0, 0, 0, 0.1);
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    display: block;
    margin-bottom: 0.65rem;
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition-smooth);
}

.footer-link:hover {
    color: var(--primary);
    transform: translateX(4px);
}

/* Floating AI Chat Assistant FAB */
.ai-chat-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: var(--gradient-hero);
    border: none;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px var(--primary-glow);
    cursor: pointer;
    z-index: 1060;
    transition: var(--transition-smooth);
}

.ai-chat-fab:hover {
    transform: scale(1.1) rotate(6deg);
    box-shadow: 0 15px 40px var(--primary-glow);
}

.ai-chat-widget {
    position: fixed;
    bottom: 105px;
    right: 30px;
    width: 380px;
    height: 520px;
    background: var(--bg-surface-elevated);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    display: none;
    flex-direction: column;
    z-index: 1060;
    overflow: hidden;
}

.ai-chat-widget.active {
    display: flex;
    animation: popupChat 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes popupChat {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.chat-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    padding: 1.2rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.message {
    max-width: 85%;
    padding: 0.8rem 1.1rem;
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    line-height: 1.5;
}

.message.assistant {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--border-glass);
    align-self: flex-start;
    color: var(--text-main);
}

.message.user {
    background: var(--primary);
    color: #000;
    font-weight: 600;
    align-self: flex-end;
}

.chat-input-area {
    padding: 0.85rem;
    border-top: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.02);
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.chat-input {
    flex: 1;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-pill);
    padding: 0.6rem 1.2rem;
    color: var(--text-main);
    font-size: 0.9rem;
    outline: none;
}

.chat-input:focus {
    border-color: var(--primary);
}

/* Command Palette Item */
.command-palette-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    transition: var(--transition-smooth);
}

.command-palette-item:hover, .command-palette-item.active {
    background: rgba(0, 242, 254, 0.15);
    border-color: var(--primary);
    transform: translateX(4px);
}
