/* --- Modern Color Palette & Variables --- */
:root {
    --dark-blue: hsl(213, 86%, 27%);
    --medium-blue: hsl(204, 66%, 47%);
    --light-blue: hsl(191, 78%, 78%);
    --white: #ffffff;
    --text-dark: #1a202c;
    --text-light: #f8f9fa;
    --grey-light: #f7fafc;
    --grey-medium: #e2e8f0;
    --border-color: #e2e8f0;
    --gradient-bg: linear-gradient(135deg, var(--grey-light) 0%, #ffffff 100%);
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    --header-height: 5rem;
}

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

html {
    scroll-behavior: smooth;
}

html, body {
    overflow-x: hidden;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    font-size: 16px;
    font-weight: 400;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Pushes the entire main content down to account for the fixed header */
main {
    padding-top: var(--header-height);
}

/* This is the key fix for anchor links, creating space so the fixed header doesn't overlap content */
section[id] {
    scroll-margin-top: var(--header-height);
}

.nav-body-lock {
    overflow: hidden;
}

/* --- Typography --- */
h1, h2, h3, h4 {
    color: var(--dark-blue);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    font-weight: 600;
}
h1 { font-size: 3.5rem; font-weight: 700; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

p {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}
.text-center { text-align: center; }

a {
    color: var(--medium-blue);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}
a:hover {
    color: var(--dark-blue);
    transform: translateY(-1px);
}

/* --- Layout & Containers --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.content-section, .content-section-light {
    padding: 6rem 0;
    position: relative;
}

.content-section-light {
    background: var(--gradient-bg);
}

.content-section::before,
.content-section-light::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--grey-medium), transparent);
}

/* --- Header & Navigation --- */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    display: flex;
    align-items: center;
    background: hsla(213, 86%, 27%, 0.85);
    padding: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
}
.nav-logo::before {
    content: '';
    display: inline-block;
    width: 32px;
    height: 32px;
    background-image: url('images/ILP - Logo Square.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    border-radius: 6px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
}
.nav-links a {
    color: var(--white);
    font-weight: 500;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}
.nav-links a:hover {
    background: rgba(255,255,255,0.1);
    transform: translateY(0);
}

header nav {
    width: 100%;
}

/* --- Hamburger Menu --- */
.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}
.hamburger {
    display: block;
    position: relative;
    width: 25px;
    height: 3px;
    background: var(--white);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}
.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--white);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}
.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

.nav-open .hamburger { background: transparent; }
.nav-open .hamburger::before { transform: rotate(45deg) translate(5px, 6px); }
.nav-open .hamburger::after { transform: rotate(-45deg) translate(5px, -6px); }

