/* ==========================================================================
   Evermont Group Corp. V2 — Bootstrap 5.3 Corporate Theme
   Brand Palette: Deep Forest Green (#007f00), Emerald (#4cb034), Warm Gold (#f5c400)
   ========================================================================== */

:root {
    --ev-primary: #007f00;
    --ev-primary-dark: #005b00;
    --ev-primary-light: #4cb034;
    --ev-primary-soft: #eef7ee;
    --ev-accent: #f5c400;
    --ev-ink: #16241b;
    --ev-muted: #526358;
    --ev-border: #dce6dd;
    --ev-surface: #ffffff;
    --ev-surface-alt: #f5f8f5;
    --ev-shadow-sm: 0 4px 14px rgba(15, 34, 21, 0.06);
    --ev-shadow-md: 0 12px 32px rgba(15, 34, 21, 0.09);

    /* Bootstrap 5.3 variable overrides */
    --bs-primary: #007f00;
    --bs-primary-rgb: 0, 127, 0;
    --bs-link-color: #006b1b;
    --bs-link-hover-color: #004d13;
    --bs-body-color: var(--ev-ink);
    --bs-body-bg: #ffffff;
    --bs-font-sans-serif: "Segoe UI", "Inter", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--ev-ink);
    background-color: var(--ev-surface);
    overflow-x: hidden;
}

main {
    flex: 1 0 auto;
}

/* Brand Buttons */
.btn-ev-primary {
    background-color: var(--ev-primary);
    border-color: var(--ev-primary);
    color: #ffffff;
    font-weight: 600;
    padding: 0.65rem 1.4rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.btn-ev-primary:hover,
.btn-ev-primary:focus-visible {
    background-color: var(--ev-primary-dark);
    border-color: var(--ev-primary-dark);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 127, 0, 0.26);
}

.btn-ev-outline {
    background-color: #eef7ee;
    border: 1.5px solid var(--ev-primary);
    color: var(--ev-primary-dark);
    font-weight: 600;
    padding: 0.6rem 1.3rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.btn-ev-outline:hover,
.btn-ev-outline:focus-visible {
    background-color: var(--ev-primary);
    color: #ffffff;
}

/* High-contrast saturated alerts */
.alert-ev-success {
    background-color: #0f6b2f;
    border: none;
    color: #ffffff;
    font-weight: 600;
    border-radius: 0.65rem;
}

.alert-ev-danger {
    background-color: #b91c1c;
    border: none;
    color: #ffffff;
    font-weight: 600;
    border-radius: 0.65rem;
}

.alert-ev-info {
    background-color: #1e4b7a;
    border: none;
    color: #ffffff;
    font-weight: 600;
    border-radius: 0.65rem;
}

/* ==========================================================================
   Navigation Bar & Offcanvas
   ========================================================================== */
.ev-navbar {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--ev-border);
    transition: box-shadow 0.25s ease, background-color 0.25s ease;
    z-index: 1030;
}

.ev-navbar.is-scrolled {
    box-shadow: 0 8px 26px rgba(15, 34, 21, 0.08);
}

.ev-navbar__logo {
    height: 44px;
    width: auto;
    display: block;
    transform-origin: left center;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), filter 0.25s ease;
    will-change: transform;
}

.ev-navbar .navbar-brand:hover .ev-navbar__logo,
.ev-navbar .navbar-brand:focus-visible .ev-navbar__logo {
    transform: scale(1.08);
    filter: drop-shadow(0 4px 10px rgba(0, 127, 0, 0.14));
}

@media (prefers-reduced-motion: reduce) {
    .ev-navbar__logo {
        transition: none;
    }

    .ev-navbar .navbar-brand:hover .ev-navbar__logo,
    .ev-navbar .navbar-brand:focus-visible .ev-navbar__logo {
        transform: none;
    }
}

@media (min-width: 992px) {
    .ev-navbar__logo {
        height: 50px;
    }
}

