/* ============================================================
   IJMMHRD — International Journal Design System
   Prestigious Academic Aesthetic & Compact Layout System
   ============================================================ */

/* ── Google Fonts ─────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,500;0,600;0,700;0,800;1,600&display=swap');

/* ── CSS Variables ────────────────────────────────────────── */
:root {
    /* Prestigious Oxford Journal Palette */
    --primary: #0b1d3a;
    --primary-light: #18335c;
    --primary-dark: #050e1f;
    --accent: #0f766e;
    --accent-light: #149188;
    --accent-dark: #09524d;
    --gold: #c29b38;
    --gold-light: #dfb749;
    --gold-soft: #fbf6e9;

    /* Neutrals */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Status Colors */
    --success: #15803d;
    --success-bg: #f0fdf4;
    --warning: #b45309;
    --warning-bg: #fffbeb;
    --error: #b91c1c;
    --error-bg: #fef2f2;
    --info: #1d4ed8;
    --info-bg: #eff6ff;

    /* Typography */
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    /* Layout & Sizing */
    --container: 1320px;
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --border-color: rgba(11, 29, 58, 0.12);
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(11, 29, 58, 0.05);
    --shadow: 0 3px 10px rgba(11, 29, 58, 0.07), 0 1px 4px rgba(11, 29, 58, 0.04);
    --shadow-md: 0 8px 20px rgba(11, 29, 58, 0.09), 0 3px 8px rgba(11, 29, 58, 0.05);
    --shadow-lg: 0 16px 36px rgba(11, 29, 58, 0.14), 0 6px 14px rgba(11, 29, 58, 0.07);

    /* Transitions */
    --transition: 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ─────────────────────────────────────────── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 17px;
}

body {
    font-family: var(--font-body);
    color: var(--gray-800);
    background-color: var(--gray-50);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--accent-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary);
    line-height: 1.25;
    margin-bottom: 0.4em;
    font-weight: 700;
    text-wrap: balance;
}

h1 { font-size: 2.45rem; }
h2 { font-size: 1.95rem; }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.2rem; }

p {
    font-size: 1.025rem;
    text-wrap: pretty;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--primary);
    text-align: center;
    margin-bottom: 1.65rem;
    position: relative;
    padding-bottom: 0.65rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 64px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--accent));
    border-radius: 2px;
}

/* ── Container ────────────────────────────────────────────── */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ── Top Bar ──────────────────────────────────────────────── */
.top-bar {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.825rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    max-width: 100vw;
    overflow-x: hidden;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.top-bar-info {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    flex-wrap: wrap;
    max-width: 100%;
}

.top-bar-contact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.8rem;
}

.top-bar-badge {
    background: rgba(194, 155, 56, 0.2);
    color: var(--gold-light);
    padding: 0.15rem 0.55rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    border: 1px solid rgba(194, 155, 56, 0.35);
    text-transform: uppercase;
    white-space: nowrap;
}

.top-bar-badge.badge-green { background: #10b981; color: #ffffff; border: none; }
.top-bar-badge.badge-amber { background: #f59e0b; color: #0f172a; border: none; }

.top-bar-title {
    font-weight: 600;
    max-width: 100%;
}

.top-bar-divider {
    margin: 0 0.25rem;
    opacity: 0.4;
}

.top-bar a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
}

.top-bar a:hover {
    color: var(--gold-light);
}

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
    background: var(--white);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--gray-200);
}

.navbar .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 4.25rem;
    gap: 0.75rem;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    max-width: 100%;
    min-width: 0;
    flex-shrink: 1;
}

.brand-logo {
    height: 44px;
    width: 44px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0,0,0,0.18);
    border: 2px solid var(--white);
    flex-shrink: 0;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}

.brand-title {
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--primary);
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.brand-estd {
    font-size: 0.65rem;
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
    font-weight: 700;
    border: 1px solid rgba(16, 185, 129, 0.3);
    white-space: nowrap;
}

.brand-sub {
    font-size: 0.64rem;
    color: var(--gray-600);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    line-height: 1.25;
}

.navbar-brand .brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--gold-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    font-family: var(--font-body);
    box-shadow: 0 3px 8px rgba(11, 29, 58, 0.2);
    border: 1px solid rgba(194, 155, 56, 0.35);
    flex-shrink: 0;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 0.3rem;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.55rem 0.85rem;
    color: var(--gray-700);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
    border-radius: 6px;
    transition: all var(--transition);
    border-bottom: 2px solid transparent;
    text-decoration: none;
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(11, 29, 58, 0.04);
}

.nav-link.active {
    color: var(--primary);
    background: rgba(11, 29, 58, 0.05);
    border-bottom-color: var(--gold);
    font-weight: 700;
}

/* Dropdown Menu */
.nav-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 240px;
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    border: 1px solid var(--gray-200);
    border-top: 3px solid var(--primary);
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    transition: all var(--transition);
    z-index: 1001;
    list-style: none;
    padding: 0.35rem 0;
}

