/* ============================================================
   layout.css — Header & Footer layout styles
   Faculty of Pharmacy | QIU
   ============================================================ */

/* ── SHARED CSS VARIABLES ── */
:root {
    --ui-brand: #125875;
    --ui-accent: #0dcaf0;
    --ui-ink: #0b1f2a;
    --ui-muted: #e8f6ff;
    --ui-border: rgba(255, 255, 255, .18);
    --ui-radius: 16px;
    --ui-shadow: 0 16px 44px rgba(13, 25, 38, .12);

    --fx-brand: #125875;
    --fx-accent: #0dcaf0;
    --fx-deep: #0b2f3d;
    --fx-ink: #0b1f2a;
    --fx-muted: rgba(255, 255, 255, .78);
    --fx-muted2: rgba(255, 255, 255, .62);
    --fx-border: rgba(255, 255, 255, .18);
    --fx-radius: 22px;
    --fx-shadow: 0 20px 60px rgba(0, 0, 0, .22);
    --fx-shadow-soft: 0 10px 26px rgba(0, 0, 0, .18);
}

/* ============================================================
   HEADER STYLES
   ============================================================ */

/* TOP BAR */
.nx-topbar {
    background: var(--ui-brand);
    color: #fff;
    border-bottom: 1px solid rgba(255, 255, 255, .18);
}

.nx-topbar .nx-topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    font-weight: 850;
}

.nx-topbar a { color: #fff; text-decoration: none; font-weight: 950; }
.nx-topbar a:hover { text-decoration: underline; }

.nx-social {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.nx-social a {
    width: 34px;
    height: 34px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .20);
    color: #fff;
    text-decoration: none !important;
    transition: transform .15s ease, background .15s ease;
}

.nx-social a:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .20); }

.nx-portals {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nx-pill {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .5rem .85rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .22);
    color: #fff;
    text-decoration: none !important;
    font-weight: 950;
    white-space: nowrap;
}

/* MAIN STICKY HEADER */
.nx-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(18, 88, 117, .10);
}

.nx-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 0;
}

.nx-logo img { height: 44px; width: auto; }

/* Desktop menu */
.nx-menu nav ul { margin: 0; padding: 0; list-style: none; }
.nx-menu nav ul li { display: inline-block; position: relative; }

.nx-menu nav ul li a {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .6rem .9rem;
    border-radius: 14px;
    color: var(--ui-ink);
    font-weight: 950;
    text-decoration: none !important;
    transition: background .15s ease, color .15s ease;
}

.nx-menu nav ul li a:hover {
    background: rgba(18, 88, 117, .08);
    color: var(--ui-brand);
}

.nx-menu nav ul li ul {
    position: absolute;
    top: calc(100% + 10px);
    min-width: 220px;
    background: #fff;
    border: 1px solid rgba(18, 88, 117, .14);
    border-radius: 18px;
    box-shadow: var(--ui-shadow);
    padding: 10px;
    display: none;
}

.nx-menu nav ul li:hover > ul { display: block; }
.nx-menu nav ul li ul li { display: block; }

.nx-menu nav ul li ul li a {
    width: 100%;
    justify-content: flex-start;
    padding: .6rem .75rem;
    border-radius: 14px;
}

/* Mobile: show meanmenu output; hide desktop menu only */
@media (max-width: 991px) {
    .nx-menu { display: none; }
    .nx-logo img { height: 42px; }
    .nx-topbar { display: none; }
}

/* Meanmenu */
.mobile-menu { display: block; }
.mean-container { width: 100%; }

.mean-container .mean-bar {
    background: transparent !important;
    padding: 0 !important;
    min-height: 44px;
}

.mean-container a.meanmenu-reveal {
    background: rgba(18, 88, 117, .10) !important;
    border: 1px solid rgba(18, 88, 117, .16) !important;
    border-radius: 14px;
    color: var(--ui-brand) !important;
    top: 8px !important;
    right: 0 !important;
    left: auto !important;
}

.mean-container .mean-nav {
    margin-top: 12px !important;
    background: #fff !important;
    border: 1px solid rgba(18, 88, 117, .14) !important;
    border-radius: 18px;
    box-shadow: var(--ui-shadow);
    overflow: hidden;
}

.mean-container .mean-nav ul li a {
    color: #0b1f2a !important;
    font-weight: 950 !important;
    padding: 12px 14px !important;
    border-top: 1px solid rgba(18, 88, 117, .10) !important;
}

