/* =========================================================
   CiLLAGE Habitat CMS - Front-end Stylesheet
   Earthy, academic palette inspired by sustainable habitats.
   ========================================================= */

:root {
    --c-primary:        #2f6b3a;   /* forest green */
    --c-primary-dark:   #1f4a26;
    --c-primary-light:  #d6ead9;
    --c-accent:         #c9743b;   /* terracotta */
    --c-accent-soft:    #f6e6d4;
    --c-ink:            #1f2933;
    --c-muted:          #5b6b73;
    --c-bg:             #fbf9f5;   /* warm off-white */
    --c-card:           #ffffff;
    --c-border:         #e8e3d8;
    --c-link:           #2f6b3a;
    --shadow-sm:        0 2px 8px rgba(20,30,20,.06);
    --shadow-md:        0 8px 28px rgba(20,30,20,.10);
    --radius:           14px;
    --radius-sm:        8px;
    --font-display:     'Playfair Display', Georgia, serif;
    --font-body:        'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }
body {
    font-family: var(--font-body);
    color: var(--c-ink);
    background: var(--c-bg);
    line-height: 1.65;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--font-display);
    color: var(--c-ink);
    letter-spacing: -0.01em;
    font-weight: 600;
}

a { color: var(--c-link); text-decoration: none; transition: color .2s; }
a:hover { color: var(--c-primary-dark); }

.text-primary-dark { color: var(--c-primary-dark) !important; }
.bg-primary-soft   { background: var(--c-primary-light); }
.bg-accent-soft    { background: var(--c-accent-soft); }

