/* ==========================================================================
   KONGU MATRIMONY — Royal Logo-Matched Heritage Palette (v5)
   Harmonized directly with the 3 signature colors of the Kongu Matrimony Logo:
   1. Deep Jewel Emerald (#053B27 / #032217) — Crest Shield Anchor
   2. Luminous 24K Kongu Gold (#D89B12 / #F5C84B / #FFE38E) — Crown & Frame
   3. Bridal Silk Ruby (#841420 / #5E0C15) — Heritage Ribbon & Saree Accent
   4. Warm Silk Ivory (#FFFCF5 / #FAF3E3) — Clean, Luminous Breathable Canvas
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Tamil:wght@400;500;600;700;800&family=Outfit:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600&display=swap');

:root {
    --km-primary: #06422c;
    --km-primary-mid: #0a5c3e;
    --km-primary-dark: #032418;
    --km-primary-soft: #ebf5f0;

    --km-gold: #d89b12;
    --km-gold-bright: #f2c13d;
    --km-gold-light: #ffe494;
    --km-gold-soft: #fdf4da;

    --km-ruby: #841420;
    --km-ruby-dark: #560b13;
    --km-ruby-soft: #fceeef;

    --km-bg: #fffcf5;
    --km-surface: #ffffff;
    --km-surface-alt: #faf2df;
    --km-border: #eadec3;
    --km-border-gold: rgba(216, 155, 18, 0.42);

    --km-ink: #1b1610;
    --km-muted: #5c5346;
    --km-radius-lg: 22px;
    --km-radius-md: 14px;
    --km-shadow-sm: 0 6px 20px rgba(3, 36, 24, 0.06);
    --km-shadow-md: 0 16px 40px rgba(3, 36, 24, 0.10);
    --km-shadow-lg: 0 26px 65px rgba(3, 36, 24, 0.18);

    /* Legacy CSS variable compatibility across all member & portal pages */
    --brand-green: #06422c !important;
    --brand-dark-green: #032418 !important;
    --gold-accent: #d89b12 !important;
    --mint-light: #fffcf5 !important;
    --emerald-light: #fdf4da !important;
    --bold-black: #1b1610 !important;
    --dark-slate: #1b1610 !important;

    --bs-success: #06422c;
    --bs-success-rgb: 6, 66, 44;
    --bs-warning: #d89b12;
    --bs-warning-rgb: 216, 155, 18;
}

@media screen {
    body:not(.skin-blue) {
        font-family: 'Outfit', 'Noto Sans Tamil', -apple-system, BlinkMacSystemFont, sans-serif !important;
        background-color: var(--km-bg) !important;
        background-image:
            radial-gradient(circle at 8% 4%, rgba(242, 193, 61, 0.12) 0%, transparent 36%),
            radial-gradient(circle at 92% 18%, rgba(132, 20, 32, 0.06) 0%, transparent 38%),
            radial-gradient(circle at 50% 60%, rgba(6, 66, 44, 0.04) 0%, transparent 50%) !important;
        color: var(--km-ink) !important;
        letter-spacing: -0.005em;
        -webkit-font-smoothing: antialiased;
    }

    section.bg-light,
    div.bg-light {
        background-color: var(--km-surface-alt) !important;
        border-color: var(--km-border) !important;
    }
    section.bg-white {
        background-color: var(--km-surface) !important;
        border-color: var(--km-border) !important;
    }
}

.km-serif,
.hero-editorial-title,
.section-editorial-title {
    font-family: 'Playfair Display', 'Noto Sans Tamil', Georgia, serif !important;
    letter-spacing: -0.015em;
}

/* Watermark protection */
.secure-img-wrapper::after {
    content: "KONGU MATRIMONY" !important;
    background: rgba(3, 36, 24, 0.65) !important;
    color: #ffe494 !important;
    border: 1px solid rgba(242, 193, 61, 0.55);
    backdrop-filter: blur(3px);
    font-family: 'Outfit', sans-serif;
    font-size: 10px !important;
    letter-spacing: 1.5px !important;
}

/* 1. Top Address / Helpline Bar Hidden Cleanly */
.top-bar,
#topbar {
    display: none !important;
}

/* 2. Crisp Luminous Silk-Ivory & 24K Gold Sticky Header (100% True Logo Contrast) */
nav.navbar,
#header {
    background: rgba(255, 253, 249, 0.96) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border-bottom: 2px solid #e5b435 !important;
    box-shadow: 0 8px 28px rgba(6, 66, 44, 0.08) !important;
    padding: 7px 0 !important;
}

