/* ===== GLOBAL STYLES ===== */
:root {
    /* Color Palette */
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #3f37c9;
    --accent: #4895ef;
    --danger: #f72585;
    --success: #4cc9f0;
    --warning: #f8961e;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --dark-gray: #343a40;
    
    /* Typography */
    --font-base: 'Poppins', sans-serif;
    
    /* Spacing */
    --space-xs: 0.5rem;
    --space-sm: 1rem;
    --space-md: 1.5rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    
    /* Effects */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* Base Styles */
body {
    font-family: var(--font-base);
    color: var(--dark);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

img {
    max-width: 100%;
    height: auto;
}

/* Utility Classes */
.text-primary {
    color: var(--primary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.btn {
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.btn-outline-primary {
    background-color: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background-color: var(--primary);
    color: white;
}

.section-header {
    margin-bottom: 2.5rem;
    position: relative;
    text-align: center;
}

.section-header h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

.section-header p {
    color: var(--gray);
    margin-bottom: 0;
}

/* ===== COMPONENT STYLES ===== */

/* Navbar */
.navbar {
    padding: 1rem 0;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.navbar-scrolled {
    background-color: white !important;
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-weight: 700;
}

.navbar-brand img {
    margin-right: 0.75rem;
    height: 40px;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    color: var(--dark) !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary) !important;
}

/* Hero Section */
.hero-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #f5f7ff 0%, #e8ecff 100%);
    position: relative;
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.hero-section p.lead {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    color: var(--gray);
}

.hero-image {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* Features Section */
.features-section {
    padding: 5rem 0;
    background-color: white;
}

.feature-card {
    padding: 2rem;
    border-radius: var(--radius-md);
    background: white;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    text-align: center;
    border: 1px solid var(--light-gray);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary);
}

/* News Section */
.news-section {
    padding: 5rem 0;
    background-color: #f9fafd;
}

.news-card {
    background: white;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    margin-bottom: 1.5rem;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.news-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 500;
}

.news-content {
    padding: 1.5rem;
}

.news-meta {
    display: flex;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: var(--gray);
}

.news-meta span {
    margin-right: 1rem;
}

.news-meta i {
    margin-right: 0.25rem;
}

.news-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

/* Gallery Section */
.gallery-section {
    padding: 5rem 0;
    background-color: white;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 250px;
    margin-bottom: 1.5rem;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    color: white;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Footer */
.footer {
    background: var(--dark);
    color: white;
    padding: 4rem 0 0;
}

.footer-about img {
    margin-bottom: 1.5rem;
    height: 50px;
}

.footer-about p {
    color: rgba(255,255,255,0.7);
    margin-bottom: 1.5rem;
}

.footer-links h4 {
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
    color: white;
    position: relative;
    padding-bottom: 0.75rem;
}

.footer-links h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--primary);
}

.footer-links ul {
    list-style: none;
    padding-left: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255,255,255,0.7);
    font-size: 0.9375rem;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.footer-bottom {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.5);
    font-size: 0.875rem;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 1199.98px) {
    .hero-section h1 {
        font-size: 2.25rem;
    }
}

@media (max-width: 991.98px) {
    .hero-section {
        padding: 4rem 0;
        text-align: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .section-header {
        text-align: center;
    }
    
    .section-header .see-all {
        position: relative;
        display: inline-block;
        margin-top: 1rem;
    }
}

@media (max-width: 767.98px) {
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: var(--radius-md);
        box-shadow: var(--shadow-lg);
        margin-top: 0.5rem;
    }
    
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
}

@media (max-width: 575.98px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .footer-about,
    .footer-links {
        margin-bottom: 2rem;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* ===== LIGHTBOX STYLES ===== */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.lightbox-content {
    position: relative;
    max-width: 800px;
    width: 100%;
}

.lightbox img {
    width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-md);
}

.close-lightbox {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.lightbox-caption {
    color: white;
    text-align: center;
    margin-top: 1rem;
}

/* ===== LOADER STYLES ===== */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}