/* ==========================================================================
   e-Granary Frontend Custom Styles
   ========================================================================= */

/* --- Global Custom Tooltip (Wardwatch pattern) --- */
.egr-tooltip {
    position: fixed;
    background: var(--egr-primary);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    z-index: 100000;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    white-space: nowrap;
    max-width: 320px;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    line-height: 1.4;
}
.egr-tooltip.is-visible {
    opacity: 1;
}
.egr-tooltip::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -5px;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--egr-primary);
    border-bottom: 0;
}
.egr-tooltip.egr-tooltip-below::after {
    bottom: auto;
    top: -5px;
    border-top: 0;
    border-bottom-color: var(--egr-primary);
}

/* --- Variables --- */
:root {
    --egr-primary: #2d6a4f;
    --egr-primary-dark: #1b4332;
    --egr-primary-light: #52b788;
    --egr-accent: #6592e6;
    --egr-dark: #232323;
    --egr-gray: #6c757d;
    --egr-light: #f8f9fa;
    --egr-white: #ffffff;
    --egr-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --egr-shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
    --egr-transition: 0.3s ease;
    --egr-radius: 8px;
}

/* --- Accessibility: Skip Link --- */
.egr-skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    padding: 0.6rem 1.2rem;
    background: var(--egr-primary);
    color: var(--egr-white);
    z-index: 100000;
    text-decoration: none;
    border-radius: 0 0 4px 0;
    font-size: 0.9rem;
    transition: top 0.2s ease;
}
.egr-skip-link:focus {
    top: 0;
}

/* --- Top Utility Bar (Ollmh pattern) --- */
.egr-topbar {
    background: var(--egr-dark);
    color: rgba(255, 255, 255, 0.85);
    max-height: 40px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    font-size: 0.85rem;
}
.egr-topbar.is-hidden {
    max-height: 0;
    opacity: 0;
}
.egr-topbar-inner {
    display: flex;
    align-items: center;
    max-width: 1140px;
    margin: 0 auto;
    padding: 0.5rem 1rem;
    gap: 1.5rem;
}
.egr-topbar-item {
    white-space: nowrap;
}
.egr-topbar-item i {
    margin-right: 0.3rem;
    color: var(--egr-primary-light);
    transition: transform 0.25s ease, color 0.25s ease;
}
.egr-topbar-item:hover i {
    transform: scale(1.25);
    color: var(--egr-white);
}
.egr-topbar-link {
    color: var(--egr-primary-light);
    text-decoration: none;
    font-weight: 600;
    transition: color var(--egr-transition);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}
.egr-topbar-link:hover {
    color: var(--egr-white);
}
.egr-topbar-link i {
    font-size: 0.8em;
    margin-right: 0;
}
.egr-topbar-link-text {
    text-decoration: none;
    transition: text-decoration var(--egr-transition);
}
.egr-topbar-link:hover .egr-topbar-link-text {
    text-decoration: underline;
    text-underline-offset: 3px;
}
/* Portal / Dashboard / Logout — standout link like Wardwatch Aspirant Portal */
.egr-topbar-portal {
    color: #86efac;
    text-decoration: none;
    font-weight: 600;
    padding: 0.15rem 0.6rem;
    border-radius: 4px;
    background: rgba(134, 239, 172, 0.1);
    transition: all var(--egr-transition);
}
.egr-topbar-portal:hover {
    color: #bbf7d0;
    background: rgba(134, 239, 172, 0.2);
    text-decoration: none;
}
.egr-topbar-spacer {
    flex: 1;
}

/* --- Site Header (Ollmh pattern) --- */
.egr-site-header {
    position: relative;
    z-index: 1000;
    background: var(--egr-white);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}
.egr-site-header.is-fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    animation: egr-header-slide 0.3s ease;
}
@keyframes egr-header-slide {
    from { transform: translateY(-100%); }
    to   { transform: translateY(0); }
}

/* --- Navbar --- */
.egr-navbar {
    padding: 0.5rem 0;
    align-items: center;
}

/* Logo */
.egr-navbar-brand {
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
    transition: transform 0.25s ease;
}
.egr-navbar-brand:hover {
    transform: scale(1.05);
}
.egr-navbar-logo {
    height: 3.2rem;
    width: auto;
    transition: transform 0.25s ease;
}
.egr-navbar-brand:hover .egr-navbar-logo {
    transform: rotate(-3deg);
}

/* Toggler (mobile) */
.egr-navbar-toggler {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 0.5rem 0.6rem;
    background: var(--egr-white);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 40px;
    height: 36px;
}
.egr-navbar-toggler:focus {
    outline: none;
    border-color: var(--egr-primary);
    box-shadow: 0 0 0 0.15rem rgba(45, 106, 79, 0.15);
}
.egr-toggler-bar {
    display: block;
    height: 3px;
    width: 100%;
    background: var(--egr-dark);
    border-radius: 2px;
    transition: all 0.3s ease;
}
.egr-navbar-toggler[aria-expanded="true"] .egr-toggler-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.egr-navbar-toggler[aria-expanded="true"] .egr-toggler-bar:nth-child(2) {
    opacity: 0;
}
.egr-navbar-toggler[aria-expanded="true"] .egr-toggler-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Nav list */
.egr-nav-list {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
}
.egr-nav-link {
    display: block;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--egr-dark) !important;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    transition: color 0.25s ease, background-color 0.25s ease, transform 0.25s ease;
    cursor: pointer;
}
.egr-nav-link:hover,
.egr-nav-link:focus {
    color: var(--egr-primary) !important;
    background: rgba(45, 106, 79, 0.08);
    text-decoration: none;
    transform: translateY(-1px);
}
.egr-nav-link.active {
    color: var(--egr-primary) !important;
    background: rgba(45, 106, 79, 0.1);
    box-shadow: inset 0 -2px 0 var(--egr-primary);
}