.nav-item:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.nav-dropdown a {
    display: flex;
    align-items: center;
    padding: 0.65rem 1.15rem;
    color: var(--gray-700);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
}

.nav-dropdown a:hover {
    background: var(--gray-50);
    color: var(--accent);
    padding-left: 1.35rem;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.mobile-header-actions {
    display: none;
}

.mobile-menu-actions {
    display: none;
}

.btn-xs {
    padding: 0.35rem 0.65rem;
    font-size: 0.775rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    line-height: 1.2;
}

/* Mobile Toggle */
.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 0.45rem;
    color: var(--primary);
}

.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: currentColor;
    margin: 4px 0;
    transition: var(--transition);
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.55rem 1.25rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid transparent;
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
    text-decoration: none;
    line-height: 1.4;
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--primary-light);
    color: var(--white);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: var(--accent-dark);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--gray-300);
}

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

.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: var(--primary-dark);
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(194, 155, 56, 0.25);
}

.btn-gold:hover {
    background: var(--gold-light);
    box-shadow: 0 5px 15px rgba(194, 155, 56, 0.4);
    transform: translateY(-1px);
}

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

.btn-danger:hover {
    background: #991b1b;
    color: var(--white);
}

.btn-sm {
    padding: 0.35rem 0.8rem;
    font-size: 0.8125rem;
    border-radius: var(--radius-sm);
}

.btn-lg {
    padding: 0.75rem 1.65rem;
    font-size: 0.975rem;
    border-radius: var(--radius);
}

/* ── Hero Section ─────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, rgba(11, 29, 58, 0.92) 0%, rgba(5, 14, 31, 0.88) 60%, rgba(15, 118, 110, 0.85) 100%),
                url('/static/images/hero_bg.jpg') center/cover no-repeat;
    color: var(--white);
    padding: 4.25rem 0 4.5rem;
    position: relative;
    overflow: hidden;
    border-bottom: 4px solid var(--gold);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 80% 20%, rgba(194, 155, 56, 0.12) 0%, transparent 50%),
                radial-gradient(circle at 10% 80%, rgba(15, 118, 110, 0.15) 0%, transparent 40%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 920px;
    width: 100%;
}

.hero-header-flex {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 1.25rem;
    max-width: 100%;
}

.hero-logo-img {
    height: 90px;
    width: 90px;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.9);
    flex-shrink: 0;
}

.hero-text-block {
    flex: 1;
    min-width: 0; /* Ensures flex child wraps text properly without breaking container width */
    max-width: 100%;
}

.hero-badges-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
    max-width: 100%;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.35;
    max-width: 100%;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
    letter-spacing: 0.03em;
}

