/* Import handwriting-style font */
@import url("https://fonts.googleapis.com/css2?family=Dancing+Script:wght@500&display=swap");

body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: #fdfdfd;
    color: #333;
}

header {
    text-align: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: #fff;
}

header h1 {
    margin: 0;
    font-size: 2.5rem;
}

main {
    padding: 2rem 1rem;
    max-width: 1000px;
    margin: auto;
}

.book-meta {
    font-family: "Dancing Script", cursive;
    font-size: 1.3rem;
    list-style: none;
    padding: 0;
    margin: 1rem auto;
    max-width: 400px;
}

.book-meta li {
    margin: 0.3rem 0;
}

.intro {
    margin-bottom: 2rem;
    text-align: center;
}

.hook {
    font-size: 1.4rem;
    font-style: italic;
    line-height: 1.8;
    max-width: 800px;
    margin: 2rem auto;
    text-align: center;
    color: #2c3e50;
    font-family: "Dancing Script", cursive;
    background: #f9f9f9;
    padding: 1rem 1.5rem;
    border-left: 4px solid #0077b6;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

figure {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    max-width: 220px;
    text-align: center;
    transition: transform 0.2s ease;
}

figure:hover {
    transform: translateY(-4px);
}

img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

figcaption {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* Download links styled as buttons */
figcaption a {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background: #2c3e50;
    color: #fff;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease;
}

figcaption a:hover {
    background: #34495e;
}

/* Links */
a {
    color: #0077b6; /* brighter blue */
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
    transition: color 0.2s ease;
}

a:hover {
    color: #005f8a;
}

a:visited {
    color: #5a189a; /* subtle purple */
}

footer {
    margin-top: 3rem;
    padding: 1rem;
    text-align: center;
    background: #f2f2f2;
    font-size: 0.9rem;
}

/* Responsiveness */
@media (max-width: 600px) {
    header h1 {
        font-size: 1.8rem;
        padding: 1rem 0.5rem;
    }

    header {
        padding: 1rem 0.5rem;
    }

    main {
        padding: 1rem 0.5rem;
        font-size: 1.1rem; /* Increase base font size for mobile */
        line-height: 1.8; /* Improve readability */
    }

    .gallery {
        gap: 1rem;
        flex-direction: column; /* Stack images vertically */
        align-items: center;
    }

    figure {
        max-width: 100%;
        flex: 1 1 100%;
        margin: 0.5rem 0;
    }

    .intro {
        font-size: 1.2rem;
        margin-bottom: 1.5rem;
    }

    .hook {
        font-size: 1.2rem;
        padding: 0.8rem 1rem;
    }

    h2 {
        font-size: 1.5rem;
        margin-top: 2rem;
        margin-bottom: 1rem;
    }

    footer {
        font-size: 1rem;
        padding: 1.5rem 0.5rem;
    }

    /* Improve link readability on mobile */
    a {
        text-decoration-thickness: 2px;
        text-underline-offset: 4px;
    }

    /* Specific styles for book-meta on mobile */
    .book-meta {
        font-size: 1.4rem;
        max-width: 100%;
        padding: 0 1rem;
    }
}
