/* ===================================
   MODERN PROFESSIONAL CSS FRAMEWORK
   Enzikiriza Y'abadugavu Ababonesebwa Foundation
   ================================== */

/* === CSS RESET & BASE STYLES === */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Color Palette - Professional Theme */
    --primary: #1a365d;
    --primary-light: #2b77ad;
    --primary-dark: #153e75;
    --primary-alpha: rgba(26, 54, 93, 0.1);
    
    --secondary: #f7fafc;
    --accent: #d69e2e;
    
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-light: #ffffff;
    
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    
    --border-light: #e2e8f0;
    --border-medium: #cbd5e0;
    --border-dark: #a0aec0;
    
    --success: #38a169;
    --warning: #d69e2e;
    --danger: #e53e3e;
    --info: #3182ce;
    
    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
    
    --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;
    --font-size-5xl: 3rem;
    
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    --font-weight-extrabold: 800;
    
    --line-height-tight: 1.25;
    --line-height-snug: 1.375;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.625;
    --line-height-loose: 2;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-base: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-base: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
    
    /* Breakpoints */
    --bp-sm: 640px;
    --bp-md: 768px;
    --bp-lg: 1024px;
    --bp-xl: 1280px;
    --bp-2xl: 1536px;
    
    /* Z-index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* === TYPOGRAPHY === */
html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-relaxed);
    color: var(--text-primary);
    background-color: var(--bg-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

/* Main content wrapper */
.main-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    flex: 1;
    padding-top: 80px; /* Navbar height */
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    color: var(--primary);
    margin-bottom: var(--space-4);
    letter-spacing: -0.025em;
}
}

h1 {
    font-size: clamp(var(--font-size-3xl), 5vw, var(--font-size-5xl));
    font-weight: var(--font-weight-bold);
}

h2 {
    font-size: clamp(var(--font-size-2xl), 4vw, var(--font-size-4xl));
}

h3 {
    font-size: clamp(var(--font-size-xl), 3vw, var(--font-size-3xl));
}

h4 {
    font-size: clamp(var(--font-size-lg), 2.5vw, var(--font-size-2xl));
}

h5 {
    font-size: var(--font-size-xl);
}

h6 {
    font-size: var(--font-size-lg);
}

/* Text Elements */
p {
    margin-bottom: var(--space-4);
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
}

.lead {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    line-height: var(--line-height-relaxed);
    color: var(--text-primary);
}

.text-muted {
    color: var(--text-muted);
}

.text-primary {
    color: var(--primary);
}

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

/* Links */
a {
    color: var(--primary);
    text-decoration: none;
    transition: all var(--transition-fast);
    border-radius: var(--radius-sm);
}

a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--primary-alpha);
    outline-offset: 2px;
}

/* Professional paragraph spacing */
p {
    margin-bottom: var(--space-4);
    line-height: var(--line-height-relaxed);
}

p.lead {
    font-size: var(--font-size-lg);
    font-weight: var(--font-weight-medium);
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
    line-height: var(--line-height-relaxed);
}

/* Lists */
ul, ol {
    margin-bottom: var(--space-4);
    padding-left: var(--space-6);
}

li {
    margin-bottom: var(--space-2);
    color: var(--text-secondary);
    line-height: var(--line-height-relaxed);
}

/* === LAYOUT SYSTEM === */
.container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

@media (min-width: 640px) {
    .container {
        padding: 0 var(--space-6);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 var(--space-8);
    }
}

/* Grid System */
.grid {
    display: grid;
    gap: var(--space-6);
}

.grid-cols-1 { grid-template-columns: repeat(1, 1fr); }
.grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 768px) {
    .grid-cols-2,
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .grid-cols-3,
    .grid-cols-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Flexbox Utilities */
.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 { gap: var(--space-2); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* === SECTION SYSTEM === */
section {
    padding: var(--space-16) 0;
}

.section-sm {
    padding: var(--space-12) 0;
}

.section-lg {
    padding: var(--space-24) 0;
}

.section-header {
    margin-bottom: var(--space-12);
}

.section-header h2 {
    margin-bottom: var(--space-4);
}

.section-header p {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    max-width: 600px;
}

.text-center {
    text-align: center;
}

.text-center .section-header p {
    margin: 0 auto;
}

/* === CARD SYSTEM === */
.card {
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-base);
    overflow: hidden;
    transition: all var(--transition-base);
    border: 1px solid var(--border-light);
    position: relative;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-2xl);
    border-color: var(--primary-alpha);
}

