/* Background styles */
body {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    position: relative;
    font-family: 'Georgia', serif;
}

/* Enhanced navbar */
.navbar {
    padding: 12px 0;
    background: white !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar-brand {
    padding: 0;
    margin-right: 3rem;
}

.navbar-brand img {
    height: 38px;
    width: auto;
}

.navbar-nav .nav-item {
    margin-right: 1rem;
}

.navbar-nav .nav-link {
    color: #333 !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s;
}

.navbar-nav .nav-link:hover {
    color: #012FB3 !important;
    background: rgba(1, 47, 179, 0.05);
}

.navbar-nav .active .nav-link {
    color: #012FB3 !important;
    background: rgba(1, 47, 179, 0.1);
}

.nav-buttons .btn {
    padding: 0.5rem 1.5rem;
    font-weight: 500;
    border-radius: 6px;
}

/* Update navbar styles */
.navbar {
    padding: 15px 0;
    background: white !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.navbar-brand img {
    height: 46px;
    width: auto;
    filter: none;
    /* Remove the filter to show original logo colors */
}

/* Enhanced magazine container */
.magazine-container {
    max-width: 1400px;
    margin: 130px auto 80px;
    perspective: 2000px;
    padding: 0 20px;
}

.magazine {
    display: flex;
    background: linear-gradient(145deg, #ffffff 0%, #fefefe 100%);
    border-radius: 8px;
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.1),
        0 8px 16px rgba(0, 0, 0, 0.15),
        0 16px 32px rgba(0, 0, 0, 0.1),
        0 32px 64px rgba(0, 0, 0, 0.05),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    position: relative;
    transform-style: preserve-3d;
    transition: all 0.4s ease;
    counter-reset: chapter;
    overflow: hidden;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.8) 0%, transparent 50%),
        linear-gradient(135deg, #fafafa 0%, #ffffff 50%, #f8f8f8 100%);
}

.magazine:hover {
    transform: rotateY(-2deg) rotateX(1deg) translateY(-5px);
    box-shadow:
        0 0 0 1px rgba(0, 0, 0, 0.1),
        0 12px 24px rgba(0, 0, 0, 0.2),
        0 24px 48px rgba(0, 0, 0, 0.15),
        0 48px 96px rgba(0, 0, 0, 0.08);
}

/* Realistic magazine binding */
.magazine::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, #e0e0e0 0%, #d0d0d0 50%, #c0c0c0 100%);
    transform: translateX(-50%);
    box-shadow:
        inset 1px 0 1px rgba(255, 255, 255, 0.8),
        inset -1px 0 1px rgba(0, 0, 0, 0.2),
        0 0 4px rgba(0, 0, 0, 0.3);
    z-index: 10;
}