.hero-badge.badge-estd { background: #10b981; color: #ffffff; }
.hero-badge.badge-ugc { background: rgba(255, 255, 255, 0.15); color: #ffffff; letter-spacing: 0.5px; border: 1px solid rgba(255,255,255,0.25); }
.hero-badge.badge-issn { background: var(--gold); color: #0f172a; }
.hero-badge.badge-vol { background: #059669; color: #ffffff; }

.hero-title {
    font-size: clamp(1.4rem, 4.2vw, 2.3rem);
    line-height: 1.25;
    margin: 0 0 0.85rem;
    color: var(--white);
    font-weight: 700;
    letter-spacing: -0.01em;
    word-break: break-word;
    overflow-wrap: break-word;
}

.hero .subtitle {
    font-size: clamp(0.925rem, 2.5vw, 1.15rem);
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 1.85rem;
    line-height: 1.7;
    font-weight: 300;
    word-break: break-word;
    max-width: 100%;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    max-width: 100%;
}

/* ── Stats Bar ────────────────────────────────────────────── */
.stats-bar {
    background: var(--white);
    padding: 1.65rem 0;
    box-shadow: var(--shadow-sm);
    border-bottom: 1px solid var(--gray-200);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1.5rem;
    text-align: center;
}

.stat-item {
    padding: 0.5rem 0.85rem;
    border-right: 1px solid var(--gray-200);
}

.stat-item:last-child {
    border-right: none;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.15rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 700;
}

/* ── Sections ─────────────────────────────────────────────── */
.section {
    padding: 3.25rem 0;
}

.section-alt {
    background-color: var(--gray-100);
}

/* ── Search Box ───────────────────────────────────────────── */
.search-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    padding: 2.75rem 0;
    color: var(--white);
}

.search-box {
    max-width: 700px;
    margin: 0 auto;
}

.search-box h2 {
    color: var(--white);
    text-align: center;
    margin-bottom: 1.25rem;
    font-size: 1.65rem;
}

.search-input-group {
    display: flex;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    padding: 0.25rem;
}

.search-input-group input {
    flex: 1;
    padding: 0.8rem 1.15rem;
    border: none;
    font-size: 0.95rem;
    font-family: var(--font-body);
    outline: none;
    color: var(--gray-800);
}

.search-input-group button {
    padding: 0.8rem 1.5rem;
    background: var(--accent);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    font-family: var(--font-body);
    transition: background var(--transition);
}

.search-input-group button:hover {
    background: var(--accent-dark);
}

/* ── Cards ────────────────────────────────────────────────── */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-body {
    padding: 1.25rem 1.45rem;
}

.card-header {
    padding: 0.85rem 1.35rem;
    border-bottom: 1px solid var(--gray-200);
    font-weight: 700;
    font-size: 0.975rem;
    background: var(--gray-50);
    color: var(--primary);
    font-family: var(--font-body);
}

/* Article Cards */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.25rem;
}

.article-card {
    border-left: 4px solid var(--accent);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.article-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 0.55rem;
    line-height: 1.4;
}

.article-card h3 a {
    color: var(--primary);
}

.article-card h3 a:hover {
    color: var(--accent);
}

.article-authors {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.65rem;
    font-weight: 500;
}

.article-meta {
    font-size: 0.8125rem;
    color: var(--gray-500);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    padding-top: 0.5rem;
    border-top: 1px dashed var(--gray-200);
}

.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.article-actions {
    display: flex;
    gap: 0.6rem;
    margin-top: auto;
    padding-top: 0.65rem;
}

/* ── Research Areas Grid ──────────────────────────────────── */
.areas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.15rem;
    margin-bottom: 1.85rem;
}

.area-item {
    background: var(--white);
    padding: 1.15rem 1.35rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    text-align: center;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
    min-height: 75px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.area-item:hover {
    border-color: var(--gold);
    color: var(--accent-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    background: var(--gold-soft);
}

/* ── How to Publish Steps ─────────────────────────────────── */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1.35rem;
}

.step-item {
    text-align: center;
    padding: 1.65rem 1.15rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
    position: relative;
    transition: all var(--transition);
}

.step-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.step-number {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--gold-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 10px rgba(11, 29, 58, 0.15);
    border: 2px solid var(--gold);
}

.step-item h4 {
    font-family: var(--font-body);
    font-size: 1.025rem;
    font-weight: 700;
    margin-bottom: 0.45rem;
    color: var(--primary);
}

.step-item p {
    font-size: 0.875rem;
    color: var(--gray-500);
    line-height: 1.6;
}

/* ── CTA Section ──────────────────────────────────────────── */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: var(--white);
    text-align: center;
    padding: 3.5rem 0;
    border-top: 4px solid var(--gold);
}

.cta-section h2 {
    color: var(--white);
    font-size: 1.95rem;
    margin-bottom: 0.75rem;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.85);
    max-width: 640px;
    margin: 0 auto 1.65rem;
    font-size: 1.025rem;
}

/* ── Footer ───────────────────────────────────────────────── */
.footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.75);
    padding: 3rem 0 1.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 2rem;
    margin-bottom: 2.25rem;
}

.footer-col h4 {
    color: var(--white);
    font-family: var(--font-body);
    font-size: 0.95rem;
    margin-bottom: 1rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    border-bottom: 2px solid var(--gold);
    padding-bottom: 0.35rem;
    display: inline-block;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 0.55rem;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.875rem;
    transition: all var(--transition);
}

.footer-col a:hover {
    color: var(--gold-light);
    padding-left: 0.25rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.35rem;
    text-align: center;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.5);
}

/* ── Page Header ──────────────────────────────────────────── */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    padding: 2.25rem 0;
    border-bottom: 3px solid var(--gold);
}

.page-header h1 {
    color: var(--white);
    margin-bottom: 0.3rem;
    font-size: 2.1rem;
}

.page-header p {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.025rem;
    font-weight: 300;
}

/* ── Breadcrumbs ──────────────────────────────────────────── */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0 0.85rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    list-style: none;
}

.breadcrumb li::after {
    content: '›';
    margin-left: 0.4rem;
    color: rgba(255, 255, 255, 0.4);
}

.breadcrumb li:last-child::after {
    content: '';
}

.breadcrumb li:last-child {
    color: var(--white);
    font-weight: 600;
}

/* ── Article Detail View ──────────────────────────────────── */
.article-detail {
    max-width: 900px;
    margin: 0 auto;
    padding: 2.5rem 1.35rem;
}

.article-detail h1 {
    font-size: 1.95rem;
    margin-bottom: 1.15rem;
    color: var(--primary);
    line-height: 1.3;
}

.article-detail-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.85rem;
    padding: 1.15rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-200);
    margin-bottom: 1.75rem;
    box-shadow: var(--shadow-sm);
}

.article-detail-meta dt {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--gray-500);
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.article-detail-meta dd {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary);
}

.article-abstract {
    background: var(--white);
    border-left: 4px solid var(--accent);
    padding: 1.45rem;
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
    margin-bottom: 1.85rem;
    box-shadow: var(--shadow-sm);
}

.article-abstract h2 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
}

.article-abstract p {
    font-size: 1rem;
    color: var(--gray-700);
    line-height: 1.75;
}

.keyword-tag {
    display: inline-block;
    padding: 0.28rem 0.7rem;
    background: var(--gray-100);
    border: 1px solid var(--gray-200);
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-700);
    margin: 0.2rem 0.35rem 0.2rem 0;
}

