/* Importing fonts */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@700&family=Shantell+Sans&display=swap');
/* Importing Google Fonts for Roboto and Shantell Sans */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600&family=Poppins:wght@400;600&display=swap');

/* Basic Reset */
* {
    margin: 0;
    /* Removes default margin */
    padding: 0;
    /* Removes default padding */
    box-sizing: border-box;
    /* Ensures padding and border are included in element's total width and height */
}

/* Theme variables: NGO-friendly palette (teal primary, warm accent, soft neutrals) */
:root {
    --teal-700: #0ea5a4;
    /* modern teal */
    /* primary */
    --teal-900: #075b58;
    /* dark teal */
    /* dark */
    --accent: #ffb86b;
    /* warm soft accent */
    /* warm accent for highlights */
    --bg-page: #f6fbf9;
    /* very light greenish background */
    --card-bg: #ffffff;
    /* cards / section background */
    --text-primary: #09202a;
    /* dark heading/text */
    --muted: #6b7280;
    /* muted text */
    --heading-color: #083344;
    /* Common layout tokens */
    --section-gap: 12px;
    /* used by flex/grid containers inside sections */
    --section-bar-color: var(--teal-700);
}

/* Global visual polish */
* {
    transition: background-color .28s ease, color .22s ease, box-shadow .28s ease, transform .22s ease;
}

/* Scale typography globally by 20% (non-layout change) */
html {
    font-size: 120%;
}

/* Elevation tokens */
:root {
    --elev-sm: 0 6px 16px rgba(3, 15, 20, 0.06);
    --elev-md: 0 10px 30px rgba(3, 15, 20, 0.09);
    --elev-lg: 0 20px 50px rgba(3, 15, 20, 0.12);
}

/* Focus styles for accessibility */
:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--teal-700) 65%, white 35%);
    outline-offset: 3px;
}

