/*
Theme Name: Dynamic Business Theme
Author: Ravi Rai
Description: A modern professional school/institution theme.
Version: 4.0
*/

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary: #1e3a8a;
  --primary-light: #3b82f6;
  --accent: #f59e0b;
  --dark: #0f172a;
  --slate: #334155;
  --gray-bg: #f8fafc;
  --gray-text: #64748b;
  --white: #ffffff;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    line-height: 1.7;
    background: var(--white);
    overflow-x: hidden;
}
a { text-decoration: none; color: var(--primary); transition: 0.3s; }
a:hover { color: var(--accent); }
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ============================================================
   TOP BAR
   ============================================================ */
.top-bar { background: var(--dark); color: var(--white); padding: 10px 0; font-size: 14px; }
.top-bar .container { display: flex; justify-content: space-between; align-items: center; }
.top-bar .contact-info span { margin-right: 20px; display: inline-flex; align-items: center; gap: 6px; }
.top-bar .dashicons { font-size: 16px; color: var(--accent); }
.top-bar .social-icons a { color: var(--white); margin-left: 15px; opacity: 0.8; }
.top-bar .social-icons a:hover { opacity: 1; color: var(--accent); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 999;
}
.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}
.logo img { max-height: 70px; width: auto; }
.logo h1 { font-size: 24px; font-weight: 800; color: var(--primary); }

/* ============================================================
   DESKTOP NAVIGATION
   ============================================================ */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    position: relative;
}
.main-nav ul li { position: relative; }
.main-nav a {
    color: var(--slate);
    font-weight: 600;
    font-size: 15px;
    padding: 10px 0;
    display: block;
    transition: color 0.3s;
}
.main-nav a:hover { color: var(--primary); }

/* ── Desktop Dropdown ── */
.main-nav ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 210px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    border-radius: 8px;
    padding: 10px;
    flex-direction: column;
    gap: 2px;
    z-index: 9999;
    border-top: 3px solid var(--accent);
}
.main-nav ul li:hover > ul { display: flex; }
.main-nav ul ul li { width: 100%; }
.main-nav ul ul a {
    padding: 10px 14px;
    border-radius: 5px;
    color: var(--slate);
    font-size: 14px;
    font-weight: 500;
    display: block;
}
.main-nav ul ul a:hover {
    background: var(--gray-bg);
    color: var(--primary);
    padding-left: 18px;
}

/* ── Dropdown Arrow (Desktop) ── */
.main-nav .menu-item-has-children > a::after {
    content: '\f347';
    font-family: 'Dashicons';
    margin-left: 5px;
    font-size: 14px;
    vertical-align: middle;
}

/* ============================================================
   HAMBURGER BUTTON
   ============================================================ */
.menu-toggle {
    display: none;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 9px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    z-index: 1001;
    position: relative;
}
.menu-toggle .dashicons { font-size: 20px; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    transition: 0.3s;
    border: none;
    cursor: pointer;
}
.btn:hover { background: var(--accent); color: var(--white); transform: translateY(-2px); }
.btn-accent { background: var(--accent); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    color: var(--white);
    background-size: cover;
    background-position: center;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15,23,42,0.9) 0%, rgba(30,58,138,0.8) 100%);
}
.hero-content { position: relative; z-index: 2; max-width: 700px; padding: 40px; }
.hero-content h1 { font-size: 3.2rem; font-weight: 800; margin-bottom: 20px; line-height: 1.2; }
.hero-content p { font-size: 1.1rem; margin-bottom: 30px; opacity: 0.9; }

/* ============================================================
   SECTIONS
   ============================================================ */
section { padding: 70px 0; }
.bg-gray { background: var(--gray-bg); }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 2.2rem; font-weight: 800; color: var(--dark); }
.section-title h2 span { color: var(--primary); position: relative; }
.section-title h2 span::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background: var(--accent);
    margin: 8px auto 0;
    border-radius: 2px;
}
.section-title p { color: var(--gray-text); max-width: 600px; margin: 15px auto 0; }

/* ── Welcome & Notices ── */
.grid-2col { display: grid; grid-template-columns: 1.5fr 1fr; gap: 40px; align-items: start; }
.welcome-text h2 { font-size: 2rem; margin-bottom: 20px; color: var(--dark); }
.welcome-text h2 span { color: var(--primary); }
.welcome-text p { color: var(--gray-text); margin-bottom: 20px; }
.feature-list { list-style: none; }
.feature-list li { display: flex; align-items: start; gap: 15px; margin-bottom: 15px; font-weight: 500; color: var(--slate); }
.feature-list .dashicons { color: var(--primary); font-size: 24px; width: 24px; height: 24px; }

