/*
* Prefixed by https://autoprefixer.github.io
* PostCSS: v8.4.14,
* Autoprefixer: v10.4.7
* Browsers: last 4 version
*/

/* Google fonts import - Macondo, DM Sans, Raleway */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&family=Macondo&family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');

/* CSS Variables */
:root {
    --primary-heading-font: 'Macondo', cursive; /* Headings etc */
    --secondary-font: 'raleway', sans-serif;
    --primary-text-font:'DM Sans', sans-serif;  /*  --highlight-color: ;*/
    --primary-color: #5f1a37;
    --secondary-color: #1169AC; 
    --primary-button-color: #1169AC; /* initial button colour */
    --nav-menu-color:#1169AC;  /* navigation colours and underlining colour*/
}

/* Asterisk wildcard selector to override default styles added by the browser */
* {
    margin: 0;
    padding: 0;
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
}

/* General Styles */
body {
    min-height: 100vh;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    /* Generic project styles */
    font-family: var(--secondary-font);
}

footer {
    -ms-flex-negative: 0;
        flex-shrink: 0;
    padding: 0; /*removed 0.1 rem to reduce footer size*/
    font-size: 0.9rem;
    margin-top: auto;
}

.footer-content {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    padding: 0 1rem;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    gap: 0.5rem; /* better than relying on wrap spacing */
}

.footer-left, .footer-right {
    color: var(--primary-color);
    font-size: medium;
}

/* Footer links */
.footer-right a {
    color: var(--secondary-color);
    -webkit-transition: color 0.3s ease;
    -o-transition: color 0.3s ease;
    transition: color 0.3s ease;
    font-size: medium;
    font-weight: 800;
}

.footer-right a:hover {
    color: var(--primary-color); 
}
/* Header */
header {
    background-color: #f1e9d2;
    padding: 0 1rem; 
    position: fixed;
    height: 60px;                   /* fixed header height */
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between; /* keeps logo left, menu right */
    z-index: 99; /* stays above page content */
    width: 100%;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    justify-content: space-between;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    /* Open replay used here see README.md */
    -webkit-box-shadow: rgba(6, 109, 220, 0.12) 0px 2px 4px 0px, rgba(6, 109, 220, 0.32) 0px 2px 16px 0px;
            box-shadow: rgba(6, 109, 220, 0.12) 0px 2px 4px 0px, rgba(6, 109, 220, 0.32) 0px 2px 16px 0px;     /*note shadow box different on different screen sizes to fix */
}

/* Header and Footer for image background on  */
header, footer {
    position: relative;       /* create new stacking context */
    z-index: 1;          
}

/* Logo Text in header */
#logo {
    margin: 0;            /* removes the h1, h2, h3, h4 offset */
    line-height: 1;       /* to keep it tight vertically */
    font-family: var(--primary-heading-font);
    color: var(--primary-color);
    margin-left: 1rem;
    font-size: 2em;
    
}

header a {
    text-decoration: none;
    color: inherit;
    letter-spacing: 2px;
    color: var(--primary-color);
}

h1, h2, h3, h4 {
    font-family: var(--primary-heading-font);
    color: var(--primary-color);
    margin-top: 1rem;
    margin-left: 1rem;
}

p {
    font-family: 'DM Sans', sans-serif;
    margin: 0.4rem 1rem; /* top&Bottom: 0.4rem Left& Right 1rem*/ 
}

.button {
    padding: 5px 20px;
    margin: 6px;
    background-color: var(--primary-button-color); /* darker version of the blue for accessibility */  
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    display: inline-block;
    text-decoration: none; /* removes underline on links */
    font-size: 18.66px;
    font-weight: 400;
}

.button:hover {
    background-color: var(--primary-color);
}

/* Navbar styles with dropdown menus */
nav {
    position: absolute;
    width: 50%; /* align drop menu to right side of screen */
    right: 0;
    padding: 0 1rem;
    top: 100%;
    z-index: 100;  /* higher than header content but lower than header shadow */
    -webkit-box-shadow: -4px 4px 8px rgba(6, 109, 220, 0.32);
            box-shadow: -4px 4px 8px rgba(6, 109, 220, 0.32);   
    background-color: #f1e9d2; /* solid so shadow is visible */
    display: none;
}

#nav-menu {
    font-size: 105%;
    letter-spacing: 4px;
    list-style-type: none;
}

