/* ==========================================================================
   ANYAYUG (অন্যযুগ) – ASSAMESE LITERARY DIGITAL MAGAZINE DESIGN SYSTEM
   Typography: Noto Serif Bengali (Literary Reading) + Noto Sans Bengali (UI)
   ========================================================================== */

:root {
    --ay-paper: #ffffff;
    --ay-surface: #ffffff;
    --ay-parchment: #f8f3ea;
    --ay-primary: #800000;
    --ay-primary-dark: #5c0000;
    --ay-crimson: #800000;
    --ay-crimson-dark: #5c0000;
    --ay-secondary: #f8f3ea;
    --ay-accent: #ffc107;
    --ay-gold: #ffc107;
    --ay-ink: #222222;
    --ay-muted: #5e5349;
    --ay-border: #e6dfd3;
    --ay-teal: #1d4044;
    --ay-purple: #800000;
    --ay-purple-light: #fdf5f5;
    --font-serif-as: 'Noto Serif Bengali', 'Kalpurush', 'SolaimanLipi', Georgia, serif;
    --font-sans-as: 'Noto Sans Bengali', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --reader-font-size: 1.22rem;
    --reader-max-width: 100%;
}

html {
    scroll-padding-top: 80px;
}

body {
    font-family: var(--font-sans-as);
    background-color: var(--ay-paper);
    color: var(--ay-ink);
    line-height: 1.75;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1, h2, h3, h4, .literary-heading {
    font-family: var(--font-serif-as);
    font-weight: 700;
    line-height: 1.42;
    color: var(--ay-ink);
    word-break: keep-all;
    overflow-wrap: break-word;
}

a {
    color: var(--ay-crimson);
    text-decoration: none;
    transition: color 0.15s ease;
}

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

/* Top Utility Bar & Literary Masthead (Prototype Spec) */
.ay-topbar {
    background-color: #800000;
    color: #ffffff;
    font-size: 0.85rem;
    border-bottom: none;
}

.ay-topbar a {
    color: #ffffff;
    transition: opacity 0.2s ease;
}

.ay-topbar a:hover {
    color: #ffc107;
    opacity: 0.9;
}

.ay-masthead {
    background-color: var(--ay-surface);
    border-bottom: 1px solid #ede7dc;
    padding: 1.15rem 0;
}

/* Primary Category & Issue Navigation */
.ay-navbar {
    background-color: #ffffff;
    border-top: 1px solid #ede7dc;
    border-bottom: 1px solid #ede7dc;
}

.ay-navbar .nav-link {
    font-family: var(--font-sans-as);
    font-weight: 600;
    color: #222222;
    padding: 0.75rem 0.9rem;
    font-size: 0.95rem;
    border-bottom: 3px solid transparent;
    transition: color 0.15s ease, background 0.15s ease;
}

.ay-navbar .nav-link:hover,
.ay-navbar .nav-link.active {
    color: #800000;
    border-bottom-color: #800000;
    background-color: rgba(128, 0, 0, 0.04);
}

/* Section Headers Matching Prototype (||| Title) */
.ay-proto-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.ay-proto-title {
    font-family: var(--font-serif-as);
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e1916;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ay-proto-title::before {
    content: "|||";
    color: #800000;
    font-weight: 900;
    letter-spacing: -1px;
    font-size: 1.35rem;
}

.ay-proto-link {
    font-size: 1.02rem;
    font-weight: 600;
    color: #800000;
    text-decoration: none;
    transition: transform 0.15s ease;
}

.ay-proto-link:hover {
    color: #5c0000;
    text-decoration: underline;
}

/* Hero Slider Section (Latest 3 Months Magazine Issues) */
.ay-proto-hero {
    background: #1b0a0d url('../images/hero.png') center right / cover no-repeat;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    color: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* =========================================================================
   MODERN ANIMATED HERO SLIDER (Crossfade + Staggered Kinetic Typography)
   ========================================================================= */
#heroMagazineCarousel.carousel-fade .carousel-item {
    opacity: 0;
    transition-duration: 0.9s;
    transition-property: opacity, transform;
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    transform: scale(0.985);
}

#heroMagazineCarousel.carousel-fade .carousel-item.active {
    opacity: 1;
    transform: scale(1);
}

/* 3D Floating Book / Issue Cover */
.ay-hero-cover-3d {
    box-shadow: -12px 18px 38px rgba(0, 0, 0, 0.75), 0 0 25px rgba(255, 193, 7, 0.28);
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid #ffc107;
    max-width: 250px;
    margin: 0 auto;
    aspect-ratio: 1 / 1.35;
    background: #111;
    transform: perspective(900px) rotateY(-6deg) rotateX(1deg);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s ease;
    will-change: transform;
}

.ay-hero-cover-3d:hover {
    transform: perspective(900px) rotateY(-1deg) rotateX(0deg) scale(1.04) translateY(-6px);
    box-shadow: -15px 24px 44px rgba(0, 0, 0, 0.85), 0 0 35px rgba(255, 193, 7, 0.45);
}

/* Kinetic Staggered Animations when Slide is Active */
.carousel-item.active .ay-hero-cover-wrap {
    animation: ayCoverEnter 0.95s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.carousel-item.active .ay-hero-badge {
    animation: aySlideDown 0.65s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.carousel-item.active .ay-hero-title {
    animation: aySlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.carousel-item.active .ay-hero-desc {
    animation: aySlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.32s both;
}

.carousel-item.active .ay-hero-btn {
    animation: ayPopIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) 0.44s both;
}

/* Mobile Staggered Slide In */
.carousel-item.active .ay-hero-mobile-cover {
    animation: ayMobileCoverEnter 0.75s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.carousel-item.active .ay-hero-mobile-text {
    animation: aySlideUp 0.75s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

@keyframes ayCoverEnter {
    0% {
        opacity: 0;
        transform: perspective(900px) rotateY(-22deg) translateX(-40px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: perspective(900px) rotateY(-6deg) translateX(0) scale(1);
    }
}

@keyframes ayMobileCoverEnter {
    0% {
        opacity: 0;
        transform: scale(0.85) translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateX(0);
    }
}

@keyframes aySlideDown {
    0% {
        opacity: 0;
        transform: translateY(-16px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes aySlideUp {
    0% {
        opacity: 0;
        transform: translateY(22px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ayPopIn {
    0% {
        opacity: 0;
        transform: scale(0.88) translateY(12px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.ay-hero-desktop-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.25);
    z-index: 10;
    font-size: 1.15rem;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: all 0.2s ease;
}
.ay-hero-desktop-arrow:hover {
    background: #800000;
    color: #ffc107;
    border-color: #ffc107;
    transform: translateY(-50%) scale(1.08);
}
.ay-hero-desktop-arrow.prev { left: 16px; }
.ay-hero-desktop-arrow.next { right: 16px; }

.ay-hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.45);
    border: none;
    padding: 0;
    transition: all 0.25s ease;
    cursor: pointer;
}
.ay-hero-dot.active {
    width: 24px;
    border-radius: 6px;
    background-color: #ffc107;
}

/* Category Icon Cards (Section 6) */
.ay-cat-box {
    background: #ffffff;
    border: 1px solid #e2dad0;
    border-radius: 10px;
    padding: 14px 8px;
    text-align: center;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
    min-height: 90px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.ay-cat-box .cat-icon {
    font-size: 1.65rem;
    color: #800000;
    transition: transform 0.2s ease;
}

.ay-cat-box .cat-label {
    font-size: 1rem;
    font-weight: 600;
    color: #222222;
}

.ay-cat-box:hover {
    border-color: #800000;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(128, 0, 0, 0.1);
}

.ay-cat-box:hover .cat-icon {
    transform: scale(1.15);
}

.ay-cat-box.active-cat {
    background: #800000;
    border-color: #800000;
}

.ay-cat-box.active-cat .cat-icon,
.ay-cat-box.active-cat .cat-label {
    color: #ffffff;
}

/* Numbered Ranking Circle (1 to 5) */
.ay-rank-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background-color: #800000;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    line-height: 1;
}

/* Card Styles */
.ay-card {
    background: var(--ay-surface);
    border: 1px solid var(--ay-border);
    border-radius: 8px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ay-card:hover {
    border-color: #c9bbae;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.btn-ay-primary {
    background-color: #800000;
    border-color: #800000;
    color: #ffffff;
}

.btn-ay-primary:hover {
    background-color: #610000;
    border-color: #610000;
    color: #ffffff;
}

.ay-card-img {
    width: 100%;
    height: 215px;
    object-fit: cover;
    border-bottom: 1px solid var(--ay-border);
}

.ay-cat-pill {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ay-crimson);
    background: rgba(139, 30, 30, 0.09);
    padding: 0.2rem 0.65rem;
    border-radius: 3px;
    letter-spacing: 0.02em;
}

.ay-archive-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: #5a3e1b;
    background-color: #f6e7c1;
    border: 1px solid #d7b870;
    padding: 0.2rem 0.65rem;
    border-radius: 3px;
}

/* ==========================================================================
   DISTRACTION-FREE ASSAMESE ARTICLE READING EXPERIENCE (Section 5)
   ========================================================================== */
.ay-reader-wrapper {
    transition: background-color 0.25s ease, color 0.25s ease;
    border-radius: 6px;
    padding: 2.25rem 1.5rem;
    background-color: var(--ay-surface);
    border: 1px solid var(--ay-border);
}

.ay-reader-container {
    max-width: 100%;
    width: 100%;
    margin: 0 auto;
}

.ay-reader-toolbar {
    position: sticky;
    top: 0.5rem;
    z-index: 90;
    background: #fbf9f5;
    border: 1px solid var(--ay-border);
    border-radius: 8px;
    padding: 0.28rem 0.75rem;
    margin-bottom: 1.25rem;
    min-height: 38px;
}

.theme-swatch-btn {
    transition: transform 0.15s ease, box-shadow 0.15s ease, outline 0.15s ease;
    cursor: pointer;
}
.theme-swatch-btn:hover {
    transform: scale(1.18);
}
.theme-swatch-btn.active {
    outline: 2px solid #8b1e1e !important;
    outline-offset: 2px !important;
}

.ay-article-body {
    font-family: var(--font-serif-as);
    font-size: var(--reader-font-size);
    line-height: 1.95;
    color: inherit;
    word-spacing: 0.04em;
    overflow-wrap: break-word;
}

.ay-article-body p {
    margin-bottom: 1.45rem;
    text-align: justify;
}

.ay-article-body h2,
.ay-article-body h3,
.ay-article-body h4 {
    font-family: var(--font-serif-as);
    color: inherit;
    margin-top: 2rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--ay-border);
    padding-bottom: 0.35rem;
}

.ay-article-body blockquote {
    font-family: var(--font-serif-as);
    font-size: 1.12em;
    line-height: 1.9;
    border-left: 4px solid var(--ay-crimson);
    background-color: rgba(194, 155, 88, 0.12);
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0;
    border-radius: 0 4px 4px 0;
}

.ay-article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    margin: 1.25rem auto;
    display: block;
    border: 1px solid var(--ay-border);
}

.ay-article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
}

.ay-article-body table th,
.ay-article-body table td {
    border: 1px solid var(--ay-border);
    padding: 0.65rem;
}

/* Reader Theme Modes: Light, Sepia, Dark */
.ay-reader-wrapper.theme-light {
    background-color: #ffffff;
    color: #1d1916;
}

.ay-reader-wrapper.theme-sepia {
    background-color: #f4ecd8;
    color: #3b2f25;
    border-color: #d3c29f;
}

.ay-reader-wrapper.theme-dark {
    background-color: #16181d;
    color: #e6e1d6;
    border-color: #2f333d;
}

.ay-reader-wrapper.theme-dark .ay-reader-toolbar {
    background-color: #22252d;
    color: #e6e1d6;
    border-color: #363b47;
}

.ay-reader-wrapper.theme-dark h1,
.ay-reader-wrapper.theme-dark h2,
.ay-reader-wrapper.theme-dark h3,
.ay-reader-wrapper.theme-dark .text-dark {
    color: #f4efe4 !important;
}

.ay-reader-wrapper.theme-dark .text-muted {
    color: #b5ada0 !important;
}

/* Cartoon Corner Card */
.ay-cartoon-card {
    background: #fffdf8;
    border: 2px solid #2d2622;
    border-radius: 4px;
    padding: 0.75rem;
}

/* Footer */
.ay-footer {
    background-color: #1b1714;
    color: #d9d0c1;
    border-top: 4px solid var(--ay-crimson);
    padding: 3.25rem 0 2rem;
    margin-top: 4rem;
}

.ay-footer h5 {
    color: var(--ay-gold);
    font-family: var(--font-serif-as);
    margin-bottom: 1rem;
}

.ay-footer a {
    color: #d9d0c1;
}

.ay-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* ==========================================================================
   WORKSPACE / ROLE DASHBOARD DESIGN SYSTEM (Admin, Writer, Settings, Designer)
   ========================================================================== */
.ay-workspace-body {
    background-color: #f4f2ed;
    min-height: 100vh;
}

.ay-sidebar,
.ay-sidebar.offcanvas-lg {
    width: 285px !important;
    background: linear-gradient(180deg, #131620 0%, #171b26 100%) !important;
    color: #e2e8f0 !important;
    border-right: 1px solid #232838 !important;
    --bs-offcanvas-bg: #141722 !important;
    --bs-offcanvas-color: #e2e8f0 !important;
    display: flex !important;
    flex-direction: column !important;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
    overscroll-behavior: contain !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-y !important;
}

@media (min-width: 992px) {
    .ay-sidebar {
        position: sticky !important;
        top: 0 !important;
        height: 100vh !important;
        max-height: 100vh !important;
        z-index: 1020;
    }
}

@media (max-width: 991.98px) {
    .ay-sidebar.offcanvas-lg {
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100vh !important;
        max-height: 100dvh !important;
        box-shadow: 4px 0 30px rgba(0, 0, 0, 0.65) !important;
    }
}

.ay-sidebar-header {
    background: #0d1017 !important;
    border-bottom: 1px solid #232838 !important;
    flex-shrink: 0;
}

.ay-sidebar-user {
    background: #11141c !important;
    border-bottom: 1px solid #232838 !important;
    flex-shrink: 0;
}

.ay-sidebar-body {
    flex: 1 1 auto !important;
    min-height: 0 !important; /* Required for Firefox & WebKit flex child scroll */
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    scroll-behavior: smooth;
    overscroll-behavior: contain !important;
    overscroll-behavior-y: contain !important;
    touch-action: pan-y !important;
    padding-bottom: 2rem;
}

/* Elegant Slim Dark Scrollbar for Sidebar */
.ay-sidebar-body::-webkit-scrollbar {
    width: 5px;
}
.ay-sidebar-body::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.25);
}
.ay-sidebar-body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 4px;
}
.ay-sidebar-body::-webkit-scrollbar-thumb:hover {
    background: #f59e0b;
}
.ay-sidebar-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.18) rgba(0, 0, 0, 0.25);
}

.ay-sidebar .nav-link {
    color: #cbd5e1 !important;
    padding: 0.65rem 1rem;
    margin: 2px 10px;
    border-radius: 6px;
    font-size: 0.93rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.18s ease;
}

.ay-sidebar .nav-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-left-color: #f59e0b !important;
    transform: translateX(2px);
}

.ay-sidebar .nav-link.active {
    color: #ffffff !important;
    background: linear-gradient(90deg, #781729 0%, #61111f 100%) !important;
    border-left-color: #fbbf24 !important;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(120, 23, 41, 0.35);
}

.ay-sidebar .nav-link i {
    font-size: 1.12rem;
    color: #94a3b8;
    transition: color 0.18s ease;
}

.ay-sidebar .nav-link:hover i,
.ay-sidebar .nav-link.active i {
    color: #fbbf24;
}

.ay-sidebar-heading {
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #fbbf24 !important;
    padding: 1.1rem 1.15rem 0.35rem;
    display: flex;
    align-items: center;
    gap: 7px;
}

.ay-sidebar-heading::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #f59e0b;
}

.ay-sidebar-footer {
    background: #0d1017 !important;
    border-top: 1px solid #232838 !important;
    flex-shrink: 0;
}

.ay-stat-card {
    background: #ffffff;
    border: 1px solid #e2dcd0;
    border-left: 4px solid var(--ay-crimson);
    border-radius: 4px;
    padding: 1.15rem;
}

.btn-ay-primary {
    background-color: var(--ay-crimson);
    border-color: var(--ay-crimson);
    color: #ffffff;
}

.btn-ay-primary:hover {
    background-color: var(--ay-crimson-dark);
    border-color: var(--ay-crimson-dark);
    color: #ffffff;
}

/* ==========================================================================
   MOBILE VIEWS & APP-STYLE INTERFACE (Prototype Spec)
   ========================================================================== */

/* Mobile Bottom App Navigation Bar */
.ay-mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 62px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid #e2dad0;
    display: flex;
    align-items: center;
    justify-content: space-around;
    z-index: 1040;
    box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.06);
    padding: 0 4px;
}