.notices-board {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    border-top: 4px solid var(--accent);
}
.notices-board h3 {
    margin-bottom: 20px;
    color: var(--primary);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.notices-board ul { list-style: none; }
.notices-board li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
}
.notices-board li:last-child { border-bottom: none; }
.notices-board .dashicons { color: var(--accent); }
.notices-board a { color: var(--slate); font-weight: 500; font-size: 15px; }

/* ── About Section ── */
.about-section .grid-2col { grid-template-columns: 1fr 1fr; align-items: center; }
.about-img img { width: 100%; border-radius: 8px; box-shadow: var(--shadow-hover); }
.about-content h2 { font-size: 2rem; margin-bottom: 20px; }
.about-content p { color: var(--gray-text); margin-bottom: 25px; }

/* ── Grid 3col ── */
.grid-3col { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }

/* ── Team Cards ── */
.team-card {
    text-align: center;
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: 0.3s;
}
.team-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-hover); }
.team-card img {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 20px;
    border: 4px solid var(--primary);
}
.team-card h3 { font-size: 1.3rem; margin-bottom: 5px; }
.team-role { color: var(--accent); font-weight: 600; display: block; margin-bottom: 10px; }
.team-content { color: var(--gray-text); font-size: 0.95rem; }

/* ── Facility Cards ── */
.facility-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    text-align: center;
    transition: 0.3s;
}
.facility-card:hover { transform: translateY(-5px); }
.facility-card img { width: 100%; height: 220px; object-fit: cover; }
.facility-card h3 { padding: 20px; color: var(--dark); }

