/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --primary: #00897B;       /* Teal - Safety & Growth */
    --primary-dark: #00695C;
    --secondary: #FFB74D;     /* Warm Orange - Hope */
    --danger: #D32F2F;        /* Red - Urgent/Report */
    --light: #F5F7FA;
    --dark: #263238;
    --text-gray: #546E7A;
    --white: #ffffff;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
    --radius: 12px;
}

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

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* Specific background for Workshop pages if needed */
body.bg-light {
    background-color: var(--light);
}

h1, h2, h3, h4, h5 {
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
}

a { text-decoration: none; transition: 0.3s; }
ul { list-style: none; }

/* =========================================
   2. GLOBAL UTILITIES & BUTTONS
   ========================================= */
.container {
    max-width: 1200px; /* Default for home */
    margin: 0 auto;
    padding: 0 20px;
}

/* Slightly narrower container for reading-heavy pages (Workshop) */
.container-narrow {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.9rem;
    border: none;
}

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }

.btn-danger { background: var(--danger); color: var(--white); box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4); }
.btn-danger:hover { background: #b71c1c; transform: scale(1.05); }

.btn-outline { border: 2px solid var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: var(--white); }

.section-padding { padding: 80px 0; }
.section-title {
    text-align: center;
    margin-bottom: 60px;
}
.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 10px;
}
.section-title p {
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto;
}

/* =========================================
   3. NAVIGATION
   ========================================= */
header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

/* Workshop Nav specifics */
.nav-flex { display: flex; justify-content: space-between; align-items: center; }

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { color: var(--dark); font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover { color: var(--primary); }

.back-link { color: var(--text-gray); font-weight: 600; text-decoration: none; display: flex; align-items: center; gap: 8px; }
.back-link:hover { color: var(--primary); }

.hamburger { display: none; font-size: 1.5rem; cursor: pointer; }

/* =========================================
   4. HOMEPAGE HERO
   ========================================= */
.hero {
    position: relative;
    background: linear-gradient(135deg, #e0f2f1 0%, #ffffff 100%);
    height: 90vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: rgba(0, 137, 123, 0.1);
    animation: float 15s infinite linear;
}
.circle:nth-child(1) { width: 300px; height: 300px; top: -50px; left: -50px; }
.circle:nth-child(2) { width: 500px; height: 500px; bottom: -100px; right: -100px; animation-delay: -5s; }
.circle:nth-child(3) { width: 100px; height: 100px; top: 20%; right: 20%; background: rgba(255, 183, 77, 0.2); animation-duration: 10s; }

@keyframes float {
    0% { transform: translate(0, 0); }
    50% { transform: translate(20px, 40px); }
    100% { transform: translate(0, 0); }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 20px;
}
.hero-text .motto {
    font-family: 'Nothing You Could Do', cursive; /* Ensure fallback or link imported */
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 30px;
    font-style: italic;
}
.hero-image img {
    width: 100%;
    border-radius: 30px 0 30px 0;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* =========================================
   5. WORKSHOP HERO & HEADER
   ========================================= */
.event-hero {
    background: linear-gradient(rgba(0, 137, 123, 0.9), rgba(0, 105, 92, 0.9)), url('https://images.unsplash.com/photo-1517486808906-6ca8b3f04846?ixlib=rb-4.0.3&auto=format&fit=crop&w=1000&q=80');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 80px 0;
    text-align: center;
    border-radius: 0 0 30px 30px;
}
.event-hero h1 { font-size: 2.5rem; margin-bottom: 15px; }
.event-meta { display: flex; justify-content: center; gap: 30px; flex-wrap: wrap; margin-top: 20px; font-size: 1.1rem; }
.meta-item { display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.1); padding: 8px 20px; border-radius: 50px; }

/* =========================================
   6. SECTIONS: ABOUT & SERVICES
   ========================================= */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}
.champion-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}
.champion-card img {
    width: 100%;
    height: 600px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 20px;
}
.about-text p { margin-bottom: 15px; }