#nav-menu > li {
    margin-bottom: 1rem;
}

/* Active link underline using existing animation) */
#nav-menu a.active::after {
    width: 100%;
}

.active {
    border-bottom: 1px solid currentColor; /* uses the current text color */
    color: var(--secondary-color);
}

/* Navbar toggling */
#nav-toggle:checked~nav {
    display: block;
}

#nav-toggle {
    display: none;
}   

.nav-toggle-label {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;  /* vertical center in header */
    font-size: 1.8rem;
    cursor: pointer;
}

/* Wolf logo */
#logo-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;           /* align image and text in a row */
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;     /* vertical centering */
    gap: 10px;               /* spacing between logo and text */
    text-decoration: none;   /* to remove underline link */
}

#logo-image {
    height: 80%;   /* scale relative to header height */
    max-height: 60px;
    width: auto;
    padding: 4px;
    background-color: rgba(241, 237, 227, 0.9);
    border-top: 2px solid rgba(95,26,55,0.5);
    -webkit-box-shadow: 0px 4px 10px rgba(0,0,0,0.35);
            box-shadow: 0px 4px 10px rgba(0,0,0,0.35);
    border: 2px solid #5f1a37; 
    padding: 1.5px;
}

#logo-image:hover {
    -webkit-transform: translateY(-2px);
        -ms-transform: translateY(-2px);
            transform: translateY(-2px);
    -webkit-transition: 0.2s ease;
    -o-transition: 0.2s ease;
    transition: 0.2s ease;
}

/* Main Content */
main {
    background-color: #f1e9d2;  /* #f1e9d2 used here to make the main content area different from header and footer */
    /* Make main element take up any surplus to push footer down  */
    -webkit-box-flex: 1;
        -ms-flex: 1 0 auto;
            flex: 1 0 auto;
    z-index: 0; /* fixes the background image on contact pages */
}

main > .events, .gallery-intro-wrapper {
    padding-left: 1rem;
    padding-right: 1rem;
    -webkit-box-sizing: border-box;
            box-sizing: border-box;
}

/* Hero section */
#hero {
    height: 65vh;
    max-height: 295px;
    width: 100%;
    background:
        -webkit-gradient(linear, left top, left bottom, from(rgba(0,0,0,0.12)), to(rgba(0,0,0,0.25))),
        url("../images/display-and-bell-tent.webp") no-repeat;
    background:
        -o-linear-gradient(rgba(0,0,0,0.12), rgba(0,0,0,0.25)),
        url("../images/display-and-bell-tent.webp") no-repeat;
    background:
        linear-gradient(rgba(0,0,0,0.12), rgba(0,0,0,0.25)),
        url("../images/display-and-bell-tent.webp") no-repeat;
    background-size: cover;
    background-position: 30%; /* keeps open off center */
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Home Landing Page */
#cover-text {
    position: relative;
    width: 90%; /* to look better on small screen and stop overflowing */
    max-width: 550px;
    background-color: rgba(241, 237, 227, 0.85);
    padding: 1rem 1.2rem;
    border-radius: 6px;
    border-top: 2px solid rgba(95,26,55,0.5);
    -webkit-box-shadow: 0px 6px 12px rgba(0,0,0,0.25);
            box-shadow: 0px 6px 12px rgba(0,0,0,0.25);
    text-align: center;
}

#cover-text p {
    margin-bottom: 0.6rem;
}

/* Zigzag rows */
#home-zigzag {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  gap: 1.5rem;
  width: 95%;
  max-width: 1200px;
  margin: 2rem auto;
  -webkit-box-align: start;
      -ms-flex-align: start;
          align-items: flex-start;
}

.zigzag-row {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
}

/* Container for right column */
.zigzag-right {
    -webkit-box-flex: 0;
        -ms-flex: 0 0 auto;
            flex: 0 0 auto;        /* width based on image */
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
}

.zigzag-image-tall {
    border-radius: 6px;        /* match other images */
    max-height: 560px;         /* limit image height so footer is safe */
    width: auto;               /* scale proportionally */
    height: auto;
    display: block;
}

/* 404 Error Page */
body.error-page {       
    margin: 0;
    padding: 0;
    background-color: transparent; /* remove beige from body */
}

body.error-page main {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: transparent; /* remove beige from main */
    -webkit-box-flex: unset;
        -ms-flex: unset;
            flex: unset; /* override flex layout for this page */
}