.card-header {
    padding: var(--space-6) var(--space-6) var(--space-4);
    border-bottom: 1px solid var(--border-light);
}

.card-body {
    padding: var(--space-6);
    position: relative;
}

.card-footer {
    padding: var(--space-4) var(--space-6) var(--space-6);
    border-top: 1px solid var(--border-light);
    background: var(--bg-secondary);
}

.card-image {
    position: relative;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.card-image img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card:hover .card-image img {
    transform: scale(1.1);
}

/* === BUTTON SYSTEM === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    line-height: 1.2;
    text-decoration: none;
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    min-height: 48px;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.025em;
    box-shadow: var(--shadow-sm);
}

.btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-light);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
    color: var(--text-light);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--bg-primary);
    color: var(--primary);
    border-color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--text-light);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-medium);
}

.btn-outline:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-dark);
    text-decoration: none;
}

.btn-lg {
    padding: var(--space-4) var(--space-8);
    font-size: var(--font-size-lg);
    min-height: 52px;
}

.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--font-size-sm);
    min-height: 36px;
}

/* === NAVIGATION === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    z-index: var(--z-fixed);
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) 0;
    min-height: 80px;
}

.navbar-brand {
    font-family: var(--font-serif);
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-bold);
    color: var(--primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar-brand:hover {
    color: var(--primary-light);
    text-decoration: none;
}

.navbar-logo {
    height: 40px;
    width: auto;
    display: block;
}

.navbar-brand-text {
    display: inline-block;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    padding: var(--space-2) 0;
    position: relative;
    transition: all var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary);
    text-decoration: none;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Navigation */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    padding: var(--space-2);
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--primary);
    transition: all var(--transition-fast);
}

.mobile-nav {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    max-height: calc(100vh - 80px); /* Fit within viewport minus navbar */
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    z-index: var(--z-dropdown);
    overflow-y: auto;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    overscroll-behavior: contain; /* Prevent scroll chaining */
}

.mobile-nav-list {
    padding: var(--space-4) var(--space-6);
    list-style: none;
    margin: 0;
    display: grid;
    gap: var(--space-2);
}

.mobile-nav-item {
    margin: 0;
}

.mobile-nav-link {
    display: block;
    padding: var(--space-3) var(--space-4);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    text-decoration: none;
    border: 1px solid transparent;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: var(--primary);
    color: var(--text-light);
    border-color: var(--primary-light);
    text-decoration: none;
    transform: translateX(4px);
}

@media (max-width: 1024px) {
    .navbar-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-nav.active {
        display: block;
    }
}

/* Lock body scroll when mobile dialog/menu is open */
body.modal-open {
    overflow: hidden;
}

/* === PAGE HEADERS === */
.page-header {
    background: var(--primary);
    color: var(--text-light);
    padding: var(--space-20) 0 var(--space-16);
    margin-top: 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    color: var(--text-light);
    margin-bottom: var(--space-4);
}

.page-header p {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
}

/* === HERO SECTIONS === */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: var(--primary);
    color: var(--text-light);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    color: var(--text-light);
    margin-bottom: var(--space-6);
    font-size: clamp(var(--font-size-4xl), 6vw, 4rem);
}

.hero p {
    font-size: var(--font-size-xl);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-8);
    line-height: var(--line-height-relaxed);
}

.hero-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

/* Hero with Background Image */
.hero-with-bg {
    background: none;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

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

/* === IMAGE SLIDER SYSTEM === */
.image-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.slider-container {
    display: flex;
    transition: transform var(--transition-slow);
}

.slide {
    min-width: 100%;
    position: relative;
}

.slide img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
}

.slider-controls {
    position: absolute;
    bottom: var(--space-4);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-2);
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.slider-dot.active {
    background: var(--text-light);
    transform: scale(1.2);
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    z-index: 3;
}

.slider-nav:hover {
    background: var(--text-light);
    transform: translateY(-50%) scale(1.1);
}

.slider-prev {
    left: var(--space-4);
}

.slider-next {
    right: var(--space-4);
}

/* Horizontal Scrolling Image Gallery */
.horizontal-gallery {
    display: flex;
    gap: var(--space-4);
    overflow-x: auto;
    padding: var(--space-4) 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.horizontal-gallery::-webkit-scrollbar {
    height: 6px;
}

.horizontal-gallery::-webkit-scrollbar-track {
    background: var(--border-light);
    border-radius: var(--radius-full);
}

.horizontal-gallery::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-full);
}