/* ---------- Top bar ---------- */
.topbar {
    background: var(--c-primary-dark);
    color: #d6ead9;
    font-size: 0.85rem;
    padding: 6px 0;
}
.topbar a { color: #d6ead9; }
.topbar a:hover { color: #fff; }

/* ---------- Navbar ---------- */
.site-navbar {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: saturate(150%) blur(8px);
    -webkit-backdrop-filter: saturate(150%) blur(8px);
    border-bottom: 1px solid var(--c-border);
    box-shadow: var(--shadow-sm);
}
.site-navbar .navbar-brand {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.45rem;
    color: var(--c-primary-dark);
    display: flex;
    align-items: center;
    gap: 10px;
}
.site-navbar .navbar-brand .brand-mark {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--c-primary), #6aa974);
    color: #fff;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 700;
    box-shadow: var(--shadow-sm);
}
.site-navbar .nav-link {
    color: var(--c-ink);
    font-weight: 500;
    padding: .65rem 1rem !important;
    position: relative;
}
.site-navbar .nav-link:hover,
.site-navbar .nav-link.active { color: var(--c-primary-dark); }
.site-navbar .nav-link.active::after {
    content: '';
    position: absolute;
    left: 1rem; right: 1rem; bottom: .4rem;
    height: 2px;
    background: var(--c-accent);
    border-radius: 2px;
}
.site-navbar .dropdown-menu {
    border: 1px solid var(--c-border);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-sm);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    background:
      radial-gradient(at 80% 10%, rgba(201,116,59,.18), transparent 50%),
      radial-gradient(at 10% 90%, rgba(47,107,58,.20), transparent 50%),
      linear-gradient(180deg, #f3efe5 0%, #fbf9f5 100%);
    padding: 100px 0 90px;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute; inset: 0;
    background-image:
      radial-gradient(rgba(47,107,58,.08) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
    opacity: .6;
}
.hero h1 {
    font-size: clamp(2rem, 4.6vw, 3.6rem);
    line-height: 1.15;
    margin-bottom: 1rem;
}
.hero .lead { font-size: 1.18rem; color: var(--c-muted); max-width: 680px; }
.hero .btn-eco {
    background: var(--c-primary);
    color: #fff;
    padding: .7rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    border: none;
    box-shadow: var(--shadow-md);
    transition: transform .15s ease, background .2s;
}
.hero .btn-eco:hover { background: var(--c-primary-dark); color: #fff; transform: translateY(-2px); }
.hero .btn-outline-eco {
    border: 1.5px solid var(--c-primary);
    color: var(--c-primary-dark);
    padding: .7rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    background: transparent;
}
.hero .btn-outline-eco:hover { background: var(--c-primary); color: #fff; }

/* ---------- Sections ---------- */
.section { padding: 80px 0; }
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: .5rem;
}
.section-title::after {
    content: "";
    display: block;
    width: 56px;
    height: 3px;
    background: var(--c-accent);
    margin-top: 10px;
    border-radius: 2px;
}
.section-eyebrow {
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: .78rem;
    color: var(--c-primary-dark);
    font-weight: 600;
    margin-bottom: 8px;
}

/* ---------- Cards ---------- */
.eco-card {
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}
.eco-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.eco-card .card-media {
    aspect-ratio: 16 / 9;
    background: linear-gradient(135deg, var(--c-primary-light), var(--c-accent-soft));
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}
.eco-card .card-media .badge-cat {
    position: absolute; top: 12px; left: 12px;
    background: rgba(255,255,255,.92);
    color: var(--c-primary-dark);
    font-size: .72rem;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 600;
}
.eco-card .card-body { padding: 22px 22px 18px; flex: 1; display: flex; flex-direction: column; }
.eco-card .card-title {
    font-family: var(--font-display);
    font-size: 1.2rem;
    margin-bottom: .5rem;
    color: var(--c-ink);
}
.eco-card .card-meta {
    font-size: .82rem;
    color: var(--c-muted);
    margin-bottom: .6rem;
    display: flex; gap: 10px; flex-wrap: wrap;
}
.eco-card .card-meta i { color: var(--c-primary); }
.eco-card .card-text { color: var(--c-muted); flex: 1; }
.eco-card .card-link {
    margin-top: auto;
    font-weight: 600;
    color: var(--c-primary-dark);
    align-self: flex-start;
}
.eco-card .card-link:hover { color: var(--c-accent); }

/* ---------- Team ---------- */
.team-card {
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform .2s, box-shadow .2s;
    height: 100%;
}
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.team-avatar {
    width: 110px; height: 110px;
    border-radius: 50%;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, var(--c-primary), #6aa974);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-display);
    font-size: 2.2rem;
    font-weight: 700;
    border: 4px solid #fff;
    box-shadow: var(--shadow-md);
    background-size: cover;
    background-position: center;
}
.team-card h5 { margin-bottom: 4px; font-size: 1.1rem; }
.team-card .designation { color: var(--c-primary-dark); font-weight: 600; font-size: .92rem; }
.team-card .affiliation { color: var(--c-muted); font-size: .85rem; margin-top: 4px; }

/* ---------- Gallery ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius-sm);
    position: relative;
    cursor: pointer;
    background: var(--c-primary-light);
}
.gallery-item img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .35s ease;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item::after {
    content: "\F4D1"; /* bootstrap icon zoom-in */
    font-family: 'bootstrap-icons';
    position: absolute; inset: 0;
    background: rgba(31,74,38,.45);
    color: #fff; font-size: 1.6rem;
    display: flex; align-items: center; justify-content: center;
    opacity: 0; transition: opacity .2s;
}
.gallery-item:hover::after { opacity: 1; }

/* ---------- Stats ---------- */
.stat-tile {
    background: var(--c-card);
    border: 1px solid var(--c-border);
    border-radius: var(--radius);
    padding: 28px 22px;
    text-align: center;
    height: 100%;
}
.stat-tile .num {
    font-family: var(--font-display);
    font-size: 2.4rem;
    color: var(--c-primary-dark);
    font-weight: 700;
    line-height: 1;
}
.stat-tile .label {
    margin-top: 8px;
    color: var(--c-muted);
    text-transform: uppercase;
    font-size: .78rem;
    letter-spacing: 1.5px;
}

/* ---------- Footer ---------- */
footer.site-footer {
    background: linear-gradient(180deg, #1f4a26 0%, #14361b 100%);
    color: #d6ead9;
    padding: 70px 0 30px;
    margin-top: 80px;
}
footer.site-footer h5 {
    color: #fff;
    font-family: var(--font-display);
    margin-bottom: 18px;
}
footer.site-footer a { color: #d6ead9; }
footer.site-footer a:hover { color: var(--c-accent); }
footer.site-footer .footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    margin-top: 50px;
    padding-top: 22px;
    font-size: .88rem;
    color: rgba(255,255,255,.7);
}

/* ---------- Forms ---------- */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1px solid var(--c-border);
    padding: .65rem .9rem;
    background: #fff;
}
.form-control:focus, .form-select:focus {
    border-color: var(--c-primary);
    box-shadow: 0 0 0 .2rem rgba(47,107,58,.15);
}
.btn-primary {
    background: var(--c-primary);
    border-color: var(--c-primary);
}
.btn-primary:hover { background: var(--c-primary-dark); border-color: var(--c-primary-dark); }
.btn-accent {
    background: var(--c-accent);
    color: #fff;
    border: none;
}
.btn-accent:hover { background: #a85d2c; color: #fff; }

/* ---------- Misc ---------- */
.page-header {
    background:
      radial-gradient(at 80% 0%, rgba(201,116,59,.18), transparent 50%),
      radial-gradient(at 0% 100%, rgba(47,107,58,.20), transparent 50%),
      var(--c-bg);
    padding: 70px 0 50px;
    border-bottom: 1px solid var(--c-border);
}
.page-header h1 { margin-bottom: 8px; }
.page-header .breadcrumb { margin-bottom: 0; background: transparent; padding: 0; }
.page-header .breadcrumb a { color: var(--c-muted); }
.page-header .breadcrumb .active { color: var(--c-primary-dark); }

.prose img { max-width: 100%; height: auto; border-radius: var(--radius-sm); }
.prose h2, .prose h3 { margin-top: 1.6em; }
.prose blockquote {
    border-left: 4px solid var(--c-accent);
    padding: 10px 18px;
    background: var(--c-accent-soft);
    color: var(--c-ink);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    margin: 1.4em 0;
}

@media (max-width: 768px) {
    .hero { padding: 70px 0 60px; }
    .section { padding: 60px 0; }
}