.services-section { background-color: var(--light); }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    transition: 0.3s;
    border-bottom: 4px solid transparent;
}
.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-bottom: 4px solid var(--primary);
}
.icon-box {
    width: 60px;
    height: 60px;
    background: rgba(0, 137, 123, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}
.service-card h3 { margin-bottom: 10px; }

/* =========================================
   7. SECTIONS: MEDIA & GALLERY
   ========================================= */
.gallery-container { margin-bottom: 60px; }
.gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--light);
    padding-bottom: 10px;
}
.gallery-header h3 { font-size: 1.5rem; color: var(--primary); }

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}
.gallery-item {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    height: 250px;
    cursor: pointer;
    box-shadow: var(--shadow);
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.1); }
.gallery-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
    padding: 20px;
    opacity: 0;
    transition: 0.3s;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay p { color: white; font-weight: 600; font-size: 0.9rem; }

/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 20px;
}
.video-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}
.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    height: 0;
    background: #000;
}
.video-wrapper iframe,
.video-wrapper video {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: 0;
    object-fit: cover;
}
.video-info { padding: 20px; }
.video-info h4 { margin-bottom: 5px; }
.video-info p { font-size: 0.9rem; color: var(--text-gray); }

/* =========================================
   8. SECTIONS: REPORTING
   ========================================= */
.reporting-section { background: #FFF3F3; }
.reporting-wrapper { display: grid; grid-template-columns: 1fr 1.5fr; gap: 40px; }
.emergency-box { background: var(--danger); color: var(--white); padding: 40px; border-radius: var(--radius); text-align: center; }
.emergency-box h3 { color: var(--white); margin-bottom: 20px; }
.hotline { font-size: 2.5rem; font-weight: 700; display: block; margin: 20px 0; }
.procedures-list { background: var(--white); padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow); }
.procedure-item { margin-bottom: 20px; border-bottom: 1px solid #eee; padding-bottom: 20px; }
.procedure-item h4 { color: var(--danger); margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }

/* =========================================
   9. HOMEPAGE TIMELINE & ACTIVITIES
   ========================================= */
.timeline-container { position: relative; max-width: 800px; margin: 0 auto 60px auto; }
.timeline-container::after { content: ''; position: absolute; width: 4px; background-color: var(--primary); top: 0; bottom: 0; left: 50%; margin-left: -2px; }
.timeline-item { padding: 10px 40px; position: relative; background-color: inherit; width: 50%; }
.timeline-item::after { content: ''; position: absolute; width: 20px; height: 20px; right: -10px; background-color: var(--white); border: 4px solid var(--secondary); top: 15px; border-radius: 50%; z-index: 1; }
.left { left: 0; }
.right { left: 50%; }
.left::before { content: " "; height: 0; position: absolute; top: 22px; width: 0; z-index: 1; right: 30px; border: medium solid white; border-width: 10px 0 10px 10px; border-color: transparent transparent transparent white; }
.right::before { content: " "; height: 0; position: absolute; top: 22px; width: 0; z-index: 1; left: 30px; border: medium solid white; border-width: 10px 10px 10px 0; border-color: transparent white transparent transparent; }
.right::after { left: -10px; }
.timeline-content { padding: 20px; background-color: var(--white); position: relative; border-radius: var(--radius); box-shadow: var(--shadow); }

.calendar-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.calendar-card { background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); border: 1px solid #eee; }
.cal-date { background: var(--primary); color: white; padding: 10px; text-align: center; font-weight: bold; }
.cal-body { padding: 20px; }
.read-more { color: var(--primary); font-weight: 600; font-size: 0.85rem; }

/* =========================================
   10. WORKSHOP SPECIFIC: OVERVIEW, TABS, SCHEDULE
   ========================================= */
.overview-section { background: var(--white); padding: 40px; border-radius: var(--radius); margin-top: -40px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); position: relative; z-index: 2; }
.overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.target-audience { background: #E0F2F1; padding: 20px; border-radius: var(--radius); border-left: 5px solid var(--primary); }

.schedule-section { padding: 60px 0; }
.tabs { display: flex; justify-content: center; gap: 15px; margin-bottom: 40px; }
.tab-btn {
    padding: 15px 40px;
    background: var(--white);
    border: 2px solid #ddd;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    transition: 0.3s;
    color: var(--text-gray);
}
.tab-btn.active { background: var(--secondary); border-color: var(--secondary); color: var(--dark); transform: scale(1.05); }
.tab-btn:hover:not(.active) { border-color: var(--secondary); }

.day-content { display: none; animation: fadeIn 0.5s ease; }
.day-content.active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.timeline-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 20px;
    background: var(--white);
    margin-bottom: 20px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border-left: 5px solid var(--primary);
}

