/* ------------------- */
/* --- GLOBAL STYLES --- */
/* ------------------- */

/* --- FONT IMPORT --- */
/* This line imports the Raleway font from Google Fonts, which is specified in the project brief. */
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@400;700&display=swap');

/* --- CSS VARIABLES (CUSTOM PROPERTIES) --- */
/* Using variables for colors and fonts makes the site easier to maintain.
   If the client wants to change a color, we only have to change it in one place. */
:root {
    /* --bg-color: #FFFFFF; White background as requested. */
    --bg-color: #FFFFFF;
    /* --text-color: #0F1026; Dark, almost black text for high contrast. */
    --text-color: #0F1026;
    /* --primary-accent: #005276; A deep blue for primary links and highlights. */
    --primary-accent: #005276;
    /* --secondary-accent: #bec2be; A light gray for subtle highlights or borders. */
    --secondary-accent: #bec2be;
    /* --main-font: 'Raleway', sans-serif; Specifies the primary font for the entire site. */
    --main-font: 'Raleway', sans-serif;
}

/* --- GENERAL BODY AND HTML STYLES --- */
/* These rules provide a baseline for the entire site. */
html {
    /* Enables smooth scrolling when a user clicks on an anchor link (e.g., "#section"). */
    scroll-behavior: smooth;
}

body {
    /* Sets the default background color for all pages. */
    background-color: var(--bg-color);
    /* Sets the default text color for all pages. */
    color: var(--text-color);
    /* Sets the default font for all pages. */
    font-family: var(--main-font);
    /* Removes the default margin that browsers apply to the body. */
    margin: 0;
    /* Removes the default padding that browsers apply to the body. */
    padding: 0;
    /* Uses border-box sizing, which makes layout calculations more intuitive.
       Paddings and borders are included in the element's total width and height. */
    box-sizing: border-box;
    /* Improves the rendering of text. */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- GLOBAL ELEMENT STYLES --- */
/* This ensures that all elements inherit the box-sizing from the body. */
*, *:before, *:after {
    box-sizing: inherit;
}

/* Sets a default style for all links. */
a {
    /* Sets the link color to the primary accent color. */
    color: var(--primary-accent);
    /* Removes the default underline from links. */
    text-decoration: none;
    /* Adds a subtle transition effect when the link's properties (like color) change. */
    transition: color 0.3s ease;
}

/* Defines the style for links when a user hovers over them. */
a:hover {
    /* Slightly darkens the primary accent color on hover for feedback. */
    color: #003d59;
}

/* Styles for all images */
img {
    /* Ensures images never exceed the width of their container. */
    max-width: 100%;
    /* Allows images to scale down proportionally. */
    height: auto;
    /* Treats images as block-level elements to avoid unwanted bottom space. */
    display: block;
}

/* --- HEADER AND NAVIGATION --- */
/* Styles for the main site header. */
.site-header {
    /* Provides padding inside the header. */
    padding: 1rem 2rem;
    /* Aligns header content using flexbox. */
    display: flex;
    /* Pushes the logo and navigation to opposite ends. */
    justify-content: space-between;
    /* Vertically centers items in the header. */
    align-items: center;
    /* A subtle border at the bottom of the header. */
    border-bottom: 1px solid var(--secondary-accent);
}

/* Styles for the site logo. */
.site-logo a {
    /* Makes the logo text bold. */
    font-weight: 700;
    /* Increases the font size of the logo. */
    font-size: 1.5rem;
    /* Sets the logo color to the main text color. */
    color: var(--text-color);
}

/* Styles for the main navigation menu. */
.main-nav ul {
    /* Removes default list bullets. */
    list-style: none;
    /* Removes default margin. */
    margin: 0;
    /* Removes default padding. */
    padding: 0;
    /* Aligns navigation items in a row. */
    display: flex;
}

/* Styles for each navigation item. */
.main-nav li {
    /* Adds space between navigation items. */
    margin-left: 2rem;
}

/* Styles for the links within the navigation. */
.main-nav a {
    /* Sets the font size for navigation links. */
    font-size: 1.1rem;
    /* Adds a subtle underline effect on hover/focus. */
    position: relative;
    padding-bottom: 0.25rem;
}

/* Creates the underline for the hover effect. */
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--primary-accent);
    /* The underline starts with a scale of 0 (invisible). */
    transform: scaleX(0);
    /* Sets the origin of the scaling transformation to the center. */
    transform-origin: center;
    /* Defines the transition for the scaling effect. */
    transition: transform 0.3s ease;
}

/* The underline becomes visible on hover. */
.main-nav a:hover::after,
.main-nav a.active::after {
    /* Scales the underline to its full width. */
    transform: scaleX(1);
}