.navbar-brand {
    display: inline-flex !important;
    align-items: center !important;
    gap: 12px;
    padding: 0 !important;
    text-decoration: none;
}

.navbar-brand img {
    height: 80px !important;
    max-height: 82px !important;
    width: auto !important;
    object-fit: contain !important;
    filter: drop-shadow(0 2px 6px rgba(6, 66, 44, 0.14));
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.navbar-brand:hover img {
    transform: translateY(-1px) scale(1.03);
}

.km-brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.12;
}
.km-brand-title {
    font-family: 'Playfair Display', serif;
    font-weight: 800;
    font-size: 1.38rem;
    color: #053825 !important;
    letter-spacing: -0.01em;
}
.km-brand-title span {
    background: linear-gradient(135deg, #c28006 0%, #e09f14 55%, #841420 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #c28006;
}
.km-brand-sub {
    font-family: 'Outfit', sans-serif;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #841420 !important;
    margin-top: 3px;
}

@media (max-width: 768px) {
    .navbar-brand img {
        height: 62px !important;
        max-height: 64px !important;
    }
    .km-brand-text {
        display: none;
    }
}

.navbar-toggler {
    border: 1px solid rgba(216, 155, 18, 0.5) !important;
    background: #fff9eb !important;
}
.navbar-toggler-icon {
    filter: none;
}

.navbar .nav-link {
    font-family: 'Outfit', sans-serif !important;
    color: #1f2937 !important;
    font-weight: 600 !important;
    font-size: 14.5px !important;
    padding: 8px 14px !important;
    margin: 0 2px !important;
    border-radius: 999px;
    transition: all 0.2s ease;
}
.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: #053825 !important;
    background: linear-gradient(135deg, #fff8e3 0%, #faecc4 100%) !important;
    box-shadow: inset 0 0 0 1px rgba(216, 155, 18, 0.45);
}

/* Header Login Button — Deep Jewel Emerald with 24K Gold Trim */
.navbar .btn-login-header {
    background: linear-gradient(135deg, #0a5c3e 0%, #053825 60%, #4d0b13 100%) !important;
    color: #ffe8a3 !important;
    font-weight: 700 !important;
    border: 1.5px solid #e5b029 !important;
    box-shadow: 0 6px 18px rgba(6, 66, 44, 0.22) !important;
}
.navbar .btn-login-header:hover {
    background: linear-gradient(135deg, #ffe38e 0%, #e5a517 100%) !important;
    color: #1c1102 !important;
    border-color: #053825 !important;
    transform: translateY(-2px);
}

/* 3. Primary & Gold Action Buttons Across Page Body */
.btn-green-submit,
.btn-brand,
.btn-stat-action,
.btn-submit,
.km-btn-primary {
    font-family: 'Outfit', 'Noto Sans Tamil', sans-serif !important;
    background: linear-gradient(135deg, #0a5c3e 0%, #06422c 55%, #032619 100%) !important;
    color: #fffdf7 !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em;
    border: 1.5px solid #e5b029 !important;
    box-shadow: 0 8px 22px rgba(6, 66, 44, 0.24) !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-green-submit:hover,
.btn-brand:hover,
.btn-stat-action:hover,
.btn-submit:hover,
.km-btn-primary:hover {
    background: linear-gradient(135deg, #ffe28a 0%, #e5a517 55%, #bf7f06 100%) !important;
    color: #1c1102 !important;
    border-color: #06422c !important;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(216, 155, 18, 0.36) !important;
}

.km-btn-gold {
    font-family: 'Outfit', 'Noto Sans Tamil', sans-serif !important;
    background: linear-gradient(135deg, #ffe38e 0%, #e8a718 55%, #c28006 100%) !important;
    color: #1c1102 !important;
    font-weight: 700 !important;
    border: 1px solid #fff2c2 !important;
    box-shadow: 0 8px 24px rgba(216, 155, 18, 0.32) !important;
    transition: all 0.25s ease !important;
}
.km-btn-gold:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, #fff0b8 0%, #f4ba30 100%) !important;
    color: #0f0901 !important;
}

/* 4. Bootstrap Utility Harmonization */
.bg-success {
    background: linear-gradient(135deg, #084d34 0%, #042b1d 70%, #4d0b13 100%) !important;
    color: #ffffff !important;
}
.bg-success-subtle {
    background: linear-gradient(135deg, #fff8e3 0%, #faecc4 100%) !important;
    color: #6e0f19 !important;
    border: 1px solid rgba(216, 155, 18, 0.48) !important;
}
.text-success {
    color: #06422c !important;
}
.border-success {
    border-color: rgba(216, 155, 18, 0.55) !important;
}
.btn-success {
    background: linear-gradient(135deg, #0a5c3e 0%, #06422c 100%) !important;
    border: 1.5px solid #e5b029 !important;
    color: #ffffff !important;
    font-weight: 600;
}
.btn-success:hover,
.btn-success:focus {
    background: linear-gradient(135deg, #ffe28a 0%, #e5a517 100%) !important;
    border-color: #06422c !important;
    color: #1c1102 !important;
}
.btn-outline-success {
    color: #06422c !important;
    border: 1.5px solid #d89b12 !important;
    background: #fffdf8 !important;
    font-weight: 600;
}
.btn-outline-success:hover,
.btn-outline-success.active {
    background: linear-gradient(135deg, #084d34 0%, #042b1d 100%) !important;
    border-color: #f2c13d !important;
    color: #ffe494 !important;
}

.badge.bg-warning,
.btn-warning {
    background: linear-gradient(135deg, #ffe38e 0%, #e2a012 100%) !important;
    color: #1c1102 !important;
    border: none !important;
}

/* 5. Tri-Tone Logo-Matched Hero Banners (Jewel Emerald + Golden Sunrise + Bridal Ruby) */
.page-header-banner,
.welcome-card,
.privacy-header,
.km-contact-hero,
.km-about-hero,
.km-plan-hero {
    background:
        radial-gradient(circle at 18% 25%, rgba(242, 193, 61, 0.24) 0%, transparent 45%),
        radial-gradient(circle at 88% 80%, rgba(132, 20, 32, 0.42) 0%, transparent 52%),
        linear-gradient(130deg, #032015 0%, #06422c 52%, #4a0a12 100%) !important;
    border-bottom: 2.5px solid #e8b32a !important;
    color: #ffffff !important;
    box-shadow: var(--km-shadow-md) !important;
}

/* 6. Warm Ivory & 24K Gold-Trimmed Luxury Cards */
.glass-card,
.search-bar-card,
.counter-card,
.stat-card,
.feature-box-card,
.profile-card,
.user-profile-card,
.about-card,
.contact-card,
.plan-card,
.pricing-card,
.km-step-card,
.km-info-tile,
.km-pillar-card,
.km-bank-tile {
    background: var(--km-surface) !important;
    border: 1px solid #eadbc0 !important;
    border-radius: var(--km-radius-lg) !important;
    box-shadow: var(--km-shadow-sm) !important;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s ease, border-color 0.28s ease;
}

.feature-box-card:hover,
.plan-card:hover,
.profile-card:hover,
.stat-card:hover,
.km-step-card:hover,
.km-info-tile:hover,
.km-pillar-card:hover,
.km-bank-tile:hover {
    transform: translateY(-5px);
    border-color: #d89b12 !important;
    box-shadow: 0 18px 40px rgba(216, 155, 18, 0.14), 0 8px 20px rgba(6, 66, 44, 0.06) !important;
}

.stat-card::before {
    background: linear-gradient(90deg, #06422c 0%, #f2c13d 50%, #841420 100%) !important;
    height: 4px !important;
}

.feature-icon-circle,
.stat-icon-wrapper,
.km-step-icon,
.km-info-icon {
    background: linear-gradient(135deg, #fff8e3 0%, #f8e09c 100%) !important;
    color: #6e0f19 !important;
    border: 1px solid rgba(216, 155, 18, 0.50) !important;
    box-shadow: 0 6px 16px rgba(216, 155, 18, 0.18);
}

.user-profile-img {
    border: 3px solid #e8b32a !important;
    box-shadow: 0 0 0 3px #06422c, 0 12px 28px rgba(6, 66, 44, 0.20) !important;
}

/* Modern Inputs */
.form-control,
.form-select {
    font-family: 'Outfit', 'Noto Sans Tamil', sans-serif !important;
    background-color: #fffdf9;
    border: 1.5px solid #e2d4b7;
    border-radius: 11px;
    font-weight: 500;
    color: var(--km-ink);
    transition: all 0.2s ease;
}
.form-control:focus,
.form-select:focus {
    background-color: #ffffff;
    border-color: #d89b12 !important;
    box-shadow: 0 0 0 4px rgba(216, 155, 18, 0.16) !important;
}

/* 7. Interactive Branch Map Accents (Leaflet Safe Tile Rules) */
.leaflet-container {
    font-family: 'Outfit', 'Noto Sans Tamil', sans-serif !important;
    z-index: 1;
}
.leaflet-container img,
.leaflet-tile {
    max-width: none !important;
    max-height: none !important;
}
.km-custom-div-icon {
    background: transparent !important;
    border: none !important;
}
.km-map-shell {
    position: relative;
    border-radius: 22px;
    overflow: hidden;
    border: 2px solid #e5c67b;
    box-shadow: var(--km-shadow-md);
    background: #f5efe0;
}
.km-leaflet-canvas {
    width: 100%;
    height: 500px !important;
    min-height: 480px;
    z-index: 1;
}
.km-map-toolbar {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 500;
    display: flex;
    gap: 6px;
    background: rgba(3, 31, 20, 0.90);
    backdrop-filter: blur(10px);
    padding: 5px;
    border-radius: 999px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(242, 193, 61, 0.45);
}
.km-map-tool-btn {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Outfit', sans-serif;
    font-size: 12.5px;
    font-weight: 600;
    padding: 6px 13px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.km-map-tool-btn.active,
.km-map-tool-btn:hover {
    background: linear-gradient(135deg, #ffe38e 0%, #e5a517 100%);
    color: #1c1102;
}

.km-pin-wrap {
    position: relative;
    width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.km-pin-pulse {
    position: absolute;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(6, 66, 44, 0.35);
    animation: kmPulseRing 2.2s infinite ease-out;
}
.km-pin-pulse.is-hq {
    background: rgba(216, 155, 18, 0.55);
}
.km-pin-core {
    position: relative;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
    background: linear-gradient(135deg, #0a5c3e 0%, #032418 100%);
    border: 2.5px solid #ffe38e;
    box-shadow: 0 8px 18px rgba(3, 36, 24, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
}
.km-pin-core.is-hq {
    width: 42px;
    height: 42px;
    background: linear-gradient(135deg, #981826 0%, #560b13 55%, #06422c 100%);
    border: 2.5px solid #ffe38e;
}
.km-pin-core i {
    transform: rotate(45deg);
    color: #ffe38e;
    font-size: 14px;
}

@keyframes kmPulseRing {
    0% { transform: scale(0.75); opacity: 0.9; }
    100% { transform: scale(1.95); opacity: 0; }
}

.km-branch-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    background: #ffffff;
    border: 1px solid #eadbc0;
    border-radius: 14px;
    padding: 13px 16px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.22s ease;
}
.km-branch-pill:hover,
.km-branch-pill.active {
    border-color: #d89b12;
    background: linear-gradient(90deg, #fff9ea 0%, #fdf2d0 100%);
    box-shadow: 0 8px 20px rgba(216, 155, 18, 0.14);
    transform: translateX(4px);
}

.leaflet-popup-content-wrapper {
    border-radius: 16px !important;
    padding: 4px !important;
    box-shadow: 0 16px 38px rgba(15, 23, 42, 0.22) !important;
    border: 1.5px solid #e5b029;
}
.leaflet-popup-content {
    font-family: 'Outfit', 'Noto Sans Tamil', sans-serif !important;
    margin: 12px 14px !important;
}

/* 8. Royal Tri-Tone Heritage Footer */
footer,
#footer {
    background:
        radial-gradient(circle at 85% 20%, rgba(132, 20, 32, 0.30) 0%, transparent 45%),
        linear-gradient(135deg, #031d13 0%, #053322 55%, #2a070c 100%) !important;
    border-top: 3px solid #e8b32a !important;
    color: rgba(255, 248, 232, 0.84) !important;
    font-family: 'Outfit', 'Noto Sans Tamil', sans-serif !important;
}
footer h5,
#footer h3,
#footer h5 {
    font-family: 'Playfair Display', serif !important;
    color: #ffe494 !important;
    letter-spacing: 0.02em;
}
footer a {
    color: rgba(255, 248, 232, 0.86) !important;
    transition: color 0.2s ease;
}
footer a:hover,
#footer a:hover {
    color: #ffe494 !important;
}