/* Buttons and interactive controls */
.navbutton,
.btn,
.back-button {
    box-shadow: var(--elev-sm);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.navbutton:hover,
.btn:hover,
.back-button:hover {
    transform: translateY(-3px);
    box-shadow: var(--elev-md);
}

.navbutton:active,
.btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.navbutton:focus-visible,
.btn:focus-visible,
.back-button:focus-visible {
    outline: 3px solid var(--teal-700);
    outline-offset: 4px;
}

/* subtle text contrast boost */
body,
p,
li,
dd {
    color: #07343a;
}

/* Make links more prominent */
a {
    color: var(--teal-700);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* About section background image (50% opacity) */
.section-about {
    position: relative;
    /* ensure pseudo-element positions relative to this */
    overflow: hidden;
    /* clip the pseudo-element to section bounds */
}

.section-about::before {
    content: "";
    position: absolute;
    inset: 0;
    /* top-level background image for About section */
    background-image: url('../about/about_background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.5;
    /* 50% opacity as requested */
    z-index: 0;
    /* behind content */
    pointer-events: none;
    /* let clicks pass through */
}

/* Ensure content sits above the background image */
.section-about>*,
.section-about .about-container {
    position: relative;
    z-index: 1;
}


/* --------------------------------------------------
   COMMON (applies to all viewport sizes)
   Put global section/layout rules here so min/max blocks
   can override only what's necessary.
   -------------------------------------------------- */

/* Global top bar for sections (visual separator) */
.section::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: var(--section-bar-height);
    background: var(--section-bar-color);
    z-index: 2;
    /* above section backgrounds (z-index:0) */
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    pointer-events: none;
}

/* Common spacing token applied to section internals */
.section,
.section>.container {
    gap: var(--section-gap);
}

@media only screen and (min-width: 768px) {

    /* Body Setup  */
    body {
        background: linear-gradient(135deg, var(--bg-page), var(--card-bg));
        /* soft page background */
        line-height: 1.4;
        color: var(--text-primary);
        margin: 0;
        padding: 0;
        font-family: 'Poppins', 'Roboto', sans-serif;
    }

    /* Floating Social Media Icons */
    .social-icons {
        position: fixed;
        /* Fixes the position of social icons to the bottom right */
        top: 45vh;
        /* Positions the icons at the bottom of the page */
        right: 40px;
        /* Positions the icons 10px from the right */
        transform: translateY(-90%);
        /* Initially hides the icons outside the view */
        display: flex;
        /* Uses flexbox to arrange icons vertically */
        flex-direction: column;
        /* Aligns icons in a column */
        gap: 15px;
        /* Adds 15px space between icons */
        z-index: 1000;
        /* Ensures social icons are on top */
    }

    .social-icon {
        display: block;
        /* Makes each icon block level */
        width: 60px;
        /* Sets the width of each icon */
        height: 60px;
        /* Sets the height of each icon */
        background-color: var(--card-bg);
        /* Sets a white background for icons */
        border-radius: 50%;
        /* Makes icons round */
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        /* Adds a subtle shadow around the icons */
        overflow: hidden;
        /* Ensures the icon image does not overflow */
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        /* Adds smooth transition for hover effects */
        text-align: center;
        /* Centers icon image within the circle */
        padding: 10px;
        /* Adds padding inside the icon */
    }

    .social-icon img {
        width: 40px;
        /* Sets image width inside the icon */
        height: 40px;
        /* Sets image height inside the icon */
        object-fit: cover;
        /* Ensures the image covers the icon area without distortion */
    }

    .social-icon:hover {
        transform: scale(1.2);
        /* Enlarges icon on hover */
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
        /* Increases shadow size on hover */
    }

    .social-icon:active {
        transform: scale(1.1);
        /* Slightly shrinks the icon when clicked */
    }

    .social-icon:hover img {
        filter: brightness(1.2);
        /* Brightens the image on hover */
    }

    /* Navbar */
    .navbar {
        position: fixed;
        /* Fixes the navbar to the top of the screen */
        top: 0;
        /* Positions the navbar at the top */
        left: 0;
        /* Positions the navbar to the left edge */
        width: 100%;
        /* Makes the navbar span the entire width of the page */
        height: 100px;
        /* Sets the height of the navbar */
        background: linear-gradient(90deg, var(--teal-700), var(--teal-900));
        /* teal gradient */
        z-index: 2000;
        /* Ensures navbar stays on top of other content */
        display: flex;
        /* Uses flexbox to align items in a row */
        justify-content: space-between;
        /* Distributes space between navbar items */
        align-items: center;
        /* Centers items vertically */
        padding: 15px 20px;
        /* Adds padding around navbar */
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        /* Adds subtle shadow to navbar */
    }

    /* Secondary section navbar (shared look across sections) */
    .secnavbar {
        top: 0;
        left: 0;
        width: 100%;
        text-align: center;
        /* Glassmorphism base: semi-transparent background with fallback */
        background: rgba(255, 255, 255, 0.6);
        color: var(--heading-color);
        z-index: 2000;
        box-shadow: 0 6px 18px rgba(3, 15, 20, 0.06);
        /* subtle floating shadow */
        -webkit-backdrop-filter: blur(6px);
        backdrop-filter: blur(6px);
    }

    /* Ensure secnavbar content (heading) is clear and readable */
    .secnavbar h2 {
        margin: 0;
        font-size: 1.5rem;
        padding: 14px 18px;
        color: var(--heading-color);
        font-weight: 600;
        letter-spacing: 0.02em;
        display: inline-block;
        position: relative;
        z-index: 2;
        transition: color .22s ease, text-shadow .22s ease, transform .22s ease;
    }

    /* Remove older underline/pseudo underlines for section headings only */
    .secnavbar h2::after,
    .section > h2::after,
    [class*="section-"] > h2::after,
    #gallery h2::after,
    .section .section-title::after {
        display: none !important;
    }

    /* Decorative horizontal bar behind section headings for full-width sections */
    .secnavbar::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        height: 1.6em;
        background: linear-gradient(90deg, rgba(8,51,68,0.06), rgba(14,165,164,0.04));
        z-index: 1;
        pointer-events: none;
    }

    /* Hover / focus / active affordances for the heading (acts like nav item) */
    .secnavbar h2:hover,
    .secnavbar h2:focus {
        text-shadow: 0 6px 18px rgba(3,15,20,0.06);
        transform: translateY(-1px);
    }

    .secnavbar h2::after {
        /* small underline animation for hover/active */
        content: "";
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: 6px;
        width: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--teal-700), var(--accent));
        border-radius: 2px;
        transition: width .28s ease;
        z-index: 3;
    }

    .secnavbar h2:hover::after,
    .secnavbar h2:focus::after,
    .secnavbar h2.active::after,
    .secnavbar h2[aria-current="true"]::after {
        width: 56px;
    }

    /* Accessible focus outline for keyboard users */
    .secnavbar h2:focus-visible {
        outline: 3px solid color-mix(in srgb, var(--teal-700) 60%, white 40%);
        outline-offset: 4px;
    }

    /* --------------------------
       Section headings (base / mobile)
       -------------------------- */
    .section > h2,
    [class*="section-"] > h2,
    .section .section-title h2,
    .secnavbar h2,
    #gallery > h2 {
        display: block;
        width: 100%;
        position: relative;
        z-index: 2;
        margin: 0 0 0.9rem 0;
        padding: 0.4rem 0;
        color: var(--heading-color);
        font-weight: 600;
        letter-spacing: 0.02em;
        transition: color .22s ease, text-shadow .22s ease, transform .22s ease;
        background: transparent;
    }

    /* remove earlier small underline/divider for these headings */
    .section > h2::after,
    [class*="section-"] > h2::after,
    .section .section-title h2::after,
    .secnavbar h2::after,
    #gallery > h2::after {
        display: none !important;
    }

    /* decorative full-width bar behind headings (low opacity) */
    .section > h2::before,
    [class*="section-"] > h2::before,
    .section .section-title h2::before,
    #gallery > h2::before {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
        height: 1.6em;
        background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(8,51,68,0.04));
        z-index: 1;
        pointer-events: none;
    }

    /* small underline/active indicator for headings */
    .section > h2::after,
    [class*="section-"] > h2::after,
    .section .section-title h2::after,
    #gallery > h2::after {
        content: "";
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: 6px;
        width: 0;
        height: 3px;
        background: linear-gradient(90deg, var(--teal-700), var(--accent));
        border-radius: 2px;
        transition: width .28s ease;
        z-index: 3;
    }

    .section > h2:hover::after,
    .section .section-title h2:hover::after,
    [class*="section-"] > h2:hover::after,
    #gallery > h2:hover::after {
        width: 56px;
    }

    .section > h2:focus-visible,
    .section .section-title h2:focus-visible,
    .secnavbar h2:focus-visible,
    #gallery > h2:focus-visible {
        outline: 3px solid color-mix(in srgb, var(--teal-700) 60%, white 40%);
        outline-offset: 4px;
    }

    .nav-links {
        list-style: none;
        /* Removes list styling */
        display: flex;
        /* Aligns navbar links in a row */
        margin: 0;
        /* Removes margin */
        padding: 0;
        /* Removes padding */
    }

    .nav-links li {
        position: relative;
        /* Allows positioning of underline within the list item */
        display: inline-block;
        /* Makes list items inline */
        margin: 0 10px;
        /* Adds horizontal spacing between links */
    }

    .nav-links li a {
        color: white;
        /* Sets link text color to white */
        text-decoration: none;
        /* Removes underline from links */
        font-size: 19.2px;
        /* Sets font size for links */
        padding: 8px 15px;
        /* Adds padding inside the link */
        border-radius: 5px;
        /* Rounds the corners of the link */
        transition: all 0.3s ease;
        /* Adds smooth transition for hover effects */
        font-weight: bold;
        /* Makes the link text bold */
        display: inline-block;
        /* Makes the link an inline block */
        position: relative;
        /* Allows positioning of the underline */
    }

    .nav-links li a:hover {
        background-color: rgba(255, 255, 255, 0.2);
        /* Adds a background color on hover */
    }

    .nav-links a.active .underline {
        width: 100%;
        /* Expands the underline fully when link is active */
    }

    .nav-links li.active a .underline {
        width: 100%;
        /* Keeps the underline expanded when link is active */
    }

    .underline {
        content: '';
        /* Creates a new element for the underline */
        position: absolute;
        /* Positions the underline within the link */
        bottom: 0;
        /* Aligns the underline to the bottom of the link */
        left: 50%;
        /* Centers the underline horizontally */
        width: 0;
        /* Initially sets the underline width to 0 */
        height: 2px;
        /* Sets the height of the underline */
        background-color: #f39c12;
        /* Sets the underline color to yellow */
        transition: width 0.5s ease-in-out;
        /* Smooth transition for width expansion */
        transform: translateX(-50%);
        /* Centers the underline horizontally */
    }

    /* Section heading bar: centered bar similar to the navbar underline */
    section h2,
    [class*="section"] h2,
    #gallery h2,
    .gallery h2 {
        position: relative;
        padding: 8px;
        color: var(--heading-color);
    }

    section h2::after,
    [class*="section"] h2::after,
    #gallery h2::after,
    .gallery h2::after {
        content: '';
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        bottom: 0;
        width: 56px;
        height: 3px;
        background: var(--section-bar-color);
        border-radius: 2px;
        transition: width 0.35s ease, background-color 0.25s ease;
    }

    @media (max-width: 768px) {

        section h2,
        [class*="section"] h2,
        #gallery h2,
        .gallery h2 {
            padding: 8px;
        }

        section h2::after,
        [class*="section"] h2::after,
        #gallery h2::after,
        .gallery h2::after {
            width: 40px;
            height: 2px;
        }
    }

    /* Gallery preview cards on the index page: large-screen max width, narrower on small screens */
    .gallery-buttons .gallery-preview {
        /*display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;*/
        max-width: 500px;
        /* default for larger viewports (applies within min-width media below) */
    }

    /* Hamburger Menu */
    .hamburger {
        display: none;
        /* Hides the hamburger menu by default */
        height: 30px;
        /* Sets the height of the hamburger */
        flex-direction: column;
        /* Arranges the lines of the hamburger vertically */
        justify-content: space-between;
        /* Distributes space between the lines */
        width: 30px;
        /* Sets the width of the hamburger */
        cursor: pointer;
        /* Changes cursor to pointer on hover */
    }

    .hamburger span {
        background-color: white;
        /* Sets the color of hamburger lines to white */
        height: 5px;
        /* Sets the height of each line */
        width: 30px;
        /* Sets the width of each line */
        border-radius: 2px;
        /* Rounds the corners of the lines */
        transition: all 0.3s ease;
        /* Smooth transition for animations */
    }

    .hamburger.active span:nth-child(1) {
        transform: translate(0, 12.5px) rotate(45deg);
        /* Rotates the first line to form an "X" */
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
        /* Hides the second line */
    }

    .hamburger.active span:nth-child(3) {
        transform: translate(0, -12.5px) rotate(-45deg);
        /* Rotates the third line to form an "X" */
    }

    .hamburger:hover span {
        background-color: #ffeb3b;
        /* Changes the line color to yellow on hover */
    }

    /* Navbar logo */
    .mainlogo-container {
        height: 80px;
        /* Adjust based on your navbar height */
        width: auto;
        /* Keep width dynamic */
        display: flex;
        align-items: center;
    }

    .mainlogo {
        max-height: 100%;
        /* Constrain the height */
        max-width: 100%;
        /* Constrain the width */
        object-fit: contain;
        /* Ensures the whole logo fits */
    }

    /* Section Home - large screen adjustments to avoid overlaps */
    body {
        padding-top: 100px;
        /* reserve space for fixed navbar */
    }

    .section-home {
        /*position: relative;*/
        background-color: var(--card-bg);
        color: var(--text-primary);
        opacity: 0;
        animation: fadeIn 2s forwards;
        min-height: 60vh;
        /* flexible height instead of fixed 85vh */
        display: flex;
        align-items: flex-start;
        /*  margin: 2rem 0; separate from other sections */
        z-index: 1;
    }

    /* === Section Home (hero) === */
    /* Scoped hero styles for the homepage header area. Uses absolute image behind content
   while preserving heading sizes, alignment, margins and padding. */
    .section-home {
        position: relative;
        overflow: hidden;
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 60vh;
        background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.01));
    }

    .section-home .home-container {
        position: relative;
        z-index: 1;
        /* keep above the background image */
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 28px;
    }

    .section-home .logo-container {
        flex: 0 0 220px;
        display: flex;
        align-items: center;
        justify-content: center;
        /* default (small screens): keep logo in flow and centered */
        position: relative;
        margin: 0 auto;
        z-index: 2;
    }

    .section-home .home-logo {
        width: 100%;
        height: auto;
        display: block;
    }

    /* The img element used as background (class name `background-video`) is positioned
   absolutely and sits behind content. Opacity keeps it subtle and it preserves layout. */
    .section-home .background-video {
        /* default (small screens): background image stays in document flow
           and scales naturally so it doesn't cover the whole section */
        position: static;
        width: 100%;
        height: auto;
        object-fit: cover;
        z-index: 0;
        pointer-events: none;
        filter: saturate(0.98) contrast(0.98);
    }

    .section-home .home-container>* {
        position: relative;
        z-index: 1;
    }

