/* =========================================
   COMMON HEADER / NAVIGATION CDIT
========================================= */

.main-navbar {
    display: flex;
    align-items: center;
    width: 100%;
}

.main-navbar .navbar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    float: none;
}

.navbar-brand img {
    max-height: 75px;
}

/* Hamburger button */
.navbar-toggler {
    padding: 8px;
    border: 0;
    background: transparent;
}

.navbar-toggler:focus {
    outline: none;
    box-shadow: none;
}

.navbar-toggler .icon-bar {
    display: block;
    width: 26px;
    height: 3px;
    margin: 5px 0;
    border-radius: 2px;
    background: #222222;
}


/* =========================================
   DESKTOP NAVIGATION
========================================= */

@media (min-width: 992px) {

    .main-navbar {
        justify-content: space-between;
    }

    .main-navbar .navbar-header {
        width: auto;
        flex-shrink: 0;
    }

    /* Make mobile offcanvas work as a standard desktop menu */
    .main-slide-menu {
        position: static !important;
        display: block !important;
        visibility: visible !important;
        transform: none !important;
        width: auto !important;
        max-width: none !important;
        height: auto !important;
        overflow: visible !important;
        border: 0 !important;
        background: transparent !important;
        flex: 1 1 auto;
    }

    .main-slide-menu .offcanvas-header {
        display: none !important;
    }

    .main-slide-menu .offcanvas-body {
        display: flex !important;
        align-items: center;
        justify-content: flex-end;
        padding: 0;
        overflow: visible;
    }

    .navbar-nav-main {
        display: flex !important;
        align-items: center;
        flex-direction: row;
        margin: 0;
    }

    .navbar-nav-main > li {
        position: relative;
        float: none;
    }

    .navbar-nav-main > li > a,
    .nav-actions > li > a {
        display: block;
        padding: 18px 12px;
    }

    .nav-actions {
        display: flex !important;
        align-items: center;
        flex-direction: row;
        margin: 0 0 0 auto !important;
    }

    .nav-actions > li {
        float: none;
    }
}


/* =========================================
   MOBILE SLIDING MENU
========================================= */

@media (max-width: 991.98px) {

    .main-navbar {
        justify-content: space-between;
    }

    .main-navbar .navbar-header {
        width: 100%;
    }

    .main-slide-menu {
        width: 300px !important;
        max-width: 85% !important;
        background: #ffffff;
        top:35px !important;
    }

    .main-slide-menu .offcanvas-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px;
        border-bottom: 1px solid #eeeeee;
    }

    .offcanvas-logo img {
        max-height: 65px;
    }

    .main-slide-menu .offcanvas-body {
        padding: 0;
        overflow-y: auto;
    }

    /* Bootstrap 3 compatibility */
    .main-slide-menu .navbar-right {
        float: none !important;
    }

    .main-slide-menu .navbar-nav-main,
    .main-slide-menu .nav-actions {
        display: block !important;
        width: 100%;
        margin: 0 !important;
        padding: 0;
    }

    .main-slide-menu .navbar-nav-main > li,
    .main-slide-menu .nav-actions > li {
        display: block !important;
        float: none !important;
        width: 100%;
        border-bottom: 1px solid #f1f1f1;
    }

    .main-slide-menu .navbar-nav-main > li > a,
    .main-slide-menu .nav-actions > li > a {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 10px 18px;
        color: #222222;
        font-size: 15px;
        text-decoration: none;
    }

    .main-slide-menu .navbar-nav-main > li > a:hover,
    .main-slide-menu .nav-actions > li > a:hover {
        color: #b1322d;
        background: #f7f7f7;
    }

    /* Mobile dropdown submenu */
    .main-slide-menu .navbar-nav .dropdown-menu {
        position: static !important;
        display: none;
        float: none !important;
        transform: none !important;
        width: 100% !important;
        min-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        background: #f8f8f8;
    }

    .main-slide-menu .navbar-nav .dropdown.show > .dropdown-menu {
        display: block;
    }

    .main-slide-menu .navbar-nav .dropdown-menu li {
        width: 100%;
    }

    .main-slide-menu .navbar-nav .dropdown-menu li a {
        display: block;
        /* padding: 10px 18px 10px 36px; */
        color: #333333;
        font-size: 14px;
        text-decoration: none;
        border-top: 1px solid #eeeeee;
    }

    .main-slide-menu .navbar-nav .dropdown-menu li a:hover {
        color: #b1322d;
        background: #efefef;
    }

    .main-slide-menu .nav-actions {
        margin-top: 10px !important;
        border-top: 1px solid #dddddd;
    }
}


/* =========================================
   TOP BAR: GOVERNMENT LINK / LANGUAGE / SOCIAL
========================================= */

.topbar,
.topbar .container,
.topbar .row,
.topbar [class*="col-"] {
    overflow: visible;
}

.topbar {
    position: relative;
    z-index: 2000;
}

.topbar .row {
    align-items: center;
}

/* Left Government of Kerala section */
.left-links {
    margin: 0;
    padding: 0;
    list-style: none;
}

.left-links li a {
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}


/* Right language switcher and social icons */
.topbar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    float: right;
    min-height: 40px;
    white-space: nowrap;
}

/* Social media icons */
.topbar-right .footer-social {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
    list-style: none;
}