/* Mobile nav (below lg breakpoint) */
@media (max-width: 991px) {
    .egr-navbar {
        padding: 0.75rem 0;
    }
    .egr-nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 0.5rem 0;
        border-top: 1px solid #eee;
        margin-top: 0.5rem;
    }
    .egr-nav-link {
        padding: 0.85rem 1rem;
        font-size: 1rem;
        border-radius: 0;
        border-bottom: 1px solid #f0f0f0;
    }
    .egr-nav-link:hover,
    .egr-nav-link:focus {
        background: rgba(45, 106, 79, 0.05);
    }
}

/* Small mobile — ensure logo and toggler don't touch screen edges */
@media (max-width: 576px) {
    .egr-site-header .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    .egr-navbar {
        padding: 0.5rem 0;
    }
    .egr-navbar-brand {
        margin-right: 0;
    }
    .egr-navbar-logo {
        height: 2.6rem;
    }
    .egr-navbar-toggler {
        padding: 0.4rem 0.5rem;
        width: 38px;
        height: 34px;
    }
    .egr-topbar-inner {
        padding: 0.4rem 1rem;
    }
}

/* Extra small mobile — tighter but still breathable */
@media (max-width: 375px) {
    .egr-site-header .container {
        padding-left: 0.875rem;
        padding-right: 0.875rem;
    }
    .egr-navbar-logo {
        height: 2.4rem;
    }
    .egr-navbar-toggler {
        width: 36px;
        height: 32px;
    }
}

/* --- Section Enhancements --- */
.egr-section {
    padding: 4rem 0;
}
.egr-section-title {
    font-weight: 700;
    color: var(--egr-dark);
    letter-spacing: -0.5px;
    font-size: 2rem;
    margin: 0.25rem 0 1rem;
}
.egr-section-tagline {
    font-size: 1.1rem;
    color: var(--egr-gray);
    text-align: center;
    margin-top: 0.5rem;
    font-style: italic;
}
.egr-section-head {
    margin-bottom: 2.5rem;
    text-align: center;
}
.egr-section-text {
    line-height: 1.8;
    color: #555;
    font-size: 1.05rem;
}

/* Eyebrow label (small uppercase tag above section titles) */
.egr-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--egr-primary);
    background: rgba(45, 106, 79, 0.1);
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    margin-bottom: 0.5rem;
}
.egr-eyebrow-light {
    color: var(--egr-primary-light);
    background: rgba(82, 183, 136, 0.15);
}

/* --- Hero --- */
.egr-hero {
    position: relative;
    min-height: calc(100vh - 40px);
    display: flex;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: hidden;
}
.egr-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(35, 35, 35, 0.5) 0%, rgba(35, 35, 35, 0.4) 50%, rgba(35, 35, 35, 0.7) 100%);
    z-index: 1;
}
.egr-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 4rem 0 4rem;
    text-align: center;
}
.egr-hero-text {
    max-width: 720px;
    margin: 0 auto;
}
.egr-hero-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #86efac;
    background: rgba(134, 239, 172, 0.15);
    border: 1px solid rgba(134, 239, 172, 0.3);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    margin-bottom: 1.25rem;
}
.egr-hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    margin: 0 0 1.25rem;
}
.egr-hero-highlight {
    color: #86efac;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}
.egr-hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.3);
    margin: 0 0 2rem;
    max-width: 600px;
}
.egr-hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}
.egr-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    font-size: 0.95rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.25s ease;
    cursor: pointer;
    border: 2px solid transparent;
}
.egr-btn-primary {
    background: var(--egr-primary);
    color: var(--egr-white);
    border-color: var(--egr-primary);
}
.egr-btn-primary:hover {
    background: var(--egr-primary-dark);
    border-color: var(--egr-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(45, 106, 79, 0.4);
    color: var(--egr-white);
    text-decoration: none;
}
.egr-btn-outline {
    background: transparent;
    color: var(--egr-white);
    border-color: rgba(255, 255, 255, 0.5);
}
.egr-btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--egr-white);
    transform: translateY(-2px);
    color: var(--egr-white);
    text-decoration: none;
}

/* Scroll-down indicator */
.egr-hero-scroll {
    position: absolute;
    bottom: 4.5rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    text-decoration: none;
    transition: color 0.25s ease;
    animation: egr-scroll-bounce 2s ease-in-out infinite;
}
.egr-hero-scroll:hover {
    color: var(--egr-white);
    text-decoration: none;
}
@keyframes egr-scroll-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(8px); }
}

/* Gradient transition bar */
.egr-hero-gradient-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--egr-primary), var(--egr-primary-light), var(--egr-primary));
    z-index: 3;
}

/* Entrance animations */
.egr-animate-in {
    opacity: 0;
    transform: translateY(20px);
    animation: egr-fade-slide-up 0.7s ease forwards;
    animation-delay: var(--egr-delay, 0s);
}
@keyframes egr-fade-slide-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero responsive */
@media (max-width: 768px) {
    .egr-hero {
        min-height: 90vh;
        background-attachment: scroll;
    }
    .egr-hero-title {
        font-size: 2rem;
    }
    .egr-hero-subtitle {
        font-size: 1.05rem;
    }
    .egr-hero-cta {
        flex-direction: column;
    }
    .egr-btn {
        width: 100%;
    }
    .egr-hero-scroll {
        display: none;
    }
}