.ev-navbar .nav-link {
    color: var(--ev-ink);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.65rem 0.95rem;
    border-radius: 0.45rem;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.ev-navbar .nav-link:hover,
.ev-navbar .nav-link:focus,
.ev-navbar .nav-link.active {
    color: var(--ev-primary);
    background-color: var(--ev-primary-soft);
}

.ev-navbar .dropdown-menu {
    border: 1px solid var(--ev-border);
    border-top: 3px solid var(--ev-primary);
    border-radius: 0.65rem;
    box-shadow: var(--ev-shadow-md);
    padding: 0.45rem;
    min-width: 16rem;
}

.ev-navbar .dropdown-item {
    border-radius: 0.4rem;
    padding: 0.55rem 0.85rem;
    font-weight: 500;
    font-size: 0.92rem;
    color: var(--ev-ink);
}

.ev-navbar .dropdown-item:hover,
.ev-navbar .dropdown-item:focus,
.ev-navbar .dropdown-item.active {
    background-color: var(--ev-primary-soft);
    color: var(--ev-primary-dark);
    font-weight: 600;
}

@media (min-width: 992px) {
    .ev-navbar .nav-item.dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
    }
}

/* ==========================================================================
   Page Header Banner
   ========================================================================== */
.ev-page-header {
    position: relative;
    background-color: #13301c;
    background-size: cover;
    background-position: center;
    color: #ffffff;
    padding: 3.5rem 0 3rem;
    overflow: hidden;
}

.ev-page-header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(115deg, rgba(10, 38, 18, 0.88) 0%, rgba(0, 100, 22, 0.72) 60%, rgba(12, 34, 20, 0.85) 100%);
}

.ev-page-header__inner {
    position: relative;
    z-index: 1;
}

.ev-page-header__title {
    font-size: clamp(1.75rem, 3.2vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.015em;
    margin-bottom: 0.65rem;
}

.ev-breadcrumb {
    --bs-breadcrumb-divider-color: rgba(255, 255, 255, 0.55);
    --bs-breadcrumb-item-active-color: #ffeb3b;
    margin-bottom: 0;
    font-size: 0.9rem;
}

.ev-breadcrumb a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
}

.ev-breadcrumb a:hover {
    color: #ffeb3b;
    text-decoration: underline;
}

/* ==========================================================================
   Content Sections, Cards & Sidebar
   ========================================================================== */
.ev-section {
    padding: 3.25rem 0;
}

.ev-section--alt {
    background-color: var(--ev-surface-alt);
}

.ev-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--ev-primary);
    background: var(--ev-primary-soft);
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.ev-card {
    background: var(--ev-surface);
    border: 1px solid var(--ev-border);
    border-radius: 0.85rem;
    box-shadow: var(--ev-shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.ev-card--hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--ev-shadow-md);
    border-color: rgba(0, 127, 0, 0.35);
}