/* Magazine spine title */
.magazine::after {
    content: "InkPact Youth Magazine • 2025 Edition";
    position: absolute;
    left: 50%;
    top: 20px;
    transform: translateX(-50%) rotate(90deg);
    transform-origin: center;
    background: linear-gradient(90deg, #012FB3 0%, #1E43B0 50%, #0A2490 100%);
    color: white;
    padding: 4px 20px;
    font-size: 10px;
    font-weight: bold;
    text-align: center;
    border-radius: 4px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    z-index: 11;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Left page with realistic paper texture */
.page-left {
    flex: 1;
    padding: 80px 60px 60px 80px;
    min-height: 800px;
    position: relative;
    background:
        linear-gradient(to right, rgba(248, 248, 248, 0.3) 0%, transparent 100%),
        repeating-linear-gradient(0deg,
            transparent,
            transparent 24px,
            rgba(0, 0, 0, 0.02) 25px),
        linear-gradient(145deg, #ffffff 0%, #fefefe 100%);
    border-radius: 8px 0 0 8px;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.03);
}

/* Right page with realistic paper texture */
.page-right {
    flex: 1;
    padding: 80px 80px 60px 60px;
    min-height: 800px;
    position: relative;
    background:
        linear-gradient(to left, rgba(248, 248, 248, 0.3) 0%, transparent 100%),
        repeating-linear-gradient(0deg,
            transparent,
            transparent 24px,
            rgba(0, 0, 0, 0.02) 25px),
        linear-gradient(225deg, #ffffff 0%, #fefefe 100%);
    border-radius: 0 8px 8px 0;
    box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.03);
}

/* Realistic page borders with subtle shadows */
.page-left::before,
.page-right::before {
    content: "";
    position: absolute;
    top: 60px;
    left: 60px;
    right: 60px;
    bottom: 60px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 4px;
    pointer-events: none;
    box-shadow:
        inset 0 0 10px rgba(0, 0, 0, 0.02),
        0 1px 2px rgba(0, 0, 0, 0.05);
}

/* Enhanced magazine header with realistic text shadow */
.magazine-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 2px solid #012FB3;
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 255, 0.9) 100%);
    border-radius: 8px;
    padding: 20px;
    box-shadow:
        0 2px 8px rgba(1, 47, 179, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.magazine-header::after {
    content: "📖";
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 0 12px;
    font-size: 20px;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.magazine-title {
    font-family: 'Georgia', serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: #012FB3;
    margin-bottom: 15px;
    text-shadow:
        2px 2px 4px rgba(1, 47, 179, 0.2),
        0 0 8px rgba(1, 47, 179, 0.1);
    letter-spacing: -1px;
    background: linear-gradient(135deg, #012FB3 0%, #1E43B0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhanced chapter styling with realistic effects */
.chapter-title {
    font-family: 'Georgia', serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: #012FB3;
    margin-bottom: 20px;
    padding-left: 30px;
    position: relative;
    border-left: 4px solid #012FB3;
    text-shadow: 1px 1px 2px rgba(1, 47, 179, 0.1);
}

.chapter-title::before {
    content: counter(chapter, upper-roman) ".";
    counter-increment: chapter;
    position: absolute;
    left: -35px;
    top: -2px;
    font-size: 1.1rem;
    color: #1E43B0;
    font-weight: bold;
    background: linear-gradient(135deg, #f8faff, #e3f2fd);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #012FB3;
    box-shadow:
        0 2px 6px rgba(1, 47, 179, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

/* Enhanced card effects */
.objective-item,
.team-item {
    background:
        linear-gradient(145deg, #ffffff 0%, #f8faff 100%),
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.8) 0%, transparent 50%);
    border: 1px solid rgba(1, 47, 179, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow:
        0 2px 8px rgba(0, 0, 0, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 0 0 1px rgba(255, 255, 255, 0.5);
    position: relative;
    overflow: hidden;
}

.objective-item::before,
.team-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(1, 47, 179, 0.3) 50%, transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.objective-item:hover,
.team-item:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: #012FB3;
    box-shadow:
        0 8px 32px rgba(1, 47, 179, 0.15),
        0 4px 16px rgba(1, 47, 179, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.objective-item:hover::before,
.team-item:hover::before {
    opacity: 1;
}

/* Enhanced highlight box */
.highlight-box {
    background:
        linear-gradient(135deg, #f8faff 0%, #e3f2fd 100%),
        radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.8) 0%, transparent 60%);
    border: 2px solid #012FB3;
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    position: relative;
    box-shadow:
        0 6px 20px rgba(1, 47, 179, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 0 20px rgba(1, 47, 179, 0.05);
}

.highlight-box::before {
    content: "💡";
    position: absolute;
    top: -14px;
    left: 20px;
    background: linear-gradient(145deg, #ffffff 0%, #f8faff 100%);
    padding: 2px 12px;
    font-size: 20px;
    border-radius: 12px;
    border: 2px solid #012FB3;
    box-shadow:
        0 4px 12px rgba(1, 47, 179, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Enhanced contact section */
.contact-section {
    background:
        linear-gradient(135deg, #f8faff 0%, #fff 100%),
        radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.9) 0%, transparent 50%);
    border: 2px solid #012FB3;
    border-radius: 15px;
    padding: 25px;
    margin: 30px 0;
    box-shadow:
        0 8px 24px rgba(1, 47, 179, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        inset 0 0 20px rgba(1, 47, 179, 0.03);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent 0%, rgba(1, 47, 179, 0.1) 50%, transparent 100%);
    transition: left 0.3s ease;
}

.contact-item:hover {
    background: rgba(1, 47, 179, 0.08);
    transform: translateX(3px);
    box-shadow:
        0 2px 8px rgba(1, 47, 179, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.contact-item:hover::before {
    left: 100%;
}

/* Page corner curl effect */
.page-right::after {
    content: "";
    position: absolute;
    bottom: 40px;
    right: 40px;
    width: 20px;
    height: 20px;
    background: linear-gradient(225deg, #f0f0f0 0%, #ffffff 50%);
    border-radius: 0 0 4px 0;
    box-shadow:
        -2px -2px 4px rgba(0, 0, 0, 0.1),
        inset 1px 1px 0 rgba(255, 255, 255, 0.8);
    transform: rotate(45deg);
}

/* Enhanced page numbers with realistic styling */
.page-number-left,
.page-number-right {
    position: absolute;
    bottom: 30px;
    font-size: 0.9rem;
    color: #6c757d;
    font-style: italic;
    font-family: 'Georgia', serif;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 248, 248, 0.9) 100%);
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.8);
}

.page-number-left {
    left: 60px;
}

.page-number-right {
    right: 60px;
}

/* Add subtle paper grain texture */
.page-left,
.page-right {
    background-image:
        radial-gradient(circle at 100% 50%, transparent 20%, rgba(255, 255, 255, 0.3) 21%, rgba(255, 255, 255, 0.3) 34%, transparent 35%, transparent),
        linear-gradient(0deg, rgba(0, 0, 0, 0.01) 50%, transparent 50%);
}

/* Enhanced objectives grid for magazine */
.objectives-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin: 50px 0;
}

/* Enhanced team grid for magazine */
.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin: 50px 0;
}

/* Responsive design */
@media (min-width: 1400px) {
    .magazine-container {
        max-width: 1600px;
    }

    .page-left,
    .page-right {
        padding: 100px 80px 80px;
    }

    .magazine-title {
        font-size: 3rem;
    }

    .chapter-title {
        font-size: 1.8rem;
    }
}

@media (max-width: 1200px) {
    .magazine-container {
        max-width: 1000px;
        margin: 120px auto 60px;
        padding: 0 15px;
    }

    .page-left,
    .page-right {
        padding: 60px 40px;
    }

    .magazine-title {
        font-size: 2.2rem;
    }

    .chapter-title {
        font-size: 1.5rem;
    }

    .objectives-grid,
    .team-grid {
        gap: 25px;
    }
}

@media (max-width: 992px) {
    .magazine {
        flex-direction: column;
        margin: 0 5px;
        border-radius: 12px;
        gap: 20px;
    }

    .page-left {
        border-right: none;
        border-bottom: none;
        border-radius: 12px;
        padding: 50px 30px;
        min-height: auto;
        margin-bottom: 20px;
    }

    .page-right {
        border-radius: 12px;
        padding: 50px 30px;
        min-height: auto;
        margin-top: 20px;
    }

    .magazine::before {
        display: none;
    }

    .magazine::after {
        left: 30px;
        top: 50%;
        transform: translateY(-50%) rotate(0deg);
        writing-mode: horizontal-tb;
        font-size: 9px;
        padding: 3px 12px;
    }

    .objectives-grid,
    .team-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 30px 0;
    }

    .magazine-container {
        margin: 100px 10px 40px;
    }

    .page-left::before,
    .page-right::before {
        top: 35px;
        left: 35px;
        right: 35px;
        bottom: 35px;
    }

    .magazine-header {
        margin-bottom: 35px;
        padding: 18px;
    }

    .chapter {
        margin-bottom: 35px;
    }
}

@media (max-width: 768px) {
    .magazine-container {
        margin: 90px 8px 30px;
        padding: 0;
    }

    .magazine {
        border-radius: 8px;
        margin: 0;
        gap: 30px;
    }

    .page-left,
    .page-right {
        padding: 40px 25px;
        margin: 15px 0;
    }

    .page-left {
        border-radius: 8px;
        margin-bottom: 30px;
    }

    .page-right {
        border-radius: 8px;
        margin-top: 30px;
    }

    .magazine-header {
        margin-bottom: 30px;
        padding: 16px;
    }

    .magazine-title {
        font-size: 1.8rem;
        margin-bottom: 12px;
        line-height: 1.3;
    }

    .magazine-subtitle {
        font-size: 1rem;
        margin-bottom: 15px;
        line-height: 1.4;
    }

    .chapter {
        margin-bottom: 30px;
    }

    .chapter-title {
        font-size: 1.3rem;
        padding-left: 35px;
        padding-right: 15px;
        margin-bottom: 15px;
        margin-left: 10px;
        margin-right: 10px;
    }

    .chapter-title::before {
        left: -25px;
        width: 22px;
        height: 22px;
        font-size: 0.85rem;
    }

    .chapter-content {
        font-size: 0.95rem;
        line-height: 1.6;
        margin-bottom: 15px;
        text-indent: 1em;
    }

    .objectives-grid,
    .team-grid {
        gap: 18px;
        margin: 25px 0;
    }

    .objective-item,
    .team-item {
        padding: 18px;
        border-radius: 10px;
    }

    .objective-icon,
    .team-icon {
        font-size: 2.2rem;
        margin-bottom: 12px;
    }

    .objective-title,
    .team-role {
        font-size: 1rem;
        margin-bottom: 8px;
    }

    .objective-desc,
    .team-desc {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .highlight-box {
        padding: 22px;
        margin: 25px 0;
        border-radius: 12px;
    }

    .highlight-box::before {
        top: -12px;
        left: 18px;
        font-size: 18px;
        padding: 3px 10px;
    }

    .page-left::before,
    .page-right::before {
        top: 30px;
        left: 30px;
        right: 30px;
        bottom: 30px;
        border-radius: 4px;
    }

    .page-number-left,
    .page-number-right {
        font-size: 0.8rem;
        padding: 5px 10px;
        bottom: 20px;
    }

    .page-number-left {
        left: 30px;
    }

    .page-number-right {
        right: 30px;
    }

    .magazine::after {
        font-size: 8px;
        padding: 2px 8px;
    }

    .navbar-brand img {
        height: 38px;
    }
}

/* Large mobile */
@media (max-width: 576px) {
    .magazine-container {
        margin: 80px 5px 20px;
    }

    .magazine {
        gap: 40px;
    }

    .page-left,
    .page-right {
        padding: 30px 18px;
        margin: 20px 0;
    }

    .page-left {
        margin-bottom: 40px;
    }

    .page-right {
        margin-top: 40px;
    }

    .chapter-title {
        font-size: 1.15rem;
        padding-left: 40px;
        padding-right: 20px;
        margin-left: 15px;
        margin-right: 15px;
    }

    .chapter-title::before {
        left: -20px;
        width: 20px;
        height: 20px;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .magazine-container {
        margin: 75px 3px 15px;
    }

    .magazine {
        gap: 50px;
    }

    .page-left,
    .page-right {
        padding: 25px 15px;
        margin: 25px 0;
    }

    .page-left {
        margin-bottom: 50px;
    }

    .page-right {
        margin-top: 50px;
    }

    .chapter-title {
        font-size: 1.05rem;
        padding-left: 45px;
        padding-right: 25px;
        margin-left: 20px;
        margin-right: 20px;
    }

    .chapter-title::before {
        left: -18px;
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }
}

@media (max-width: 375px) {
    .magazine-container {
        margin: 70px 2px 12px;
    }

    .page-left,
    .page-right {
        padding: 20px 12px;
        margin: 25px 0;
    }

    .page-left {
        margin-bottom: 45px;
    }

    .page-right {
        margin-top: 45px;
    }

    .chapter-title {
        font-size: 1rem;
        padding-left: 35px;
        padding-right: 20px;
        margin-left: 15px;
        margin-right: 15px;
        margin-bottom: 10px;
    }

    .chapter-title::before {
        left: -20px;
        width: 18px;
        height: 18px;
        font-size: 0.7rem;
    }
}

@media (max-width: 320px) {
    .magazine-container {
        margin: 65px 1px 10px;
    }

    .page-left,
    .page-right {
        padding: 18px 10px;
        margin: 20px 0;
    }

    .page-left {
        margin-bottom: 40px;
    }

    .page-right {
        margin-top: 40px;
    }

    .chapter-title {
        font-size: 0.95rem;
        padding-left: 30px;
        padding-right: 15px;
        margin-left: 10px;
        margin-right: 10px;
    }

    .chapter-title::before {
        left: -18px;
        width: 14px;
        height: 14px;
        font-size: 0.6rem;
    }
}

/* Add visual separation between pages on mobile */
@media (max-width: 992px) {
    .page-left::after {
        content: "";
        position: absolute;
        bottom: -15px;
        left: 50%;
        transform: translateX(-50%);
        width: 60px;
        height: 4px;
        background: linear-gradient(90deg, transparent 0%, #012FB3 50%, transparent 100%);
        border-radius: 2px;
    }
}









@media (max-width: 1200px) {
    .magazine {
        flex-direction: column;
        max-width: 800px;
        margin: 2rem auto;
        box-shadow: 0 8px 40px rgba(0, 0, 0, 0.12);
    }

    .page-left,
    .page-right {
        width: 100%;
        min-height: auto;
        padding: 2.5rem;
    }

    .page-right {
        border-left: none;
        border-top: 2px solid #f0f0f0;
    }

    .magazine-header {
        text-align: center;
        margin-bottom: 2.5rem;
    }

    .magazine-title {
        font-size: 2.5rem;
    }

    .magazine-subtitle {
        font-size: 1.1rem;
    }
}

@media (max-width: 991px) {
    .magazine-container {
        margin-top: 80px;
        padding: 1rem;
    }

    .magazine {
        margin: 1rem auto;
        border-radius: 12px;
    }

    .page-left,
    .page-right {
        padding: 2rem;
    }

    .magazine-title {
        font-size: 2.2rem;
        margin-bottom: 0.75rem;
    }

    .magazine-subtitle {
        font-size: 1rem;
        margin-bottom: 0;
    }

    .magazine-header {
        margin-bottom: 2rem;
    }

    .chapter {
        margin-bottom: 2rem;
    }

    .chapter-title {
        font-size: 1.4rem;
        margin-bottom: 0.75rem;
    }

    .chapter-content {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .objectives-grid,
    .team-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .objective-item,
    .team-item {
        padding: 1.25rem;
    }

    .objective-title,
    .team-role {
        font-size: 1rem;
    }

    .objective-desc,
    .team-desc {
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .magazine-container {
        margin-top: 70px;
        padding: 0.5rem;
    }

    .magazine {
        margin: 0.5rem auto;
        border-radius: 8px;
    }

    .page-left,
    .page-right {
        padding: 1.5rem;
    }

    .magazine-title {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
        line-height: 1.2;
    }

    .magazine-subtitle {
        font-size: 0.9rem;
        line-height: 1.4;
    }

    .magazine-header {
        margin-bottom: 1.5rem;
        padding-bottom: 1rem;
        border-bottom: 2px solid #f0f0f0;
    }

    .chapter {
        margin-bottom: 1.5rem;
    }

    .chapter-title {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
        color: #012FB3;
    }

    .chapter-content {
        font-size: 0.9rem;
        line-height: 1.5;
        margin-bottom: 0.75rem;
    }

    .highlight-box {
        padding: 1rem;
        margin: 0.75rem 0;
        position: relative;
        overflow: hidden;
    }

    .highlight-box::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: #012FB3;
        border-radius: 0;
    }

    .highlight-box::after {
        display: none;
    }

    .objective-item,
    .team-item {
        padding: 1rem;
        border-radius: 8px;
    }

    .objective-icon,
    .team-icon {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .objective-title,
    .team-role {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
        line-height: 1.3;
    }

    .objective-desc,
    .team-desc {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .audience-grid {
        gap: 0.75rem;
    }

    .audience-item {
        padding: 1rem;
        flex-direction: row;
        align-items: center;
    }

    .audience-icon {
        font-size: 1.25rem;
        margin-right: 0.75rem;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .audience-title {
        font-size: 0.85rem;
        line-height: 1.3;
    }

    .why-grid {
        gap: 0.5rem;
    }

    .why-item {
        padding: 0.75rem;
    }

    .why-icon {
        font-size: 1.1rem;
        margin-right: 0.5rem;
    }

    .why-desc {
        font-size: 0.85rem;
        line-height: 1.3;
    }

    .page-number-left,
    .page-number-right {
        font-size: 0.75rem;
        margin-top: 1.5rem;
        padding-top: 1rem;
        border-top: 1px solid #e0e0e0;
    }
}

@media (max-width: 576px) {
    .magazine-container {
        padding: 0.25rem;
    }

    .magazine {
        margin: 0.25rem auto;
        border-radius: 6px;
    }

    .page-left,
    .page-right {
        padding: 1.25rem;
    }

    .magazine-title {
        font-size: 1.6rem;
        line-height: 1.1;
    }

    .magazine-subtitle {
        font-size: 0.85rem;
        line-height: 1.3;
    }

    .magazine-header {
        margin-bottom: 1.25rem;
    }

    .chapter {
        margin-bottom: 1.25rem;
    }

    .chapter-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .chapter-content {
        font-size: 0.85rem;
        line-height: 1.4;
    }

    .highlight-box {
        padding: 0.75rem;
        margin: 0.5rem 0;
        border-left: 3px solid #012FB3;
        border-radius: 0 6px 6px 0;
    }

    .highlight-box::before {
        display: none;
    }

    .chapter-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
        position: static;
    }

    .chapter,
    .highlight-box,
    .chapter-title {
        transform: none;
        will-change: auto;
    }
}

@media (max-width: 400px) {
    .highlight-box {
        padding: 0.5rem;
        border-left-width: 2px;
    }

    .magazine-title {
        font-size: 1.4rem;
    }

    .magazine-subtitle {
        font-size: 0.8rem;
    }

    .chapter-title {
        font-size: 1rem;
    }

    .chapter-content {
        font-size: 0.8rem;
    }

    .objective-item,
    .team-item {
        padding: 0.5rem;
    }

    .objective-title,
    .team-role {
        font-size: 0.85rem;
    }

    .objective-desc,
    .team-desc {
        font-size: 0.75rem;
    }

    .audience-title {
        font-size: 0.75rem;
    }

    .why-desc {
        font-size: 0.75rem;
    }

    .magazine-container *::before,
    .magazine-container *::after {
        transform: none;
        position: static;
    }

    .highlight-box {
        border-left: 2px solid #012FB3;
        background: rgba(1, 47, 179, 0.05);
    }
}

/* Landscape phone orientation */
@media (max-width: 812px) and (orientation: landscape) {

    .highlight-box::before,
    .chapter-title::before,
    .chapter-title::after {
        display: none;
    }

    .highlight-box {
        border-left: 3px solid #012FB3;
        background: rgba(1, 47, 179, 0.05);
    }
}

/* Ensure consistent styling across devices */
@media (hover: none) and (pointer: coarse) {

    .highlight-box,
    .chapter-title {
        position: static;
        transform: none;
    }

    .highlight-box::before,
    .highlight-box::after,
    .chapter-title::before,
    .chapter-title::after {
        display: none;
    }

    .highlight-box {
        border-left: 3px solid #012FB3;
        background: rgba(1, 47, 179, 0.05);
        border-radius: 0 8px 8px 0;
    }
}

/* Accessibility and reduced motion */
@media (prefers-reduced-motion: reduce) {

    .highlight-box::before,
    .chapter-title::before,
    .chapter-title::after {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

/* High contrast mode fixes */
@media (prefers-contrast: high) {
    .highlight-box {
        border: 2px solid #012FB3;
        background: transparent;
    }

    .highlight-box::before {
        display: none;
    }

    .chapter-title {
        color: #000;
        background: rgba(1, 47, 179, 0.1);
        padding: 0.25rem 0.5rem;
        border-radius: 4px;
    }
}

/* Print optimization */
@media print {

    .highlight-box::before,
    .chapter-title::before,
    .chapter-title::after {
        display: none !important;
    }

    .highlight-box {
        border: 1px solid #333;
        background: #f9f9f9;
    }

    .chapter-title {
        color: #000 !important;
        border-bottom: 1px solid #333;
        padding-bottom: 0.25rem;
    }
}

/* Ensure proper stacking context */
.magazine-container {
    position: relative;
    z-index: 1;
}

.highlight-box,
.chapter-title {
    isolation: isolate;
}

/* Additional mobile-specific fixes */
@media (max-width: 768px) {

    .magazine,
    .page-left,
    .page-right,
    .chapter {
        overflow: visible;
        position: relative;
    }

    .highlight-box,
    .chapter-title {
        box-sizing: border-box;
        contain: layout style;
    }

    .highlight-box {
        z-index: auto;
        position: relative;
    }

    .chapter-title {
        z-index: auto;
        position: relative;
    }
}