/**
 * Modern Theme CSS for สสอ.เขมราฐ
 * ITA-Style Green Theme + Modern UX/UI Enhancements
 * Updated: 2026-01-18
 */

/* ========================================
/* ========================================
   CSS Custom Properties (Variables)
   ======================================== */
:root {
  /* Primary Colors (Teal) */
  --primary-color: #00695c;
  --primary-dark: #004d40;
  --primary-light: #4db6ac;
  --primary-surface: rgba(0, 105, 92, 0.08);
  
  /* Accent Colors */
  --accent-color: #00897b;
  --accent-surface: rgba(0, 137, 123, 0.1);
  --secondary-color: #26a69a; /* Keeping for compatibility */
  
  /* Status Colors */
  --success-color: #2e7d32;
  --warn-color: #ef6c00;
  --error-color: #c62828;
  
  /* Text Colors */
  --text-primary: #1a1a2e;
  --text-secondary: #475569;
  --text-light: #f8fafc;
  --text-link: #00695c;
  
  /* Glass Effect */
  --glass-bg: rgba(255, 255, 255, 0.9);
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  --header-bg: rgba(255, 255, 255, 0.9); /* Compat */
  --header-text: #1a1a2e; /* Compat */
  --bg-primary: #f0f7f0; /* Compat */
  --bg-card: rgba(255, 255, 255, 0.7); /* Compat */
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-glow: 0 0 40px rgba(0, 105, 92, 0.15);
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #00897b 0%, #00695c 100%);
  --gradient-header: linear-gradient(135deg, #00695c 0%, #00897b 50%, #4db6ac 100%);
  --gradient-card: linear-gradient(145deg, #ffffff 0%, #f8faf8 100%);
  --gradient-accent: linear-gradient(135deg, #26a69a 0%, #00897b 100%);
  --gradient-blue: linear-gradient(135deg, #42a5f5 0%, #1565c0 100%);
  --gradient-orange: linear-gradient(135deg, #ffa726 0%, #ef6c00 100%);
  --gradient-footer: linear-gradient(135deg, #004d40 0%, #00695c 100%);
  
  /* Typography */
  --font-primary: 'Prompt', sans-serif;
  --font-secondary: 'Inter', sans-serif;
  --font-size-base: 16px;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;
  --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); /* Compat */
}

/* ========================================
   Base Styles
   ======================================== */
* {
    box-sizing: border-box;
}


.wrapper {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
}

.content-wrapper {
    flex: 1 0 auto !important;
    background: transparent !important;
    min-height: auto !important;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    min-height: 100vh;
    background: linear-gradient(180deg, #f0f7f0 0%, #e8f5e9 50%, #f5f5f5 100%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 600;
    color: #1a1a2e;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

a {
    color: var(--text-link);
    text-decoration: none;
    transition: all var(--transition-fast);
}

a:hover {
    color: var(--primary-dark);
}

/* ========================================
   Content Wrapper with Modern Background
   ======================================== */
/* ========================================
   Dashboard Style Components
   ======================================== */

/* Welcome Hero Card */
.welcome-card {
    background: linear-gradient(135deg, #00695c 0%, #00897b 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    color: white;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    margin-bottom: 2rem;
}

.welcome-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.3;
}

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

/* Info Card (Clean White) */
.info-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid rgba(0,0,0,0.03);
    transition: all var(--transition-normal);
    height: 100%;
    overflow: hidden;
}

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

/* Icon Square Headers */
.icon-square {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    color: white;
    font-size: 1.25rem;
    margin-right: 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.bg-teal-gradient { background: linear-gradient(135deg, #00897b, #00695c); }
.bg-blue-gradient { background: linear-gradient(135deg, #42a5f5, #1565c0); }
.bg-orange-gradient { background: linear-gradient(135deg, #ffa726, #ef6c00); }
.bg-green-gradient { background: linear-gradient(135deg, #66bb6a, #2e7d32); }

/* Stat Badge in Welcome */
.stat-box {
    text-align: center;
    padding: 0 1.5rem;
    border-left: 1px solid rgba(255,255,255,0.2);
}

.stat-box:first-child { border-left: none; }

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.85rem;
    opacity: 0.9;
    font-weight: 400;
}


/* ========================================
   Main Header/TopBar Styles (ITA Style)
   ======================================== */
.main-header.navbar {
    background: var(--header-bg) !important;
    border-bottom: none;
    min-height: 56px;
}

.main-header .navbar-nav .nav-link {
    color: var(--header-text) !important;
}

.main-header .navbar-nav .nav-link:hover {
    color: rgba(255, 255, 255, 0.85) !important;
}

/* ========================================
   Navigation Styles (Modern)
   ======================================== */

/* ========================================
   Navigation Styles (Modern)
   ======================================== */

/* Header Background Gradient */
/* Header Background Gradient - Teal Update */
.topbar {
    background: linear-gradient(90deg, #004d40 0%, #00695c 100%) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
}

.brand-text-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.2;
}

.brand-text-th {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.brand-text-en {
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-family: 'Inter', sans-serif;
}

@media (max-width: 768px) {
    .brand-text-th {
        font-size: 1.1rem;
    }
    .brand-text-en {
        font-size: 0.7rem;
    }
}

.nav-container-modern {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-normal);
}

/* Navbar Scrolled State (Optional Future Enhancement) */
.nav-container-modern.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.navbar-modern {
    background: transparent;
    padding: 0;
    min-height: 60px;
}

/* Modern Nav Items */
.nav-modern {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: nowrap; /* Prevent items from wrapping */
}

.nav-modern .nav-item {
    position: relative;
    white-space: nowrap; /* Prevent text wrapping within items */
}

/* Modern Nav Links */
.nav-link-modern {
    color: var(--text-primary) !important;
    font-weight: 500;
    padding: 0.75rem 0.75rem !important;
    border-radius: var(--radius-md);
    transition: all var(--transition-bounce); /* Smoother bounce transition */
    display: flex;
    align-items: center;
    gap: 0.4rem;
    position: relative;
    overflow: hidden; /* For glow effect */
    white-space: nowrap;
}

/* Sliding Underline Effect */
.nav-link-modern::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: width 0.3s ease-out;
    border-radius: 3px 3px 0 0;
    opacity: 0.8;
}

.nav-link-modern:hover::after {
    width: 80%;
}

.nav-link-modern:hover {
    color: var(--primary-color) !important;
    background: rgba(0, 137, 123, 0.04);
    transform: translateY(-1px);
}

/* Active State Glow */
.nav-link-modern.active {
    color: var(--primary-dark) !important;
    background: rgba(0, 137, 123, 0.08); /* Lighter background */
    font-weight: 600;
    box-shadow: 0 0 15px rgba(0, 137, 123, 0.15); /* Soft glow */
}

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

.nav-link-modern i {
    font-size: 1.1rem; /* Slightly larger icons */
    transition: transform var(--transition-bounce), color 0.3s;
    color: var(--primary-color);
}

.nav-link-modern:hover i {
    transform: scale(1.2) rotate(5deg); /* Playful icon animation */
    color: var(--primary-dark);
}

.nav-link-modern.active i {
    color: var(--primary-dark);
    transform: scale(1.1);
}

/* Dropdown Toggle Arrow */
.nav-modern .dropdown-toggle::after {
    display: inline-block;
    margin-left: 0.5rem;
    vertical-align: middle;
    content: "";
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-bottom: 0;
    border-left: 0.3em solid transparent;
    opacity: 0.5;
    transition: transform var(--transition-fast);
}

.nav-modern .dropdown.show .dropdown-toggle::after {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--primary-color);
}

/* Dropdown Styles (Modern Enhanced) */
/* Dropdown Menu Premium Style */
.dropdown-menu-modern {
    border: none;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 137, 123, 0.05); /* Deeper shadow */
    border-radius: var(--radius-lg);
    padding: 0.75rem;
    margin-top: 0.75rem !important;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    animation: fadeInUp 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    transform-origin: top center;
    min-width: 260px; /* Slightly wider */
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    font-size: 0.9rem;
    font-weight: 450;
    margin-bottom: 2px;
}

.dropdown-item:last-child {
    margin-bottom: 0;
}

.dropdown-item:hover {
    background: linear-gradient(90deg, rgba(0, 137, 123, 0.1), transparent);
    color: var(--primary-color);
    padding-left: 1.25rem;
}

.dropdown-item i {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 137, 123, 0.1);
    border-radius: 6px;
    color: var(--primary-color);
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover i {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 10px rgba(0, 137, 123, 0.2);
}

/* Social Links in Header */
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    color: white !important;
    transition: all var(--transition-bounce);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.social-link:hover {
    background: white;
    transform: translateY(-2px) scale(1.1);
    color: #004d40 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.social-link i {
    font-size: 0.9rem;
}

/* Mobile Navigation */
@media (max-width: 1199px) {
    .nav-container-modern {
        padding: 0.5rem 0;
    }
    
    .navbar-modern {
        min-height: auto;
    }
    
    .nav-modern {
        flex-direction: column;
        gap: 0.25rem;
        padding: 1rem 0;
        width: 100%;
    }
    
    .nav-link-modern {
        padding: 1rem !important;
        border-radius: var(--radius-md);
        margin: 0.125rem 0;
        background: rgba(0, 0, 0, 0.02);
    }
    
    .nav-link-modern:hover,
    .nav-link-modern.active {
        background: rgba(0, 137, 123, 0.1);
    }
    
    .dropdown-menu-modern {
        box-shadow: none;
        background: transparent;
        border-radius: var(--radius-md);
        margin: 0;
        padding: 0 0 0 1rem;
        border-left: 2px solid rgba(0, 137, 123, 0.1);
    }
    
    .dropdown-item {
        padding: 0.75rem 1rem;
    }
}

/* Navbar Toggler */
.navbar-toggler {
    width: 40px;
    height: 40px;
    padding: 0;
    border: none;
    background: rgba(0, 137, 123, 0.1);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
}

.navbar-toggler:hover {
    background: var(--primary-color);
    color: white;
    transform: rotate(90deg);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(0, 137, 123, 0.2);
}

/* ========================================
   Card Components (Modern Glass Style)
   ======================================== */
/* ========================================
   Card Components (Modern Glass Style)
   ======================================== */
.card {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    background-color: var(--bg-card);
    overflow: hidden;
    transition: all var(--transition-normal);
}

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

.card-header {
    background: transparent;
    border-bottom: 1px dashed rgba(0, 0, 0, 0.05);
    padding: 1.25rem 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Glass Card Effect (Enhanced) */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: all var(--transition-normal);
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.glass-card:nth-child(1) { animation-delay: 0.1s; }
.glass-card:nth-child(2) { animation-delay: 0.2s; }
.glass-card:nth-child(3) { animation-delay: 0.3s; }
.glass-card:nth-child(4) { animation-delay: 0.4s; }

.glass-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.95);
    border-color: var(--primary-light);
}

/* ========================================
   Modern Title Styles
   ======================================== */
.modern-title {
    font-weight: 600;
    color: var(--primary-dark);
    position: relative;
    padding-bottom: var(--spacing-sm);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.modern-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.modern-title i {
    font-size: 0.9em;
    opacity: 0.8;
}

/* ========================================
   Button Styles (Modern)
   ======================================== */
.btn {
    border-radius: var(--radius-md);
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

/* Submenu Styles */
.dropdown-submenu .dropdown-menu {
    top: 0;
    left: 100%;
    margin-left: 0.25rem;
    margin-top: 0 !important; /* Override top-level margin */
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(0, 137, 123, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 137, 123, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

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

/* ========================================
   Levitating Card Effect (Enhanced)
   ======================================== */
.levitate-card {
    transition: all var(--transition-normal);
    position: relative;
}

.levitate-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    opacity: 0;
    z-index: -1;
    transition: all var(--transition-normal);
    transform: scale(0.95);
}

.levitate-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl), var(--shadow-glow);
}

.levitate-card:hover::before {
    opacity: 0.05;
    transform: scale(1.02);
}

/* ========================================
   Image & Media Styles
   ======================================== */
.img-link {
    display: block;
    width: 100%;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-normal);
}

.img-link:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-lg);
}

.img-link img {
    transition: all var(--transition-normal);
}

.img-link:hover img {
    transform: scale(1.05);
}

/* Profile Image Styles */
.profile-img {
    border-radius: 50%;
    border: 4px solid rgba(0, 137, 123, 0.2);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.profile-img:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
    box-shadow: var(--shadow-lg);
}

/* ========================================
   Carousel/Slider Enhancements
   ======================================== */
.carousel {
    border-radius: 0; /* Removed for seamless image flow */
    overflow: hidden;
    box-shadow: none;
    margin: 0;
}

.carousel-item img {
    border-radius: 0; /* No rounded corners for seamless flow */
}

.carousel-control-prev,
.carousel-control-next {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-md);
}

/* Fixed Height Hero Slider to prevent jumping */
.hero-slider {
    position: relative;
    width: 100%;
    height: 500px !important; /* Enforce height on wrapper */
    overflow: hidden !important; /* Contain everything */
}

.hero-slider .carousel-inner {
    height: 100% !important; /* Fill wrapper */
}

.hero-slider .carousel-item {
    height: 100% !important;
    min-height: 500px !important; /* Ensure minimum match */
}

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

@media (max-width: 768px) {
    .hero-slider {
        height: 300px !important; /* Mobile wrapper height */
    }
    .hero-slider .carousel-inner,
    .hero-slider .carousel-item {
        height: 100% !important;
        min-height: 300px !important;
    }
}

.carousel:hover .carousel-control-prev,
.carousel:hover .carousel-control-next {
    opacity: 1;
}

.carousel-control-prev { left: 15px; }
.carousel-control-next { right: 15px; }

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(40%);
}

.carousel-indicators {
    bottom: 15px;
}

.carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    transition: all var(--transition-fast);
}

.carousel-indicators button.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

/* ========================================
   News & Content Items
   ======================================== */
.news-item {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    border: 1px solid transparent;
}

.news-item:hover {
    background: rgba(0, 137, 123, 0.04);
    border-color: rgba(0, 137, 123, 0.1);
}

.news-item-thumb {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-md);
    object-fit: cover;
    flex-shrink: 0;
}

.news-item-content h6 {
    margin-bottom: 0.5rem;
    transition: color var(--transition-fast);
}

.news-item:hover .news-item-content h6 {
    color: var(--primary-color);
}

.news-item-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ========================================
   Quick Links Grid
   ======================================== */
.quick-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    border: 1px solid transparent;
    text-decoration: none !important;
}

.quick-link:hover {
    background: rgba(0, 137, 123, 0.06);
    border-color: rgba(0, 137, 123, 0.15);
    transform: translateX(4px);
}

.quick-link-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: all var(--transition-fast);
}

.quick-link:hover .quick-link-icon {
    transform: scale(1.1) rotate(-5deg);
    box-shadow: var(--shadow-md);
}

.quick-link-text {
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

/* ========================================
   Table Styles (Modern)
   ======================================== */
.table {
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: linear-gradient(135deg, var(--bg-section-header) 0%, #f0f4f7 100%);
    border: none;
    color: var(--text-primary);
    font-weight: 600;
    padding: 1rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.table tbody tr {
    transition: all var(--transition-fast);
}

.table tbody tr:hover {
    background-color: rgba(0, 137, 123, 0.04);
}

.table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    vertical-align: middle;
}

/* ========================================
   Stats/Counter Section
   ======================================== */
.stat-card {
    text-align: center;
    padding: 1.5rem;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.main-footer a:hover {
    color: var(--accent-color);
}


.main-footer {
    position: relative !important;
    clear: both !important;
    width: 100% !important;
    margin-top: 2rem !important;
    z-index: 10;
}

.main-footer a {
    color: rgba(255, 255, 255, 0.7);
}

/* ========================================
   Loading Skeleton Animation
   ======================================== */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}

/* ========================================
   Scrollbar Styles (Enhanced)
   ======================================== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background-color: #f0f0f0;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-light), var(--primary-color));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-color), var(--primary-dark));
}

/* ========================================
   Container Modern
   ======================================== */
.container-modern {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-xl);
}

/* ========================================
   Typography Utilities
   ======================================== */
table {
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
}

th {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: var(--font-size-sm);
}

/* Text Colors */
.text-primary-color {
    color: var(--primary-color) !important;
}

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

/* ========================================
   Responsive Improvements
   ======================================== */
@media (max-width: 992px) {
    .container-modern {
        padding: var(--spacing-lg);
    }
    
    .glass-card {
        margin-bottom: 1rem;
    }
}

@media (max-width: 768px) {
    .container-modern {
        padding: var(--spacing-md);
    }
    
    .glass-card {
        border-radius: var(--radius-md);
    }
    
    .navbar .nav-link {
        padding: 0.5rem;
    }
    
    .modern-title {
        font-size: 1rem;
    }
    
    h4.modern-title {
        font-size: 1.1rem;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .navbar, .sidebar, .main-footer {
        display: none !important;
    }

    .content-wrapper {
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
    }
    
    .glass-card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}

/* ========================================
   Modern Carousel (Hero Slider)
   ======================================== */
.carousel-item {
    transition: transform 1.5s ease-in-out !important;
    backface-visibility: hidden; /* Prevent flickering */
}
.carousel-control-prev,
.carousel-control-next {
    width: 3.5rem;
    height: 3.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    transition: all 0.3s ease;
    margin: 0 1rem;
    border: 1px solid rgba(255,255,255,0.3);
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(255, 255, 255, 0.4);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.carousel-indicators [data-bs-target] {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid transparent; /* Increase hit area visual adjustment if needed */
    margin: 0 5px;
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    background-color: #fff;
    transform: scale(1.2);
    box-shadow: 0 0 10px rgba(255,255,255,0.5);
}

/* Slide Animations */
@keyframes slideUpFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate3d(0, 20px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

.slide-up-1 {
    animation: slideUpFade 0.8s ease-out forwards;
    animation-delay: 0.2s;
}

.slide-up-2 {
    animation: slideUpFade 0.8s ease-out forwards;
    animation-delay: 0.4s;
}

/* ========================================
   Sticky Footer Fix (Simplified Clean)
   ======================================== */
.wrapper {
    position: relative;
    height: auto !important;
    min-height: 100vh !important;
    max-height: none !important;
    overflow: visible !important;
    padding-bottom: 0 !important;
    display: block !important;
}

/* Force standard block flow on wrapper and children */
.content-wrapper {
    position: relative !important;
    height: auto !important;
    min-height: auto !important;
    display: block !important;
    overflow: visible !important;
    padding-bottom: 0 !important;
    flex: none !important;
}

/* Ensure inner content containers expand and contain floats */
.content, .container, .container-fluid, .container-modern, .row {
    height: auto !important;
    min-height: auto !important;
    display: block !important; /* Rows usually flex, but here we need to be careful. Rows should probably stay flex in Bootstrap 5. */
    /* Let's be careful with .row */
    position: relative !important;
}
/* Revert row display for Bootstrap grid */
.row {
    display: flex !important;
    flex-wrap: wrap !important;
}

/* Classic Clearfix for wrapper */
.content-wrapper::after, .content::after {
    content: "";
    display: table;
    clear: both;
}

/* Ensure footer is just a block at the end */
.main-footer {
    position: relative !important;
    display: block !important;
    width: 100% !important;
    float: none !important;
    clear: both !important;
    margin-top: 0 !important;
    background: linear-gradient(135deg, #00897b 0%, #004d40 100%);
    border-top: none !important;
    z-index: 10;
}

/* Body Reset */
body {
    height: auto !important;
    min-height: 100vh;
    overflow-y: auto;
}

/* Footer Helpers */
.text-teal-light { color: #80cbc4 !important; }
.text-teal { color: #009688 !important; }
.hover-white:hover { color: #ffffff !important; transform: translateX(5px); display: inline-block; transition: all 0.3s; }

/* ========================================
   File Widget Styles (moved from inline)
   ======================================== */
.table-modern {
    margin-bottom: 0;
}

.table-modern tbody tr {
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.table-modern tbody tr:hover {
    background-color: #f8fcfb;
    transform: translateX(5px);
}

.table-modern td {
    padding: 1rem 1.5rem;
    vertical-align: middle;
    border: none;
}

.file-icon-wrapper {
    width: 45px;
    height: 45px;
    background: #e0f2f1;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00897b;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.file-info {
    display: flex;
    flex-direction: column;
}

.file-name {
    font-weight: 500;
    color: #333;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.file-meta {
    font-size: 0.85rem;
    color: #777;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.file-meta i {
    color: #00897b;
    margin-right: 0.25rem;
    font-size: 0.8rem;
}

.action-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: all 0.2s;
    text-decoration: none;
}

.action-btn:hover {
    background: #00897b;
    color: #fff;
    border-color: #00897b;
    box-shadow: 0 4px 10px rgba(0, 137, 123, 0.2);
}

/* ========================================
   Video Widget Styles (Modern Grid)
   ======================================== */
.video-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.video-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
}

.video-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.video-item iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: var(--radius-md);
}

/* ========================================
   Link Widget Styles (Modern List)
   ======================================== */
.link-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.link-item-modern {
    display: block;
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-sm);
}

.link-item-modern:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
}

.link-item-modern img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
}

/* ========================================
   Sidebar Consolidated Styles
   ======================================== */
.sidebar-section {
    margin-bottom: 1.5rem;
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

/* Boss Widget Clean */
.boss-profile {
    text-align: center;
}

.boss-profile .profile-img {
    width: 150px;
    height: 180px;
    border-radius: 12px !important;
    object-fit: cover;
    border: 3px solid rgba(0, 137, 123, 0.2);
    margin-bottom: 1rem;
}

.boss-profile .boss-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.boss-profile .boss-position {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.boss-profile .boss-contact {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Visitor Counter Modern */
.visitor-count {
    text-align: center;
    padding: 1rem 0;
}

.visitor-count .count-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
}

.visitor-count .count-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}