.citation-box {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.45rem;
    margin-top: 2rem;
    box-shadow: var(--shadow-sm);
}

.citation-box h3 {
    font-family: var(--font-body);
    font-size: 1.075rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
}

.citation-text {
    font-size: 0.875rem;
    color: var(--gray-800);
    line-height: 1.7;
    font-family: SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    background: var(--gray-50);
    padding: 0.95rem 1.15rem;
    border-radius: var(--radius);
    border: 1px solid var(--gray-200);
}

/* ── Archive Sidebar & Layout ─────────────────────────────── */
.archive-layout-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 1.65rem;
    align-items: start;
}

@media (max-width: 992px) {
    .archive-layout-grid {
        grid-template-columns: 1fr;
    }
}

.archive-sidebar-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    overflow: hidden;
}

.archive-sidebar-header {
    background: var(--primary);
    color: var(--white);
    padding: 0.85rem 1.15rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.archive-sidebar-header h3 {
    font-size: 1rem;
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--white);
    margin: 0;
}

.archive-sidebar-body {
    max-height: 520px;
    overflow-y: auto;
}

.archive-year-group {
    border-bottom: 1px solid var(--gray-100);
}

.archive-year-title {
    background: var(--gray-50);
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.65rem 1.15rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    user-select: none;
    transition: all var(--transition);
}

.archive-year-title:hover {
    background: var(--gray-100);
    color: var(--accent);
}

.archive-year-group[open] .archive-year-title {
    background: var(--primary-light);
    color: var(--white);
}

.year-toggle-icon {
    font-size: 0.75rem;
    margin-right: 0.45rem;
}

.archive-year-group[open] .year-toggle-icon::before { content: "▼"; }
.archive-year-group:not([open]) .year-toggle-icon::before { content: "▶"; }

.archive-issue-list {
    list-style: none;
    padding: 0.25rem 0;
    margin: 0;
    background: var(--white);
}

.archive-issue-list li a {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 1.15rem;
    font-size: 0.85rem;
    color: var(--gray-700);
    transition: all var(--transition);
}

.archive-issue-list li a:hover {
    background: var(--gray-50);
    color: var(--accent);
    padding-left: 1.35rem;
}

.archive-sidebar-footer {
    padding: 0.75rem 1.15rem;
    text-align: center;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

.archive-sidebar-footer a {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.04em;
}

/* ── Forms ─────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 1.15rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--gray-700);
    font-size: 0.875rem;
}

.form-control {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.925rem;
    color: var(--gray-800);
    background: var(--white);
    transition: all var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23475569' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.85rem center;
    padding-right: 2.35rem;
}

.form-text {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-top: 0.28rem;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
}

/* Co-author Card Box */
.co-author-fields {
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 1.15rem;
    margin-bottom: 0.95rem;
    position: relative;
}

/* ── Status Timeline for Tracking ─────────────────────────── */
.status-timeline {
    display: flex;
    justify-content: space-between;
    margin: 1.75rem 0;
    position: relative;
}

.status-timeline::before {
    content: '';
    position: absolute;
    top: 18px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: var(--gray-200);
    z-index: 1;
}

.timeline-step {
    position: relative;
    z-index: 2;
    text-align: center;
    flex: 1;
}

.timeline-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--white);
    border: 3px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.45rem;
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--gray-500);
    transition: all var(--transition);
}

.timeline-step.active .timeline-dot {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--white);
}

.timeline-step.completed .timeline-dot {
    background: var(--success);
    border-color: var(--success);
    color: var(--white);
}

.timeline-label {
    font-size: 0.785rem;
    font-weight: 600;
    color: var(--gray-600);
}

/* ── Badges ──────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.65rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.badge-submitted { background: #e0f2fe; color: #0369a1; }
.badge-initial_review { background: #e0e7ff; color: #3730a3; }
.badge-reviewer_assigned { background: #fef3c7; color: #92400e; }
.badge-under_review { background: #fde68a; color: #78350f; }
.badge-revision_required { background: #ffedd5; color: #c2410c; }
.badge-revision_submitted { background: #dbeafe; color: #1e40af; }
.badge-accepted { background: #dcfce7; color: #15803d; }
.badge-rejected { background: #fee2e2; color: #b91c1c; }
.badge-published { background: #ccfbf1; color: #0f766e; }
.badge-draft { background: var(--gray-200); color: var(--gray-700); }
.badge-pending { background: #fef3c7; color: #92400e; }
.badge-completed { background: #dcfce7; color: #15803d; }

/* ── Alerts & Flash Messages ──────────────────────────────── */
.flash-messages {
    padding: 0.65rem 0;
}

.alert {
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid transparent;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success);
    border-color: var(--success);
}

.alert-error {
    background: var(--error-bg);
    color: var(--error);
    border-color: var(--error);
}

.alert-info {
    background: var(--info-bg);
    color: var(--info);
    border-color: var(--info);
}

