:root {
    --primary-green: #006837;
    --primary-dark: #004d29;
    --accent-yellow: #FFF200;
    --dark-overlay: rgba(0, 30, 15, 0.9);
    --text-dark: #2c3e50;
    --text-light: #6c757d;
}

/* --- GLOBAL STYLES --- */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--text-dark);
    overflow-x: hidden;
    position: relative;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* Loader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Urdu Font */
.urdu-font {
    font-family: 'Noto Nastaliq Urdu', serif;
    direction: rtl;
    line-height: 1.8;
}

/* --- TOP BAR --- */
.top-bar {
    background-color: var(--primary-green);
    color: white;
    font-size: 0.85rem;
    padding: 8px 0;
    transition: all 0.3s;
}

.top-bar a {
    color: white;
    text-decoration: none;
    transition: 0.3s;
}

.top-bar a:hover {
    color: var(--accent-yellow);
    transform: scale(1.1);
    display: inline-block;
}

/* --- NAVBAR --- */
.navbar {
    background: white;
    padding: 15px 0;
    transition: all 0.4s ease;
}

.navbar.scrolled {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
    animation: slideDown 0.5s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }

    to {
        transform: translateY(0);
    }
}

.navbar-brand img {
    height: 60px;
    margin-right: 15px;
    transition: transform 0.3s;
}

.navbar-brand:hover img {
    transform: rotate(-5deg);
}

.brand-text h1 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    color: var(--primary-green);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brand-text span {
    font-size: 0.8rem;
    color: #666;
    font-weight: 500;
}

.nav-link {
    color: #444 !important;
    font-weight: 500;
    margin: 0 10px;
    font-size: 0.95rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-green);
    transition: width 0.3s ease-in-out;
}

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

.nav-link:hover {
    color: var(--primary-green) !important;
}

.btn-admissions {
    background-color: var(--primary-green);
    color: white;
    border-radius: 50px;
    padding: 10px 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 45, 145, 0.3);
    border: 2px solid transparent;
}

.btn-admissions:hover {
    background-color: transparent;
    color: var(--primary-green);
    border-color: var(--primary-green);
    transform: translateY(-2px);
}

/* --- HERO SECTION --- */
.hero-section {
    background: linear-gradient(var(--dark-overlay), rgba(0, 104, 55, 0.7)), url('/src/img/main-department-002.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    /* Parallax effect */
    min-height: 90vh;
    display: flex;
    align-items: center;
    color: white;
    position: relative;
    padding-top: 60px;
}

.hero-badge {
    background-color: var(--accent-yellow);
    color: var(--primary-green);
    padding: 5px 15px;
    font-weight: bold;
    border-radius: 4px;
    display: inline-block;
    margin-bottom: 15px;
    font-size: 0.9rem;
    box-shadow: 0 0 10px rgba(255, 242, 0, 0.5);
}

.hero-title-urdu {
    font-size: 2.5rem;
    color: var(--accent-yellow);
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    margin-bottom: 10px;
}

.hero-btn {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero-btn::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.3s;
    z-index: -1;
}

.hero-btn:hover::before {
    left: 0;
}

/* --- MODERN NEWS TICKER --- */
.ticker-wrap {
    background: var(--primary-green);
    color: white;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    height: 45px;
    overflow: hidden;
}

.ticker-label {
    background: var(--accent-yellow);
    color: var(--primary-green);
    font-weight: 700;
    padding: 0 20px;
    text-transform: uppercase;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    z-index: 10;
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
}

.ticker-content {
    display: flex;
    align-items: center;
    animation: marquee 30s linear infinite;
    white-space: nowrap;
    padding-left: 100%;
    /* Start from right */
}

.ticker-item {
    margin-right: 50px;
    display: inline-flex;
    align-items: center;
}

.ticker-wrap:hover .ticker-content {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

/* --- INFO CARDS --- */
.info-card-container {
    margin-top: -60px;
    position: relative;
    z-index: 5;
}

.info-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    border-bottom: 5px solid transparent;
    height: 100%;   
    border-bottom-color: var(--primary-green);
    transition: transform 0.4s, box-shadow 0.4s;
}

.info-card:hover {
    transform: translateY(-15px);
    border-color: var(--accent-yellow);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}



.icon-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 1.8rem;
    background: rgba(0, 104, 55, 0.1);
    color: var(--primary-green);
    transition: transform 0.5s;
}

