:root {
    /* Brand Colors from Logo */
    --primary: #5D8EBD;
    --secondary: #40E0FF;
    --accent: #FFFF00;
    --white: #ffffff;
    --light-bg: #f8fafc;
    --dark: #0f172a;
    --gray-text: #64748b;
    /* Animation Speeds */
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* 1. Global Reset & Base Styles */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

.section {
    padding: 100px 0;
}

.bg-light {
    background-color: var(--light-bg);
}

.underline {
    width: 60px;
    height: 5px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    border-radius: 10px;
    margin-bottom: 30px;
}

/* 2. Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-logo {
    height: 55px;
    transition: var(--transition);
}

.brand-text h2 {
    margin: 0;
    font-size: 1.4rem;
    color: var(--primary);
    letter-spacing: -0.5px;
}

.brand-text span {
    font-size: 0.75rem;
    color: var(--gray-text);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 600;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    margin-left: 30px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

.menu-toggle { 
    display: none; 
    cursor: pointer; 
    color: var(--primary); 
}

/* 3. Hero Section */
.hero {
    background: linear-gradient(rgba(15, 23, 42, 0.6), rgba(15, 23, 42, 0.4)), url('https://images.unsplash.com/photo-1580582932707-520aed937b7b?auto=format&fit=crop&q=80&w=800');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
}

.motto-tag {
    background: var(--accent);
    color: var(--dark);
    padding: 8px 20px;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin: 25px 0;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.25rem;
    max-width: 750px;
    margin: 0 auto 40px;
    opacity: 0.95;
}

/* 4. Interactive Components */
.btn {
    padding: 16px 36px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: #4a749b;
    transform: translateY(-4px);
    box-shadow: 0 15px 30px rgba(93, 142, 189, 0.4);
}

.btn-outline {
    border: 2px solid white;
    color: white;
    margin-left: 15px;
}

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

/* Cards & Grid Layouts */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
}

.icon-feature {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    font-weight: 600;
    color: var(--primary);
}

.icon-feature i {
    width: 28px;
    height: 28px;
    color: var(--secondary);
}

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

.card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-12px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
}

.card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
}

.card-body {
    padding: 30px;
}

/* Gallery & Lightbox */

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
}

.modal-content {
    margin: auto;
    display: block;
    width: 85%;
    max-width: 900px;
    border-radius: 20px;
    animation: zoom 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes zoom {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--white);
    font-size: 50px;
    font-weight: 100;
    cursor: pointer;
}



/* 5. Footer & Contacts */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 100px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 60px;
}

.footer-logo {
    height: 70px;
    margin-bottom: 25px;
}

.footer h4 {
    color: var(--secondary);
    margin-bottom: 25px;
    font-size: 1.25rem;
}

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

.footer ul li {
    margin-bottom: 15px;
}

.footer ul li a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: 0.3s;
}

.footer ul li a:hover {
    color: var(--accent);
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 15px;
}

.footer-contact i {
    width: 20px;
    height: 20px;
    color: var(--secondary);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 60px;
    padding-top: 30px;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

/* 6. Floating Action Button */
.whatsapp-float {
    position: fixed;
    bottom: 35px;
    right: 35px;
    background: #25d366;
    color: white;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 12px 30px rgba(37, 211, 102, 0.4);
    z-index: 1500;
    transition: var(--transition);
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(10deg);
}

.whatsapp-float i {
    width: 35px;
    height: 35px;
}

/* 7. Mobile Responsiveness */
@media (max-width: 1024px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        text-align: center;
        padding: 20px 0;
        box-shadow: 0 10px 10px rgba(0, 0, 0, 0.1);
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links a {
        margin: 15px 0;
        font-size: 1.1rem;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    .hero-btns {
        flex-direction: column;
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }
    .btn-outline {
        margin-left: 0 !important;
        margin-top: 10px;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-brand,
    .footer-contact p {
        justify-content: center;
    }
    .btn-outline {
        margin-left: 0;
        margin-top: 15px;
        width: 100%;
        box-sizing: border-box;
    }
    .btn-primary {
        width: 100%;
        box-sizing: border-box;
    }
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
    }
    .section {
        padding: 60px 0;
    }
}

/* 8. Academics & News Grids */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 40px;
}

.cards-grid .card {
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    background: var(--white);
}

.cards-grid .card:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.08);
}

.cards-grid .card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.cards-grid .card h3 {
    padding: 20px 20px 10px;
    font-size: 1.5rem;
    color: var(--primary);
}

.cards-grid .card p {
    padding: 0 20px 20px;
    color: var(--gray-text);
    font-size: 0.95rem;
    line-height: 1.5;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.news-card {
    background: var(--white);
    padding: 25px 20px;
    border-radius: 15px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.08);
}

.news-card h3 {
    font-size: 1.3rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.news-card p {
    font-size: 0.95rem;
    color: var(--gray-text);
    line-height: 1.5;
}

.modal-img {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
}

.modal-img-content {
    margin: auto;
    display: block;
    width: 85%;
    max-width: 900px;
    border-radius: 20px;
    animation: zoom 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.close-img {
    position: absolute;
    top: 30px;
    right: 40px;
    color: var(--white);
    font-size: 50px;
    font-weight: 100;
    cursor: pointer;
}

.gallery-grid {
    grid-template-columns: 1fr !important;
    /* Single column on mobile */
    gap: 15px;
}

.gallery-img {
    height: auto;
    /* Let image scale naturally */
    border-radius: 12px;
}

.gallery-grid img:hover {
    transform: scale(1.05);
    filter: brightness(0.85);
}

/* Bento Gallery Style */
.gallery-bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 200px);
    gap: 20px;
    margin-top: 40px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    cursor: pointer;
}

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

/* Feature Image (Spans 2 columns and 2 rows) */
.item-big {
    grid-column: span 2;
    grid-row: span 2;
}

/* Hover Effects */
.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.7), transparent);
    display: flex;
    align-items: flex-end;
    padding: 25px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.gallery-overlay span {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    transform: translateY(10px);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay span {
    transform: translateY(0);
}

.gallery-cta {
    text-align: center;
    margin-top: 50px;
}

/* Mobile Fix */
@media (max-width: 768px) {
    .gallery-bento {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(4, 150px);
    }
    
    .item-big {
        grid-column: span 2;
        grid-row: span 2;
    }
}

/* Container for the stack */
.about-image {
    position: relative;
    padding: 20px; /* Space for the offset frame */
}

.image-stack {
    position: relative;
    z-index: 1;
}

/* The offset background frame */
.image-stack::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid var(--secondary);
    border-radius: 20px;
    top: 20px;
    left: 20px;
    z-index: -1;
    transition: var(--transition);
}

.premium-img {
    width: 100%;
    display: block;
    border-radius: 20px;
    filter: saturate(1.1);
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.15);
    transition: var(--transition);
}

/* Floating Badge */
.stack-badge {
    position: absolute;
    bottom: -15px;
    right: -15px;
    background: var(--primary);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(93, 142, 189, 0.3);
    animation: float 3s ease-in-out infinite;
}

/* Hover Interaction */
.about-image:hover .premium-img {
    transform: translate(10px, 10px);
}

.about-image:hover .image-stack::before {
    transform: translate(-15px, -15px);
    background-color: rgba(64, 224, 255, 0.05);
}

/* Subtle Floating Animation */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Mobile Adjustment */
@media (max-width: 768px) {
    .about-image {
        padding: 10px;
        margin-bottom: 30px;
    }
    .stack-badge {
        padding: 10px 15px;
        font-size: 0.8rem;
    }
}