/* 
  Design System for Edson Gomes - Author Website
  Colors: #1E3A5F (Dark Blue), #FFFFFF (White), #F5F7FA (Light Gray), #FF7A00 (Orange)
  Fonts: Playfair Display (Titles), Inter (Text)
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --primary: #1E3A5F;
    --secondary: #FFFFFF;
    --bg-light: #F5F7FA;
    --accent: #FF7A00;
    --accent-hover: #E66E00;
    --text-dark: #1A1A1A;
    --text-muted: #4A5568;
    --font-title: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

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

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--secondary);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-title);
    color: var(--primary);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1400px;
    /* Increased to occupy more screen space */
    margin: 0 auto;
    padding: 0 2rem;
}

/* --- Navigation --- */
nav {
    background: var(--secondary);
    padding: 0.2rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Offset for fixed navbar */
#home-page .hero, 
#books-page .about-header, 
#about-page .about-header,
#detail-page .book-details {
    margin-top: 105px; /* Adjusted for larger logo */
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.logo img {
    height: 90px; /* Increased by 20% from 75px */
    width: auto;
}

.nav-links {
    display: flex;
    gap: 2.5rem;
}

.nav-links a {
    font-weight: 600;
    font-size: 1.3rem;
    /* Increased to match the 20% scale */
    color: var(--text-muted);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

/* --- Hero Section --- */
.hero,
.about-header {
    background-color: var(--primary);
    color: var(--secondary);
    padding: 6rem 0;
    display: flex;
    align-items: center;
    min-height: 500px;
    /* Increased to ensure consistency across all pages */
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content h1,
.about-header h1,
.detail-content h1 {
    font-size: 5rem;
    /* Increased slightly for more impact on all pages */
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

.hero-logo img {
    max-width: 450px;
    height: auto;
    margin-bottom: 2rem;
}

.hero-content p,
.about-header p {
    font-size: 1.3rem;
    /* Matched size */
    color: var(--secondary);
    margin-bottom: 2.5rem;
    padding-left: 1.5rem;
}

.hero-content p,
.about-header p {
    border-left: 4px solid var(--accent);
}

.hero-image img {
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    max-height: 600px;
    /* Increased to better fill the larger container */
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Removed white bars by filling the space */
    display: block;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--secondary);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 122, 0, 0.3);
}

.btn-outline {
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background-color: var(--primary);
    color: var(--secondary);
}

/* --- Sections --- */
section {
    padding: 6rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-title.left {
    text-align: left;
}

/* --- Book Cards --- */
.books-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4rem;
}

.book-card {
    background: var(--secondary);
    border-radius: 1rem;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
}

.book-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.book-cover-link {
    display: block;
    cursor: pointer;
}

.book-cover {
    height: 600px;
    /* Increased height by 20% */
    overflow: hidden;
    position: relative;
    background-color: #f0f0f0;
    /* Light border/bg for non-full covers */
    display: flex;
    justify-content: center;
    align-items: center;
}

.book-cover img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: var(--transition);
}

.book-card:hover .book-cover img {
    transform: scale(1.05);
}

/* --- Ribbon Badge --- */
.ribbon {
    position: absolute;
    top: 0;
    left: 0;
    width: 120px;
    height: 120px;
    overflow: hidden;
    z-index: 10;
}

.ribbon span {
    position: absolute;
    display: block;
    width: 180px;
    padding: 10px 0;
    background-color: #ff0000;
    color: #fff;
    font: 700 0.9rem var(--font-body);
    text-transform: uppercase;
    text-align: center;
    left: -45px;
    top: 30px;
    transform: rotate(-45deg);
    box-shadow: 0 5px 10px rgba(0, 0, 0, .15);
}

.book-info {
    padding: 2rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.book-category {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.book-info h3 {
    font-size: 2.2rem !important;
    /* Increased font size (~20%) */
    margin-bottom: 0.75rem;
}

.book-info p {
    font-size: 1.35rem !important;
    /* Increased font size (~20%) */
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* --- Footer --- */
footer {
    background: var(--primary);
    color: var(--secondary);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-about h3 {
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.footer-social a {
    font-size: 1.5rem;
}

.footer-links h4 {
    color: var(--secondary);
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links ul li a:hover {
    color: var(--accent);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.6);
}

/* --- Detail Page --- */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 5rem;
    margin-top: 2rem;
}

.detail-cover {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
}

.detail-cover img {
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    width: 100%;
    min-height: 600px;
    /* Adjusted to match catalog image size */
    object-fit: contain;
    background-color: var(--bg-light);
}

.detail-content h1 {
    font-size: 5rem;
    margin-bottom: 0.5rem;
}

.back-link {
    display: inline-block;
    margin-bottom: 2rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 1.3rem;
    /* Matched to other page scales */
    transition: var(--transition);
}

.back-link:hover {
    color: var(--primary);
    transform: translateX(-5px);
}


.detail-subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-family: var(--font-title);
    font-style: italic;
}

.detail-tags {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.tag {
    background: var(--bg-light);
    padding: 0.4rem 1rem;
    border-radius: 2rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.detail-description {
    font-size: 1.1rem;
    margin-bottom: 3rem;
    color: #333;
}

.purchase-actions {
    display: flex;
    gap: 1.5rem;
}

/* --- About Page --- */
.about-header h1 {
    margin: 0;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 5rem;
}

/* --- Search & Filters --- */
.filters {
    margin-bottom: 3rem;
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.search-input {
    padding: 1.2rem 2rem;
    /* Increased size (~50%) */
    border: 2px solid #ddd;
    border-radius: 0.5rem;
    width: 450px;
    /* Increased from 300px (50%) */
    font-family: inherit;
    font-size: 1.1rem;
}

.filter-select {
    padding: 1.2rem 2rem;
    /* Increased size (~50%) */
    border: 2px solid #ddd;
    border-radius: 0.5rem;
    background: white;
    font-size: 1.1rem;
    cursor: pointer;
}

/* --- Responsive --- */
@media (max-width: 992px) {
    .container {
        padding: 0 1.5rem;
    }

    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-content h1,
    .about-header h1 {
        font-size: 3.5rem;
    }

    .hero-content p,
    .about-header p {
        border-left: none;
        padding-left: 0;
        text-align: center;
    }

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

    .about-content {
        grid-template-columns: 1fr;
    }

    .hero-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .about-header {
        text-align: center;
    }

    .filters {
        flex-direction: column;
        align-items: stretch;
    }

    .search-input,
    .filter-select {
        width: 100%;
    }

    .books-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

@media (max-width: 576px) {
    .books-grid {
        grid-template-columns: 1fr;
    }
}