/* --- MOBILE NAVIGATION --- */
/* Styles for the hamburger menu icon, hidden by default on larger screens. */
.menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001; /* Ensures it's above other content */
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    position: relative;
    transition: transform 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--text-color);
    transition: top 0.3s ease, transform 0.3s ease;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

/* --- FOOTER --- */
/* Styles for the main site footer. */
.site-footer {
    /* Sets the background color for the footer. */
    background-color: #f8f9fa;
    /* Sets the text color for the footer. */
    color: var(--text-color);
    /* Adds padding to the top and bottom of the footer. */
    padding: 2rem 0;
    /* Centers the text within the footer. */
    text-align: center;
    /* Adds a border at the top of the footer. */
    border-top: 1px solid var(--secondary-accent);
    /* Adds margin to the top to separate it from the main content. */
    margin-top: 4rem;
}

/* Container for the footer content to control its width. */
.footer-container {
    /* Sets a maximum width for the container. */
    max-width: 1200px;
    /* Centers the container horizontally. */
    margin: 0 auto;
    /* Adds padding to the sides. */
    padding: 0 2rem;
}

/* Styles for the social media links in the footer. */
.social-links {
    /* Removes list bullets. */
    list-style: none;
    /* Removes default padding. */
    padding: 0;
    /* Adds margin to the bottom. */
    margin-bottom: 1rem;
}

/* Makes the social links display in a row. */
.social-links li {
    /* Displays items inline. */
    display: inline-block;
    /* Adds space between the icons. */
    margin: 0 1rem;
}

/* Styles for the social media icons themselves. */
.social-links img {
    /* Sets a fixed size for the icons. */
    width: 24px;
    height: 24px;
    /* Adds a transition for a subtle hover effect. */
    transition: opacity 0.3s ease;
}

/* Reduces the opacity of the icons on hover for feedback. */
.social-links img:hover {
    opacity: 0.7;
}

/* Styles for the copyright text in the footer. */
.copyright {
    /* Sets the font size for the copyright text. */
    font-size: 0.9rem;
}


/* --- RESPONSIVE STYLES --- */
/* Media query for screens smaller than 768px (tablets and mobile). */
@media (max-width: 768px) {
    /* Adjusts header padding for smaller screens. */
    .site-header {
        padding: 1rem;
    }

    /* Hides the main navigation menu on mobile. */
    .main-nav {
        display: none;
        /* Positions the menu absolutely to overlay the content. */
        position: absolute;
        top: 0;
        right: 0;
        width: 100%;
        height: 100vh; /* Full viewport height */
        background-color: var(--bg-color);
        /* Flexbox to center the navigation items. */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1000;
        /* Initially hidden off-screen to the right. */
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    /* When the menu is open, it becomes visible. */
    .main-nav.is-open {
       transform: translateX(0);
       display: flex; /* Re-enables flex for visibility */
    }

    /* Stacks navigation items vertically on mobile. */
    .main-nav ul {
        flex-direction: column;
        text-align: center;
    }

    /* Adjusts margin for vertical layout. */
    .main-nav li {
        margin: 1.5rem 0;
    }

    /* Shows the hamburger menu icon on mobile. */
    .menu-toggle {
        display: block;
    }

    /* Styles for the 'X' close icon when the menu is open. */
    .menu-toggle.is-active .hamburger {
        transform: rotate(45deg); /* Rotates the main bar of the hamburger. */
    }

    .menu-toggle.is-active .hamburger::before {
        top: 0;
        transform: rotate(90deg); /* Rotates the top bar to form the 'X'. */
    }

    .menu-toggle.is-active .hamburger::after {
        top: 0;
        transform: rotate(90deg); /* Hides the bottom bar by rotating it with the top bar. */
    }
}

/* --- HERO SECTION STYLES --- */
/* Styles for the hero section, typically the first section on the homepage. */
.hero-section {
    position: relative;
    width: 100vw;
    min-height: 100vh;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Ensures the picture and img elements cover the entire hero section. */
.hero-section picture,
.hero-section img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    display: block;
    pointer-events: none;
}

/* Styles for the content within the hero section. */
.hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    text-align: center;
    padding: 2rem;
}

/* --- ULTRAWIDE SCREENS --- */
/* Media query for very large screens (e.g., ultrawide monitors). */
@media (min-width: 2000px) {
    .hero-section {
        min-height: 70vh;
    }
}

/* --- MOBILE SCREENS --- */
/* Media query for screens smaller than 800px (mobile devices). */
@media (max-width: 800px) {
    .hero-section {
        min-height: 40vh;
    }
}
