/* ===== CSS Variables (Brand Colors) ===== */
:root {
    --primary-color: #8B0000;        /* Deep red from logo */
    --secondary-color: #FF6B35;      /* Orange from logo */
    --accent-color: #FFD700;         /* Gold from logo */
    --dark-color: #2C3E50;
    --light-color: #F8F9FA;
    --white-color: #FFFFFF;
    --gray-color: #6C757D;
    --success-color: #28A745;
    --warning-color: #FFC107;
    --danger-color: #DC3545;
    --info-color: #17A2B8;
    
    /* Typography */
    --font-primary: 'Poppins', sans-serif;
    --font-secondary: 'Inter', sans-serif;
    
    /* Spacing */
    --section-padding: 80px 0;
    --container-padding: 15px;
    
    /* Border Radius */
    --border-radius: 8px;
    --border-radius-lg: 12px;
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    
    /* Transitions */
    --transition: all 0.3s ease;
    --transition-fast: all 0.2s ease;
    --transition-slow: all 0.5s ease;
}

/* ===== Global Styles ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-secondary);
    line-height: 1.6;
    color: var(--dark-color);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--gray-color);
}

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

img {
    max-width: 100%;
    height: auto;
}

.section-padding {
    padding: var(--section-padding);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--gray-color);
    max-width: 600px;
    margin: 0 auto;
}

/* ===== Preloader ===== */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white-color);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease;
}

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

.preloader-logo {
    width: 120px;
    height: auto;
    margin-bottom: 30px;
    animation: logoFloat 2s ease-in-out infinite;
}

.loading-animation {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.loading-dot {
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    animation: loadingDots 1.4s ease-in-out infinite both;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }

@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes loadingDots {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* ===== Top Bar ===== */
.top-bar {
    font-size: 0.9rem;
    background: var(--primary-color) !important;
}

.top-bar a:hover {
    opacity: 0.8;
}

.top-bar-social a {
    display: inline-block;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    border-radius: 50%;
    transition: var(--transition);
}

.top-bar-social a:hover {
    background: rgba(255,255,255,0.2);
}

/* ===== Navigation ===== */
.navbar {
    padding: 1rem 0;
    transition: var(--transition);
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    padding: 0;
}

.navbar-logo {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

.navbar.scrolled .navbar-logo {
    height: 40px;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--dark-color);
    padding: 0.5rem 1rem;
    position: relative;
    transition: var(--transition);
}

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

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

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

.dropdown-menu {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    transition: var(--transition);
}

.dropdown-item:hover {
    background: var(--light-color);
    color: var(--primary-color);
}

/* ===== Buttons ===== */
.btn {
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white-color);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

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

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: var(--white-color);
    transform: translateY(-2px);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ===== Hero Section ===== */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    right: -20%;
    width: 60%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    opacity: 0.1;
    transform: skewX(-15deg);
    z-index: 1;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 2rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--gray-color);
    margin-bottom: 2rem;
}

.hero-buttons .btn {
    margin-right: 1rem;
    margin-bottom: 1rem;
}

.hero-stats {
    margin-top: 3rem;
}

.stat-item {
    padding: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-color);
    margin: 0;
}

.hero-image {
    position: relative;
    height: 500px;
}

