/* =====================================================
   TATC Website - Main Stylesheet
   Colors: Green #2d6a2d (tatc-green), Red #b91c1c (tatc-red)
   Font: Cairo
   ===================================================== */

:root {
    --tatc-green: #2d6a2d;
    --tatc-green-light: #3d8b3d;
    --tatc-green-dark: #1e4d1e;
    --tatc-green-bg: rgba(45, 106, 45, 0.08);
    --tatc-red: #b91c1c;
    --tatc-red-light: #dc2626;
    --background: #fafafa;
    --foreground: #1a1a2e;
    --card: #ffffff;
    --border: #e8f0e8;
    --muted: #f0f5f0;
    --muted-fg: #6b7280;
    --radius: 0.5rem;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Cairo', 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

body.rtl { direction: rtl; text-align: right; }
body.ltr { direction: ltr; text-align: left; }

a { color: var(--tatc-green); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--tatc-green-dark); }

img { max-width: 100%; height: auto; }

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--foreground);
}

/* ── Container ── */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}
@media (min-width: 640px) { .container { padding: 0 1.5rem; } }
@media (min-width: 1024px) { .container { padding: 0 2rem; } }

/* ── Section Spacing ── */
.section-padding { padding: 5rem 0; }

/* ── Animations ── */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ── Header / Navbar ── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s;
}
.site-header.scrolled { box-shadow: var(--shadow-md); }

.navbar { padding: 0.75rem 0; }

.navbar-brand { gap: 0.5rem; }
.logo-img { border-radius: 8px; object-fit: contain; }
.brand-name { font-size: 1.1rem; font-weight: 800; color: var(--tatc-green); line-height: 1; }
.brand-sub { font-size: 0.65rem; color: var(--muted-fg); font-weight: 500; }

.nav-link {
    color: #374151 !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.4rem 0.6rem !important;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}
.nav-link:hover, .nav-link.active {
    color: var(--tatc-green) !important;
    background: var(--tatc-green-bg);
}

.btn-lang {
    background: transparent;
    border: 1.5px solid var(--tatc-green);
    color: var(--tatc-green);
    font-weight: 600;
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    transition: all 0.2s;
}
.btn-lang:hover {
    background: var(--tatc-green);
    color: #fff;
}

.navbar-toggler { border: 1.5px solid var(--border); }
.navbar-toggler:focus { box-shadow: none; }

/* ── Buttons ── */
.btn-primary-tatc {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--tatc-green);
    color: #fff !important;
    border: 2px solid var(--tatc-green);
    padding: 0.7rem 1.6rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s var(--ease-out);
    cursor: pointer;
}
.btn-primary-tatc:hover {
    background: var(--tatc-green-dark);
    border-color: var(--tatc-green-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45,106,45,0.3);
}
.btn-primary-tatc:active { transform: scale(0.97); }

.btn-outline-tatc {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--tatc-green) !important;
    border: 2px solid var(--tatc-green);
    padding: 0.7rem 1.6rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s var(--ease-out);
    cursor: pointer;
}
.btn-outline-tatc:hover {
    background: var(--tatc-green);
    color: #fff !important;
    transform: translateY(-1px);
}

/* ── Hero Section ── */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.hero-bg {
    position: absolute;
    inset: 0;
    background-image: url('https://tatccommunity-dihiarbo.manus.space/manus-storage/hero-bg_e8b04134.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.65) 0%, rgba(30,77,30,0.5) 100%);
}
.hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    padding: 6rem 0 4rem;
}
.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 0.5rem;
}
.hero-title-accent {
    color: #4ade80;
    display: block;
}
.hero-desc {
    font-size: 1.05rem;
    color: rgba(255,255,255,0.9);
    max-width: 600px;
    margin: 1.2rem 0 2rem;
    line-height: 1.8;
}
.hero-btns { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ── Stats Section ── */
.stats-section {
    background: #fff;
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
@media (min-width: 768px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }

.stat-item {
    text-align: center;
    padding: 1.5rem;
}
.stat-icon {
    width: 48px;
    height: 48px;
    background: var(--tatc-green-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.75rem;
    color: var(--tatc-green);
    font-size: 1.2rem;
}
.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--tatc-green);
    line-height: 1;
    margin-bottom: 0.25rem;
}
.stat-label { font-size: 0.9rem; color: var(--muted-fg); font-weight: 500; }

/* ── Mission/Vision Section ── */
.mission-vision-section { background: var(--muted); }
.mission-vision-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}
@media (min-width: 768px) { .mission-vision-grid { grid-template-columns: 1fr 1fr; } }

