/* ===== OVA Organization - Bootstrap-Integrated Stylesheet ===== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700&family=Literata:wght@400;500&family=Inter:wght@600&display=swap');

/* ---- Bootstrap Variable Overrides ---- */
:root {
    --ova-primary: #065f46;
    --ova-primary-light: #f1f9f6;
    --ova-primary-dark: #14532d;
    --ova-secondary: #f97316;
    --ova-secondary-light: #fff7ed;
    --ova-blue: #1e3a8a;
    --ova-surface: #f8f9ff;
    --ova-on-surface: #121c28;
    --ova-surface-variant: #d9e3f4;
    --ova-on-surface-variant: #444651;
    --ova-outline-variant: #c5c5d3;
    --ova-transition: all 0.3s ease;

    --bs-primary: #065f46;
    --bs-primary-rgb: 6, 95, 70;
    --bs-secondary: #f97316;
    --bs-secondary-rgb: 249, 115, 22;
    --bs-body-font-family: 'Literata', 'Georgia', serif;
    --bs-body-color: #121c28;
    --bs-body-bg: #f8f9ff;
    --bs-heading-color: #121c28;
}

/* ---- Base ---- */
body { overflow-x: hidden; }

.font-headline, h1, h2, h3, h4, h5, h6, .font-mont {
    font-family: 'Montserrat', 'Segoe UI', sans-serif !important;
}
.font-button, .btn, nav, .badge {
    font-family: 'Inter', 'Segoe UI', sans-serif !important;
}
.khmer-text {
    font-family: 'Kantumruy Pro', 'Khmer OS Battambang', 'Khmer OS', sans-serif;
}