.ay-mobile-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #4b4b4b;
    flex: 1;
    height: 100%;
    padding: 6px 0 4px;
    transition: color 0.15s ease, transform 0.15s ease;
    cursor: pointer;
}

.ay-mobile-nav-item i {
    font-size: 1.32rem;
    line-height: 1.1;
    margin-bottom: 2px;
}

.ay-mobile-nav-item span {
    font-size: 0.76rem;
    font-weight: 600;
    line-height: 1.1;
    font-family: var(--font-sans-as);
}

.ay-mobile-nav-item:hover,
.ay-mobile-nav-item.active {
    color: #800000 !important;
}

.ay-mobile-nav-item.active i {
    transform: scale(1.1);
}

@media (max-width: 767.98px) {
    body {
        padding-bottom: 70px !important;
    }
}

/* Category Horizontal Scroll on Mobile */
.ay-cat-scroll {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 12px;
    padding: 4px 2px 10px;
}

.ay-cat-scroll::-webkit-scrollbar {
    display: none;
}

.ay-cat-item-mobile {
    flex: 0 0 auto;
    width: 68px;
    text-align: center;
    text-decoration: none;
}

.ay-cat-item-mobile .icon-box {
    width: 58px;
    height: 58px;
    border-radius: 12px;
    background: #ffffff;
    border: 1.5px solid #ece4dc;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.ay-cat-item-mobile:hover .icon-box,
.ay-cat-item-mobile:active .icon-box {
    border-color: #800000;
    transform: translateY(-2px);
}

.ay-cat-item-mobile .cat-name {
    font-size: 0.86rem;
    font-weight: 600;
    color: #222222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

/* Prototype Single Vertical Line Title (Mobile & Desktop) */
.ay-proto-header-mobile {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.ay-proto-title-mobile {
    font-family: var(--font-serif-as);
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e1916;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.ay-proto-title-mobile::before {
    content: "|";
    color: #800000;
    font-weight: 900;
    font-size: 1.45rem;
    line-height: 1;
}

.ay-proto-title-mobile.double-bar::before {
    content: "||";
    letter-spacing: -2px;
}

.ay-proto-link-mobile {
    font-size: 0.95rem;
    font-weight: 600;
    color: #800000;
    text-decoration: none;
}

.ay-proto-link-mobile:hover {
    color: #5c0000;
    text-decoration: underline;
}

/* Mobile Hero Banner Overrides */
@media (max-width: 767.98px) {
    .ay-proto-hero {
        border-radius: 16px !important;
        padding: 1.15rem 0.95rem !important;
        margin-bottom: 1.5rem !important;
        background: linear-gradient(135deg, rgba(27, 10, 13, 0.90) 0%, rgba(47, 14, 19, 0.86) 100%), url('../images/hero.png') center right / cover no-repeat !important;
    }
    
    .ay-hero-nav-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        width: 32px;
        height: 32px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.45);
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none;
        z-index: 10;
        font-size: 0.9rem;
        cursor: pointer;
        backdrop-filter: blur(2px);
    }
    .ay-hero-nav-arrow.prev { left: 8px; }
    .ay-hero-nav-arrow.next { right: 8px; }
}

/* Print Stylesheet */
@media print {
    .ay-topbar, .ay-navbar, .ay-reader-toolbar, .ay-footer, .ay-mobile-bottom-nav, .no-print {
        display: none !important;
    }
    body, .ay-reader-wrapper {
        background: #ffffff !important;
        color: #000000 !important;
        border: none !important;
        padding: 0 !important;
    }
}

/* Suppress CKEditor 4 version warning banner */
.cke_notification_warning,
.cke_notification_message,
.cke_notification[title*="secure"],
.cke_notification[title*="version"] {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Responsive Workspace Form & Cards */
@media (max-width: 991.98px) {
    #issueFormPanel {
        position: static !important;
        margin-top: 1.5rem;
    }
}
@media (max-width: 575.98px) {
    .ay-issue-thumb {
        width: 68px !important;
        height: 95px !important;
    }
    .ay-stat-kpi-card {
        padding: 0.65rem 0.75rem !important;
    }
    .ay-stat-kpi-icon {
        width: 38px !important;
        height: 38px !important;
        font-size: 1.15rem !important;
        margin-right: 0.5rem !important;
    }
    .ay-reader-container {
        max-width: 100% !important;
    }
}

/* ==========================================================================
   RESPONSIVE MOBILE TABLE-TO-CARD TRANSFORMATION
   Automatically transforms tabular data into touch-friendly cards on mobile.
   ========================================================================== */
@media (max-width: 767.98px) {
    .table-responsive {
        overflow-x: visible !important;
        border: none !important;
    }

    .ay-table-cards,
    .table-responsive > .table:not(.ay-no-card-table) {
        display: block !important;
        width: 100% !important;
        border: none !important;
        background: transparent !important;
        margin-bottom: 0 !important;
    }

    .ay-table-cards thead,
    .table-responsive > .table:not(.ay-no-card-table) thead {
        display: none !important;
    }

    .ay-table-cards tbody,
    .table-responsive > .table:not(.ay-no-card-table) tbody {
        display: block !important;
        width: 100% !important;
    }

    .ay-table-cards tbody tr,
    .table-responsive > .table:not(.ay-no-card-table) tbody tr {
        display: block !important;
        background: #ffffff !important;
        border: 1px solid #e4ddd3 !important;
        border-radius: 12px !important;
        padding: 0.95rem 1rem !important;
        margin-bottom: 0.85rem !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
        position: relative !important;
    }

    .ay-table-cards tbody tr:hover,
    .table-responsive > .table:not(.ay-no-card-table) tbody tr:hover {
        background: #faf8f5 !important;
        border-color: #d1c5b4 !important;
    }

    .ay-table-cards tbody td,
    .table-responsive > .table:not(.ay-no-card-table) tbody td {
        display: flex !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
        padding: 0.45rem 0 !important;
        border: none !important;
        border-bottom: 1px dashed #eee8de !important;
        font-size: 0.88rem !important;
        text-align: right !important;
        min-height: 2.1rem;
        word-break: break-word;
    }

    .ay-table-cards tbody td::before,
    .table-responsive > .table:not(.ay-no-card-table) tbody td::before {
        content: attr(data-label);
        font-weight: 600 !important;
        color: #64748b !important;
        text-align: left !important;
        font-size: 0.82rem !important;
        flex-shrink: 0 !important;
        margin-right: 0.75rem !important;
        line-height: 1.4;
    }

    .ay-table-cards tbody td:not([data-label])::before,
    .table-responsive > .table:not(.ay-no-card-table) tbody td:not([data-label])::before,
    .ay-table-cards tbody td[data-label=""]::before,
    .table-responsive > .table:not(.ay-no-card-table) tbody td[data-label=""]::before {
        content: none !important;
        display: none !important;
    }

    /* Last row cell (typically action buttons / links) */
    .ay-table-cards tbody td:last-child,
    .table-responsive > .table:not(.ay-no-card-table) tbody td:last-child {
        border-bottom: none !important;
        padding-top: 0.75rem !important;
        padding-bottom: 0.2rem !important;
        justify-content: flex-end !important;
        gap: 0.5rem !important;
        flex-wrap: wrap !important;
    }

    .ay-table-cards tbody td:last-child > div,
    .table-responsive > .table:not(.ay-no-card-table) tbody td:last-child > div {
        justify-content: flex-end !important;
        width: 100% !important;
    }

    /* Empty state or full width single row */
    .ay-table-cards tbody td[colspan],
    .table-responsive > .table:not(.ay-no-card-table) tbody td[colspan] {
        display: block !important;
        text-align: center !important;
        justify-content: center !important;
        border: none !important;
        padding: 1.5rem 0 !important;
    }

    .ay-table-cards tbody td[colspan]::before,
    .table-responsive > .table:not(.ay-no-card-table) tbody td[colspan]::before {
        display: none !important;
        content: none !important;
    }
}

