/* ==========================================================================
   1. GLOBAL & BASE STYLES
   ========================================================================== */
body {
    margin: 0;
    padding: 0;
    font-family: 'Gotham', Arial, Helvetica, sans-serif; 
    line-height: 1.5em;
}

h2 {
    margin: 0;
    padding: 0;
    font-family: 'Gotham', Arial, Helvetica, sans-serif; 
    line-height: 2em;
    font-size: 24px;
    color: #0E6973;
}    

#site_wrap {
    min-height: 100vh;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* ==========================================================================
   2. HEADER & FOOTER STRUCTURAL LAYOUT
   ========================================================================== */
.header, .footer {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Locks elements perfectly to opposite edges */
    max-width: 1200px;
    min-height: 120px;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 0;
}

.header {
    background-color: transparent;
}

.footer { 
    background-color: #C2E5E9; 
    padding: 0px 24px 0px 24px;
}

.content{
    max-width:1200px;
    align-items: center;
    margin: 0 auto;
    width: 100%;
    margin-bottom: 24px;
}

.header .logo {
    width: 360px;
}

/* ==========================================================================
   3. HEADER NAVIGATION MENU
   ========================================================================== */
/* Safely drop browser default margins and bullets from the header nav list */
.header .nav, 
.header .nav li {
    list-style: none !important;
    list-style-type: none !important;
    padding: 0;
    margin: 0;
}

.header .nav {
    display: flex;
}

.header .nav a {
    text-decoration: none;
    color: #65A2A9;
    padding: 7px 15px 8px 15px;
    text-transform: uppercase;
    font-size: 24px;
    font-weight: 500; 
}

.header .nav a:hover, 
.header .nav .active {
    color: #0E6973;
}

.header .nav li::marker {
    content: none !important;
    display: none !important;
}

/* ==========================================================================
   4. FOOTER ELEMENTS (Inlined SVG Color Management)
   ========================================================================== */
.footer-socials {
    display: flex;
    gap: 12px;
    align-items: center;
}

.footer-socials a {
    background-color: white;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* Sizing and basic setup for inline vector tags */
.footer-socials .social-icon {
    height: 24px;
    width: auto;
    display: block;
    
    /* DEFAULT STATE: Sets initial vector icon color to your brand teal */
    fill: #65A2A9; 
    
    /* Animates color properties fluidly */
    transition: fill 0.2s ease-in-out; 
}

/* Direct typography formatting for the standalone back-to-top link */
.footer .back-to-top {
    text-decoration: none;
    color: #65A2A9;
    padding: 7px 15px 8px 15px; /* Vertical padding matching alignment, removes side padding */
    text-transform: uppercase;
    font-size: 24px;
    font-weight: 500; 
    background-color: white; /* REMOVED: Strips white box background block */
    
    display: inline-block;
    transition: color 0.2s ease-in-out; /* Powers smooth text-color transition */
}

/* Hover Action State */
.footer .back-to-top:hover {
    color: #0E6973; /* Changes cleanly to dark active teal on hover */
}

/* ==========================================================================
   HOVER ACTIONS (Pure CSS Property Shifts)
   ========================================================================== */

/* Shifting color to your dark teal variation seamlessly when link is hovered */
.footer-socials a:hover .social-icon {
    fill: #0E6973; 
}

/* ==========================================================================
   5. CONTENT GRID LAYER
   ========================================================================== */
.content-grid {
    display: grid;
    grid-template-columns: repeat(4, 282px);
    grid-gap: 24px;
    justify-content: center; 
    padding: 24px; 
    box-sizing: border-box;
}

/* Core Grid Item Setup */
.grid-item {
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1 !important; 
    box-sizing: border-box;
    position: relative;    
    overflow: hidden;      
    text-decoration: none; 
}

/* Background Image Layer */
.grid-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;     
    transition: transform 0.4s ease; 
}

/* Text & Color Overlay Layer */
.grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Button Text Styling */
.grid-overlay span {
    color: #ffffff;
    font-family: 'Gotham', sans-serif;
    font-weight: 400; 
    font-size: 24px;
    padding: 24px;
    box-sizing: border-box;
}

.grid-item:hover .grid-overlay {
    opacity: 1;
}

.contact-container form {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 500px; /* Prevents input fields stretching excessively wide on desktop */
    margin: 0 auto;
    gap: 20px;
    padding: 0 24px;   /* Adds a 24px safety margin on the left and right sides */
    box-sizing: border-box; /* Ensures the padding doesn't break your max-width calculation */
}

.contact-inputs {
    width: 100%;
    padding: 12px 16px;
    box-sizing: border-box;
    border: 2px solid #65A2A9;
    font-family: 'Gotham', Arial, Helvetica, sans-serif;
    font-size: 16px;
    color: #0E6973;
    outline: none;
    transition: border-color 0.2s ease-in-out;
}

.contact-inputs:focus {
    border-color: #0E6973;
}

/* Textarea height setup override */
textarea.contact-inputs {
    height: 150px;
    resize: vertical; /* Let your viewers safely expand height only */
}

/* Styled brand submission element */
.contact-container form button {
    align-self: flex-start; /* Keeps button naturally scaled to width of text content */
    background-color: #65A2A9;
    color: white;
    border: none;
    padding: 10px 30px;
    font-family: 'Gotham', sans-serif;
    font-size: 18px;
    text-transform: uppercase;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.contact-container form button:hover {
    background-color: #0E6973;
}

/* ==========================================================================
   6. RESPONSIVE OVERRIDES (Mobile Layout Optimization)
   ========================================================================== */
@media screen and (max-width: 480px) {
    /* 1. Stack the header content vertically and adjust height safety margins */
    .header {
        flex-direction: column;
        height: auto;
        min-height: auto;
        padding: 24px 16px;
        gap: 16px;
    }

    /* Scale down the logo image so it fits beautifully on small screens */
    .header .logo {
        width: 100%;
        max-width: 280px; /* Limits size on very narrow mobile devices */
        height: auto;
    }

    /* Wrap navigation links cleanly onto two rows if needed, or keep them centered */
    .header .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    /* Scale down navigation typography slightly so text doesn't clip */
    .header .nav a {
        font-size: 18px;
        padding: 6px 10px;
    }

    /* 2. Stack footer components vertically and drop legacy floats */
    .footer {
        flex-direction: column;
        height: auto;
        min-height: auto;
        padding: 24px 16px;
        gap: 20px; /* Clear breathing room between social icons and back-to-top button */
    }

    /* Center the social icons layer */
    .footer-socials {
        justify-content: center;
    }

    /* Ensure back-to-top acts as a block element on mobile for easier tapping */
    .footer .back-to-top {
        font-size: 18px;
        text-align: center;
        width: auto;
    }

    /* 3. Collapse content grid into a single crisp vertical stream */
    .content-grid {
        grid-template-columns: 1fr; 
        padding: 16px; 
        grid-gap: 16px; /* Slightly tighter gap to maximize image space on small displays */
    }

    /* Shrink the grid text overlay size slightly so long project titles fit */
    .grid-overlay span {
        font-size: 18px;
        padding: 16px;
    }
}

