/* Forward Fitness Club - Responsive Design (Mobile First)
   Tablet & Desktop styles added with media queries (Chapter 6) */

/* Reset-ish */
* { box-sizing: border-box; }
body, h1, h2, h3, h4, p, ul { margin: 0; padding: 0; }
ul { list-style-position: inside; }

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.5;
    background: #f4f4f4;
    color: #111;
}

#container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: #fff;
}

header {
    background: #000;
    color: #fff;
    padding: 0.75rem;
    position: sticky;
    top: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

header img {
    width: 110px;
    height: auto;
    display: block;
}

header .site-title {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

nav {
    background: #111;
}

nav ul {
    list-style-type: none;
    display: block;
    width: 100%;
}

nav li {
    border-top: 1px solid #2a2a2a;
}

nav a {
    display: block;
    padding: 0.85rem 1rem;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

main {
    padding: 1rem;
}

.hero {
    width: 100%;
    height: auto;
    border-radius: 10px;
    display: block;
    margin-bottom: 1rem;
}

.callout {
    background: #f7f7f7;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    padding: 1rem;
    margin: 1rem 0;
}

.three-cards {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.card {
    border: 1px solid #e6e6e6;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.card img {
    width: 100%;
    height: auto;
    display: block;
}

.card .card-body {
    padding: 0.9rem;
}

.card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
}

.muted {
    color: #444;
    font-size: 0.95rem;
}

.tablet-only { display: none; }
.mobile-only { display: block; }

.map {
    width: 100%;
    height: auto;
    border: 2px solid #111;
    border-radius: 10px;
    margin-top: 0.75rem;
    display: block;
}

footer {
    background: #000;
    color: #fff;
    text-align: center;
    padding: 1rem;
    font-size: 0.9rem;
}

/* ===============================
   Tablet Media Query (min-width: 630px)
   =============================== */
@media screen and (min-width: 630px) {

    header { position: static; } /* remove sticky header for tablet */

    nav ul {
        display: flex;
        justify-content: center;
        align-items: center;
    }

    nav li {
        border-top: none;
        border-right: 1px solid #2a2a2a;
    }

    nav li:last-child {
        border-right: none;
    }

    nav a {
        padding: 0.9rem 1.25rem;
    }

    main {
        padding: 1.25rem 1.5rem;
    }

    .three-cards {
        grid-template-columns: 1fr 1fr;
    }

    /* About page lists: add left margin so lists sit inside their div */
    .about-lists ul {
        margin-left: 1rem;
    }

    /* Contact page: hide telephone link, show plain phone number heading */
    .mobile-only { display: none; }
    .tablet-only { display: block; }

    .map {
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* ===============================
   Desktop Media Query (min-width: 1015px)
   =============================== */
@media screen and (min-width: 1015px) {

    body {
        /* Linear gradient background */
        background: linear-gradient(#f4f4f4, #d9d9d9);
    }

    #container {
        max-width: 1100px;
        border-radius: 14px;
        overflow: hidden;
        box-shadow: 0 12px 30px rgba(0,0,0,0.12);
        margin: 1.5rem auto;
    }

    header {
        padding: 1rem 1.25rem;
    }

    header .site-title {
        font-size: 1.5rem;
    }

    nav ul {
        justify-content: flex-end;
        padding-right: 0.5rem;
    }

    .three-cards {
        grid-template-columns: 1fr 1fr 1fr;
    }

    /* About page: three-column layout for Weights/Cardio/Personal Training */
    .three-cols {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        align-items: start;
    }

    /* Dynamic pseudo-classes for navigation links (desktop) */
    nav a:link { color: #fff; }
    nav a:visited { color: #d7d7d7; }
    nav a:hover { background: #fff; color: #000; }
    nav a:active { background: #666; color: #fff; }
}

/* Large desktop (optional) */
@media screen and (min-width: 1921px) {
    #container { max-width: 1300px; }
}

/* Print */
@media print {
    body { background: #fff; color: #000; }
    nav, footer { display: none; }
    #container { box-shadow: none; margin: 0; }
}
