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


/* Text */
body {
    font-family: sans-serif;
}


p {
    display: block;
    margin-top: 0;
    margin-bottom: 1.5em; /* This creates the paragraph gap */
    line-height: 1.6;      /* This adds space between individual lines of text */
}

h1 {
    margin-bottom: 2rem;
    color: #333;
    text-align: left;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: space-between;
    align-items: center;
}

/* Links*/
a {
    color: #8b0000; 
    text-decoration: none;
    transition: all 0.3s ease-in-out; /* Makes the hover feel 'soft' */
    position: relative;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent;
}


a:hover {
    color: #8b0000; 
    border-bottom: 1px solid #8b0000;
    opacity: 1.0;
}



/*////////////////////*/
/* Navigation and Header Styling */
/* New class specifically for the Header layout */
.header-row {
    display: flex;
    justify-content: space-between; /* Pushes logo left, nav right */
    align-items: center;           /* Centers them vertically */
    padding: 10px 0;
}

.main-header {
    background: #ffffff;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo img {
    height: 100px; /* Adjust based on your logo size */
    display: block;
}

/* Desktop Navigation */
nav ul {
    display: flex;
    list-style: none;
}

nav li {
    margin-left: 2rem;
}

nav a {
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

/* Mobile Toggle of the navigation button (Hidden on Desktop) */
.nav-toggle {
    display: none;
}

.nav-toggle-label {
    display: none;
    cursor: pointer;
}
/*////////////////////*/


/* The Author Image Class for the Author Page*/
.author-bio-img {
    float: left;            /* This allows text to wrap around the right side */
    width: 100%; 
    max-width: 300px;
    height: auto;
    margin: 0 20px 10px 0;  /* Adds space to the right and bottom so text doesn't touch the image */
    border: 1px solid #dcdcdc; 
    padding: 5px;
    background-color: #fff;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.05);
}

/* Clearfix for the container */
.author-profile-container::after {
    content: "";
    display: table;
    clear: both;
}





/* Author (Team) Section Container */
.team-section {
    padding: 2rem 0;
    text-align: center;
}

/* The Grid System */
.faces-grid {
    display: grid !important;
    /* This line is the "magic": it creates as many 250px columns as will fit */
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    width: 100%;
    margin: 0 auto;

}

.faces-grid .face-image {
    width: 100%;
    height: auto;
    /* Forces the container to stay square regardless of screen width */
    aspect-ratio: 1 / 1; 
    /* Ensures the photo fills the square nicely */
    object-fit: cover;
    /* Keeps everything inside the square */
    overflow: hidden;    
    /* Clean up any previously set fixed heights */
    display: block;
}

/* Individual Card Styling */
.face-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Force the image to ignore all hover-based lighting shifts */
.face-card:hover .face-image img {
    opacity: 1 !important;
    filter: brightness(100%) contrast(100%) !important;
    -webkit-backface-visibility: hidden; /* Prevents the 'flash' during transform */
    transform: translateY(-5px);
}


/* Responsive Image Handling */
.face-image img {
    width: 100%;
    height: 100%; /* Fixed height for uniformity */
    object-fit: cover; /* Crops image to fit the box without stretching */
    display: block;
}

.face-bio {
    padding: 1.5rem;
    text-align: left;
}

.face-bio h3 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.face-bio p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #666;
}


/* Footer Background & Spacing */
.main-footer {
    background: #1a1a1a;
    color: #ffffff;
    padding: 3rem 0 1rem 0;
    margin-top: 4rem; /* Pushes footer away from content */
}

/* Layout for Footer Columns */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    /* This ensures all columns start at the top */
    align-items: start; 
}

.footer-col h3, .footer-col h4 {
    margin-bottom: 1.2rem;
    color: #f4f4f4;
}

.footer-col ul {
    list-style: none; /* Removes bullets */
    padding: 0;       /* Removes the 40px indentation */
    margin: 0;        /* Removes default top/bottom spacing */
}

/* links perfectly flush with the 'Information' header */
.footer-col li {
    margin-left: 0;
    padding-left: 0;
}

.footer-col a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: #fff;
}


/* Bottom Bar */
.footer-bottom {
    text-align: center;
    border-top: 1px solid #333;
    margin-top: 2rem;
    padding-top: 1rem;
    font-size: 0.85rem;
    color: #777;
}


.inside-content {
    line-height: 1.6;
    color: #333;
    max-width: 800px; /* Limits width for better readability */
    margin: 0 auto;   /* Centers the text block */
    padding: 20px;
}


/* Styling for text-heavy content pages */

h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    color: #2c3e50;
}

ul {
    margin-bottom: 1.5rem;
    padding-left: 20px;
}

li {
    margin-bottom: 0.5rem;
}

/* Container to center the button if needed */
.cta-container {
    text-align: center;
    padding: 3rem 0;
}

