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

/* --- FONT IMPORT --- */
/* Main font is now Avenir, so no Google Fonts import needed. */

/* --- 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: 'Avenir', 'Helvetica Neue', Arial, sans-serif; Specifies the primary font for the entire site. */
    --main-font: 'Avenir', 'Helvetica Neue', Arial, 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 {
    width: 100%;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.5rem;
    min-height: 90px; /* Thicker header */
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Styles for the site logo. */
.site-logo {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Styles for the main navigation menu. */
.main-nav ul {
    display: flex;
    gap: 2.2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* 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 {
    color: #222;
    text-decoration: none;
    font-size: 1.08rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    padding: 0.5em 0.2em;
    transition: color 0.2s;
}

/* 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);
}

/* --- DROPDOWN MENU STYLES --- */
/* Container for dropdown items */
.dropdown-item {
    position: relative;
}

/* Dropdown toggle link */
.dropdown-toggle {
    position: relative;
    cursor: pointer;
}

/* Dropdown menu styles */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    line-height: 1; /* Set line-height to minimal value */
    background-color: #fff;
    border: none;
    gap: 0;
    list-style: none;
    margin: 0;
    padding: 0;
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    line-height: 1; /* Set line-height to minimal value */
    width: 110px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    row-gap: 0;
    /* Ensure no extra space between items */
}

/* Show dropdown on hover */
@media (min-width: 901px) {
    .dropdown-item:hover .dropdown-menu {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
    }
}

@media (max-width: 700px) {
        /* Hide the 'Work' button (dropdown-toggle) on mobile/vertical screens */
        .dropdown-toggle {
            display: none !important;
        }
    .dropdown-menu {
        position: static;
        width: 100%;
        box-shadow: none;
        border-radius: 0;
        border: none;
        margin: 0;
        padding: 0.2rem 0;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
    }
    .dropdown-item.is-active .dropdown-menu {
        display: flex;
        flex-direction: column;
        opacity: 1;
        visibility: visible;
    }
}

/* Dropdown menu items */
.dropdown-menu li {
    margin: 0;
    padding: 0;
    border: none;
    line-height: 1;
}

/* Dropdown menu links */
.dropdown-menu a {
    display: block;
    padding: 0.5rem 0.3rem;
    margin: 0 !important;
    line-height: 1 !important;
    color: #222;
    text-decoration: none;
    font-size: 0.98rem;
    border: none;
    text-align: center;
    min-width: 60px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

/* Dropdown menu link hover state */
.dropdown-menu a:hover {
    background-color: rgba(0, 82, 118, 0.1);
    color: var(--primary-accent);
}

/* Remove the underline effect from dropdown toggle and menu links */
.dropdown-toggle::after {
    display: none;
}



/* --- MOBILE NAVIGATION --- */
/* Styles for the hamburger menu icon, hidden by default on larger screens. */
.menu-toggle {
    display: none;
}

@media (max-width: 900px) {
    .menu-toggle {
        display: block;
    }
}
@media (max-width: 900px) {
    .site-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 1rem;
        min-height: 72px;
    }
    
    /* Hides the main navigation menu on mobile. */
    .main-nav {
        position: fixed;
        margin: 0;
        padding: 0;
        /* Remove extra space between dropdown items */
        line-height: 1;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg, var(--bg-color) 0%, rgba(248, 249, 250, 0.98) 100%);
        backdrop-filter: blur(10px);
        display: block;
        padding: 0.08rem 0.3rem; /* Reduce vertical padding */
        margin: 0;
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transform: translateX(100%);
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    /* When the menu is open, it becomes visible. */
    .main-nav.is-open {
        display: flex;
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }
    
    /* Stacks navigation items vertically on mobile. */
    .main-nav ul {
        flex-direction: column;
        text-align: center;
        margin: 0;
        padding: 0;
    }
    .main-nav li {
        margin: 0;
        opacity: 1;
        transform: none;
        animation: none;
    }
    
    .main-nav li:nth-child(1) { animation-delay: 0.3s; }
    .main-nav li:nth-child(2) { animation-delay: 0.4s; }
    .main-nav li:nth-child(3) { animation-delay: 0.5s; }
    .main-nav li:nth-child(4) { animation-delay: 0.6s; }
    
    /* Mobile dropdown menu styles */
    .dropdown-item {
        position: relative;
    }
    
    .dropdown-menu {
        position: static;
        background-color: transparent;
        border: none;
        box-shadow: none;
        margin: 0;
        padding: 0;
        display: none;
        flex-direction: column;
        transition: none;
    }
    .dropdown-item.is-active .dropdown-menu {
        display: flex;
    }
    
    .dropdown-menu li {
        margin: 0;
        padding: 0;
    }
    
    .dropdown-menu a {
        font-size: 1.25rem;
        padding: 0.75rem 1rem;
        line-height: 1 !important; /* Set line-height to minimal value for mobile */
    }
    
    .main-nav a {
        font-size: 1.5rem;
        padding: 1rem;
        transition: all 0.3s ease;
        border-radius: 8px;
    }
    
    .main-nav a:hover {
        background: rgba(74, 144, 226, 0.1);
        transform: translateY(-2px);
    }
    
    /* Animation keyframes */
    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    .menu-toggle {
        display: block;
        position: absolute;
        right: 1.5rem;
        top: 50%;
        transform: translateY(-50%);
        background: none;
        border: none;
        cursor: pointer;
        z-index: 101;
        padding: 10px;
    }
    
    /* Hamburger icon styles */
    .hamburger {
        width: 25px;
        height: 3px;
        background-color: var(--primary-accent);
        display: block;
        position: relative;
        transition: all 0.3s ease;
    }
    
    .hamburger::before,
    .hamburger::after {
        content: '';
        width: 25px;
        height: 3px;
        background-color: var(--primary-accent);
        position: absolute;
        left: 0;
        transition: all 0.3s ease;
    }
    
    .hamburger::before {
        top: -8px;
    }
    
    .hamburger::after {
        top: 8px;
    }
    
    /* Styles for the 'X' close icon when the menu is open. */
    .menu-toggle.is-active .hamburger {
        transform: rotate(45deg);
        background-color: transparent;
    }

    .menu-toggle.is-active .hamburger::before {
        top: 0;
        transform: rotate(90deg);
    }

    .menu-toggle.is-active .hamburger::after {
        top: 0;
        transform: rotate(90deg);
    }
}

/* --- 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;
    vertical-align: middle;
    transition: opacity 0.3s ease;
}

/* Ensures SVG icons in social links are visually centered and aligned */
.social-links svg {
    width: 24px;
    height: 24px;
    display: inline-block;
    vertical-align: middle;
    margin-bottom: -2px; /* visually centers icon with text baseline */
    transition: opacity 0.3s ease;
}
.social-links svg:hover {
    opacity: 0.7;
}

/* 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;
}

.site-footer .social-links a {
    display: inline-block;
    background: none;
    border: none;
    box-shadow: none;
    width: auto;
    height: auto;
    margin: 0 0.3rem;
    padding: 0;
}
.site-footer .social-links img {
    display: inline-block;
}

/* --- 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;
    }
}
