/* ============================================================
   NaijaVibes – Main Stylesheet
   Colours: Deep Green #1B4A2E | Medium Green #2D6A4F | Gold #C8860A
   ============================================================ */

/* ── CSS Variables ───────────────────────────────────────── */
:root {
    --nv-green:        #1B4A2E;
    --nv-green-mid:    #2D6A4F;
    --nv-gold:         #C8860A;
    --nv-gold-light:   #F0B429;
    --nv-cream:        #FBF8F0;
    --nv-dark:         #1a1a1a;
    --nv-text:         #333333;

    /* Bootstrap overrides */
    --bs-primary:      #1B4A2E;
    --bs-primary-rgb:  27, 74, 46;
    --bs-link-color:   #1B4A2E;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.7;
    color: var(--nv-text);
    background: #fff;
}

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

/* ── Bootstrap Primary Override ─────────────────────────── */
.bg-primary          { background-color: var(--nv-green) !important; }
.text-primary        { color: var(--nv-green) !important; }
.btn-primary         { background-color: var(--nv-green); border-color: var(--nv-green); }
.btn-primary:hover,
.btn-primary:focus   { background-color: var(--nv-green-mid); border-color: var(--nv-green-mid); }
.btn-outline-primary { color: var(--nv-green); border-color: var(--nv-green); }
.btn-outline-primary:hover { background-color: var(--nv-green); border-color: var(--nv-green); }

/* ── Navbar ──────────────────────────────────────────────── */
.navbar {
    background-color: var(--nv-green) !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    padding: 0.5rem 1rem;
}

.navbar-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: #fff !important;
    max-width: calc(100vw - 80px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-brand img {
    height: 38px;
    width: auto;
    flex-shrink: 0;
}

.navbar-brand span { flex-shrink: 1; min-width: 0; }

.navbar-nav .nav-link {
    color: rgba(255,255,255,0.85) !important;
    padding: 0.5rem 0.75rem;
    font-weight: 500;
    border-radius: 4px;
    transition: background 0.2s;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--nv-gold-light) !important;
    background: rgba(255,255,255,0.1);
}

/* ── Hero Section ────────────────────────────────────────── */
.hero-section {
    background: linear-gradient(135deg, var(--nv-green) 0%, var(--nv-gold) 100%);
    color: #fff;
    padding: 80px 0;
}

.hero-section h1 {
    font-size: 2.8rem;
    font-weight: 800;
    line-height: 1.2;
    text-shadow: 1px 2px 6px rgba(0,0,0,0.25);
}

.hero-section .lead {
    font-size: 1.15rem;
    opacity: 0.95;
}

.hero-section .btn-light {
    color: var(--nv-green);
    font-weight: 700;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
    border-radius: 6px;
    padding: 10px 24px;
    font-weight: 600;
    transition: all 0.25s ease;
    min-height: 44px; /* touch-friendly */
}

.btn-lg {
    font-size: 1.05rem;
    padding: 13px 32px;
    min-height: 50px;
}

.btn-sm {
    padding: 7px 16px;
    min-height: 36px;
}

.btn-gold {
    background-color: var(--nv-gold);
    border-color: var(--nv-gold);
    color: #fff;
    font-weight: 700;
}

.btn-gold:hover { background-color: #a5700a; border-color: #a5700a; color: #fff; }

/* ── Section Spacing ─────────────────────────────────────── */
section { padding: 70px 0; }
section.py-5 { padding: 60px 0; }

/* ── Impact Cards ────────────────────────────────────────── */
.impact-card {
    padding: 28px 20px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 18px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.impact-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.13);
}

.impact-card h3 {
    font-weight: 800;
    color: var(--nv-green);
    margin-bottom: 8px;
}

/* ── Event & General Cards ───────────────────────────────── */
.card {
    border: none;
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.13);
}

.card-title { font-weight: 700; color: var(--nv-dark); }

.event-card .card-img-top {
    height: 220px;
    object-fit: cover;
    object-position: top center;
}

/* ── Featured Event Banner ───────────────────────────────── */
.featured-event-banner {
    background: var(--nv-cream);
    border-left: 6px solid var(--nv-gold);
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0,0,0,0.1);
}

.featured-event-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    min-height: 280px;
}

.featured-event-banner .event-info {
    padding: 2rem;
}

.featured-badge {
    background: var(--nv-gold);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 0.75rem;
}

/* ── Gallery ─────────────────────────────────────────────── */
.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    border-radius: 10px;
}

.gallery-item img { transition: transform 0.35s ease; }
.gallery-item:hover img { transform: scale(1.08); }

.gallery-overlay { opacity: 0; transition: opacity 0.3s ease; }
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ── Forms ───────────────────────────────────────────────── */
.form-control {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px 14px;
    font-size: 1rem;
    min-height: 44px;
}

