
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700&display=swap');

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'DM Sans', sans-serif;
    background: #faf7f0;
    color: #39382f;
}

/* Navigation */

header {
    background: #526b52;
    padding: 22px 7%;
    color: white;
}

.navbar {
    max-width: 1250px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

header h1,
footer h2 {
    font-family: 'Playfair Display', serif;
    margin: 0;
}

header h1 {
    font-size: 30px;
}

nav {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 14px;
}

nav a:hover {
    text-decoration: underline;
}

/* Hero */

.hero {
    max-width: 1250px;
    margin: 55px auto;
    padding: 0 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 45px;
}

.hero-content {
    padding: 30px 0;
}

.eyebrow {
    color: #8b795d;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 2px;
}

.hero h2,
.section-heading h2 {
    font-family: 'Playfair Display', serif;
    color: #526b52;
}

.hero h2 {
    font-size: clamp(38px, 5vw, 58px);
    line-height: 1.15;
    margin: 20px 0;
}

.hero-content > p:not(.eyebrow) {
    color: #777366;
    line-height: 1.8;
    font-size: 16px;
}

.hero-button {
    display: inline-block;
    background: #526b52;
    color: white;
    text-decoration: none;
    padding: 15px 25px;
    border-radius: 5px;
    margin-top: 15px;
    transition: background 0.2s;
}

.hero-button:hover {
    background: #3f563f;
}

.hero-image {
    min-height: 390px;
    border-radius: 12px;
    background-image: url('https://images.unsplash.com/photo-1600210492486-724fe5c67fb0?w=1200');
    background-size: cover;
    background-position: center;
}

/* Section headings */

.categories,
.featured {
    max-width: 1250px;
    margin: 100px auto;
    padding: 0 30px;
}

.section-heading {
    text-align: center;
    margin-bottom: 45px;
}

.section-heading h2 {
    font-size: 36px;
    margin-top: 10px;
}

/* Categories */

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.category-card {
    background: #fffefa;
    padding: 30px 20px;
    text-align: center;
    border-radius: 10px;
    border: 1px solid #eee9dd;
    transition: transform 0.2s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.category-card span {
    font-size: 35px;
}

.category-card h3 {
    font-family: 'Playfair Display', serif;
    color: #526b52;
}

.category-card p {
    color: #777366;
    font-size: 14px;
    line-height: 1.6;
}

.category-card {
    display: block;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

/* Guide cards */

.guide-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.guide-card {
    background: #fffefa;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #eee9dd;
    transition: transform 0.2s;
}

.guide-card:hover {
    transform: translateY(-5px);
}

.guide-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.guide-info {
    padding: 22px;
}

.guide-info span {
    color: #8b795d;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
}

.guide-info h3 {
    font-family: 'Playfair Display', serif;
    color: #526b52;
    font-size: 21px;
}

.guide-info p {
    color: #777366;
    font-size: 14px;
    line-height: 1.7;
}

/* Footer */

footer {
    background: #526b52;
    color: white;
    text-align: center;
    padding: 45px 20px;
}

footer h2 {
    font-size: 28px;
}

footer p {
    font-size: 13px;
    color: #e5e9df;
}

/* Mobile layout */

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

    .hero-image {
        min-height: 300px;
    }

    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .section-heading h2 {
        font-size: 29px;
    }
}


/* Individual guide pages */

.guide-page {
    max-width: 850px;
    margin: 65px auto;
    padding: 0 25px;
}

.guide-page > h2 {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    color: #526b52;
}

.guide-intro {
    color: #777366;
    font-size: 18px;
    line-height: 1.8;
}

.guide-hero-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 10px;
    margin: 30px 0;
}

.guide-content {
    margin-top: 35px;
}

.guide-content h2 {
    font-family: 'Playfair Display', serif;
    color: #526b52;
    margin-top: 40px;
}

.guide-content p {
    color: #69675e;
    line-height: 1.9;
}

.back-link {
    display: inline-block;
    margin-top: 40px;
    color: #526b52;
    text-decoration: none;
    font-weight: 600;
}

.guide-card {
    display: block;
    color: inherit;
    text-decoration: none;
}


/* Center category pages */

.category-page {
    max-width: 1100px;
    margin: 65px auto;
    padding: 0 30px;
}

.category-page > h2,
.category-page > p {
    text-align: center;
}

.category-page > .eyebrow {
    text-align: center;
    margin-bottom: 15px;
}

.category-page > h2 {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    color: #526b52;
    margin-bottom: 15px;
}

.category-page > p:not(.eyebrow) {
    max-width: 650px;
    margin: 0 auto 40px;
    line-height: 1.8;
    color: #777366;
}

.guide-grid {
    margin-top: 35px;
}

/* Search section */

.search-section {
    max-width: 900px;
    margin: 70px auto;
    padding: 0 25px;
    text-align: center;
}

.search-section .section-heading {
    text-align: center;
    margin-bottom: 30px;
}

.search-section .section-heading > p:not(.eyebrow) {
    color: #777366;
    margin-top: 10px;
}

.search-container {
    max-width: 700px;
    margin: 0 auto;
}

#guide-search {
    width: 100%;
    padding: 17px 22px;
    border: 1px solid #ded9cc;
    border-radius: 10px;
    background: #fffdf8;
    font-family: inherit;
    font-size: 16px;
    color: #526b52;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#guide-search:focus {
    border-color: #526b52;
    box-shadow: 0 0 0 3px rgba(82, 107, 82, 0.12);
}

