:root {
    --primary-green: #20a366;
    --dark-blue: #007696;
    --top-gradient: linear-gradient(135deg, #004d26 0%, #007696 100%);
    --white: #ffffff;
}

body { 
    font-family: 'Segoe UI', Arial, sans-serif; 
    margin: 0; 
    padding: 0; 
    background-color: #f4f7f6;
    background-image: url("https://www.transparenttextures.com/patterns/cubes.png");
    color: #333;
}

/* TOP INFO BAR */
.top-info-bar {
    background: var(--top-gradient);
    color: white;
    padding: 8px 5%;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    flex-wrap: wrap;
    gap: 10px;
}

/* HEADER & LOGO AREA */
.header-main {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 5%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    flex-wrap: wrap;
    gap: 15px;
}

.logo-area { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
}

.logo-area img { 
    height: 90px; 
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.2)); 
}

.logo-area h1 { 
    font-size: 32px; 
    color: #1a1a1a; 
    text-transform: uppercase; 
    margin: 0; 
    font-weight: 800;
}

/* NAVIGATION MENU */
nav {
    background: var(--white);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08); /* Smoother shadow footprint */
    position: sticky; 
    top: 0; 
    z-index: 1000;
}

nav ul { 
    list-style: none; 
    display: flex; 
    justify-content: center; 
    margin: 0; 
    padding: 0; 
    flex-wrap: wrap; 
}

nav ul li a {
    display: block; 
    padding: 20px 24px;
    color: #2c3e50; 
    text-decoration: none;
    font-weight: 700; 
    font-size: 14px;
    text-transform: uppercase; 
    position: relative;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden; /* Contains the underline hover mask */
}