.time-box {
    background: #E0F2F1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 20px;
    text-align: center;
    color: var(--primary-dark);
    font-weight: bold;
}
.activity-box { padding: 25px; }
.activity-type { display: inline-block; font-size: 0.75rem; text-transform: uppercase; background: var(--secondary); padding: 4px 10px; border-radius: 4px; font-weight: 700; margin-bottom: 10px; }
.highlight { background: #FFEBEE; border-left-color: var(--danger); } /* For Break/Lunch */

/* =========================================
   11. WORKSHOP SPECIFIC: FORMS
   ========================================= */
.register-section { background: var(--white); padding: 50px; border-radius: var(--radius); margin-bottom: 60px; text-align: center; }
.form-group { margin-bottom: 20px; text-align: left; }
.form-group label { font-weight: 600; display: block; margin-bottom: 8px; }
.form-control { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 8px; }
.btn-submit { background: var(--primary); color: white; padding: 15px 40px; border: none; border-radius: 50px; font-size: 1rem; font-weight: bold; cursor: pointer; transition: 0.3s; }
.btn-submit:hover { background: var(--primary-dark); }

/* =========================================
   12. FOOTER
   ========================================= */
footer { 
    background: var(--dark); 
    color: #cfd8dc; 
    padding: 60px 0 20px; 
}

.footer-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); 
    gap: 40px; 
    margin-bottom: 40px; 
}

.footer-col h4 { color: var(--white); margin-bottom: 20px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #cfd8dc; }
.footer-col ul li a:hover { color: var(--secondary); padding-left: 5px; }

/* --- Social Media Icons Base Styles --- */
.social-links { 
    display: flex; 
    gap: 15px; 
    margin-top: 20px; 
}

.social-links a { 
    width: 40px; 
    height: 40px; 
    background: rgba(255,255,255,0.1); /* Base transparent background */
    display: flex; 
    align-items: center; 
    justify-content: center; 
    border-radius: 50%; 
    color: var(--white);
    /* Transition added here for smooth animation */
    transition: transform 0.3s, background 0.3s ease-in-out; 
}

/* --- Social Media Brand Colors (Hover) --- */

/* X (Twitter) - Black */
.social-links a.social-x:hover {
    background: #000000;
    transform: translateY(-3px);
}

/* Facebook - Blue */
.social-links a.social-fb:hover {
    background: #1877F2;
    transform: translateY(-3px);
}

/* YouTube - Red */
.social-links a.social-yt:hover {
    background: #FF0000;
    transform: translateY(-3px);
}

/* Instagram - Gradient */
.social-links a.social-ig:hover {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    border: none;
    transform: translateY(-3px);
}

/* WhatsApp - Green */
.social-links a.social-wa:hover {
    background: #25D366;
    transform: translateY(-3px);
}

.copyright { 
    text-align: center; 
    border-top: 1px solid rgba(255,255,255,0.1); 
    padding-top: 20px; 
    font-size: 0.9rem; 
}


/* =========================================
   13. RESPONSIVE MEDIA QUERIES
   ========================================= */
@media (max-width: 768px) {
    /* Home Hero */
    .hero-content { grid-template-columns: 1fr; text-align: center; }
    .hero-image { order: -1; }
    
    /* Layouts */
    .about-grid { grid-template-columns: 1fr; }
    .reporting-wrapper { grid-template-columns: 1fr; }
    .overview-grid { grid-template-columns: 1fr; }
    
    /* Nav */
    .nav-links { display: none; width: 100%; position: absolute; top: 80px; left: 0; background: white; flex-direction: column; padding: 20px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); }
    .nav-links.active { display: flex; }
    .hamburger { display: block; }
    
    /* Home Timeline */
    .timeline-container::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item::after { left: 21px; }
    .left::before, .right::before { left: 60px; border: medium solid white; border-width: 10px 10px 10px 0; border-color: transparent white transparent transparent; }
    .right { left: 0%; }
    
    /* Workshop Timeline */
    .timeline-row { grid-template-columns: 1fr; }
    .time-box { flex-direction: row; justify-content: flex-start; gap: 10px; background: transparent; padding-bottom: 0; }
    
    /* Misc */
    .video-grid { grid-template-columns: 1fr; }
    .event-meta { flex-direction: column; gap: 10px; }
    .tabs { flex-direction: column; }
}