/* --- Who We Are --- */
.egr-who-we-are {
    background: var(--egr-white);
}
.egr-platform-intro {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    align-items: center;
}
.egr-platform-intro-content .egr-section-title {
    margin-top: 0.5rem;
}
.egr-platform-intro-visual {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.egr-intro-stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--egr-light);
    border-radius: var(--egr-radius);
    padding: 1.25rem 1.5rem;
    border-left: 4px solid var(--egr-primary);
    transition: transform var(--egr-transition), box-shadow var(--egr-transition);
}
.egr-intro-stat:hover {
    transform: translateX(4px);
    box-shadow: var(--egr-shadow);
}
.egr-intro-stat i {
    font-size: 1.5rem;
    color: var(--egr-primary);
    flex-shrink: 0;
    transition: transform 0.25s ease;
}
.egr-intro-stat:hover i {
    transform: scale(1.2) rotate(-5deg);
}
.egr-intro-stat-label {
    font-weight: 600;
    color: var(--egr-dark);
    font-size: 1rem;
}
@media (max-width: 768px) {
    .egr-platform-intro {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* --- What We Do --- */
.egr-what-we-do {
    background: var(--egr-light);
}
.egr-what-we-do-card {
    background: var(--egr-white);
    border-radius: 12px;
    padding: 2.5rem;
    box-shadow: var(--egr-shadow);
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    max-width: 900px;
    margin: 0 auto;
    border-top: 4px solid var(--egr-primary);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.egr-what-we-do-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}
.egr-what-we-do-icon {
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--egr-primary), var(--egr-primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--egr-white);
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}
.egr-what-we-do-card:hover .egr-what-we-do-icon {
    transform: scale(1.1) rotate(5deg);
}
.egr-what-we-do-text {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #555;
    margin: 0;
}
@media (max-width: 768px) {
    .egr-what-we-do-card {
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
    }
    .egr-what-we-do-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
    }
}

/* --- How We Do It --- */
.egr-how-we-do {
    background: var(--egr-white);
}
.egr-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}
.egr-service-card {
    background: var(--egr-white);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    transition: transform var(--egr-transition), box-shadow var(--egr-transition), border-color var(--egr-transition);
}
.egr-service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--egr-primary), var(--egr-primary-light));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}
.egr-service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--egr-shadow-hover);
    border-color: transparent;
}
.egr-service-card:hover::before {
    transform: scaleX(1);
}
.egr-service-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--egr-primary);
    opacity: 0.15;
    line-height: 1;
    margin-bottom: 0.75rem;
    transition: opacity var(--egr-transition);
}
.egr-service-card:hover .egr-service-number {
    opacity: 0.3;
}
.egr-service-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--egr-dark);
    margin-bottom: 0.5rem;
}
.egr-service-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--egr-gray);
    margin: 0;
}
@media (max-width: 768px) {
    .egr-services-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Metrics Counter Section --- */
.egr-metrics-section {
    background: linear-gradient(135deg, var(--egr-primary-dark) 0%, var(--egr-primary) 100%);
    padding: 4rem 0;
    color: var(--egr-white);
    position: relative;
    overflow: hidden;
}
.egr-metrics-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(82, 183, 136, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}
.egr-metrics-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}
.egr-metrics-eyebrow {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--egr-primary-light);
    background: rgba(82, 183, 136, 0.15);
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    margin-bottom: 0.75rem;
}
.egr-metrics-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}
.egr-metrics-tagline {
    font-size: 1.2rem;
    opacity: 0.85;
}
.egr-metrics-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}
.egr-metric-card {
    text-align: center;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 2rem 1.25rem;
    transition: transform var(--egr-transition), background var(--egr-transition), border-color var(--egr-transition), box-shadow var(--egr-transition);
    backdrop-filter: blur(4px);
}
.egr-metric-card:hover {
    transform: translateY(-6px);
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(82, 183, 136, 0.4);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}
.egr-metric-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1.25rem;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(82, 183, 136, 0.25), rgba(82, 183, 136, 0.1));
    border: 1px solid rgba(82, 183, 136, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--egr-primary-light);
    transition: transform var(--egr-transition), background var(--egr-transition);
}
.egr-metric-card:hover .egr-metric-icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(82, 183, 136, 0.35), rgba(82, 183, 136, 0.15));
}
.egr-metric-number {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -1px;
}
.egr-metric-label {
    font-size: 0.85rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}
@media (max-width: 991px) {
    .egr-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .egr-metrics-grid {
        grid-template-columns: 1fr;
    }
    .egr-metric-number {
        font-size: 1.8rem;
    }
    .egr-metrics-title {
        font-size: 1.8rem;
    }
}