/* HERO IMAGE BLOCK */
.hero {
    position: relative;
    height: 550px;
      background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('../images/school1.jpg') center/cover no-repeat;
    /*url('assets/images/al-faiz-model-academy-campus.jpg') center/cover no-repeat;*/
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

/* BUTTON MANAGEMENT INTERFACE CONTAINER */
.hero-overlay-buttons {
    position: absolute; 
    right: 3%; 
    top: 50%;
    transform: translateY(-50%);
    display: flex; 
    flex-direction: column; 
    gap: 12px; 
    width: 100%;
    max-width: 340px; 
    padding: 0 15px;
    box-sizing: border-box;
    z-index: 5;
}

.hero-btn {
    display: block;
    background: rgba(0, 118, 150, 0.95);
    color: white; 
    padding: 15px 20px;
    text-decoration: none; 
    border-radius: 6px;
    font-size: 14px; 
    font-weight: bold;
    border-left: 6px solid #004d61;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* PORTAL BOX LINK CONTAINER MAPPED BY USER */
.menu-container {
    width: 100%;          
    max-width: 500px;     
    margin: 20px auto;       
    padding: 0 15px;      
    display: flex;
    flex-direction: column;
    gap: 12px;
    box-sizing: border-box;
}

.menu-container a, .menu-container button {
    display: block;
    width: 100%;          
    box-sizing: border-box;
    text-align: center;
    text-decoration: none;
    padding: 14px 20px;
    font-weight: bold;
    color: white;
    background: #007696;
    border: none;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

/* GRID FEATURES */
.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    padding: 40px 5%;
}

.feature {
    background: #ADD8E6; 
    padding: 30px;
    border-radius: 12px; 
    text-align: center; 
    transition: .4s;
}

.feature i { 
    font-size: 40px; 
    color: var(--dark-blue); 
    margin-bottom: 15px; 
}

.feature:hover { 
    transform: translateY(-10px); 
    box-shadow: 0 20px 25px rgba(0,0,0,.25); 
}

/* MEDIA GALLERY */
.gallery-section { 
    padding: 60px 5%; 
    text-align: center; 
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.gallery-item { 
    background: white; 
    padding: 10px; 
    border-radius: 8px; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.05); 
}

.gallery-item img { 
    width: 100%; 
    height: 250px; 
    object-fit: cover; 
    border-radius: 5px; 
}

/* FOOTER ARCHITECTURE */
.site-footer {
    background-color: #0d1117; 
    color: #e6edf3;
    padding: 60px 0 20px 0;
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

.footer-wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    gap: 30px;
}

.footer-col {
    flex: 1; 
    min-width: 250px; 
}

.footer-title {
    color: #ffffff;
    font-size: 1.3rem;
    margin-bottom: 25px;
    font-weight: 600;
    position: relative;
}

.footer-title::after {
    content: "";
    display: block;
    width: 45px;
    height: 3px;
    background: #20a366;
    margin-top: 10px;
}

.footer-col p {
    line-height: 1.7;
    font-size: 14px;
    color: #8b949e;
}

.footer-col ul { 
    list-style: none; 
    padding: 0; 
}

.footer-col ul li { 
    margin-bottom: 12px; 
}

.footer-col ul li a {
    color: #8b949e;
    text-decoration: none;
    transition: color 0.3s, transform 0.3s;
    display: inline-block;
}

.footer-col ul li a:hover {
    color: #20a366;
    transform: translateX(5px);
}

.contact-box p {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.contact-box i {
    color: #20a366;
    font-size: 16px;
}

.footer-bottom-bar {
    text-align: center;
    margin-top: 40px;
    padding: 20px 0;
    border-top: 1px solid #30363d;
    font-size: 13px;
    color: #7d8590;
}

.social-icons {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.social-icons a {
    width: 35px;
    height: 35px;
    background: #30363d;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: white;
    transition: 0.3s;
    text-decoration: none;
}

.social-icons a:hover {
    background: #20a366;
}

/* ==========================================================================
   MENUS EFFECTS & ANIMATIONS (NEW ADDITIONS)
   ========================================================================== */

/* 1. Animated Sliding Underline for Top Navigation Menu */
nav ul li a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-green);
    transform: scaleX(0); /* Hidden by default */
    transform-origin: bottom right;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

nav ul li a:hover {
    color: var(--primary-green);
    background: #f8fafc;
}

nav ul li a:hover::after {
    transform: scaleX(1); /* Smoothly slides underline line across */
    transform-origin: bottom left;
}

/* 2. Interactive Sliding Glow Glow Effect for Sidebar/Hero Buttons */
.hero-btn:hover { 
    transform: translateX(-8px); /* Shifts button left elegantly */
    background: var(--primary-green); 
    border-left-color: #0b5934;
    box-shadow: 0 6px 15px rgba(32, 163, 102, 0.3);
}

/* 3. Scale & Lift Animation for Portal Management Grid Links */
.menu-container a:hover, .menu-container button:hover {
    background: #005f7a !important;
    transform: translateY(-2px); /* Slight lift effect */
    box-shadow: 0 6px 15px rgba(0, 118, 150, 0.25);
}

.menu-container a:active, .menu-container button:active {
    transform: translateY(1px); /* Tactile feedback push-down effect when clicked */
}

/* ==========================================================================
   GLOBAL MEDIA QUERIES (HANDLES SMOOTH RENDERING ON ALL PHONES & TABLETS)
   ========================================================================== */
@media screen and (max-width: 768px) {
    .top-info-bar {
        flex-direction: column;
        text-align: center;
        align-items: center;
        padding: 10px;
    }

    .header-main {
        flex-direction: column;
        text-align: center;
        justify-content: center;
        padding: 20px 15px;
    }
    
    .logo-area {
        flex-direction: column;
        gap: 10px;
    }

    .logo-area h1 {
        font-size: 24px !important;
        text-align: center;
    }

    nav ul {
        flex-direction: row;
        justify-content: center;
        gap: 5px;
    }

    nav ul li a {
        padding: 12px 10px;
        font-size: 12px;
    }

    .hero {
        height: auto;
        min-height: 400px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 40px 20px;
    }

    .hero-overlay-buttons {
        position: relative;
        right: auto;
        top: auto;
        transform: none;
        margin: 20px auto 0 auto;
        width: 100%;
        max-width: 100%;
    }
    
    /* Disable tracking slide movements on mobile viewports for cleaner usage */
    .hero-btn:hover {
        transform: none;
    }
}