.alert-warning {
    background: var(--warning-bg);
    color: var(--warning);
    border-color: var(--warning);
}

/* ── Tables & Precision Layout ────────────────────────────── */
.table-responsive {
    overflow-x: auto;
    width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    table-layout: auto;
}

th {
    background: var(--gray-100);
    padding: 0.75rem 1.05rem;
    text-align: left;
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

td {
    padding: 0.75rem 1.05rem;
    border-bottom: 1px solid var(--gray-200);
    font-size: 0.9rem;
    vertical-align: middle;
}

tr:hover td {
    background: var(--gray-50);
}

/* ── Admin Layout Precision Grid ──────────────────────────── */
.admin-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--primary-dark);
    color: var(--white);
    padding: 1.5rem 0;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-sidebar-brand {
    padding: 0 1.25rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1.15rem;
}

.admin-sidebar-brand h3 {
    color: var(--gold-light);
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 0.15rem;
}

.admin-sidebar-brand small {
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.725rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.admin-nav {
    list-style: none;
}

.admin-nav-section {
    padding: 0.65rem 1.25rem 0.3rem;
    font-size: 0.725rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold);
    font-weight: 700;
    margin-top: 0.5rem;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.6rem 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all var(--transition);
    border-left: 3px solid transparent;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    border-left-color: var(--gold);
}

.admin-main {
    background: var(--gray-50);
    padding: 1.5rem 1.85rem;
    overflow-x: hidden;
    min-width: 0;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.35rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.admin-header h1 {
    font-family: var(--font-body);
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--primary);
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.15rem;
    margin-bottom: 1.65rem;
}

.admin-stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.15rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--accent);
}

.admin-stat-card .stat-label {
    font-size: 0.8125rem;
    color: var(--gray-500);
    margin-bottom: 0.3rem;
    font-weight: 600;
}

.admin-stat-card .stat-number {
    font-size: 1.75rem;
    font-family: var(--font-body);
}

/* Dedicated Admin 2-Column Grid (Form + Table) */
.admin-grid-2col {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 1.25rem;
    align-items: start;
    min-width: 0;
}

@media (max-width: 1100px) {
    .admin-grid-2col {
        grid-template-columns: 1fr;
    }
}

/* Filter Bar */
.filter-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}

.filter-bar a {
    padding: 0.35rem 0.95rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--gray-600);
    background: var(--white);
    border: 1px solid var(--gray-200);
    transition: all var(--transition);
}

.filter-bar a:hover,
.filter-bar a.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* ── Utilities ────────────────────────────────────────────── */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--gray-500); }
.text-small { font-size: 0.8125rem; }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-error { color: var(--error); }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.4rem !important; }
.mb-2 { margin-bottom: 0.85rem !important; }
.mb-3 { margin-bottom: 1.25rem !important; }
.mb-4 { margin-bottom: 1.65rem !important; }
.mt-2 { margin-top: 0.85rem !important; }
.mt-3 { margin-top: 1.25rem !important; }
.d-flex { display: flex; }
.gap-1 { gap: 0.45rem; }
.gap-2 { gap: 0.85rem; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

/* CMS Content Formatting */
.cms-content h1, .cms-content h2, .cms-content h3,
.cms-content h4, .cms-content h5, .cms-content h6 {
    margin-top: 1.45rem;
    margin-bottom: 0.65rem;
}

.cms-content p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

.cms-content ul, .cms-content ol {
    margin-bottom: 1.15rem;
    padding-left: 1.85rem;
}

.cms-content li {
    margin-bottom: 0.35rem;
}

/* Copy Button */
.copy-btn {
    background: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-sm);
    padding: 0.3rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    color: var(--gray-700);
    transition: all var(--transition);
}

.copy-btn:hover {
    background: var(--gray-100);
    border-color: var(--primary);
}

.copy-btn.copied {
    background: var(--success);
    color: var(--white);
    border-color: var(--success);
}

