/* =========================================================
   Barangay Ilayang Nangka — Inventory & Reservation System
   Identity: clean white ledger paper with the barangay's own
   forest-green identity carried throughout.
   ========================================================= */

:root {
    --ink:         #1f2a20;
    --ink-soft:     #56635a;
    --paper:       #ffffff;
    --paper-deep:  #eef6ee;
    --forest:      #1e6b34;
    --forest-deep: #123d1e;
    --forest-mid:  #2f8a44;
    --sunset:      #2f8a44;
    --seal-red:    #1e6b34;
    --line:        #d7e6da;
    --radius: 4px;

    /* Override Bootstrap's own defaults so nothing can fall back
       to its built-in blue (#0d6efd) — links, checkboxes, focus
       rings, .btn-primary, badges, spinners, etc. all read these. */
    --bs-primary: #1e6b34;
    --bs-primary-rgb: 30, 107, 52;
    --bs-link-color: #1e6b34;
    --bs-link-color-rgb: 30, 107, 52;
    --bs-link-hover-color: #123d1e;
    --bs-link-hover-color-rgb: 18, 61, 30;
}

a { color: var(--forest); }
a:hover { color: var(--forest-deep); }

.btn-primary {
    background-color: var(--forest);
    border-color: var(--forest);
}
.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--forest-deep);
    border-color: var(--forest-deep);
}

.form-check-input:checked {
    background-color: var(--forest);
    border-color: var(--forest);
}
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: var(--forest);
    box-shadow: 0 0 0 .25rem rgba(30, 107, 52, .2);
}

* { box-sizing: border-box; }

body {
    font-family: 'Public Sans', 'Segoe UI', Roboto, Arial, sans-serif;
    color: var(--ink);
    background: var(--paper);
}

h1, h2, h3, .display-font {
    font-family: 'Fraunces', Georgia, serif;
}

.mono, .ref-code, .ledger-qty {
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
}

a { color: inherit; }

