/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #1a5276;
    --secondary-blue: #2e86c1;
    --light-blue: #d4e6f1;
    --cream: #fdf5e6;
    --cream-dark: #f5e6cc;
    --text-dark: #2c3e50;
    --text-light: #ffffff;
    --accent-gold: #d4af37;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--cream);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HERO SLIDESHOW ===== */
.hero-slideshow {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    background: var(--primary-blue);
}

.hero-slideshow-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slides-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    pointer-events: none;
    visibility: hidden;
}

.hero-slide.active {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.hero-slide-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1.1);
    transition: transform 6s ease;
}

.hero-slide.active .hero-slide-bg {
    transform: scale(1);
}


/* Gradient overlay for better text readability */
.hero-slide-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.3) 0%,
        rgba(0, 0, 0, 0.4) 50%,
        rgba(0, 0, 0, 0.6) 100%
    );
    z-index: 1;
}

/* High-DPI Display Optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-slide-bg {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
    
    .hero-slide-content h1 {
        text-shadow: 2px 4px 12px rgba(0, 0, 0, 0.8);
    }
}

/* Preload images for smooth transitions */
.hero-slide-bg {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Ensure images are not blurry */
.hero-slide img,
.hero-slide video {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.hero-slide-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    text-align: center;
    color: var(--text-light);
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
}

.hero-slide-content h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.7);
    animation: slideInDown 1s ease;
    font-weight: 500;
    letter-spacing: 1px;
}

.hero-slide-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    animation: slideInUp 1s ease;
    font-weight: 400;
    max-width: 800px;
    line-height: 1.6;
}

.hero-btn {
    display: inline-block;
    padding: 15px 40px;
    background: var(--accent-gold);
    color: var(--primary-blue);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    animation: fadeIn 1.5s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid transparent;
}

.hero-btn:hover {
    background: #c19a2e;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.4);
    border-color: white;
}

/* Hero Slide Arrows */
.hero-slide-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: var(--transition);
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.hero-slide-arrow:hover {
    background: rgba(0, 0, 0, 0.8);
    border-color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
}

.hero-slide-arrow.prev {
    left: 20px;
}

.hero-slide-arrow.next {
    right: 20px;
}