#error-404 {
    height: 100vh; /* full viewport height */
    position: relative;
    background-image: url('../images/404.webp');
    background-repeat: no-repeat;    
    background-size: cover;   /* ensures image fills screen */
    background-position: center center;
    text-align: center;
}

#cover-text-404 {
    position: absolute;
    top: 64%;          /* vertical middle */
    left: 52%;         /* horizontal middle */
    -webkit-transform: translate(-50%, -50%);
        -ms-transform: translate(-50%, -50%);
            transform: translate(-50%, -50%); /* truly center in both axes */
    background-color: rgba(241, 237, 227, 0.77); /* semi-transparent beige background for text readability */
    border-radius: 6px;
    border-top: 2px solid rgba(95,26,55,0.5); 
    -webkit-box-shadow: 0px 6px 12px rgba(0,0,0,0.25); 
            box-shadow: 0px 6px 12px rgba(0,0,0,0.25);
    color: var(--primary-color);
}

body.error-page * {
    -webkit-box-sizing: content-box;
            box-sizing: content-box; /* to remove white padding on right on small screens */
}

#cover-text-404 > p {
    color: #000000
}

.star {
    font-size: 0.7em;  /* Makes '✦' smaller than the normal text */
    color: var(--primary-color);
}

.star-hero {
    color: #094777;
}

/* Gallery Page - Masonry Layout */
#photos {
    width: 80%;
    margin: 1em auto;
    -webkit-column-width: 250px;
       -moz-column-width: 250px;
            column-width: 250px; 
    -webkit-column-gap: 10px; 
       -moz-column-gap: 10px; 
            column-gap: 10px;               
}

#photos img {
    width: 100%;
    display: block;
    margin-bottom: 10px;
    border-radius: 10px; /* rounded corners */
    max-width: 100%;
    image-rendering: auto;
}

.gallery-intro-wrapper {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 2rem;  /* 2rem spacing below paragraph */
}

.gallery-intro-wrapper > p {
    font-size: 110%;
}

/* Events Page */
.events {
    width: 95%;
    margin: 0 auto;
}

.event-wrapper h1 {
    text-align: center;
}

.event-wrapper p {
    font-size: 105%;
}

/* Event card layout */
.event-card {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 1.5rem;
    margin: 1rem 0 2rem; /* Top 1, Bottom 2*/
    padding: 1rem;
    background-color: rgba(241, 237, 227, 0.77);
    border-radius: 6px;
    border-top: 2px solid rgba(95,26,55,0.5);
    -webkit-box-shadow: 0px 6px 12px rgba(7, 17, 113, 0.15);
            box-shadow: 0px 6px 12px rgba(7, 17, 113, 0.15);
}

.event-content-bottom h4 {
    margin-bottom: 0.3rem;
}

/* Event card image */
.event-image {

    -ms-flex-preferred-size: 200px;

        flex-basis: 200px;
    aspect-ratio: 1/1;
    overflow: hidden;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center; /* vertical centering */

}

.event-image img {
    width: 100%;
    aspect-ratio: 1 / 1;
    max-height: 100%;
    -o-object-fit: cover;
       object-fit: cover;
    -o-object-position: center center;
       object-position: center center; 
    border-radius: 6px;
}

/* Event card text */
.event-content {
    -webkit-box-flex: 2.5;
        -ms-flex: 2.5;
            flex: 2.5;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
}

.event-meta {
    margin-bottom: 0.4rem;
}

.event-meta .label {
    font-weight: bold;
}

.button-wrapper {
    display: block;         /* ensures wrapper is block */
    text-align: right;     /* centers inline-block button */
    margin-right: 1rem;
}

/* Event card map */
.event-map{
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
}

/* Contact Page */
#contact-us {
    padding-top: 10px;   /* pushes content below fixed header, changed from 5 due to below */
    margin: 0px; /* change this to 0 and above stop the scroll appearing on 1366 screen */ 
    -ms-flex-item-align: center; 
        -ms-grid-row-align: center; 
        align-self: center;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
}

#contact-form {
    -webkit-box-align: start;
        -ms-flex-align: start;
            align-items: flex-start;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    background-color: rgb(241, 237, 227, 0.8); /* keeps text fully visible */
    padding: 0rem; 
    gap: 0.4rem;
}