.info-card:hover .icon-circle {
    background: rgba(255, 238, 0, 0.1);
    color: #e7dc02;
    transform: rotateY(180deg);
}

/* --- SECTIONS GENERAL --- */
.section-padding {
    padding: 90px 0;
}

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

.section-title span {
    color: var(--primary-green);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    display: block;
    margin-bottom: 5px;
}

.section-title h2 {
    font-weight: 700;
    color: var(--primary-green);
    font-size: 2.2rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    width: 50px;
    height: 3px;
    background: var(--accent-yellow);
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

/* --- ABOUT --- */
.about-img-wrapper {
    position: relative;
    padding: 20px;
    transition: transform 0.3s;
}

.about-img-wrapper:hover {
    transform: scale(1.02);
}

.about-img-wrapper img {
    border-radius: 10px;
}

.about-img-wrapper::before,
.about-img-wrapper::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    z-index: 1;
    transition: all 0.5s;
}

.about-img-wrapper::before {
    top: 0;
    left: 0;
    border-top: 5px solid var(--accent-yellow);
    border-left: 5px solid var(--accent-yellow);
}

.about-img-wrapper::after {
    bottom: 0;
    right: 0;
    border-bottom: 5px solid var(--primary-green);
    border-right: 5px solid var(--primary-green);
}

.about-img-wrapper:hover::before {
    top: 10px;
    left: 10px;
}

.about-img-wrapper:hover::after {
    bottom: 10px;
    right: 10px;
}

/* --- PROGRAMS --- */
.program-box {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    height: 100%;
    border: 1px solid #eee;
    position: relative;
}

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

.program-header {
    padding: 25px 20px;
    color: white;
    text-align: center;
}

.ph-green {
    background: linear-gradient(135deg, var(--accent-yellow),var(--primary-green));
}

.ph-purple {
    background: linear-gradient(135deg, var(--primary-green),var(--accent-yellow));
}

.ph-blue {
    background: linear-gradient(135deg, var(--accent-yellow), var(--primary-green));
}

.program-list li {
    padding: 12px 20px;
    border-bottom: 1px solid #f8f9fa;
    font-size: 0.95rem;
    transition: background 0.2s, padding-left 0.2s;
    display: flex;
    align-items: center;
}

.program-list li:hover {
    background: #f9fff9;
    padding-left: 25px;
}

.program-list i {
    margin-right: 12px;
    color: var(--primary-green);
    width: 20px;
    text-align: center;
}

/* --- STATS --- */
.stats-section {
    background-color: var(--primary-green);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23004d29' fill-opacity='0.4'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* --- GALLERY --- */
.gallery-item {
    overflow: hidden;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
}

.gallery-item img {
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: -50px;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    text-align: center;
    transition: bottom 0.3s;
}

.gallery-item:hover .gallery-overlay {
    bottom: 0;
}

/* --- FOOTER --- */
footer {
    background-color: #1a1a1a;
    color: #bbb;
    padding-top: 80px;
    border-top: 5px solid var(--accent-yellow);
}

footer h4 {
    color: white;
    margin-bottom: 25px;
    font-weight: 600;
    font-size: 1.2rem;
}

footer a {
    display: block;
    color: #bbb;
    text-decoration: none;
    margin-bottom: 12px;
    transition: 0.3s;
}

footer a:hover {
    color: var(--accent-yellow);
    padding-left: 8px;
}

.footer-social a {
    width: 35px;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 50%;
    margin-right: 10px;
    transition: 0.3s;
    text-decoration: none;
}

.footer-social a:hover {
    background: var(--primary-green);
    transform: translateY(-3px);
}

/* Back to Top */
#backToTop {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-green);
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 999;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
}

#backToTop:hover {
    background: var(--accent-yellow);
    color: var(--primary-green);
    transform: translateY(-5px);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding: 140px 0 80px 0;
        text-align: center;
    }

    .info-card-container {
        margin-top: 30px;
    }

    .top-bar {
        display: none;
    }

    .hero-title-urdu {
        font-size: 1.8rem;
    }

    .ticker-label {
        width: auto;
        font-size: 0.8rem;
        padding: 0 10px;
    }

    .section-padding {
        padding: 60px 0;
    }

    .display-4 {
        font-size: 2.5rem;
    }
}