/* 
 * Sage Ridge School - Modern CSS Design
 * Last Updated: September 8, 2025 - 4:58 PM
 * Version: 2.0 - Modern Design with Animations
 */

/* Base Styles */
:root {
    --primary-color: #166533;      /* Official school green */
    --primary-light: #1a7538;      /* Light green variation */
    --primary-dark: #0f4a26;       /* Dark green variation */
    --secondary-color: #2E8B57;    /* Medium green */
    --accent-color: #6f1a1a;       /* Official school red */
    --accent-light: #8b2635;       /* Light red variation */
    --accent-dark: #4d1212;        /* Dark red variation */
    --success-color: #166533;      /* Success green */
    --warning-color: #F57C00;      /* Warning orange */
    --danger-color: #6f1a1a;       /* Danger red */
    --dark-color: #2C3E50;         /* Dark text color */
    --light-color: #f8f9fa;
    --white: #ffffff;
    --light-green: #E8F5E8;        /* Light green background */
    --gold-accent: #FFB300;        /* Gold accent from logo */
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    
    /* Animation timing */
    --animation-fast: 0.2s;
    --animation-normal: 0.3s;
    --animation-slow: 0.5s;
    
    /* Shadows */
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark-color);
    scroll-behavior: smooth;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* Enable momentum scroll for iOS */
}

/* Modern Button Styles */
.btn-primary {
    background: var(--primary-color);
    border: 2px solid var(--primary-color);
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: all var(--animation-normal) cubic-bezier(0.4, 0, 0.2, 1);
    color: white;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary-dark);
    transition: left var(--animation-normal) ease;
    z-index: -1;
}

.btn-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(22, 101, 51, 0.3);
    color: white;
}

.btn-primary:hover::before {
    left: 0;
}

.btn-secondary {
    background: var(--accent-color);
    border: 2px solid var(--accent-color);
    color: white;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: all var(--animation-normal) cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--accent-dark);
    transition: left var(--animation-normal) ease;
    z-index: -1;
}

.btn-secondary:hover {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(111, 26, 26, 0.3);
    color: white;
}

.btn-secondary:hover::before {
    left: 0;
}

.btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: white;
    background: transparent;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: all var(--animation-normal) ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
}

/* Modern Header Styles */
.header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--gray-200);
    transition: all var(--animation-normal) ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow);
}

.navbar-brand img {
    max-height: 60px;
    width: auto;
    transition: transform var(--animation-normal) ease;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    margin: 0 10px;
    padding: 10px 15px !important;
    border-radius: 25px;
    transition: all var(--animation-normal) ease;
    position: relative;
    overflow: hidden;
}

.navbar-nav .nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--light-green);
    transition: left var(--animation-normal) ease;
    z-index: -1;
    border-radius: 25px;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    transform: translateY(-2px);
}

.navbar-nav .nav-link:hover::before {
    left: 0;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 15px;
    padding: 10px 0;
    background: white;
    backdrop-filter: blur(15px);
    border: 1px solid var(--gray-200);
    overflow: hidden; /* Prevent overflow of hover effects */
}

.dropdown-item {
    padding: 10px 20px;
    transition: all var(--animation-fast) ease;
    border-radius: 10px;
    margin: 2px 10px;
    overflow: hidden; /* Prevent text overflow */
}

.dropdown-item:hover {
    background: var(--light-green);
    color: var(--primary-color);
    /* Removed transform to prevent overflow */
}

/* Modern Hero Section */
.hero-section {
    position: relative;
    height: 80vh;
    overflow: hidden;
    background: var(--light-green); /* Fallback solid background */
}

.hero-slider {
    height: 100%;
}

.carousel-inner {
    height: 100%;
}