#guide-search::placeholder {
    color: #aaa596;
}

.show-more-button,
.show-less-button {
    padding: 12px 24px;
    margin: 10px 8px 10px 0;
    border: none;
    border-radius: 6px;
    background: #526b52;
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s;
}

.show-more-button:hover,
.show-less-button:hover {
    background: #3e563e;
}

.search-result-count {
    color: #777;
    font-size: 14px;
    margin-bottom: 15px;
}

/* Search results */

#search-results {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    text-align: left;
}

.search-result {
    display: block;
    padding: 20px 24px;
    background: #fffdf8;
    border: 1px solid #e8e2d6;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.search-result:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.06);
}

.search-result h3 {
    color: #526b52;
    margin: 0 0 8px;
    font-family: 'Playfair Display', serif;
}

.search-result p {
    color: #777366;
    margin: 0;
    line-height: 1.6;
}
.related-guides {
    margin-top: 65px;
    padding-top: 35px;
    border-top: 1px solid #e8e2d6;
}

.related-guides > h2 {
    font-family: 'Playfair Display', serif;
    color: #526b52;
    font-size: 28px;
    margin-bottom: 25px;
}

.related-guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.related-guide-card {
    display: block;
    padding: 22px;
    background: #fffdf8;
    border: 1px solid #e8e2d6;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}

.related-guide-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.06);
}

.related-guide-card h3 {
    font-family: 'Playfair Display', serif;
    color: #526b52;
    margin: 0 0 10px;
}

.related-guide-card p {
    color: #777366;
    line-height: 1.6;
    margin: 0;
}

.search-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-button {
    padding: 10px 18px;
    border: 1px solid #ded9cc;
    border-radius: 25px;
    background: #fffdf8;
    color: #526b52;
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.filter-button:hover,
.filter-button.active {
    background: #526b52;
    color: white;
    border-color: #526b52;
}

/* Mobile and tablet adjustments */

@media (max-width: 768px) {

    /* Header */
    header {
        padding: 20px;
        flex-direction: column;
        gap: 15px;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    /* Main headings */
    .hero h1 {
        font-size: 38px;
    }

    .section-heading h2 {
        font-size: 30px;
    }

    /* Category and guide cards */
    .category-grid,
    .guide-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 15px;
    }

    /* Guide pages */
    .guide-page {
        margin: 40px auto;
        padding: 0 20px;
    }

    .guide-page > h2 {
        font-size: 34px;
    }

    .guide-hero-image {
        height: 280px;
    }

    /* Category pages */
    .category-page {
        margin: 40px auto;
        padding: 0 20px;
    }

    .category-page > h2 {
        font-size: 34px;
    }
}

/* Small phones */
@media (max-width: 480px) {

    .category-grid,
    .guide-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 32px;
    }

    .search-filters {
        gap: 8px;
    }

    .filter-button {
        padding: 9px 14px;
        font-size: 13px;
    }

    .guide-hero-image {
        height: 220px;
    }

    .related-guide-grid {
        grid-template-columns: 1fr;
    }
}
.table-of-contents {
    background: #f0eee5;
    border: 1px solid #ded9cc;
    border-radius: 10px;
    padding: 25px 30px;
    margin: 30px 0;
}

.table-of-contents h3 {
    font-family: 'Playfair Display', serif;
    color: #526b52;
    font-size: 23px;
    margin: 0 0 15px;
}

.table-of-contents ul {
    padding-left: 22px;
    margin: 0;
}

.table-of-contents li {
    margin: 10px 0;
    color: #526b52;
}

.table-of-contents a {
    color: #526b52;
    text-decoration: none;
    font-weight: 500;
}

.table-of-contents a:hover {
    color: #344b34;
    text-decoration: underline;
}
#back-to-top {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: #526b52;
    color: white;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
    z-index: 1000;
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#back-to-top:hover {
    background: #3e563e;
}