/* Admin Mobile Header */
.admin-mobile-header {
    display: none;
    background: var(--primary-dark);
    color: #ffffff;
    padding: 0.85rem 1.25rem;
    position: sticky;
    top: 0;
    z-index: 1005;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.admin-sidebar-toggle {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: var(--radius-sm);
    padding: 0.4rem;
    cursor: pointer;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.admin-sidebar-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #ffffff;
    transition: all 0.2s ease;
}

/* ── Responsive Rules & Media Queries ─────────────────────── */
html, body {
    overflow-x: hidden;
    max-width: 100vw;
}

@media (max-width: 1200px) {
    .container {
        padding: 0 1.5rem;
    }
    .hero h1 {
        font-size: 2.15rem;
    }
}

@media (max-width: 992px) {
    .navbar .container {
        position: relative;
    }

    .nav-toggle {
        display: block;
        padding: 0.5rem 0.65rem;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        align-items: stretch;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18);
        z-index: 1000;
        border-bottom: 3px solid var(--primary);
        padding: 0;
        margin: 0;
        max-height: 85vh;
        overflow-y: auto;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-item {
        width: 100%;
        display: flex;
        flex-direction: column;
        position: static;
    }

    .nav-link {
        width: 100%;
        padding: 0.85rem 1.25rem;
        border-bottom: 1px solid var(--gray-100);
        border-radius: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.95rem;
        font-weight: 600;
    }

    .nav-arrow {
        transition: transform 0.2s ease;
        display: inline-block;
    }

    .nav-item.dropdown-open .nav-arrow {
        transform: rotate(180deg);
    }

    .nav-dropdown {
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        border-radius: 0 !important;
        background: #f8fafc !important;
        border: none !important;
        border-left: 4px solid var(--gold) !important;
        padding: 0.25rem 0 !important;
        margin: 0 !important;
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important;
        display: none !important;
    }

    .nav-item.dropdown-open .nav-dropdown {
        display: block !important;
    }

    .nav-dropdown li {
        width: 100%;
        display: block;
    }

    .nav-dropdown a {
        padding: 0.65rem 1.25rem 0.65rem 2.25rem !important;
        width: 100% !important;
        font-size: 0.875rem !important;
        color: var(--gray-700) !important;
        display: block !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.03) !important;
    }

    .brand-title {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.15rem;
    }

    .desktop-nav-actions {
        display: none !important;
    }

    .mobile-header-actions {
        display: flex !important;
        align-items: center;
        gap: 0.4rem;
        margin-left: auto;
        margin-right: 0.5rem;
    }

    .mobile-menu-actions {
        display: flex !important;
        flex-direction: column;
        gap: 0.65rem;
        padding: 1rem 1.25rem;
        background: #f8fafc;
        border-top: 1px solid var(--gray-200);
    }

    .admin-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .admin-layout {
        display: block;
    }

    .admin-sidebar {
        display: none;
        width: 100%;
        height: auto;
        position: relative;
        box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
        z-index: 1004;
    }

    .admin-sidebar.open {
        display: block;
    }

    .admin-main {
        padding: 1.15rem;
    }

    .article-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    h1 { font-size: 1.85rem; word-break: break-word; }
    h2 { font-size: 1.5rem; word-break: break-word; }
    h3 { font-size: 1.25rem; word-break: break-word; }

    .section {
        padding: 2.25rem 0;
    }

    .hero {
        padding: 2.5rem 0 2.75rem;
    }

    .hero-header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .hero-logo-img {
        height: 70px;
        width: 70px;
    }

    .hero-badges-wrap {
        gap: 0.35rem;
    }

    .hero-badge {
        font-size: 0.72rem;
        padding: 0.2rem 0.55rem;
    }

    .hero-title {
        font-size: 1.65rem;
        line-height: 1.25;
    }

    .top-bar .container {
        flex-direction: column;
        text-align: center;
        justify-content: center;
        gap: 0.35rem;
        padding: 0.4rem 0.75rem;
    }

    .top-bar-info, .top-bar-contact {
        justify-content: center;
        width: 100%;
        text-align: center;
    }

    .top-bar-title {
        display: block;
        width: 100%;
        font-size: 0.78rem;
        word-break: break-word;
        line-height: 1.35;
    }

    .admin-grid-2col {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .status-timeline {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .status-timeline::before {
        display: none;
    }

    .timeline-step {
        flex: 1 1 40%;
    }

    .table-responsive table {
        font-size: 0.8125rem;
    }

    th, td {
        padding: 0.55rem 0.75rem;
    }
}

@media (max-width: 600px) {
    .navbar .container {
        padding: 0.5rem 0.75rem;
        gap: 0.4rem;
    }

    .brand-logo {
        height: 36px;
        width: 36px;
    }

    .brand-title {
        font-size: 1.05rem;
    }

    .brand-sub {
        display: none; /* Hide 2-line subtitle on narrow phone viewports to prevent horizontal clipping */
    }

    .hero-title {
        font-size: 1.45rem;
    }

    .hero-actions {
        flex-direction: column;
        gap: 0.65rem;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .mobile-header-actions .mobile-btn {
        padding: 0.3rem 0.5rem;
        font-size: 0.725rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
    }

    .stat-item {
        border-right: none;
        padding: 0.35rem 0.25rem;
    }

    .stat-number {
        font-size: 1.65rem;
    }

    .search-input-group {
        flex-direction: column;
        gap: 0.4rem;
        padding: 0.45rem;
    }

    .search-input-group button {
        width: 100%;
    }

    .areas-grid {
        grid-template-columns: 1fr;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.35rem;
    }

    .md-datepicker-modal {
        max-width: 90vw;
    }
}

/* ============================================================
   IJMMHRD — Custom File Upload Dropzone UI System
   ============================================================ */
.custom-file-upload-zone {
    position: relative;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    padding: 1.5rem 1.25rem;
    text-align: center;
    background: #f8fafc;
    transition: all 0.25s ease-in-out;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 0.35rem;
    margin-bottom: 0.5rem;
}

.custom-file-upload-zone:hover,
.custom-file-upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(26, 75, 140, 0.04);
    box-shadow: 0 4px 14px rgba(11, 29, 58, 0.08);
}

.custom-file-upload-zone .upload-icon-wrapper {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(26, 75, 140, 0.08);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.15rem;
    transition: transform 0.2s ease, background 0.2s ease;
}

.custom-file-upload-zone:hover .upload-icon-wrapper {
    transform: translateY(-2px) scale(1.06);
    background: rgba(26, 75, 140, 0.14);
}

.custom-file-upload-zone .upload-prompt {
    font-size: 0.925rem;
    font-weight: 600;
    color: var(--primary-dark);
}

.custom-file-upload-zone .upload-hint {
    font-size: 0.78rem;
    color: var(--gray-500);
}

.custom-file-upload-zone .btn-select-file {
    margin-top: 0.35rem;
    padding: 0.45rem 1.2rem;
    font-size: 0.85rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(11, 29, 58, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    pointer-events: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.custom-file-upload-zone:hover .btn-select-file {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(11, 29, 58, 0.28);
}

/* File Selected Badge */
.custom-file-upload-zone .file-selected-badge {
    display: none;
    align-items: center;
    gap: 0.75rem;
    background: var(--white);
    border: 1px solid rgba(26, 75, 140, 0.25);
    padding: 0.75rem 1.15rem;
    border-radius: 8px;
    width: 100%;
    max-width: 520px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    text-align: left;
}

.custom-file-upload-zone.has-file .upload-icon-wrapper,
.custom-file-upload-zone.has-file .upload-prompt,
.custom-file-upload-zone.has-file .upload-hint,
.custom-file-upload-zone.has-file .btn-select-file {
    display: none;
}

.custom-file-upload-zone.has-file .file-selected-badge {
    display: flex;
}

.custom-file-upload-zone .file-selected-badge .file-badge-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.custom-file-upload-zone .file-selected-badge .file-badge-info {
    flex: 1;
    overflow: hidden;
}

.custom-file-upload-zone .file-selected-badge .file-badge-name {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.custom-file-upload-zone .file-selected-badge .file-badge-size {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.1rem;
}

.custom-file-upload-zone .file-selected-badge .btn-remove-file {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #dc2626;
    font-weight: 700;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    transition: background 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-file-upload-zone .file-selected-badge .btn-remove-file:hover {
    background: rgba(239, 68, 68, 0.18);
}

/* Fallback styling for standard file input selectors */
input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    padding: 0.5rem 1.15rem;
    margin-right: 0.85rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(11, 29, 58, 0.18);
}

input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(11, 29, 58, 0.28);
}

/* ============================================================
   IJMMHRD — Built-in Word Editor Component (CMS & Pages)
   ============================================================ */
.cms-centered-container {
    max-width: 960px;
    margin: 0 auto;
    width: 100%;
}

.word-editor-container {
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-top: 0.35rem;
    margin-bottom: 0.5rem;
}

.word-editor-toolbar {
    background: #f8fafc;
    border-bottom: 1px solid var(--gray-200);
    padding: 0.5rem 0.75rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem 0.5rem;
    user-select: none;
}

.word-toolbar-group {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    padding-right: 0.5rem;
    border-right: 1px solid var(--gray-300);
}

.word-toolbar-group:last-child {
    border-right: none;
}

.word-tool-btn {
    background: var(--white);
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
    padding: 0.35rem 0.65rem;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    transition: all 0.15s ease;
    height: 32px;
    min-width: 32px;
}

.word-tool-btn:hover {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

.word-tool-btn.active {
    background: var(--primary-dark);
    color: var(--white);
    border-color: var(--primary-dark);
}

.word-tool-select {
    background: var(--white);
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
    padding: 0.3rem 0.6rem;
    border-radius: 5px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    height: 32px;
    outline: none;
}

.word-tool-select:hover {
    border-color: var(--primary);
}

.word-color-input {
    width: 28px;
    height: 28px;
    padding: 0;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
}

.word-editor-canvas {
    min-height: 380px;
    max-height: 650px;
    padding: 1.5rem;
    overflow-y: auto;
    color: var(--gray-800);
    font-family: var(--font-body);
    font-size: 0.95rem;
    line-height: 1.75;
    background: #ffffff;
    outline: none;
}

.word-editor-canvas:focus {
    box-shadow: inset 0 0 0 2px rgba(26, 75, 140, 0.12);
}

/* Styled headings and content elements inside editor canvas */
.word-editor-canvas h1 { font-size: 1.85rem; color: var(--primary); font-weight: 700; margin-bottom: 0.85rem; }
.word-editor-canvas h2 { font-size: 1.45rem; color: var(--primary-dark); font-weight: 700; margin-top: 1.1rem; margin-bottom: 0.6rem; border-bottom: 2px solid var(--gold); padding-bottom: 0.35rem; display: inline-block; }
.word-editor-canvas h3 { font-size: 1.2rem; color: var(--gray-800); font-weight: 700; margin-top: 0.9rem; margin-bottom: 0.45rem; }
.word-editor-canvas h4 { font-size: 1.05rem; color: var(--primary); font-weight: 600; margin-top: 0.75rem; margin-bottom: 0.35rem; }
.word-editor-canvas p { margin-bottom: 1rem; }
.word-editor-canvas blockquote { border-left: 4px solid var(--gold); padding: 0.65rem 1rem; color: var(--gray-700); background: var(--gray-50); font-style: italic; margin: 1rem 0; border-radius: 0 var(--radius) var(--radius) 0; }
.word-editor-canvas table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: 0.9rem; }
.word-editor-canvas table th, .word-editor-canvas table td { border: 1px solid var(--gray-300); padding: 0.65rem 0.85rem; }
.word-editor-canvas table th { background: rgba(26, 75, 140, 0.08); font-weight: 700; color: var(--primary); text-align: left; }
.word-editor-canvas ul, .word-editor-canvas ol { padding-left: 1.5rem; margin-bottom: 1rem; }
.word-editor-canvas li { margin-bottom: 0.35rem; }
.word-editor-canvas img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 0.85rem 0; box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.word-editor-canvas a { color: var(--primary); text-decoration: underline; font-weight: 600; }
.word-editor-canvas .alert { padding: 1rem; border-radius: var(--radius); margin: 1rem 0; border-left: 4px solid var(--primary); background: rgba(26, 75, 140, 0.06); }

.word-editor-html-view {
    width: 100%;
    min-height: 380px;
    max-height: 650px;
    padding: 1.25rem;
    font-family: monospace;
    font-size: 0.875rem;
    line-height: 1.6;
    color: #0f172a;
    background: #f8fafc;
    border: none;
    outline: none;
    resize: vertical;
    display: none;
}

.word-editor-footer {
    background: #f1f5f9;
    border-top: 1px solid var(--gray-200);
    padding: 0.45rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: var(--gray-600);
}

/* ============================================================
   Material Design Custom Date Picker UI
   ============================================================ */
input[type="date"] {
    cursor: pointer;
    position: relative;
}

.md-datepicker-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.md-datepicker-overlay.active {
    opacity: 1;
    visibility: visible;
}

.md-datepicker-modal {
    width: 320px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 24px 48px -12px rgba(15, 23, 42, 0.25), 0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transform: scale(0.92);
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    font-family: var(--font-body, system-ui, -apple-system, sans-serif);
}

.md-datepicker-overlay.active .md-datepicker-modal {
    transform: scale(1);
}

/* Header Banner */
.md-datepicker-header {
    background: linear-gradient(135deg, #6b21a8 0%, #7c3aed 50%, #4f46e5 100%);
    color: #ffffff;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.2);
}

.md-datepicker-header-label {
    font-size: 0.72rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.md-datepicker-header-date {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.md-datepicker-header-edit {
    cursor: pointer;
    opacity: 0.85;
    font-size: 1.1rem;
    transition: opacity 0.15s, transform 0.15s;
    background: rgba(255, 255, 255, 0.15);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.md-datepicker-header-edit:hover {
    opacity: 1;
    transform: scale(1.08);
}

/* Body Section */
.md-datepicker-body {
    padding: 1.1rem 1.25rem 0.5rem 1.25rem;
}

.md-datepicker-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.md-datepicker-month-select {
    font-size: 0.95rem;
    font-weight: 700;
    color: #334155;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    outline: none;
    padding: 0.25rem 0.4rem;
    border-radius: 6px;
    transition: background 0.15s;
}

.md-datepicker-month-select:hover {
    background: #f1f5f9;
}

.md-datepicker-arrows {
    display: flex;
    gap: 0.25rem;
}

.md-datepicker-arrow-btn {
    background: transparent;
    border: none;
    color: #475569;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
}

.md-datepicker-arrow-btn:hover {
    background: #f1f5f9;
    color: #7c3aed;
}

/* Weekday Labels */
.md-datepicker-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 0.5rem;
}

.md-datepicker-weekday {
    font-size: 0.78rem;
    font-weight: 600;
    color: #64748b;
    padding: 0.2rem 0;
}

/* Days Grid */
.md-datepicker-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    margin-bottom: 0.5rem;
}

.md-datepicker-day {
    height: 36px;
    width: 36px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: #1e293b;
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease;
}

.md-datepicker-day.empty {
    cursor: default;
}

.md-datepicker-day.today:not(.selected) {
    border: 1.5px solid #7c3aed;
    color: #7c3aed;
    font-weight: 700;
}

.md-datepicker-day.selected {
    background: #7c3aed !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.md-datepicker-day:not(.empty):not(.selected):hover {
    background: #f1f5f9;
    color: #7c3aed;
}

/* Footer Buttons */
.md-datepicker-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 0.75rem 1.25rem 1rem 1.25rem;
}

.md-datepicker-btn {
    background: transparent;
    border: none;
    color: #7c3aed;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    padding: 0.5rem 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    text-transform: uppercase;
    transition: background 0.15s;
}

.md-datepicker-btn:hover {
    background: rgba(124, 58, 237, 0.08);
}

