        @font-face {
            /* This assumes the font is available in the current environment's path */
            font-family: 'TeachersRegular';
            src: url('../../../fonts/Teachers-Regular.ttf') format('ttf');
            font-weight: normal;
            font-style: normal;
        }

        /* --- GLOBAL STYLES --- */
        :root {
            /* --dark-bg: #0d0d0d; */
            --text-color: #ffffff;
            --secondary-text: #d1d5db; /* gray-300 */
            --subtle-text: #6b7280; /* gray-500 */
            --primary-highlight: #d1cfcf; /* Bright accent for links/accents */
            --spacing-xs: 0.5rem;
            --spacing-sm: 1rem;
            --spacing-md: 1.5rem;
            --spacing-lg: 2.5rem;
            --spacing-xl: 5rem;
            --border-radius: 20px; /* Full rounded */
        }

        body {
            font-family: 'TeachersRegular', sans-serif;
            background-color: #263c8b;
            color: var(--text-color); /* Set default text color */
            margin: 0;
            padding: 0;
            line-height: 1.5;
            letter-spacing: 0.06em;
            /* --- FULL-SCREEN, NON-SCROLLING BACKGROUND IMAGE --- */
            background-image: url('../images/pl-bg.png');
            background-repeat: no-repeat;
            background-attachment: fixed;
            background-size: cover;
            background-position: center;
            /* Set body to be the relative context for the absolute overlay */
            position: relative; 
            /* Ensures the main content sits on top of the overlay */
            z-index: 1;
        }

        body::before {
            content: ''; /* Required for pseudo-elements */
            position: fixed; /* Ensures the overlay covers the whole viewport and doesn't scroll */
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
    
            /* Set the overlay color: Black (0, 0, 0) with 50% opacity (0.5) */
            background-color: rgba(0, 0, 0, 0.5); 
    
            /* Place the overlay layer immediately above the background image (z-index: 0)
            but below the body's actual content (z-index: 1) */
            z-index: -1; 
        }

        /* --- FLOATING HEADER (NAVIGATION) STYLES --- */
        .main-header {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            z-index: 50;
            box-sizing: border-box;
            background-color: #0d0d0d;
            padding: 10px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: all 0.3s ease-in-out;
        }

        /* Shared Logo Styles */
        .logo-container {
            /* Fixed size constraint to prevent header height extension */
            width: 50px; 
            max-width: 50px; 
            height: 40px; 
            min-height: 40px;

            /* Use Flexbox to center the image within its container (handles vertical centering) */
            display: flex; 
            justify-content: center; /* Center horizontally */
            align-items: center; /* Center vertically */
        }

        .logo-container img {
            max-width: 100%; /* Constrain width to 50px */
            max-height: 100%; /* Constrain height to 40px */
            object-fit: contain; 
            height: auto; 
            display: block;
            border-radius: 4px;
        }

        /* 1. Left-Aligned Logo (Visible on mobile/default) */
        .left-logo {
            /* Inherits .logo-container styles */
            z-index: 51; 
        }

        /* 2. Centered Logo (Hidden by default on mobile) */
        .centered-logo {
            display: none;
            max-width: none; /* Constrain width to 50px */
            max-height: none; /* Constrain height to 40px */
            object-fit: none; 
        }

        .centered-logo img {
            height: 30px; 
        }
        
        /* Nav Links Container */
        .nav-links {
            display: none;
            flex-direction: column;
            width: 100%;
            position: absolute;
            top: 60px;
            left: 0;
            background-color: var(--dark-bg);
            border-top: 1px solid rgba(255, 255, 255, 0.1);
            padding-bottom: 10px;
        }

        /* Mobile Menu Open State */
        .main-header.nav-open .nav-links {
            display: flex;
        }

        .nav-links a {
            color: var(--text-color);
            text-decoration: none;
            padding: 10px 20px;
            text-align: left;
            transition: background-color 0.2s;
            background-color: #0d0d0d;
        }

        .nav-links a:hover {
            background-color: #1a1a1a;
        }

        /* Mobile Menu Button (Hamburger) */
        .menu-button {
            display: flex;
            flex-direction: column;
            justify-content: space-around;
            width: 30px;
            height: 25px;
            background: none;
            border: none;
            cursor: pointer;
            padding: 0;
        }
        
        .menu-button .icon-bar {
            display: block;
            width: 100%;
            height: 3px;
            background-color: var(--text-color);
            border-radius: 1px;
            transition: all 0.3s linear;
            transform-origin: 1px;
        }
        
        /* --- CAROUSEL / HERO STYLES --- */
        .hero-container {
            position: relative;
            z-index: 5;
            overflow: hidden;
            
            /* Responsive Constraint for Mobile (Max 70% of viewport height) */
            margin-top: 60px;
            min-height: 500px;
            max-height: 70vh; /* Max height for mobile/small screens */

            background-color: var(--dark-bg); 
            display: flex;
            align-items: center; /* Vertically center content */
        }

        .carousel {
            display: flex;
            transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* Smooth slide transition */
            height: 100%;
            width: 100%;
        }

        .slide {
            flex: 0 0 100%; /* Each slide takes up exactly 100% of the carousel width */
            display: flex;
            align-items: center;
            justify-content: center;
            padding: var(--spacing-sm);
            box-sizing: border-box;
            text-align: center;

            /* Inherit max-height from container for mobile constraint */
            min-height: 500px; 
            max-height: 70vh; 
        }

        /* Content inside the slide */
        .hero-content {
            position: relative;
            z-index: 2;
            text-align: center;
            color: var(--text-color);
            padding: var(--spacing-lg);
            max-width: 56rem;
            margin: auto;
            box-sizing: border-box;
        }
        
        .hero-content h1 {
            font-size: 3.75rem;
            font-weight: 800;
            letter-spacing: -0.025em;
            margin-bottom: var(--spacing-md);
            margin-top: 0;
        }
        
        .hero-content p {
            font-size: 1.125rem;
            color: var(--secondary-text);
            margin-bottom: var(--spacing-lg);
        }

        /* Slide specific styles (for visual distinction) */
        #slide-1 { background-color: #1a1a1a; }
        #slide-2 { background-color: #2b2b2b; }
        #slide-3 { background-color: #1a1a1a; }

        /* Carousel Navigation Dots */
        .carousel-dots {
            position: absolute;
            bottom: 20px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 10;
            display: flex;
            gap: 10px;
        }

        .dot {
            width: 10px;
            height: 10px;
            background-color: var(--subtle-text);
            border-radius: 50%;
            cursor: pointer;
            transition: background-color 0.3s, transform 0.3s;
        }

        .dot.active {
            background-color: var(--primary-highlight);
            transform: scale(1.2);
        }

        /* --- BUTTON STYLES (Hero) --- */
        .action-buttons {
            display: flex;
            justify-content: center;
            gap: var(--spacing-sm);
            flex-wrap: wrap; /* Allow wrapping on small screens */
        }

        .action-buttons button {
            padding: 0.75rem 2rem;
            font-size: 1.125rem;
            font-weight: 600;
            border-radius: var(--border-radius);
            box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
            transition: background-color 0.3s, color 0.3s, border-color 0.3s;
            cursor: pointer;
            border: 2px solid transparent;
        }

        .action-buttons button::first-letter {
            font-size: 1.2em;
        }

        .button-primary {
            background-color: var(--text-color);
            color: var(--dark-bg);
            border-color: var(--text-color);
        }
        
        .button-primary:hover {
            background-color: #e5e7eb;
        }

        .button-secondary {
            background-color: transparent;
            color: var(--text-color);
            border-color: var(--text-color);
        }

        .button-secondary:hover {
            background-color: var(--text-color);
            color: var(--dark-bg);
        }

        /* --- PRODUCT CATALOG STYLES --- */
        .book-catalog-grid {
            display: grid; 
            /* Mobile: 1 column */
            grid-template-columns: repeat(1, 1fr); 
            gap: var(--spacing-md);
            max-width: 1200px;
            /* Center the grid block horizontally */
            margin: var(--spacing-lg) auto; 
            
            /* Mobile/Default: Add vertical and horizontal padding to prevent card hover clipping */
            padding: 20px var(--spacing-md); 
            
            /* Force clipping to prevent layout shift outside the container */
            overflow: hidden; 
        }

        .link-box {
            background-color: rgba(255, 255, 255, 0.2);
            border-radius: var(--border-radius);
            padding: var(--spacing-sm);
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
            /* Keep transition minimal for performance and stability */
            transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out; 
            
            width: 100%;
            text-align: center; /* Ensures content is centered within the box */
            cursor: pointer;
            display: flex;
            flex-direction: column; 
            justify-content: space-between;
            
            /* Establish stacking context and hardware acceleration hints */
            position: relative;
            will-change: transform; 
            transform: translateZ(0); 
            backface-visibility: hidden; 
            margin: 0; /* Ensure no unwanted margin on desktop */
        }

        .link-box:hover {
            /* Use scale and z-index for the "lift" */
            transform: scale(1.02) translateZ(10px); 
            box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
            /* Ensure the lifted card is aggressively layered above its neighbors */
            z-index: 10; 
        }

        .box-content-link {
            display: block;
            text-decoration: none;
            position: relative;
            border-radius: 4px;
            overflow: hidden;
            aspect-ratio: 2 / 3;
        }

        .box-image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            border-radius: 4px;
            transition: transform 0.3s ease-in-out;

            /* Force hardware acceleration layer for the image */
            transform: translateZ(0);
        }

        .link-box:hover .box-image {
            /* Apply Z-transform along with scale */
            transform: scale(1.05) translateZ(0);
        }

        .image-overlay {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: none;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.3s ease-in-out;
            pointer-events: none;
            padding: var(--spacing-md);
            box-sizing: border-box;
        }

        .box-content-link:hover .image-overlay {
            opacity: 1;
        }

        .image-overlay p {
            color: var(--subtle-text);
            font-size: 1.25rem;
            font-weight: 500;
            text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
            margin: 0;
            line-height: 1.2;
            text-align: center;
        }

        .box-text-link {
            display: inline-block;
            margin-top: var(--spacing-xs); 
            color: var(--secondary-text); 
            text-decoration: none;
            font-weight: 400;
            padding: 5px 0;
            font-size: 0.9rem;
            transition: color 0.2s;
        }

        .box-text-link:hover {
            color: var(--text-color);
        }

        /* New styles for Price and CTA in the book cards */
        .book-footer {
            padding-top: 0px;
            margin-top: auto; 
            text-align: center;
        }

        .book-footer button::first-letter {
            font-size: 1.2em;
        }

        .book-footer a {
            text-decoration: none; 
            color: #666666; 
            padding: 0.60rem 0.10em; 
            width: 100%; 
            display: block; 
            border-radius: 9999px;
        }
        
        sup {
            font-size: 1rem;
            font-weight: 500;
        }

        .book-price {
            font-size: 2rem;
            font-weight: 700;
            color: var(--primary-highlight);
            margin-bottom: 10px;
            display: block; 
        }

        .btn-grab-now {
            /* padding: 0.5rem 1rem; */
            font-size: 1rem;
            font-weight: 400;
            border-radius: 9999px; 
            background-color: #ffffff;
            color: #000000;
            border: none;
            cursor: pointer;
            transition: background-color 0.2s;
            text-decoration: none;
            /* display: block; */
            width: 100%;
            /* box-sizing: border-box; */
        }

        .btn-grab-now:hover {
            background-color: var(--primary-highlight); 
        }

        .note-text {
            margin-top: var(--spacing-xl);
            font-size: 0.875rem;
            color: var(--subtle-text);
        }

        /* --- ADDITIONAL SCROLLABLE CONTENT (DEMO) --- */
        .additional-content {
            position: relative;
            z-index: 5;
            background-color: var(--dark-bg);
            /* FIX: Removed horizontal padding (10px) to ensure the inner grid centers properly */
            padding: var(--spacing-xl) 0; 
            color: var(--secondary-text);
            text-align: center;
        }
        
        .additional-content h2 {
            font-size: 2.5rem;
            color: var(--text-color);
            margin-bottom: var(--spacing-md);
            font-weight: 400;
            line-height: 1.0;
        }

        /* Typography Helper Classes */
        .link-box h3 {
            margin: 10px 0 0;
        }
        .cap::first-letter {
            font-size: 1.2em;
        }
        .spike {
            font-size: 1.2em;
            vertical-align: -0.08em;
        }
        h3 {
            display: block;
            font-size: 1.17em;
            font-weight: 500;
        }