.topbar-right .footer-social li {
    display: block;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.topbar-right .footer-social li a {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
}


/* =========================================
   TOP BAR LANGUAGE SWITCHER
========================================= */

.topbar-language {
    position: relative;
    z-index: 3000;
}

.topbar-language-toggle {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 4px 0;
    border: 0;
    background: transparent;
    color: #ffffff;
    font: inherit;
    cursor: pointer;
    white-space: nowrap;
}

.topbar-language-toggle:focus {
    outline: none;
}

.topbar-language-toggle .language-label {
    display: flex;
    align-items: center;
    gap: 7px;
}

.topbar-language-toggle .language-arrow {
    font-size: 10px;
    transition: transform 0.2s ease;
}

.topbar-language.language-open .language-arrow {
    transform: rotate(180deg);
}


/* Language dropdown - vertical layout */
.topbar-language-submenu {
    position: absolute;
    top: calc(100% + 7px);
    right: 0;
    z-index: 3100;
    display: none;
    width: 180px;
    margin: 0;
    padding: 0;
    list-style: none;
    text-align: left;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

.topbar-language.language-open .topbar-language-submenu {
    display: block !important;
}

.topbar-language-submenu li {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #eeeeee;
}

.topbar-language-submenu li:last-child {
    border-bottom: 0;
}

.topbar-language-submenu li a {
    display: flex;
    align-items: center;
    gap: 9px;
    width: 100%;
    padding: 10px 12px;
    color: #333333;
    text-decoration: none;
    white-space: nowrap;
}

.topbar-language-submenu li a:hover {
    color: #b1322d;
    background: #f5f5f5;
}

.topbar-language-submenu img {
    width: 20px;
    height: auto;
}


/* =========================================
   SMALL MOBILE TOP BAR - KEEP ONE ROW
========================================= */

@media (max-width: 575.98px) {

    .topbar {
        padding: 5px 0;
    }

    .topbar .row {
        display: flex;
        flex-wrap: nowrap;
    }

    .topbar .row > [class*="col-"] {
        flex: 0 0 50%;
        width: 50%;
        max-width: 50%;
    }

    .left-links li a {
        gap: 4px;
        font-size: 10px;
    }

    .left-links li a img {
        width: 22px !important;
    }

    .topbar-right {
        gap: 5px;
        min-height: auto;
    }

    .topbar-language-toggle {
        padding: 2px 0;
        font-size: 11px;
    }

    /* Hide only text, retain globe icon on very small screens */
    .topbar-language-toggle .topbar-lang-text {
        display: none;
    }

    .topbar-right .footer-social {
        gap: 2px;
    }

    .topbar-right .footer-social li a {
        width: 19px;
        height: 19px;
        font-size: 10px;
    }

    .topbar-language-submenu {
        right: 0;
        left: auto;
        width: 165px;
    }
}


/* FORCE LANGUAGE DROPDOWN OPTIONS TO SHOW VERTICALLY */
.topbar-language-submenu {
    display: none !important;
    flex-direction: column !important;
    align-items: stretch !important;
    width: 180px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.topbar-language.language-open .topbar-language-submenu {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
}

.topbar-language-submenu li {
    display: block !important;
    float: none !important;
    width: 100% !important;
    flex: 0 0 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-right: 0 !important;
    border-bottom: 1px solid #eeeeee !important;
}

.topbar-language-submenu li:last-child {
    border-bottom: 0 !important;
}

.topbar-language-submenu li a {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    gap: 9px;
    padding: 10px 12px !important;
    white-space: nowrap;
}

@media (max-width: 991.98px) {

    .main-slide-menu .navbar-nav-main .dropdown-menu {
        display: none !important;
    }

    .main-slide-menu .navbar-nav-main .dropdown.show > .dropdown-menu {
        display: block !important;
    }

    .main-slide-menu .navbar-nav-main .dropdown-toggle {
        cursor: pointer;
    }
}


/* =========================================
   KERALA CM PROFILE PAGE
========================================= */

.cm-profile-page {
    background: #ffffff;
    color: #222;
}

/* Hero */
.cm-profile-hero {
    padding: 35px;
    border-radius: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #f7f1ed 100%);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.cm-photo-card {
    padding: 10px;
    border-radius: 22px;
    background: #ffffff;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}

.cm-photo-card img {
    width: 100%;
    border-radius: 18px;
    object-fit: cover;
}

.cm-profile-content {
    padding: 10px 10px 10px 20px;
}

.cm-badge {
    display: inline-block;
    margin-bottom: 14px;
    padding: 7px 14px;
    border-radius: 50px;
    background: #8b1d2c;
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.cm-name {
    margin-bottom: 8px;
    color: #1f2d3d;
    font-size: 42px;
    font-weight: 800;
    line-height: 1.15;
}

.cm-subtitle {
    margin-bottom: 18px;
    color: #8b1d2c;
    font-weight: 600;
}

.cm-intro {
    max-width: 760px;
    color: #555;
    font-size: 16px;
    line-height: 1.8;
}

/* Info Grid */
.cm-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.cm-info-item {
    padding: 16px;
    border-radius: 16px;
    background: #ffffff;
    border-left: 4px solid #8b1d2c;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.06);
}

.cm-info-item span {
    display: block;
    margin-bottom: 5px;
    color: #777;
    font-size: 13px;
}

.cm-info-item strong {
    color: #222;
    font-size: 15px;
}

/* Section Cards */
.cm-section-card {
    padding: 28px;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.07);
}

.cm-section-card h3 {
    margin-bottom: 18px;
    color: #1f2d3d;
    font-size: 24px;
    font-weight: 700;
}

.cm-section-card p {
    color: #555;
    line-height: 1.8;
}

/* Profile List */
.cm-profile-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cm-profile-list li {
    padding: 13px 0;
    border-bottom: 1px solid #eeeeee;
}

.cm-profile-list li:last-child {
    border-bottom: 0;
}

.cm-profile-list span {
    display: block;
    color: #777;
    font-size: 13px;
}

.cm-profile-list strong {
    color: #222;
    font-size: 15px;
}

/* Section Title */
.cm-section-title span {
    display: inline-block;
    margin-bottom: 8px;
    color: #8b1d2c;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cm-section-title h2 {
    color: #1f2d3d;
    font-size: 34px;
    font-weight: 800;
}

/* Feature Cards */
.cm-feature-card {
    height: 100%;
    padding: 26px 22px;
    border-radius: 20px;
    text-align: center;
    background: #ffffff;
    transition: all 0.25s ease;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.07);
}

.cm-feature-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 34px rgba(0, 0, 0, 0.12);
}

.cm-feature-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    margin: 0 auto 18px;
    border-radius: 18px;
    background: #8b1d2c;
    color: #ffffff;
    font-size: 24px;
}

.cm-feature-card h5 {
    margin-bottom: 10px;
    color: #1f2d3d;
    font-weight: 700;
}

.cm-feature-card p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* Timeline */
.cm-timeline {
    position: relative;
    padding-left: 5px;
}

.cm-timeline-item {
    display: flex;
    gap: 15px;
    margin-bottom: 22px;
}

.cm-timeline-item:last-child {
    margin-bottom: 0;
}

.cm-timeline-dot {
    flex: 0 0 14px;
    width: 14px;
    height: 14px;
    margin-top: 5px;
    border-radius: 50%;
    background: #8b1d2c;
    box-shadow: 0 0 0 5px rgba(139, 29, 44, 0.12);
}

.cm-timeline-item h6 {
    margin-bottom: 5px;
    color: #1f2d3d;
    font-weight: 700;
}

.cm-timeline-item p {
    margin: 0;
    color: #666;
}

/* Quote Card */
.cm-quote-card {
    padding: 35px;
    border-radius: 20px;
    background: linear-gradient(135deg, #8b1d2c 0%, #b83a48 100%);
    color: #ffffff;
    box-shadow: 0 12px 32px rgba(139, 29, 44, 0.25);
}

.cm-quote-card i {
    margin-bottom: 20px;
    font-size: 36px;
    opacity: 0.85;
}

.cm-quote-card h3 {
    margin-bottom: 25px;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.45;
    color: #dddddd;
}

.cm-quote-card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
}

/* Responsive */
@media (max-width: 991.98px) {
    .cm-profile-content {
        padding: 10px 0 0;
    }

    .cm-name {
        font-size: 34px;
    }

    .cm-info-grid {
        grid-template-columns: 1fr;
    }

    .cm-section-title h2 {
        font-size: 28px;
    }
}

@media (max-width: 575.98px) {
    .cm-profile-hero {
        padding: 22px;
        border-radius: 18px;
    }

    .cm-name {
        font-size: 28px;
    }

    .cm-intro {
        font-size: 15px;
    }

    .cm-section-card,
    .cm-quote-card {
        padding: 22px;
        border-radius: 16px;
    }

    .cm-quote-card h3 {
        font-size: 22px;
    }
}


/* Chief Minister Portfolio Tags */
.portfolio-title-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #8b1d2c;
    color: #ffffff;
    font-size: 18px;
}