/* The "Classy" Button */
.btn-preorder {
    display: inline-block;
    background-color: #8b0000; /* Deep Oxblood */
    color: #ffffff !important; /* Forces white text */
    padding: 18px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    border-radius: 0; /* Sharp corners feel more like a book spine */
    border: 1px solid #8b0000;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

/* Hover State: Subtle Lift and Color Shift */
.btn-preorder:hover {
    background-color: #ffffff;
    color: #8b0000 !important;
    transform: translateY(-3px); /* Subtle lift */
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
    border: 1px solid #8b0000;
}

/* Subtext under the button */
.cta-subtext {
    display: block;
    margin-top: 15px;
    font-size: 0.85rem;
    color: #666;
    font-style: italic;
    letter-spacing: 0.5px;
}

.slider-container {
    position: relative;
    max-width: 100%;
    margin: auto;
    overflow: hidden;
}

.slide {
    display: none;
    position: relative;
    width: 100%;
}

.slide.active {
    display: block;
    animation: fade 1.5s;
}

.slide img {
    width: 100%;
    height: auto;
    display: block;
}

/* Text Overlay */
.caption {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    background: #ff4500;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 10px;
}

/* Dots */
.dots {
    text-align: center;
    position: absolute;
    bottom: 20px;
    width: 100%;
}

.dot {
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
}

.dot.active { background-color: #717171; }

@keyframes fade {
    from { opacity: 0.4; } 
    to { opacity: 1; }
}

.book-page-image {
    /* 1. Responsiveness */
    display: block;
    max-width: 100%;    /* Never wider than its container */
    height: auto;       /* Maintains the 16:9 aspect ratio automatically */
    
    /* 2. Desktop Constraints */
    /* Prevents a 1920px image from filling the entire 4K monitor */
    margin: 20px auto;  /* Centers the image with some breathing room */
    width: 800px;       /* Set your preferred "ideal" desktop width here */
    
    /* 3. Aesthetics */
    border-radius: 4px; /* Optional: Softens the edges like a book page */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* Adds depth */
    
    /* 4. Quality Control */
    object-fit: contain;
    image-rendering: high-quality;
}


.catalog-item {
    width: 300px; /* Adjust this to your desired catalog column width */
    margin: 20px;
    text-align: center;
}

.image-wrapper {
    width: 100%;
    height: 400px; /* Set a fixed height for the 'catalog' look */
    overflow: hidden;
    border-radius: 8px;
    background-color: #f4f4f4; /* Placeholder color while loading */
}

.book-page-image {
    width: 100%;
    height: 100%;
    /* This is the magic line that keeps your book centered */
    object-fit: cover; 
    object-position: center; 
    
    display: block;
    transition: transform 0.3s ease; /* Adds a nice hover effect */
}

/* Hover effect to make it feel interactive */
.catalog-item:hover .book-page-image {
    transform: scale(1.05);
}

.item-details {
    padding: 15px 0;
}


.catalog-section {
    padding: 50px 20px;
    max-width: 1200px;
    margin: 0 auto;
    font-family: sans-serif;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2.5rem;
}

/* The Grid Container */
.catalog-grid {
    display: grid;
    /* This line creates columns that are at least 280px wide, 
       filling the space automatically */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

/* Individual Cards */
.catalog-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.catalog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Centering the 1920x1080 image */
.image-box {
    width: 100%;
    aspect-ratio: 3 / 4; /* Gives it a "Book" or "Portrait" look */
    overflow: hidden;
    background: #f9f9f9;
}

.image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;    /* Crops the sides of your wide image to center the book */
    object-position: center;
}

.card-content {
    padding: 20px;
    text-align: center;
}

.card-content h3 {
    margin: 0 0 10px;
    font-size: 1.25rem;
}

.category {
    color: #888;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.price {
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

/* Styled Button */
.btn-catalog {
    display: inline-block;
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.2s;
}

.btn-catalog:hover {
    background-color: #555;
}


/* --- Mobile Adjustments --- */

/* Tablet & Mobile (below 768px) */
@media screen and (max-width: 768px) {
    .nav-toggle-label {
        display: block;
        padding: 10px;
    }

    .nav-toggle-label span,
    .nav-toggle-label span::before,
    .nav-toggle-label span::after {
        display: block;
        background: #333;
        height: 2px;
        width: 25px;
        position: relative;
    }

    .nav-toggle-label span::before,
    .nav-toggle-label span::after {
        content: '';
        position: absolute;
    }

    .nav-toggle-label span::before { bottom: 7px; }
    .nav-toggle-label span::after { top: 7px; }

    /* Hide menu off-screen by default */
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        background: #fff;
        width: 100%;
        transform: scale(1, 0);
        transform-origin: top;
        transition: transform 300ms ease-in-out;
    }

    nav ul {
        flex-direction: column;
    }

    nav li {
        margin: 0;
        border-bottom: 1px solid #eee;
    }

    nav a {
        display: block;
        padding: 1.5rem;
    }

    /* Show menu when checkbox is checked */
    .nav-toggle:checked ~ nav {
        transform: scale(1, 1);
    }

    .book-page-image {
        width: 100%;    /* On small screens, use the full available width */
        margin: 10px 0; /* Reduce margins for cramped screens */
        box-shadow: none; /* Optional: cleaner look for mobile */
    }

    .author-bio-img {
        float: left; /* Image sits to the left of text */
        margin: 0 20px 10px 0; /* Space to the right and bottom */
        max-width: 200px;
	width: 100%;
	height: auto;
	border: 1px solid #dcdcdc;
	padding: 2px;
	background-color: #fff;
	box-shadow: 2px 2px 10px rgba(0,0,0,0.05);

    }
    
    /* Clears the float so the next element doesn't wrap weirdly */
    .author-profile-container::after {
        content: "";
        display: table;
        clear: both;
    }

    .footer-grid {
        text-align: center;
	/* Prevents the squares from becoming too cramped or oversized */
        grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
        gap: 10px;
    }

}
