/* ============================================================
   Idiripela.com — Main Stylesheet
   Colors: Olive #4A5E23 | Curry #C8860A | Parchment #F5F0E8
   ============================================================ */

:root {
    --navy:       #4A5E23;
    --navy-dark:  #2E3B16;
    --navy-light: #6B7C3E;
    --gold:       #C8860A;
    --gold-light: #DCA025;
    --bg-light:   #F5F0E8;
    --text-dark:  #1A1208;
    --text-muted: #7a6e5f;
    --white:      #ffffff;
    --border:     #ddd5c8;
    --font-main:  'Inter', sans-serif;
    --font-si:    'Noto Sans Sinhala', sans-serif;
}

/* Base */
* { box-sizing: border-box; }

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    background: var(--white);
    font-size: 1rem;
    line-height: 1.7;
}

body.lang-si,
body.lang-si p,
body.lang-si h1,
body.lang-si h2,
body.lang-si h3,
body.lang-si h4,
body.lang-si h5,
body.lang-si h6,
body.lang-si .nav-link,
body.lang-si .btn {
    font-family: var(--font-si);
}

a { color: var(--navy); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold); }

img { max-width: 100%; }

/* ── Top Bar ───────────────────────────────────────────────── */
.topbar {
    background: var(--navy-dark);
    color: #d4d8b4;
    padding: 6px 0;
    font-size: .82rem;
}
.topbar a { color: #d4d8b4; }
.topbar a:hover { color: var(--gold-light); }

.lang-switch-btn {
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.2);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: .8rem;
    transition: background .2s;
}
.lang-switch-btn:hover { background: var(--gold); color: var(--white) !important; }

/* ── Navbar ────────────────────────────────────────────────── */
#mainNav {
    background: var(--white);
    box-shadow: 0 2px 12px rgba(74,94,35,.1);
    padding: 0;
}

.navbar-brand img { height: 50px; }
.brand-text {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--navy);
    letter-spacing: -.5px;
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    padding: 1.1rem .75rem !important;
    position: relative;
    font-size: .95rem;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0; left: .75rem; right: .75rem;
    height: 3px;
    background: var(--gold);
    transform: scaleX(0);
    transition: transform .2s;
    border-radius: 3px 3px 0 0;
}
.nav-link:hover::after,
.nav-link.active::after { transform: scaleX(1); }
.nav-link.active { color: var(--navy) !important; font-weight: 600; }

/* ── Hero Section ──────────────────────────────────────────── */
.hero-section {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 50%, var(--navy-light) 100%);
    color: var(--white);
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 400px; height: 400px;
    background: rgba(200,134,10,.12);
    border-radius: 50%;
}
.hero-section::after {
    content: '';
    position: absolute;
    bottom: -80px; left: -80px;
    width: 300px; height: 300px;
    background: rgba(255,255,255,.04);
    border-radius: 50%;
}
.hero-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    line-height: 1.2;
}
.hero-title span { color: var(--gold-light); }
.hero-sub { font-size: 1.1rem; opacity: .85; max-width: 580px; }
.hero-badge {
    display: inline-block;
    background: rgba(200,134,10,.25);
    border: 1px solid var(--gold);
    color: var(--gold-light);
    padding: 4px 16px;
    border-radius: 20px;
    font-size: .82rem;
    font-weight: 600;
    margin-bottom: 1rem;
    letter-spacing: .5px;
    text-transform: uppercase;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn-primary {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--white);
    font-weight: 600;
    padding: .5rem 1.5rem;
    border-radius: 6px;
}
.btn-primary:hover { background: var(--gold-light); border-color: var(--gold-light); color: var(--white); }
.btn-outline-primary {
    border-color: var(--navy);
    color: var(--navy);
}
.btn-outline-primary:hover { background: var(--navy); color: var(--white); }
.btn-outline-light:hover { color: var(--navy) !important; }