#contact-form h1 {
    text-align: center;
    margin: 0 0 1.5rem 0;   /* removes left margin + adds space below */
    width: 100%;            /* ensures proper centering in flex */
    font-weight: bold;
    text-align: center;
    margin-bottom: 1.5rem;
}

#contact-form > h2 {
    margin-bottom: 20px;
} 

#contact-form .text-input {
    width: 95%;       /* fixed width for text inputs */
    padding: 8px;
}

.message-section {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center; /* centers label, textarea, and button */
}
/* Style contact forms to site colors*/
#contact-form input:focus, #contact-form textarea:focus {
    outline: none;
    border: 2px solid #5f1a37;
    -webkit-box-shadow: 0 0 6px rgba(95, 26, 55, 0.5);
            box-shadow: 0 0 6px rgba(95, 26, 55, 0.5);
}

#contact-form label {
    font-weight: bold;
    display: block;      /* ensures label is on its own line */
}

/* Add spacing for inputs */
#contact-form input.text-input {
    margin-bottom: 1rem;  /* space before next input */
}

.contact-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.12); /* white overlay at 30% opacity */
    z-index: 1; /* behind the form */
    border-radius: 12px; /* rounded edges */
    background-image: url('../images/background-castev3.png'); 
    background-size: cover;     /* stretch to cover full viewport */
    background-position: center;
    background-repeat: no-repeat;
    z-index: -1;               /* behind everything including header/footer */
}

/* Form Container*/
.form-container {
    padding: 1.6rem 2.5rem;
    border-radius: 6px; /* rounded borders*/
    max-width: 85%;
    -webkit-box-shadow: 0 4px 12px rgba(0,0,0,0.3);
            box-shadow: 0 4px 12px rgba(0,0,0,0.3); /* subtle shadow */
    z-index: 10;  /* bring form layer above to be clickable */
     /* Slightly reduce form transparency */
    background-color: rgba(241, 237, 227, 0.97); /* make box slightly transparent */
}

/* Message text area */
#contact-form textarea {
    width: 100%;
    padding: 10px;
}

/* Message Sent Contact Page */
#message-sent {
    width: 95%;
    text-align: center;
    font-size: 110%;
    border-radius: 6px;
    border: 2px solid transparent;
    background-color: rgba(241, 237, 227, 0.97);
    background-origin: border-box;
    background-clip: padding-box, border-box;
    color: var(--primary-color);
    max-width: 400px;
    padding: 16px;
    border-top: 1px solid rgba(0,0,0,0.15);
    margin-top: 0rem;  /* override H2 styling */
      
}

/* Only for message-sent page */
.message-sent-page .form-container {
    padding: 0;                 /* removes 1.6rem 2.5rem */
    border-radius: 0;           /* removes 6px radius */
    max-width: none;            /* removes 85% width limit */
    -webkit-box-shadow: none;
            box-shadow: none;           /* removes shadow */
    z-index: auto;              /* resets stacking */
    background-color: transparent;  /* removes outer box color */
}

/* Footer */
footer {
    background-color: #f0e4c9; /* very slightly darker than header and body */
    padding-right: 20px; /*add padding right of 'contact link' */
    border-top: 1px solid rgba(95,26,55,0.2); -webkit-box-shadow: 0px -2px 6px rgba(95,26,55,0.15); box-shadow: 0px -2px 6px rgba(95,26,55,0.15);
}

#social-networks {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: space-evenly;
        -ms-flex-pack: space-evenly;
            justify-content: space-evenly;
    gap: 1rem;
    padding: 1rem 0;
    list-style-type: none;
}

#social-networks i {
    font-size: 140%;
    padding: 5%;
}

/* Social media icons with brand colors */
.facebook-icon {
    color: #1877F2;
}

.twitter-icon {
    color: #000000;
}

.youtube-icon {
    color: #FF0000;
}