/* --- Impacts --- */
.egr-impacts {
    background: var(--egr-white);
}
.egr-impacts .row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-left: 0;
    margin-right: 0;
}
.egr-impact-card {
    padding: 0;
    margin: 0;
}
@media (max-width: 991px) {
    .egr-impacts .row {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 575px) {
    .egr-impacts .row {
        grid-template-columns: 1fr;
    }
}
.egr-impact-card .item-wrapper {
    border-radius: var(--egr-radius);
    box-shadow: var(--egr-shadow);
    transition: transform var(--egr-transition), box-shadow var(--egr-transition);
    background: var(--egr-white);
    border: 1px solid #e9ecef;
    /* NO overflow:hidden — let collapse expand naturally */
}
.egr-impact-card .item-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: var(--egr-shadow-hover);
}
.egr-impact-card .item-img {
    border-radius: var(--egr-radius) var(--egr-radius) 0 0;
    overflow: hidden;
    background: #f8f9fa;
}
.egr-impact-card .item-img img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    transition: transform 0.4s ease;
}
.egr-impact-card .item-wrapper:hover .item-img img {
    transform: scale(1.05);
}
.egr-impact-card .item-content {
    padding: 1.5rem;
}
.egr-impact-toggle {
    display: flex;
    align-items: center;
    text-decoration: none;
    cursor: pointer;
}
.egr-impact-toggle:hover {
    text-decoration: none;
}
.egr-impact-card .item-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--egr-dark);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.egr-impact-card .item-title strong {
    color: var(--egr-dark);
}
.egr-impact-chevron {
    font-size: 0.8rem;
    color: var(--egr-primary);
    transition: transform 0.3s ease;
    margin-left: 0.75rem;
    flex-shrink: 0;
}
.egr-impact-toggle[aria-expanded="true"] .egr-impact-chevron {
    transform: rotate(180deg);
}
.egr-impact-card .collapse {
    margin-top: 0.75rem;
}
.egr-impact-card .collapse.show {
    padding-top: 0.75rem;
    border-top: 1px solid #e9ecef;
}
.egr-impact-desc {
    font-size: 0.9rem;
    line-height: 1.7;
    color: var(--egr-gray);
    margin-bottom: 0.75rem;
}
.egr-impact-readmore {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--egr-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap var(--egr-transition);
}
.egr-impact-readmore:hover {
    text-decoration: none;
    gap: 0.7rem;
    color: var(--egr-primary-dark);
}

/* --- Partners --- */
.egr-partners {
    background: var(--egr-light);
}
.egr-partners-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-top: 1.5rem;
}
.egr-partner-card {
    background: var(--egr-white);
    border-radius: var(--egr-radius);
    padding: 1.5rem;
    box-shadow: var(--egr-shadow);
    transition: transform var(--egr-transition), box-shadow var(--egr-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}
.egr-partner-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--egr-shadow-hover);
}
.egr-partner-card img {
    max-height: 80px;
    max-width: 100%;
    object-fit: contain;
}
@media (max-width: 991px) {
    .egr-partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
@media (max-width: 575px) {
    .egr-partners-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Echo Section --- */
.egr-echo {
    background: var(--egr-primary-dark);
    color: var(--egr-white);
    text-align: center;
    padding: 4rem 0;
}
.egr-echo-inner {
    max-width: 700px;
    margin: 0 auto 2.5rem;
}
.egr-echo .egr-section-title {
    color: var(--egr-white);
    font-size: 2rem;
}
.egr-echo .egr-section-tagline {
    color: rgba(255, 255, 255, 0.8);
}

/* Echo carousel */
.egr-echo-carousel {
    position: relative;
    max-width: 750px;
    margin: 0 auto;
    padding: 0 3.5rem;
}
.egr-echo-track {
    position: relative;
    min-height: 280px;
}
.egr-echo-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}
.egr-echo-slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    position: relative;
}
.egr-echo-card {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    padding: 2.5rem 2.5rem 2rem;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, border-color 0.3s ease;
}
.egr-echo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}
.egr-echo-quote-icon {
    font-size: 2rem;
    color: var(--egr-primary-light);
    opacity: 0.4;
    margin-bottom: 0.75rem;
}
.egr-echo-text {
    font-size: 1.1rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 1.25rem;
    font-style: italic;
}
.egr-echo-stars {
    color: #fbbf24;
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    gap: 0.2rem;
}
.egr-echo-stars .far {
    color: rgba(255, 255, 255, 0.25);
}
.egr-echo-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.egr-echo-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--egr-primary), var(--egr-primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--egr-white);
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}
.egr-echo-author-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
    text-align: left;
}
.egr-echo-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--egr-white);
}
.egr-echo-meta {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}
.egr-echo-meta i {
    font-size: 0.75rem;
    color: var(--egr-primary-light);
}
.egr-echo-meta-sep {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.7rem;
}

/* Carousel controls — positioned outside the card */
.egr-echo-prev,
.egr-echo-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 5;
}
.egr-echo-prev {
    left: 0;
}
.egr-echo-next {
    right: 0;
}
.egr-echo-prev:hover,
.egr-echo-next:hover {
    background: var(--egr-primary);
    border-color: var(--egr-primary);
    color: var(--egr-white);
    transform: translateY(-50%) scale(1.1);
}

/* Dots */
.egr-echo-dots {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
    margin-top: 1.5rem;
}
.egr-echo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    padding: 0;
}
.egr-echo-dot.active {
    background: var(--egr-primary-light);
    width: 24px;
    border-radius: 4px;
}
.egr-echo-dot:hover {
    background: rgba(255, 255, 255, 0.45);
}

/* Echo responsive */
@media (max-width: 768px) {
    .egr-echo-carousel {
        padding: 0 2.5rem;
    }
    .egr-echo-card {
        padding: 2rem 1.5rem 1.5rem;
    }
    .egr-echo-text {
        font-size: 1rem;
    }
    .egr-echo-author {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
    .egr-echo-author-info {
        align-items: center;
        text-align: center;
    }
    .egr-echo-prev,
    .egr-echo-next {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }
}

/* --- Contact & Map (combined) --- */
.egr-contact {
    background: var(--egr-light);
}
.egr-contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: stretch;
}
.egr-contact-form-col form {
    background: var(--egr-white);
    border-radius: var(--egr-radius);
    padding: 2rem;
    box-shadow: var(--egr-shadow);
    height: 100%;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.egr-contact-form-col form:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}