/* Large-screen overrides: make background media fill the section and position logo at 1/3 */
@media only screen and (min-width: 768px) {
    .section-home .background-video {
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 0;
        pointer-events: none;
    }

    .section-home .logo-container {
        position: absolute;
        left: 20%;
        top: 50%;
        transform: translate(-50%, -50%);
        margin: 0;
    }
}


    /* Background video */
    .background-video {
        position: absolute;
        left: 0;
        width: 100%;
        height: 100%;
        /*object-fit: cover;*/
        z-index: 1;
        /* keep background behind content and other sections */
    }

    /* Container flex setup */
    .home-container {
        display: flex;
        width: 100%;
        height: 100%;
    }

    /* Logo side */
    .logo-container {
        width: 30vw;
        max-height: 70vh;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        z-index: 2;
        /* above background */
    }

    /* Make a perfect circular wrapper */
    .home-logo {
        left: 3vw;
        width: 35vw;
        max-height: 70vh;
        overflow: hidden;
    }

    /* Video side */
    .video-container {
        width: 70vw;
        max-height: 70vh;
        overflow: hidden;
        position: relative;
        z-index: 1;
    }

    .navbar p {
        position: fixed;
        /* Fixes the buttons at the bottom of the screen */
        bottom: 12px;
        /* Minimal margin from bottom */
        left: 50%;
        /* Center alignment horizontally */
        transform: translateX(-50%);
        /* Perfect horizontal centering */
        display: flex;
        /* Ensures buttons align neatly */
        gap: 10px;
        /* Adds space between the buttons */
        z-index: 3000;
        /* Ensures the buttons are above other content */
    }

    /* Style for the buttons */
    .navbutton {
        width: 150px;
        display: inline-block !important;
        padding: 15px 30px;
        font-size: 16px;
        font-weight: bold;
        color: #fff;
        /* White text */
        background-color: #000;
        /* Black button */
        border: none;
        border-radius: 8px;
        /* Rounded corners */
        box-shadow: 0 4px #444;
        /* Creates the 3D effect */
        text-align: center;
        text-decoration: none;
        cursor: pointer;
        transition: all 0.2s ease-in-out;
        /* Smooth animations */
    }

    .navbutton:hover {
        background-color: var(--text-primary);
        /* Darker gray on hover */
        box-shadow: 0 2px #222;
        /* Reduces shadow for pressed effect */
        transform: translateY(2px);
        /* Simulates button being pressed */
    }

    .navbutton:active {
        background-color: #555;
        /* Lighter gray when clicked */
        box-shadow: 0 1px #111;
        /* Deeply pressed shadow */
        transform: translateY(4px);
        /* Moves button further down */
    }

    /* Desktop: stronger glass + larger heading bar */
    .secnavbar {
        background: rgba(255,255,255,0.55);
        -webkit-backdrop-filter: blur(8px);
        backdrop-filter: blur(8px);
        box-shadow: 0 12px 30px rgba(3,15,20,0.08);
    }

    .secnavbar::before {
        height: 2rem;
        background: linear-gradient(90deg, rgba(8,51,68,0.07), rgba(14,165,164,0.045));
    }

    /* desktop: make the decorative bar behind section h2 slightly larger and more visible */
    .section > h2::before,
    [class*="section-"] > h2::before,
    .section .section-title h2::before,
    #gallery > h2::before {
        height: 1.9em;
        background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(8,51,68,0.06));
    }

    /* improve hover affordance on desktop */
    .section > h2:hover,
    .section .section-title h2:hover,
    .secnavbar h2:hover,
    #gallery > h2:hover {
        text-shadow: 0 10px 30px rgba(3,15,20,0.06);
        transform: translateY(-2px);
    }

    /* Section About Styling */
    .section-about {
        padding: 10px;
        padding-top: 0;
        background-color: var(--card-bg);
        border-radius: 10px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        overflow: visible;
        position: relative;
        color: var(--text-primary);
        height: auto;
    }

    /* Section About Styling */
    .section-about {
        /*margin-top: 17vh;*/
        padding: 10px;
        background-color: var(--card-bg);
        border-radius: 10px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        overflow: visible;
        position: relative;
        color: var(--text-primary);
        height: auto;
    }

    /* Container for About */
    .about-container {
        /* remove fixed viewport height so content can expand */
        height: auto;
        margin-bottom: 10px;
        border-radius: 10px;
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 1rem;
        overflow: visible;
        padding: 12px;
    }

    .about-container p {
        font-size: 19.2px;
        /* was 14px */
        color: #666;
        text-align: center;
        margin: 15px 0;
        line-height: 1.6;
    }

    .aaba-image-section {
        margin-top: 5vh;
    }

    /* New crop container */
    .image-crop {
        border-radius: 10px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        transition: box-shadow 0.3s ease;
    }

    .image-crop:hover {
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    }

    .image-crop img {
        width: 20vw;
        max-width: 100vh;
        display: block;
        transition: transform 0.3s ease-in-out;
    }

    .image-crop:hover img {
        transform: scale(1.05);
    }

    /* Text Section */
    .text-section {
        position: relative;
        flex: 2;
        padding-left: 10px;
        text-align: left;
        font-size: 19.2px;
        /* was 14px */
    }

    /* Section Title Styling */
    .section-title h2 {
        font-family: 'Playfair Display', serif;
        font-size: 33.6px;
        /* was 24px */
        color: #2e3a59;
        margin-bottom: 20px;
        opacity: 0;
        animation: fadeInUp 2s forwards 0.5s;
        /* Applies a fade-in-up animation */
        letter-spacing: 0.5px;
        font-weight: 600;
        border-bottom: 3px solid var(--accent);
        display: inline-block;
        padding-bottom: 4px;
        transition: color 0.3s ease;
    }

    .section-title h2:hover {
        color: var(--accent);
    }

    .section-title p {
        font-size: 21.6px;
        /* was 16px */
        color: #777;
        line-height: 1.6;
        opacity: 0;
        animation: fadeInUp 2s forwards 1s;
    }

    /* Mission Section Styling */
    .mission {
        width: 100%;
        background-color: var(--card-bg);
        border-radius: 10px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        padding: 20px;
        opacity: 0;
        animation: fadeInUp 2s forwards 3s;
        transition: background-color 0.3s ease, box-shadow 0.3s ease;
    }

    .mission:hover {
        background-color: #fdfdfd;
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
    }

    .mission h3 {
        font-size: 24px;
        /* was 18px */
        color: #2e3a59;
        margin-bottom: 16px;
    }

    .mission ul {
        font-size: 19.2px;
        /* was 14px */
        list-style: none;
        margin: 0;
        padding-left: 0;
        line-height: 1.6;
        /* improve vertical spacing */
    }

    .mission li {
        font-size: 19.2px;
        /* was 14px */
        margin-bottom: 18px;
        /* a bit more breathing room */
        position: relative;
        padding-left: 24px;
    }

    .mission li::before {
        content: "✔";
        position: absolute;
        left: 0;
        color: var(--accent);
        font-weight: bold;
    }

    /* Legacy Section Styling */
    .legacy {
        margin-top: 3vh;
        text-align: center;
        opacity: 0;
        animation: fadeInUp 2s forwards 3.5s;
        background: var(--card-bg);
        border-radius: 10px;
        padding: 20px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    }

    .legacy h3 {
        font-size: 24px;
        /* was 18px */
        color: #2e3a59;
        margin-bottom: 15px;
    }

    .legacy p {
        font-size: 19.2px;
        /* was 14px */
        color: #555;
        line-height: 1.5;
        animation: fadeInUp 1.5s ease-in-out both;
    }

    .legacy strong {
        font-size: 19.2px;
        /* was 14px */
        color: #2e3a59;
    }

    /* Animations */
    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Section for Lifestory */
    .section-lifestory {
        margin-top: 10px;
        padding: 10px;
        padding-top: 0;
        background-color: var(--card-bg);
        border-radius: 10px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        overflow: hidden;
        position: relative;
    }

    /* Wrapper for scrolling area */
    .auto-scroll-wrapper {
        margin: 30px;
        overflow-x: auto;
        line-height: 1.5;
        white-space: normal;
        scroll-behavior: smooth;
        padding-bottom: 1.5rem;
    }

    /* Flex container for story cards */
    .auto-scroll-track {
        display: inline-flex;

    }


    /* Individual story card */
    .story-card {
        z-index: 9;
        width: 33vw;
        min-width: 250px;
        margin-right: 1rem;
        background-color: white;
        border-radius: 0.75rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        padding: 1rem;
        flex-shrink: 0;
    }

    .story-card img {
        width: 30vw;
        height: 30vh;
        object-fit: cover;
        border-radius: 0.5rem;
        margin-bottom: 0.75rem;
    }

    /* Gallery inside story cards: three equal photos */
    .story-card .card-gallery {
        gap: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .story-card .card-gallery img {
        width: 100%;
        aspect-ratio: 4 / 3;
        object-fit: cover;
        border-radius: 0.5rem;
        display: block;
    }

    .story-card h3 {
        font-size: 1.35rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: black;
    }

    .story-card p {
        font-size: 1.05rem;
        color: #4B5563;
        margin-bottom: 0.5rem;
    }

    .story-card a {
        font-size: 1.05rem;
        color: #2563EB;
        text-decoration: none;
        font-weight: 500;
    }

    .story-card a:hover {
        text-decoration: underline;
    }

    /* Arrows */
    .scroll-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background-color: rgba(255, 255, 255, 0.9);
        /*border: none;*/
        font-size: 1.5rem;
        padding: 0.25rem 0.5rem;
        z-index: 10;
        cursor: pointer;
        box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
        border-radius: 0.5rem;
    }

    .left-btn {
        left: 0.5rem;
    }

    .right-btn {
        right: 0.5rem;
    }

    /* Hide scrollbar */
    .auto-scroll-wrapper::-webkit-scrollbar {
        display: none;
    }

    .auto-scroll-wrapper {
        -ms-overflow-style: none;
        /* IE 10+ */
        scrollbar-width: none;
        /* Firefox */
    }

    /* Section Styling */
    .section {
        position: relative;
        /* Allows child elements to be positioned absolutely */
        padding: 40px 10px;
        /* Adds padding inside the section */
        background-color: #ffffff;
        /* Sets the background color to white */
        margin: 10px 0;
        /* Adds vertical spacing between sections */
        border-radius: 10px;
        /* Rounds the corners of the section */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        /* Adds a soft shadow for depth */
        transition: transform 0.3s ease;
        /* Smoothly animates transformations */
    }

    .section p {
        font-size: 1.1em;
        /* Sets the paragraph font size */
        line-height: 1.6;
        /* Increases line height for better readability */
        text-align: center;
        /* Centers the paragraph text */
        color: #7f8c8d;
        /* Light grey color for the text */
    }

    /* Image Styling */
    .about-image img,
    .life-story-image img,
    .project-card img,
    .gallery-grid img {
        width: 100%;
        /* Ensures images span the full width of their container */
        border-radius: 10px;
        /* Rounds the image corners */
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        /* Adds a shadow for depth */
    }

    /* Our Project Section */
    #our-projects {
        text-align: center;
        background: var(--bg-page);
    }

    /* Projects background image (same neutral texture) */
    #our-projects {
        position: relative;
        overflow: hidden;
    }

    #our-projects::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: url('../thoughts/thoughts_background.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 0.5;
        z-index: 0;
        pointer-events: none;
    }

    #our-projects>* {
        position: relative;
        z-index: 1;
    }

    .projects-row {
        display: flex;
        justify-content: center;
        gap: 20px;
        margin: 20px 0;
        flex-wrap: wrap;
    }

    .project-item {
        flex: 1 1 calc(33.333% - 20px);
        max-width: 300px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease;
        overflow: hidden;
    }

    .project-item:hover {
        transform: translateY(-5px);
    }

    .project-item {
        /* enforce consistent 4:3 sizing for project cards */
        aspect-ratio: 4 / 3;
        display: flex;
        flex-direction: column;
    }

    .project-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-bottom: 2px solid rgba(0, 0, 0, 0.06);
        display: block;
        flex-shrink: 0;
    }

    .project-item h3 {
        padding: 10px;
        font-size: 1.1rem;
        color: #444;
    }

    .project-info-button {
        margin: 30px 0;
    }

    .project-info-button .btn {
        display: inline-block;
        padding: 12px 25px;
        background: var(--teal-700);
        color: #fff;
        font-size: 1rem;
        border-radius: 8px;
        text-decoration: none;
        transition: background 0.3s ease;
    }

    .project-info-button .btn:hover {
        background: var(--teal-900);
    }

    /* Gallery Section Styling */
    #gallery {
        background-color: #fff;
        border-radius: 8px;
        box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
        text-align: center;
        position: relative;
        overflow: hidden;
    }

    #gallery::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: url('../thoughts/thoughts_background.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 0.5;
        z-index: 0;
        pointer-events: none;
    }

    #gallery>*,
    #gallery .gallery-buttons {
        position: relative;
        z-index: 1;
    }

    .gallery-buttons {
        position: relative;
        display: flex;
        /* Uses flexbox for button layout */
        justify-content: center;
        /* Centers buttons horizontally */
        align-items: center;
        /* Aligns buttons vertically */
        gap: 20px;
        /* Adds space between buttons */
        flex-wrap: wrap;
        /* Wraps buttons to the next line if necessary */
        padding: 80px;
    }

    /* Photo-album style for gallery buttons */
    .gallery-button {
        position: relative;
        z-index: 2;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        flex: 0 1 300px;
        max-width: 300px;
        padding: 14px 14px 18px;
        background: linear-gradient(180deg, #ffffff, #fbfbfb);
        border-radius: 12px;
        border: 1px solid rgba(6, 30, 24, 0.06);
        box-shadow: 0 10px 28px rgba(3, 15, 20, 0.06);
        transition: transform .28s ease, box-shadow .28s ease;
        overflow: visible;
    }

    .gallery-button::before {
        /* subtle stacked-card hint */
        content: '';
        position: absolute;
        left: 10px;
        top: 10px;
        width: calc(100% - 20px);
        height: calc(100% - 20px);
        background: rgba(255, 255, 255, 0.6);
        border-radius: 10px;
        transform: rotate(-1.5deg);
        z-index: 0;
        box-shadow: 0 6px 18px rgba(3, 15, 20, 0.04);
        pointer-events: none;
    }

    .gallery-button h3 {
        font-size: 1.05rem;
        color: var(--heading-color);
        margin: 0 0 10px 0;
        z-index: 3;
    }

    .gallery-button .gallery-preview {
        z-index: 3;
        gap: 6px;
        width: 100%;
        max-width: 220px;
        margin-bottom: 10px;
        justify-items: center;
    }

    .gallery-button .gallery-preview img {
        width: 100%;
        height: 68px;
        object-fit: cover;
        border-radius: 6px;
        box-shadow: 0 6px 18px rgba(3, 15, 20, 0.06);
        transition: transform .22s ease;
    }

    .gallery-button p {
        font-size: 0.95rem;
        color: var(--muted);
        margin: 0;
        z-index: 3;
    }

    .gallery-button:hover {
        transform: translateY(-8px) scale(1.01);
        box-shadow: 0 18px 48px rgba(3, 15, 20, 0.12);
    }

    /* Section for Thoughts */
    .section-thoughts {
        padding: 10px;
        padding-top: 0;
        background-color: #fff;
        /*border-radius: 10px;*/
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        overflow: hidden;
        position: relative;
    }

    /* Wrapper for scrolling area */
    .auto-scroll-wrapper-thoughts {
        overflow-x: auto;
        white-space: normal;
        scroll-behavior: smooth;
        padding-bottom: 1rem;
        padding-left: 50px;
        line-height: 1.2;
    }

    /* Flex container for story cards */
    #thoughtsScroller {
        display: inline-flex;
    }

    /* Individual thought card */
    .thought-card {
        width: 33vw;
        /*height: 83vh;*/
        min-width: 250px;
        margin-right: 1rem;
        background-color: white;
        border-radius: 0.75rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        padding: 1rem;
        flex-shrink: 0;
        z-index: 9;
    }

    .thought-card img {
        /*width: 20vw;*/
        height: 20vh;
        object-fit: cover;
        border-radius: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .thought-card h3 {
        font-size: 1.125rem;
        font-weight: 600;
        margin-bottom: 0.5rem;
    }

    .thought-card p {
        font-size: 0.875rem;
        color: #4B5563;
        margin-bottom: 0.5rem;
    }

    .thought-card a {
        font-size: 0.875rem;
        color: #2563EB;
        text-decoration: none;
        font-weight: 500;
    }

    .thought-card a:hover {
        text-decoration: underline;
    }

    /* Arrows */
    .scroll-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background-color: rgba(255, 255, 255, 0.9);
        /*border: none;*/
        font-size: 1.5rem;
        padding: 0.25rem 0.5rem;
        z-index: 10;
        cursor: pointer;
        box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
        border-radius: 0.5rem;
    }

    .left-btn-thoughts {
        left: 0.5rem;
    }

    .right-btn-thoughts {
        right: 0.5rem;
    }

    /* Hide scrollbar */
    .auto-scroll-wrapper-thoughts::-webkit-scrollbar {
        display: none;
    }

    .auto-scroll-wrapper-thoughts {
        -ms-overflow-style: none;
        /* IE 10+ */
        scrollbar-width: none;
        /* Firefox */
    }


    /* Footer */
    footer {
        background-color: #34495e;
        /* Sets the footer background color to dark blue-grey */
        color: #fff;
        /* Sets the text color to white */
        padding: 20px;
        /* Adds padding inside the footer */
        text-align: center;
        /* Centers the footer text */
        margin-top: 30px;
        /* Adds space above the footer */
        font-size: 1.1em;
        /* Sets the footer font size */
    }

    footer p {
        margin: 30px;
        /* Adds vertical margin for paragraph spacing */
    }

}