.instagram-icon {
    color:white;                  /* Gradient Page used here see README.md */
    background: -webkit-gradient(
    linear,
    left top, right top,
    from(#833ab4),color-stop(#fd1d1d),to(#fcb045));
    background: -o-linear-gradient(
    left,
    #833ab4,#fd1d1d,#fcb045);
    background: linear-gradient(
    to right,
    #833ab4,#fd1d1d,#fcb045);
}

/* Media query: Smaller devices (mobiles, 768 px and below) */
@media screen and (max-width: 768px) {
    #nav-menu {
        text-align: right;
    }

    /* header */
    #logo {
        font-size: 1.2rem;   /* smaller text on smaller screens */
        line-height: 1.2;    /* tight line spacing */
    }

    #logo-image {
        height: 50px;        /* smaller logo */
    }

    /* Footer */
    .footer-content {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
            -ms-flex-direction: column;
                flex-direction: column;
        gap: 0.5rem;
        text-align: center;
        /* to stop 'contact' touching bottom and give gap on mobile */
        padding-bottom: 30px;
    }

    /* Homepage */
    #hero {
        height: 60vh;    /* Allow the image to shrink but keep a minimum size for better responsiveness on smaller screens */
        min-height: 300px;
    }
      /* hide tall image (on right) on mobile */
    .zigzag-right {
        display: none;         /* hide tall image on mobile */
    }

    .zigzag-row {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
            -ms-flex-direction: column;
                flex-direction: column; /* stack */
        -webkit-box-align: center;
            -ms-flex-align: center;
                align-items: center;    /* center content */
    }

    .zigzag-image {
        margin: 0;               /* remove extra spacing below */
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-pack: center;
            -ms-flex-pack: center;
                justify-content: center; 
    }
    .zigzag-image img {
        max-width: 60%;         /* responsive */
        height: auto;
        display: block;    
    }

    /* Center text under image without extra gap */
    .zigzag-text {
        margin-top: 0.3rem;      /* small spacing from image */
        margin-bottom: 0;        /* remove extra bottom gap */
    }

    /*keeps mobile hero text box centered */
    #cover-text {
        position: relative;
        width: 520px;       /* fixed max width */
        background-color: rgba(241, 237, 227, 0.85);
        padding: 1rem 1.2rem;
        border-radius: 6px;
        border-top: 2px solid rgba(95,26,55,0.5);
        -webkit-box-shadow: 0px 6px 12px rgba(0,0,0,0.25);
                box-shadow: 0px 6px 12px rgba(0,0,0,0.25);
        color: var(--primary-color);
        text-align: center;
    }

    /* No face image on mobile */
    .hero-portrait {
        display: none;
    }

    /* 404 Page */
    #cover-text-404 {
        top: 50%;             /* move box higher for small screens */
        left: 52%;
        -webkit-transform: translate(-50%, -50%);
            -ms-transform: translate(-50%, -50%);
                transform: translate(-50%, -50%);
        padding: 0.6rem 0.8rem;  /* reduce padding */
        max-width: 90%;       /* prevent overflow on narrow screens */
        font-size: 0.95rem;   /* optional: scale font slightly */
    }

    #error-404 {
        height: 100vh;       /* full viewport height */
        padding: 20vh 2rem 4rem 2rem; 
        top: 55%;       /* slightly lower for smaller screens */
        max-width: 90%; /* smaller width for narrow screens */
    }

    /* Gallery Page */
    #photos {
        -ms-grid-columns: (1fr)[2];
        grid-template-columns: repeat(2, 1fr);  /* 2 columns on tablets & small desktops */
    }

    /* Events Page */
    .events {
        width: 95%;
        max-width: 590px;
        margin: 0 auto;
    }
    
    .event-card {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
            -ms-flex-direction: column;
                flex-direction: column;
        min-height: auto;
        -webkit-box-align: center;
            -ms-flex-align: center;
                align-items: center;
        padding: 1rem;
        gap: 1rem;
    }

    .event-content-top h3 {
        text-align: center;
        margin-bottom: 0.4rem; /* spacing below heading */
    }

    .event-content-top p {
        margin-bottom: 1rem;
    }

    .event-content-bottom h3, h4 {
        margin-bottom: 0.3rem;
    }

    /* Event Image Container */
    .event-image {
        width: 100%;             /* full width of its column/flex item */
        max-width: 400px;        /* prevents stretching too wide on large screens */
        aspect-ratio: 1 / 1;     /* forces square */
        overflow: hidden;        /* crop excess */
        border-radius: 6px;
        margin: 0 auto;          /* center horizontally */
        -ms-flex-negative: 0;
            flex-shrink: 0;          /* prevent shrinking if inside flex row */
    }

    /* Image itself */
    .event-image img {
       width: 100%;
       height: 100%;            /* fill the square container */
      -o-object-fit: cover;
         object-fit: cover;       /* crop/scale image correctly */
      display: block;
    }

    .event-map {
        -webkit-box-flex: 0;
            -ms-flex: none;
                flex: none;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .button-wrapper {
    display: block;    
    text-align: center;  /* centers inline-block button */
    }

    /*no background on very small screens - contact / msg sent page */
        .contact-bg::before {
        background-image: none;  /* remove background */
        -webkit-backdrop-filter: none;
                backdrop-filter: none;    /* to remove blur */
    }
}