.floating-elements {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-card {
    position: absolute;
    background: var(--white-color);
    padding: 1.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 1rem;
    animation: float 3s ease-in-out infinite;
}

.floating-card i {
    font-size: 2rem;
    color: var(--primary-color);
}

.floating-card span {
    font-weight: 600;
    color: var(--dark-color);
}

.card-1 {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.card-2 {
    top: 50%;
    right: 20%;
    animation-delay: 1s;
}

.card-3 {
    bottom: 20%;
    left: 20%;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-arrow {
    width: 30px;
    height: 30px;
    border: 2px solid var(--primary-color);
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(45deg); }
    40% { transform: translateY(-10px) rotate(45deg); }
    60% { transform: translateY(-5px) rotate(45deg); }
}

/* ===== About Section ===== */
.about-section {
    padding: var(--section-padding);
}

.about-image {
    position: relative;
}

.image-wrapper {
    position: relative;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.about-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--white-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.features-list {
    margin: 2rem 0;
}

.feature-item {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 500;
}

/* ===== Programs Section ===== */
.programs-section {
    padding: var(--section-padding);
}

.program-card {
    background: var(--white-color);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    height: 100%;
    border-top: 4px solid var(--primary-color);
}

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

.program-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.program-icon i {
    font-size: 2rem;
    color: var(--white-color);
}

.program-card h4 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.program-features {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.program-features li {
    padding: 0.5rem 0;
    color: var(--gray-color);
    position: relative;
    padding-left: 1.5rem;
}

.program-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* ===== Admission Section ===== */
.admission-section {
    padding: var(--section-padding);
    background: linear-gradient(135deg, var(--light-color), var(--white-color));
}

.admission-form-preview {
    position: relative;
}

.form-preview-card {
    background: var(--white-color);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.form-preview-card h4 {
    color: var(--dark-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.quick-form .form-control,
.quick-form .form-select {
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.quick-form .form-control:focus,
.quick-form .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(139, 0, 0, 0.25);
}

/* ===== Testimonials Section ===== */
.testimonials-section {
    padding: var(--section-padding);
}

.testimonial-card {
    background: var(--white-color);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    height: 100%;
}

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

.testimonial-content {
    margin-bottom: 1.5rem;
}

.testimonial-content p {
    font-style: italic;
    font-size: 1.1rem;
    color: var(--dark-color);
    position: relative;
}

.testimonial-content p::before {
    content: '"';
    font-size: 3rem;
    color: var(--primary-color);
    position: absolute;
    top: -10px;
    left: -20px;
    font-family: serif;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.author-info h5 {
    margin: 0;
    color: var(--dark-color);
}

.author-info span {
    color: var(--gray-color);
    font-size: 0.9rem;
}

/* ===== News Section ===== */
.news-section {
    padding: var(--section-padding);
}

.news-card {
    background: var(--white-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
}

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

.news-date {
    background: var(--primary-color);
    color: var(--white-color);
    padding: 1rem;
    text-align: center;
    position: relative;
}

.news-date .day {
    display: block;
    font-size: 2rem;
    font-weight: bold;
    line-height: 1;
}

.news-date .month {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.news-content {
    padding: 1.5rem;
}

.news-content h4 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.read-more {
    color: var(--primary-color);
    font-weight: 600;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--secondary-color);
}

/* ===== Footer ===== */
.footer {
    background: var(--dark-color) !important;
}

.footer-top {
    padding: 3rem 0;
}

.footer-widget {
    margin-bottom: 2rem;
}

.footer-logo-img {
    height: 60px;
    width: auto;
}

.footer-description {
    color: #adb5bd;
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: var(--white-color);
    border-radius: 50%;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

.footer-title {
    color: var(--white-color);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    position: relative;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--primary-color);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: #adb5bd;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white-color);
    padding-left: 5px;
}

.footer-contact .contact-item {
    display: flex;
    margin-bottom: 1rem;
}

.footer-contact .contact-item i {
    color: var(--primary-color);
    margin-top: 5px;
    flex-shrink: 0;
}

.footer-contact .contact-item div {
    color: #adb5bd;
}

.footer-contact .contact-item strong {
    color: var(--white-color);
}

.footer-bottom {
    padding: 1.5rem 0;
    border-top: 1px solid #495057 !important;
}

.footer-copyright {
    color: #adb5bd;
}

.footer-bottom-links a {
    color: #adb5bd;
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: var(--white-color);
}

/* ===== Back to Top Button ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white-color);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 1000;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
}

/* ===== WhatsApp Float Button ===== */
.whatsapp-float {
    position: fixed;
    bottom: 100px;
    right: 30px;
    z-index: 1000;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: var(--white-color);
    border-radius: 50%;
    font-size: 1.5rem;
    transition: var(--transition);
    animation: pulse 2s infinite;
}

.whatsapp-btn:hover {
    background: #128C7E;
    transform: scale(1.1);
    color: var(--white-color);
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ===== Responsive Design ===== */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-stats {
        margin-top: 2rem;
    }
    
    .floating-card {
        position: static;
        margin-bottom: 1rem;
        animation: none;
    }
    
    .hero-image {
        height: auto;
        margin-top: 2rem;
    }
}

@media (max-width: 767.98px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .program-card,
    .testimonial-card,
    .news-card {
        margin-bottom: 2rem;
    }
    
    .back-to-top,
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-float {
        bottom: 80px;
    }
}

@media (max-width: 575.98px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
}

/* ===== Animation Classes ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: var(--transition-slow);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: var(--transition-slow);
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: var(--transition-slow);
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: var(--transition-slow);
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* ===== Utility Classes ===== */
.text-primary {
    color: var(--primary-color) !important;
}

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

.bg-primary {
    background-color: var(--primary-color) !important;
}

.bg-secondary {
    background-color: var(--secondary-color) !important;
}

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

.border-secondary {
    border-color: var(--secondary-color) !important;
}