/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    overflow-x: hidden;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: #333333;
    background-color: #F9F8F6;
    line-height: 1.6;
}

/* Global Perpetua Typography */
h1, h2, h3, .author-name, .tagline, .quote, .site-nav a:not(.social-icon-link), .book-author-byline, .author-signoff {
    font-family: 'Perpetua', Georgia, serif;
}

.container {
    width: 85%;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Top-Right Navigation Bar */
header {
    background-color: #F9F8F6;
    border-bottom: 1px solid #E6E4E0;
    padding: 20px 0;
}

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

.author-name {
    font-family: 'Perpetua', Georgia, serif;
    font-size: 1.4rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #2C3E35;
}

/* Top-Right Navigation Bar */
.site-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}

/* Text Navigation Buttons */
.site-nav a:not(.social-icon-link) {
    font-size: 1.05rem;
    font-weight: 500;
    color: #2C3E35;
    text-decoration: none;
    padding: 0 16px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #2C3E35;
    border-radius: 4px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    white-space: nowrap;
}

.site-nav a:not(.social-icon-link):hover,
.site-nav a:not(.social-icon-link).active {
    background-color: #2C3E35;
    color: #ffffff;
}

/* Instagram Logo Inline (Matched to Button Height) */
.site-nav .social-icon-link {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    padding: 0;
    border: none;
    background: transparent;
    height: 38px;
}

.social-icon {
    height: 38px;
    width: auto;
    display: block;
    object-fit: contain;
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0.85;
}

.site-nav .social-icon-link:hover .social-icon {
    transform: scale(1.08);
    opacity: 1;
}

/* Hero Section with hero.jpg Background */
.hero {
    position: relative;
    padding: 80px 0;
    background: linear-gradient(rgba(20, 30, 25, 0.65), rgba(20, 30, 25, 0.65)), url('../images/hero.jpg');
    background-size: cover;
    background-position: center;
    color: #ffffff;
}

.hero-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 40px;
}

.book-cover-placeholder,
.book-info {
    flex: 1 1 280px;
    min-width: 0;
}

.book-cover-img {
    width: 100%;
    max-width: 300px;
    height: auto;
    display: block;
    margin: 0 auto;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    border-radius: 4px;
}

.hero h1 {
    color: #ffffff;
    font-size: 2.8rem;
    line-height: 1.15;
    margin-bottom: 10px;
    overflow-wrap: break-word;
}

.book-author-byline {
    font-size: 1.8rem;
    font-style: italic;
    color: #E2ECE4;
    margin-top: -5px;
    margin-bottom: 35px;
}

.title-line-break,
.byline-break {
    display: inline;
}

.hero .tagline {
    color: #E2ECE4;
    font-style: italic;
    font-size: 1.3rem;
    margin-bottom: 20px;
}

.hero .synopsis {
    color: #F0F0F0;
    font-size: 1rem;
    margin-bottom: 30px;
}

/* About the Author & Lincolnshire Page Layout */
.author-hero-grid {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 35px;
    align-items: start;
}

.author-photo-frame,
.setting-photo-frame {
    margin-top: 0;
}

.author-photo-frame img,
.setting-photo-frame img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    border: 4px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
}

.author-bio-text {
    max-width: 100%;
    line-height: 1.65;
    margin-bottom: 0;
}

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

.author-bio-text p:last-child {
    margin-bottom: 0;
}

/* Call To Action Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #4A6B5D;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.btn:hover {
    background-color: #3B5246;
}

/* Praise & Quotes Section */
.about-book {
    padding: 60px 0;
    background-color: #EFECE6;
    text-align: center;
}

.about-book h2 {
    font-size: 1.8rem;
    color: #2C3E35;
    margin-bottom: 15px;
}

.about-book .quote {
    font-size: 1.5rem;
    font-style: italic;
    color: #2C3E35;
    max-width: 700px;
    margin: 0 auto 10px auto;
}

.sub-quote {
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #777;
}

/* Privacy Policy Page */
.privacy-section {
    padding: 50px 0;
    background-color: #F9F8F6;
    text-align: left;
}

