* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(135deg, #d0d0d0 0%, #e0e0e0 50%, #d0d0d0 100%);
    color: #000000;
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Animated gradient background overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg,
        rgba(102, 126, 234, 0.02) 0%,
        rgba(118, 75, 162, 0.02) 25%,
        rgba(240, 147, 251, 0.02) 50%,
        rgba(118, 75, 162, 0.02) 75%,
        rgba(102, 126, 234, 0.02) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Top Bar with Hamburger */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(240, 240, 240, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 0.75rem 0;
    transition: all 0.3s ease;
}

body.newspaper-mode nav {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo {
    z-index: 1001;
    display: flex;
    align-items: center;
}

.logo-img {
    height: auto;
    width: auto;
    object-fit: contain;
    max-width: 100%;
}

/* Hamburger Menu */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    position: relative;
}

.mobile-menu-toggle span {
    width: 28px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin: 4px 0;
    transition: all 0.3s ease;
    border-radius: 3px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(9px, 9px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(9px, -9px);
}

/* Sidebar Navigation */
.sidebar-nav {
    position: fixed;
    top: 0;
    left: -320px;
    width: 320px;
    height: 100vh;
    background: rgba(240, 240, 240, 0.98);
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.2);
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2rem;
}

.sidebar-nav.active {
    left: 0;
}

.sidebar-header {
    padding: 2rem 1.5rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.sidebar-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.sidebar-logo-img {
    width: auto;
    height: auto;
    object-fit: contain;
    max-width: 100%;
}

.sidebar-subtitle {
    color: #333;
    font-size: 0.85rem;
    text-align: center;
}

.nav-links {
    list-style: none;
    padding: 1rem 0 5rem 0;
}

.nav-links li {
    position: relative;
    margin: 0.25rem 0;
}

.nav-links a {
    display: flex;
    align-items: center;
    color: #000000;
    text-decoration: none;
    padding: 1rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    border-left: 3px solid transparent;
}

.nav-links a:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-left-color: #667eea;
}

.nav-links a.active {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
    border-left-color: #667eea;
}

.nav-links a.external {
    color: #333;
    font-size: 0.95rem;
}

.nav-links a.external:hover {
    color: #f093fb;
    border-left-color: #f093fb;
}

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

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

/* Hide old nav indicator */
.nav-indicator {
    display: none;
}

/* Mobile Nav (deprecated, will use sidebar) */
.mobile-nav {
    display: none;
}

@keyframes slideIn {
    from {
        left: -320px;
    }
    to {
        left: 0;
    }
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    background: radial-gradient(circle at 50% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%);
}

.hero-content {
    max-width: 800px;
    padding: 0 2rem;
    animation: fadeInUp 1s ease-out;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.hero p {
    font-size: 1.3rem;
    color: #000000;
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(102, 126, 234, 0.4);
}

/* Page Content */
.page {
    display: none;
    min-height: 100vh;
    padding: 120px 0 60px;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.page.newspaper-style {
    padding: 0 !important;
}

.page.active {
    display: block;
}

.page.fade-in {
    opacity: 1;
}

.page.fade-out {
    opacity: 0;
}

/* Smooth page transition animations */
@keyframes pageSlideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pageSlideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pageSlideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

@keyframes pageSlideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

.page.slide-in-right {
    animation: pageSlideInRight 0.5s ease-out forwards;
}

.page.slide-in-left {
    animation: pageSlideInLeft 0.5s ease-out forwards;
}

.page.slide-out-left {
    animation: pageSlideOutLeft 0.4s ease-in forwards;
}

.page.slide-out-right {
    animation: pageSlideOutRight 0.4s ease-in forwards;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* About Page */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-bottom: 4rem;
}

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #667eea;
}

.about-text p {
    color: #000000;
    margin-bottom: 1.5rem;
}

.about-image {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 4rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.7);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: var(--glow-y, 50%);
    left: var(--glow-x, 50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease, top 0.1s ease, left 0.1s ease;
    pointer-events: none;
    z-index: 0;
}

.stat-card:hover::after {
    opacity: 1;
}

.stat-card > * {
    position: relative;
    z-index: 1;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #667eea;
    margin-bottom: 0.5rem;
}

/* Products Page */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.product-card {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.product-card:hover {
    background: rgba(255, 255, 255, 0.7);
}

/* Magnetic glow effect */
.product-card::after {
    content: '';
    position: absolute;
    top: var(--glow-y, 50%);
    left: var(--glow-x, 50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease, top 0.1s ease, left 0.1s ease;
    pointer-events: none;
    z-index: 0;
}

.product-card:hover::after {
    opacity: 1;
}

.product-card > * {
    position: relative;
    z-index: 1;
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.product-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.product-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #667eea;
}

.product-card p {
    color: #000000;
    margin-bottom: 1.5rem;
}

.features {
    list-style: none;
}

.features li {
    color: #000000;
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #667eea;
    font-weight: bold;
}

/* Library Page */
.category-section {
    margin-bottom: 4rem;
}

.category-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(102, 126, 234, 0.3);
}

.category-header h2 {
    font-size: 2rem;
    color: #667eea;
    margin: 0;
}

.category-icon {
    font-size: 2.5rem;
    margin-right: 1rem;
}

.ebooks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.ebook-card {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.ebook-card:hover {
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.ebook-card::after {
    content: '';
    position: absolute;
    top: var(--glow-y, 50%);
    left: var(--glow-x, 50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(240, 147, 251, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease, top 0.1s ease, left 0.1s ease;
    pointer-events: none;
    z-index: 0;
}

.ebook-card:hover::after {
    opacity: 1;
}

.ebook-card > * {
    position: relative;
    z-index: 1;
}

.ebook-cover {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border-radius: 10px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
}

.ebook-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.ebook-cover-placeholder {
    z-index: 1;
}

.ebook-card h4 {
    color: #000000;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.ebook-author {
    color: #667eea;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.ebook-description {
    color: #000000;
    font-size: 0.85rem;
    line-height: 1.4;
}

.apps-section {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.app-card {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.app-card:hover {
    background: rgba(255, 255, 255, 0.7);
}

.app-card::after {
    content: '';
    position: absolute;
    top: var(--glow-y, 50%);
    left: var(--glow-x, 50%);
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease, top 0.1s ease, left 0.1s ease;
    pointer-events: none;
    z-index: 0;
}

.app-card:hover::after {
    opacity: 1;
}

.app-card > * {
    position: relative;
    z-index: 1;
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.app-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.app-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #667eea;
}

.app-card p {
    color: #000000;
    margin-bottom: 1rem;
}

.app-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.app-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-form {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #667eea;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    color: #000000;
    font-size: 1rem;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    background: rgba(255, 255, 255, 0.95);
}

.contact-info h3 {
    color: #667eea;
    margin-bottom: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    color: #000000;
}

.contact-item span {
    margin-right: 1rem;
    font-size: 1.2rem;
}

/* Enhanced floating particles */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(0.5px);
    transition: all 0.3s ease;
}

.particle.small {
    width: 3px;
    height: 3px;
    background: rgba(102, 126, 234, 0.6);
    animation: float 8s ease-in-out infinite;
}

.particle.medium {
    width: 6px;
    height: 6px;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.8) 0%, rgba(102, 126, 234, 0.4) 100%);
    animation: float 10s ease-in-out infinite;
}

.particle.large {
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, rgba(240, 147, 251, 0.9) 0%, rgba(118, 75, 162, 0.3) 100%);
    animation: float 12s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(240, 147, 251, 0.5);
}

.particle.star {
    width: 10px;
    height: 10px;
    background: transparent;
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    background: linear-gradient(135deg, #667eea 0%, #f093fb 100%);
    animation: float 15s ease-in-out infinite, twinkle 2s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) translateX(0px) rotate(0deg);
        opacity: 0.4;
    }
    25% {
        transform: translateY(-30px) translateX(10px) rotate(90deg);
        opacity: 0.8;
    }
    50% {
        transform: translateY(-50px) translateX(-10px) rotate(180deg);
        opacity: 1;
    }
    75% {
        transform: translateY(-30px) translateX(-20px) rotate(270deg);
        opacity: 0.6;
    }
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Particle canvas for connections */
#particleCanvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

/* Parallax Elements */
.parallax-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.parallax-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.15;
    will-change: transform;
    transition: transform 0.1s ease-out;
}

.parallax-shape.circle-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.4) 0%, transparent 70%);
    top: 10%;
    left: -10%;
}

.parallax-shape.circle-2 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(118, 75, 162, 0.4) 0%, transparent 70%);
    top: 50%;
    right: -5%;
}

