﻿@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

/* ---------- Design tokens ---------- */
:root {
    --paper: #ffffff;
    --ink: #0f172a;
    --muted: #475569;
    --brand: #0ea5e9;
    --brand-dark: #0284c7;
    --ring: rgba(14,165,233,.35);
    --card: #f8fafc;
    --card-border: #e2e8f0;
    --radius: 14px;
    --shadow: 0 10px 24px rgba(2,8,23,.08);
}

/* ---------- Base ---------- */
body {
    margin: 0;
    font: 16px/1.55 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--ink);
    background: #f4f6f9;
}

.container {
    width: min(1100px, 92vw);
    margin-inline: auto;
}





/* ---------- Intro (Copy + Slideshow) ---------- */
/* Always allow flexible widths; do not force equal height by default */
.intro .intro-grid {
    display: flex;
    gap: 1.5rem;
}

    /* Left card is a column so we can pin the actions to the bottom-left */
    .intro .intro-grid > aside.intro-copy {
        display: flex;
        flex-direction: column;
    }

/* Pin the button row to the lower-left inside the left card */
.intro-actions {
    margin-top: auto; /* pushes to the bottom of the column */
    align-self: flex-start; /* ensure left alignment */
}

/* Intro widths and heights when side-by-side */
@media (min-width: 901px) {
    /* Equalize column heights when side-by-side */
    .intro .intro-grid {
        align-items: stretch; /* both columns match tallest */
    }

        /* Left must be at least 40% of container (Right <= 60%) -> Left >= 50% of Right */
        .intro .intro-grid > aside.intro-copy {
            flex: 1 1 0;
            min-width: 52%;
            min-height: 0; /* allow flex child to stretch correctly */
            display: flex;
            flex-direction: column;
        }

        /* Right may grow, but not exceed 60% of container */
        .intro .intro-grid > .intro-slideshow {
            flex: 2 1 0;
            max-width: 48%;
            min-height: 0; /* allow flex child to stretch correctly */
            display: flex;
            flex-direction: column;
        }

    /* Make inner slideshow content fill the column height */
    .intro .intro-slideshow > * {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        min-height: 0;
    }
}

/* When stacked (not side-by-side), do NOT enforce equal heights */
@media (max-width: 900px) {
    .intro .intro-grid {
        flex-direction: column;
        align-items: initial; /* don't try to equalize heights */
    }

    /* Avoid inner slideshow stretching when stacked */
    .intro .intro-slideshow > * {
        flex: 0 0 auto;
    }
}

.intro-copy {
    background: var(--paper);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.intro-subheading {
    margin: 0 0 8px;
    font-size: clamp(18px, 2.6vw, 24px);
}

.intro-tagline {
    margin: 0;
    color: var(--muted);
    font-size: clamp(15px, 2.2vw, 17px);
}

.intro-slideshow {
    display: flex;
    flex-direction: column;
    gap: 10px;

}

.info {
    padding: 28px 0 20px;
}


/* ---------- CTA ---------- */
.cta {
    padding: 28px 0 44px;
    text-align: center;
}


/* Responsive tweaks */
@media (max-width: 1020px) {
    .intro-grid {
        grid-template-columns: 1fr;
    }

    .controls-under {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }
}

[hidden] {
    display: none !important;
}

/* ---------- Free books page EVERYTHING BELOW IS FOR THE BOOKS PAGE---------- */
.books {
    padding: 28px 0 40px;
}

.books-grid {
    display: grid;
    grid-template-columns: 1.1fr .9fr; /* form | gallery */
    gap: 24px;
    align-items: start;
}

/* Form card */
.form-card {
    background: var(--paper);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 18px;
    box-shadow: var(--shadow);
}

.form-title {
    margin: 0 0 12px;
}

label {
    font-size: 14px;
    color: var(--muted);
}

.form-actions {
    margin-top: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.small-muted {
    margin: 0;
    font-size: 13px;
    color: var(--muted);
}

/* Right column: book images */
.books-gallery {
    display: grid;
    gap: 14px;
}

.book-card {
    background: var(--paper);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

    .book-card img {
        width: 100%;
        height: auto;
        display: block;
    }

/* Mobile */
@media (max-width: 900px) {
    .books-grid {
        grid-template-columns: 1fr;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }
}

/* ---------- About page helpers ALL BELOW THIS IS FOR THE ABOUT-PAGE---------- */
.about {
    padding: 22px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.card {
    background-color: var(--DS-color-surface-neutral-default-rest);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 18px;
    box-shadow: var(--shadow);
}

@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Books intro (author photo + text) --- */
.books-intro {
    padding: 18px 0 10px;
}

.bio {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    align-items: start;
}

.bio-photo {
    width: 137px;
    height: 186px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
}

.bio-text p {
    margin: 0 0 10px 0;
}

/* --- Books page layout: narrow right column (~210px) --- */
.books .books-grid {
    grid-template-columns: 1fr 210px; /* form | gallery */
}

@media (max-width: 1200px) {
    .books .books-grid {
        grid-template-columns: 1fr 210px;
    }
}

@media (max-width: 900px) {
    .books .books-grid {
        grid-template-columns: 1fr;
    }
}

/* Book cards ~210px wide; images fill card */
.books-gallery {
    display: grid;
    gap: 14px;
}

    .books-gallery .book-card {
        width: 210px;
        max-width: 100%;
    }

        .books-gallery .book-card img {
            width: 100%;
            height: auto;
            display: block;
        }
h1 {
    
    margin-block-start: 0.5em;
    margin-block-end: 0.5em;
}