/* ---------- Navbar ---------- */
.brand-navbar {
    background: rgba(22, 54, 19, 0.94);
    backdrop-filter: blur(6px);
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-navbar .navbar-brand {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 600;
    letter-spacing: .01em;
}
.brand-navbar .nav-link { color: rgba(255,255,255,.82); font-weight: 500; font-size: .93rem; }
.brand-navbar .nav-link:hover { color: #fff; }

/* Failsafe: logo can never balloon, even if this stylesheet
   fails to load — see inline style mirrored in markup. */
.navbar-logo {
    width: 34px !important;
    height: 34px !important;
    object-fit: cover;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.4);
    flex: 0 0 auto;
}

.btn-gold {
    background: #ffffff;
    border-color: #ffffff;
    color: var(--forest-deep);
    font-weight: 600;
}
.btn-gold:hover { background: var(--forest-mid); border-color: var(--forest-mid); color: #fff; }
.btn-navy {
    background: var(--forest);
    border-color: var(--forest);
    color: #fff;
    font-weight: 600;
}
.btn-navy:hover { background: var(--forest-deep); border-color: var(--forest-deep); color: #fff; }
.btn-outline-light:hover { color: var(--forest-deep); }

/* ---------- Hero (letterhead + seal) ---------- */
.hero {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    background: var(--forest-deep);
    color: #ffffff;
    overflow: hidden;
}
.hero::before {
    /* faint topographic rule lines, like a surveyor's map */
    content: '';
    position: absolute;
    inset: 0;
    background-image: repeating-linear-gradient(
        transparent, transparent 38px, rgba(255,255,255,.035) 39px
    );
}
.hero-content { position: relative; z-index: 2; padding-top: 90px; width: 100%; }

.hero-grid {
    display: flex;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}
.hero-text { flex: 1 1 420px; }
.hero-eyebrow {
    font-family: 'IBM Plex Mono', monospace;
    font-size: .78rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--sunset);
    margin-bottom: 1rem;
}
.hero h1 {
    font-size: 2.7rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1.1rem;
}
.hero p { font-size: 1.05rem; color: rgba(255,255,255,.78); max-width: 520px; margin-bottom: 2rem; }


.hero-rule {
    border: none;
    border-top: 1px solid rgba(255,255,255,.2);
    margin: 1.6rem 0;
    max-width: 520px;
}

/* ---------- Hero map card (replaces the seal medallion slot) ---------- */
.hero-map-card {
    flex: 1 1 420px;
    max-width: 520px;
    position: relative;
    z-index: 2;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.14);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 20px 45px rgba(0,0,0,.25);
}
.hero-map-caption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .4rem;
    padding: .75rem 1.1rem;
    background: rgba(255,255,255,.06);
    border-bottom: 1px solid rgba(255,255,255,.14);
    font-family: 'IBM Plex Mono', monospace;
    font-size: .74rem;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: rgba(255,255,255,.82);
}
.hero-map-caption a {
    color: var(--sunset);
    text-decoration: none;
    font-weight: 600;
}
.hero-map-caption a:hover { color: #fff; text-decoration: underline; }
.hero-map-frame {
    display: block;
    width: 100%;
    height: 260px;
    border: 0;
    filter: saturate(.9) contrast(1.02);
}

/* ---------- Stat strip (record summary) ---------- */
.stat-strip {
    background: var(--paper-deep);
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--line);
    border-top: 3px solid var(--forest);
}
.stat-strip h2 {
    font-weight: 600;
    color: var(--forest-deep);
    margin: 0;
    font-size: 2rem;
}
.stat-strip p {
    margin: 0;
    font-size: .78rem;
    color: var(--ink-soft);
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* ---------- Sections ---------- */
.section { padding: 5rem 0; }
.bg-light-blue { background: var(--paper-deep); }
.eyebrow {
    font-family: 'IBM Plex Mono', monospace;
    color: var(--seal-red);
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    font-size: .78rem;
}
.section-title { font-weight: 600; color: var(--forest-deep); margin-bottom: 1rem; }
.lead-text { font-size: 1.05rem; color: var(--ink-soft); max-width: 760px; }

/* ---------- Availability ledger ---------- */
.ledger-wrap {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}
.ledger-caption {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .85rem 1.25rem;
    background: var(--paper-deep);
    border-bottom: 1px solid var(--line);
    font-family: 'IBM Plex Mono', monospace;
    font-size: .72rem;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.availability-table { margin: 0; }
.availability-table thead th {
    background: var(--forest-deep);
    color: #ffffff;
    font-weight: 600;
    font-size: .82rem;
    letter-spacing: .03em;
    border: none;
}
.availability-table td, .availability-table th { vertical-align: middle; }
.availability-table tbody tr:nth-child(odd) { background: #f5faf5; }
.availability-table .ledger-qty {
    font-weight: 600;
    color: var(--forest-deep);
    background: transparent;
    border: 1px solid var(--forest);
    padding: .3rem .6rem;
    border-radius: var(--radius);
    display: inline-block;
}

/* ---------- Contact ---------- */
.contact-icon {
    width: 46px; height: 46px;
    border-radius: 50%;
    background: var(--paper);
    border: 1px solid var(--line);
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto .75rem;
    color: var(--forest);
}

/* ---------- Footer ---------- */
.footer {
    background: var(--forest-deep);
    color: rgba(255,255,255,.7);
    padding: 1.5rem 0;
    font-size: .85rem;
    border-top: 3px solid var(--sunset);
}
.footer a { color: rgba(255,255,255,.7); text-decoration: none; margin-left: 1rem; }
.footer a:hover { color: #fff; }

/* =========================================================
   Mobile navbar — collapsed menu
   ========================================================= */
.brand-navbar .navbar-collapse {
    background: var(--forest-deep);
    margin: 0 -.75rem;
    padding: .5rem .75rem 1.1rem;
}
.brand-navbar .navbar-nav {
    gap: .15rem;
}
.brand-navbar .nav-link {
    padding: .65rem .25rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-navbar .navbar-nav .nav-item:last-child .nav-link {
    border-bottom: none;
}
.brand-navbar .navbar-toggler {
    border: none;
    padding: .35rem .5rem;
}
.brand-navbar .navbar-toggler:focus {
    box-shadow: 0 0 0 .2rem rgba(255,255,255,.25);
}
.brand-navbar .btn.btn-gold {
    display: block;
    width: 100%;
    text-align: center;
}

/* =========================================================
   Responsive breakpoints
   ========================================================= */

/* ---- Tablet / small desktop ---- */
@media (max-width: 991.98px) {
    .hero { min-height: auto; }
    .hero-content { padding-top: 96px; padding-bottom: 3rem; }
    .section { padding: 3.5rem 0; }
}

/* ---- Phones ---- */
@media (max-width: 767.98px) {
    body { font-size: .96rem; }

    /* Navbar */
    .brand-navbar .navbar-brand {
        font-size: 1rem;
        line-height: 1.25;
    }

    /* Hero */
    .hero-content { padding-top: 88px; }
    .hero h1 { font-size: 1.7rem; margin-bottom: .85rem; }
    .hero-eyebrow { font-size: .7rem; }
    .hero p { font-size: .95rem; margin-bottom: 1.5rem; }
    .hero-grid { flex-direction: column-reverse; text-align: center; gap: 1.75rem; }
    .hero-text { text-align: left; flex-basis: auto; width: 100%; }
    .hero-rule { margin: 1.2rem auto; }
    .hero-text .d-flex { justify-content: center; }
    .hero-map-card { max-width: none; }
    .hero-map-caption { font-size: .66rem; padding: .6rem .85rem; }
    .hero-map-frame { height: 200px; }

    /* Stat strip */
    .stat-strip { padding: 1.25rem 0; }
    .stat-strip h2 { font-size: 1.5rem; }
    .stat-strip p { font-size: .68rem; }
    .stat-strip .row.g-3 > div { margin-bottom: .35rem; }

    /* Sections */
    .section { padding: 2.75rem 0; }
    .section-title { font-size: 1.5rem; }
    .lead-text { font-size: .95rem; }

    /* Availability ledger */
    .ledger-caption { flex-direction: column; align-items: flex-start; gap: .2rem; padding: .75rem 1rem; }
    .availability-table { font-size: .85rem; }
    .availability-table thead th { font-size: .72rem; padding: .55rem .5rem; }
    .availability-table td { padding: .55rem .5rem; }
    .availability-table .ledger-qty { font-size: .8rem; padding: .2rem .5rem; }

    .text-center .btn-lg { width: 100%; }

    /* Contact */
    .contact-icon { width: 40px; height: 40px; }

    /* Footer */
    .footer { text-align: center; }
    .footer .container { flex-direction: column; gap: .75rem; }
    .footer .d-flex { flex-wrap: wrap; justify-content: center; gap: .5rem !important; }
    .footer a { margin-left: 0; }

    /* Reservation modal */
    .modal-dialog { margin: .5rem; }
    .modal-body { padding: 1rem; }
    .modal-body .row.g-3 { row-gap: .85rem !important; }
    .modal-footer { flex-wrap: wrap; }
    .modal-footer .btn { flex: 1 1 auto; }
}

/* ---- Small phones ---- */
@media (max-width: 400px) {
    .hero h1 { font-size: 1.45rem; }
    .stat-strip h2 { font-size: 1.3rem; }
}