/* ============================================================================
   CHUCK'Y COINS — HOME PAGE STYLES  (chuckycoins/assets/css/home.css)
   ============================================================================
   HOW CSS WORKS (quick refresher):
     selector { property: value; }
     .name  = targets class="name"
     #name  = targets id="name"
   ============================================================================ */


/* ----------------------------------------------------------------------------
   1. COLOR VARIABLES
   Change a color here and it changes everywhere on the page.
   ---------------------------------------------------------------------------- */
:root {
    --green-dark:   #022902;   /* main brand color: header, buttons, headings */
    --green-medium: #4a8043;   /* card frames, hover accents                  */
    --green-light:  #9ed69e;   /* thin borders                                */
    --cream:        #fdfaf0;   /* "index card" panel color                    */
    --white:        #ffffff;   /* page background                             */
    --text:         #1c1c1e;   /* normal text                                 */
    --text-muted:   #5f6b5f;   /* lighter, secondary text                     */
    --gold:         #c9a227;   /* small accent (matches the Sacagawea coin)   */
    --radius:       10px;      /* how rounded the corners are                 */
}


/* ----------------------------------------------------------------------------
   2. BASE / RESET
   Removes browser default spacing so the page looks the same everywhere.
   ---------------------------------------------------------------------------- */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: Georgia, "Times New Roman", serif;   /* old coin-catalog feel */
    background: var(--white);
    color: var(--text);
    line-height: 1.6;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }


/* ----------------------------------------------------------------------------
   3. HEADER & NAVIGATION
   ---------------------------------------------------------------------------- */
.site-header {
    background: var(--green-dark);
    border-bottom: 4px solid var(--gold);
    position: sticky;          /* header stays at the top while scrolling */
    top: 0;
    z-index: 50;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 12px 20px;
    display: flex;             /* puts logo and menu side by side */
    align-items: center;
    justify-content: space-between;
}

.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 48px; height: 48px; }
.brand-name {
    color: var(--white);
    font-size: 1.6rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.main-nav { display: flex; gap: 6px; }
.main-nav a {
    color: var(--white);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: background 0.2s;
}
.main-nav a:hover  { background: rgba(255, 255, 255, 0.15); }
.main-nav a.active { background: var(--green-medium); }

/* The ☰ button is hidden on big screens; shown on phones (see section 8) */
.menu-btn {
    display: none;
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.5);
    color: var(--white);
    font-size: 1.4rem;
    padding: 2px 10px;
    border-radius: 6px;
    cursor: pointer;
}


/* ----------------------------------------------------------------------------
   4. HERO (the big welcome banner)
   ---------------------------------------------------------------------------- */
.hero {
    background: var(--white);
    border-bottom: 1px solid var(--green-light);
}

.hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 56px 20px;
    display: grid;
    grid-template-columns: 1fr 300px;   /* text on left, coin on right */
    gap: 40px;
    align-items: center;
}

.hero-text h1 {
    color: var(--green-dark);
    font-size: 2.6rem;
    line-height: 1.2;
    margin-bottom: 16px;
}
.hero-text p {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 28px;
    max-width: 560px;
}

.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-image img {
    width: 280px;
    margin: 0 auto;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.25));  /* shadow under coin */
}


/* ----------------------------------------------------------------------------
   5. BUTTONS
   ---------------------------------------------------------------------------- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1rem;
    transition: background 0.2s, color 0.2s;
}
.btn-primary {
    background: var(--green-dark);
    color: var(--white);
    border: 2px solid var(--green-dark);
}
.btn-primary:hover { background: var(--green-medium); border-color: var(--green-medium); }

.btn-outline {
    background: var(--white);
    color: var(--green-dark);
    border: 2px solid var(--green-dark);
}
.btn-outline:hover { background: var(--green-dark); color: var(--white); }


/* ----------------------------------------------------------------------------
   6. FEATURE CARDS
   ---------------------------------------------------------------------------- */
.content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 20px;
}

.section-title {
    color: var(--green-dark);
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 28px;
}

.card-grid {
    display: grid;
    /* As many 280px+ columns as fit; wraps automatically on small screens */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.card {
    background: var(--cream);
    border: 2px solid var(--green-medium);
    border-radius: var(--radius);
    overflow: hidden;          /* keeps the picture inside the rounded corners */
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
    transform: translateY(-4px);                 /* lifts up a little */
    box-shadow: 0 8px 20px rgba(2, 41, 2, 0.15);
}

/* The picture across the top of each card.
   object-fit: cover = fill the box and trim the edges, so pictures of
   different sizes all line up at the same height without stretching. */
.card-img {
    width: 100%;
    height: 190px;
    object-fit: cover;
    border-bottom: 3px solid var(--gold);
    transition: transform 0.3s;
}
.card:hover .card-img { transform: scale(1.04); }  /* slight zoom on hover */

/* The text area under the picture */
.card-body {
    padding: 20px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;                   /* makes all cards in a row the same height */
    background: var(--cream);
    position: relative;        /* sits above the zooming picture */
}
.card h3   { color: var(--green-dark); font-size: 1.35rem; }
.card p    { color: var(--text-muted); flex: 1; }
.card-link { color: var(--green-medium); font-weight: bold; }


/* ----------------------------------------------------------------------------
   7. ABOUT STRIP & FOOTER
   ---------------------------------------------------------------------------- */
.about {
    margin-top: 56px;
    padding: 36px 28px;
    background: var(--cream);
    border-left: 6px solid var(--green-dark);
    border-radius: var(--radius);
}
.about h2 { color: var(--green-dark); margin-bottom: 10px; }
.about p  { margin-bottom: 20px; max-width: 720px; }

.site-footer {
    background: var(--green-dark);
    color: var(--white);
    text-align: center;
    padding: 24px 20px;
    border-top: 4px solid var(--gold);
}
.footer-small { font-size: 0.85rem; opacity: 0.75; margin-top: 4px; }


/* ----------------------------------------------------------------------------
   8. PHONE LAYOUT (screens narrower than 768px)
   Everything inside this block ONLY applies on small screens.
   ---------------------------------------------------------------------------- */
@media (max-width: 767px) {
    .brand-logo { width: 38px; height: 38px; }
    .brand-name { font-size: 1.25rem; }

    .menu-btn { display: block; }

    /* Menu becomes a drop-down list under the header */
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--green-dark);
        flex-direction: column;
        padding: 8px 16px 16px;
    }
    .main-nav.open { display: flex; }   /* toggled by the ☰ button */

    .hero-inner {
        grid-template-columns: 1fr;     /* coin stacks on top of text */
        padding: 32px 16px;
        text-align: center;
    }
    .hero-image { order: -1; }          /* -1 = show coin first */
    .hero-image img { width: 180px; }
    .hero-text h1 { font-size: 1.9rem; }
    .hero-text p  { margin-left: auto; margin-right: auto; }
    .hero-buttons { justify-content: center; }

    .content { padding: 32px 16px; }
}