/* ── Gallery ── */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.gallery-item { overflow: hidden; border-radius: 8px; box-shadow: var(--shadow); height: 250px; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.gallery-item:hover img { transform: scale(1.1); }

/* ── Stats Band ── */
.stats-band { background: var(--primary); color: #fff; padding: 50px 0; text-align: center; }
.stat-item h3 { font-size: 2.8rem; font-weight: 800; color: var(--accent); margin-bottom: 5px; }
.stat-item p { font-size: 1.1rem; opacity: 0.9; text-transform: uppercase; letter-spacing: 1px; }

/* ── Pages ── */
.page-header { background: var(--primary); color: var(--white); padding: 50px 0; text-align: center; }
.page-header h1 { font-size: 2.5rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; }
.contact-info-box { background: var(--dark); color: var(--white); padding: 40px; border-radius: 8px; }
.contact-info-box h3 { margin-bottom: 20px; color: var(--white); }
.contact-info-box p { margin-bottom: 20px; color: #d1d5db; display: flex; gap: 10px; align-items: center; }
.contact-info-box .dashicons { color: var(--accent); }
.contact-map { border-radius: 8px; overflow: hidden; box-shadow: var(--shadow); min-height: 450px; }
.contact-map iframe { width: 100%; height: 100%; border: 0; }

/* ============================================================
   FOOTER — COMPLETE
   ============================================================ */

.site-footer {
    background: var(--dark);
    color: #9ca3af;
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

/* ── Footer Logo Fix ── */
.footer-about .footer-logo {
    display: block;
    margin-bottom: 18px;
    line-height: 0;
}

.footer-about .footer-logo img,
.footer-about .footer-logo-img,
.footer-about .custom-logo-link img,
.footer-about img {
    display: block !important;
    width: auto !important;
    max-width: 180px !important;
    max-height: 80px !important;
    height: auto !important;
    object-fit: contain;
    object-position: left center;
    background-color: #ffffff;
    padding: 8px 14px;
    border-radius: 10px;
    box-shadow: 0 2px 14px rgba(0, 0, 0, 0.35);
    filter: none !important;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.footer-about .footer-logo img:hover,
.footer-about .custom-logo-link img:hover {
    opacity: 0.88;
    transform: translateY(-1px);
}

.footer-site-name {
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 16px;
    letter-spacing: 0.5px;
}

.footer-about p {
    margin-top: 0;
    line-height: 1.85;
    color: #9ca3af;
    font-size: 14px;
}

/* ── Footer Headings ── */
.site-footer h3,
.footer-heading {
    color: var(--white);
    margin-bottom: 22px;
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding-bottom: 12px;
    position: relative;
}

.site-footer h3::after,
.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

/* ── Footer Links ── */
.footer-links ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links ul li { margin-bottom: 11px; }

.footer-links a {
    color: #9ca3af;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: color 0.2s ease, padding-left 0.2s ease;
    text-decoration: none;
}

.footer-links a::before {
    content: '›';
    color: var(--accent);
    font-size: 17px;
    line-height: 1;
    flex-shrink: 0;
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 5px;
}

/* ── Footer Contact ── */
.footer-contact p {
    margin-bottom: 14px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 14px;
    line-height: 1.65;
    color: #9ca3af;
}

.footer-contact a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-contact a:hover { color: var(--accent); }

.footer-contact .dashicons,
.footer-icon {
    color: var(--accent);
    font-size: 18px !important;
    flex-shrink: 0;
    margin-top: 2px;
    width: 20px;
    height: 20px;
}

/* ── Copyright ── */
.footer-copyright {
    text-align: center;
    border-top: 1px solid #1f2937;
    padding: 20px 0;
    font-size: 13px;
    color: #6b7280;
}

.footer-copyright p { margin: 0; }

/* ============================================================
   RESPONSIVE — DESKTOP (max 992px)
   ============================================================ */
@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
    .about-section .grid-2col { grid-template-columns: 1fr; }
}

/* ============================================================
   RESPONSIVE — TABLET & MOBILE (max 768px)
   ============================================================ */
@media (max-width: 768px) {

    /* Top bar stack */
    .top-bar .container { flex-direction: column; gap: 10px; text-align: center; }

    /* Hero */
    .hero-content h1 { font-size: 2rem; }

    /* Grids collapse */
    .grid-2col,
    .grid-3col,
    .contact-grid { grid-template-columns: 1fr; }

    /* Header flex wrap */
    .site-header .container {
        flex-wrap: wrap;
        position: relative;
        padding: 12px 20px;
    }

    /* Show hamburger */
    .menu-toggle { display: flex; }

    /* ── Full-screen overlay nav ── */
    .main-nav {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(15, 23, 42, 0.97);
        z-index: 9999;
        overflow-y: auto;
        padding: 70px 0 40px;
        flex-direction: column;
    }

    .main-nav.active { display: block; }

    /* ── X close button inside overlay ── */
    .main-nav::before {
        content: '✕';
        position: fixed;
        top: 18px;
        right: 22px;
        color: var(--white);
        font-size: 20px;
        cursor: pointer;
        z-index: 10000;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        line-height: 1;
    }

    /* ── Nav list ── */
    .main-nav ul {
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding: 0 20px;
        list-style: none;
    }

    .main-nav ul li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .main-nav ul li:first-child {
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    /* ── Top-level links ── */
    .main-nav ul > li > a {
        color: var(--white) !important;
        font-size: 16px;
        font-weight: 600;
        padding: 16px 5px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
    }

    .main-nav ul > li > a:hover { color: var(--accent) !important; }

    /* ── Dropdown arrow on mobile ── */
    .main-nav .menu-item-has-children > a::after {
        content: '\f347';
        font-family: 'Dashicons';
        font-size: 18px;
        color: var(--accent);
        margin-left: auto;
        transition: transform 0.3s ease;
    }

    /* Rotate arrow when open */
    .main-nav .menu-item-has-children.open > a::after {
        transform: rotate(180deg);
    }

    /* ── Submenu — hidden by default on mobile ── */
    .main-nav ul ul {
        display: none !important;
        position: static !important;
        box-shadow: none !important;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        padding: 5px 0 10px 15px !important;
        border-top: none !important;
        border-left: 2px solid var(--accent);
        margin: 0 0 10px 10px;
        flex-direction: column;
        gap: 0;
        min-width: unset;
    }

    /* Show submenu only when parent has .open */
    .main-nav .menu-item-has-children.open > ul {
        display: flex !important;
    }

    /* Disable desktop hover for mobile */
    .main-nav ul li:hover > ul { display: none !important; }
    .main-nav .menu-item-has-children.open > ul { display: flex !important; }

    /* ── Submenu links ── */
    .main-nav ul ul li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        width: 100%;
    }

    .main-nav ul ul li:last-child { border-bottom: none; }

    .main-nav ul ul a {
        color: #d1d5db !important;
        font-size: 14px !important;
        padding: 12px 10px !important;
        display: block;
        background: transparent !important;
        border-radius: 0;
        font-weight: 400;
    }

    .main-nav ul ul a:hover {
        color: var(--accent) !important;
        padding-left: 16px !important;
    }
}

/* ============================================================
   RESPONSIVE — SMALL MOBILE (max 600px)
   ============================================================ */
@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; gap: 28px; }

    .footer-about .footer-logo img,
    .footer-about .custom-logo-link img {
        max-width: 150px !important;
    }
}