/* =========================================
   14. FAQ SECTION
   ========================================= */
.faq-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 15px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow);
    overflow: hidden; /* Essential for hiding the answer */
    transition: all 0.3s ease;
}

.faq-question {
    width: 100%;
    background: var(--white);
    border: none;
    padding: 20px 25px;
    text-align: left;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
    color: var(--dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: 0.3s;
}

.faq-question:hover {
    color: var(--primary);
    background-color: #fcfcfc;
}

.faq-question i {
    color: var(--secondary);
    transition: transform 0.3s ease;
}

/* The Answer Box */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: var(--white);
}

.faq-answer p {
    padding: 0 25px 25px 25px;
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Active State (Controlled by JS) */
.faq-item.active {
    border-left: 5px solid var(--primary);
}

.faq-item.active .faq-question {
    color: var(--primary);
}

.faq-item.active .faq-question i {
    transform: rotate(45deg); /* Turns the + into an x */
    color: var(--danger);
}

/* =========================================
   15. DONATION PAGE STYLES
   ========================================= */
.btn-secondary { 
    background: var(--secondary); 
    color: var(--dark); 
}
.btn-secondary:hover { 
    background: #ffca28; 
    transform: translateY(-2px); 
}

.donation-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    overflow: hidden;
}

.payment-tabs {
    display: flex;
    background: #f1f1f1;
    border-bottom: 1px solid #ddd;
}

.pay-tab {
    flex: 1;
    padding: 20px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-gray);
    transition: 0.3s;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.pay-tab:hover { background: #e0e0e0; }
.pay-tab.active {
    background: var(--white);
    color: var(--primary);
    border-bottom: 3px solid var(--primary);
}

.payment-body { padding: 40px; }
.pay-content { display: none; animation: fadeIn 0.4s ease; }
.pay-content.active { display: block; }

/* M-Pesa Grid */
.mpesa-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.mpesa-instructions ol {
    margin-left: 20px;
    margin-top: 15px;
}
.mpesa-instructions li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}
.mpesa-push {
    background: #f9f9f9;
    padding: 25px;
    border-radius: var(--radius);
    border: 1px solid #eee;
}

@media (max-width: 768px) {
    .mpesa-grid { grid-template-columns: 1fr; }
    .payment-tabs { flex-direction: column; }
    .pay-tab { border-bottom: 1px solid #ddd; justify-content: flex-start; }
    .pay-tab.active { border-left: 5px solid var(--primary); border-bottom: none; }
}


/* =========================================
   16. REPORT MODAL STYLES
   ========================================= */
.modal-overlay {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Dimmed background */
    z-index: 2000; /* On top of everything */
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    width: 100%;
    max-width: 600px;
    border-radius: var(--radius);
    position: relative;
    max-height: 90vh; /* Prevents it being taller than screen */
    overflow-y: auto; /* Scroll inside modal if needed */
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #999;
    transition: 0.3s;
    line-height: 1;
}

.close-modal:hover { color: var(--danger); }

.modal-header {
    padding: 30px 30px 0 30px;
    text-align: center;
}

.modal-body {
    padding: 30px;
}

/* Ensure the modal displays when active class is added */
.modal-overlay.open {
    display: flex;
}