/* FOOTER BAR */
#social-bar-wrapper {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.5); 
    display: flex;
    justify-content: center;
    padding: 15px 0;
}
#social {
    display: grid;
    grid-template-rows: auto 1fr;
    grid-template-columns: 1fr;
    gap: 10px;
}

#social p {
    margin: 0;
    text-align: center;
    font-family:Verdana, Geneva, sans-serif; 
    color:#cccccc;
    font-size:11px;
}

.social-icons {
    display: flex; 
    justify-content: center;
    align-items: center;
    line-height: 1;
}

.social-icons a {
    margin-right: 10px; 
}
.social-icons a:last-child {
    margin-right: 0;
}

.social-icons img {
    width: 30px; 
    height: 30px;
}

#footer {
    /* position: fixed; */
    bottom: 0;
    width: 100%;
    font-family:Verdana, Geneva, sans-serif; 
    color:#cccccc; 
    font-size:11px; 
    text-align:center; 
    padding-bottom:15px;
    bottommargin: 0;
    background-color: transparent;
    letter-spacing: 0.00em;
  }
  /* END FOOTER BAR */
        
        /* #footer {
            position: relative; 
            width: 100%;
            font-family: Verdana, Geneva, sans-serif; 
            color: #cccccc; 
            font-size: 11px; 
            text-align: center; 
            padding-top: 15px;
            padding-bottom: 15px;
            background-color: var(--dark-bg);
            letter-spacing: 0.00em;
        } */

        /* --- RESPONSIVENESS (Mobile-Only Centering) --- */
        @media (max-width: 767px) {
            .link-box {
                /* Re-introduces constraints ONLY for mobile (single column) */
                max-width: 350px; 
                margin: 0 auto; 
            }
        }

        /* --- RESPONSIVENESS (Desktop breakpoint equivalent) --- */
        @media (min-width: 768px) {
            /* Desktop Hero Height Constraint (Fixed 600px for consistency) */
            .hero-container {
                max-height: 600px;
                min-height: 600px; 
            }
            .slide {
                min-height: 600px;
                max-height: 600px;
            }

            .hero-content h1 {
                font-size: 5rem; /* text-8xl */
            }
            .hero-content p {
                font-size: 1.5rem; /* text-2xl */
            }
            
            .main-header {
                /* Allows space-between for left-link-button layout */
                justify-content: space-between;
                gap: 0;
                padding: 10px 10px; /* Add horizontal padding for space */
            }
            
            /* Show centered logo on desktop */
            .centered-logo {
                display: flex; /* Show the logo container */
                position: absolute;
                left: 50%;
                transform: translateX(-50%); 
            }
            
            .nav-links {
                display: flex;
                flex-direction: row;
                position: static;
                width: auto;
                border-top: none;
                padding-bottom: 0;
            }
            
            .nav-links a {
                padding: 10px 15px;
            }

            .menu-button {
                display: none;
            }

            .book-catalog-grid {
                /* Desktop: 4 columns - using stable track sizing */
                grid-template-columns: repeat(4, minmax(0, 1fr));
                gap: var(--spacing-lg);
                /* Increased padding to a larger value to prevent right-side clipping. */
                padding: var(--spacing-lg); 
                padding-left: 10px;
            }
        }