* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Refreshed knowledge from reading this https://www.freecodecamp.org/news/what-are-css-variables-and-how-to-use-them/  */
:root {
    /* Colors */
    --primary-blue: #004AAD;
    --accent-gold: #BD996A;
    --dark-gray: #1D1B1C;
    --light-brown: #8E7268;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --text-color: #333333;
}

/* Typography - learning through https://www.w3schools.com/css/css3_variables.asp assisted with the code to help understand variables */
body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--light-gray);
}
/* Code has been learnt from https://www.w3schools.com/howto/howto_css_smooth_scroll.asp */

html {
    scroll-behavior: smooth;
  }

h1, h2, h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

p, a, li {
    font-family: 'Open Sans', sans-serif;
}

/* Skip links refresh from reading here https://www.w3schools.com/accessibility/accessibility_skip_links.php */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-blue);
    color: var(--white);
    padding: 8px;
    z-index: 100;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 0;
}


header {
    background-color: var(--dark-gray);
    padding: 1rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    height: 40px;
    width: auto;
}

.logo h1 {
    color: var(--white);
    font-size: 1.5rem;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav a:hover,
/* Hoover refresh capability from https://www.w3schools.com/cssref/sel_hover.php  */
nav a:focus {
    background-color: var(--accent-gold);
    outline: 2px solid var(--white);
}

/* Hero Section - Understood and learnt the hero section from https://www.awebco.com/blog/hero-section/  */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(7, 24, 61, 0.75), rgba(7, 24, 61, 0.75)),
                url('./xmas-parcels-v3.jpg') center/cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding: 0 1rem;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Main Content */
main {
    max-width: 1200px;
    margin: 80px auto 0;
    padding: 3rem;
}

/* About Section */
.about {
    padding: 3rem 0;
}

.about-content {
    background-color: var(--white);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    /* Box shadow reference: code learnt from https://www.w3schools.com/css/css3_shadows_box.asp */
}

.about h2 {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
}

.about-text p {
    margin-bottom: 1rem;
}

.about-text ul {
    list-style-position: inside;
    margin: 1rem 0;
}

.about-text li {
    margin-bottom: 0.5rem;
}

/* Cocktails Section */
/* Referencing understanding of code from here https://developer.mozilla.org/en-US/docs/Web/CSS/grid-template-columns when learning the CSS Grid template */

.cocktails {
    padding: 4rem 0;
}

.cocktails h2 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: var(--primary-blue);
}

.cocktail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.cocktail {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    /* Code has been learnt from advanced css in w3 schools https://www.w3schools.com/css/css3_shadows_box.asp  */
    transition: transform 0.3s;
}

.cocktail:hover {
    transform: translateY(-5px);
}

.cocktail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.cocktail-content {
    padding: 1.5rem;
}

.cocktail h3 {
    color: var(--primary-blue);
    margin-bottom: 0.5rem;
}

.cocktail p {
    color: var(--text-color);
    margin-bottom: 1rem;
}

/* Buttons */
/* Referencing - used this website to mess with button looks https://htmlcheatsheet.com/css/#  */
/* Basic refresh of buttons - utilising https://www.w3schools.com/css/css3_buttons.asp to remember from first year */
.button {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background-color: var(--accent-gold);
    color: var(--white);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s;
    border: none;
    cursor: pointer;
}

.button:hover,
.button:focus {
    background-color: var(--light-brown);
    outline: 2px solid var(--primary-blue);
}

/* Footer*/
/* Reminder of footer tag - https://www.w3schools.com/tags/tag_footer.asp */

footer {
    background-color: var(--dark-gray);
    color: var(--white);
    padding: 2rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: var(--accent-gold);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: var(--white);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover,
.footer-section a:focus {
    color: var(--accent-gold);
    outline: none;
}

.copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Recipe Categories */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.category-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.category-card:hover,
.category-card:focus {
    transform: translateY(-5px);
    outline: 2px solid var(--primary-blue);
}

/* Recipe Cards */

.recipe-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.recipe-content {
    padding: 1.5rem;
}

.recipe-details {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.recipe-details p {
    background: var(--light-gray);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.recipe-card img {
    max-width: 300px;
    max-height: 200px;
    width: auto;
    height: auto;
    display: block;
}


/* Ingredients Grid */
.ingredient-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.ingredient-category {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.ingredient-category h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;

}
/* Reminder of listing attribute https://www.w3schools.com/cssref/pr_list-style-type.php - code is referenced */

.ingredient-category ul {
    list-style: none;
}

.ingredient-category li {
    margin-bottom: 0.5rem;
    padding-left: 1.5rem;
    position: relative;
}

.ingredient-category li::before {
    content: "•";
    color: var(--accent-gold);
    position: absolute;
    left: 0;
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.gallery-item {
    margin: 0;
    position: relative;
}
/* To ensure images fit into the container https://www.w3schools.com/css/css3_object-fit.asp code was learnt from here */

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
}

.gallery-item figcaption {
    margin-top: 0.5rem;
    text-align: center;
    color: var(--text-color);
}

/* Blog Posts */
.blog-post {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.blog-post img {
    max-width: 300px;
    max-height: 200px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
}

.post-content {
    padding: 1.5rem;
}

.post-date {
    color: var(--light-brown);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

/* Gallery Form */
.newsletter {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.gallery-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 1rem auto;
}

.gallery-form label {
    font-weight: 600;
}

.gallery-form input {
    padding: 0.8rem;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    font-size: 1rem;
}

/* Tips Grid */
.tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.tip {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.tip h3 {
    color: var(--primary-blue);
    margin-bottom: 1rem;
}

/* Referencing: Help from colleague for the video containers and using this https://www.w3schools.com/howto/howto_css_responsive_iframes.asp link */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    /* Referencing: Help from work colleague where we used https://www.w3schools.com/cssref/css3_pr_border-radius.php to border */
}

/* Referencing: Help from colleague for the video containers and using this https://www.w3schools.com/howto/howto_css_responsive_iframes.asp link */
.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.tip h3 a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
    position: relative;
}

.tip h3 a:hover,
.tip h3 a:focus {
    color: var(--accent-gold);
}

.tip h3 a::after {
    content: '▶';
    margin-left: 8px;
    font-size: 0.8em;
    opacity: 0.7;
}

.tip h3 a:hover::after {
    opacity: 1;
}

/* Contact Form */
/* Referencing: Learnt code from here https://www.w3schools.com/howto/howto_css_contact_form.asp */
.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.contact-form h2 {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--light-gray);
    border-radius: 4px;
    font-size: 1rem;
    font-family: 'Open Sans', sans-serif;
}

.form-group textarea {
    resize: vertical;
}

.contact-form .button {
    width: 100%;
    margin-top: 1rem;
}

/* Responsive Design - Media Queries */
/* Referencing - https://www.w3schools.com/css/css_rwd_mediaqueries.asp Colleague helped position breakpoints within screen using media queries */
@media (max-width: 768px) {
    header {
        position: relative;
        padding: 1rem 0;
    }

    nav {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }

    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
        width: 100%;
    }

    nav li {
        width: 100%;
        text-align: center;
    }

    nav a {
        display: block;
        padding: 1rem;
    }

    main {
        margin-top: 0;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .cocktail-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        padding: 1rem;
    }

    .about h2 {
        font-size: 1.5rem;
    }

    .category-grid,
    .ingredient-grid,
    .gallery-grid,
    .tips-grid {
        grid-template-columns: 1fr;
    }

    .recipe-details {
        flex-direction: column;
    }

    .gallery-form {
        width: 100%;
    }
} 
