@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Inter:wght@400;500;600;700&display=swap");

:root {
    /* Design Tokens for MPTBC CMS Portal */
    --mptbc-navy: #002147;
    --mptbc-navy-dark: #001733;
    --mptbc-navy-light: #0d386b;
    --mptbc-gold: #f59e0b;
    --mptbc-gold-hover: #d97706;
    --mptbc-surface-light: #f8fafc;
    --mptbc-card-border: #e2e8f0;
    --mptbc-text-primary: #0f172a;
    --mptbc-text-secondary: #475569;

    --mptbc-shadow-sm: 0 2px 8px rgba(0, 33, 71, 0.05);
    --mptbc-shadow-md: 0 4px 16px rgba(0, 33, 71, 0.1);
    --mptbc-shadow-lg: 0 10px 30px rgba(0, 33, 71, 0.15);
    --mptbc-radius: 12px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: "Poppins", "Inter", system-ui, -apple-system, sans-serif;
    color: var(--mptbc-text-primary);
    background-color: #ffffff;
    overflow-x: hidden;
    line-height: 1.6;
}

.text-navy {
    color: var(--mptbc-navy) !important;
}

.cursor-pointer {
    cursor: pointer;
}

.aspect-video {
    aspect-ratio: 16 / 9;
}

/* High Contrast Mode Accessibility */
body.high-contrast {
    filter: contrast(140%) !important;
    background-color: #000000 !important;
    color: #ffffff !important;
}

body.high-contrast .mptbc-topbar,
body.high-contrast .mptbc-header-brand,
body.high-contrast .mptbc-navbar,
body.high-contrast .mptbc-hero,
body.high-contrast .mptbc-quick-card,
body.high-contrast .mptbc-metric-card,
body.high-contrast .mptbc-section,
body.high-contrast .mptbc-leader-card,
body.high-contrast .mptbc-depot-card,
body.high-contrast .mptbc-footer {
    background: #000000 !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

body.high-contrast a,
body.high-contrast button {
    color: #ffeb3b !important;
}

/* ─── 1. Top Accessibility Bar ─── */
.mptbc-topbar {
    background: var(--mptbc-navy-dark);
    color: #f1f5f9;
    font-size: 0.8rem;
    padding: 8px 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mptbc-topbar-left,
.mptbc-topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mptbc-acc-btn {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.75rem;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
}

.mptbc-acc-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ─── 2. Header & Navigation Bar ─── */
.mptbc-header-brand {
    padding: 1rem 1.5rem;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--mptbc-shadow-sm);
    border-bottom: 1px solid var(--mptbc-card-border);
}

.mptbc-brand-title-box {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mptbc-seal-img {
    height: 52px;
    width: auto;
    object-fit: contain;
}

.mptbc-title-eng {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--mptbc-navy);
    line-height: 1.15;
    margin: 0;
    letter-spacing: -0.01em;
}

.mptbc-title-hindi {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--mptbc-text-secondary);
}