/* Thoughts section background image (50% opacity) */
.section-thoughts {
    position: relative;
    overflow: hidden;
}

.section-thoughts::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('../thoughts/thoughts_background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

.section-thoughts>*,
.section-thoughts .thought-card {
    /*position: relative;
    z-index: 1;*/
}

/* Story section background using the same thoughts background */
.section-lifestory {
    position: relative;
    overflow: hidden;
}

.section-lifestory::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('../thoughts/thoughts_background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

.section-lifestory>* {
    /*position: relative;*/
    z-index: 10;
}

/* Mobile Responsiveness */
@media only screen and (max-width: 768px) {

    /* Body Setup  */
    body {
        /*background: linear-gradient(135deg, #000000, #1a1a1a, #333333);/*
        /* Background with a gradient from black to dark grey */
        /*line-height: 0;
        /* Removes default line-height */
        color: white;
        /* Sets text color to white */
        margin: 0;
        /* Removes default body margin */
        padding: 0;
        /* Removes default body padding */
        font-family: 'Roboto', sans-serif;
        /* Sets the font family to Roboto */
    }

    /* Floating Social Media Icons */
    .social-icons {
        position: fixed;
        /* Fixes the position of social icons to the bottom right */
        top: 30vh;
        /* Positions the icons at the bottom of the page */
        right: 5px;
        /* Positions the icons 10px from the right */
        transform: translateY(-90%);
        /* Initially hides the icons outside the view */
        display: flex;
        /* Uses flexbox to arrange icons vertically */
        flex-direction: column;
        /* Aligns icons in a column */
        gap: 5px;
        /* Adds 15px space between icons */
        z-index: 1000;
        /* Ensures social icons are on top */
    }

    .social-icon {
        display: block;
        /* Makes each icon block level */
        width: 35px;
        /* Sets the width of each icon */
        height: 35px;
        /* Sets the height of each icon */
        background-color: #fff;
        /* Sets a white background for icons */
        border-radius: 50%;
        /* Makes icons round */
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        /* Adds a subtle shadow around the icons */
        overflow: hidden;
        /* Ensures the icon image does not overflow */
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        /* Adds smooth transition for hover effects */
        text-align: center;
        /* Centers icon image within the circle */
        padding: 2px;
        /* Adds padding inside the icon */
    }

    .social-icon img {
        width: 25px;
        /* Sets image width inside the icon */
        height: 25px;
        /* Sets image height inside the icon */
        object-fit: cover;
        /* Ensures the image covers the icon area without distortion */
    }

    .social-icon:hover {
        transform: scale(1.2);
        /* Enlarges icon on hover */
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
        /* Increases shadow size on hover */
    }

    .social-icon:active {
        transform: scale(1.1);
        /* Slightly shrinks the icon when clicked */
    }

    .social-icon:hover img {
        filter: brightness(1.2);
        /* Brightens the image on hover */
    }

    /* Navbar */
    .navbar {
        position: fixed;
        /* Fixes the navbar to the top of the screen */
        top: 0;
        /* Positions the navbar at the top */
        left: 0;
        /* Positions the navbar to the left edge */
        width: 100%;
        /* Makes the navbar span the entire width of the page */
        height: 70px;
        /* Sets the height of the navbar */
        background: linear-gradient(90deg, var(--teal-700), var(--teal-900));
        /* Gradient background from blue to light blue */
        z-index: 2000;
        /* Ensures navbar stays on top of other content */
        display: flex;
        /* Uses flexbox to align items in a row */
        justify-content: space-between;
        /* Distributes space between navbar items */
        align-items: center;
        /* Centers items vertically */
        padding: 15px 20px;
        /* Adds padding around navbar */
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        /* Adds subtle shadow to navbar */
    }

    .nav-links {
        display: flex;
        /* Uses flexbox for nav links */
        flex-direction: column;
        /* Stacks the links vertically */
        position: fixed;
        /* Fixes the navigation to the screen */
        left: 0;
        /* Positions the nav at the left edge */
        top: 70px;
        /* Positions the nav below the navbar (use navbar height) */
        background: linear-gradient(180deg, var(--teal-700), var(--teal-900));
        width: clamp(180px, 40vw, 280px);
        /* Responsive width: min 240px, up to 60vw, max 380px */
        max-height: 60vh;
        /* Limit height and allow scrolling when many links */
        height: auto;
        text-align: left;
        /* Left-align mobile links for better readability */
        padding: 12px 14px;
        /* Adds padding inside the nav */
        border-radius: 0 0 8px 8px;
        /* Rounds the bottom corners */
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.12);
        /* Adds subtle shadow */
        transform: translateX(-100%);
        /* Hides the nav off-screen */
        transition: transform 0.28s ease;
        /* Smooth transition when opening */
        gap: 8px;
        /* Vertical gap between links */
        overflow-y: auto;
        /* Allow scrolling when content exceeds max-height */
        -webkit-overflow-scrolling: touch;
    }

    .nav-links li a {
        color: white;
        /* Sets link text color to white */
        text-decoration: none;
        /* Removes underline from links */
        padding: 10px 15px;
        /* Adds padding inside the link */
        border-radius: 5px;
        /* Rounds the corners of the link */
        transition: all 0.3s ease;
        /* Adds smooth transition for hover effects */
        font-weight: bold;
        /* Makes the link text bold */
        display: inline-block;
        /* Makes the link an inline block */
        position: relative;
        /* Allows positioning of the underline */
        font-size: clamp(14px, 3.5vw, 18px);
        /* Responsive font size (mobile-friendly, scales with viewport) */

    }

    .nav-links.active {
        transform: translateX(0);
        /* Shows the nav when active */
    }

    .nav-links li a:hover {
        background-color: rgba(255, 255, 255, 0.2);
        /* Adds a background color on hover */
    }

    /* Mobile tweaks for background images to improve crop and contrast */
    .section-about::before,
    .section-thoughts::before,
    #gallery::before,
    #our-projects::before {
        background-position: center top;
        background-size: cover;
        opacity: 0.4;
        /* slightly higher on mobile for readability */
    }

    /* Optionally add a subtle overlay on small screens for better contrast */
    .section-about::after,
    .section-thoughts::after,
    #gallery::after,
    #our-projects::after {
        content: "";
        position: absolute;
        inset: 0;
        /*background: linear-gradient(rgba(0,0,0,0.18), rgba(0,0,0,0.08));*/
        z-index: 0.5;
        /* sits between image (0) and content (1) */
        pointer-events: none;
    }

    .nav-links a.active .underline {
        width: 100%;
        /* Expands the underline fully when link is active */
    }

    .nav-links li.active a .underline {
        width: 100%;
        /* Keeps the underline expanded when link is active */
    }

    .underline {
        content: '';
        /* Creates a new element for the underline */
        position: absolute;
        /* Positions the underline within the link */
        bottom: 0;
        /* Aligns the underline to the bottom of the link */
        left: 50%;
        /* Centers the underline horizontally */
        width: 0;
        /* Initially sets the underline width to 0 */
        height: 2px;
        /* Sets the height of the underline */
        background-color: #f39c12;
        /* Sets the underline color to yellow */
        transition: width 0.5s ease-in-out;
        /* Smooth transition for width expansion */
        transform: translateX(-50%);
        /* Centers the underline horizontally */
    }

    /* Hamburger Menu */
    .hamburger {
        display: flex;
        /* Displays hamburger menu on small screens */
        height: 30px;
        /* Sets the height of the hamburger */
        flex-direction: column;
        /* Arranges the lines of the hamburger vertically */
        justify-content: space-between;
        /* Distributes space between the lines */
        width: 30px;
        /* Sets the width of the hamburger */
        cursor: pointer;
        /* Changes cursor to pointer on hover */
    }

    .hamburger span {
        background-color: white;
        /* Sets the color of hamburger lines to white */
        height: 5px;
        /* Sets the height of each line */
        width: 30px;
        /* Sets the width of each line */
        border-radius: 2px;
        /* Rounds the corners of the lines */
        transition: all 0.3s ease;
        /* Smooth transition for animations */
    }

    .hamburger.active span:nth-child(1) {
        transform: translate(0, 12.5px) rotate(45deg);
        /* Rotates the first line to form an "X" */
    }

    .hamburger.active span:nth-child(2) {
        opacity: 0;
        /* Hides the second line */
    }

    .hamburger.active span:nth-child(3) {
        transform: translate(0, -12.5px) rotate(-45deg);
        /* Rotates the third line to form an "X" */
    }

    .hamburger:hover span {
        background-color: #ffeb3b;
        /* Changes the line color to yellow on hover */
    }

    /* Navbar logo */
    .mainlogo-container {
        height: 70px;
        /* Adjust based on your navbar height */
        width: auto;
        /* Keep width dynamic */
        display: flex;
        align-items: center;
    }

    .mainlogo {
        max-height: 100%;
        /* Constrain the height */
        max-width: 100%;
        /* Constrain the width */
        object-fit: contain;
        /* Ensures the whole logo fits */
    }

    /* Section Home */
    .section-home {
        position: relative;
        /* Allows absolute positioning of child elements */
        top: 10vh;
        background-color: #ffffff;
        /* Sets the background color to white */
        color: #333;
        /* Sets the text color to dark grey */
        opacity: 0;
        /* Starts with no visibility */
        animation: fadeIn 2s forwards;
        /* Applies a fade-in animation */
        height: 33vh;
        /* Makes the section take up the full viewport height */
        display: flex;
        /* Uses flexbox for layout */
        align-items: flex-start;
        /* Aligns items to the top of the section */
    }

    /* Background video */
    .background-video {
        position: absolute;
        /* Positions the video absolutely within the parent section */
        top: 0;
        /* Aligns the video to the top of the section */
        left: 0;
        /* Aligns the video to the left of the section */
        width: 100%;
        /* Makes the video span the full width of the section */
        height: 100%;
        /* Makes the video span the full height of the section */
        object-fit: fill;
        /* Ensures the video is resized while maintaining its aspect ratio */
        z-index: 5;
        /* Keeps the video behind the text and content */
    }

    /* Container flex setup */
    .home-container {
        display: flex;
        width: 100%;
        height: 100%;
    }

    /* Logo side */
    .logo-container {
        display: none;
    }

    /* Make a perfect circular wrapper */
    .home-logo {
        display: none;
    }

    /* Video side */
    .video-container {
        width: 75vw;
        height: 83vh;
        overflow: hidden;
        position: relative;
    }

    .navbar p {
        /* Keep the nav button group fixed to the bottom of the viewport on mobile */
        position: fixed;
        left: 50%;
        transform: translateX(-50%);
        display: flex;
        gap: 10px;
        z-index: 3000;
        margin: 0;
        bottom: 8px;
        /* minimal margin from bottom */
        text-align: center !important;
    }

    /* Style for the buttons */
    .navbutton {
        width: 150px;
        display: inline-block;
        padding: 15px 30px;
        font-size: 16px;
        font-weight: bold;
        color: #fff;
        /* White text */
        background-color: var(--teal-900);
        /* Primary teal button */
        border: none;
        border-radius: 8px;
        /* Rounded corners */
        box-shadow: 0 4px rgba(6, 78, 69, 0.6);
        /* Creates the 3D effect */
        text-align: center;
        text-decoration: none;
        cursor: pointer;
        transition: all 0.2s ease-in-out;
        /* Smooth animations */
    }

    .navbutton:hover {
        background-color: var(--teal-700);
        /* Slightly lighter teal on hover */
        box-shadow: 0 2px rgba(6, 78, 69, 0.4);
        transform: translateY(2px);
    }

    .navbutton:active {
        background-color: var(--teal-900);
        /* pressed state */
        box-shadow: 0 1px rgba(6, 78, 69, 0.5);
        transform: translateY(4px);
    }


    /* Section About Styling */
    .section-about {
        /* place right under fixed navbar (navbar height is 70px on mobile) */
        margin-top: calc(70px + 8px);
        background-color: #fff;
        /*border-radius: 10px;*/
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        overflow: visible;
        position: relative;
        color: #333;
        height: auto;
    }

    /* Container for About */
    .about-container {
        /* allow container to grow with content */
        height: auto;
        margin-bottom: 10px;
        /*border-radius: 10px;*/
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        overflow: visible;
        padding: 8px;
    }

    .about-container p {
        font-size: 11px;
        color: #666;
        margin: 0 0 8px 0;
        line-height: 2;
        padding: 0;
        text-align: left;
    }

    .aaba-image-section {
        display: none;
    }

    /* New crop container */
    .image-crop {
        display: none;
    }

    .image-crop:hover {
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
    }

    .image-crop img {
        display: none;
    }

    .image-crop:hover img {
        transform: scale(1.05);
    }

    /* Text Section - stack under image on mobile */
    .text-section {
        position: relative;
        top: 0;
        width: 100%;
        font-size: 14px;
        /* slightly larger for readability */
        padding: 6px 8px 12px 8px;
        box-sizing: border-box;
        align-self: stretch;
    }

    /* Section Title Styling */
    .section-title h2 {
        font-family: 'Playfair Display', serif;
        font-size: 16px;
        margin-bottom: 2vh;
        opacity: 0;
        animation: fadeInUp 2s forwards 0.5s;
        transition: color 0.3s ease;
        text-align: center !important;
    }

    .section-title h2:hover {
        color: #ff914d;
    }

    .section-title p {
        font-size: 11px;
        /* was 16px */
        color: #777;
        line-height: 2;
        opacity: 0;
        animation: fadeInUp 2s forwards 1s;
    }

    /* Mission Section Styling */
    .mission {
        width: 100%;
        background-color: #ffffff;
        border-radius: 10px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        padding: 20px;
        opacity: 0;
        animation: fadeInUp 2s forwards 3s;
        transition: background-color 0.3s ease, box-shadow 0.3s ease;
        margin-bottom: 15px;
    }

    .mission:hover {
        background-color: #fdfdfd;
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.15);
    }

    .mission h3 {

        margin-bottom: 1.5vh;
        font-size: 12px;
        /* was 18px */
        color: #2e3a59;
    }

    .mission p {
        font-size: 10px;
        /* was 18px */
        color: #2e3a59;
        margin-bottom: 20px;
    }


    .mission ul {
        font-size: 10px;
        /* was 14px */
        list-style: none;
        margin-top: 20px;
        padding-left: 0;
        line-height: 1.2;
        /* ensure lines don't collide on small screens */
    }

    .mission li {
        font-size: 10px;
        /* was 14px */
        margin-bottom: 14px;
        /* slightly reduced on small screens but still spaced */
        position: relative;
        padding-left: 24px;
    }

    .mission li::before {
        content: "✔";
        position: absolute;
        left: 0;
        color: #ff914d;
        font-weight: bold;
    }

    /* Legacy Section Styling */
    .legacy {
        opacity: 0;
        animation: fadeInUp 2s forwards 3.5s;
    }

    .legacy h3 {
        margin-bottom: 1.5vh;
        font-size: 12px;
        /* was 18px */
        color: #2e3a59;
    }

    .legacy p {
        font-size: 10px;
        /* was 14px */
        color: #555;
        animation: fadeInUp 1.5s ease-in-out both;
    }

    .legacy strong {
        font-size: 10px;
        /* was 14px */
        color: #2e3a59;
    }

    /* Animations */
    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    @keyframes fadeInUp {
        from {
            opacity: 0;
            transform: translateY(10px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* Section for Lifestory */
    .section-lifestory {
        margin-top: 10px;
        padding: 10px;
        /*background-color: #fff;*/
        /*border-radius: 10px;*/
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        overflow: hidden;
        position: relative;
    }

    .section-lifestory h2 {
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: white;
        text-align: center;
        margin-top: 15px;
    }

    /* Wrapper for scrolling area */
    .auto-scroll-wrapper {
        margin: 3px;
        overflow-x: auto;
        line-height: 1.5;
        white-space: normal;
        scroll-behavior: smooth;
    }

    /* Flex container for story cards */
    .auto-scroll-track {
        display: inline-flex;
        margin-left: 14vw;
        margin-right: 10vw;
    }

    /* Individual story card */
    .story-card {
        width: 33vw;
        height: auto;
        min-width: 64vw;
        margin-right: 10px;
        background-color: white;
        border-radius: 0.75rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        padding: 1rem;
        flex-shrink: 0;
        z-index: 9;
    }

    .story-card img {
        width: 55vw;
        object-fit: contain;
        border-radius: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .story-card h3 {
        font-size: 12px;
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: black;
    }

    .story-card p {
        font-size: 10px;
        color: #4B5563;
        margin-bottom: 0.5rem;
    }

    .story-card a {
        font-size: 10px;
        color: #2563EB;
        text-decoration: none;
        font-weight: 500;
    }

    .story-card a:hover {
        text-decoration: underline;
    }

    /* Arrows */
    .scroll-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        background-color: rgba(255, 255, 255, 0.9);
        border: none;
        padding: 0.25rem 0.5rem;
        z-index: 10;
        cursor: pointer;
        box-shadow: 0 0 6px rgba(0, 0, 0, 0.2);
        border-radius: 0.5rem;
    }

    .left-btn {
        left: 0.5rem;
    }

    .right-btn {
        right: 0.5rem;
    }

    /* Hide scrollbar */
    .auto-scroll-wrapper::-webkit-scrollbar {
        display: none;
    }

    .auto-scroll-wrapper {
        -ms-overflow-style: none;
        /* IE 10+ */
        scrollbar-width: none;
        /* Firefox */
    }

    /* Section Styling */
    .section {
        position: relative;
        /* Allows child elements to be positioned absolutely */
        padding: 40px 10px;
        /* Adds padding inside the section */
        /*background-color: #ffffff;*/
        /* Sets the background color to white */
        /*margin: 10px 0;*/
        /* Adds vertical spacing between sections */
        /*border-radius: 10px;*/
        /* Rounds the corners of the section */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        /* Adds a soft shadow for depth */
        transition: transform 0.3s ease;
        /* Smoothly animates transformations */
    }

    .section h2 {
        text-align: center;
        /* Centers the heading text */
        font-size: 2.5em;
        /* Sets the heading font size */
        color: #2c3e50;
        /* Dark blue color for the heading */
        margin-bottom: 20px;
        /* Adds space below the heading */
        font-weight: bold;
        /* Makes the heading text bold */

    }

    .section p {
        font-size: 1.1em;
        /* Sets the paragraph font size */
        line-height: 2;
        /* Increases line height for better readability */
        text-align: center;
        /* Centers the paragraph text */
        color: #7f8c8d;
        /* Light grey color for the text */
    }

    /* Image Styling */
    .about-image img,
    .life-story-image img,
    .project-card img,
    .gallery-grid img {
        width: 100%;
        /* Ensures images span the full width of their container */
        border-radius: 10px;
        /* Rounds the image corners */
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        /* Adds a shadow for depth */
    }

    /* Projects background image (same neutral texture) */
    #our-projects {
        position: relative;
        overflow: hidden;
    }

    #our-projects::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: url('../thoughts/thoughts_background.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 0.5;
        z-index: 0;
        pointer-events: none;
    }

    #our-projects>* {
        position: relative;
        z-index: 1;
    }

    /* Our Project Section */
    #our-projects {
        text-align: center;
        padding: 20px 10px;
        /*background: #f9f9f9;*/
    }

    #our-projects h2 {
        font-size: 14px;
        margin-bottom: 30px;
        color: #333;
    }

    .projects-row {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin: 20px 0;
        flex-wrap: wrap;
    }

    .project-item {
        flex: 1 1 calc(33.333% - 20px);
        max-width: 300px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease;
        overflow: hidden;
        aspect-ratio: 4 / 3;
        display: flex;
        flex-direction: column;
    }

    .project-item:hover {
        transform: translateY(-5px);
    }

    .project-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-bottom: 2px solid #eee;
        display: block;
        flex-shrink: 0;
    }

    .project-item h3 {
        padding: 10px;
        font-size: 14px;
        color: #444;
    }

    .project-info-button {
        margin: 20px 0;
    }

    .project-info-button .btn {
        display: inline-block;
        padding: 12px 25px;
        background: #0077cc;
        color: #fff;
        font-size: 14px;
        border-radius: 8px;
        text-decoration: none;
        transition: background 0.3s ease;
    }

    .project-info-button .btn:hover {
        background: #005fa3;
    }

    /* Gallery Section Styling */
    #gallery {
        background-color: #fff;
        border-radius: 8px;
        box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
        text-align: center;
        position: relative;
        overflow: hidden;
    }

    #gallery::before {
        content: "";
        position: absolute;
        inset: 0;
        background-image: url('../thoughts/thoughts_background.jpg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 0.5;
        z-index: 0;
    }

    #gallery h2 {
        position: relative;
        font-size: 14px;
        /* Sets the heading font size */
        color: #333;
        /* Dark grey color for the heading */
        margin-bottom: 15px;
        /* Adds space below the heading */
    }

    .gallery-buttons {
        position: relative;
        display: flex;
        /* Uses flexbox for button layout */
        justify-content: center;
        /* Centers buttons horizontally */
        align-items: center;
        /* Aligns buttons vertically */
        gap: 20px;
        /* Adds space between buttons */
        flex-wrap: wrap;
        z-index: 2;
        /* Wraps buttons to the next line if necessary */
    }

    .gallery-button {
        text-align: center;
        height: 20vh;
        /* Centers button content */
        flex: 1;
        /* Allows buttons to grow or shrink */
        max-width: 300px;
        /* Limits the button width */
        border: 2px solid #ddd;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        /* Adds a light grey border */
        border-radius: 10px;
        /* Rounds the button corners */
        padding: 10px;
        /* Adds padding inside the button */
        background: #fff;
        /* Sets the button background color to white */
        transition: transform 0.3s ease, box-shadow 0.3s ease;
        /* Smoothly animates hover effects */
    }

    .gallery-button h3 {
        font-size: 14px;
        /* Sets the heading font size for buttons */
        color: #222;
        /* Dark color for the heading text */
        margin-bottom: 10px;
        /* Adds space below the heading */
    }

    .gallery-button img {
        width: 100%;
        /* Ensures the image spans the button width */
        height: 6vh !important;
        /* Maintains the image aspect ratio */
        border-radius: 6px;
        /* Rounds the image corners */
        margin-bottom: 10px;
        /* Adds space below the image */
    }

    .gallery-button p {
        font-size: 10px;
        /* Sets the paragraph font size */
        color: #555;
        /* Medium grey color for the text */
        margin: 0;
        /* Removes default margin */
    }

    .gallery-button:hover {
        transform: translateY(-5px);
        /* Moves the button slightly upward */
        box-shadow: 0px 8px 12px rgba(0, 0, 0, 0.2);
        /* Adds a shadow for hover effect */
    }

    /* Section for Thoughts */
    .section-thoughts {
        /*margin-top: 10px;
        padding: 10px;
        /*background-color: #fff;*/
        /*border-radius: 10px;*/
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        overflow: hidden;
        position: relative;
    }

    .section-thoughts h2 {
        font-size: 14px;
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: white;
        text-align: center;
        margin-top: 15px;
    }

    /* Wrapper for scrolling area */
    .auto-scroll-wrapper-thoughts {
        margin: 3px;
        overflow-x: auto;
        line-height: 1.5;
        white-space: normal;
        scroll-behavior: smooth;
    }

    /* Flex container for story cards */
    #thoughtsScroller {
        display: inline-flex;
    }

    /* Individual thought card */
    .thought-card {
        width: 33vw;
        /*height: auto;*/
        min-width: 64vw;
        margin-right: 10px;
        background-color: white;
        border-radius: 0.75rem;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        padding: 1rem;
        flex-shrink: 0;
        z-index: 9;
    }


    .thought-card img {
        width: 25vw;
        object-fit: contain;
        border-radius: 0.5rem;
        margin-bottom: 0.75rem;
    }

    .thought-card h3 {
        font-size: 10px;
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: black;
    }

    .thought-card p {
        font-size: 10px;
        color: #4B5563;
        margin-bottom: 0.5rem;
    }

    .thought-card a {
        font-size: 10px;
        color: #2563EB;
        text-decoration: none;
        font-weight: 500;
    }

    .thought-card a:hover {
        text-decoration: underline;
    }

    .left-btn-thoughts {
        left: 0.5rem;
    }

    .right-btn-thoughts {
        right: 0.5rem;
    }

    /* Hide scrollbar */
    .auto-scroll-wrapper-thoughts::-webkit-scrollbar {
        display: none;
    }

    .auto-scroll-wrapper-thoughts {
        -ms-overflow-style: none;
        /* IE 10+ */
        scrollbar-width: none;
        /* Firefox */
    }


    /* Footer */
    footer {
        background-color: #34495e;
        height: 18vh;
        color: #fff;
        padding: 20px;
        text-align: center;
        /* margin-top: 10px; */
        font-size: 14px;
    }

    footer p {
        font-size: 10px;
        margin-bottom: 1rem;
        /* Adds vertical margin for paragraph spacing */
    }
}