.gallery-item {
    flex-shrink: 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* Featured Media Gallery */
.featured-media {
    display: flex;
    gap: var(--space-3);
    overflow-x: auto;
    padding: var(--space-4) 0;
    scroll-behavior: smooth;
}

.featured-media::-webkit-scrollbar {
    height: 4px;
}

.featured-media::-webkit-scrollbar-track {
    background: var(--border-light);
    border-radius: var(--radius-full);
}

.featured-media::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: var(--radius-full);
}

.media-item {
    flex-shrink: 0;
    width: 120px;
    height: 80px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
    background: var(--bg-primary);
    padding: var(--space-2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.media-item:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
}

.media-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* === FORM SYSTEM === */
.form-group {
    margin-bottom: var(--space-6);
}

.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-medium);
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    font-family: var(--font-sans);
    font-size: var(--font-size-base);
    line-height: var(--line-height-normal);
    color: var(--text-primary);
    background: var(--bg-primary);
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-alpha);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* === LIVE CHAT WIDGET === */
.chat-widget {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    z-index: var(--z-modal);
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    background: var(--primary);
    color: var(--text-light);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--font-size-xl);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

.chat-toggle:hover {
    background: var(--primary-light);
    transform: scale(1.1);
}

.chat-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-2xl);
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.chat-window.active {
    display: flex;
    animation: slideUp 0.3s ease-out;
}

.chat-header {
    padding: var(--space-4);
    background: var(--primary);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header h4 {
    color: var(--text-light);
    margin: 0;
    font-size: var(--font-size-lg);
}

.chat-close {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: var(--font-size-lg);
    cursor: pointer;
    padding: var(--space-1);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.chat-close:hover {
    background: rgba(255, 255, 255, 0.1);
}

.chat-body {
    flex: 1;
    padding: var(--space-4);
    overflow-y: auto;
}

.chat-form {
    padding: var(--space-4);
    border-top: 1px solid var(--border-light);
}

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

/* === VIDEO PLAYER SYSTEM === */
.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    margin: var(--space-6) 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    display: none;
}

.video-thumbnail {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: transform var(--transition-base);
}

.video-thumbnail:hover {
    transform: scale(1.02);
}

.video-thumbnail::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    transition: background var(--transition-fast);
}

.video-thumbnail:hover::before {
    background: rgba(0, 0, 0, 0.1);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-xl);
}

.play-button:hover {
    background: var(--text-light);
    transform: translate(-50%, -50%) scale(1.1);
}

.play-button::before {
    content: '';
    width: 0;
    height: 0;
    border-left: 24px solid var(--primary);
    border-top: 14px solid transparent;
    border-bottom: 14px solid transparent;
    margin-left: 4px;
}

.video-container.loaded .video-thumbnail {
    display: none;
}

.video-container.loaded iframe {
    display: block;
}