.mptbc-portal-btn {
    background: var(--mptbc-navy);
    color: #ffffff !important;
    font-weight: 700;
    padding: 10px 22px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.88rem;
    box-shadow: 0 4px 14px rgba(0, 33, 71, 0.25);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.mptbc-portal-btn:hover {
    background: var(--mptbc-navy-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 33, 71, 0.35);
    color: #ffffff !important;
}

.mptbc-navbar {
    background: var(--mptbc-navy);
    padding: 0;
    box-shadow: var(--mptbc-shadow-md);
    position: sticky;
    top: 0;
    z-index: 1030;
}

.mptbc-nav-list {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.mptbc-nav-item a {
    display: block;
    padding: 14px 18px;
    color: #e2e8f0;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border-bottom: 3px solid transparent;
}

.mptbc-nav-item a:hover,
.mptbc-nav-item.active a {
    background: rgba(255, 255, 255, 0.1);
    color: var(--mptbc-gold);
    border-bottom-color: var(--mptbc-gold);
}

.mptbc-nav-item.dropdown .dropdown-menu {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: var(--mptbc-shadow-lg);
}

.mptbc-nav-item.dropdown .dropdown-item {
    color: var(--mptbc-navy);
    border-bottom: none;
}

.mptbc-nav-item.dropdown .dropdown-item:hover {
    background: #f1f5f9;
    color: var(--mptbc-navy-light);
}

/* ─── 3. Hero Showcase & 4 Compact Quick Actions ─── */
.mptbc-hero {
    color: #ffffff;
    padding: 5.5rem 0 8.5rem 0;
    position: relative;
    overflow: hidden;
}

.mptbc-hero .col-lg-7,
.mptbc-hero .col-xl-6 {
    max-width: 560px;
}

/* About MPTBC Section Styles */
.mptbc-about-section {
    position: relative;
    overflow: hidden;
}

.mptbc-about-img-frame {
    border-radius: 16px;
    border: 4px solid #ffffff;
    box-shadow: var(--mptbc-shadow-lg);
    max-height: 380px;
}

.mptbc-hq-img {
    max-height: 380px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.mptbc-about-img-frame:hover .mptbc-hq-img {
    transform: scale(1.04);
}

.mptbc-heading-line {
    width: 50px;
    height: 4px;
    background: var(--mptbc-gold);
    border-radius: 2px;
}

.mptbc-hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.82rem;
    color: var(--mptbc-gold);
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.mptbc-hero-title {
    font-size: 2.6rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.mptbc-hero-sub {
    font-size: 1.05rem;
    color: #cbd5e1;
    max-width: 750px;
    margin-bottom: 2rem;
}

.mptbc-quick-container {
    margin-top: -4.5rem;
    position: relative;
    z-index: 20;
}

.mptbc-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
}

.mptbc-quick-card {
    background: #ffffff;
    border-radius: var(--mptbc-radius);
    padding: 1.25rem;
    box-shadow: var(--mptbc-shadow-md);
    border: 1px solid var(--mptbc-card-border);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: var(--mptbc-text-primary);
}

.mptbc-quick-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--mptbc-shadow-lg);
    border-color: var(--mptbc-navy);
    color: var(--mptbc-text-primary);
}

.mptbc-quick-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.mptbc-quick-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: #f1f5f9;
    color: var(--mptbc-navy);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.mptbc-quick-badge {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    background: #e2e8f0;
    color: var(--mptbc-text-secondary);
    text-transform: uppercase;
}

.mptbc-quick-title {
    font-size: 1.02rem;
    font-weight: 700;
    margin: 0 0 2px 0;
    line-height: 1.3;
}

.mptbc-quick-desc {
    font-size: 0.78rem;
    color: var(--mptbc-text-secondary);
    margin: 0;
}

/* ─── 4. Emergency Marquee Ticker ─── */
.mptbc-marquee-wrapper {
    background: #fffbe6;
    border-top: 1px solid #ffe58f;
    border-bottom: 1px solid #ffe58f;
    padding: 8px 0;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.mptbc-marquee-label {
    background: #dc2626;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 6px 16px;
    border-radius: 4px;
    margin-left: 1rem;
    margin-right: 1rem;
    white-space: nowrap;
    flex-shrink: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mptbc-marquee-container {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.mptbc-marquee-content {
    display: inline-block;
    white-space: nowrap;
    animation: marquee 35s linear infinite;
    font-size: 0.88rem;
    color: #854d0e;
    font-weight: 600;
    padding-left: 100%;
}

.mptbc-marquee-wrapper:hover .mptbc-marquee-content {
    animation-play-state: paused;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* ─── 5. MD Message Section Card ─── */
.mptbc-md-card {
    max-width: 320px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--mptbc-shadow-lg);
    border: 4px solid #ffffff;
    background: var(--mptbc-navy);
}

.mptbc-md-img-wrapper {
    height: 300px;
    background: #e2e8f0;
    overflow: hidden;
}

.mptbc-md-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.mptbc-md-card-footer {
    padding: 1.2rem;
    background: var(--mptbc-navy);
    color: #ffffff;
}

/* ─── 6. Section Styles & KPI ─── */
.mptbc-section {
    padding: 4rem 0;
}

.mptbc-section-bg {
    background-color: var(--mptbc-surface-light);
}

.mptbc-section-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--mptbc-navy);
    margin-bottom: 0.25rem;
}

.mptbc-section-sub {
    font-size: 0.9rem;
    color: var(--mptbc-text-secondary);
    font-weight: 500;
    margin-bottom: 2rem;
}

.mptbc-divider {
    width: 60px;
    height: 4px;
    background: var(--mptbc-gold);
    border-radius: 2px;
    margin-bottom: 1rem;
}

.mptbc-metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.mptbc-metric-card {
    background: var(--mptbc-navy);
    color: #ffffff;
    border-radius: var(--mptbc-radius);
    padding: 1.6rem;
    box-shadow: var(--mptbc-shadow-md);
    text-align: center;
    transition: all 0.3s ease;
}

.mptbc-metric-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--mptbc-shadow-lg);
}