/* Theme overrides - apply palette consistently across site */
/* These rules intentionally come after the main stylesheet so they override legacy hard-coded colors */

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--heading-color) !important;
    font-family: 'Playfair Display', serif;
}

/* Body text */
body,
p,
li,
span,
label {
    color: #cb9e41 !important;
}

/* Links */
a {
    color: var(--teal-700);
}

.nav-links li a {
    color: #ffffff;
    /* keep nav text readable on dark navbar */
}

.underline {
    background-color: var(--accent) !important;
}

/* Buttons */
.navbutton,
.project-info-button .btn,
.gallery-button a p,
.project-info-button .btn {
    background: var(--teal-900) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 6px rgba(2, 6, 23, 0.06) !important;
}

.navbutton:hover,
.project-info-button .btn:hover {
    background: var(--teal-700) !important;
}

/* Section / Card backgrounds */
.section,
.section-about,
.mission,
.legacy,
.story-card,
.gallery-button,
.project-item {
    /*background: var(--card-bg) !important;*/
    color: var(--text-primary) !important;
}

/* Mission list accent */
.mission li::before {
    color: var(--accent) !important;
}

/* Footer */
footer {
    background: var(--teal-900) !important;
    color: #fff !important;
}

/* Muted text */
.muted,
.section p,
.about-container p {
    color: var(--muted) !important;
}

/* Small utility: subtle borders */
hr,
.project-item,
.gallery-button,
.project-item img {
    border-color: rgba(6, 30, 24, 0.06) !important;
}

/* Accent for interactive controls */
.scroll-btn,
.scroll-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    color: var(--teal-900);
}

/* Ensure color of pseudo-elements and small accents */
::selection {
    background: var(--accent);
    color: #fff;
}

/* Responsive refinement: slightly reduce card shadows for mobile */
@media (max-width: 768px) {

    .section,
    .project-item,
    .story-card {
        /*box-shadow: 0 2px 6px rgba(2, 6, 23, 0.04) !important;*/
    }
}