/* ── Section Titles ────────────────────────────────────────── */
.section-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: .5rem;
}
.section-subtitle { color: var(--text-muted); margin-bottom: 2rem; }
.section-divider {
    width: 50px; height: 4px;
    background: var(--gold);
    border-radius: 2px;
    margin: .5rem 0 1.5rem;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card { border: 1px solid var(--border); border-radius: 10px; transition: box-shadow .25s, transform .25s; }
.card:hover { box-shadow: 0 8px 30px rgba(74,94,35,.12); transform: translateY(-3px); }
.card-img-top { border-radius: 10px 10px 0 0; object-fit: cover; height: 200px; }

.article-card .card-title { font-size: 1rem; font-weight: 600; color: var(--navy); }
.article-card .card-title a:hover { color: var(--gold); }
.article-card .author-info { font-size: .82rem; color: var(--text-muted); }

/* Category badge */
.cat-badge {
    display: inline-block;
    background: rgba(74,94,35,.08);
    color: var(--navy);
    font-size: .75rem;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 20px;
    margin-bottom: .5rem;
}

/* ── Leadership Cards ──────────────────────────────────────── */
.leadership-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: box-shadow .25s, transform .25s;
}
.leadership-card:hover { box-shadow: 0 10px 35px rgba(74,94,35,.14); transform: translateY(-4px); }
.leadership-photo {
    width: 110px; height: 110px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--gold);
    margin: 0 auto 1rem;
    display: block;
}
.leadership-photo-placeholder {
    width: 110px; height: 110px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    margin: 0 auto 1rem;
    display: flex; align-items: center; justify-content: center;
    border: 4px solid var(--gold);
    font-size: 2rem; color: var(--white);
}
.leadership-title { color: var(--gold); font-weight: 600; font-size: .9rem; }
.leadership-name { color: var(--navy); font-weight: 700; font-size: 1.1rem; }