.mptbc-metric-num {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--mptbc-gold);
    line-height: 1;
    margin-bottom: 6px;
}

.mptbc-metric-title {
    font-size: 0.88rem;
    font-weight: 700;
    letter-spacing: 0.05em;
}

/* ─── 7. Photo Gallery Grid & Lightbox Modal (Election Style) ─── */
.mptbc-gallery-card {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    border: 2px solid #ffffff;
    box-shadow: var(--mptbc-shadow-md);
    transition: all 0.4s ease;
}

.mptbc-gallery-card:hover {
    transform: scale(1.03);
    box-shadow: var(--mptbc-shadow-lg);
}

.mptbc-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.mptbc-gallery-card:hover .mptbc-gallery-img {
    transform: scale(1.1);
}

.mptbc-gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 33, 71, 0.9) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1rem;
}

.mptbc-gallery-card:hover .mptbc-gallery-overlay {
    opacity: 1;
}

/* Lightbox Modal */
.mptbc-lightbox-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.mptbc-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 23, 51, 0.94);
    backdrop-filter: blur(10px);
}

.mptbc-lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 2010;
    transition: background 0.2s ease;
}

.mptbc-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.mptbc-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: #ffffff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    cursor: pointer;
    z-index: 2010;
    transition: all 0.2s ease;
}

.mptbc-lightbox-nav:hover {
    background: var(--mptbc-gold);
    color: #000000;
}

.mptbc-lightbox-nav.prev {
    left: 1.5rem;
}

.mptbc-lightbox-nav.next {
    right: 1.5rem;
}

.mptbc-lightbox-content {
    position: relative;
    z-index: 2005;
    max-width: 900px;
    width: 100%;
    max-height: 85vh;
    background: #000000;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
}

.mptbc-lightbox-img {
    width: 100%;
    max-height: 70vh;
    object-fit: contain;
    background: #000000;
}

.mptbc-lightbox-caption {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.8));
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

/* ─── 8. Categorized Tenders ─── */
.mptbc-tab-list {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid var(--mptbc-card-border);
    margin-bottom: 1.5rem;
    overflow-x: auto;
    padding-bottom: 2px;
}

.mptbc-tab-btn {
    background: transparent;
    border: none;
    padding: 10px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--mptbc-text-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.mptbc-tab-btn:hover,
.mptbc-tab-btn.active {
    color: var(--mptbc-navy);
    border-bottom-color: var(--mptbc-navy);
}

.mptbc-tender-card {
    background: #ffffff;
    border-radius: var(--mptbc-radius);
    border: 1px solid var(--mptbc-card-border);
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.mptbc-tender-card:hover {
    border-color: var(--mptbc-navy);
    box-shadow: var(--mptbc-shadow-sm);
}

/* ─── 9. Regional Depots ─── */
.mptbc-depot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.mptbc-depot-card {
    background: #ffffff;
    border-radius: var(--mptbc-radius);
    border: 1px solid var(--mptbc-card-border);
    padding: 1.25rem;
    transition: all 0.25s ease;
}

.mptbc-depot-card:hover {
    transform: translateY(-3px);
    border-color: var(--mptbc-navy);
    box-shadow: var(--mptbc-shadow-md);
}

.mptbc-depot-title {
    font-size: 1.02rem;
    font-weight: 700;
    color: var(--mptbc-navy);
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mptbc-depot-badge {
    font-size: 0.7rem;
    background: #e2e8f0;
    color: #334155;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 600;
}

/* ─── 10. Footer ─── */
.mptbc-footer {
    background: var(--mptbc-navy-dark);
    color: #cbd5e1;
    padding: 4rem 0 1.5rem 0;
    font-size: 0.88rem;
    border-top: 4px solid var(--mptbc-gold);
}

.mptbc-footer a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.15s ease;
}

.mptbc-footer a:hover {
    color: #ffffff;
}

.mptbc-footer-bottom {
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
}

.hover-lift {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--mptbc-shadow-md) !important;
}

@media (max-width: 991.98px) {
    .mptbc-topbar {
        flex-direction: column;
        gap: 6px;
        align-items: flex-start;
    }

    .mptbc-header-brand {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .mptbc-hero-title {
        font-size: 1.9rem;
    }

    .mptbc-tender-card {
        flex-direction: column;
        align-items: flex-start;
    }
}