/* Form header — icon + title + slogan (Wardwatch pattern) */
.egr-form-header {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f1f5f9;
}
.egr-form-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(45, 106, 79, 0.08);
    color: var(--egr-primary);
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: all var(--egr-transition);
}
.egr-form-header:hover .egr-form-header-icon {
    background: var(--egr-primary);
    color: var(--egr-white);
}
.egr-form-header-titles {
    display: flex;
    flex-direction: column;
}
.egr-form-header-titles h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--egr-dark);
    margin: 0 0 0.25rem;
}
.egr-form-header-titles p {
    font-size: 0.9375rem;
    color: #64748b;
    margin: 0;
}
.egr-contact-info-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.egr-info-card {
    background: var(--egr-white);
    border-radius: var(--egr-radius);
    box-shadow: var(--egr-shadow);
}

/* Mini contact cards — Call Us / Email Us */
.egr-mini-card {
    padding: 0;
    transition: transform var(--egr-transition);
}
.egr-mini-card:hover {
    transform: translateY(-2px);
}
.egr-mini-card-link {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    border-radius: inherit;
    transition: background var(--egr-transition);
}
.egr-mini-card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(45, 106, 79, 0.08);
    color: var(--egr-primary);
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: all var(--egr-transition);
}
.egr-mini-card-link:hover .egr-mini-card-icon {
    background: var(--egr-primary);
    color: var(--egr-white);
}
.egr-mini-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}
.egr-mini-card-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}
.egr-mini-card-value {
    font-size: 0.9375rem;
    font-weight: 700;
    color: #1e293b;
    word-break: break-word;
    transition: color var(--egr-transition);
}
.egr-mini-card-link:hover .egr-mini-card-value {
    color: var(--egr-primary);
}
.egr-info-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Tabbed Hours / Visit Us card */
.egr-hours-tabs-card {
    padding: 0;
    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.egr-hours-tabs-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}
.egr-hours-tabs {
    display: flex;
    border-bottom: 1px solid #e5e7eb;
}
.egr-hours-tab {
    flex: 1;
    padding: 0.9rem 1rem;
    background: transparent;
    border: none;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
    font-size: 0.85rem;
    font-weight: 600;
    color: #9ca3af;
    cursor: pointer;
    transition: color var(--egr-transition), background var(--egr-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: inherit;
    position: relative;
}
.egr-hours-tab:focus,
.egr-hours-tab:focus-visible {
    outline: none;
    box-shadow: none;
}
.egr-hours-tab i {
    font-size: 0.85rem;
}
.egr-hours-tab:hover {
    color: var(--egr-primary);
    background: rgba(45, 106, 79, 0.04);
}
.egr-hours-tab.active {
    color: var(--egr-primary);
    background: var(--egr-white);
}
.egr-hours-tab.active::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 2px;
    background: var(--egr-primary);
    border-radius: 2px 2px 0 0;
}
.egr-hours-tab-content {
    padding: 1.25rem;
}
.egr-hours-panel {
    display: none;
}
.egr-hours-panel.active {
    display: block;
}
.egr-hours-row {
    font-size: 0.875rem;
    color: #111827;
    line-height: 1.5;
    margin: 0 0 0.75rem;
}
.egr-hours-row:last-child {
    margin-bottom: 0;
}
.egr-hours-row strong {
    color: #111827;
    display: block;
    margin-bottom: 0.1rem;
}
.egr-hours-row a {
    color: var(--egr-primary);
    text-decoration: none;
}
.egr-hours-row a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}
.egr-hours-closed {
    color: #b91c1c;
}
.egr-hours-closed strong {
    color: #b91c1c;
}

/* Map */
.egr-contact-map-col {
    border-radius: var(--egr-radius);
    overflow: hidden;
    box-shadow: var(--egr-shadow);
    flex: 1;
    min-height: 250px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}
.egr-contact-map-col:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}
.egr-map-embed {
    height: 100%;
}
.egr-map-embed iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 250px;
}
.egr-contact .form-control {
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color var(--egr-transition), box-shadow var(--egr-transition), transform var(--egr-transition);
}
.egr-contact .form-control:hover {
    border-color: #b0b8c0;
}
.egr-contact .form-control:focus {
    border-color: var(--egr-primary);
    box-shadow: 0 0 0 0.2rem rgba(45, 106, 79, 0.15);
    transform: translateY(-1px);
}
.egr-contact .btn-primary {
    background: var(--egr-primary);
    border-color: var(--egr-primary);
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: background var(--egr-transition), transform var(--egr-transition), box-shadow var(--egr-transition);
}
.egr-contact .btn-primary:hover {
    background: var(--egr-primary-dark);
    border-color: var(--egr-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(45, 106, 79, 0.3);
}
@media (max-width: 991px) {
    .egr-contact-grid {
        grid-template-columns: 1fr;
    }
    .egr-contact-map-col {
        min-height: 300px;
    }
}

/* --- Turnstile + submit button spacing --- */
.egr-contact .cf-turnstile {
    margin-bottom: 1.25rem;
}

/* --- Consent checkbox --- */
.egr-consent-field {
    margin: 1.5rem 0;
}
.egr-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    font-weight: normal;
    margin: 0;
}
.egr-consent-text {
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.5;
}
.egr-checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
}
.egr-checkmark {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
    margin-top: 1px;
}
.egr-checkmark::after {
    content: '';
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0.9);
    display: none;
    margin-bottom: 2px;
}
.egr-checkbox-label:hover .egr-checkmark {
    border-color: var(--egr-primary);
    transform: scale(1.1);
}
.egr-checkbox-label input:checked ~ .egr-checkmark {
    background: var(--egr-primary);
    border-color: var(--egr-primary);
    box-shadow: 0 2px 6px rgba(45, 106, 79, 0.3);
}
.egr-checkbox-label input:checked ~ .egr-checkmark::after {
    display: block;
}
.egr-disclaimer-link {
    color: var(--egr-primary);
    text-decoration: underline;
    text-underline-offset: 4px;
    font-weight: 600;
    transition: color var(--egr-transition);
}
.egr-disclaimer-link:hover {
    color: var(--egr-primary-dark);
}
.egr-consent-text .egr-required {
    color: #ef4444;
    margin-left: 0.25rem;
    white-space: nowrap;
}
/* Required asterisk in form labels */
.egr-auth-field .egr-required {
    color: #ef4444;
    margin-left: 0.15rem;
}