.ev-icon-badge {
    width: 48px;
    height: 48px;
    border-radius: 0.75rem;
    background: var(--ev-primary-soft);
    color: var(--ev-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.ev-deco-panel {
    position: relative;
    padding-left: 1.25rem;
    border-left: 4px solid var(--ev-primary);
}

.ev-check-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.ev-check-list li {
    position: relative;
    padding: 0.45rem 0 0.45rem 1.75rem;
    color: var(--ev-ink);
    line-height: 1.6;
}

.ev-check-list li::before {
    content: "\F26A";
    font-family: "bootstrap-icons";
    position: absolute;
    left: 0;
    top: 0.48rem;
    color: var(--ev-primary);
    font-size: 1rem;
}

/* Sidebar Navigation */
.ev-sidebar {
    position: sticky;
    top: 5.5rem;
}

.ev-sidebar__card {
    border: 1px solid var(--ev-border);
    border-radius: 0.85rem;
    overflow: hidden;
    background: #ffffff;
    box-shadow: var(--ev-shadow-sm);
}

.ev-sidebar__header {
    background: linear-gradient(135deg, #007f00, #165e24);
    color: #ffffff;
    padding: 1rem 1.2rem;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.ev-sidebar__link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1.15rem;
    color: var(--ev-ink);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.94rem;
    border-bottom: 1px solid var(--ev-border);
    transition: background-color 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}

.ev-sidebar__link:last-child {
    border-bottom: none;
}

.ev-sidebar__link:hover,
.ev-sidebar__link.active {
    background-color: var(--ev-primary-soft);
    color: var(--ev-primary-dark);
    font-weight: 600;
    padding-left: 1.4rem;
}

/* Mobile horizontal pills sidebar */
.ev-mobile-subnav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.5rem;
    padding-bottom: 0.4rem;
    -webkit-overflow-scrolling: touch;
}

.ev-mobile-subnav__pill {
    flex: 0 0 auto;
    padding: 0.5rem 0.95rem;
    border-radius: 999px;
    border: 1px solid var(--ev-border);
    background: #ffffff;
    color: var(--ev-ink);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
}

.ev-mobile-subnav__pill.active,
.ev-mobile-subnav__pill:hover {
    background: var(--ev-primary);
    border-color: var(--ev-primary);
    color: #ffffff;
}

/* ==========================================================================
   About Material Tiles
   ========================================================================== */
.ev-material-tile {
    position: relative;
    aspect-ratio: 4 / 3;
    border-radius: 0.75rem;
    overflow: hidden;
    background-color: #dce6dd;
    box-shadow: var(--ev-shadow-sm);
}

.ev-material-tile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.ev-material-tile:hover img {
    transform: scale(1.07);
}

.ev-material-tile__label {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 0.55rem 0.75rem;
    background: linear-gradient(180deg, rgba(10, 30, 15, 0) 0%, rgba(10, 30, 15, 0.86) 100%);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.9rem;
    text-align: center;
}

/* ==========================================================================
   Foundation Responsive Timeline
   ========================================================================== */
.ev-timeline {
    position: relative;
    padding-left: 2rem;
}

.ev-timeline::before {
    content: "";
    position: absolute;
    left: 0.6rem;
    top: 0.5rem;
    bottom: 0.5rem;
    width: 3px;
    background: linear-gradient(180deg, var(--ev-primary) 0%, #b5d6b7 100%);
    border-radius: 999px;
}

.ev-timeline__item {
    position: relative;
    margin-bottom: 1.75rem;
}

.ev-timeline__item:last-child {
    margin-bottom: 0;
}

.ev-timeline__dot {
    position: absolute;
    left: -1.82rem;
    top: 1.35rem;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ffffff;
    border: 4px solid var(--ev-primary);
    box-shadow: 0 0 0 4px rgba(0, 127, 0, 0.14);
}

.ev-timeline__item.is-highlight .ev-timeline__dot {
    background: var(--ev-accent);
    border-color: var(--ev-primary-dark);
}

.ev-timeline__period {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: #ffffff;
    background: var(--ev-primary);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 0.85rem;
}

.ev-timeline__item.is-highlight .ev-timeline__card {
    border-color: var(--ev-primary);
    background: linear-gradient(135deg, #ffffff 0%, #f1faf1 100%);
}

/* ==========================================================================
   Gallery Grid & Lightbox
   ========================================================================== */
.ev-gallery-card {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: #102016;
    border-radius: 0.75rem;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    cursor: pointer;
    box-shadow: var(--ev-shadow-sm);
}

.ev-gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease, opacity 0.3s ease;
}

.ev-gallery-card__overlay {
    position: absolute;
    inset: 0;
    background: rgba(10, 38, 18, 0.52);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    opacity: 0;
    transition: opacity 0.25s ease;
    padding: 1rem;
    text-align: center;
}

.ev-gallery-card:hover img,
.ev-gallery-card:focus-visible img {
    transform: scale(1.06);
}

.ev-gallery-card:hover .ev-gallery-card__overlay,
.ev-gallery-card:focus-visible .ev-gallery-card__overlay {
    opacity: 1;
}

/* ==========================================================================
   Media Frames & Slogan Banner
   ========================================================================== */
.ev-media-frame {
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--ev-shadow-sm);
    background: #e9efe9;
}

.ev-media-frame img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

.ev-slogan-banner {
    background: linear-gradient(120deg, #0c3318 0%, #007f00 100%);
    color: #ffffff;
    border-radius: 1rem;
    padding: 2.4rem 1.75rem;
    text-align: center;
    box-shadow: var(--ev-shadow-md);
}

/* ==========================================================================
   Contact Form & Captcha
   ========================================================================== */
.ev-captcha-box {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.ev-captcha-img {
    height: 46px;
    width: 140px;
    border-radius: 0.45rem;
    border: 1px solid var(--ev-border);
    background: #f4f8f4;
    cursor: pointer;
    object-fit: contain;
}

/* ==========================================================================
   Footer & Back-to-Top
   ========================================================================== */
.ev-footer {
    background: #102116;
    color: rgba(255, 255, 255, 0.82);
    border-top: 4px solid var(--ev-primary);
}

.ev-footer a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s ease;
}

.ev-footer a:hover {
    color: var(--ev-accent);
}

.ev-footer__heading {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 0.9rem;
}

.ev-back-to-top {
    position: fixed;
    right: 1.25rem;
    bottom: 1.5rem;
    z-index: 1020;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--ev-primary);
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 127, 0, 0.35);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background-color 0.2s ease;
}

.ev-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ev-back-to-top:hover {
    background: var(--ev-primary-dark);
}