.mean-container .mean-nav ul li a:hover {
    background: rgba(18, 88, 117, .06) !important;
    color: var(--ui-brand) !important;
}

.mean-container .mean-nav ul li a.mean-expand {
    height: 44px !important;
    width: 48px !important;
    border-left: 1px solid rgba(18, 88, 117, .10) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* RTL adjustments — header */
[dir="rtl"] .nx-topbar .nx-topbar-inner { flex-direction: row-reverse; }
[dir="rtl"] .nx-nav { flex-direction: row-reverse; }
[dir="rtl"] .nx-menu nav ul li ul { right: 0; left: auto; }

[dir="rtl"] .mean-container a.meanmenu-reveal {
    left: 0 !important;
    right: auto !important;
}

[dir="rtl"] .mean-container .mean-nav ul li a.mean-expand {
    border-left: none !important;
    border-right: 1px solid rgba(18, 88, 117, .10) !important;
}

/* ============================================================
   FOOTER STYLES
   ============================================================ */

.fx-footer {
    background: var(--fx-deep);
    color: #fff;
}

/* Top CTA band */
.fx-cta {
    background:
            radial-gradient(900px 420px at 10% 10%, rgba(13, 202, 240, .18), transparent 60%),
            radial-gradient(900px 420px at 90% 20%, rgba(255, 255, 255, .08), transparent 60%),
            linear-gradient(180deg, var(--fx-brand), #0d4f68);
    border-bottom: 1px solid rgba(255, 255, 255, .12);
    padding: 22px 0;
}

.fx-cta-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.fx-cta-title {
    margin: 0;
    font-weight: 950;
    letter-spacing: -.01em;
    font-size: clamp(16px, 1.6vw, 22px);
    line-height: 1.35;
}

.fx-cta-sub {
    margin: 6px 0 0;
    color: rgba(255, 255, 255, .78);
    font-weight: 850;
}

.fx-cta-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.fx-btn {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    padding: .75rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .12);
    color: #fff;
    font-weight: 950;
    text-decoration: none !important;
    transition: transform .15s ease, background .15s ease;
    white-space: nowrap;
}

.fx-btn:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .18); }

.fx-btn.alt {
    border-color: rgba(13, 202, 240, .38);
    background: rgba(13, 202, 240, .16);
}

/* Main footer */
.fx-main {
    padding: 56px 0 34px;
    background:
            radial-gradient(1000px 520px at 15% 0%, rgba(13, 202, 240, .10), transparent 60%),
            radial-gradient(900px 480px at 90% 10%, rgba(255, 255, 255, .06), transparent 60%),
            linear-gradient(180deg, rgba(11, 47, 61, 1) 0%, rgba(2, 32, 44, 1) 100%);
}

.fx-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 22px;
}

@media (min-width: 992px) {
    .fx-grid { grid-template-columns: 1.2fr 1fr 1fr 1.15fr; }
}

.fx-col h4 {
    margin: 0 0 12px;
    font-weight: 950;
    letter-spacing: -.01em;
    font-size: 1.06rem;
    display: flex;
    align-items: center;
    gap: .6rem;
}

.fx-col h4 i { color: var(--fx-accent); }

.fx-about {
    color: var(--fx-muted);
    line-height: 1.9;
    text-align: justify;
    text-justify: inter-word;
    margin: 0;
}

.fx-social {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.fx-social a {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .10);
    border: 1px solid rgba(255, 255, 255, .16);
    color: #fff;
    text-decoration: none !important;
    transition: transform .15s ease, background .15s ease;
}

.fx-social a:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .14); }

.fx-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fx-list a {
    color: rgba(255, 255, 255, .86);
    text-decoration: none !important;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    transition: transform .15s ease, color .15s ease;
}