/* --- intl-tel-input --- */
.iti {
    width: 100%;
    margin-bottom: 0;
    position: relative;
    display: flex;
    align-items: center;
}
/* Flag container — sits to the LEFT of the input as a separate element */
.iti--separate-dial-code .iti__flag-container {
    position: relative;
    inset: auto;
    align-self: stretch;
    border: 1px solid #ddd;
    border-right: none;
    border-radius: 6px 0 0 6px;
    background: var(--egr-light);
    display: flex;
    align-items: center;
    transition: background var(--egr-transition);
    flex-shrink: 0;
}
.iti--separate-dial-code .iti__flag-container:hover {
    background: #eef0f2;
}
.iti--separate-dial-code .iti__selected-flag {
    padding: 0 10px;
    height: 100%;
    display: flex;
    align-items: center;
    gap: 6px;
}
/* The actual phone input — starts AFTER the flag container */
.iti--separate-dial-code .form-control,
.iti--separate-dial-code .egr-auth-input,
.iti--separate-dial-code input[type="tel"] {
    border-radius: 0 8px 8px 0;
    padding-left: 12px !important;
    margin-left: 0 !important;
    flex: 1;
    width: auto !important;
    align-self: stretch;
}
/* Hide the left icon when intl-tel-input is active (flag container replaces it) */
.iti .egr-auth-input-icon {
    display: none !important;
}
.iti__selected-dial-code {
    font-weight: 600;
    color: var(--egr-dark);
    font-size: 0.9rem;
}
/* Country dropdown list */
.iti__country-list {
    border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    border: 1px solid #e2e8f0;
    max-height: 250px;
    overflow-y: auto;
    z-index: 9999;
}
.iti__country {
    padding: 0.5rem 0.75rem;
    transition: background var(--egr-transition);
}
.iti__country:hover,
.iti__country.iti__highlight {
    background: rgba(45, 106, 79, 0.1);
    color: var(--egr-primary-dark);
}
.iti__dial-code {
    color: var(--egr-gray);
    font-size: 0.85rem;
}

/* --- Footer (Wardwatch pattern) --- */
.egr-site-footer {
    background: var(--egr-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 3rem 0 0;
}
.egr-footer-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 1rem;
}
.egr-footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr;
    gap: 2rem;
    padding-bottom: 2rem;
}
@media (max-width: 768px) {
    .egr-footer-main {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
.egr-footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: 1rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 6px;
    padding: 6px 10px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}
.egr-footer-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2);
}
.egr-footer-desc {
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 400px;
}
.egr-footer-heading {
    color: var(--egr-white);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.egr-footer-link-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.egr-footer-link-list li {
    margin-bottom: 0.5rem;
}
.egr-footer-link-list a,
.egr-footer-contact a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color var(--egr-transition), padding-left 0.25s ease;
}
.egr-footer-link-list a:hover,
.egr-footer-contact a:hover {
    color: var(--egr-primary-light);
    padding-left: 0.3rem;
}
.egr-footer-contact p {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    line-height: 1.5;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}
.egr-footer-contact i {
    flex-shrink: 0;
    margin-top: 0.15rem;
    color: var(--egr-primary-light);
    transition: transform 0.25s ease, color 0.25s ease;
}
.egr-footer-contact p:hover i {
    transform: scale(1.25) rotate(-5deg);
    color: var(--egr-white);
}
.egr-footer-contact p > span {
    flex: 1;
}
.egr-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.5rem 0;
    font-size: 0.85rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.egr-footer-bottom p {
    margin: 0;
}
.egr-footer-bottom .egr-footer-link {
    color: var(--egr-primary-light);
    text-decoration: underline;
    text-underline-offset: 4px;
    font-weight: 600;
    transition: color var(--egr-transition), text-underline-offset var(--egr-transition);
}
.egr-footer-bottom .egr-footer-link:hover {
    color: var(--egr-white);
    text-underline-offset: 6px;
}
@media (max-width: 575px) {
    .egr-footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
}

/* --- Back to Top (Wardwatch pattern) --- */
#egr-back-to-top {
    position: fixed;
    bottom: 0;
    right: 24px;
    width: 48px;
    height: 48px;
    border-radius: 50% 50% 0 0;
    background: var(--egr-primary);
    color: var(--egr-white);
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background 0.3s ease;
    z-index: 9998;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
#egr-back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
#egr-back-to-top:hover {
    background: var(--egr-primary-dark);
    transform: translateY(-4px);
}
#egr-back-to-top:focus-visible {
    outline: 2px solid var(--egr-primary-light);
    outline-offset: 2px;
}