/* === RESPONSIVE UTILITIES === */
@media (max-width: 768px) {
    section {
        padding: var(--space-12) 0;
    }
    
    .section-lg {
        padding: var(--space-16) 0;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .chat-window {
        width: 300px;
        height: 450px;
    }
    
    .gallery-item {
        width: 250px;
    }
    
    .media-item {
        width: 100px;
        height: 60px;
    }
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out forwards;
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out forwards;
}

.pulse {
    animation: pulse 2s infinite;
}

/* Professional scroll behavior */
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

/* Professional selection styling */
::selection {
    background: var(--primary-alpha);
    color: var(--primary);
}

::-moz-selection {
    background: var(--primary-alpha);
    color: var(--primary);
}

/* === UTILITIES === */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hidden {
    display: none;
}

.invisible {
    visibility: hidden;
}

.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-100 { opacity: 1; }

/* Spacing Utilities */
.m-0 { margin: 0; }
.m-auto { margin: auto; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

.p-0 { padding: 0; }
.p-4 { padding: var(--space-4); }
.p-6 { padding: var(--space-6); }
.py-4 { padding-top: var(--space-4); padding-bottom: var(--space-4); }
.px-4 { padding-left: var(--space-4); padding-right: var(--space-4); }

/* Background Utilities */
.bg-primary { background-color: var(--primary); }
.bg-secondary { background-color: var(--bg-secondary); }
.bg-white { background-color: var(--bg-primary); }

/* Border Utilities */
.border { border: 1px solid var(--border-light); }
.border-0 { border: none; }
.rounded { border-radius: var(--radius-md); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: var(--radius-full); }

/* Shadow Utilities */
.shadow { box-shadow: var(--shadow-base); }
.shadow-md { box-shadow: var(--shadow-md); }
.shadow-lg { box-shadow: var(--shadow-lg); }
/* Leader Horizontal Auto-Scrolling Gallery */
/* ============================================================================ */

.leader-horizontal-gallery {
    position: relative;
    margin: 2rem 0;
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.leader-gallery-container {
    position: relative;
    overflow: hidden;
    width: 100%;
}

.leader-gallery-track {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
    /* Show 4 cards at a time with some space */
    width: 100%;
}

.leader-gallery-track::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.leader-gallery-card {
    flex-shrink: 0;
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid var(--border-color);
    width: 240px; /* Fixed width for 4-card layout */
}

/* Container to show exactly 4 cards */
.leader-gallery-container {
    position: relative;
    overflow: hidden;
    width: 100%;
    /* Calculate width for exactly 4 cards: (240px + 24px gap) * 4 - 24px final gap + 64px padding */
    max-width: calc(240px * 4 + 1.5rem * 3 + 4rem);
    margin: 0 auto;
}

.leader-gallery-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-xl);
    z-index: 10;
    position: relative;
}

.leader-gallery-image {
    position: relative;
    width: 100%;
    height: 350px; /* Fixed height for consistency */
    overflow: hidden;
}

.leader-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform var(--transition-base);
}

.leader-gallery-card:hover .leader-gallery-image img {
    transform: scale(1.1);
}

.leader-gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all var(--transition-base);
}

.leader-gallery-card:hover .leader-gallery-overlay {
    opacity: 1;
}

.gallery-view-btn {
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    border: none;
    padding: 1rem;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 1.25rem;
    transform: translateY(20px);
    backdrop-filter: blur(10px);
}

.leader-gallery-card:hover .gallery-view-btn {
    transform: translateY(0) scale(1.1);
    background: var(--white);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

.gallery-view-btn:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(0) scale(1.2);
}

/* Gallery Navigation */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    color: var(--primary-color);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 1.25rem;
    z-index: 100;
    opacity: 0;
    backdrop-filter: blur(10px);
}

.leader-horizontal-gallery:hover .gallery-nav {
    opacity: 1;
}

.gallery-nav:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-lg);
}

.gallery-nav-left {
    left: 1rem;
}

.gallery-nav-right {
    right: 1rem;
}

/* Leader Modal */
.leader-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.leader-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    cursor: pointer;
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    transform: scale(0.8) translateY(50px);
    transition: transform var(--transition-base);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.leader-modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all var(--transition-base);
    font-size: 1.25rem;
    backdrop-filter: blur(10px);
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.modal-image-wrapper {
    position: relative;
    max-width: 900px;
    max-height: 70vh;
}

.modal-image-wrapper img {
    width: 100%;
    height: auto;
    max-height: 70vh;
    object-fit: contain;
    display: block;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    border: none;
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 1.5rem;
    backdrop-filter: blur(10px);
}

.modal-nav:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    left: 1rem;
}

.modal-next {
    right: 1rem;
}

.modal-info {
    padding: 2rem;
    background: var(--bg-secondary);
    text-align: center;
}

.modal-caption {
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-size: 1.125rem;
    line-height: 1.6;
    font-weight: 500;
}

.modal-counter {
    background: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-block;
}

/* Prevent scrolling when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Auto-scroll animation pause on hover */
.leader-horizontal-gallery:hover .leader-gallery-track {
    /* Remove old animation */
}

/* Responsive Design */
@media (max-width: 1200px) {
    .leader-gallery-container {
        /* Show 3 cards on smaller desktop */
        max-width: calc(240px * 3 + 1.5rem * 2 + 4rem);
    }
    
    .leader-gallery-card {
        width: 240px;
    }
    
    .leader-gallery-image {
        height: 300px;
    }
}