.fx-list a:hover { transform: translateX(2px); color: #fff; }
[dir="rtl"] .fx-list a:hover { transform: translateX(-2px); }

.fx-list i {
    color: rgba(13, 202, 240, .95);
    font-size: .9rem;
}

.fx-contact {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fx-contact li {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    color: rgba(255, 255, 255, .86);
    font-weight: 850;
    line-height: 1.7;
}

.fx-contact i { color: var(--fx-accent); margin-top: 2px; }
.fx-contact a { color: #fff; font-weight: 950; text-decoration: none !important; }
.fx-contact a:hover { text-decoration: underline !important; }
.fx-contact .muted { color: var(--fx-muted2); font-weight: 850; }

/* Bottom bar */
.fx-bottom {
    border-top: 1px solid rgba(255, 255, 255, .12);
    background: #02202c;
    padding: 16px 0;
}

.fx-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.fx-logo img {
    height: 36px;
    width: auto;
    filter: grayscale(100%);
    opacity: .95;
}

.fx-copy {
    color: rgba(255, 255, 255, .74);
    font-weight: 850;
}

/* RTL tweaks — footer */
[dir="rtl"] .fx-cta-inner { flex-direction: row-reverse; }
[dir="rtl"] .fx-bottom-inner { flex-direction: row-reverse; }
[dir="rtl"] .fx-col h4 { flex-direction: row-reverse; }
[dir="rtl"] .fx-contact li { flex-direction: row-reverse; text-align: right; }
[dir="rtl"] .fx-about { text-align: justify; }

/* ============================================================
   PAGE-SPECIFIC STYLES — Gallery, Resources, Undergraduate
   ============================================================ */

/* Shared page hero (gallery, resources, undergraduate) */
.gal-hero,
.res-hero,
.ug-hero {
    background: linear-gradient(135deg, #125875 0%, #0d4f68 100%);
    padding: 36px 0 32px;
    color: #fff;
}

.gal-breadcrumb,
.res-breadcrumb,
.ug-breadcrumb {
    background: transparent;
    padding: 0;
    margin-bottom: 12px;
}

.gal-breadcrumb .breadcrumb-item a,
.res-breadcrumb .breadcrumb-item a,
.ug-breadcrumb .breadcrumb-item a {
    color: rgba(255, 255, 255, .80);
    text-decoration: none;
}

.gal-breadcrumb .breadcrumb-item.active,
.res-breadcrumb .breadcrumb-item.active,
.ug-breadcrumb .breadcrumb-item.active {
    color: rgba(255, 255, 255, .60);
}

.gal-breadcrumb .breadcrumb-item + .breadcrumb-item::before,
.res-breadcrumb .breadcrumb-item + .breadcrumb-item::before,
.ug-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, .50);
}

.gal-title,
.res-title,
.ug-title {
    font-size: clamp(22px, 2.4vw, 36px);
    font-weight: 950;
    letter-spacing: -0.02em;
    margin: 0 0 10px;
    color: #fff;
    line-height: 1.15;
}

.gal-sub,
.res-sub,
.ug-sub {
    font-size: 15px;
    color: rgba(255, 255, 255, .82);
    font-weight: 650;
    line-height: 1.85;
    max-width: 76ch;
    margin: 0;
}

/* Gallery listing grid */
.gal-item {
    display: block;
    text-decoration: none !important;
    border-radius: 12px;
    overflow: hidden;
    transition: transform .14s ease, box-shadow .14s ease;
}

.gal-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 40px rgba(11, 18, 32, .12);
}

.gal-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.gal-label {
    font-size: 14px;
    font-weight: 800;
    color: #0b1220;
    margin: 8px 0 0;
    line-height: 1.35;
}

/* Resources service title */
.res-service-title {
    font-size: 1rem;
    font-weight: 900;
    margin: 0 0 6px;
}

.res-service-desc {
    font-size: 13px;
    color: rgba(55, 65, 81, .82);
    line-height: 1.75;
    margin-bottom: 8px;
}

/* Undergraduate cards */
.ug-card {
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(11, 18, 32, .10);
    transition: transform .14s ease, box-shadow .14s ease;
    text-align: center;
    margin-bottom: 0;
}

.ug-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 50px rgba(11, 18, 32, .14);
}

.ug-card-img {
    width: 100%;
    clip-path: polygon(0 0, 0 100%, 100% 85%, 100% 0%);
    display: block;
    max-height: 220px;
    object-fit: cover;
}

.ug-card-body {
    padding: 0 1.25rem 1.5rem;
}

.ug-code {
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #125875;
    margin: 12px 0 6px;
}

.ug-card-title {
    font-size: 1.05rem;
    font-weight: 900;
    color: #0b1220;
    margin: 0 0 14px;
    line-height: 1.35;
}

.ug-btn {
    display: inline-block;
    padding: .5em 1.4em;
    background-color: #125875;
    color: #fff;
    border-radius: 8px;
    text-decoration: none !important;
    font-weight: 900;
    font-size: .9rem;
    transition: background .15s ease;
}

.ug-btn:hover {
    background-color: #1eb4e9;
    color: #fff;
}