/* --- Cookie Consent (Wardwatch pattern) --- */
.egr-cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99990;
    background: var(--egr-white);
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.12);
    animation: egr-cookie-slide-up 0.4s ease-out;
    display: none;
}
.egr-cookie-banner.is-visible {
    display: block;
}
@keyframes egr-cookie-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}
.egr-cookie-banner-inner {
    max-width: 1140px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.egr-cookie-banner h2 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    color: var(--egr-dark);
}
.egr-cookie-banner p {
    font-size: 0.9rem;
    color: var(--egr-gray);
    margin: 0;
    max-width: 700px;
}
.egr-cookie-privacy-link {
    color: var(--egr-primary);
    text-decoration: underline;
}
.egr-cookie-banner-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}
.egr-cookie-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all var(--egr-transition);
}
.egr-cookie-reject {
    background: transparent;
    border-color: #ddd;
    color: var(--egr-gray);
}
.egr-cookie-reject:hover {
    background: var(--egr-light);
}
.egr-cookie-accept {
    background: var(--egr-primary);
    border-color: var(--egr-primary);
    color: var(--egr-white);
}
.egr-cookie-accept:hover {
    background: var(--egr-primary-dark);
}
@media (max-width: 768px) {
    .egr-cookie-banner-inner {
        flex-direction: column;
        text-align: center;
    }
    .egr-cookie-banner-actions {
        width: 100%;
        justify-content: center;
    }
}

/* --- Responsive --- */

/* Tablet & small tablet — keep topbar compact but organised */
@media (max-width: 768px) {
    .egr-topbar {
        max-height: 36px;
    }
    .egr-topbar-inner {
        font-size: 0.75rem;
        gap: 0.75rem;
        padding: 0.4rem 1rem;
    }
    /* Hide link text, keep icons only for portal/logout */
    .egr-topbar-link-text {
        display: none;
    }
    /* Keep spacer so portal stays on the right */
    .egr-topbar-spacer {
        flex: 1;
    }
    /* Larger touch target for icon-only links */
    .egr-topbar-link {
        padding: 0.25rem 0.4rem;
    }
    .egr-topbar-portal {
        padding: 0.2rem 0.5rem;
    }

    .egr-metrics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .egr-metric-number {
        font-size: 1.8rem;
    }
    .egr-metrics-title {
        font-size: 1.8rem;
    }
    .egr-section {
        padding: 2.5rem 0;
    }
}

/* Small mobile — hide email to save space, keep phone on left + portal on right */
@media (max-width: 576px) {
    .egr-topbar {
        max-height: 34px;
    }
    .egr-topbar-inner {
        font-size: 0.72rem;
        gap: 0.5rem;
        padding: 0.35rem 1rem;
    }
    /* Hide the email item, keep phone */
    .egr-topbar-item:first-child {
        display: none;
    }
}

/* Very small mobile — tighten further, phone + portal only */
@media (max-width: 375px) {
    .egr-topbar-inner {
        font-size: 0.68rem;
        gap: 0.4rem;
        padding: 0.3rem 0.875rem;
    }
}

/* ==========================================================================
   Auth Pages (Login / Register / Password Reset / Verify)
   Shares the site chrome (topbar, header, footer) with the welcome page.
   ========================================================================= */
.egr-auth-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background:
        linear-gradient(135deg, rgba(27, 67, 50, 0.92) 0%, rgba(45, 106, 79, 0.88) 55%, rgba(82, 183, 136, 0.82) 100%),
        url("../images/frontend/waldemar-brandt-ncqxxssg3oo-unsplash-2000x1333.jpg") center center / cover no-repeat fixed;
}

/* Push the auth content to fill the viewport between header and footer */
.egr-auth-main {
    flex: 1 0 auto;
    display: flex;
    align-items: center;
    padding: 3rem 0;
}
.egr-auth-wrap {
    width: 100%;
}

/* Card */
.egr-auth-card {
    background: var(--egr-white);
    border: none;
    border-radius: 14px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
    animation: egr-auth-card-in 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes egr-auth-card-in {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Card header band */
.egr-auth-card-header {
    background: linear-gradient(135deg, var(--egr-primary-dark) 0%, var(--egr-primary) 100%);
    color: var(--egr-white);
    padding: 1.6rem 2rem;
    text-align: center;
}
.egr-auth-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.16);
    border: 2px solid rgba(255, 255, 255, 0.35);
    font-size: 1.4rem;
    margin-bottom: 0.65rem;
}
.egr-auth-card-title {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.egr-auth-card-subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.85rem;
    opacity: 0.85;
    font-weight: 400;
}

/* Card body */
.egr-auth-card-body {
    padding: 2rem;
}