.portfolio-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.portfolio-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 13px;
    border: 1px solid #ead5d8;
    border-radius: 50px;
    background: #fff8f8;
    color: #7c1a28;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.3;
    transition: all 0.2s ease;
}

.portfolio-tag:hover {
    background: #8b1d2c;
    border-color: #8b1d2c;
    color: #ffffff;
}

@media (max-width: 575.98px) {
    .portfolio-list {
        gap: 7px;
    }

    .portfolio-tag {
        padding: 7px 10px;
        font-size: 12px;
    }
}


/* =========================================
   FLAGSHIP PROJECTS PAGE
========================================= */

.flagship-projects-page {
    background: #f5f7fb;
    color: #1f2d3d;
}

.flagship-hero {
    position: relative;
    overflow: hidden;
    padding: 42px;
    border-radius: 24px;
    background: linear-gradient(135deg, #7d1427 0%, #a9283b 55%, #cc4b5b 100%);
    color: #ffffff;
    box-shadow: 0 16px 38px rgba(125, 20, 39, 0.22);
}

.flagship-hero::after {
    position: absolute;
    top: -95px;
    right: -55px;
    width: 280px;
    height: 280px;
    border: 35px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    content: "";
}

.flagship-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    padding: 7px 13px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 13px;
    font-weight: 600;
}

.flagship-hero h1 {
    margin-bottom: 8px;
    font-size: clamp(30px, 4vw, 47px);
    font-weight: 800;
    line-height: 1.15;
}

.flagship-hero .white-text {
  color: #fff;
} 

.flagship-year {
    margin-bottom: 16px;
    color: #ffe1e5;
    font-size: 19px;
    font-weight: 700;
}

.flagship-intro {
    max-width: 750px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    line-height: 1.75;
}

.flagship-hero-stat {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    min-height: 150px;
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.11);
    backdrop-filter: blur(4px);
}

.flagship-hero-stat .stat-number {
    font-size: 70px;
    font-weight: 800;
    line-height: 1;
}

.flagship-hero-stat .stat-label {
    color: #ffe4e7;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

/* Project Cards */

.flagship-card {
    display: flex;
    flex-direction: column;
    padding: 25px;
    border: 1px solid #e8eaf0;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(26, 46, 70, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.flagship-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 34px rgba(26, 46, 70, 0.13);
}

.flagship-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}

.project-number {
    color: #b1283c29;
    font-size: 80px;
    font-weight: 600;
    letter-spacing: 1px;
}

