/* ---------- Reset ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ---------- Color palette ---------- */
:root {
    --bg:        #faf5ef;   /* light parchment */
    --dark:      #3b2e2a;   /* deep bark */
    --accent:    #c49e63;   /* aged copper */
    --light:     #fff8f0;   /* creamy highlight */
    --text:      #2c241f;   /* soft black */
}

/* ---------- Global typography ---------- */
body {
    font-family: "Georgia", serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

/* ---------- Header (hero) ---------- */
.hero {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 3rem 1rem;
    background-image: url('assets/wood-texture2.jpg');
    background-size: cover;          /* scales the image to fill the element */
    background-position: center;     /* centers the image horizontally & vertically */
    background-repeat: no-repeat;    /* prevents tiling */
}
.logo {
    max-width: 240px;
    margin-bottom: 1rem;
}

/* ---------- Navigation ---------- */
.nav {
    background: var(--light);
    border-bottom: 2px solid var(--accent);
}
.nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
}
.nav a {
    display: block;
    padding: 0.5rem 1.5rem;
    color: var(--dark);
    text-decoration: none;
    font-weight: bold;
}
.nav a:hover {
    background: var(--accent);
    color: white;
}

/* ---------- Main sections ---------- */
main {
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1rem;
}
section {
    margin-bottom: 3rem;
}
section h2 {
    border-left: 6px solid var(--accent);
    padding-left: .6rem;
    margin-bottom: 1rem;
    font-size: 1.75rem;
}
.divmyimg {
    display: grid;               /* or display:grid */
    justify-content: center;     /* centre the image */
    padding: 1rem;
    margin-left: auto;
    margin-right: auto;
}

/* Image scales with its parent */
.myimg {
    max-width: 100%;             /* never exceed container */
    height: auto;
    margin-left: auto;
    margin-right: auto;
}

/* Desktop: container is 50% of the page, so image follows */
@media (min-width: 768px) {
    .divmyimg {
        width: 50%;              /* container takes half the page */
    }
}

/* Mobile: container is full width */
@media (max-width: 767px) {
    .divmyimg {
        width: 90%;
    }

    .nav a {
        padding: 0.5rem 0.5rem;
    }
}

.beerimg{
    width : 80%;
    height: auto;
    /* aligh center */
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* ---------- Beer cards (grid) ---------- */
.grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(383px, 1fr));
}
.beer-card {
    max-width: 767px;
    margin: 2rem auto;
    padding: 1.5rem;
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: system-ui, sans-serif;
}

/* Headings */
.beer-name {
    margin-top: 0;
    font-size: 1.8rem;
    color: #2c241f;
}

/* Description */
.beer-description {
    margin: 1rem 0;
    line-height: 1.5;
}

/* Definition list – nice two‑column look */
.beer-specs {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: .4rem .8rem;
    margin: 1.5rem 0;
}
.beer-specs dt {
    font-weight: 600;
    text-align: right;
}
.beer-specs dd {
    margin: 0;
}

/* Hop breakdown list */
.hop-breakdown {
    margin: .4rem 0 0 1.2rem;   /* indent a bit */
    list-style-type: disc;
}

/* Price table */
.price-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1.5rem;
}
.price-table caption {
    caption-side: top;
    text-align: left;
    font-weight: 600;
    margin-bottom: .4rem;
}
.price-table th,
.price-table td {
    border: 1px solid #ccc;
    padding: .6rem .8rem;
    text-align: left;
}
.price-table th {
    background: #eee;
}

/* ---------- Links ---------- */
a {
    color: var(--accent);
    text-decoration: underline;
}
a:hover {
    opacity: .8;
}

/* ---------- Footer ---------- */
footer {
    background: var(--dark);
    color: white;
    text-align: center;
    padding: 1rem;
    font-size: .9rem;
}

/* Back‑to‑top button */
#backToTop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--accent, #c49e63);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity .3s ease;
    z-index: 1000;
}

/* Show when page is scrolled */
#backToTop.show { opacity: 0.8; }
#backToTop:hover { opacity: 1; }

.section-embed {
    display: block;
    width: 100%;
    border: none;          /* removes default iframe border */
    /*margin-bottom: 3rem;   /* matches spacing of regular sections */
    overflow: visible;       /* prevent inner scrollbars */
    height: auto;
}