/* ── Programs ──────────────────────────────────────────────── */
.program-card {
    padding: 1.8rem;
    border-radius: 12px;
    background: var(--white);
    border: 1px solid var(--border);
    height: 100%;
    transition: box-shadow .25s;
}
.program-card:hover { box-shadow: 0 8px 30px rgba(74,94,35,.1); }
.program-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: var(--white);
    margin-bottom: 1rem;
}
.program-status {
    font-size: .75rem; font-weight: 700;
    padding: 2px 10px; border-radius: 20px;
    text-transform: uppercase; letter-spacing: .5px;
}
.status-active   { background: #d4edda; color: #155724; }
.status-upcoming { background: #fff3cd; color: #856404; }
.status-completed{ background: #e2e3e5; color: #383d41; }

/* ── Page Header ───────────────────────────────────────────── */
.page-header {
    background: linear-gradient(135deg, var(--navy-dark), var(--navy));
    color: var(--white);
    padding: 60px 0 50px;
}
.page-header h1 { font-size: 2.2rem; font-weight: 700; }
.page-header p  { opacity: .8; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-label { font-weight: 500; color: var(--navy); }
.form-control:focus, .form-select:focus {
    border-color: var(--navy);
    box-shadow: 0 0 0 .2rem rgba(74,94,35,.15);
}

/* ── Admin Sidebar ─────────────────────────────────────────── */
.admin-sidebar {
    background: var(--navy-dark);
    min-height: 100vh;
    padding: 0;
}
.admin-sidebar .sidebar-brand {
    padding: 1.5rem 1.2rem;
    border-bottom: 1px solid rgba(255,255,255,.1);
}
.admin-sidebar .nav-link {
    color: #c4c9a0 !important;
    padding: .7rem 1.2rem !important;
    border-radius: 0;
    font-size: .92rem;
}
.admin-sidebar .nav-link::after { display: none; }
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(200,134,10,.2);
    color: var(--gold-light) !important;
}
.admin-sidebar .nav-link i { width: 20px; }
.admin-content { padding: 2rem; background: var(--bg-light); min-height: 100vh; }

/* ── Stats Cards (Admin) ───────────────────────────────────── */
.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid var(--gold);
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.stat-number { font-size: 2rem; font-weight: 700; color: var(--navy); }
.stat-label  { color: var(--text-muted); font-size: .85rem; }

/* ── Footer ────────────────────────────────────────────────── */
.site-footer {
    background: var(--navy-dark);
    color: #c4c9a0;
    padding: 3rem 0 0;
}
.footer-brand-name { font-size: 1.2rem; font-weight: 700; color: var(--white); }
.footer-tagline { font-size: .88rem; opacity: .7; }
.footer-heading { color: var(--gold); font-weight: 600; margin-bottom: 1rem; font-size: .9rem; text-transform: uppercase; letter-spacing: .5px; }
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: .4rem; }
.footer-links a { color: #c4c9a0; font-size: .88rem; }
.footer-links a:hover { color: var(--gold-light); }
.footer-contact { list-style: none; padding: 0; }
.footer-contact li { margin-bottom: .5rem; font-size: .88rem; }
.footer-contact i { width: 18px; color: var(--gold); }
.footer-divider { border-color: rgba(255,255,255,.1); margin: 2rem 0 1rem; }
.footer-bottom { padding-bottom: 1.5rem; font-size: .82rem; color: #a09a78; }
.footer-bottom a { color: #a09a78; }
.footer-bottom a:hover { color: var(--gold-light); }
.social-icons a {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px;
    background: rgba(255,255,255,.08);
    border-radius: 50%;
    color: #c4c9a0;
    margin-right: .4rem;
    font-size: .85rem;
    transition: background .2s, color .2s;
}
.social-icons a:hover { background: var(--gold); color: var(--white); }

/* ── Utilities ─────────────────────────────────────────────── */
.text-navy  { color: var(--navy) !important; }
.text-gold  { color: var(--gold) !important; }
.bg-navy    { background: var(--navy) !important; }
.bg-light-custom { background: var(--bg-light) !important; }
.rounded-lg { border-radius: 12px; }

/* ── Responsive ────────────────────────────────────────────── */

/* Tablet (≤992px) */
@media (max-width: 991.98px) {
    /* Navbar: collapse menu has enough padding */
    .navbar-collapse { border-top: 1px solid var(--border); padding: .5rem 0; }
    .nav-link { padding: .75rem 1rem !important; }
    .nav-link::after { display: none; }
    .nav-link.active { background: var(--bg-light); border-radius: 6px; }

    /* Admin layout */
    .admin-sidebar { min-height: auto; position: relative; }
    .admin-content { padding: 1.25rem; }
}

/* Mobile (≤768px) */
@media (max-width: 767.98px) {
    /* Topbar: hide email, keep buttons compact */
    .topbar .container { flex-wrap: nowrap; }
    .topbar small { font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
    .topbar .d-flex.gap-3 { gap: .5rem !important; }
    .lang-switch-btn { padding: 2px 8px; font-size: .75rem; }

    /* Navbar brand: smaller on mobile */
    .navbar-brand img { height: 40px; }
    .brand-text { font-size: 1.1rem; }

    /* Hero */
    .hero-section { padding: 60px 0 50px; }
    .hero-title { font-size: clamp(1.5rem, 7vw, 2rem); }
    .hero-sub { font-size: 1rem; }

    /* Page header */
    .page-header { padding: 32px 0 24px; }
    .page-header h1 { font-size: clamp(1.4rem, 6vw, 1.8rem); }

    /* Section titles */
    .section-title { font-size: 1.4rem; }

    /* Cards: full width on small screens */
    .card-img-top { height: 180px; }

    /* Leadership */
    .leadership-photo,
    .leadership-photo-placeholder { width: 90px; height: 90px; }
    .leadership-card { padding: 1.5rem 1rem; }

    /* Footer: stack columns */
    .site-footer { padding: 2rem 0 0; }
    .footer-heading { margin-top: .5rem; }

    /* Forms */
    .form-control, .form-select, .btn { font-size: .95rem; }
    input, button, select, textarea { min-height: 44px; } /* Touch targets */

    /* Admin stat cards */
    .stat-card { padding: 1rem; }
    .stat-number { font-size: 1.6rem; }
}

/* Small phones (≤575px) */
@media (max-width: 575.98px) {
    /* Topbar: very compact — hide "main site" text, keep icon only */
    .topbar small a { font-size: 0; }
    .topbar small a i { font-size: .8rem; }

    /* Navbar */
    .navbar-brand { gap: .5rem !important; }
    .brand-text { font-size: 1rem; }

    /* Hero */
    .hero-section { padding: 48px 0 40px; }
    .hero-badge { font-size: .75rem; }

    /* Page header */
    .page-header { padding: 24px 0 20px; }
    .page-header h1 { font-size: 1.4rem; }
    .page-header p { font-size: .9rem; }

    /* Cards: single column already from Bootstrap col-12, improve card padding */
    .article-card .card-body { padding: 1rem; }

    /* Programs */
    .program-card { padding: 1.2rem; }
    .program-icon { width: 46px; height: 46px; font-size: 1.2rem; }

    /* Footer */
    .footer-brand-name { font-size: 1rem; }
    .footer-links a, .footer-contact li { font-size: .85rem; }
    .social-icons a { width: 32px; height: 32px; font-size: .8rem; }

    /* Admin */
    .admin-content { padding: 1rem; }
    .stat-card { flex-direction: column; align-items: flex-start; gap: .75rem; }
}