.project-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 15px;
    background: #fcecef;
    color: #9c1f31;
    font-size: 50px;
}

.flagship-card h3 {
    margin-bottom: 12px;
    color: #1f2d3d;
    font-size: 21px;
    font-weight: 750;
    line-height: 1.35;
}

.flagship-card p {
    margin-bottom: 22px;
    color: #647180;
    font-size: 14px;
    line-height: 1.7;
}

.project-allocation,
.project-category {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #edf0f4;
}

.project-allocation span {
    color: #6e7783;
    font-size: 13px;
}

.project-allocation strong {
    color: #991d30;
    font-size: 17px;
    font-weight: 800;
}

.project-category {
    justify-content: flex-start;
    color: #8a3e49;
    font-size: 13px;
    font-weight: 600;
}

.project-category i {
    color: #b3263b;
    font-size: 8px;
}

/* Responsive */

@media (max-width: 991.98px) {
    .flagship-hero {
        padding: 30px;
    }

    .flagship-hero-stat {
        justify-content: flex-start;
        min-height: auto;
    }
}

@media (max-width: 575.98px) {
    .flagship-hero {
        padding: 24px;
        border-radius: 18px;
    }

    .flagship-hero-stat .stat-number {
        font-size: 54px;
    }

    .flagship-card {
        padding: 21px;
        border-radius: 17px;
    }

    .flagship-card h3 {
        font-size: 19px;
    }
}

/* =========================================
   CM PHOTO GALLERY CARD
========================================= */

.cm-photo-gallery-card {
    overflow: hidden;
}

.cm-photo-gallery-card h3 {
    color: #1f2d3d;
    font-weight: 700;
}

.gallery-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 50px;
    background: #fcecef;
    color: #8b1d2c;
    font-size: 12px;
    font-weight: 600;
}

/* Carousel wrapper */
.instagram-gallery-carousel {
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
}

/* Mobile-friendly poster ratio */
.instagram-gallery-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #ffffff;
}

/* Show full poster without cropping */
.instagram-gallery-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #ffffff;
}

/* Optional caption */
.gallery-caption {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 35px 16px 14px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.68), transparent);
    color: #ffffff;
    font-size: 13px;
    font-weight: 500;
}

.gallery-caption span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

/* Bottom slider dots */
.instagram-gallery-carousel .carousel-indicators {
    bottom: 12px;
    margin: 0;
}

.instagram-gallery-carousel .carousel-indicators button {
    width: 7px;
    height: 7px;
    margin: 0 4px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background-color: #ffffff;
    opacity: 0.65;
    transition: all 0.25s ease;
}

.instagram-gallery-carousel .carousel-indicators button.active {
    width: 22px;
    border-radius: 10px;
    background-color: #8b1d2c;
    opacity: 1;
}

/* Hide previous / next buttons if present */
.instagram-gallery-carousel .carousel-control-prev,
.instagram-gallery-carousel .carousel-control-next {
    display: none !important;
}

/* Mobile adjustments */
@media (max-width: 575.98px) {
    .gallery-caption {
        padding: 28px 13px 12px;
        font-size: 12px;
    }

    .instagram-gallery-carousel .carousel-indicators {
        bottom: 10px;
    }

    .instagram-gallery-carousel .carousel-indicators button {
        width: 6px;
        height: 6px;
        margin: 0 3px;
    }

    .instagram-gallery-carousel .carousel-indicators button.active {
        width: 18px;
    }
}

/* Custom gallery slider */
.instagram-gallery-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
}

.gallery-slides {
    position: relative;
}

.gallery-slide {
    display: none;
    animation: galleryFade 0.45s ease;
}

.gallery-slide.active {
    display: block;
}

@keyframes galleryFade {
    from {
        opacity: 0.25;
    }

    to {
        opacity: 1;
    }
}

/* 4:5 Portrait Poster Ratio */
.instagram-gallery-image {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    background: #ffffff;
}

.instagram-gallery-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: #ffffff;
}

/* Bottom dots */
.gallery-dots {
    position: absolute;
    right: 0;
    bottom: 12px;
    left: 0;
    z-index: 5;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.gallery-dots button {
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #ffffff;
    opacity: 0.65;
    cursor: pointer;
    transition: all 0.25s ease;
}

.gallery-dots button.active {
    width: 22px;
    border-radius: 10px;
    background: #8b1d2c;
    opacity: 1;
}

@media (max-width: 575.98px) {
    .gallery-dots {
        bottom: 10px;
        gap: 6px;
    }

    .gallery-dots button {
        width: 6px;
        height: 6px;
    }

    .gallery-dots button.active {
        width: 18px;
    }
}

/* Enable horizontal swipe while allowing normal vertical page scroll */
#cmPhotoGallery {
    touch-action: pan-y;
    cursor: grab;
    -webkit-user-select: none;
    user-select: none;
}

#cmPhotoGallery:active {
    cursor: grabbing;
}

#cmPhotoGallery img {
    -webkit-user-drag: none;
    user-select: none;
    pointer-events: none;
}


/* =========================================
   FLAGSHIP PROJECTS - HOME PAGE DASHBOARD
========================================= */

.flagship-dashboard-section {
    background: #fcfdfc;
}

.dashboard-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    padding: 6px 11px;
    border-radius: 50px;
    background: #fcecef;
    color: #8b1d2c;
    font-size: 12px;
    font-weight: 700;
}

.dashboard-heading h2 {
    margin-bottom: 8px;
    color: #1f2d3d;
    font-size: clamp(28px, 3vw, 38px);
    font-weight: 800;
}

.dashboard-heading p {
    color: #697586;
    font-size: 15px;
}