/* Hero Slide Dots */
.hero-slide-dots {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.hero-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.hero-dot.active {
    background: var(--accent-gold);
    transform: scale(1.3);
    border-color: white;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* Hero Upload Controls */
.hero-upload-controls {
    position: absolute;
    bottom: 80px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 15;
}

.upload-btn {
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-blue);
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    border: 2px solid white;
}

.upload-btn:hover {
    background: white;
    transform: translateY(-2px);
     box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ===== QUICK INFO BAR ===== */
.quick-info {
    background: white;
    padding: 40px 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.quick-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.quick-info-item {
    padding: 20px;
}

.quick-info-icon {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
}

.quick-info-item h3 {
    font-size: 2rem;
    color: var(--primary-blue);
    margin-bottom: 5px;
}

.quick-info-item p {
    color: #666;
}

/* ===== HEADER & NAVIGATION ===== */
header {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--text-light);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-icon {
    width: 50px;
    height: 50px;
    background: var(--accent-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-blue);
}

.logo-text h1 {
    font-size: 3.0rem;
    font-weight: 800;
}

.logo-text p {
    font-size: 0.90rem;
    opacity: 0.9;
}

nav {
    background: rgba(0, 0, 0, 0.1);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    padding: 0;
}

nav ul li {
    margin: 0;
}

nav ul li a {
    color: var(--text-light);
    text-decoration: none;
    padding: 15px 20px;
    display: block;
    transition: var(--transition);
    font-weight: 500;
}

nav ul li a:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--accent-gold);
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
}

/* ===== SECTION STYLES ===== */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.section-title p {
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== HISTORY SECTION ===== */
.history {
    background: var(--text-light);
}

.history-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.history-text {
    line-height: 1.8;
}

.history-image {
    background: linear-gradient(135deg, var(--light-blue), var(--cream-dark));
    height: 300px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
    color: var(--primary-blue);
    overflow: hidden;
}

/* ===== ADMISSION SECTION ===== */
.admission {
    background: var(--light-blue);
}

.admission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.admission-card {
    background: var(--text-light);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.admission-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.admission-card .icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.admission-card h3 {
    color: var(--primary-blue);
    margin-bottom: 15px;
}

/* ===== GALLERY SECTION ===== */
.gallery-section {
    background: var(--text-light);
    padding: 80px 0;
}

.gallery-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.gallery-filter-btn {
    padding: 10px 25px;
    border: 2px solid var(--primary-blue);
    background: white;
    color: var(--primary-blue);
    border-radius: 25px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: var(--transition);
    font-family: inherit;
}

.gallery-filter-btn:hover {
    background: var(--light-blue);
    transform: translateY(-2px);
}

.gallery-filter-btn.active {
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 5px 15px rgba(26, 82, 118, 0.3);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
    background: var(--cream);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

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

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: white;
    padding: 40px 20px 20px;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-overlay h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.gallery-item-overlay p {
    font-size: 0.85rem;
    opacity: 0.9;
}

.gallery-item-type {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    z-index: 2;
}

.gallery-item-type.image {
    background: var(--secondary-blue);
    color: white;
}

.gallery-item-type.video {
    background: var(--danger);
    color: white;
}

.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--cream);
    border-radius: 12px;
    color: #666;
}

.gallery-empty .icon {
    font-size: 4rem;
    margin-bottom: 20px;
    display: block;
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    cursor: pointer;
    transition: var(--transition);
    z-index: 2001;
}

.lightbox-close:hover {
    color: var(--accent-gold);
    transform: scale(1.1);
}

.lightbox-content {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img,
.lightbox-content video {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

/* Responsive Gallery */
@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 15px;
    }
    
    .gallery-item img,
    .gallery-item video {
        height: 200px;
    }
    
    .gallery-filter-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}


/* ===== SERVICES SECTION ===== */
.services {
    background: var(--text-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.service-item {
    text-align: center;
    padding: 30px;
    background: var(--cream);
    border-radius: 10px;
    transition: var(--transition);
}

.service-item:hover {
    background: var(--primary-blue);
    color: var(--text-light);
}

.service-item .icon {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

/* ===== STAFF SECTION ===== */
.staff {
    background: var(--cream);
}

.staff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

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

.staff-image {
    width: 180px;
    height: 180px;
    background: var(--light-blue);
    border-radius: 50%;
    margin: 0 auto 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--primary-blue);
}

.staff-card h4 {
    color: var(--primary-blue);
    margin-bottom: 1px;
}

.staff-card p {
    color: #666;
}

/* ===== CHECK RESULT & CBT SECTION ===== */
.online-services {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--text-light);
}

.online-services .section-title h2 {
    color: var(--text-light);
}

.online-services .section-title p {
    color: rgba(255, 255, 255, 0.8);
}

.online-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.online-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    transition: var(--transition);
}

.online-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-10px);
}

.online-card .icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.online-card h3 {
    margin-bottom: 15px;
}

/* ===== CONTACT SECTION ===== */
.contact {
    background: var(--text-light);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--secondary-blue);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.info-item .icon {
    font-size: 2rem;
    min-width: 50px;
}

/* ===== FOOTER ===== */
footer {
    background: var(--primary-blue);
    color: var(--text-light);
    padding: 10px 0;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 5px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
     margin-bottom: 30px;
}

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

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

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-100px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .hero-slideshow {
        height: 70vh;
        min-height: 500px;
    }
    
    .hero-slide-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-slide-content p {
        font-size: 1.2rem;
    }
    
    .hero-btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .hero-slide-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .menu-toggle {
        display: block;
    }
    
    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
    }
    
    nav ul.show {
        display: flex;
    }
    
    nav ul li a {
        padding: 12px 15px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .history-content,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .quick-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