@media screen and (max-width: 375px) {

    #hero {
        min-height: 260px;   /* slightly shorter hero */
        height: auto;
        padding: 1rem 0.5rem;
    }

    #cover-text {
        width: 92%;
        max-width: 260px;
        padding: 0.7rem 0.6rem;
        font-size: 0.9rem;
        margin: 0 auto;
    }

    #cover-text h2 {
        font-size: 1.2rem;
        margin-top: 0.4rem;
    }

    #cover-text p {
        font-size: 0.85rem;
        margin: 0.3rem 0.4rem;
    }

    .button {
        padding: 4px 12px;
        font-size: 0.85rem;
    }

    /* Improve image loading times on extra small phones */
    .zigzag-image-tall {
        width: 300px;
        max-height: 400px;
    }
}

/* Mobile hero cover text fix for very small screen*/
@media screen and (max-width: 425px) {
    #hero {
        padding: 0 0.5rem;   /* optional: keep hero edges inside screen */
        -webkit-box-sizing: border-box;
                box-sizing: border-box;
    }

    #cover-text {
        width: 95%;        
        padding: 1rem 0.6rem;   
        -webkit-box-sizing: border-box;   
                box-sizing: border-box; /* ensures padding is inside width */
    }
    
    .contact-bg::before {
        height: 100vh; /* full viewport height */
        top: 0;
    }

    /* Improve image loading on small phones */
    .zigzag-image-tall {
        width: 360px;  /* shrink for smaller screens */
        max-height: 480px;  /* optional, keep proportional */
    }
}

/* Media query: Larger devices (laptops and desktops, 768 px and up) */
@media screen and (min-width: 768px) {
    
    /* Nav bar */
    nav {
        position: relative;      /* now part of header flow */
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
            -ms-flex-align: center;
                align-items: center;
        width: auto;
        top: auto;               /* remove absolute offset */
        -webkit-box-shadow: none;
                box-shadow: none; /* removes box shadow on non mobile screens */
    }

    #nav-menu {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        gap: 1rem;
    }

    #nav-menu a {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;   /* vertical centering inside each link */
    height: 100%;          /* fill nav height */
    }

    #nav-menu > li {
        padding-left: 1rem;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
            -ms-flex-align: center;
                align-items: center;
        margin-bottom: 0; /*  this makes menu text links center align*/
    }

    .nav-toggle-label {
    display: none;
    } 

    /* logo header wolf image */
    #logo-image {
        height: 48px;        /* fixed height for desktop */
        width: auto;
        display: block;
    }

    #logo-container {
        padding: 0.5rem 0;   /* adds “top/bottom breathing room” like mobile */
    }
 
    /* Hero section homepage */
    #hero {
        height: 450px;  /* less vertical space */
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
            -ms-flex-align: center;
                align-items: center;
        -webkit-box-pack: center;
            -ms-flex-pack: center;
                justify-content: center;
        gap: 2rem;
        padding: 1rem;
        -ms-flex-wrap: wrap;
            flex-wrap: wrap;
    }
    /* portrait image */
    .hero-portrait {
        display: block;
        width: 180px;
        height: auto;
        border-radius: 6px;
        -ms-flex-negative: 0;
            flex-shrink: 0;
    }

    .zigzag-image img {
        max-width: 125px;  /* uniform image width change left image height */
        width: 100%;
        height: auto;      /* to keep aspect ratio */
        border-radius: 6px;
    }

    #home-zigzag {
        /* also aligns right-image on home*/
        -webkit-box-align: center;
            -ms-flex-align: center;
                align-items: center; /* valid value for flexbox */
    }

    .zigzag-text {
        -webkit-box-flex: 1;
            -ms-flex: 1;
                flex: 1;  /* expand text to fill space */
        padding: 0.5rem 1rem; 
    }

    /* Footer Icons hover effect for all social icons */
    #social-networks a {
        display: inline-block;
        -webkit-transition: text-shadow 0.3s ease, -webkit-transform 0.3s ease;
        transition: text-shadow 0.3s ease, -webkit-transform 0.3s ease;
        -o-transition: transform 0.3s ease, text-shadow 0.3s ease;
        transition: transform 0.3s ease, text-shadow 0.3s ease;
        transition: transform 0.3s ease, text-shadow 0.3s ease, -webkit-transform 0.3s ease;
    }

    /* Grow & glow on hover for all social icons */
    #social-networks a:hover {
        -webkit-transform: scale(1.3);
            -ms-transform: scale(1.3);
                transform: scale(1.3);  /* grows bigger */
    }

    #social-networks a:hover {
        text-shadow: 0 0 8px currentColor; /* glow matches the icon's own color */
    }