.dashboard-heading-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-update {
    padding: 10px 13px;
    border: 1px solid #e6eaf0;
    border-radius: 10px;
    background: #ffffff;
    color: #697586;
    font-size: 13px;
    white-space: nowrap;
}

.dashboard-update i {
    margin-right: 6px;
    color: #8b1d2c;
}

.btn-full-dashboard {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 11px 16px;
    border: 1px solid #8b1d2c;
    border-radius: 10px;
    background: #8b1d2c;
    color: #ffffff;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.btn-full-dashboard:hover {
    border-color: #67111f;
    background: #67111f;
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-full-dashboard i {
    font-size: 12px;
}

.dashboard-stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 19px;
    border: 1px solid #e5e9ef;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(31, 45, 61, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.dashboard-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 13px 26px rgba(31, 45, 61, 0.1);
}

.dashboard-stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 47px;
    height: 47px;
    border-radius: 14px;
    font-size: 19px;
}

.icon-maroon {
    background: #fcecef;
    color: #8b1d2c;
}

.icon-blue {
    background: #e9f1ff;
    color: #1b5ca9;
}

.icon-green {
    background: #e7f7ee;
    color: #16754b;
}

.icon-gold {
    background: #fff4dc;
    color: #b87900;
}

.dashboard-stat-card span {
    display: block;
    margin-bottom: 3px;
    color: #697586;
    font-size: 12px;
}

.dashboard-stat-card strong {
    display: block;
    color: #1f2d3d;
    font-size: 22px;
    font-weight: 800;
}

.dashboard-panel {
    padding: 24px;
    border: 1px solid #e5e9ef;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 7px 20px rgba(31, 45, 61, 0.05);
}

.dashboard-panel-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.dashboard-panel-head h3 {
    margin-bottom: 5px;
    color: #1f2d3d;
    font-size: 20px;
    font-weight: 750;
}

.dashboard-panel-head p {
    margin-bottom: 0;
    color: #7b8593;
    font-size: 13px;
}

.dashboard-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 10px;
    border-radius: 50px;
    background: #fcecef;
    color: #8b1d2c;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}

.dashboard-chart-wrap {
    position: relative;
    height: 320px;
}

.dashboard-donut-wrap {
    position: relative;
    max-width: 260px;
    height: 225px;
    margin: auto;
}

.sector-legend {
    display: grid;
    gap: 9px;
    margin-top: 16px;
    color: #596575;
    font-size: 12px;
}

.legend-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    margin-right: 7px;
    border-radius: 50%;
}

.legend-maroon {
    background: #8b1d2c;
}

.legend-blue {
    background: #2f71c1;
}

.legend-green {
    background: #1e9b62;
}

.legend-gold {
    background: #d39c28;
}


/* =========================================
   FLAGSHIP PROJECTS - FULL DASHBOARD PAGE
========================================= */

.full-dashboard-page {
    background: #f4f6fa;
    color: #263444;
}

.dashboard-hero {
    position: relative;
    overflow: hidden;
    padding: 42px;
    border-radius: 22px;
    background: linear-gradient(135deg, #781426 0%, #9f2639 55%, #bd4252 100%);
    color: #ffffff;
    box-shadow: 0 14px 35px rgba(111, 17, 37, 0.22);
}

.dashboard-hero::before {
    position: absolute;
    top: -120px;
    right: -80px;
    width: 320px;
    height: 320px;
    border: 42px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    content: "";
}

.dashboard-hero::after {
    position: absolute;
    bottom: -100px;
    left: 42%;
    width: 230px;
    height: 230px;
    border: 28px solid rgba(255, 255, 255, 0.06);
    border-radius: 50%;
    content: "";
}

.dashboard-breadcrumb {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}

.dashboard-breadcrumb a {
    color: #ffffff;
    text-decoration: none;
}

.dashboard-kicker-light {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    padding: 7px 12px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 12px;
    font-weight: 700;
}

.dashboard-hero h1 {
    position: relative;
    z-index: 1;
    margin-bottom: 10px;
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 800;
    line-height: 1.15;
}

.dashboard-hero p {
    position: relative;
    z-index: 1;
    max-width: 770px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 15px;
    line-height: 1.75;
}

.dashboard-hero-action {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 24px;
    padding: 11px 15px;
    border: 1px solid #ffffff;
    border-radius: 9px;
    background: #ffffff;
    color: #7d172a;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
}

.dashboard-hero-action:hover {
    background: transparent;
    color: #ffffff;
    transform: translateY(-2px);
}

.dashboard-live-status {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.1);
    text-align: center;
}

.dashboard-live-status strong {
    display: block;
    font-size: 52px;
    font-weight: 800;
    line-height: 1;
}

.dashboard-live-status span {
    display: block;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.dashboard-kpi-card {
    height: 100%;
    padding: 20px;
    border: 1px solid #e3e8ee;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(31, 45, 61, 0.05);
}

.dashboard-kpi-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 17px;
}

.dashboard-kpi-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 13px;
    font-size: 18px;
}

.kpi-maroon {
    background: #fcecef;
    color: #8b1d2c;
}

.kpi-blue {
    background: #eaf2ff;
    color: #2d6fbe;
}

.kpi-green {
    background: #e7f7ee;
    color: #1c8c59;
}

.kpi-gold {
    background: #fff4df;
    color: #b27a0b;
}

.dashboard-kpi-card span {
    display: block;
    margin-bottom: 5px;
    color: #7a8794;
    font-size: 12px;
}

.dashboard-kpi-card strong {
    display: block;
    color: #1e2c3b;
    font-size: 26px;
    font-weight: 800;
}