.parallax-shape.circle-3 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(240, 147, 251, 0.3) 0%, transparent 70%);
    bottom: -10%;
    left: 20%;
}

.parallax-shape.book {
    width: 200px;
    height: 250px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    border-radius: 10px;
    filter: blur(5px);
    opacity: 0.2;
}

.parallax-shape.book-1 {
    top: 20%;
    right: 15%;
    transform: rotate(15deg);
}

.parallax-shape.book-2 {
    bottom: 30%;
    left: 10%;
    transform: rotate(-20deg);
}

.parallax-shape.book-3 {
    top: 60%;
    right: 25%;
    transform: rotate(10deg);
}

/* Parallax for page sections */
.page {
    position: relative;
}

.page .parallax-container {
    position: absolute;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Scroll-triggered animations */
.scroll-animate {
    opacity: 0;
    transition: none;
}

.scroll-animate.animate-in {
    animation-duration: 0.8s;
    animation-fill-mode: both;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Fade up animation */
@keyframes scrollFadeUp {
    from {
        opacity: 0;
        transform: translateY(60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-animate.fade-up.animate-in {
    animation-name: scrollFadeUp;
}

/* Fade down animation */
@keyframes scrollFadeDown {
    from {
        opacity: 0;
        transform: translateY(-60px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.scroll-animate.fade-down.animate-in {
    animation-name: scrollFadeDown;
}

/* Fade left animation */
@keyframes scrollFadeLeft {
    from {
        opacity: 0;
        transform: translateX(60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.scroll-animate.fade-left.animate-in {
    animation-name: scrollFadeLeft;
}

/* Fade right animation */
@keyframes scrollFadeRight {
    from {
        opacity: 0;
        transform: translateX(-60px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.scroll-animate.fade-right.animate-in {
    animation-name: scrollFadeRight;
}

/* Scale up animation */
@keyframes scrollScaleUp {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scroll-animate.scale-up.animate-in {
    animation-name: scrollScaleUp;
}

/* Rotate in animation */
@keyframes scrollRotateIn {
    from {
        opacity: 0;
        transform: rotate(-10deg) scale(0.9);
    }
    to {
        opacity: 1;
        transform: rotate(0) scale(1);
    }
}

.scroll-animate.rotate-in.animate-in {
    animation-name: scrollRotateIn;
}

/* Staggered animation delays */
.scroll-animate.delay-1 { animation-delay: 0.1s; }
.scroll-animate.delay-2 { animation-delay: 0.2s; }
.scroll-animate.delay-3 { animation-delay: 0.3s; }
.scroll-animate.delay-4 { animation-delay: 0.4s; }
.scroll-animate.delay-5 { animation-delay: 0.5s; }
.scroll-animate.delay-6 { animation-delay: 0.6s; }

/* Typing Effect */
.typing-container {
    display: inline-block;
    position: relative;
}

.typing-text {
    display: inline;
}

.typing-cursor {
    display: inline-block;
    width: 3px;
    height: 1.2em;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    margin-left: 2px;
    animation: blink 0.8s infinite;
    vertical-align: middle;
    box-shadow: 0 0 10px rgba(102, 126, 234, 0.5);
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.hero p {
    min-height: 2.5rem;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .sidebar-nav {
        width: 280px;
        left: -280px;
    }


    .nav-container {
        padding: 0 1rem;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .ebooks-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
    }

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

    .page-title {
        font-size: 2rem;
    }

    .category-header h2 {
        font-size: 1.5rem;
    }

    .category-icon {
        font-size: 2rem;
    }

    .container {
        padding: 0 1rem;
    }

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

    .ebook-cover {
        height: 250px;
    }
}

/* ===========================
   AMAZON ASSOCIATES INTEGRATION
   =========================== */

/* Ebook Action Buttons */
.ebook-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.ebook-btn {
    flex: 1;
    min-width: 120px;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
}

.ebook-btn.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.ebook-btn.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.ebook-btn.amazon {
    background: linear-gradient(135deg, #FF9900 0%, #FF7700 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 153, 0, 0.3);
}

.ebook-btn.amazon:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 153, 0, 0.5);
}

/* Amazon Section */
.amazon-section {
    margin-top: 4rem;
    padding: 3rem 0;
    border-top: 2px solid rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.02) 0%, rgba(255, 119, 0, 0.02) 100%);
    border-radius: 20px;
}

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

/* Filter Tabs */
.amazon-filters {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 153, 0, 0.3);
    border-radius: 25px;
    color: #000000;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: rgba(255, 153, 0, 0.1);
    border-color: #FF9900;
    color: #FF9900;
}

.filter-btn.active {
    background: linear-gradient(135deg, #FF9900 0%, #FF7700 100%);
    border-color: #FF9900;
    color: white;
    box-shadow: 0 4px 15px rgba(255, 153, 0, 0.3);
}

/* Amazon Products Grid */
.amazon-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Amazon Product Card */
.amazon-product-card {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid rgba(255, 153, 0, 0.2);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    perspective: 1000px;
    opacity: 1;
    transform: scale(1);
}

.amazon-product-card:hover {
    background: rgba(255, 255, 255, 0.7);
    border-color: #FF9900;
    box-shadow: 0 10px 30px rgba(255, 153, 0, 0.3);
    transform: translateY(-5px) scale(1.02);
}

.amazon-product-card::after {
    content: '';
    position: absolute;
    top: var(--glow-y, 50%);
    left: var(--glow-x, 50%);
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(255, 153, 0, 0.25) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease, top 0.1s ease, left 0.1s ease;
    pointer-events: none;
    z-index: 0;
}

.amazon-product-card:hover::after {
    opacity: 1;
}

.amazon-product-card > * {
    position: relative;
    z-index: 1;
}

/* Amazon Badge */
.amazon-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #FF9900 0%, #FF7700 100%);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 2px 10px rgba(255, 153, 0, 0.4);
    z-index: 2;
}

/* Product Image */
.product-image {
    width: 100%;
    height: 320px;
    background: linear-gradient(135deg, rgba(255, 153, 0, 0.1) 0%, rgba(255, 119, 0, 0.1) 100%);
    border-radius: 10px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 153, 0, 0.2);
    overflow: hidden;
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.amazon-product-card:hover .product-image img {
    transform: scale(1.05);
}

/* Product Details */
.amazon-product-card h4 {
    color: #000000;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    min-height: 2.5rem;
}

.product-author {
    color: #FF9900;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.product-rating {
    color: #FFD700;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.product-price {
    color: #667eea;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 1rem 0;
}

/* Amazon Buy Button */
.amazon-buy-btn {
    display: inline-block;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, #FF9900 0%, #FF7700 100%);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 153, 0, 0.3);
    margin-top: 1rem;
}

.amazon-buy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(255, 153, 0, 0.5);
    background: linear-gradient(135deg, #FFB733 0%, #FF9900 100%);
}

/* Loading Spinner */
.loading-spinner {
    text-align: center;
    padding: 3rem;
    color: #FF9900;
    font-size: 1.2rem;
    font-weight: 600;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Amazon Disclaimer */
.amazon-disclaimer {
    text-align: center;
    margin-top: 2rem;
    padding: 1rem;
    background: rgba(255, 153, 0, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 153, 0, 0.2);
}

.amazon-disclaimer p {
    color: #000000;
    font-size: 0.9rem;
    margin: 0;
}

/* ===========================
   END AMAZON INTEGRATION
   =========================== */

/* ===========================
   NEWSPAPER FRONT PAGE DESIGN
   =========================== */

/* Import classic newspaper fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700;900&family=Merriweather:wght@300;400;700&family=Old+Standard+TT:wght@400;700&family=UnifrakturMaguntia&display=swap');

/* Hide navigation for newspaper style home page */
body.newspaper-mode nav,
body.newspaper-mode .sidebar-nav,
body.newspaper-mode .sidebar-overlay {
    display: none !important;
}

/* Change body background for newspaper mode - LIGHT THEME */
body.newspaper-mode {
    background: #f4f1e8 !important;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.015) 2px,
        rgba(0,0,0,0.015) 4px
    ) !important;
}

body.newspaper-mode::before {
    display: none !important;
}

/* DARK THEME for newspaper mode */
body.newspaper-mode.dark-theme {
    background: #1a1a1a !important;
    background-image: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(255,255,255,0.02) 2px,
        rgba(255,255,255,0.02) 4px
    ) !important;
}

/* Dark theme text colors */
body.newspaper-mode.dark-theme .masthead-title,
body.newspaper-mode.dark-theme .article-headline,
body.newspaper-mode.dark-theme .section-header,
body.newspaper-mode.dark-theme .classified-title,
body.newspaper-mode.dark-theme .article-text,
body.newspaper-mode.dark-theme .article-text p,
body.newspaper-mode.dark-theme .classified-item {
    color: #e8e5dc !important;
}

body.newspaper-mode.dark-theme .masthead-tagline,
body.newspaper-mode.dark-theme .masthead-details,
body.newspaper-mode.dark-theme .article-byline {
    color: #b0b0b0 !important;
}

body.newspaper-mode.dark-theme .article-byline-date {
    color: #888 !important;
}

/* Dark theme borders and dividers */
body.newspaper-mode.dark-theme .newspaper-masthead,
body.newspaper-mode.dark-theme .newspaper-lead,
body.newspaper-mode.dark-theme .newspaper-section,
body.newspaper-mode.dark-theme .newspaper-divider {
    border-color: #444 !important;
}

body.newspaper-mode.dark-theme .masthead-details {
    border-top-color: #444 !important;
}

body.newspaper-mode.dark-theme .masthead-ornament,
body.newspaper-mode.dark-theme .newspaper-divider {
    background: #444 !important;
}

body.newspaper-mode.dark-theme .section-header {
    border-bottom-color: #8b7355 !important;
}

/* Dark theme article cards */
body.newspaper-mode.dark-theme .newspaper-article {
    background: rgba(255, 255, 255, 0.03) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

body.newspaper-mode.dark-theme .newspaper-article:hover {
    background: rgba(255, 255, 255, 0.06) !important;
}

/* Dark theme classifieds */
body.newspaper-mode.dark-theme .newspaper-classifieds {
    background: rgba(139, 115, 85, 0.1) !important;
    border-color: #8b7355 !important;
}

body.newspaper-mode.dark-theme .classified-item {
    border-bottom-color: rgba(139, 115, 85, 0.3) !important;
}

/* Dark theme links */
body.newspaper-mode.dark-theme .newspaper-cta {
    color: #e8e5dc !important;
}

body.newspaper-mode.dark-theme .newspaper-cta:hover {
    color: #8b7355 !important;
}

body.newspaper-mode.dark-theme .newspaper-footer a {
    color: #8b7355 !important;
}

/* Dark theme pull quote */
body.newspaper-mode.dark-theme .article-pullquote {
    color: #c9a86a !important;
    border-left-color: #c9a86a !important;
}

/* Dark theme drop cap */
body.newspaper-mode.dark-theme .article-text p:first-of-type::first-letter {
    color: #c9a86a !important;
}

/* Show navigation on other pages */
body:not(.newspaper-mode) nav,
body:not(.newspaper-mode) .sidebar-nav {
    display: block;
}

/* Return to Front Page button for other pages */
.return-to-front-page {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #8b7355;
    color: #f4f1e8;
    padding: 1rem 2rem;
    border: 3px double #1a1a1a;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.return-to-front-page:hover {
    background: #6b5344;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgba(0,0,0,0.25);
}

body.newspaper-mode .return-to-front-page {
    display: none;
}

@media (max-width: 768px) {
    .return-to-front-page {
        bottom: 1rem;
        right: 1rem;
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    top: 2rem;
    right: 2rem;
    background: transparent;
    border: 2px solid #2c2c2c;
    padding: 0.75rem 1.5rem;
    font-family: 'Merriweather', Georgia, serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: #2c2c2c;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2000;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 4px;
}

.theme-toggle:hover {
    background: #2c2c2c;
    color: #f4f1e8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Dark theme toggle button styling */
body.dark-theme .theme-toggle {
    border-color: #e8e5dc;
    color: #e8e5dc;
}

body.dark-theme .theme-toggle:hover {
    background: #e8e5dc;
    color: #1a1a1a;
}

/* Hide theme toggle on non-newspaper pages */
body:not(.newspaper-mode) .theme-toggle {
    display: none;
}

@media (max-width: 768px) {
    .theme-toggle {
        top: 1rem;
        right: 1rem;
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Newspaper Hero/Home Page Override */
#home.newspaper-style {
    padding-top: 0 !important;
    margin-top: 0 !important;
}

#home.newspaper-style .hero {
    background: transparent; /* Body handles background now */
    min-height: 100vh;
    padding: 0 0 60px; /* No top padding at all */
    margin: 0;
    height: auto;
}

/* Newspaper Masthead */
.newspaper-masthead {
    text-align: center;
    border-bottom: 4px double #2c2c2c;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #f4f1e8 0%, #ebe8df 100%);
}

.masthead-ornament {
    width: 120px;
    height: 3px;
    background: #2c2c2c;
    margin: 0 auto 1rem;
}

.masthead-title {
    font-family: 'UnifrakturMaguntia', 'Old English Text MT', 'Blackletter', serif;
    font-size: 5.5rem;
    font-weight: 400;
    color: #1a1a1a;
    margin: 1rem 0;
    letter-spacing: 0.05em;
    line-height: 1.1;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.05);
}

.masthead-tagline {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1rem;
    color: #4a4a4a;
    font-style: italic;
    margin: 0.5rem 0;
    font-weight: 300;
    letter-spacing: 0.05em;
}

.masthead-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #2c2c2c;
    font-family: 'Merriweather', Georgia, serif;
    font-size: 0.85rem;
    color: #4a4a4a;
}

.masthead-date,
.masthead-edition,
.masthead-location {
    flex: 1;
}

.masthead-date {
    text-align: left;
}

.masthead-edition {
    text-align: center;
    font-weight: 700;
}

.masthead-location {
    text-align: right;
}

/* Newspaper Container */
.newspaper-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 2rem 0 2rem;
    background: transparent;
}

/* Newspaper Grid Layout */
.newspaper-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

/* Lead Story - Full Width */
.newspaper-lead {
    grid-column: 1 / -1;
    border-bottom: 3px double #2c2c2c;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

/* Three-column sections */
.newspaper-col-4 {
    grid-column: span 4;
}

/* Two-column sections */
.newspaper-col-6 {
    grid-column: span 6;
}

/* Full-width sections */
.newspaper-col-12 {
    grid-column: span 12;
}

/* Article Styling */
.newspaper-article {
    position: relative;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.4);
    border: 1px solid rgba(44, 44, 44, 0.15);
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.newspaper-article:hover {
    background: rgba(255, 255, 255, 0.7);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.newspaper-article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #8b7355 0%, #6b5344 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.newspaper-article:hover::before {
    opacity: 1;
}

/* Article Headlines */
.article-headline {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 900;
    color: #1a1a1a;
    line-height: 1.1;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.article-headline-large {
    font-size: 3.5rem;
}

.article-headline-medium {
    font-size: 2rem;
}

.article-headline-small {
    font-size: 1.5rem;
}

/* Article Byline */
.article-byline {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
    font-style: italic;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.article-byline-author {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-style: normal;
}

.article-byline-date {
    color: #888;
}

/* Article Text */
.article-text {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 1rem;
    line-height: 1.8;
    color: #2c2c2c;
    text-align: justify;
}

.article-text p {
    margin-bottom: 1rem;
}

/* Drop Cap for first letter */
.article-text p:first-of-type::first-letter {
    font-family: 'Playfair Display', serif;
    font-size: 4rem;
    font-weight: 900;
    line-height: 0.85;
    float: left;
    margin: 0.1rem 0.5rem 0 0;
    color: #8b7355;
}

/* Newspaper Sections */
.newspaper-section {
    border-bottom: 2px solid #2c2c2c;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.section-header {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-bottom: 3px solid #8b7355;
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
}

/* Newspaper Divider */
.newspaper-divider {
    width: 100%;
    height: 3px;
    background: #2c2c2c;
    margin: 2rem 0;
    position: relative;
}

.newspaper-divider::before,
.newspaper-divider::after {
    content: '❖';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #f4f1e8;
    padding: 0 1rem;
    color: #8b7355;
    font-size: 1.2rem;
}

.newspaper-divider::before {
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Article Image */
.article-image {
    width: 100%;
    margin: 1.5rem 0;
    border: 1px solid #2c2c2c;
    padding: 0.5rem;
    background: white;
}

.article-image img {
    width: 100%;
    height: auto;
    display: block;
    filter: sepia(0.15) contrast(1.1);
}

.article-image-caption {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    margin-top: 0.5rem;
    text-align: center;
}

/* Classified Ads Style Section */
.newspaper-classifieds {
    background: rgba(139, 115, 85, 0.05);
    border: 2px solid #8b7355;
    padding: 1.5rem;
    margin: 2rem 0;
}

.classified-item {
    font-family: 'Merriweather', Georgia, serif;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #2c2c2c;
    padding: 0.75rem 0;
    border-bottom: 1px dotted #8b7355;
}

.classified-item:last-child {
    border-bottom: none;
}

.classified-title {
    font-weight: 700;
    text-transform: uppercase;
    color: #1a1a1a;
}

/* Pull Quote */
.article-pullquote {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-style: italic;
    color: #8b7355;
    border-left: 4px solid #8b7355;
    padding-left: 1.5rem;
    margin: 2rem 0;
    line-height: 1.4;
}

/* Newspaper Footer */
.newspaper-footer {
    border-top: 4px double #2c2c2c;
    padding: 2rem 0;
    text-align: center;
    font-family: 'Merriweather', Georgia, serif;
    font-size: 0.9rem;
    color: #666;
    margin-top: 3rem;
}

/* Call to Action - Newspaper Style (Text Links) */
.newspaper-cta {
    display: inline;
    background: transparent;
    color: #1a1a1a;
    padding: 0;
    border: none;
    font-family: 'Merriweather', Georgia, serif;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: underline;
    text-transform: none;
    letter-spacing: normal;
    transition: all 0.2s ease;
    box-shadow: none;
}

.newspaper-cta:hover {
    background: transparent;
    color: #8b7355;
    transform: none;
    box-shadow: none;
    text-decoration: underline;
}

/* Mobile Responsiveness for Newspaper */
@media (max-width: 992px) {
    .newspaper-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .newspaper-col-4 {
        grid-column: span 6;
    }

    .masthead-title {
        font-size: 4rem;
    }

    .article-headline-large {
        font-size: 2.5rem;
    }

    .article-headline {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .newspaper-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .newspaper-col-4,
    .newspaper-col-6,
    .newspaper-col-12 {
        grid-column: span 1;
    }

    .masthead-title {
        font-size: 2.8rem;
    }

    .masthead-details {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .masthead-date,
    .masthead-edition,
    .masthead-location {
        text-align: center;
    }

    .article-headline-large {
        font-size: 2rem;
    }

    .article-headline {
        font-size: 1.5rem;
    }

    .article-headline-medium {
        font-size: 1.5rem;
    }

    .article-headline-small {
        font-size: 1.25rem;
    }

    .newspaper-container {
        padding: 0 1rem;
    }

    .article-text p:first-of-type::first-letter {
        font-size: 3rem;
    }
}

/* ===========================
   END NEWSPAPER DESIGN
   =========================== */

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .cta-button {
        font-size: 1rem;
        padding: 0.875rem 1.75rem;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .category-header h2 {
        font-size: 1.25rem;
    }

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

    .ebook-cover {
        height: 200px;
    }

    .product-card,
    .app-card {
        padding: 1.5rem;
    }

    .stat-card {
        padding: 1.5rem;
    }

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

    /* Amazon Mobile Styles */
    .amazon-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.85rem;
    }

    .amazon-products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-image {
        height: 250px;
    }

    .ebook-actions {
        flex-direction: column;
    }

    .ebook-btn {
        width: 100%;
    }
}