/* removed 'Media query Larger devices (laptops and desktops, 992 px and up)' added to (min-width: 768px)*/
    main {
        margin-top: 0;
    }
    #nav-menu a {
        position: relative;
        padding: 0 0.3rem;
        -webkit-transition: color 0.3s ease;
        -o-transition: color 0.3s ease;
        transition: color 0.3s ease;
    }

    /* Animated underline */
    #nav-menu a::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: -3px;
        width: 0;
        height: 2px;
        background-color: var(--nav-menu-color);        
        -webkit-transition: all 0.3s ease;        
        -o-transition: all 0.3s ease;        
        transition: all 0.3s ease;
        -webkit-transform: translateX(-50%);
            -ms-transform: translateX(-50%);
                transform: translateX(-50%);
    }

    #nav-menu a:hover::after {
        width: 100%;
    }

    /* Decorative medieval marks */
    #nav-menu a::before, #nav-menu a span::after {
        position: absolute;
        opacity: 0;
        -webkit-transition: opacity 0.3s ease;
        -o-transition: opacity 0.3s ease;
        transition: opacity 0.3s ease;
        color: var(--nav-menu-color);
        font-size: 0.55rem;
    }

    #nav-menu a::before {
        content: "✦";
        left: -12px;
        top: 30%; /* with top makes nav animation star level  */
    }

    #nav-menu a span::after {
        content: "✦";             /* used a <span> on nav links so full space shows */
        right: -12px;
        top: 30%;   /* with bottom makes nav animation star level  */
    }

    #nav-menu a:hover::before, #nav-menu a:hover span::after {
        opacity: 1;
    }

    #nav-menu a:hover {
        color: var(--nav-menu-color);    
    }

    /* Hero section */
    #hero {
        height: 65vh;
        max-height: 440px;
        background-size: 100%;
        -webkit-box-align: center;
            -ms-flex-align: center;
                align-items: center;
        -webkit-box-pack: center;
            -ms-flex-pack: center;
                justify-content: center;
    }

    /* Make zigzag images larger on large screens */
    .zigzag-image img {
        max-width: 180px;  /* increase from 125px */
        width: 100%;
        height: auto;
        border-radius: 6px;
    }

    .zigzag-image-tall {
        max-height: 600px; /* slightly taller */
        width: auto;
    }

    .zigzag-right {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;   /* horizontal centering */
    -webkit-box-align: start;
        -ms-flex-align: start;
            align-items: flex-start;   /* top-align image */
    -webkit-box-flex: 0;
        -ms-flex: 0 0 auto;
            flex: 0 0 auto;            /* keep width based on content */
    }

    .zigzag-row {
        -webkit-box-align: start;
            -ms-flex-align: start;
                align-items: flex-start; /* aligns all children to top */
    }

    /* text on large screens home page */
        .zigzag-text p {
        font-size: 1.05rem; /* slightly bigger than default 1rem */
        line-height: 1.5;   /* improves readability */
    }

    .zigzag-text h2 {
        font-size: 1.7rem; /* increase heading slightly */
    }

}

@media screen and (min-width: 1600px) {
    /* to accommodate seeing footer on largest screens */
    #hero {
        height: 55vh;   /* slightly shorter hero */
        max-height: 350px;  /* cap max height */
    }
    
    /* to stop main head going under header on larger screens */
    header {
        height: 70px;      /* taller header on large screens */
    }

    /* Reduce zigzag row gap slightly on large screens */
    #home-zigzag {
        margin: 1rem auto;  /* less vertical spacing */
        gap: 1rem;          /* smaller gap between rows */
    }
}