.dashboard-kpi-card small {
    display: block;
    margin-top: 7px;
    color: #94a0ad;
    font-size: 11px;
}

.dashboard-content-card {
    height: 100%;
    padding: 24px;
    border: 1px solid #e3e8ee;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 7px 20px rgba(31, 45, 61, 0.05);
}

.dashboard-content-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.dashboard-content-card-head h3 {
    margin: 0 0 5px;
    color: #1e2c3b;
    font-size: 20px;
    font-weight: 800;
}

.dashboard-content-card-head p {
    margin: 0;
    color: #7b8794;
    font-size: 13px;
}

.dashboard-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 9px;
    border-radius: 50px;
    background: #fcecef;
    color: #8b1d2c;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    white-space: nowrap;
}

.dashboard-chart-large,
.dashboard-chart-medium,
.dashboard-chart-small {
    position: relative;
}

.dashboard-chart-large {
    height: 340px;
}

.dashboard-chart-medium {
    height: 270px;
}

.dashboard-chart-small {
    height: 220px;
}

.dashboard-sector-list {
    display: grid;
    gap: 10px;
    margin-top: 16px;
}

.dashboard-sector-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #697584;
    font-size: 12px;
}

.dashboard-sector-list span:first-child {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sector-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.dot-maroon {
    background: #8b1d2c;
}

.dot-blue {
    background: #2f71c1;
}

.dot-green {
    background: #1e9b62;
}

.dot-gold {
    background: #d39c28;
}

.dashboard-filter-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 20px;
    padding: 18px;
    border: 1px solid #e5eaf0;
    border-radius: 14px;
    background: #ffffff;
}

.dashboard-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.dashboard-filter-btn {
    padding: 8px 12px;
    border: 1px solid #e1e6ed;
    border-radius: 8px;
    background: #ffffff;
    color: #617080;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.dashboard-filter-btn:hover,
.dashboard-filter-btn.active {
    border-color: #8b1d2c;
    background: #8b1d2c;
    color: #ffffff;
}

.dashboard-search {
    position: relative;
    min-width: 260px;
}

.dashboard-search i {
    position: absolute;
    top: 50%;
    left: 13px;
    color: #8b95a1;
    font-size: 13px;
    transform: translateY(-50%);
}

.dashboard-search input {
    width: 100%;
    padding: 10px 12px 10px 35px;
    border: 1px solid #dfe5ec;
    border-radius: 8px;
    outline: none;
    color: #263444;
    font-size: 13px;
}

.dashboard-search input:focus {
    border-color: #8b1d2c;
    box-shadow: 0 0 0 3px rgba(139, 29, 44, 0.08);
}

.dashboard-project-table-wrap {
    overflow-x: auto;
    border: 1px solid #e6ebf0;
    border-radius: 15px;
    background: #ffffff;
}

.dashboard-project-table {
    width: 100%;
    min-width: 980px;
    margin: 0;
    border-collapse: collapse;
}

.dashboard-project-table th {
    padding: 14px 16px;
    border-bottom: 1px solid #e6ebf0;
    background: #f8fafc;
    color: #788493;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.3px;
    text-align: left;
    text-transform: uppercase;
}

.dashboard-project-table td {
    padding: 15px 16px;
    border-bottom: 1px solid #eef1f4;
    color: #5e6c7b;
    font-size: 13px;
    vertical-align: middle;
}

.dashboard-project-table tbody tr:last-child td {
    border-bottom: 0;
}

.dashboard-project-table tbody tr:hover {
    background: #fcfdff;
}

.project-table-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.project-table-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fcecef;
    color: #8b1d2c;
    font-size: 14px;
}

.project-table-title strong {
    display: block;
    color: #263444;
    font-size: 13px;
    font-weight: 800;
}

.project-table-title small {
    display: block;
    margin-top: 2px;
    color: #8b96a3;
    font-size: 11px;
}

.dashboard-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 5px;
    border-radius: 50px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}

.dashboard-status::before {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    content: "";
}

.dashboard-status.progress {
    background: #e8f7ef;
    color: #197548;
}

.dashboard-status.progress::before {
    background: #1f9660;
}

.dashboard-status.planning {
    background: #fff4dd;
    color: #9d6d08;
}

.dashboard-status.planning::before {
    background: #d39c28;
}

.table-progress {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 145px;
}

.table-progress-line {
    flex: 1;
    height: 7px;
    overflow: hidden;
    border-radius: 50px;
    background: #edf1f4;
}

.table-progress-line span {
    display: block;
    height: 100%;
    border-radius: 50px;
    background: #8b1d2c;
}

.table-progress strong {
    min-width: 33px;
    color: #263444;
    font-size: 12px;
    text-align: right;
}

