/*
  File: styles.css
  Author: [Your Name]
  Date: [Current Date]
  Description: Professionally refined responsive styles for the Forward Fitness Club website,
               staying true to the course material (float-based layouts, media queries).
*/

/* --- MOBILE-FIRST STYLES --- */

/* CSS Reset and Global Box Sizing */
body, header, nav, main, footer, img, h1, h2, h3, dl, dt, dd, ul, li {
    margin: 0;
    padding: 0;
    border: 0;
    box-sizing: border-box;
}

body {
    background-color: #f4f4f4; /* Soft gray background for a modern feel */
    font-family: 'Roboto Slab', serif;
    color: #333;
    line-height: 1.6;
}

/* Header: Refined Size and Gradient */
header {
    text-align: center;
    padding: 1rem 0; /* Reduced padding for a shorter header */
    background: linear-gradient(to right, #2a9d8f, #264653); /* A more modern gradient */
}

header h1 {
    font-family: 'Francois One', sans-serif;
    font-size: 2rem; /* Reduced font size */
    color: #fff;
    font-weight: 400; /* Normal weight for this font looks better */
}

/* Navigation: Refined Size and Links */
nav {
    background-color: #252525; /* Dark charcoal */
    padding: 0.5rem 1rem;
}

nav ul {
    list-style-type: none;
    text-align: center;
}

nav li {
    display: block;
    padding: 0.25rem 0;
}

nav a {
    display: block;
    color: #fff;
    text-decoration: none;
    font-family: 'Francois One', sans-serif;
    font-size: 1.1rem; /* Reduced font size */
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease-in-out;
}

/* Main Content Area */
main {
    padding: 1.5rem;
    background-color: #fff;
}

/* Hero Image */
#hero {
    margin: -1.5rem -1.5rem 1.5rem -1.5rem; /* Pull image to edges of the container */
}

#hero img {
    width: 100%;
    height: auto;
    display: block;
}

/* Contact Info */
.tel-link {
    display: none; /* Hide by default, will be shown on mobile */
}

/* Footer */
footer {
    padding: 1.5rem;
    text-align: center;
    background-color: #252525;
    color: #ccc;
    font-size: 0.9rem;
}

footer a {
    color: #fff;
    text-decoration: none;
}


/* =================================================================== */
/* --- MEDIA QUERY FOR TABLET VIEWPORT (640px and up) --- */
/* =================================================================== */
@media (min-width: 640px) {

    main {
        padding: 2rem;
    }

    /* Horizontal navigation */
    nav {
        padding: 0.75rem 0;
    }
    nav li {
        display: inline-block;
        padding: 0;
    }
    nav a {
        padding: 0.5rem 1rem;
    }

    /* Course Concept: Two-column layout using float */
    .col {
        width: 48%; /* Each column takes up space */
        float: left;
        margin: 0 1%; /* Adds space between columns */
    }

    /* FIX: The Clearfix Hack to contain the floats */
    /* This forces the <main> element to expand and contain the floated columns, fixing the broken background and layout. */
    main::after {
        content: "";
        display: table;
        clear: both;
    }
    
    /* Show tablet/desktop phone number and hide mobile button */
    .tel-link {
        display: none;
    }
    .tel-num {
        display: block;
        text-align: center;
        font-size: 1.25em;
        padding: 1rem 0;
    }
}

/* =================================================================== */
/* --- MEDIA QUERY FOR DESKTOP VIEWPORT (1024px and up) --- */
/* =================================================================== */
@media (min-width: 1024px) {

    /* Constrain width and center layout for large screens */
    header, nav, main, footer {
        max-width: 1200px;
        margin-left: auto;
        margin-right: auto;
    }
    
    main {
        border-radius: 8px;
        box-shadow: 0 0 20px rgba(0,0,0,0.1);
        margin-top: 2rem;
        margin-bottom: 2rem;
    }

    /* Course Concept: Dynamic pseudo-classes for link states */
    nav a:hover {
        background-color: #fff;
        color: #252525;
    }
}

/* =================================================================== */
/* --- MEDIA QUERY FOR PRINT --- */
/* =================================================================== */
@media print {
    body {
        background-color: #fff;
        color: #000;
        font-family: 'Times New Roman', Times, serif;
    }
    header, nav, footer, .tel-link, .map, #hero {
        display: none;
    }
    main {
        box-shadow: none;
    }
    .col {
        width: 48%;
        margin: 1%;
        float: left;
    }
}