.form-control:focus {
    border-color: var(--nv-green);
    box-shadow: 0 0 0 0.2rem rgba(27, 74, 46, 0.2);
}

.form-label {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--nv-dark);
}

/* ── Footer ──────────────────────────────────────────────── */
footer {
    background: var(--nv-dark);
    margin-top: 0;
    padding: 60px 0 30px;
}

footer a { transition: color 0.25s ease; }
footer a:hover { color: var(--nv-gold-light) !important; }

.footer-brand { color: var(--nv-gold-light); font-weight: 700; font-size: 1.2rem; }

footer .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.7) !important;
    margin-right: 8px;
    transition: background 0.25s, color 0.25s;
}

footer .social-icons a:hover {
    background: var(--nv-gold);
    color: #fff !important;
}

/* ── Modal ───────────────────────────────────────────────── */
.modal-content { border: none; border-radius: 14px; overflow: hidden; }

.modal-header {
    background: linear-gradient(135deg, var(--nv-green), var(--nv-gold));
    color: #fff;
    border: none;
    padding: 1rem 1.5rem;
}

.modal-header .btn-close { filter: invert(1); }

/* ── Utility ─────────────────────────────────────────────── */
.text-gradient {
    background: linear-gradient(135deg, var(--nv-green) 0%, var(--nv-gold) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gold  { color: var(--nv-gold) !important; }
.text-white-50 { color: rgba(255,255,255,0.55); }
.text-white-50:hover { color: #fff; }

.shadow-sm { box-shadow: 0 2px 8px rgba(0,0,0,0.07); }
.shadow    { box-shadow: 0 6px 24px rgba(0,0,0,0.12); }
.rounded-lg { border-radius: 12px; }

/* ── Alerts ──────────────────────────────────────────────── */
.alert { border: none; border-radius: 8px; }
.alert-success { background: #d4edda; color: #1B4A2E; }
.alert-danger  { background: #f8d7da; color: #721c24; }
.alert-info    { background: #d1ecf1; color: #0c5460; }

/* ── Scrollbar ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--nv-green); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--nv-gold); }

/* ── Fade-in Animation ───────────────────────────────────── */
.fade-in {
    animation: fadeIn 0.55s ease-in-out;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* ── Large tablets / small desktops (≤ 1024px) ──────────── */
@media (max-width: 1024px) {
    .hero-section h1 { font-size: 2.4rem; }
    section { padding: 60px 0; }
}

/* ── iPad / tablets (≤ 768px) ───────────────────────────── */
@media (max-width: 768px) {
    .hero-section {
        padding: 50px 0 40px;
        text-align: center;
    }

    .hero-section h1 { font-size: 2rem; }
    .hero-section .lead { font-size: 1rem; }

    .hero-section .d-flex.gap-2 {
        flex-direction: column;
        align-items: center;
    }

    .hero-section .btn { width: 100%; max-width: 300px; }

    /* Hide hero image on tablet and below to save space */
    .hero-logo-col { display: none !important; }

    section { padding: 40px 0; }
    section.py-5 { padding: 36px 0; }

    .display-4 { font-size: 1.9rem; }
    .display-5 { font-size: 1.6rem; }

    .impact-card { padding: 20px 16px; margin-bottom: 1rem; }

    .featured-event-banner .event-info { padding: 1.25rem; }

    .navbar-brand { font-size: 1.1rem; }
    .navbar-brand img { height: 32px; }

    footer { padding: 40px 0 20px; }
}

/* ── Mobile phones (≤ 576px) ────────────────────────────── */
@media (max-width: 576px) {
    .hero-section { padding: 36px 0 30px; }
    .hero-section h1 { font-size: 1.65rem; }
    .hero-section .lead { font-size: 0.95rem; }

    section { padding: 30px 0; }

    .btn-lg { font-size: 0.95rem; padding: 11px 20px; }
    .display-4 { font-size: 1.65rem; }
    .display-5 { font-size: 1.4rem; }

    /* Full-width cards on phone */
    .col-md-4, .col-lg-4 { width: 100%; }

    .impact-card { padding: 16px 14px; }

    .navbar-brand img { height: 28px; }
    .navbar-brand { font-size: 1rem; }

    .featured-event-banner img { min-height: 220px; }

    /* Make tables scroll horizontally */
    .table-responsive { -webkit-overflow-scrolling: touch; }

    /* Admin table font size */
    .table { font-size: 0.88rem; }
    .table th, .table td { padding: 0.5rem 0.4rem; }

    footer .row > div { margin-bottom: 1.5rem; }
}

/* ── Landscape phones ────────────────────────────────────── */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section { padding: 30px 0; }
    .hero-section h1 { font-size: 1.6rem; }
}