.dashboard-insight-card {
    position: relative;
    overflow: hidden;
    padding: 25px;
    border-radius: 17px;
    background: linear-gradient(135deg, #1d3855, #254d71);
    color: #ffffff;
}

.dashboard-insight-card::after {
    position: absolute;
    right: -50px;
    bottom: -65px;
    width: 180px;
    height: 180px;
    border: 28px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    content: "";
}

.dashboard-insight-card > * {
    position: relative;
    z-index: 1;
}

.insight-kicker {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 13px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.dashboard-insight-card h3 {
    margin-bottom: 11px;
    color: #ffffff;
    font-size: 24px;
    font-weight: 800;
}

.dashboard-insight-card p {
    margin-bottom: 20px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    line-height: 1.7;
}

.insight-list {
    display: grid;
    gap: 10px;
}

.insight-list div {
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 12px;
}

.insight-list i {
    color: #f6c568;
}

.dashboard-milestone-list {
    display: grid;
    gap: 14px;
}

.dashboard-milestone-item {
    display: flex;
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid #eef1f4;
}

.dashboard-milestone-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.milestone-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fcecef;
    color: #8b1d2c;
    font-size: 13px;
}

.dashboard-milestone-item strong {
    display: block;
    margin-bottom: 3px;
    color: #2a3948;
    font-size: 13px;
}

.dashboard-milestone-item p {
    margin: 0;
    color: #7c8794;
    font-size: 12px;
    line-height: 1.5;
}


/* =========================================
   RESPONSIVE
========================================= */

@media (max-width: 991.98px) {
    .dashboard-heading-actions {
        justify-content: flex-start;
    }

    .dashboard-hero {
        padding: 30px;
    }

    .dashboard-live-status {
        justify-content: flex-start;
        text-align: left;
    }
}

@media (max-width: 767.98px) {
    .dashboard-hero {
        padding: 24px;
        border-radius: 17px;
    }

    .dashboard-filter-panel {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-search {
        min-width: 100%;
    }

    .dashboard-chart-large {
        height: 300px;
    }

    .dashboard-content-card {
        padding: 18px;
    }
}

@media (max-width: 575.98px) {
    .dashboard-heading-actions {
        width: 100%;
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-update,
    .btn-full-dashboard {
        width: 100%;
    }

    .btn-full-dashboard {
        padding: 13px 16px;
    }

    .dashboard-panel {
        padding: 18px;
    }

    .dashboard-chart-wrap {
        height: 270px;
    }

    .dashboard-panel-head {
        flex-direction: column;
    }

    .dashboard-kpi-card strong {
        font-size: 22px;
    }

    .dashboard-live-status strong {
        font-size: 44px;
    }
}

/* =========================================
   DASHBOARD OVERLAP FIX
   Add at the END of the stylesheet
========================================= */

.full-dashboard-page {
    overflow: hidden;
}

/* Prevent background circles from overlapping dashboard content */
.dashboard-hero {
    isolation: isolate;
}

.dashboard-hero::before,
.dashboard-hero::after {
    z-index: -1;
    pointer-events: none;
}

.dashboard-hero .row,
.dashboard-hero .col-lg-8,
.dashboard-hero .col-lg-4,
.dashboard-hero h1,
.dashboard-hero p,
.dashboard-hero-action,
.dashboard-breadcrumb,
.dashboard-kicker-light,
.dashboard-live-status {
    position: relative;
    z-index: 2;
}

/* Keep hero status card correctly positioned */
.dashboard-live-status {
    width: 100%;
    min-height: 170px;
    overflow: hidden;
}

/* Prevent Bootstrap columns and cards from crossing into each other */
.full-dashboard-page .row > [class*="col-"] {
    min-width: 0;
}

.dashboard-content-card,
.dashboard-kpi-card,
.dashboard-insight-card {
    min-width: 0;
}

/* Chart containers */
.dashboard-chart-large,
.dashboard-chart-medium,
.dashboard-chart-small {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.dashboard-chart-large canvas,
.dashboard-chart-medium canvas,
.dashboard-chart-small canvas {
    display: block !important;
    max-width: 100% !important;
    max-height: 100% !important;
}

/* Table should scroll horizontally instead of overlapping */
.dashboard-project-table-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Avoid content overlap inside table columns */
.dashboard-project-table td {
    white-space: normal;
    word-break: normal;
}

.dashboard-project-table td:nth-child(6) {
    min-width: 260px;
    line-height: 1.55;
}

/* Better spacing for section rows */
.full-dashboard-page .row.g-4 {
    --bs-gutter-x: 1.5rem;
    --bs-gutter-y: 1.5rem;
}

/* Tablet */
@media (max-width: 1199.98px) {
    .dashboard-hero::after {
        left: 60%;
    }

    .dashboard-chart-large {
        height: 310px;
    }
}

/* Mobile */
@media (max-width: 767.98px) {
    .full-dashboard-page {
        padding-top: 25px !important;
        padding-bottom: 25px !important;
    }

    .dashboard-hero {
        padding: 24px 20px;
    }

    .dashboard-hero::before {
        top: -95px;
        right: -120px;
        width: 250px;
        height: 250px;
    }

    .dashboard-hero::after {
        display: none;
    }

    .dashboard-live-status {
        min-height: 125px;
        padding: 20px;
    }

    .dashboard-live-status strong {
        font-size: 42px;
    }

    .dashboard-content-card {
        overflow: hidden;
    }

    .dashboard-content-card-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-chart-large {
        height: 270px;
    }

    .dashboard-chart-medium {
        height: 240px;
    }

    .dashboard-chart-small {
        height: 210px;
    }
}


/* =========================================
   FINAL DASHBOARD LAYOUT FIX
   Keep this at the END of dashboard CSS
========================================= */

.full-dashboard-page,
.full-dashboard-page * {
    box-sizing: border-box;
}

/* Stop old theme CSS from affecting dashboard rows/columns */
.full-dashboard-page .container,
.full-dashboard-page .row,
.full-dashboard-page [class*="col-"] {
    position: relative;
}

.full-dashboard-page .row {
    display: flex;
    flex-wrap: wrap;
}

.full-dashboard-page .row > [class*="col-"] {
    display: flex;
    min-width: 0;
}

/* Every dashboard card must stay inside its Bootstrap column */
.full-dashboard-page .dashboard-kpi-card,
.full-dashboard-page .dashboard-content-card,
.full-dashboard-page .dashboard-insight-card,
.full-dashboard-page .dashboard-live-status {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    float: none !important;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
}

/* Make full-height cards work properly inside Bootstrap columns */
.full-dashboard-page .dashboard-kpi-card,
.full-dashboard-page .dashboard-content-card,
.full-dashboard-page .dashboard-insight-card {
    height: 100%;
}

/* Disable hero background circles causing overlap */
.full-dashboard-page .dashboard-hero::before,
.full-dashboard-page .dashboard-hero::after {
    display: none !important;
}

.full-dashboard-page .dashboard-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

/* Keep hero content above the background */
.full-dashboard-page .dashboard-hero .row,
.full-dashboard-page .dashboard-hero h1,
.full-dashboard-page .dashboard-hero p,
.full-dashboard-page .dashboard-hero a,
.full-dashboard-page .dashboard-breadcrumb,
.full-dashboard-page .dashboard-kicker-light,
.full-dashboard-page .dashboard-live-status {
    position: relative;
    z-index: 2;
}

/* Fix Chart.js canvas overflow */
.full-dashboard-page .dashboard-chart-large,
.full-dashboard-page .dashboard-chart-medium,
.full-dashboard-page .dashboard-chart-small {
    position: relative;
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.full-dashboard-page .dashboard-chart-large canvas,
.full-dashboard-page .dashboard-chart-medium canvas,
.full-dashboard-page .dashboard-chart-small canvas {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}

/* Ensure dashboard table stays inside card */
.full-dashboard-page .dashboard-project-table-wrap {
    position: relative;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
}

/* Avoid long text pushing or covering other columns */
.full-dashboard-page .dashboard-project-table td,
.full-dashboard-page .dashboard-project-table th {
    white-space: normal;
    overflow-wrap: break-word;
    word-break: normal;
}

/* Mobile layout */
@media (max-width: 767.98px) {
    .full-dashboard-page .row > [class*="col-"] {
        display: block;
    }

    .full-dashboard-page .dashboard-kpi-card,
    .full-dashboard-page .dashboard-content-card,
    .full-dashboard-page .dashboard-insight-card,
    .full-dashboard-page .dashboard-live-status {
        height: auto !important;
    }

    .full-dashboard-page .dashboard-chart-large {
        height: 260px;
    }

    .full-dashboard-page .dashboard-chart-medium {
        height: 235px;
    }

    .full-dashboard-page .dashboard-chart-small {
        height: 205px;
    }
}

/* =========================================
   PROJECT MONITORING REGISTER - TABLE FIX
========================================= */

/* Allow the monitoring table section to scroll properly */
#project-monitoring {
    overflow: visible !important;
}

/* Table wrapper must control horizontal scrolling */
#project-monitoring .dashboard-project-table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden;
    border: 1px solid #e6ebf0;
    border-radius: 14px;
    -webkit-overflow-scrolling: touch;
}

/* Keep wide table inside scroll container */
#project-monitoring .dashboard-project-table {
    width: 100%;
    min-width: 1050px;
    margin: 0;
    table-layout: auto;
}

/* Prevent long milestone text from expanding columns unnecessarily */
#project-monitoring .dashboard-project-table th,
#project-monitoring .dashboard-project-table td {
    white-space: normal;
    vertical-align: middle;
}

#project-monitoring .dashboard-project-table th:nth-child(1) {
    min-width: 220px;
}

