/* Root variables */
:root {
    /* Color palette */
    --primary-color: #04a12b;
    --light-color: #dad7cd;
    --text-color: #344e41;
    --white: #ffffff;
    --black: #000000;
    --color-primary: rgba(245, 176, 123, 0.15);
    --color-secondary: rgba(217, 201, 186, 0.3);
    --color-dark: #582905;
    --color-green: #2c5e2e;
    --color-hover: #ffcc00;
    --bg-section-dark: #f5f5f5;

    /* Font families */
    --font-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: 'Goudy Old Style', Garamond, 'Times New Roman', serif;

    /* Font sizes */
    --fs-base: 1rem;
    --fs-timeline-desc: 1rem;
    --fs-para: 1.2rem;
    --fs-title: 2.5rem;
    --fs-sub-title: 2rem;
    --fs-button: 1rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-heading);
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    background-color: var(--light-color);
    overflow-x: hidden;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}


/* Mission Section */
.mission-section {
    background: linear-gradient(rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.3)), url('./assets/images/cover3.webp') no-repeat center center;
    background-size: cover;
    color: white;
    padding: 3rem 1.5rem;
    /* Added padding for better spacing */
}

.mission-card {
    background: rgba(4, 159, 43, 0.5);
    backdrop-filter: blur(0.625rem);
    /* 10px converted to rem */
    border-radius: 0.625rem;
    /* 10px converted to rem */
    border: 1px solid rgba(255, 255, 255, 1);
    transition: all 0.3s;
    padding: 1.25rem;
    /* Added padding for better spacing */
    margin-bottom: 1.5rem;
    /* Added margin for better spacing */
}

.mission-card:hover {
    background: rgba(255, 255, 255, 0.7);
    transform: translateY(-0.3125rem);
    color: var(--black);
}

.mission-card p {
    text-align: left;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.mission-card p:hover {
    color: var(--black); 
}

.icon-box {
    width: 3.75rem;
    height: 3.75rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.img-border {
    max-width: 100%;
    height: auto;
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0 1.25rem;
        margin: 1rem 0;

}

.img-history {
    /*max-height: 15rem;

   max-width: 100%; */
   width: 60%;                 /* or a fixed width like 23.56rem */
  
  height: 15rem;                 /* ensures scaling */
    box-shadow: 0 .5rem 1rem rgba(0, 0, 0, 0.15);
    border-radius: 0 1.25rem;
        margin: 1rem 0;

}

/* Responsive Grid */
.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

/* Responsive Typography */
h1 {
    font-size: 2.5rem;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 1.5rem;
    text-align: center;
}

h2 {
    font-size: 2rem;
    color: var(--color-dark);
    margin-bottom: 1.5rem;
    text-align: center;
}

h3 {
    font-size: 1.5rem;
    color: var(--color-dark);
    margin-bottom: 1rem;
}

.image-banner {
    position: relative;
    width: 100%;
    height: 100vh;
    background: url('./assets/images/cover2.webp') no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.history-year {
    display: inline-flex;
    align-items: center;
    /* gap: 0.5rem; */
    padding: 0.625rem 1.25rem;
    background-color: var(--color-green);
    color: white;
    /* text-decoration: none; */
    border-radius: 0px 0.9375rem 0px 0.9375rem;
    /* transition: all 0.3s ease; */
    font-size: var(--fs-sub-title);
    width: 100%;
    justify-content: center;
}

.history-timeline {
    background: linear-gradient(rgb(255, 255, 255), rgba(255, 255, 255, 0.85)),
        url('./assets/images/history_timeline/bg_history.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* ================= MEDIA QUERIES ================= */
/* Large devices (desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Medium devices (tablets, 768px to 1199px) */
@media (max-width: 1199px) {
    html {
        font-size: 15px;
    }

    .about-us-banner {
        height: 16rem;
    }

    h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.8rem;
    }
}

/* Small devices (landscape phones, 576px to 767px) */
@media (max-width: 767px) {
    html {
        font-size: 14px;
    }

    .about-us-banner {
        height: 14rem;
        margin-bottom: 1.5rem;
        padding: 0 1rem;
    }

    .about-us-nav {
        padding: 1rem;
    }

    .about-us-back-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    .mission-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .mission-card {
        padding: 1rem;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575px) {
    html {
        font-size: 13px;
    }

    .about-us-banner {
        height: 12rem;
    }

    h1 {
        font-size: 1.6rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    .icon-box {
        width: 3rem;
        height: 3rem;
        font-size: 1.2rem;
    }

    .mission-section {
        padding: 2rem 1rem;
    }
}

/* Timeline Mobile Layout Fix */
@media (max-width: 767.98px) {
    .history-timeline .container .row {
        display: flex;
        flex-direction: column;
    }

    /* Target all content columns (the ones with data-bs-toggle) and make them first */
    .history-timeline .container .row .col-md-6[data-bs-toggle] {
        order: 2;
    }

    /* Target all image columns (the ones with text-center) and make them second */
    .history-timeline .container .row .col-md-6.text-center {
        order: 1;
        margin-top: 2rem;
    }

    /* Ensure consistent styling */
    .history-timeline .container .row .col-md-6[data-bs-toggle] {
        text-align: center;
    }

    .history-timeline .container .row .col-md-6[data-bs-toggle] h2 {
        text-align: left;
        padding-top: 1rem;
        margin-bottom: 0%;
    }
    .history-timeline .container .row .col-md-6[data-bs-toggle] p {
        text-align: justify;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }

    .history-year {
        justify-content: center;
        margin: 1rem auto 0;
        display: flex;
    }

    /* Fix image sizing for mobile */
    .history-timeline .img-history {
        max-width: 100%;
        height: auto;
    }
}