* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #fff;
    color: #333;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

::selection {
    background: rgba(76, 175, 80, 0.3);
    color: #333;
}

/* Header Styles */
header {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}

nav {
    display: flex;
    padding: 1% 6%;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    transition: background 0.3s ease;
}

nav.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

nav.scrolled .nav-links ul li a,
nav.scrolled .list-item {
    color: #333;
}

nav img {
    width: 120px;
    transition: all 0.3s ease;
}

.nav-links {
    flex: 1;
    text-align: right;
    background: transparent;
}

.nav-links ul li {
    list-style: none;
    display: inline-block;
    padding: 8px 12px;
    position: relative;
    background: transparent;
}

.nav-links ul {
    background: transparent;
}

.nav-links ul li::after {
    content: '';
    width: 0%;
    height: 2px;
    background-color: #4caf50;
    display: block;
    margin: auto;
    transition: 0.5s;
}

.nav-links ul li:hover::after {
    width: 100%;
}

.nav-links ul li a {
    text-decoration: none;
    color: white;
    font-size: 18px;
    font-weight: 500;
    background: transparent;
    transition: color 0.3s ease;
}

.nav-links ul li a.active {
    color: #4caf50;
    font-weight: 600;
}

.list-item {
    text-decoration: none;
    color: white;
    font-size: 18px;
    font-weight: 500;
    background: transparent;
    cursor: pointer;
    transition: color 0.3s ease;
}

.list-item .icon {
    background: transparent;
    color: #4caf50;
    margin-left: 5px;
}

.list-item .sub-list {
    width: 200px;
    position: absolute;
    z-index: 999;
    display: none;
    text-align: left;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 10px 0;
}

.list-item:hover .sub-list {
    display: block;
}

.list-item .sub-list li {
    display: block;
    padding: 10px 15px;
}

.list-item .sub-list li a {
    color: #333;
    font-size: 16px;
}

nav .fa {
    display: none;
}

/* Hero Section */
.hero {
    background-image: linear-gradient(rgba(4, 9, 30, 0.4), rgba(4, 9, 30, 0.4)), url(Images/School\ Buliding.png);
    background-position: center;
    background-size: cover;
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 70px;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.05);
    animation: pulse 5s infinite alternate;
}

@keyframes pulse {
    0% {
        opacity: 0.3;
    }
    100% {
        opacity: 0.7;
    }
}

.hero .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.05);
}

.hero-content {
    text-align: center;
    color: white;
    position: relative;
    z-index: 10;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.6);
    position: relative;
    display: inline-block;
}

.hero-content h1::after {
    content: '';
    position: absolute;
    width: 80px;
    height: 4px;
    background: #4caf50;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
}

.hero-content p {
    font-size: 1.3rem;
    font-weight: 400;
    max-width: 800px;
    margin: 20px auto 0;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.6;
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 0;
    position: relative;
}

/* Section Title */
.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 60px;
    position: relative;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 4px;
    background: #4caf50;
}

/* Events Section */
.events-section {
    padding: 80px 0;
    background: #f9f9f9;
    position: relative;
    overflow: hidden;
}

.events-section::before {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: rgba(76, 175, 80, 0.05);
    border-radius: 50%;
    top: -200px;
    left: -200px;
    z-index: 0;
}

.events-section::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(76, 175, 80, 0.05);
    border-radius: 50%;
    bottom: -150px;
    right: -150px;
    z-index: 0;
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

.event-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.5s ease;
    position: relative;
    transform: translateY(50px);
    opacity: 0;
    animation: fadeUp 0.8s forwards;
}

.event-card:nth-child(1) {
    animation-delay: 0.1s;
}

.event-card:nth-child(2) {
    animation-delay: 0.3s;
}

.event-card:nth-child(3) {
    animation-delay: 0.5s;
}