.carousel-item {
    height: 100%;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide {
    height: 100%;
    background-size: cover !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    position: relative;
    transition: transform 0.8s ease-in-out;
    min-height: 80vh;
    /* Fallback gradient background for static slides only */
    background: linear-gradient(135deg, #166533 0%, #2E8B57 50%, #6f1a1a 100%);
}

/* Static slide backgrounds (only when no dynamic slides) */
.hero-slide-1 {
    background: url('https://images.unsplash.com/photo-1658112667912-27344f9bba4d?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8M3x8YmxhY2slMjBzY2hvb2wlMjBjaGlsZHJlbiUyMGZvb3RiYWxsfGVufDB8fDB8fHww') center center / cover no-repeat, 
                linear-gradient(135deg, #166533 0%, #2E8B57 100%) !important;
}

.hero-slide-2 {
    background: url('https://images.unsplash.com/photo-1627274621490-c6a61b24aeaa?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTB8fGJsYWNrJTIwc2Nob29sJTIwY2hpbGRyZW4lMjBzd2ltbWluZ3xlbnwwfHwwfHx8MA%3D%3D') center center / cover no-repeat, 
                linear-gradient(135deg, #2E8B57 0%, #166533 100%) !important;
}

.hero-slide-3 {
    background: url('https://plus.unsplash.com/premium_photo-1661897303080-770c58e546d9?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NjF8fGJsYWNrJTIwc2Nob29sJTIwY2hpbGRyZW58ZW58MHx8MHx8fDA%3D') center center / cover no-repeat, 
                linear-gradient(135deg, #6f1a1a 0%, #166533 100%) !important;
}

/* Dynamic slides from admin uploads - ensure inline styles take priority */
.hero-slide.dynamic-slide {
    background: none; /* Reset static backgrounds */
}

/* Overlay effect - works for both static and dynamic slides */
.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(22, 101, 51, 0.7) 0%, rgba(111, 26, 26, 0.3) 100%);
    z-index: 1;
    transition: background var(--animation-slow) ease;
}

.hero-slide-1::before {
    background: rgba(22, 101, 51, 0.6);
}

.hero-slide-2::before {
    background: rgba(46, 139, 87, 0.6);
}

.hero-slide-3::before {
    background: rgba(111, 26, 26, 0.6);
}

/* Modern hero content with enhanced animations */
.hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 20px;
    opacity: 1;
    transition: all var(--animation-slow) cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideInFadeUp 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    transform: translateY(0);
    transition: all var(--animation-slow) cubic-bezier(0.4, 0, 0.2, 1);
    animation: heroTitleSlide 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.3s both;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.95;
    transform: translateY(0);
    transition: all var(--animation-slow) cubic-bezier(0.4, 0, 0.2, 1) 0.1s;
    animation: heroTextSlide 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.6s both;
}

.hero-content .btn {
    transform: translateY(0);
    transition: all var(--animation-slow) cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
    animation: heroButtonSlide 1.5s cubic-bezier(0.4, 0, 0.2, 1) 0.9s both;
}

/* Enhanced carousel animations */
.carousel-item {
    transition: transform var(--animation-slow) cubic-bezier(0.4, 0, 0.2, 1), 
                opacity var(--animation-slow) cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-item.active .hero-slide {
    animation: zoomIn 8s ease-out infinite;
}

.carousel-item-next .hero-content,
.carousel-item-prev .hero-content {
    opacity: 0;
    transform: translate(-50%, -40%);
}

.carousel-item-next .hero-content h1,
.carousel-item-prev .hero-content h1 {
    transform: translateY(30px);
    opacity: 0;
}

.carousel-item-next .hero-content p,
.carousel-item-prev .hero-content p {
    transform: translateY(40px);
    opacity: 0;
}

.carousel-item-next .hero-content .btn,
.carousel-item-prev .hero-content .btn {
    transform: translateY(50px);
    opacity: 0;
}

/* Enhanced carousel controls */
.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    z-index: 3;
    transition: all var(--animation-standard) ease;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 2.5rem;
    height: 2.5rem;
    background-color: rgba(22, 101, 51, 0.8);
    border-radius: 50%;
    transition: all var(--animation-standard) ease;
    backdrop-filter: blur(10px);
}

.carousel-control-prev:hover .carousel-control-prev-icon,
.carousel-control-next:hover .carousel-control-next-icon {
    background-color: var(--primary-color);
    transform: scale(1.1);
}

/* Modern carousel indicators */
.carousel-indicators {
    bottom: 2rem;
    z-index: 3;
}

.carousel-indicators [data-bs-target] {
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background-color: transparent;
    transition: all var(--animation-standard) ease;
    margin: 0 0.5rem;
}

.carousel-indicators .active {
    background-color: white;
    border-color: white;
    transform: scale(1.2);
}

@keyframes zoomIn {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Hero animation keyframes */
@keyframes slideInFadeUp {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

@keyframes heroTitleSlide {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroTextSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 0.95;
        transform: translateY(0);
    }
}

@keyframes heroButtonSlide {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Custom Carousel Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 60px;
    height: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(22, 101, 51, 0.8);
    border-radius: 50%;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.carousel-control-prev {
    left: 30px;
}

.carousel-control-next {
    right: 30px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
    background: rgba(22, 101, 51, 1);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 24px;
    height: 24px;
}

/* Custom Indicators */
.carousel-indicators {
    bottom: 30px;
}

.carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 6px;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
}

.carousel-indicators button.active {
    background: var(--primary-color);
    border-color: white;
    transform: scale(1.2);
}

/* Hero Content Animation Delays */
.hero-content h1 {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-content p {
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-content .hero-buttons {
    animation: fadeInUp 1s ease-out 0.9s both;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}

.hero-buttons .btn {
    font-weight: 600;
    letter-spacing: 0.5px;
    border-width: 2px;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.hero-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.btn-outline-light {
    border-color: rgba(255, 255, 255, 0.8);
    color: white;
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Hero Styles */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-buttons .btn {
        width: 200px;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 50px;
        height: 50px;
    }
    
    .carousel-control-prev {
        left: 15px;
    }
    
    .carousel-control-next {
        right: 15px;
    }
}

/* Modern Welcome Section */
.welcome-section {
    padding: 100px 0;
    background: var(--light-green);
    position: relative;
    overflow: hidden;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    animation: shimmer 3s ease-in-out infinite;
}

.welcome-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.welcome-content h2 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 30px;
    animation: slideInLeft 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

.welcome-image {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: transform var(--animation-standard) ease, box-shadow var(--animation-standard) ease;
    animation: slideInRight 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.4s both;
}

.welcome-image:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15);
}

.welcome-image img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

/* Core Values Section */
.core-values-section {
    padding: 100px 0;
    background: white;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.section-title p {
    color: #666;
    font-size: 1.1rem;
}

/* Modern value cards with enhanced animations */
.value-card {
    background: white;
    padding: 40px 30px;
    border-radius: 15px;
    text-align: center;
    height: 100%;
    transition: all var(--animation-standard) cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #e9ecef;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.value-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(22, 101, 51, 0.05), transparent);
    transition: left var(--animation-slow) ease;
}

.value-card:hover::before {
    left: 100%;
}

.value-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(111, 26, 26, 0.15);
    border-color: var(--accent-color);
}

.value-card:nth-child(odd) .icon {
    background: var(--primary-color);
    box-shadow: 0 10px 25px rgba(22, 101, 51, 0.3);
}

.value-card:nth-child(even) .icon {
    background: var(--accent-color);
    box-shadow: 0 10px 25px rgba(111, 26, 26, 0.3);
}

.value-card .icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: white;
    font-size: 2rem;
    transition: transform var(--animation-standard) cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.value-card:hover .icon {
    transform: rotate(10deg) scale(1.1);
    animation: pulse 2s infinite;
}

.value-card h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
    transition: color var(--animation-standard) ease;
}

.value-card:hover h4 {
    color: var(--accent-color);
}

/* Modern CTA Section */
.cta-section {
    background: var(--accent-color);
    color: white;
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(255, 255, 255, 0.1) 50%, transparent 100%);
    animation: shimmer 4s ease-in-out infinite;
}

.cta-section h2 {
    font-weight: 700;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.cta-section .btn {
    margin: 10px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.8s cubic-bezier(0.4, 0, 0.2, 1) 0.2s both;
}

/* FAQ Section */
.faq-section {
    padding: 100px 0;
    background: var(--light-green);
}

.accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    border: none;
    margin-bottom: 15px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.accordion-button {
    background: white;
    color: var(--dark-color);
    font-weight: 600;
    padding: 20px 25px;
    border: none;
    box-shadow: none;
    transition: all 0.3s ease;
}

.accordion-button:hover {
    background: var(--light-green);
    color: var(--accent-color);
}

.accordion-button:not(.collapsed) {
    background: var(--accent-color);
    color: white;
}

.accordion-body {
    padding: 25px;
    background: white;
}

/* Why Choose Us Section */
.why-choose-section {
    padding: 100px 0;
    background: white;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    flex-shrink: 0;
    color: white;
    font-size: 1.5rem;
    transition: all var(--animation-standard) cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Individual colors for each essential element */
.feature-item:nth-child(2) .feature-icon {
    /* Critical Thinking - Brain */
    background: #8e44ad; /* Purple for wisdom/intellect */
    box-shadow: 0 8px 20px rgba(142, 68, 173, 0.3);
}

.feature-item:nth-child(3) .feature-icon {
    /* Collaborative Learning - Users */
    background: #3498db; /* Blue for teamwork/collaboration */
    box-shadow: 0 8px 20px rgba(52, 152, 219, 0.3);
}

.feature-item:nth-child(4) .feature-icon {
    /* Innovation - Lightbulb */
    background: #f39c12; /* Orange for creativity/innovation */
    box-shadow: 0 8px 20px rgba(243, 156, 18, 0.3);
}

.feature-item:nth-child(5) .feature-icon {
    /* Global Perspective - Globe */
    background: #27ae60; /* Green for global/environmental awareness */
    box-shadow: 0 8px 20px rgba(39, 174, 96, 0.3);
}

.feature-item:nth-child(6) .feature-icon {
    /* Pastoral Care - Heart */
    background: #e74c3c; /* Red for care/love */
    box-shadow: 0 8px 20px rgba(231, 76, 60, 0.3);
}

.feature-icon:hover {
    transform: scale(1.1) rotate(5deg);
    animation: pulse 1.5s infinite;
}

.feature-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left var(--animation-standard) ease;
}

.feature-icon:hover::before {
    left: 100%;
}

.feature-content h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

/* News Section */
.news-section {
    padding: 100px 0;
    background: var(--light-color);
}

.news-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card-body {
    padding: 25px;
}

.news-card h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
    line-height: 1.4;
}

.news-date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.news-excerpt {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Footer */
.footer {
    background: var(--primary-color) !important;
}

.footer h5,
.footer h6 {
    color: white;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer ul li {
    margin-bottom: 8px;
}

.footer ul li a {
    transition: color 0.3s ease;
}

.footer ul li a:hover {
    color: var(--gold-accent) !important;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

/* Modal Styles */
.modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: var(--primary-color);
    color: white;
    border-radius: 15px 15px 0 0;
    padding: 20px 30px;
}

.modal-header h5 {
    font-weight: 600;
    margin: 0;
}

.modal-header .btn-close {
    filter: invert(1);
}

.modal-body {
    padding: 30px;
}

.form-control,
.form-select {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(45, 90, 135, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .value-card,
    .news-card-body {
        padding: 30px 20px;
    }
    
    .welcome-section,
    .core-values-section,
    .faq-section,
    .why-choose-section,
    .news-section {
        padding: 60px 0;
    }
    
    .modal-body {
        padding: 20px;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .value-card .icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Modern Success/Error Messages */
.alert {
    border: none;
    border-radius: 10px;
    padding: 15px 20px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    animation: slideInAlert 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left var(--animation-standard) ease;
}

.alert:hover::before {
    left: 100%;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.15);
}

.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.15);
}

/* Scroll to Top Button */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
}

.scroll-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.scroll-top.show {
    display: flex;
}

/* Additional modern animation keyframes */
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(100%);
    }
}

@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 slideInAlert {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* =====================================
   SCROLL ANIMATIONS SYSTEM
   ===================================== */

/* Base animation classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Slide in from left */
.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-left.animate {
    opacity: 1;
    transform: translateX(0);
}

/* Slide in from right */
.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-in-right.animate {
    opacity: 1;
    transform: translateX(0);
}

/* Fade in up */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in-up.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Scale in */
.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.scale-in.animate {
    opacity: 1;
    transform: scale(1);
}

/* Rotation entrance */
.rotate-in {
    opacity: 0;
    transform: rotate(-10deg) scale(0.8);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.rotate-in.animate {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Staggered animations for children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.stagger-children.animate > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.animate > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.animate > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.animate > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.animate > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.animate > *:nth-child(6) { transition-delay: 0.6s; }

.stagger-children.animate > * {
    opacity: 1;
    transform: translateY(0);
}

/* Floating animation for cards */
.float-on-scroll {
    transition: transform var(--animation-slow) ease;
}

.float-on-scroll.animate {
    animation: floatAnimation 3s ease-in-out infinite;
}

@keyframes floatAnimation {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Text reveal animation */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-reveal.animate span {
    opacity: 1;
    transform: translateY(0);
}

/* Enhanced section animations */
.section-header {
    overflow: hidden;
}

.section-tag {
    display: inline-block;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.section-tag.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Card animations */
.value-card,
.news-card,
.feature-item {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.value-card.animate,
.news-card.animate,
.feature-item.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Button entrance animations */
.btn.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn.scale-in.animate {
    opacity: 1;
    transform: scale(1);
}

/* Image hover enhancements */
.welcome-image img,
.about-hero-image img {
    transition: transform var(--animation-slow) ease;
}

.welcome-image:hover img,
.about-hero-image:hover img {
    transform: scale(1.05);
}