.privacy-container {
    max-width: 800px;
}

.privacy-section h1 {
    font-size: 2.5rem;
    color: #2C3E35;
    line-height: 1.2;
    margin-bottom: 12px;
}

.privacy-updated {
    font-size: 0.9rem;
    color: #777777;
    margin-bottom: 28px;
}

.privacy-section h2 {
    font-size: 1.4rem;
    color: #2C3E35;
    margin-top: 24px;
    margin-bottom: 10px;
}

.privacy-section p {
    margin-bottom: 15px;
    overflow-wrap: break-word;
}

.privacy-section a:not(.btn) {
    color: #2C3E35;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.privacy-back-wrap {
    margin-top: 36px;
    text-align: center;
}

/* Footer */
footer {
    padding: 30px 0;
    font-size: 0.85rem;
    color: #777777;
    background-color: #EFECE6;
    text-align: center;
    border-top: 1px solid #E6E4E0;
}

footer a {
    color: #777777;
    text-decoration: underline;
}

/* Tablet & Mobile Styles */
@media (max-width: 768px) {
    .container {
        width: 92%;
        padding: 0 12px;
    }

    header {
        padding: 16px 0;
    }

    .header-container {
        flex-direction: column;
        gap: 14px;
        text-align: center;
    }

    .author-name {
        font-size: 1.75rem;
        letter-spacing: 2.5px;
    }

    .site-nav {
        justify-content: center;
        gap: 10px;
        width: 100%;
    }

    .site-nav a:not(.social-icon-link) {
        font-size: 0.95rem;
        padding: 0 12px;
        height: 36px;
    }

    .hero {
        padding: 50px 0;
    }

    .hero-grid {
        gap: 28px;
        text-align: center;
    }

    .book-cover-img {
        max-width: 240px;
    }

    .author-hero-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .author-photo-frame,
    .setting-photo-frame {
        max-width: 260px;
        margin: 0 auto;
    }

    .author-bio-text {
        text-align: left;
    }

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

    .mobile-box-heading {
        text-align: center;
        margin-bottom: 16px;
    }

    .book-author-byline {
        font-size: 1.5rem;
        margin-bottom: 24px;
    }

    .title-line-break,
    .byline-break {
        display: block;
    }

    .hero-details-box {
        background-color: rgba(20, 30, 25, 0.55);
        border: 1px solid rgba(255, 255, 255, 0.22);
        border-radius: 8px;
        padding: 22px 18px;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    }

    .hero-details-box .synopsis {
        margin-bottom: 22px;
    }

    .hero-details-box .author-bio-text,
    .hero-details-box .author-bio-text p:last-child {
        margin-bottom: 0;
    }

    .hero .tagline {
        font-size: 1.15rem;
    }

    .about-book {
        padding: 44px 0;
    }

    .about-book .quote {
        font-size: 1.3rem;
    }

    .privacy-section {
        padding: 36px 0;
    }

    .privacy-section h1 {
        font-size: 2rem;
    }
}

/* Small Phones */
@media (max-width: 480px) {
    .container {
        width: 94%;
        padding: 0 10px;
    }

    .author-name {
        font-size: 1.55rem;
        letter-spacing: 2px;
    }

    .site-nav {
        gap: 8px;
    }

    .site-nav a:not(.social-icon-link) {
        font-size: 0.9rem;
        padding: 0 10px;
        height: 36px;
    }

    .hero {
        padding: 38px 0;
    }

    .book-cover-img {
        max-width: 210px;
    }

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

    .book-author-byline {
        font-size: 1.25rem;
        margin-bottom: 18px;
    }

    .hero-details-box {
        padding: 18px 14px;
    }

    .hero .tagline {
        font-size: 1.05rem;
    }

    .hero .synopsis,
    .author-bio-text p,
    .privacy-section p {
        font-size: 0.95rem;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }

    .about-book .quote {
        font-size: 1.18rem;
    }

    .privacy-section h1 {
        font-size: 1.75rem;
    }

    .privacy-section h2 {
        font-size: 1.25rem;
    }
}