/* --- Other Content Sections --- */
.hero { padding: 3.2rem 0 3rem 0; text-align: center; background: var(--gradient-bg); position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(circle at 30% 50%, rgba(59, 130, 246, 0.05) 0%, transparent 50%); pointer-events: none; }
.hero .container { display: flex; flex-direction: column; align-items: center; justify-content: center; }
.hero-logo { max-width: 100%; width: 780px; height: auto; margin: 0 auto 0 auto; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.1)); display: block; }
.mission-statement { padding: 4rem 0; background: var(--white); position: relative; text-align: center; }
.mission-title { font-size: 1.8rem; font-weight: 600; color: var(--medium-blue); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 2.5rem; }
.mission-list { max-width: 800px; margin: 0 auto; display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.mission-item { display: flex; align-items: center; gap: 1rem; text-align: left; }
.mission-item img { width: 24px; height: 24px; flex-shrink: 0; }
.mission-item h3 { margin: 0; color: var(--dark-blue); font-size: 1.25rem; font-weight: 500; }
.intro-section { padding: 2rem 0 4rem 0; text-align: center; background: var(--white); border-top: 1px solid var(--border-color); }
.intro-text { font-size: 1.25rem; max-width: 900px; margin: 0 auto 0 auto; font-weight: 400; color: var(--text-dark); line-height: 1.7; }
.cta-button { display: inline-flex; align-items: center; gap: 0.5rem; background: linear-gradient(135deg, var(--medium-blue), var(--dark-blue)); color: var(--white); padding: 1rem 2.5rem; border-radius: 50px; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; transition: all 0.3s ease; box-shadow: var(--shadow-md); border: none; cursor: pointer; }
.cta-button:hover { transform: translateY(-2px); box-shadow: var(--shadow-xl); color: var(--white); }
.content-layout { display: grid; grid-template-columns: 1fr 0.8fr; gap: 4rem; align-items: center; }
.content-layout.reverse .content-text { order: 2; }
.content-layout.reverse .content-image { order: 1; }
.content-image img { width: 100%; border-radius: 16px; box-shadow: var(--shadow-lg); display: block; }
.info-boxes-container { padding-top: 6rem; }
.info-boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.info-box { background: var(--white); padding: 2.5rem; border-radius: 16px; border: 1px solid var(--border-color); box-shadow: var(--shadow-sm); transition: all 0.3s ease; position: relative; overflow: hidden; }
.info-box::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, var(--medium-blue), var(--light-blue)); }
.info-box:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.info-box h3 { margin-bottom: 1rem; text-transform: uppercase; font-size: 1.1rem; font-weight: 600; color: var(--dark-blue); }
.info-box p { color: var(--text-dark); }
.logo-bullets { list-style: none; padding-left: 0; }
.logo-bullets li { padding-left: 2.5em; position: relative; margin-bottom: 1rem; color: var(--text-dark); }
.logo-bullets li::before { content: ''; position: absolute; left: 0; top: 0.2em; width: 1.5em; height: 1.5em; background-image: url('images/ILP - Logo Square.png'); background-size: contain; background-repeat: no-repeat; background-position: center; }
.directors-container { display: flex; gap: 3rem; justify-content: center; flex-wrap: wrap; }
.director-profile { flex: 1; max-width: 400px; text-align: center; background: var(--white); padding: 3rem 2rem; border-radius: 16px; box-shadow: var(--shadow-sm); transition: all 0.3s ease; }
.director-profile:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.director-profile h3 { color: var(--dark-blue); }
.director-profile p { color: var(--text-dark); }
.director-photo { width: 160px; height: 160px; border-radius: 50%; object-fit: cover; margin-bottom: 1.5rem; border: 4px solid var(--white); box-shadow: var(--shadow-md); }
.director-links { margin-top: 1.5rem; font-size: 0.9rem; }
footer { background: var(--dark-blue); color: var(--text-light); padding: 6rem 0 2rem 0; text-align: center; position: relative; }
footer::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent); }
footer h2, footer h3 { color: var(--white); }
footer p { color: var(--text-light); }
footer .logo-bullets li::before { background-image: url('images/ILP - Logo Square.png'); background-size: contain; background-repeat: no-repeat; background-position: center; }
footer a { color: var(--grey-light); font-weight: 400; transition: all 0.3s ease; }
footer a:hover { color: var(--white); }
.footer-columns { display: flex; justify-content: space-around; text-align: left; gap: 3rem; margin: 3rem auto; max-width: 1000px; }
.footer-col { flex: 1; }
.footer-col .small-text { font-size: 0.9rem; color: #94a3b8; line-height: 1.6; }
.copyright { margin-top: 3rem; border-top: 1px solid rgba(255,255,255,0.1); padding-top: 2rem; font-size: 0.9rem; color: #94a3b8; }
.fade-in { opacity: 1; transform: translateY(0); transition: all 0.8s ease-out; }
.fade-in.animate-in { opacity: 0; transform: translateY(30px); }
.fade-in.visible { opacity: 1; transform: translateY(0); }
.section-intro { max-width: 900px; margin: 0 auto 3rem auto; text-align: center; font-size: 1.2rem; color: var(--text-dark); line-height: 1.7; }

/* --- Responsive Design --- */
@media (max-width: 1024px) {
    .content-layout, .content-layout.reverse {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .info-boxes {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    html {
        scroll-behavior: auto;
    }

    .container { padding: 0 1rem; }
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }

    .nav-toggle {
        display: block;
        margin-left: auto;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100dvh;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 7rem;
        gap: 2.5rem;
        background: var(--dark-blue);
        z-index: 1000;
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 350ms ease-out, visibility 350ms ease-out;
    }

    .nav-links a {
        font-size: 1.5rem;
        font-weight: 600;
        padding: 0.5rem 1rem;
    }

    .nav-open .nav-links {
        transform: translateX(0%);
        visibility: visible;
    }

    .directors-container, .footer-columns {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2rem;
    }
    .content-section, .content-section-light {
        padding: 4rem 0;
    }
    .info-boxes-container {
        padding-top: 3rem;
    }

    .mission-item h3 {
        font-size: 1.1rem;
    }
    .mission-title {
        font-size: 1.5rem;
    }
}

/* --- Building Blocks Section (Stacked, No Overlap) --- */
.building-blocks-stack {
    position: relative;
}

.block {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    background: var(--white);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    max-width: 85%; /* Set a consistent max-width */
    margin-bottom: 2.5rem; /* This adds clear spacing between blocks */
    position: relative;
    border: 1px solid var(--border-color);
}

/* Ensure the last block doesn't have extra space at the bottom */
.building-blocks-stack .block:last-child {
    margin-bottom: 0;
}

/* Stagger the blocks left and right */
.block-left {
    margin-right: auto;
}

.block-right {
    margin-left: auto;
}

.block-image {
    flex-shrink: 0;
    width: 140px;
    height: 140px;
}

.block-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
}

.block-text h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.block-text p,
.block-text .feature-list {
    margin-bottom: 0;
}

/* --- Responsive styles for Building Blocks --- */
@media (max-width: 768px) {
    .block {
        flex-direction: column;
        max-width: 100%;
        margin-bottom: 2rem;
        padding: 2rem;
        gap: 1.5rem;
    }

    .block-image {
        width: 100%;
        height: 180px;
    }

    /* Remove the stagger on mobile */
    .block-left,
    .block-right {
        margin-left: 0;
        margin-right: 0;
    }
}

/* --- FIX: Reorder 'Why Us' section on mobile --- */
@media (max-width: 768px) {
  #why-us .content-layout {
    display: flex;
    flex-direction: column;
  }
  #why-us .content-image {
    order: -1; /* This moves the image to the top */
  }
}

/* --- UPDATED: Contact Form Styles (for Light BG) --- */
#contact-form {
    max-width: 700px; /* REDUCED WIDTH */
    margin: 0 auto;
    text-align: left;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.form-group label {
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--white);
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--medium-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #a0aec0;
}

.form-submit-area {
    display: flex;
    flex-direction: column; /* CHANGED: Stack button and status */
    align-items: center; /* CHANGED: Center button */
    gap: 1rem; /* CHANGED: Add gap */
    margin-top: 1rem;
}

#form-status {
    font-size: 1rem;
    font-weight: 500;
    margin: 0;
}

/* Form status colors */
#form-status.success {
    color: #2f855a;
}
#form-status.error {
    color: #c53030;
}

/* NEW: Form Disclaimer */
.form-disclaimer {
    font-size: 0.9rem;
    color: #4a5568;
    text-align: center;
    margin-top: 1.5rem;
    margin-bottom: 0;
}


/* Responsive Form */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .form-group {
        margin-bottom: 1rem;
    }
    /* UPDATED: Removed redundant rules, as desktop now matches mobile */
    .form-submit-area {
        gap: 1rem;
    }
}