.event-card:nth-child(4) {
    animation-delay: 0.7s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.event-card:hover {
    transform: translateY(-20px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.event-date {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(76, 175, 80, 0.9);
    color: white;
    padding: 12px 18px;
    border-radius: 12px;
    text-align: center;
    z-index: 10;
    line-height: 1.2;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.event-card:hover .event-date {
    background: rgba(76, 175, 80, 1);
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.event-date .day {
    display: block;
    font-size: 2rem;
    font-weight: 800;
}

.event-date .month {
    display: block;
    font-size: 1.1rem;
    text-transform: uppercase;
    font-weight: 600;
}

.event-date .year {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
}

.event-img {
    height: 280px;
    overflow: hidden;
    position: relative;
}

.event-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
    filter: brightness(0.95);
}

.event-card:hover .event-img img {
    transform: scale(1.1);
    filter: brightness(1.05);
}

.event-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.event-card:hover .event-overlay {
    opacity: 1;
}

.view-btn {
    background: #4caf50;
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.5s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.view-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: #388e3c;
    z-index: -1;
    transition: all 0.5s ease;
    border-radius: 50px;
}

.view-btn:hover::before {
    width: 100%;
}

.view-btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.event-content {
    padding: 30px;
}

.event-content h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #333;
    position: relative;
    padding-bottom: 15px;
    transition: all 0.3s ease;
}

.event-content h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: #4caf50;
    transition: width 0.3s ease;
}

.event-card:hover .event-content h3::after {
    width: 100px;
}

.event-details {
    margin-bottom: 20px;
}

.event-details p {
    font-size: 15px;
    color: #666;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.event-details p i {
    color: #4caf50;
    margin-right: 10px;
    font-size: 18px;
    flex-shrink: 0;
}

.event-description {
    font-size: 16px;
    line-height: 1.7;
    color: #666;
    margin-bottom: 25px;
    font-weight: 400;
}

.read-more {
    display: inline-block;
    padding: 12px 30px;
    background-color: transparent;
    color: #4caf50;
    border: 2px solid #4caf50;
    border-radius: 50px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.5s ease;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.read-more::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: #4caf50;
    z-index: -1;
    transition: all 0.5s ease;
    border-radius: 50px;
}

.read-more:hover::before {
    width: 100%;
}

.read-more:hover {
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(76, 175, 80, 0.3);
}

/* Past Events Gallery */
.past-events {
    padding: 80px 0;
    background: #fff;
    position: relative;
    overflow: hidden;
}

.past-events::before {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: rgba(76, 175, 80, 0.05);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 40px;
    position: relative;
    z-index: 1;
}

.gallery-item {
    height: 280px;
    overflow: hidden;
    border-radius: 15px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(50px);
    opacity: 0;
    animation: fadeUp 0.8s forwards;
    animation-delay: calc(0.1s * var(--i, 1));
}

.gallery-item:nth-child(1) { --i: 1; }
.gallery-item:nth-child(2) { --i: 2; }
.gallery-item:nth-child(3) { --i: 3; }
.gallery-item:nth-child(4) { --i: 4; }
.gallery-item:nth-child(5) { --i: 5; }
.gallery-item:nth-child(6) { --i: 6; }

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
    filter: brightness(0.95);
}

.gallery-item:hover img {
    transform: scale(1.1);
    filter: brightness(1.05);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.view-gallery {
    width: 60px;
    height: 60px;
    background: #4caf50;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.5s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.view-gallery:hover {
    background: #388e3c;
    transform: rotate(90deg) scale(1.2);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Modal Styling */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.modal:target {
    display: flex;
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 8px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    animation: zoomIn 0.5s forwards;
}

@keyframes zoomIn {
    from {
        transform: scale(0.9);
    }
    to {
        transform: scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    text-decoration: none;
    background: rgba(0, 0, 0, 0.5);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.5s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.modal-close:hover {
    background: #4caf50;
    transform: rotate(90deg);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Footer Section */
.footer {
    width: 100%;
    text-align: center;
    padding: 30px 0;
    background: #333;
    color: #fff;
}

.footer h4 {
    margin-bottom: 25px;
    margin-top: 20px;
    font-weight: 600;
    font-size: 1.5rem;
    color: #fff;
}

.footer img {
    width: 120px;
    margin: 10px 0 20px;
}

.text {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.row {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
    color: #fff;
    background: #333;
}

.row i {
    margin-right: 10px;
    color: #4caf50;
    font-size: 18px;
    background: #333;
}

.al {
    color: #fff;
    text-decoration: none;
    font-size: 16px;
    background: #333;
}

.icons {
    margin: 30px 0;
    background: #333;
}

.icons .fa-brands {
    color: #fff;
    margin: 0 13px;
    cursor: pointer;
    padding: 18px;
    font-size: 20px;
    background: #555;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.icons .fa-brands:hover {
    color: #fff;
    background: #4caf50;
    transform: translateY(-5px);
}

.pixel-name {
    font-size: 14px;
    color: #999;
    margin-top: 20px;
    background: #333;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 55px;
    height: 55px;
    background-color: #4caf50;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.5s ease;
    z-index: 1000;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #388e3c;
    transform: translateY(-10px) rotate(360deg);
    box-shadow: 0 15px 30px rgba(76, 175, 80, 0.3);
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #4caf50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Images with lazy loading effect */
img {
    max-width: 100%;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

img.lazy-load {
    filter: blur(5px);
    opacity: 0.5;
}

img.loaded {
    filter: blur(0);
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 991px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .hero {
        height: 40vh;
    }
    
    .event-img {
        height: 220px;
    }
    
    .gallery-item {
        height: 220px;
    }
}

@media (max-width: 768px) {
    nav img {
        width: 90px;
    }
    
    .hero-content h1 {
        font-size: 2.3rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .events-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .event-img {
        height: 200px;
    }
    
    .gallery-item {
        height: 180px;
    }
}

@media screen and (max-width: 700px) {
    .hero {
        height: 30vh;
        margin-top: 60px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .nav-links ul li {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        background: #333;
        height: 100vh;
        width: 200px;
        top: 0;
        right: -200px;
        text-align: left;
        z-index: 2;
        transition: 0.5s;
    }
    
    nav .fa {
        display: block;
        color: #fff;
        margin: 10px;
        font-size: 22px;
        cursor: pointer;
        background: transparent;
    }
    
    .nav-links ul {
        padding: 30px;
    }
    
    .nav-links ul li a,
    .list-item {
        color: #fff;
    }
    
    .list-item .sub-list {
        position: static;
        background: transparent;
        box-shadow: none;
        display: none;
        width: 100%;
    }
    
    .list-item .sub-list li a {
        color: #fff;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    
    .modal img {
        max-width: 95%;
    }
}

@media screen and (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-item {
        height: 200px;
    }
}