/* ---- Navbar ---- */
.navbar { transition: var(--ova-transition); padding: 12px 0; }
.navbar.py-1 { padding: 6px 0; }
.navbar .nav-link {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 14px !important;
    color: var(--ova-on-surface-variant);
    letter-spacing: 0.3px;
    white-space: nowrap;
    position: relative;
}
.navbar .nav-link:hover,
.navbar .nav-link.active { color: var(--ova-primary) !important; }
.navbar .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 14px;
    right: 14px;
    height: 2px;
    background: var(--ova-primary);
}
.lang-switch {
    display: flex;
    background: var(--ova-primary-dark);
    padding: 3px;
    border-radius: 6px;
    gap: 2px;
    flex-shrink: 0;
}
.lang-switch .lang-btn {
    padding: 4px 12px;
    border-radius: 4px;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: var(--ova-transition);
    border: none;
    background: none;
}
.lang-switch .lang-btn.active { background: var(--ova-primary); color: #fff; }
.lang-switch .lang-btn:hover:not(.active) { color: #fff; }

/* ---- Hero ---- */
.hero-section { padding: 120px 0 80px; }
.hero-title {
    font-size: calc(1.8rem + 1.2vw);
    font-weight: 700;
    color: var(--ova-primary);
    line-height: 1.15;
}
.hero-title span { color: var(--ova-secondary); }
.hero-subtitle {
    font-family: 'Kantumruy Pro', 'Khmer OS Battambang', sans-serif;
    font-size: calc(1.1rem + 0.4vw);
    font-weight: 600;
    color: var(--ova-primary);
}
.hero-img-main { border-radius: 16px; overflow: hidden; }
.hero-img-main img { width: 100%; height: 100%; object-fit: cover; }
.hero-img-grid img { border-radius: 12px; width: 100%; height: 100%; object-fit: cover; }

/* ---- Sections ---- */
.section-padding { padding: 80px 0; }
.section-tag {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--ova-primary);
    letter-spacing: 0.15em;
    text-transform: uppercase;
    display: block;
    margin-bottom: 4px;
}
.section-title {
    font-size: calc(1.2rem + 0.4vw);
    font-weight: 700;
}

/* ---- Program Cards ---- */
.program-card {
    padding: 12px;
    border-radius: 12px;
    transition: var(--ova-transition);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.program-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.program-card .program-icon { font-size: 1.8rem; }
.program-card h4 { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }
.program-card p { font-size: 0.7rem; line-height: 1.3; color: var(--ova-on-surface-variant); }
.program-card img { border-radius: 8px; height: 80px; width: 100%; object-fit: cover; }

.program-orphan { background: var(--ova-secondary-light); border: 1px solid #fed7aa; }
.program-elderly { background: #f0fdf4; border: 1px solid #bbf7d0; }
.program-disability { background: #eff6ff; border: 1px solid #bfdbfe; }
.program-education { background: #fffbeb; border: 1px solid #fde68a; }
.program-food { background: #fef2f2; border: 1px solid #fecaca; }

.program-orphan h4 { color: var(--ova-secondary); }
.program-elderly h4 { color: var(--ova-primary); }
.program-disability h4 { color: var(--ova-blue); }
.program-education h4 { color: #d97706; }
.program-food h4 { color: #dc2626; }

/* ---- Impact Stats ---- */
.stat-card {
    background: #fff;
    border: 1px solid var(--ova-outline-variant);
    border-radius: 12px;
    padding: 16px 8px;
    text-align: center;
}
.stat-card .stat-icon { font-size: 2.5rem; margin-bottom: 4px; }
.stat-card .stat-number { font-size: calc(1.1rem + 0.5vw); font-weight: 700; line-height: 1.2; }
.stat-card .stat-label { font-size: 0.65rem; font-weight: 700; text-transform: uppercase; color: var(--ova-on-surface-variant); }

/* ---- Gallery ---- */
.gallery-img-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}
.gallery-img-wrap img {
    transition: var(--ova-transition);
    width: 100%;
    height: 120px;
    object-fit: cover;
}
.gallery-img-wrap:hover img { transform: scale(1.08); }

/* ---- CTA Card ---- */
.cta-card {
    background: var(--ova-primary-light);
    border-radius: 16px;
    border: 1px solid #bbf7d0;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.cta-card .cta-heart {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}
.cta-card .cta-heart img { width: 100%; height: 100%; object-fit: cover; }
.cta-card .cta-heart .heart-overlay {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
}
.cta-card .cta-heart .heart-overlay .material-symbols-outlined {
    font-size: 3rem;
    color: #ef4444;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* ---- News Items ---- */
.news-item {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.news-item:last-child { border-bottom: none; }
.news-item img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}
.news-item h4 {
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.news-item .news-date {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--ova-on-surface-variant);
}
.news-item p {
    font-size: 0.65rem;
    color: var(--ova-on-surface-variant);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

/* ---- Bootstrap Button Extensions ---- */
.btn-ova-primary {
    --bs-btn-bg: var(--ova-secondary);
    --bs-btn-border-color: var(--ova-secondary);
    --bs-btn-hover-bg: #ea580c;
    --bs-btn-hover-border-color: #ea580c;
    --bs-btn-active-bg: #ea580c;
    --bs-btn-active-border-color: #ea580c;
    font-weight: 600;
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.btn-ova-outline {
    --bs-btn-color: var(--ova-primary);
    --bs-btn-border-color: var(--ova-primary);
    --bs-btn-hover-color: var(--ova-primary);
    --bs-btn-hover-bg: rgba(6,95,70,0.05);
    --bs-btn-hover-border-color: var(--ova-primary);
    --bs-btn-active-color: var(--ova-primary);
    --bs-btn-active-bg: rgba(6,95,70,0.08);
    --bs-btn-active-border-color: var(--ova-primary);
    font-weight: 600;
    border-radius: 8px;
}
.btn-ova-green {
    --bs-btn-bg: var(--ova-primary);
    --bs-btn-border-color: var(--ova-primary);
    --bs-btn-hover-bg: var(--ova-primary-dark);
    --bs-btn-hover-border-color: var(--ova-primary-dark);
    --bs-btn-active-bg: var(--ova-primary-dark);
    --bs-btn-active-border-color: var(--ova-primary-dark);
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    font-weight: 600;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}
.btn-ova-white {
    --bs-btn-bg: #fff;
    --bs-btn-border-color: rgba(6,95,70,0.2);
    --bs-btn-hover-bg: var(--ova-primary-light);
    --bs-btn-hover-border-color: rgba(6,95,70,0.3);
    --bs-btn-active-bg: var(--ova-primary-light);
    --bs-btn-color: var(--ova-primary);
    --bs-btn-hover-color: var(--ova-primary);
    --bs-btn-active-color: var(--ova-primary);
    font-weight: 600;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}
.btn-ova-sm {
    padding: 6px 14px;
    font-size: 0.75rem;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* ---- Card Extension ---- */
.card-ova {
    --bs-card-border-width: 0;
    --bs-card-border-radius: 12px;
    transition: var(--ova-transition);
    overflow: hidden;
}
.card-ova:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.card-ova .card-img-top { height: 200px; object-fit: cover; }

/* ---- Badge Extension ---- */
.badge-ova {
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

/* ---- Page Header ---- */
.page-header {
    background: var(--ova-primary) !important;
    padding: 100px 0 50px;
    margin-top: -1px;
}

/* ---- Footer ---- */
footer { background: var(--ova-surface); border-top: 1px solid rgba(197,197,211,0.3); }
.footer-bottom { background: var(--ova-primary); padding: 12px 0; }
.footer-bottom p {
    color: rgba(255,255,255,0.8);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0;
}
footer h5 { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; margin-bottom: 16px; }
footer a { color: var(--ova-on-surface-variant); text-decoration: none; font-size: 0.75rem; font-weight: 600; }
footer a:hover { color: var(--ova-primary); }
footer .social-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 0.9rem;
    transition: var(--ova-transition);
}
footer .social-icon:hover { opacity: 0.85; }
footer .qr-img {
    width: 80px;
    height: 80px;
    border: 1px solid var(--ova-outline-variant);
    padding: 4px;
    background: #fff;
    border-radius: 4px;
}

/* ---- About / Contact Icons ---- */
.value-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.contact-icon-wrap {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--ova-primary-light);
    flex-shrink: 0;
}

/* ---- QR Box ---- */
.qr-box { border: 1px solid var(--ova-outline-variant); border-radius: 8px; padding: 8px; text-align: center; }
.qr-box img { max-width: 100%; border-radius: 4px; }

/* ---- Dropdown for mobile nav (prevent overflow) ---- */
@media (max-width: 991.98px) {
    .navbar-collapse {
        max-height: 80vh;
        overflow-y: auto;
    }
    .navbar .nav-link { padding: 10px 0 !important; }
    .navbar .nav-link.active::after { display: none; }
    .lang-switch { margin-top: 10px; margin-left: 0 !important; align-self: flex-start; }
}

/* ---- Tablet / Small Laptop ---- */
@media (max-width: 991.98px) {
    .hero-section { padding: 100px 0 50px; }
    .section-padding { padding: 50px 0; }
    .page-header { padding: 90px 0 40px; }
    .hero-img-main img { height: 350px; }
    .program-card h4 { font-size: 0.7rem; }
}

/* ---- Mobile ---- */
@media (max-width: 767.98px) {
    .hero-section { padding: 90px 0 40px; }
    .hero-title { font-size: 1.6rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .section-padding { padding: 40px 0; }
    .page-header { padding: 80px 0 30px; }
    .hero-img-main img { height: 250px; }
    .hero-img-grid { display: none; }
    .program-card { padding: 10px; }
    .program-card img { height: 60px; }
    .stat-card { padding: 12px 6px; }
    .stat-card .stat-icon { font-size: 2rem; }
    .cta-card { padding: 24px 16px; }
    footer .qr-img { width: 64px; height: 64px; }
}

/* ---- Extra Small ---- */
@media (max-width: 575.98px) {
    .hero-title { font-size: 1.4rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-img-main img { height: 200px; }
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--ova-surface); }
::-webkit-scrollbar-thumb { background: var(--ova-primary); border-radius: 3px; }