.mv-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.mv-icon {
    width: 56px;
    height: 56px;
    background: var(--tatc-green-bg);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--tatc-green);
    font-size: 1.4rem;
}
.mv-title { font-size: 1.3rem; font-weight: 700; color: #111; margin-bottom: 0.75rem; }
.mv-text { color: #4b5563; line-height: 1.8; font-size: 1rem; }

/* ── Section Header ── */
.section-header { text-align: center; margin-bottom: 3rem; }
.section-title { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; color: #111; margin-bottom: 0.75rem; }
.section-desc { color: var(--muted-fg); font-size: 1rem; max-width: 600px; margin: 0 auto; }

/* ── Project Cards ── */
.projects-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 640px) { .projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .projects-grid { grid-template-columns: repeat(3, 1fr); } }

.project-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.project-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.project-card-img {
    position: relative;
    height: 200px;
    overflow: hidden;
}
.project-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s var(--ease-out);
}
.project-card:hover .project-card-img img { transform: scale(1.05); }

.project-status-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-completed { background: #dcfce7; color: #166534; }
.badge-ongoing { background: #fef9c3; color: #854d0e; }
.badge-in-progress { background: #dbeafe; color: #1e40af; }

.project-card-body { padding: 1.25rem; }
.project-partner {
    font-size: 0.75rem;
    color: var(--tatc-green);
    font-weight: 600;
    margin-bottom: 0.5rem;
}
.project-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}
.project-card-desc {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.project-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--tatc-green);
    font-weight: 600;
    font-size: 0.85rem;
    transition: gap 0.2s;
}
.project-card-link:hover { gap: 0.5rem; color: var(--tatc-green-dark); }

/* ── Objectives Section ── */
.objectives-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (min-width: 768px) { .objectives-grid { grid-template-columns: repeat(4, 1fr); } }

.objective-card {
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s;
    background: #fff;
}
.objective-card:hover {
    border-color: rgba(45,106,45,0.2);
    background: var(--tatc-green-bg);
}
.objective-icon { font-size: 2rem; margin-bottom: 0.75rem; display: block; }
.objective-title { font-size: 0.95rem; font-weight: 700; color: #111; margin-bottom: 0.4rem; }
.objective-desc { font-size: 0.8rem; color: #6b7280; line-height: 1.6; }

/* ── CTA Section ── */
.cta-section {
    position: relative;
    padding: 5rem 0;
    overflow: hidden;
    background: linear-gradient(135deg, var(--tatc-green-dark) 0%, var(--tatc-green) 100%);
    color: #fff;
    text-align: center;
}
.cta-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}
.cta-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -5%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}
.cta-content { position: relative; z-index: 2; }
.cta-title { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 800; margin-bottom: 1rem; }
.cta-desc { font-size: 1.05rem; color: rgba(255,255,255,0.9); max-width: 500px; margin: 0 auto 2rem; }
.cta-btns { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; }

.btn-white {
    background: #fff;
    color: var(--tatc-green) !important;
    border: 2px solid #fff;
    padding: 0.7rem 1.6rem;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-white:hover { background: #f0fdf4; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.2); }

.btn-white-outline {
    background: rgba(255,255,255,0.1);
    color: #fff !important;
    border: 2px solid rgba(255,255,255,0.4);
    padding: 0.7rem 1.6rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-white-outline:hover { background: rgba(255,255,255,0.2); border-color: rgba(255,255,255,0.7); }

/* ── Partners Grid ── */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}
@media (min-width: 768px) { .partners-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1024px) { .partners-grid { grid-template-columns: repeat(6, 1fr); } }

.partner-mini-card {
    background: #fff;
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: box-shadow 0.2s;
}
.partner-mini-card:hover { box-shadow: var(--shadow-md); }
.partner-mini-card img { max-height: 50px; object-fit: contain; }
.partner-mini-name { font-size: 0.8rem; font-weight: 600; color: #374151; }

/* ── Page Hero ── */
.page-hero {
    background: linear-gradient(135deg, var(--tatc-green-dark) 0%, var(--tatc-green) 100%);
    color: #fff;
    padding: 5rem 0 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}
.page-hero-title { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; margin-bottom: 0.75rem; }
.page-hero-subtitle { font-size: 1.05rem; color: rgba(255,255,255,0.85); }

/* ── Filter Tabs ── */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}
.filter-tab {
    padding: 0.4rem 1rem;
    border-radius: 20px;
    border: 1.5px solid var(--border);
    background: #fff;
    color: #374151;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}
.filter-tab:hover, .filter-tab.active {
    background: var(--tatc-green);
    border-color: var(--tatc-green);
    color: #fff;
}

/* ── About Page ── */
.story-section { background: var(--muted); }
.story-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
}
@media (min-width: 768px) { .story-grid { grid-template-columns: 1fr 1fr; } }

.story-img { border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-lg); }
.story-img img { width: 100%; height: 350px; object-fit: cover; }

.values-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
@media (min-width: 1024px) { .values-grid { grid-template-columns: repeat(4, 1fr); } }

.value-card {
    text-align: center;
    padding: 2rem 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    transition: all 0.3s;
}
.value-card:hover { border-color: rgba(45,106,45,0.2); }
.value-icon {
    width: 56px;
    height: 56px;
    background: var(--tatc-green-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: var(--tatc-green);
    font-size: 1.3rem;
}
.value-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.value-desc { font-size: 0.85rem; color: #6b7280; }

/* ── Org Structure ── */
.org-structure { max-width: 900px; margin: 0 auto; }
.org-level { display: flex; justify-content: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.5rem; }
.org-connector { width: 1px; height: 2rem; background: rgba(45,106,45,0.3); margin: 0 auto; }
.org-card-top {
    background: var(--tatc-green);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-weight: 700;
    text-align: center;
    box-shadow: 0 4px 12px rgba(45,106,45,0.3);
}
.org-card-mid {
    background: rgba(45,106,45,0.9);
    color: #fff;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    font-weight: 600;
    text-align: center;
    box-shadow: 0 2px 8px rgba(45,106,45,0.2);
}
.org-card-staff {
    background: #fff;
    border: 1px solid rgba(45,106,45,0.2);
    padding: 0.6rem 0.8rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.85rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
}
.org-staff-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}
@media (min-width: 768px) { .org-staff-grid { grid-template-columns: repeat(4, 1fr); } }

/* ── Office Cards ── */
.offices-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 640px) { .offices-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .offices-grid { grid-template-columns: repeat(3, 1fr); } }

.office-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s;
}
.office-card:hover { box-shadow: var(--shadow-md); }
.office-icon {
    width: 40px;
    height: 40px;
    background: var(--tatc-green-bg);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tatc-green);
    font-size: 1rem;
    flex-shrink: 0;
}
.office-type { font-size: 0.75rem; color: var(--tatc-green); font-weight: 600; }
.office-info { font-size: 0.85rem; color: #6b7280; }
.office-info i { color: var(--tatc-green); width: 16px; }

/* ── Partners Page ── */
.partners-full-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}
@media (min-width: 768px) { .partners-full-grid { grid-template-columns: repeat(2, 1fr); } }

.partner-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: box-shadow 0.2s;
}
.partner-card:hover { box-shadow: var(--shadow-md); }
.partner-logo-wrap {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    background: var(--muted);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}
.partner-logo-wrap img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.partner-logo-placeholder { color: var(--muted-fg); font-size: 1.2rem; }
.partner-name { font-weight: 700; font-size: 0.95rem; color: #111; }
.partner-name-en { font-size: 0.8rem; color: #6b7280; }
.partner-type-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 0.3rem;
}
.badge-funder { background: #dcfce7; color: #166534; }
.badge-implementing { background: #dbeafe; color: #1e40af; }
.badge-academic { background: #fef9c3; color: #854d0e; }
.badge-community { background: #f3e8ff; color: #6b21a8; }
.badge-supporter { background: #ffedd5; color: #9a3412; }

/* ── Training Cards ── */
.training-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 768px) { .training-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .training-grid { grid-template-columns: repeat(3, 1fr); } }

.course-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.course-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.course-img { height: 180px; overflow: hidden; position: relative; }
.course-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.course-card:hover .course-img img { transform: scale(1.05); }
.course-category-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--tatc-green);
    color: #fff;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}
.course-body { padding: 1.25rem; }
.course-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; }
.course-desc { font-size: 0.85rem; color: #6b7280; margin-bottom: 1rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.course-meta { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.8rem; color: #6b7280; margin-bottom: 1rem; }
.course-meta i { color: var(--tatc-green); width: 16px; }

/* ── News Cards ── */
.news-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}
@media (min-width: 640px) { .news-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .news-grid { grid-template-columns: repeat(3, 1fr); } }

.news-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.news-img { height: 200px; overflow: hidden; position: relative; background: #f3f4f6; }
.news-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s; }
.news-card:hover .news-img img { transform: scale(1.05); }
.news-type-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
}
.badge-news { background: #dbeafe; color: #1e40af; }
.badge-event { background: #dcfce7; color: #166534; }
.badge-announcement { background: #ffedd5; color: #9a3412; }
.badge-report { background: #f3e8ff; color: #6b21a8; }
.news-body { padding: 1.25rem; }
.news-meta { display: flex; align-items: center; gap: 0.75rem; font-size: 0.75rem; color: #9ca3af; margin-bottom: 0.75rem; }
.news-title { font-size: 1rem; font-weight: 700; margin-bottom: 0.5rem; line-height: 1.4; }
.news-excerpt { font-size: 0.85rem; color: #6b7280; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 1rem; }
.news-read-more { font-size: 0.85rem; color: var(--tatc-green); font-weight: 600; }

/* ── Contact Page ── */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}
@media (min-width: 768px) { .contact-grid { grid-template-columns: 1fr 1.5fr; } }

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.contact-info-icon {
    width: 44px;
    height: 44px;
    background: var(--tatc-green-bg);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--tatc-green);
    font-size: 1rem;
    flex-shrink: 0;
}
.contact-info-label { font-size: 0.8rem; color: #9ca3af; font-weight: 500; }
.contact-info-value { font-weight: 600; color: #111; }

/* ── Forms ── */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; font-size: 0.9rem; font-weight: 600; color: #374151; margin-bottom: 0.4rem; }
.form-label .required { color: var(--tatc-red); }
.form-control {
    width: 100%;
    padding: 0.65rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-family: 'Cairo', sans-serif;
    font-size: 0.9rem;
    color: var(--foreground);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.form-control:focus {
    border-color: var(--tatc-green);
    box-shadow: 0 0 0 3px rgba(45,106,45,0.1);
}
.form-control.is-invalid { border-color: var(--tatc-red); }
.form-error { font-size: 0.8rem; color: var(--tatc-red); margin-top: 0.3rem; }
textarea.form-control { resize: vertical; min-height: 120px; }
select.form-control { cursor: pointer; }

/* ── Volunteer Areas ── */
.volunteer-areas {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}
@media (min-width: 768px) { .volunteer-areas { grid-template-columns: repeat(4, 1fr); } }

.area-card {
    padding: 1.25rem;
    border-radius: 12px;
    border: 1.5px solid var(--border);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.area-card:hover, .area-card.selected {
    border-color: var(--tatc-green);
    background: var(--tatc-green-bg);
}
.area-icon { font-size: 1.8rem; margin-bottom: 0.5rem; }
.area-title { font-size: 0.85rem; font-weight: 600; color: #374151; }

/* ── Project Detail ── */
.project-detail-hero {
    position: relative;
    height: 350px;
    overflow: hidden;
    background: #1a1a1a;
}
.project-detail-hero img { width: 100%; height: 100%; object-fit: cover; opacity: 0.6; }
.project-detail-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
}
.project-detail-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
}
.project-detail-body { max-width: 900px; margin: 0 auto; padding: 2rem 1rem; }
.project-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1.5rem 0;
}
@media (min-width: 768px) { .project-meta-grid { grid-template-columns: repeat(4, 1fr); } }

.project-meta-item {
    background: var(--muted);
    border-radius: 10px;
    padding: 1rem;
    text-align: center;
}
.project-meta-label { font-size: 0.75rem; color: #9ca3af; margin-bottom: 0.3rem; }
.project-meta-value { font-weight: 700; color: #111; font-size: 0.9rem; }

/* ── Gallery ── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}
@media (min-width: 768px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }

.gallery-item {
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.gallery-item:hover img { transform: scale(1.05); }

/* ── Lightbox ── */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}
.lightbox.active { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 8px; }
.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.1);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-close:hover { background: rgba(255,255,255,0.2); }

/* ── YouTube Embed ── */
.youtube-embed { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 12px; }
.youtube-embed iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.youtube-thumb { position: relative; cursor: pointer; border-radius: 12px; overflow: hidden; }
.youtube-thumb img { width: 100%; height: 200px; object-fit: cover; }
.youtube-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.3);
    transition: background 0.2s;
}
.youtube-play-btn:hover { background: rgba(0,0,0,0.4); }
.play-icon {
    width: 56px;
    height: 56px;
    background: #dc2626;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.2rem;
    transition: transform 0.2s;
}
.youtube-play-btn:hover .play-icon { transform: scale(1.1); }

/* ── Footer ── */
.site-footer {
    background: #111827;
    color: #d1d5db;
    padding: 4rem 0 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-bottom: 3rem;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }

.footer-logo { border-radius: 8px; object-fit: contain; }
.footer-brand-name { font-size: 1.1rem; font-weight: 800; color: #fff; }
.footer-brand-sub { font-size: 0.7rem; color: #9ca3af; }
.footer-desc { font-size: 0.85rem; color: #9ca3af; line-height: 1.7; }
.footer-heading { font-size: 0.95rem; font-weight: 700; color: #fff; margin-bottom: 1rem; }
.footer-links ul li { margin-bottom: 0.5rem; }
.footer-links a { color: #9ca3af; font-size: 0.85rem; transition: color 0.2s; }
.footer-links a:hover { color: #4ade80; }
.footer-contact ul li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}
.footer-contact i { color: #4ade80; width: 16px; }
.footer-contact a { color: #9ca3af; transition: color 0.2s; }
.footer-contact a:hover { color: #fff; }

.social-links { display: flex; gap: 0.75rem; }
.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
    font-size: 0.9rem;
    transition: background 0.2s, color 0.2s;
}
.social-links a:hover { background: var(--tatc-green); color: #fff; }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    text-align: center;
}
@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
        text-align: start;
    }
}
.footer-bottom p { font-size: 0.8rem; color: #6b7280; margin: 0; }

/* ── Back to Top ── */
.back-to-top {
    position: fixed;
    bottom: 1.5rem;
    left: 1.5rem;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--tatc-green);
    color: #fff;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(45,106,45,0.4);
    transition: background 0.2s, transform 0.2s;
    z-index: 999;
}
.back-to-top.visible { display: flex; }
.back-to-top:hover { background: var(--tatc-green-dark); transform: translateY(-2px); }
.back-to-top:active { transform: scale(0.95); }

/* ── Alert Messages ── */
.alert-success {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.alert-error {
    background: #fee2e2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* ── Loading Spinner ── */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty State ── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: #9ca3af;
}
.empty-state i { font-size: 3rem; margin-bottom: 1rem; opacity: 0.5; }
.empty-state p { font-size: 1rem; }

/* ── Utilities ── */
.text-tatc-green { color: var(--tatc-green) !important; }
.bg-tatc-green { background: var(--tatc-green) !important; }
.border-tatc-green { border-color: var(--tatc-green) !important; }
.text-muted-custom { color: var(--muted-fg); }
.fw-800 { font-weight: 800; }
.gap-2 { gap: 0.5rem; }
.rounded-xl { border-radius: 12px; }
.rounded-2xl { border-radius: 16px; }

/* ── Responsive Adjustments ── */
@media (max-width: 576px) {
    .hero-btns { flex-direction: column; align-items: flex-start; }
    .cta-btns { flex-direction: column; align-items: center; }
    .section-padding { padding: 3rem 0; }
    .page-hero { padding: 3rem 0 2rem; }
}

/* ── RTL Specific ── */
[dir="rtl"] .back-to-top { left: auto; right: 1.5rem; }
[dir="rtl"] .project-status-badge { right: auto; left: 0.75rem; }
[dir="rtl"] .course-category-badge { right: auto; left: 0.75rem; }
[dir="rtl"] .news-type-badge { right: auto; left: 0.75rem; }
[dir="rtl"] .lightbox-close { right: auto; left: 1rem; }