/* Form fields */
.egr-auth-field {
    margin-bottom: 1.25rem;
}
/* Consent checkbox field — same spacing as auth-field */
.egr-contact-form-fields .egr-consent-field {
    margin-bottom: 1.25rem;
}
.egr-auth-field > label {
    display: block;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--egr-dark);
    margin-bottom: 0.6rem;
    letter-spacing: 0.2px;
}
.egr-auth-input-wrap {
    position: relative;
}
.egr-auth-input-wrap .egr-auth-input-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--egr-gray);
    font-size: 0.95rem;
    pointer-events: none;
    transition: color var(--egr-transition);
}
.egr-auth-input {
    width: 100%;
    height: 46px;
    padding: 0.6rem 0.9rem 0.6rem 2.5rem;
    border: 1.5px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    color: var(--egr-dark);
    background: var(--egr-light);
    transition: border-color var(--egr-transition), box-shadow var(--egr-transition), background var(--egr-transition);
}
.egr-auth-input:focus {
    outline: none;
    border-color: var(--egr-primary);
    background: var(--egr-white);
    box-shadow: 0 0 0 0.2rem rgba(45, 106, 79, 0.15);
}
.egr-auth-input:focus + .egr-auth-input-icon,
.egr-auth-input-wrap:focus-within .egr-auth-input-icon {
    color: var(--egr-primary);
}
.egr-auth-input.is-invalid,
.egr-auth-input.is-invalid:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.12);
}
.egr-auth-input::placeholder {
    color: #adb5bd;
}
/* Read-only / pre-filled (e.g. email on the password reset form) */
.egr-auth-input[readonly] {
    background: #eef2f0;
    color: #495057;
    cursor: not-allowed;
    border-color: #d8dedb;
}
.egr-auth-input[readonly]:focus {
    border-color: #d8dedb;
    box-shadow: none;
    background: #eef2f0;
}
.egr-auth-input[readonly] + .egr-auth-input-icon,
.egr-auth-input-wrap:focus-within .egr-auth-input[readonly] + .egr-auth-input-icon {
    color: #9aa3a0;
}

/* Textarea variant (contact form message field) */
.egr-auth-textarea {
    height: auto !important;
    min-height: 120px;
    padding: 0.75rem 0.9rem 0.75rem 2.5rem !important;
    resize: vertical;
    line-height: 1.5;
}
.egr-auth-textarea-icon {
    top: 0.9rem !important;
    transform: none !important;
}

/* Password reveal toggle */
.egr-auth-password-toggle {
    position: absolute;
    right: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--egr-gray);
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.95rem;
    transition: color var(--egr-transition);
}
.egr-auth-password-toggle:hover,
.egr-auth-password-toggle:focus {
    color: var(--egr-primary);
    outline: none;
}

/* Inline error feedback */
.egr-auth-invalid-feedback {
    display: none;
    width: 100%;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: #dc3545;
    font-weight: 500;
}
.egr-auth-input.is-invalid ~ .egr-auth-invalid-feedback,
.egr-auth-field .is-invalid ~ .egr-auth-invalid-feedback {
    display: block;
}

/* Checkbox row (Remember Me) */
.egr-auth-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}
.egr-auth-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--egr-primary);
    cursor: pointer;
}
.egr-auth-check label {
    margin: 0;
    font-size: 0.9rem;
    color: var(--egr-dark);
    cursor: pointer;
    user-select: none;
}

/* Primary submit button */
.egr-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    height: 48px;
    padding: 0 1.25rem;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--egr-primary) 0%, var(--egr-primary-dark) 100%);
    color: var(--egr-white);
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: transform var(--egr-transition), box-shadow var(--egr-transition), opacity var(--egr-transition);
}
.egr-auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(45, 106, 79, 0.35);
}
.egr-auth-btn:active {
    transform: translateY(0);
}
.egr-auth-btn:focus {
    outline: none;
    box-shadow: 0 0 0 0.25rem rgba(45, 106, 79, 0.3);
}

/* Secondary / link button */
.egr-auth-link-row {
    margin-top: 1.25rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--egr-gray);
}
.egr-auth-link-row a {
    color: var(--egr-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--egr-transition);
}
.egr-auth-link-row a:hover,
.egr-auth-link-row a:focus {
    color: var(--egr-primary-dark);
    text-decoration: underline;
}
.egr-auth-link-divider {
    display: block;
    height: 1px;
    background: #eee;
    margin: 1.25rem 0;
    border: none;
}
.egr-auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--egr-gray);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: color var(--egr-transition);
}
.egr-auth-back-link:hover {
    color: var(--egr-primary);
    text-decoration: none;
}

/* Alerts inside the card */
.egr-auth-alert {
    border-radius: 8px;
    padding: 0.85rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    border: 1px solid transparent;
}
.egr-auth-alert-success {
    background: rgba(82, 183, 136, 0.12);
    border-color: rgba(82, 183, 136, 0.4);
    color: #1b4332;
}
.egr-auth-alert-info {
    background: rgba(101, 146, 230, 0.1);
    border-color: rgba(101, 146, 230, 0.35);
    color: #2a4a7a;
}

/* Verify page body text */
.egr-auth-verify-text {
    color: var(--egr-gray);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}
.egr-auth-verify-text .btn-link {
    padding: 0;
    color: var(--egr-primary);
    font-weight: 600;
    border: none;
    background: none;
    cursor: pointer;
}
.egr-auth-verify-text .btn-link:hover {
    color: var(--egr-primary-dark);
    text-decoration: underline;
}

/* Responsive tweaks */
@media (max-width: 575px) {
    .egr-auth-main {
        padding: 1.5rem 0;
    }
    .egr-auth-card-header {
        padding: 1.25rem 1.25rem;
    }
    .egr-auth-card-body {
        padding: 1.5rem;
    }
    .egr-auth-card-title {
        font-size: 1.15rem;
    }
    .egr-auth-input {
        height: 44px;
    }
    .egr-auth-btn {
        height: 46px;
    }
}

/* Cloudflare Turnstile widget inside auth cards */
.egr-auth-turnstile {
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}
.egr-auth-turnstile .cf-turnstile {
    display: flex;
    justify-content: center;
}
.egr-auth-turnstile iframe {
    border-radius: 8px;
}
/* Inline variant (verify-resend form) */
.egr-auth-turnstile-inline {
    margin-bottom: 0.75rem;
    align-items: center;
}