@media (max-width: 900px) {
    .leader-gallery-container {
        /* Show 2 cards on tablets */
        max-width: calc(250px * 2 + 1.5rem * 1 + 4rem);
    }
    
    .leader-gallery-track {
        padding: 1.5rem;
        gap: 1rem;
    }
    
    .leader-gallery-card {
        width: 250px; /* Increased from 220px for better mobile transition */
    }
    
    .leader-gallery-image {
        height: 320px; /* Increased from 280px for more height */
    }
    
    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .gallery-view-btn {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .modal-nav {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
    
    .modal-close {
        width: 40px;
        height: 40px;
        top: 0.5rem;
        right: 0.5rem;
        font-size: 1rem;
    }
}

@media (max-width: 600px) {
    .leader-gallery-container {
        /* Show 1 card on mobile but make it wider */
        max-width: calc(280px + 2rem);
    }
    
    .leader-gallery-track {
        padding: 1rem;
    }
    
    .leader-gallery-card {
        width: 280px; /* Increased from 200px for more zoomed out view */
    }
    
    .leader-gallery-image {
        height: 350px; /* Increased from 250px for more height */
    }
    
    .modal-info {
        padding: 1.5rem;
    }
    
    .gallery-nav {
        display: none; /* Hide navigation arrows on very small screens */
    }
}

/* Blog Styles */
/* ============================================================================ */

/* Blog Grid Layouts */
.blog-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Default blog grid (3 columns) */
.blog-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

/* 4x2 Blog Grid Layout */
.blog-grid-4x2 {
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, auto);
    gap: 1.5rem;
    max-height: fit-content;
}

/* Blog card styling */
.blog-card {
    background: var(--card-bg);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-base);
    border: 1px solid var(--border-color);
    height: fit-content;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.blog-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-placeholder {
    width: 100%;
    height: 100%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-icon {
    font-size: 3rem;
    opacity: 0.7;
}

.blog-category-tag {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.blog-content-area {
    padding: 1.5rem;
}

.blog-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.blog-date {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.blog-date::before {
    content: "📅";
    font-size: 0.75rem;
}

.blog-author {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.blog-author::before {
    content: "✍️";
    font-size: 0.75rem;
}

.blog-title {
    margin: 0 0 0.75rem 0;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

.blog-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: color var(--transition-base);
}

.blog-title a:hover {
    color: var(--primary-color);
}

.blog-excerpt {
    margin: 0 0 1rem 0;
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all var(--transition-base);
}

.read-more-btn:hover {
    transform: translateX(4px);
    color: var(--primary-dark);
}

.blog-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.blog-tag {
    background: var(--bg-secondary);
    color: var(--text-muted);
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.75rem;
    font-weight: 500;
}

/* Blog Filters */
.blog-filters {
    background: var(--bg-primary);
    padding: 2rem 0;
    border-bottom: 1px solid var(--border-color);
}

.filter-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.filter-categories {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.category-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-base);
    font-weight: 500;
}

.category-btn:hover,
.category-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.search-wrapper {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.blog-search-input {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--card-bg);
    color: var(--text-primary);
    min-width: 250px;
}

.search-btn {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color var(--transition-base);
}

.search-btn:hover {
    background: var(--primary-dark);
}

/* Pagination */
.pagination-wrapper {
    margin-top: 3rem;
    text-align: center;
}

.pagination {
    display: inline-flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.page-btn {
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    background: var(--card-bg);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all var(--transition-base);
    font-weight: 500;
    cursor: pointer;
}

.page-btn:hover:not(.disabled):not(.active) {
    background: var(--bg-secondary);
    transform: translateY(-1px);
}

.page-btn.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.page-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.pagination-info {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Newsletter Signup */
.newsletter-signup {
    background: var(--primary);
    color: var(--white);
    padding: 4rem 0;
    margin-top: 4rem;
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter-content h2 {
    margin-bottom: 1rem;
    font-size: 2rem;
    font-weight: 700;
}

.newsletter-content p {
    margin-bottom: 2rem;
    font-size: 1.125rem;
    opacity: 0.9;
}

.newsletter-form .form-group {
    display: flex;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.newsletter-form button {
    padding: 0.75rem 1.5rem;
    background: var(--white);
    color: var(--primary-color);
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Responsive Design for Blog */
@media (max-width: 1200px) {
    .blog-grid-4x2 {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(3, auto);
    }
}

@media (max-width: 900px) {
    .blog-grid-4x2 {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, auto);
    }
    
    .filter-wrapper {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-wrapper {
        justify-content: center;
    }
    
    .blog-search-input {
        min-width: 200px;
    }
}

@media (max-width: 600px) {
    .blog-grid-4x2 {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .newsletter-form .form-group {
        flex-direction: column;
    }
}

.shadow-none { box-shadow: none; }