/* Basic resets */
* { box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0; padding: 0; background-color: #f4f4f4; color: #333; line-height: 1.6; }

/* Header & Nav (Desktop Default) */
.top-bar { background-color: #fff; padding: 15px 50px; display: flex; align-items: center; border-bottom: 2px solid #003366; justify-content: space-between;}
.logo-placeholder { width: 85px; height: 85px; margin-right: 20px; display: flex; align-items: center; justify-content: center; }
.logo-placeholder img { width: 100%; height: 100%; object-fit: contain; }
.top-bar-left { display: flex; align-items: center; }
.top-bar-text h1 { margin: 0; color: #003366; font-size: 1.8rem; text-transform: uppercase; letter-spacing: 1px; }
.top-bar-text small { color: #555; font-weight: bold; }

nav { background: #003366; color: #fff; padding: 12px 50px; display: flex; gap: 25px; align-items: center; position: relative; }
.nav-links { display: flex; gap: 25px; align-items: center; width: 100%; }
nav a { color: #fff; text-decoration: none; font-weight: 500; font-size: 1rem; text-transform: uppercase; }
nav a:hover { color: #ffcc00; }
nav a.active { color: #ffcc00; border-bottom: 2px solid #ffcc00; padding-bottom: 2px; }
.mobile-nav-caption { display: none; }
.mobile-subtitle { display: none; }

/* Hamburger Icon (Hidden on Desktop) */
.menu-toggle { display: none; cursor: pointer; flex-direction: column; gap: 5px; }
.menu-toggle .bar { width: 25px; height: 3px; background-color: white; transition: all 0.3s ease-in-out; }

/* Carousel */
.carousel-container { position: relative; width: 100%; height: 500px; overflow: hidden; background: #ddd; }
.carousel-slide { display: none; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.5s ease-in-out; opacity: 0; }
.carousel-slide.active { display: block; opacity: 1; }
.carousel-overlay { position: absolute; top: 30%; left: 10%; background: rgba(255, 255, 255, 0.95); padding: 30px 40px; max-width: 500px; border-left: 6px solid #ffcc00; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.carousel-overlay h2 { margin: 0 0 10px; color: #222; font-size: 2.5rem; text-transform: uppercase; letter-spacing: 2px; }
.carousel-overlay p { margin: 0; font-size: 1.2rem; color: #555; }

/* Announcement bar & Request Support */
.announcement { background: #004080; color: #fff; text-align: center; padding: 15px 25px; text-transform: uppercase; letter-spacing: 1px; font-weight: bold; display: flex; justify-content: center; align-items: center; gap: 20px; flex-wrap: wrap; }
.btn-support { background: #ffcc00; color: #003366; padding: 10px 20px; border-radius: 4px; text-decoration: none; font-weight: bold; box-shadow: 0 2px 5px rgba(0,0,0,0.2); transition: background 0.2s; border: none; cursor: pointer; }
.btn-support:hover { background: #e6b800; }
.btn-calendar { background: #fff; color: #004080; padding: 8px 15px; border-radius: 4px; border: none; font-weight: bold; cursor: pointer; display: flex; align-items: center; gap: 8px; }

/* Content Sections */
.section { padding: 60px 50px; max-width: 1200px; margin: 0 auto; background: #fff; margin-bottom: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.section-title { text-align: center; font-size: 2rem; color: #003366; margin-bottom: 40px; text-transform: uppercase; border-bottom: 2px solid #ffcc00; padding-bottom: 10px; display: inline-block; }
.text-center { text-align: center; }

/* Metrics Section */
.metrics-section { background: #fafafa; padding: 50px; border-top: 5px solid #ffcc00; }
.metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 30px; max-width: 1200px; margin: 0 auto; text-align: center; }
.metric-box { padding: 20px; background: #fff; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }
.metric-number { font-size: 2.5rem; color: #006633; font-weight: bold; margin-bottom: 10px; }
.metric-label { font-size: 0.95rem; color: #555; text-transform: uppercase; }

/* Welcome Note / Mission */
.two-col { display: flex; gap: 40px; align-items: flex-start; }
.col-image { flex: 1; width: 100%; max-width: 500px; min-height: 350px; object-fit: cover; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
.col-text { flex: 1.5; }
.subheading { color: #003366; font-weight: bold; text-transform: uppercase; font-size: 0.9rem; letter-spacing: 1px; }

/* Timeline / Milestones */
.timeline-container { display: flex; gap: 40px; margin-top: 40px; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
.timeline-title { flex: 1; font-size: 3rem; color: #1a3322; font-weight: bold; line-height: 1.1; font-family: inherit; }
.timeline-title span { font-size: 1rem; color: #666; display: block; margin-bottom: 10px; letter-spacing: 2px; font-family: inherit; }
.timeline-track { flex: 2; border-left: 3px solid #1a3322; padding-left: 30px; position: relative; font-family: inherit; }
.timeline-item { margin-bottom: 25px; position: relative; font-family: inherit; }
.timeline-item::before { content: ''; position: absolute; left: -38px; top: 5px; width: 14px; height: 14px; background: #e67e22; border-radius: 50%; }
.timeline-date { font-weight: bold; color: #1a3322; display: inline-block; width: 120px; font-family: inherit; }
.timeline-desc { color: #555; display: inline-block; font-family: inherit; }

/* Trust Board */
.board-section-title { font-size: 1.5rem; color: #008080; border-bottom: 1px solid #ddd; padding-bottom: 10px; margin-top: 40px; margin-bottom: 20px; }
.board-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; margin-bottom: 20px; }
.board-card { background: #fff; border: 1px solid #003366; padding: 25px; border-radius: 8px; text-align: center; box-shadow: 0 4px 6px rgba(0,0,0,0.05); }
.board-card h4 { color: #003366; margin: 0 0 10px 0; font-size: 1.4rem; }
.board-card .role { font-weight: bold; color: #008080; margin-bottom: 15px; font-size: 0.95rem; text-transform: uppercase; }
.board-card .tenure { font-size: 0.9rem; color: #777; margin-bottom: 15px; }
.board-card .desc { font-size: 0.95rem; color: #555; }
.former-board .board-card { border: 1px solid #ddd; background: #f9f9f9; }
.former-board .board-card h4 { color: #555; }
.former-board .board-card .role { color: #777; }

/* Trust Board Member Photos */
.board-member-img { width: 180px; height: 230px; object-fit: cover; object-position: top; border-radius: 8px; margin: 0 auto 20px auto; display: block; box-shadow: 0 4px 10px rgba(0,0,0,0.15); }

/* Projects Grid */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; }
.project-card { border-left: 4px solid #ffcc00; background: #fdfdfd; padding: 20px; border-radius: 4px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.project-img { width: 100%; height: 300px; object-fit: cover; object-position: center; border-radius: 4px; margin-bottom: 15px; display: block; box-shadow: 0 2px 6px rgba(0,0,0,0.1); background-color: #eee; }

/* Flagship Programs Bar */
.flagship-bar { display: flex; justify-content: center; gap: 40px; background: #003366; padding: 30px 50px; flex-wrap: wrap; color: #fff; text-transform: uppercase; letter-spacing: 1px; font-weight: bold; font-size: 1.2rem; margin: 40px 0; width: 100%; max-width: 100%; border-radius: 0; box-shadow: 0 4px 10px rgba(0,0,0,0.15); }
.flagship-item { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; transition: color 0.3s ease; cursor: pointer; }
.flagship-item:hover { color: #ffcc00; }
.flagship-item::before { content: '★'; color: #ffcc00; font-size: 1.5rem; }
.flagship-label { color: #ffcc00; font-weight: 900; letter-spacing: 1.5px; display: flex; align-items: center; text-align: center; }

/* Contact Form */
.contact-wrapper { display: flex; gap: 40px; }
.contact-info { flex: 1; background: #003366; color: #fff; padding: 30px; border-radius: 8px; }
.contact-info a { color: #ffcc00; text-decoration: none; }
.contact-form { flex: 1.5; padding: 20px; }
.form-group { margin-bottom: 20px; }
.form-control { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 4px; }
.btn-submit { background: #008080; color: #fff; border: none; padding: 12px 25px; border-radius: 4px; cursor: pointer; font-weight: bold; }
.error-msg { color: red; font-size: 0.85rem; display: none; margin-top: 5px; }

/* Calendar Modal */
.modal { display: none; position: fixed; z-index: 1000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.6); }
.modal-content { background-color: #fefefe; margin: 10% auto; padding: 20px; border-radius: 8px; width: 80%; max-width: 500px; text-align: center; }
.close { color: #aaa; float: right; font-size: 28px; font-weight: bold; cursor: pointer; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; margin-top: 20px; }
.cal-day { padding: 10px; background: #eee; border-radius: 4px; }
.cal-event { background: #ffcc00; color: #003366; font-weight: bold; cursor: pointer; }
.cal-today { background: #2e8b57; color: #fff; font-weight: bold; border-radius: 4px; }

/* Gallery & Videos */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.gallery-item { width: 100%; height: 350px; background: #ddd; border-radius: 8px; object-fit: cover; cursor: pointer; transition: transform 0.3s; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
.gallery-item:hover { transform: scale(1.02); }
.video-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 30px; }
.video-item { width: 100%; aspect-ratio: 16/9; background: #000; border-radius: 8px; }

/* Home Page 1x3 Carousel Tracks */
.carousel-wrapper { position: relative; display: flex; align-items: center; padding: 0 10px; }
.carousel-track { display: flex; gap: 20px; overflow-x: auto; scroll-behavior: smooth; padding: 10px 0; width: 100%; -ms-overflow-style: none; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track > * { flex: 0 0 calc(33.333% - 14px); min-width: 280px; }
.scroll-btn { background: #003366; color: white; border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; z-index: 2; font-size: 1.2rem; position: absolute; top: 50%; transform: translateY(-50%); box-shadow: 0 4px 6px rgba(0,0,0,0.2); transition: background 0.3s, transform 0.2s; display: flex; align-items: center; justify-content: center; }
.scroll-btn:hover { background: #ffcc00; color: #003366; transform: translateY(-50%) scale(1.1); }
.left-btn { left: -15px; }
.right-btn { right: -15px; }

/* 2x2 Gallery Grid & Mini Sliders */
.gallery-grid-2x2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.gallery-category-card { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); border-top: 4px solid #003366; }
.category-title { text-align: center; color: #003366; margin-top: 0; margin-bottom: 15px; font-size: 1.2rem; text-transform: uppercase; }
.mini-slider-container { position: relative; width: 100%; height: 350px; border-radius: 4px; overflow: hidden; background: #eee; }
.mini-slides img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity 0.4s ease-in-out; }
.mini-slides img.active { opacity: 1; z-index: 1; }
.slide-btn { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0, 51, 102, 0.7); color: white; border: none; padding: 10px 15px; cursor: pointer; z-index: 2; font-size: 1.2rem; border-radius: 3px; transition: background 0.3s; }
.slide-btn:hover { background: #ffcc00; color: #003366; }
.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* On the Anvil (Future Initiatives) Grid */
.anvil-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 20px; }
.anvil-card { background: #fff; padding: 25px 20px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.06); border-top: 4px solid #008080; position: relative; transition: transform 0.3s ease, box-shadow 0.3s ease; text-align: center; display: flex; align-items: center; justify-content: center; min-height: 120px; }
.anvil-card:hover { transform: translateY(-5px); box-shadow: 0 8px 15px rgba(0,0,0,0.1); }
.anvil-number { position: absolute; top: -18px; left: 50%; transform: translateX(-50%); background: #ffcc00; color: #003366; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; font-weight: 900; border-radius: 50%; font-size: 1.1rem; border: 3px solid #fafafa; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.anvil-card h4 { margin: 10px 0 0 0; color: #003366; font-size: 1.1rem; line-height: 1.5; }

/* Scroll to Top Button */
#scrollToTopBtn { display: none; position: fixed; bottom: 0; right: 30px; z-index: 999; border: none; outline: none; background-color: #333333; color: white; cursor: pointer; padding: 18px 22px 12px 22px; border-radius: 6px 6px 0 0; box-shadow: 0 -2px 10px rgba(0,0,0,0.15); transition: background-color 0.3s; }
#scrollToTopBtn:hover { background: #003366; }
#scrollToTopBtn .arrow { border: solid white; border-width: 0 4px 4px 0; display: inline-block; padding: 6px; transform: rotate(-135deg); -webkit-transform: rotate(-135deg); }

/* Genesis Article Founder Photo */
.genesis-founder-img { float: right; width: 100%; max-width: 350px; margin: 0 0 20px 30px; border-radius: 8px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); object-fit: cover; }

/* Footer */
.site-footer { 
    background: #002244; 
    color: #ccc; 
    padding: 50px 20px 20px 20px; 
    margin-top: 50px; 
    font-size: 0.9rem; 
}
.footer-container { 
    display: flex; 
    justify-content: space-between; 
    gap: 40px; 
    max-width: 1200px; 
    margin: 0 auto; 
    padding-bottom: 30px; 
    border-bottom: 1px solid rgba(255,255,255,0.1); 
    flex-wrap: wrap; 
}
.footer-col { 
    flex: 1; 
    min-width: 250px; 
}
.footer-col h4 { 
    color: #ffcc00; 
    font-size: 1.2rem; 
    margin-top: 0; 
    margin-bottom: 20px; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
}
.footer-col p { 
    line-height: 1.6; 
    margin-bottom: 10px; 
}
.footer-links { 
    list-style: none; 
    padding: 0; 
    margin: 0; 
}
.footer-links li { 
    margin-bottom: 12px; 
}
.footer-links a { 
    color: #ccc; 
    text-decoration: none; 
    transition: color 0.3s ease; 
}
.footer-links a:hover { 
    color: #ffcc00; 
}
.footer-bottom { 
    text-align: center; 
    padding-top: 20px; 
    font-size: 0.85rem; 
    color: #888; 
}



/* =======================================================
   TABLET RESPONSIVENESS (769px to 1024px)
======================================================= */
@media (min-width: 769px) and (max-width: 1024px) {
    .metrics-grid, .board-grid, .projects-grid, .anvil-grid { grid-template-columns: repeat(2, 1fr); }
    nav { padding: 12px 20px; gap: 15px; font-size: 0.9rem; }
    .top-bar-text h1 { font-size: 1.4rem; }
    .carousel-track > * { flex: 0 0 calc(50% - 10px); }
    .flagship-label { border-right: 2px solid rgba(255, 255, 255, 0.3); padding-right: 25px; margin-right: 10px; }
}


/* =======================================================
   MOBILE RESPONSIVENESS (Max Width 768px)
======================================================= */
@media (max-width: 768px) {
    /* Header & Top Bar - Logo Left, Text Right */
    .top-bar { padding: 12px 15px; }
    .top-bar-left { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; text-align: left; width: 100%; }
    .logo-placeholder { margin-right: 15px; margin-bottom: 0; width: 70px; height: 70px; flex-shrink: 0; }
    .top-bar-text { display: flex; flex-direction: column; justify-content: center; }
    .top-bar-text h1 { font-size: 1.15rem; line-height: 1.3; margin-bottom: 4px; }
    .top-bar-text small { display: none; }

    .mobile-subtitle { display: block; font-size: 0.75rem; font-weight: bold; color: #555; }
    .desktop-subtitle { display: none; }

    /* Navigation & Hamburger */
    nav { padding: 12px 20px; display: flex; justify-content: space-between; align-items: center; }
    .mobile-nav-caption { display: block; color: rgba(255,255,255,0.85); font-size: 0.7rem; font-weight: bold; letter-spacing: 0.5px; line-height: 1.2; }
    .menu-toggle { display: flex; }
    .nav-links { display: none; flex-direction: column; width: 100%; position: absolute; top: 100%; left: 0; background-color: #003366; padding: 0 20px 20px 20px; z-index: 1000; box-shadow: 0 4px 6px rgba(0,0,0,0.1); gap: 0; }
    .nav-links.show { display: flex; }
    nav a { display: block; width: 100%; text-align: center; padding: 12px 0; border-bottom: 1px solid rgba(255,255,255,0.1); }
    nav a.active { border-bottom: none; color: #ffcc00; font-weight: bold; }

    /* Layout & Grids */
    .two-col, .contact-wrapper, .timeline-container { flex-direction: column; }
    .col-image { margin: 0 auto; max-width: 100%; min-height: 250px; }
    .metrics-grid, .board-grid, .projects-grid, .anvil-grid, .gallery-grid-2x2 { grid-template-columns: 1fr; gap: 20px; }
    .section { padding: 30px 20px; }

    /* Carousel */
    .carousel-container { height: 350px; }
    .carousel-overlay { top: 50%; left: 5%; right: 5%; transform: translateY(-50%); width: 90%; padding: 20px; }
    .carousel-overlay h2 { font-size: 1.5rem; }
    .carousel-overlay p { font-size: 1rem; }
    .carousel-track > * { flex: 0 0 100%; }
    .left-btn { left: 0px; }
    .right-btn { right: 0px; }

    /* Features */
    .announcement, .flagship-bar { padding: 20px; flex-direction: column; gap: 15px; }
    .flagship-label { border-right: none; padding-right: 0; margin-right: 0; margin-bottom: 10px; width: 100%; justify-content: center; }
    .flagship-item { justify-content: center; text-align: center; font-size: 1rem; }
    
    /* Elements */
    .timeline-track { padding-left: 15px; border-left: 2px solid #1a3322; }
    .timeline-item::before { left: -21px; }
    .genesis-founder-img { float: none; display: block; margin: 0 auto 25px auto; max-width: 100%; }
    #scrollToTopBtn { right: 15px; bottom: 10px; padding: 12px 16px 8px 16px; }

    .footer-container { flex-direction: column; gap: 30px; text-align: center; }
}