/*
 * responsive.css – The Nigerian Educator
 * Self-contained responsive layer — no conflicts with legacy style.css
 */

/* ============================================================
   0. GLOBAL RESETS
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
img { max-width: 100%; height: auto; }
body { overflow-x: hidden; }

/* ============================================================
   1. NEW NAVBAR  (#tne-nav)
   ============================================================ */

/* ── Wrapper ── */
#tne-nav {
    position: relative;
    background: #fff;
    border-bottom: 1px solid #e8e8e8;
    z-index: 999;
}

/* ── Top bar: logo | links | hamburger ── */
.tne-nav-bar {
    display: flex;
    align-items: center;
    padding: 0 40px;
    min-height: 76px;
    gap: 24px;
}

/* ── Logo ── */
.tne-nav-logo {
    flex-shrink: 0;
}
.tne-nav-logo img {
    display: block;
    height: 46px;      /* logo2.png is 350×34 px (≈10:1 ratio); 46px gives natural weight in 76px navbar */
    width: auto;
    max-width: 340px;
}

/* ── Desktop nav links ── */
.tne-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;  /* push to right */
}
.tne-nav-links a {
    display: inline-block;
    padding: 8px 14px;
    color: #0b104a;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: .4px;
    text-decoration: none;
    border-radius: 3px;
    transition: color .2s, background .2s;
}
.tne-nav-links a:hover { color: #525fe1; background: #f5f6ff; }

/* Submission CTA in desktop nav */
.tne-nav-links .tne-nav-cta {
    background: #525fe1;
    color: #fff !important;
    padding: 9px 22px;
    border-radius: 4px;
    margin-left: 6px;
}
.tne-nav-links .tne-nav-cta:hover { background: #f26b65; color: #fff !important; }

/* ── Hamburger button ── */
.tne-ham {
    display: none;          /* hidden on desktop */
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 6px;
    margin-left: auto;      /* on mobile: pushes to the far right */
    flex-shrink: 0;
    z-index: 1100;
}
.tne-ham span {
    display: block;
    width: 26px;
    height: 3px;
    background: #0b104a;
    border-radius: 3px;
    transition: transform .3s ease, opacity .3s ease;
}
/* Animated X when open */
.tne-ham.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.tne-ham.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.tne-ham.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ── Mobile drawer (slide-down menu) ── */
.tne-drawer {
    display: none;          /* collapsed by default */
    flex-direction: column;
    background: #fff;
    border-top: 3px solid #525fe1;
    box-shadow: 0 8px 28px rgba(0,0,0,.12);
}
.tne-drawer.open { display: flex; }

.tne-drawer a {
    display: block;
    padding: 15px 24px;
    color: #0b104a;
    font-weight: 600;
    font-size: 15px;
    text-transform: uppercase;
    letter-spacing: .4px;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background .2s, color .2s;
}
.tne-drawer a:hover { background: #f5f6ff; color: #525fe1; }
.tne-drawer .tne-drawer-cta {
    color: #525fe1;
    font-weight: 700;
    border-bottom: none;
}
.tne-drawer .tne-drawer-cta:hover { background: #525fe1; color: #fff; }

/* ── Mobile breakpoint for the navbar ── */
@media only screen and (max-width: 991px) {
    .tne-nav-bar {
        padding: 0 20px;
        min-height: 64px;
        gap: 0;              /* logo + ham share the row */
    }

    /* Logo: takes all available space, pushes ham to the right */
    .tne-nav-logo {
        flex: 1;             /* fills remaining width */
    }
    .tne-nav-logo img {
        width: 100%;         /* fills the flex container */
        height: auto;
        max-height: 48px;
        max-width: 280px;
        object-fit: contain;
        object-position: left center;
    }

    /* Hide desktop links */
    .tne-nav-links { display: none; }

    /* Show hamburger */
    .tne-ham { display: flex; }
}

@media only screen and (max-width: 576px) {
    .tne-nav-bar { padding: 0 14px; min-height: 58px; }
    .tne-nav-logo img { max-height: 42px; max-width: 220px; }
    .tne-ham span { width: 24px; }
}

/* ── Suppress old nav that no longer exists (safety rule) ── */
#navigation, .mobile_menu, .nav-hamburger, #sm_menu_ham { display: none !important; }

/* ============================================================
   2. HERO SECTION (.tne-hero)
   ============================================================ */
@media only screen and (max-width: 991px) {
    .tne-hero {
        min-height: 520px !important;
        background-position: 70% center !important;
    }
}

/* ── Mobile hero: semi-opaque blur overlay so text pops ── */
@media only screen and (max-width: 768px) {
    .tne-hero { min-height: auto !important; position: relative !important; }

    /* Dark veil with subtle blur laid over the background photo */
    .tne-hero::before {
        content: '';
        position: absolute;
        inset: 0;
        background: rgba(5, 10, 45, 0.60);
        -webkit-backdrop-filter: blur(4px);
        backdrop-filter: blur(4px);
        z-index: 1;
        pointer-events: none;
    }

    /* Lift all hero children above the overlay */
    .tne-hero > * {
        position: relative;
        z-index: 2;
    }
}

@media only screen and (max-width: 576px) {
    .tne-hero .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    /* Slightly stronger veil on smallest screens */
    .tne-hero::before {
        background: rgba(5, 10, 45, 0.70);
        -webkit-backdrop-filter: blur(5px);
        backdrop-filter: blur(5px);
    }

    /* Stack CTA buttons */
    .tne-hero [style*="display:flex"][style*="flex-wrap:wrap"] {
        flex-direction: column;
        gap: 10px !important;
    }
    .tne-hero [style*="display:flex"][style*="flex-wrap:wrap"] a {
        text-align: center;
        justify-content: center;
    }
}

/* ============================================================
   3. JOURNAL ARTICLES sidebar toggle
   ============================================================ */

/* Sidebar toggle button (mobile only) */
.sidebar-toggle-btn {
    display: none;
    width: 100%;
    background: #525fe1;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 18px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    margin-bottom: 0;
    text-align: left;
    align-items: center;
    gap: 10px;
}
.sidebar-toggle-btn .fa-chevron-down {
    margin-left: auto;
    transition: transform .3s;
}
.sidebar-toggle-btn.open .fa-chevron-down {
    transform: rotate(180deg);
}

@media only screen and (max-width: 991px) {
    /* Show toggle, hide inner content until toggled */
    .sidebar-toggle-btn { display: flex; }
    .journal-sidebar .sidebar-collapsible { display: none; }
    .journal-sidebar .sidebar-collapsible.open { display: block; }
    .journal-sidebar { margin-bottom: 16px !important; position: static !important; }

    /* Make sidebar and content full-width */
    .journal-section .col-lg-3,
    .journal-section .col-md-4 { width: 100% !important; max-width: 100% !important; flex: 0 0 100%; }
    .journal-section .col-lg-9,
    .journal-section .col-md-8 { width: 100% !important; max-width: 100% !important; flex: 0 0 100%; }

    /* Article detail sidebar goes below on mobile */
    .article-detail-section .col-lg-4,
    .article-detail-section .col-md-5 { width: 100% !important; max-width: 100% !important; flex: 0 0 100%; order: 2; margin-top: 28px; }
    .article-detail-section .col-lg-8,
    .article-detail-section .col-md-7 { width: 100% !important; max-width: 100% !important; flex: 0 0 100%; order: 1; }
    .article-sidebar { position: static !important; top: auto !important; }

    .journal-section { padding: 24px 0 !important; }
    .section-padding { padding: 50px 0 !important; }
}

@media only screen and (max-width: 768px) {
    .journal-section { padding: 16px 0 !important; }
    .article-meta { flex-wrap: wrap; gap: 6px 12px; }
    .article-meta span { font-size: 12px; }
    .article-actions { flex-wrap: wrap; gap: 8px; }
    .btn-article-detail,
    .btn-article-abstract { font-size: 13px; padding: 8px 14px; }
    .issue-header h3 { font-size: 1.1rem; }
    .article-title a { font-size: 1rem; }
    .article-main-block { padding: 22px 16px; }
    .article-meta-row { flex-wrap: wrap; gap: 8px; }
    .meta-item { font-size: 13px; }
    .article-main-title { font-size: 1.3rem; line-height: 1.4; }
    .article-nav-row { flex-direction: column; gap: 12px; }
    .article-nav-btn { width: 100%; }
    .share-row { flex-wrap: wrap; gap: 8px; }
    .share-btn { font-size: 12px; padding: 6px 12px; }
    .author-item { flex-direction: column; gap: 8px; }
    .related-grid { grid-template-columns: 1fr !important; }
}

@media only screen and (max-width: 576px) {
    .article-card { padding: 18px 14px; }
    .article-number { width: 28px; height: 28px; font-size: 12px; line-height: 28px; }
    .keywords-row { flex-wrap: wrap; gap: 4px; }
    .keyword-tag { font-size: 11px; padding: 3px 9px; }
    .default-prompt { padding: 40px 20px; }
    .default-prompt .prompt-icon { font-size: 2.5rem; }
    .article-main-block { padding: 16px 12px; }
    .citation-box { font-size: 13px; }
}

/* ============================================================
   4. TABLES – scrollable on mobile
   ============================================================ */
.tne-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e5e8f8;
    border-radius: 6px;
    margin-bottom: 20px;
}
.sj-tableourhistory { width: 100%; min-width: 340px; }

@media only screen and (max-width: 768px) {
    .sj-tableourhistory th,
    .sj-tableourhistory td { white-space: nowrap; font-size: 13px; padding: 10px 12px; }
    section table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; width: 100%; }
}

/* ============================================================
   5. FOOTER
   ============================================================ */
@media only screen and (max-width: 768px) {
    .footer.section-padding { padding: 50px 0 30px; }
    .single_footer { margin-bottom: 30px; }
    .foot_copy .footer_copyright p { font-size: 13px; text-align: center; }
}
@media only screen and (max-width: 576px) {
    .single_footer h4 { font-size: 16px; }
    .single_footer p { font-size: 14px; }
}

/* ============================================================
   6. CONTACT / ADDRESS
   ============================================================ */
@media only screen and (max-width: 768px) {
    .address_area .single_address { margin-bottom: 20px; padding: 24px 16px; }
}

/* ============================================================
   7. PAGE BANNER (section-top)
   ============================================================ */
@media only screen and (max-width: 768px) {
    .section-top { padding: 60px 0 !important; }
    .section-top-title h1 { font-size: 1.8rem !important; }
}
@media only screen and (max-width: 576px) {
    .section-top { padding: 44px 0 !important; }
    .section-top-title h1 { font-size: 1.5rem !important; }
}

/* ============================================================
   8. TYPOGRAPHY & SPACING
   ============================================================ */
@media only screen and (max-width: 768px) {
    .section-padding { padding: 50px 0; }
    .section-title { margin-bottom: 35px; }
    .section-title h2 { font-size: 28px; line-height: 36px; }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
}
@media only screen and (max-width: 576px) {
    .section-padding { padding: 36px 0; }
    .section-title h2 { font-size: 24px; line-height: 32px; }
    .container { padding-left: 16px; padding-right: 16px; }
}

/* ============================================================
   9. EDITORIAL TEAM
   ============================================================ */
@media only screen and (max-width: 576px) {
    .our-team { margin-bottom: 24px; }
    .team-prof h3 { font-size: 15px; }
}