#project-monitoring .dashboard-project-table th:nth-child(2) {
    min-width: 150px;
}

#project-monitoring .dashboard-project-table th:nth-child(3) {
    min-width: 115px;
}

#project-monitoring .dashboard-project-table th:nth-child(4) {
    min-width: 145px;
}

#project-monitoring .dashboard-project-table th:nth-child(5) {
    min-width: 125px;
}

#project-monitoring .dashboard-project-table th:nth-child(6) {
    min-width: 280px;
}

#project-monitoring .dashboard-project-table th:nth-child(7) {
    min-width: 110px;
}

/* Keep progress bar correctly inside table */
#project-monitoring .table-progress {
    width: 145px;
    min-width: 145px;
}

/* Mobile: show clear horizontal scroll */
@media (max-width: 767.98px) {
    #project-monitoring {
        padding: 16px !important;
    }

    #project-monitoring .dashboard-project-table-wrap {
        margin-right: -2px;
        border-radius: 10px;
    }

    #project-monitoring .dashboard-project-table {
        min-width: 980px;
    }
}

/* =========================================
   NEWS CARD OVERLAP FIX
========================================= */

.news-list .news-grid-row {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 24px;
    margin: 0 !important;
}

/* Ignore old Bootstrap / theme column float widths */
.news-list .news-grid-row > [class*="col-"] {
    display: block !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    float: none !important;
}

/* Keep each card strictly inside its grid area */
.news-list .news-card {
    display: flex;
    flex-direction: column;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 100%;
    overflow: hidden;
    position: relative !important;
    left: auto !important;
    right: auto !important;
    margin: 0 !important;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(31, 45, 61, 0.14);
}

/* Image area */
.news-list .card-img-wrap {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.news-list .card-img-wrap img {
    display: block;
    width: 100% !important;
    height: 190px;
    object-fit: cover;
}

/* Card content */
.news-list .news-card .card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    padding: 22px;
}

.news-list .news-card .card-title,
.news-list .news-card .card-excerpt {
    overflow-wrap: break-word;
    word-break: normal;
}

.news-list .news-card .read-more {
    margin-top: auto;
}

/* Responsive grid */
@media (max-width: 1199.98px) {
    .news-list .news-grid-row {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991.98px) {
    .news-list .news-grid-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .news-list .news-grid-row {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .news-list .news-card .card-body {
        padding: 18px;
    }

    .news-list .card-img-wrap img {
        height: 210px;
    }

