/**
 * IOSVER.CSS - Netflix-Inspired Design for Marketing Agency Database
 * NEW TEST DESIGN - All classes use 'madb' prefix
 * Created: 2025
 */

/* ==========================================================================
   RESET & BASE STYLES - Netflix 2025 Style
   ========================================================================== */

.madb-main-wrapper {
    color: #ffffff;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.4;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: calc(70px + 2rem) 2rem 2rem;
    position: relative;
    z-index: 1;
    overflow-x: clip;
}


.madb-main-wrapper * {
    box-sizing: border-box;
}

.madb-content-container {
    max-width: 1600px;
    width: 100%;
    min-width: 0;
    background: rgba(14, 14, 18, 0.28);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: visible;
    display: flex;
    flex-direction: row;
    min-height: calc(100vh - 70px - 4rem);
}

/* ==========================================================================
   SIDEBAR
   ========================================================================== */

.madb-sidebar {
    position: relative;
    width: 260px;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 2rem 1.5rem;
    overflow-y: auto;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.madb-sidebar::-webkit-scrollbar {
    width: 6px;
}

.madb-sidebar::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.madb-sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.madb-sidebar-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.madb-sidebar-backdrop.active {
    display: block;
}

.madb-sidebar-section {
    margin-bottom: 2.5rem;
}

.madb-sidebar-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.madb-sidebar-section-title-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 5px;
    padding: 5px 0px;
}

.madb-flame-icon {
    width: 35px;
    height: 35px;
    flex-shrink: 0;
    display: block;
    object-fit: contain;
}

.madb-sidebar-section-title {
    font-size: 1.00625rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.madb-sidebar-sort {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
}

.madb-sidebar-sort-wrapper {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
    width: 100%;
    position: relative;
}

.madb-filter-label {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: -36px;
    margin-bottom: 22px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    font-weight: 500;
}

.madb-filter-text {
    color: rgba(255, 255, 255, 0.7);
}

.madb-filter-icon {
    width: 16px;
    height: 16px;
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
}

.madb-sidebar-sort-select {
    width: 100%;
    height: 33px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 5px 22px 5px 8px;
    cursor: pointer;
    outline: none;
    transition: all 0.2s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23ffffff' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round' opacity='0.7'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 6px center;
    background-size: 10px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    line-height: 1.4;
}

.madb-sidebar-sort-select:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
}

.madb-sidebar-sort-select:focus {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(74, 158, 255, 0.6);
    box-shadow: 0 0 0 2px rgba(74, 158, 255, 0.2);
}

.madb-sidebar-sort-select option {
    background: #1a1a1a;
    color: #fff;
    padding: 6px 8px;
    font-size: 0.75rem;
}

/* ==========================================================================
   POPULAR AGENCIES SECTION
   ========================================================================== */

.madb-popular-agencies-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.madb-popular-agency-card {
    position: relative;
    display: block;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.madb-popular-agency-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.madb-popular-agency-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #ffffff;
}

.madb-popular-agency-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #ffffff;
}

.madb-popular-agency-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.madb-popular-agency-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    gap: 1rem;
}

.madb-popular-agency-title {
    font-size: 1.00625rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================================================
   RECENTLY VIEWED SECTION
   ========================================================================== */

.madb-recently-viewed-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.madb-recently-viewed-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.madb-recently-viewed-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.madb-recently-viewed-thumbnail {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.madb-recently-viewed-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #ffffff;
}

.madb-recently-viewed-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.madb-recently-viewed-info {
    flex: 1;
    min-width: 0;
}

.madb-recently-viewed-title {
    font-size: 1.00625rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.25rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.madb-recently-viewed-subtitle {
    font-size: 0.8625rem;
    color: #fff;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */

.madb-main-content {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
    overflow-y: visible;
}

/* ==========================================================================
   CONTAINERS
   ========================================================================== */

.madb-container {
    max-width: 100%;
    margin: 0;
    padding: 0 2rem;
}

.madb-container-fluid {
    width: 100%;
    padding: 0;
}

/* ==========================================================================
   HERO SECTION - Modern Glassmorphism Style
   ========================================================================== */

/* ==========================================================================
   LOGO ABOVE MEGA MENU
   ========================================================================== */

/* ==========================================================================
   LOGO ABOVE MENU
   ========================================================================== */

/*
 * SEO heading tags must not change visuals.
 * Do NOT use a global h1–h6 inherit reset (it beats .madb-hero-title and breaks responsive sizes).
 * Only neutralize app.css element heading rules on section titles we converted to h2.
 */
.madb-body-home2 h2.madb-title {
    font-family: inherit;
    font-style: normal;
    font-weight: 700;
    color: inherit;
    text-rendering: auto;
    margin-top: 0;
    margin-bottom: 0;
    padding: 0;
    line-height: normal;
    position: relative;
    font-size: 1.375em;
    letter-spacing: -1px;
    display: inline-block;
    z-index: 0;
}

@media only screen and (min-width: 768px) {
    .madb-body-home2 h2.madb-title {
        font-size: 2.5em;
        margin-bottom: 20px;
    }
}

/* Preserve existing container-title look (Reviews block was already h2) */
.madb-body-home2 .madb-title-container h2.madb-title {
    display: inline-flex;
    padding: 7px 16px;
    font-size: 17px;
    letter-spacing: -1px;
    line-height: 23px;
    margin: 0;
    color: #fff;
    font-family: "Poppins", "system-ui", "San Francisco", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", Arial, serif;
    font-weight: 700;
}

@media only screen and (min-width: 768px) {
    .madb-body-home2 .madb-title-container h2.madb-title {
        padding: 14px 23px;
        font-size: 28px;
    }
}

/* Service/industry chips on profiles — same pill as madb-service-link, 4-up */
.main-post.agency .madb-post-agency-service-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

.main-post.agency .madb-post-agency-service-collapsible-container {
    display: block;
    margin: 0;
    padding: 0;
    background: none;
    border: none;
    min-width: 0;
    max-width: 100%;
}

.main-post.agency a.service-direct-link,
.main-post.agency a.service-direct-link:hover,
.main-post.agency a.service-direct-link:focus,
.main-post.agency a.service-direct-link:visited {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-shadow: none;
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.4;
    padding: 12px 16px;
    margin: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.main-post.agency a.service-direct-link::before {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #6366f1;
}

.main-post.agency a.service-direct-link:hover {
    color: #fff;
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateX(4px);
}

.main-post.agency a.service-direct-link .madb-post-agency-icon {
    display: none;
}

.main-post.agency a.service-direct-link .madb-post-agency-service-collapsible-title {
    color: inherit;
    font: inherit;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .main-post.agency .madb-post-agency-service-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .main-post.agency .madb-post-agency-service-row {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 768px) {
    body.single-agency .madb-post-agency-services-container h2.madb-title {
        margin-bottom: 8px;
    }

    .main-post.agency .madb-post-agency-service-row {
        gap: 8px;
    }

    .main-post.agency a.service-direct-link,
    .main-post.agency a.service-direct-link:hover,
    .main-post.agency a.service-direct-link:focus,
    .main-post.agency a.service-direct-link:visited {
        gap: 6px;
        font-size: 0.6rem;
        line-height: 1.4;
        padding: 6px 8px;
        border-radius: 4px;
    }

    .main-post.agency a.service-direct-link::before {
        width: 3px;
        height: 3px;
    }

    .main-post.agency a.service-direct-link:hover {
        transform: translateX(2px);
    }
}

.madb-logo-above-menu {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin: 2rem 2rem 0rem;
    padding: 0;
}

.madb-main-logo {
    max-width: 320px;
    width: 100%;
    height: auto;
    display: block;
}

.madb-logo-above-menu .madb-site-logo.madb-main-logo {
    width: auto;
    max-width: 100%;
    display: inline-flex;
}

/* Agency profiles: line logo up with hero content (hero margin + content padding) */
body.single-agency .madb-logo-above-menu {
    margin-left: 5rem; /* 2rem hero margin + 3rem .madb-hero-content padding */
}

@media (max-width: 768px) {
    .madb-logo-above-menu {
        justify-content: flex-start;
        margin: 25px 1rem 26px;
    }

    .madb-main-logo {
        max-width: 267px;
        margin-left: 0;
        margin-right: 0;
    }

    .madb-logo-above-menu .madb-site-logo.madb-main-logo {
        margin-left: 0;
        margin-right: 0;
    }

    body.single-agency .madb-logo-above-menu {
        margin-left: 2.5rem; /* 1rem hero margin + 1.5rem hero content padding */
    }
}

/* ==========================================================================
   MEGA MENU
   ========================================================================== */

.madb-mega-menu {
    background-color: transparent;
    padding: 0;
    margin: 0rem 2rem 1rem;
    position: relative;
}

@media (max-width: 768px) {
    .madb-mega-menu {
        display: none;
    }
}

.madb-mega-menu-wrapper {
    width: 100%;
}

.madb-mega-menu-main-items {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 2rem;
    align-items: center;
}

.madb-mega-menu-main-item {
    position: relative;
}

.madb-mega-menu-main-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    position: relative;
    display: block;
    cursor: pointer;
}


.madb-mega-menu-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 800px;
    z-index: 10000;
    background: rgba(30, 30, 30, 0.90);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    padding: 2rem;
    border-radius: 12px;
    margin-top: 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.madb-mega-menu-submenu::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
    background: transparent;
}

.madb-mega-menu-main-item.active .madb-mega-menu-submenu,
.madb-mega-menu-main-item:hover .madb-mega-menu-submenu,
.madb-mega-menu-submenu:hover {
    display: block;
}

.madb-mega-menu-tab {
    width: 100%;
    position: relative;
}

.madb-mega-menu-tab-items {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

.madb-mega-menu-tab-item {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 0;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    user-select: none;
}

.madb-mega-menu-tab-item:hover,
.madb-mega-menu-tab-item.active {
    color: #8b5cf6;
    opacity: 1;
}

.madb-mega-menu-tab-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.madb-mega-menu-all-link {
    margin-left: auto;
}

.madb-mega-menu-all-link a {
    color: #ffffff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: all 0.3s ease;
    opacity: 0.7;
}

.madb-mega-menu-all-link a:hover {
    opacity: 1;
    color: #8b5cf6;
}

.madb-mega-menu-separator {
    width: 100%;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 1rem 0;
    position: relative;
    z-index: 1;
}

.madb-mega-menu-tab-contents {
    margin-top: 1.5rem;
    display: block;
}

.madb-mega-menu-tab-content {
    display: none;
}

.madb-mega-menu-tab-content.active {
    display: block;
}

.madb-mega-menu-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.madb-mega-menu-column {
    min-width: 0;
}

.madb-mega-menu-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.madb-mega-menu-item {
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.madb-mega-menu-item a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.3;
    transition: all 0.3s ease;
}

.madb-mega-menu-item a:hover {
    color: #ffffff;
    opacity: 1;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    padding: 0.25rem 0.625rem;
    border-radius: 6px;
    font-weight: 600;
    display: inline-block;
    text-transform: capitalize;
}


.madb-mega-menu-item--title {
    margin-bottom: 0.65rem;
    line-height: 1.25;
}

.madb-mega-menu-item--title a {
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    padding-left: 0;
}

.madb-mega-menu-item--title a:hover {
    padding-left: 0;
    color: #ffffff;
}

.madb-mega-menu-column--two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.madb-mega-menu-column-half {
    min-width: 0;
}

.madb-mega-menu-column-half ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.madb-mega-menu-column-half .madb-mega-menu-item {
    margin-bottom: 0.35rem;
    line-height: 1.3;
}

.madb-mega-menu-column-half .madb-mega-menu-item a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    line-height: 1.3;
    transition: color 0.3s ease;
    display: block;
}

.madb-mega-menu-column-half .madb-mega-menu-item--title {
    margin-bottom: 0.65rem;
}

.madb-mega-menu-column--resources {
    grid-column: 1 / -1;
    gap: 3rem;
    min-width: 520px;
}

.madb-mega-menu-submenu--resources {
    min-width: 560px;
    padding: 1.5rem 2rem;
}

.madb-mega-menu-submenu--resources .madb-mega-menu-inner {
    grid-template-columns: 1fr;
    gap: 0;
}

.madb-mega-menu-submenu--industries,
.madb-mega-menu-submenu--services {
    min-width: min(920px, 92vw);
    max-width: min(1100px, 96vw);
    padding: 1.25rem 1.5rem 1.5rem;
}

.madb-mega-menu-submenu--industries .madb-mega-menu-inner,
.madb-mega-menu-submenu--services .madb-mega-menu-inner {
    grid-template-columns: 1fr;
    gap: 0;
}

.madb-mega-menu-column--industries,
.madb-mega-menu-column--services {
    grid-column: 1 / -1;
    min-width: 0;
    width: 100%;
}

.madb-mega-menu-industries-list,
.madb-mega-menu-services-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.15rem 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0 0.5rem 0 0;
    max-height: min(70vh, 520px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: rgba(139, 92, 246, 0.45) rgba(255, 255, 255, 0.06);
}

.madb-mega-menu-industries-list::-webkit-scrollbar,
.madb-mega-menu-services-list::-webkit-scrollbar {
    width: 8px;
}

.madb-mega-menu-industries-list::-webkit-scrollbar-track,
.madb-mega-menu-services-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.04);
    border-radius: 999px;
    margin: 4px 0;
}

.madb-mega-menu-industries-list::-webkit-scrollbar-thumb,
.madb-mega-menu-services-list::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.madb-mega-menu-industries-list::-webkit-scrollbar-thumb:hover,
.madb-mega-menu-services-list::-webkit-scrollbar-thumb:hover {
    background: rgba(139, 92, 246, 0.55);
    background-clip: padding-box;
}

.madb-mega-menu-industries-list > .madb-mega-menu-item--title,
.madb-mega-menu-services-list > .madb-mega-menu-item--title {
    grid-column: 1 / -1;
    margin-bottom: 0.5rem;
}

.madb-mega-menu-industries-list .madb-mega-menu-item:not(.madb-mega-menu-item--title),
.madb-mega-menu-services-list .madb-mega-menu-item:not(.madb-mega-menu-item--title) {
    min-width: 0;
}

.madb-mega-menu-industries-list .madb-mega-menu-item:not(.madb-mega-menu-item--title) a,
.madb-mega-menu-services-list .madb-mega-menu-item:not(.madb-mega-menu-item--title) a {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
    max-width: 100%;
    position: relative;
    padding: 0.2rem 0;
    line-height: 1.35;
}

.madb-mega-menu-industries-list .madb-mega-menu-item:not(.madb-mega-menu-item--title) a:hover,
.madb-mega-menu-services-list .madb-mega-menu-item:not(.madb-mega-menu-item--title) a:hover {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    padding: 0.2rem 0.5rem;
    text-transform: none;
}

.madb-mega-menu-industries-list .madb-mega-menu-item:not(.madb-mega-menu-item--title) a.is-truncated:hover::after,
.madb-mega-menu-services-list .madb-mega-menu-item:not(.madb-mega-menu-item--title) a.is-truncated:hover::after {
    content: attr(data-madb-tooltip);
    position: absolute;
    left: 0;
    bottom: calc(100% + 0.35rem);
    z-index: 10002;
    max-width: min(320px, 90vw);
    padding: 0.5rem 0.75rem;
    background: rgba(18, 18, 22, 0.96);
    border: 1px solid rgba(139, 92, 246, 0.45);
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.4;
    white-space: normal;
    word-wrap: break-word;
    pointer-events: none;
    text-transform: none;
}

@media (max-width: 900px) {
    .madb-mega-menu-industries-list,
    .madb-mega-menu-services-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.madb-mega-menu-item--footer {
    margin-top: 0.5rem;
}

.madb-mega-menu-item--footer a {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
}

.madb-mega-menu-column-half .madb-mega-menu-item--title a {
    color: #ffffff;
    font-weight: 700;
    font-size: 1rem;
    padding-left: 0;
}

.madb-mega-menu-column-half .madb-mega-menu-item--title a:hover {
    padding-left: 0;
    color: #ffffff;
}

.madb-mega-menu-column--cta {
    display: flex;
    align-items: center;
    justify-content: center;
}

.madb-mega-menu-cta {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    max-width: 400px;
    width: 100%;
}

.madb-mega-menu-cta-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.madb-mega-menu-cta-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.madb-mega-menu-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.madb-mega-menu-cta-button:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    transform: translateY(-2px);
}

.madb-mega-menu-column--two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.madb-mega-menu-column-half {
    min-width: 0;
}

.madb-mega-menu-column--cta {
    display: flex;
    align-items: center;
    justify-content: center;
}

.madb-mega-menu-cta {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    max-width: 400px;
}

.madb-mega-menu-cta-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 0.75rem;
}

.madb-mega-menu-cta-text {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.madb-mega-menu-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.madb-mega-menu-cta-button:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    transform: translateY(-2px);
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

.madb-hero-section {
    position: relative;
    margin: 2rem 2rem !important;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.4) 0%, rgba(20, 20, 20, 0.6) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.madb-agency-review-warning {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    width: 100%;
    padding: 1rem 1.75rem;
    background: linear-gradient(90deg, rgba(160, 25, 25, 0.95) 0%, rgba(100, 15, 15, 0.92) 100%);
    border-bottom: 1px solid rgba(255, 200, 100, 0.35);
    color: #fff;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.madb-agency-review-warning__icon {
    flex-shrink: 0;
    font-size: 1.35rem;
    line-height: 1.35;
    color: #ffc107;
}

.madb-agency-review-warning__text strong {
    font-weight: 700;
    color: #ffe082;
}

.madb-agency-review-warning__text a {
    color: #ffe082;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.madb-agency-review-warning__text a:hover {
    color: #fff;
}

.madb-hero-video-bg {
    position: absolute;
    top: -80%;
    left: 0;
    width: 100%;
    height: 180%;
    object-fit: cover;
    object-position: center;
    opacity: 0.5;
    z-index: 0;
    pointer-events: none;
}

.madb-hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.3) 50%,
            rgba(0, 0, 0, 0.7) 85%,
            rgba(0, 0, 0, 0.9) 100%);
    z-index: 2;
    pointer-events: none;
}

.madb-hero-overlay {
    display: none;
}

.madb-hero-content {
    position: relative;
    padding: 3rem;
    z-index: 9;
    width: 100%;
}

.madb-hero-text {
    max-width: 100%;
}

.madb-hero-category {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}


.madb-hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.8);
}

.madb-hero-subtitle {
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    max-width: 500px;
}

.madb-hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Agency membership plan badges */
.madb-post-agency-membership-plan {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5em 1.1em;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    line-height: 1.2;
    border: 1px solid transparent;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
    white-space: nowrap;
    vertical-align: middle;
}

.madb-post-agency-membership-plan.free {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.78);
    border-color: rgba(255, 255, 255, 0.22);
}

.madb-post-agency-membership-plan.verified-agency {
    background: rgba(98, 217, 137, 0.18);
    color: #62d989;
    border-color: rgba(98, 217, 137, 0.45);
    box-shadow: 0 2px 14px rgba(98, 217, 137, 0.22);
}

.madb-post-agency-membership-plan.gold-member {
    background: linear-gradient(135deg, #f7c457 0%, #e8a830 55%, #ffe08a 100%);
    color: #1a1200;
    border-color: rgba(255, 215, 100, 0.65);
    box-shadow: 0 4px 18px rgba(247, 196, 87, 0.38);
}

.madb-post-agency-membership-plan.platinum-member {
    background: linear-gradient(135deg, #f5f5f5 0%, #c9c9c9 50%, #ececec 100%);
    color: #222;
    border-color: rgba(255, 255, 255, 0.55);
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.12);
}

.madb-post-agency-membership-plan.diamond-member {
    background: linear-gradient(135deg, #b9f2ff 0%, #6eb5ff 50%, #e8f9ff 100%);
    color: #0a2540;
    border-color: rgba(110, 181, 255, 0.55);
    box-shadow: 0 4px 18px rgba(110, 181, 255, 0.28);
}

.madb-post-agency-membership-plan.premium-member {
    background: linear-gradient(135deg, #d4d4d4 0%, #a8a8a8 50%, #c8c8c8 100%);
    color: #111;
    border-color: rgba(192, 192, 192, 0.6);
}

.madb-post-agency-membership-plan.standard-member {
    background: rgba(153, 153, 153, 0.22);
    color: #d0d0d0;
    border-color: rgba(153, 153, 153, 0.45);
}

/* Agency profile hero — 2x text except agency name */
body.single-agency .madb-hero-section .madb-post-agency-membership-plan {
    font-size: 1.7rem;
    padding: 0.45em 1em;
}

body.single-agency .madb-hero-section .madb-hero-subtitle {
    font-size: 2.2rem;
    margin-bottom: 1.5rem;
    max-width: none;
    width: 100%;
}

body.single-agency .madb-hero-section .madb-hero-content,
body.single-agency .madb-hero-section .madb-hero-text,
body.single-agency .madb-hero-section .madb-hero-left,
body.single-agency .madb-hero-section .madb-title-wrapper,
body.single-agency .madb-hero-section .madb-section-header {
    width: 100%;
    max-width: 100%;
}

body.single-agency .madb-hero-section .madb-section-header {
    padding-left: 0;
    padding-right: 0;
}

body.single-agency .madb-hero-section .madb-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 2rem;
    color: #e5e5e5;
    font-size: 2rem;
    width: 100%;
}

body.single-agency .madb-hero-section .madb-hero-meta strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #fff;
}

body.single-agency .madb-hero-section .madb-hero-meta span {
    color: #ccc;
}

body.single-agency .madb-hero-section .madb-hero-actions .madb-btn {
    font-size: 1.5rem;
    padding: 1.25rem 2.5rem;
}

body.single-agency .madb-hero-section .madb-hero-identity {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

body.single-agency .madb-hero-section .madb-hero-identity .job-agency-logo {
    margin-bottom: 0 !important;
    flex-shrink: 0;
}

body.single-agency .madb-hero-section .madb-hero-identity .job-agency-logo:has(.madb-agency-profile-logo-image) {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    line-height: 0;
}

body.single-agency .madb-hero-section .madb-hero-title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    min-width: 0;
}

body.single-agency .madb-hero-section .madb-stm-logo-mark--profile {
    --madb-stm-logo-display: 225px;
}

body.single-agency .madb-hero-section .madb-agency-profile-logo-image {
    max-width: 150px;
    width: 150px;
    height: auto;
    border-radius: 8px;
    background: #ffffff;
    display: block;
}

/* Transparent PNG agency logos — white plate for contrast on dark UI */
.madb-agency-profile-logo-image,
.job-agency-logo > img,
img.job-agency-logo {
    background: #ffffff;
}

body.single-agency .madb-hero-section .madb-agency-review-warning {
    font-size: 1.875rem;
}

body.single-agency .madb-hero-section .madb-agency-review-warning__icon {
    font-size: 2.7rem;
}

/* ==========================================================================
   BUTTONS - Modern Glassmorphism Style
   ========================================================================== */

.madb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.madb-btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.madb-btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
    outline: 2px solid #8b5cf6;
    outline-offset: 4px;
}

.madb-btn-primary svg {
    width: 20px;
    height: 20px;
}

.madb-btn-secondary {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.madb-btn-secondary:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3) 0%, rgba(139, 92, 246, 0.2) 100%);
    border-color: #8b5cf6;
    transform: translateY(-2px);
}

.madb-btn-find-jobs {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.madb-btn-find-jobs:hover {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

.madb-btn-outline {
    background-color: transparent;
    color: #ffffff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.madb-btn-outline:hover {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1) 0%, rgba(139, 92, 246, 0.05) 100%);
}

.madb-btn-large {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */

.madb-section {
    padding: 1rem 0;
    position: relative;
}

.madb-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0 2rem;
}

.madb-section-title {
    margin: 12px 0 0;
    font-size: 1.7rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
}

.madb-section-subtitle {
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: -0.4rem;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.madb-view-all {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #ffffff;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.madb-view-all:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

.madb-view-all svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   HORIZONTAL SCROLL (Modern Style)
   ========================================================================== */

.madb-horizontal-scroll {
    position: relative;
    overflow-x: auto;
    overflow-y: hidden;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 1rem;
}

.madb-horizontal-scroll::-webkit-scrollbar {
    height: 8px;
}

.madb-horizontal-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.madb-horizontal-scroll::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.madb-horizontal-scroll::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.madb-agency-slider,
.madb-tools-slider,
.madb-jobs-slider {
    display: flex;
    gap: 1rem;
    padding: 0 2rem 1rem 2rem;
}

/* Agency archive/taxonomy listing grid (not the home carousels) */
.madb-agency-listing-grid {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
    gap: 1.25rem;
    padding: 0 2rem 1.5rem;
    margin: 0;
    width: 100%;
    box-sizing: border-box;
    overflow: visible !important;
}

.madb-agency-listing-grid .madb-agency-card {
    flex: none !important;
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    margin-top: 0;
    margin-bottom: 0;
}

@media (max-width: 1200px) {
    .madb-agency-listing-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 768px) {
    .madb-agency-listing-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 0.75rem;
        padding: 0 1rem 1.25rem;
    }
}

/* Agency listing pagination — full width under card grids */
.madb-agency-listing-pagination {
    display: flex;
    justify-content: center;
    width: 100%;
    flex: 0 0 100%;
    margin: 0.5rem 0 2.5rem;
    padding: 0 1rem;
    clear: both;
}

.madb-agency-listing-pagination .page-numbers {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.madb-agency-listing-pagination .page-numbers li {
    margin: 0;
}

.madb-agency-listing-pagination .page-numbers a,
.madb-agency-listing-pagination .page-numbers span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.85rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
    color: #ffffff !important;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1;
}

.madb-agency-listing-pagination .page-numbers a:hover {
    background: rgba(139, 92, 246, 0.35);
    border-color: rgba(139, 92, 246, 0.7);
}

.madb-agency-listing-pagination .page-numbers .current {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: transparent;
    color: #ffffff !important;
}

.madb-agency-listing-pagination .page-numbers .dots {
    border: none;
    background: transparent;
    min-width: 1.5rem;
    opacity: 0.7;
}

/* ==========================================================================
   AGENCY CARDS - Modern Glassmorphism Style
   ========================================================================== */

.madb-agency-card {
    flex: 0 0 274px;
    width: 274px;
    max-width: 100%;
    position: relative;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    margin-top: 10px;
    overflow: hidden;
    isolation: isolate;
    align-self: flex-start;
}

.madb-agency-card:hover {
    transform: translateY(-2px);
    outline: 2px solid #8b5cf6;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 6px 16px rgba(99, 102, 241, 0.4);
}

/* Remove brightness for regular agency cards in slider (keep for industry/region cards) */
.madb-agency-slider .madb-agency-card:not(.madb-industry-card):hover {
    filter: none;
}

.madb-agency-card-link {
    /* Keep flow like display:contents for layout, but remain a real hit-target box */
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    /* Do NOT set height:100% or position:relative — that collapses images
       and steals absolute positioning from .madb-agency-card */
}



/* Brightness effect for industry and region slider cards on hover */
.madb-agency-card.madb-industry-card:hover .madb-agency-card-image {
    filter: brightness(1.2);
}

/* Remove brightness for regular agency card images in slider */
.madb-agency-slider .madb-agency-card:not(.madb-industry-card):hover .madb-agency-card-image {
    filter: none;
}

/* Agency Card Image Container - Base */
.madb-agency-card-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
    isolation: isolate;
}

.madb-agency-card-image:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: -1px;
    background: linear-gradient(to top, #000000b3 0%, rgba(0, 0, 0, 0) 75%);
    z-index: 2;
    border-radius: 16px;
}

.madb-agency-card:not(.madb-industry-card) .madb-agency-card-image {
    aspect-ratio: 2 / 3;
    border: none;
    background: #ffffff;
}


.madb-agency-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    border-radius: 16px;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

/* White plate behind transparent PNG logos on agency cards */
.madb-agency-card:not(.madb-industry-card) .madb-agency-card-image img {
    background: #ffffff;
}

.madb-agency-card-image img:hover {
    opacity: 0.2;
}

/* Blur effect for agency slider card images on hover (exclude industry/region cards) */
.madb-agency-slider .madb-agency-card:not(.madb-industry-card):hover .madb-agency-card-image img {
    filter: blur(13px);
}

/* Remove blur for industry and region cards */
.madb-agency-slider .madb-agency-card.madb-industry-card:hover .madb-agency-card-image img {
    filter: none;
}

.madb-industry-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    border-radius: 16px;
    transition: opacity 0.3s ease;
}

.madb-industry-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    border-radius: 16px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Hide poster and show video on hover */
.madb-agency-card:hover .madb-industry-poster {
    opacity: 0;
}

.madb-agency-card:hover .madb-industry-video-bg {
    opacity: 1;
    pointer-events: auto;
}

.madb-agency-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    z-index: 1;
}

.madb-agency-gradient-overlay,
.madb-case-study-gallery .madb-agency-gradient-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65%;
    pointer-events: none;
    z-index: 10;
}

.madb-industry-card .madb-agency-gradient-overlay {
    display: none;
}

.madb-agency-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    z-index: 2;
}

.madb-agency-more-btn {
    display: none;
}

.madb-agency-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.25rem 1rem 1rem;
    z-index: 2;
    pointer-events: none;
    text-align: left;
}

.madb-industry-card .madb-agency-card-content {
    display: none;
}

.madb-agency-genre-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.2;
    height: 1.7rem;
    border-radius: 6px;
    text-transform: capitalize;
    text-align: left;
    z-index: 3;
    pointer-events: none;
    transition: background 0.3s ease;
    box-sizing: border-box;
    width: max-content;
    max-width: calc(100% - 24px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.madb-agency-industry-tag {
    position: absolute;
    top: calc(12px + 1.7rem + 6px);
    left: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.2;
    height: 1.7rem;
    border-radius: 6px;
    text-transform: uppercase !important;
    text-align: left;
    z-index: 3;
    pointer-events: none;
    transition: background 0.3s ease;
    box-sizing: border-box;
    width: max-content;
    max-width: calc(100% - 24px);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 0;
}

/* Change tag background to reddish color on agency card hover */
.madb-agency-card:hover .madb-agency-genre-tag,
.madb-agency-card:hover .madb-agency-industry-tag {
    background: #873730;
}

/* If no genre tag, position industry tag at top */
.madb-agency-card-image:not(:has(.madb-agency-genre-tag)) .madb-agency-industry-tag,
.madb-agency-card-image:not(:has(.madb-agency-genre-tag)) .madb-agency-industry-dropdown {
    top: 12px;
}

.madb-agency-industry-dropdown {
    position: absolute;
    top: calc(12px + 1.7rem + 6px);
    left: 12px;
    z-index: 9999;
    margin: 0;
    padding: 0;
    line-height: 1;
}

.madb-agency-industry-dropdown .madb-agency-industry-tag {
    position: relative;
    top: auto;
    left: auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: max-content;
    max-width: calc(100% - 24px);
    box-sizing: border-box;
    height: 1.7rem;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    font-size: .8rem;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 6px;
    text-transform: uppercase !important;
    text-align: left;
    z-index: 9999;
    overflow: hidden;
    margin-top: 0;
}

.madb-agency-industry-dropdown-trigger {
    position: relative;
    cursor: pointer;
    pointer-events: auto;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    margin: 0;
    min-width: 0;
    text-align: left;
}

.madb-agency-industry-dropdown-trigger-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.madb-agency-industry-dropdown-icon {
    margin-left: 0;
    font-size: 0.7rem;
    opacity: 0.8;
    flex-shrink: 0;
}

.madb-agency-industry-dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 4px;
    background: #1e1e1e;
    backdrop-filter: blur(10px);
    border-radius: 6px;
    padding: 0.5rem 0;
    min-width: 150px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 9999;
}

.madb-agency-industry-dropdown:hover .madb-agency-industry-dropdown-content {
    display: block;
}

/* Hide title/description while industry dropdown is open — no text overlap */
.madb-agency-card:has(.madb-agency-industry-dropdown:hover) .madb-agency-card-content {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.madb-agency-industry-dropdown-item {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    text-transform: capitalize;
    transition: background 0.2s ease;
}

.madb-agency-industry-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.madb-agency-title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.madb-agency-description {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: all 0.3s ease;
}

/* Expand description on card hover (desktop only) — cap so it stays under tags */
@media (min-width: 769px) {
    .madb-agency-card:hover .madb-agency-card-content {
        max-height: calc(100% - 92px);
        overflow: hidden;
    }

    .madb-agency-card:hover .madb-agency-description {
        -webkit-line-clamp: 5;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}
}


.madb-agency-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.madb-agency-services {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.madb-service-tag {
    display: inline-block;
    padding: 0.375rem 0.75rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    font-size: .8rem;
    color: #e5e5e5;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    text-transform: capitalize;
}

.madb-agency-location {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #d2d2d2;
    margin: 0.75rem 0 0 0;
}

.madb-agency-location svg {
    color: #8b5cf6;
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   CATEGORY CARDS
   ========================================================================== */

.madb-category-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.madb-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 4px;
    text-decoration: none;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.5, 0, 0.1, 1);
}

.madb-category-card:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.05) 100%);
    border-color: #8b5cf6;
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.3);
}

.madb-category-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2) 0%, rgba(139, 92, 246, 0.1) 100%);
    border-radius: 50%;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.madb-category-card:hover .madb-category-icon {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.4) 0%, rgba(139, 92, 246, 0.2) 100%);
    transform: scale(1.1);
}

.madb-category-icon svg {
    color: #8b5cf6;
}

.madb-category-name {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
}

.madb-category-count {
    font-size: 0.875rem;
    color: #b3b3b3;
}

/* ==========================================================================
   INDUSTRY CARDS
   ========================================================================== */

.madb-industry-card .madb-agency-card-image {
    aspect-ratio: 1 / 1;
}


.madb-industry-info {
    text-align: center;
    width: 100%;
}

.madb-industry-info h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 0.5rem 0;
}

.hero-button-primary:hover {
    background: #873730;
    color: #fff !important;
}

.madb-industry-info span {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    text-transform: capitalize;
    transition: background 0.3s ease;
}

/* Change span background to reddish color on industry/region card hover */
.madb-agency-card.madb-industry-card:hover .madb-industry-info span {
    background: #873730;
}
    text-transform: capitalize;
}

/* ==========================================================================
   TOOL CARDS
   ========================================================================== */

.madb-tool-card {
    flex: 0 0 400px;
    position: relative;
    transition: transform 0.4s cubic-bezier(0.5, 0, 0.1, 1);
}

.madb-tool-card:hover {
    transform: scale(1.5);
    z-index: 100;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
}

.madb-tool-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.madb-tool-card-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    background-color: #181818;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0;
}

.madb-tool-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.madb-tool-card:hover .madb-tool-card-image img {
    transform: scale(1.1);
}

.madb-tool-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #ffffff;
}

.madb-tool-card-content {
    padding: 0 0.5rem;
}

.madb-tool-title {
    font-size: 1rem;
    font-weight: 600;
    color: #e5e5e5;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==========================================================================
   JOB CARDS
   ========================================================================== */

/* Agency page Open Positions — avoid service-row 4-col grid crushing cards */
.madb-agency-jobs-grid {
    display: flex;
    flex-flow: row wrap;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    gap: 1.25rem 0;
}

.madb-agency-jobs-grid > .columns {
    flex: 0 0 100%;
    max-width: 100%;
}

@media print, screen and (min-width: 40em) {
    .madb-agency-jobs-grid > .columns.medium-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media print, screen and (min-width: 64em) {
    .madb-agency-jobs-grid > .columns.medium-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

.madb-company-jobs-list .job-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.18);
    color: #ffffff;
}

.madb-company-jobs-list .job-card-title {
    color: #ffffff !important;
}

.madb-company-jobs-list .job-card-description,
.madb-company-jobs-list .job-card-meta span {
    color: rgba(255, 255, 255, 0.7) !important;
}

.madb-company-jobs-list .job-card-top {
    border-bottom-color: rgba(255, 255, 255, 0.15);
}

.madb-company-jobs-list .job-card:hover {
    border-color: #8b5cf6;
}

.madb-job-card {
    flex: 0 0 400px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
    border-radius: 4px;
    padding: 1.5rem;
    transition: all 0.4s cubic-bezier(0.5, 0, 0.1, 1);
}

.madb-job-card:hover {
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.15) 0%, rgba(229, 9, 20, 0.05) 100%);
    border-color: rgba(229, 9, 20, 0.5);
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.madb-job-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.madb-job-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 0.75rem 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.madb-job-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    color: #b3b3b3;
}

.madb-job-location {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.madb-job-location svg {
    color: #e50914;
}

.madb-job-date {
    color: #999;
}

.madb-job-excerpt {
    font-size: 0.875rem;
    color: #b3b3b3;
    margin: 0;
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

/* ==========================================================================
   CTA SECTION
   ========================================================================== */

.madb-cta-section {
    background: transparent;
    padding: 3rem 0;
    margin: 2rem;
}

.madb-cta-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    padding: 3rem 2rem;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.4) 0%, rgba(20, 20, 20, 0.6) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.madb-cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 1rem 0;
    line-height: 1.2;
}

.madb-cta-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 2.5rem 0;
    line-height: 1.6;
}

.madb-cta-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ==========================================================================
   RESPONSIVE - MOBILE
   ========================================================================== */

@media (max-width: 1024px) {
    .madb-main-wrapper {
        padding: calc(70px + 1rem) 1rem 1rem;
    }

    .madb-content-container {
        flex-direction: column;
        border-radius: 20px;
    }

    .madb-hero-video-bg,
    .hero-background-video {
        transform: none !important;
        will-change: auto !important;
    }

    .madb-sidebar {
        position: fixed;
        left: -280px;
        width: 280px;
        top: 0;
        height: 100vh;
        z-index: 1001;
        transition: left 0.3s ease;
        border-right: none;
        border-radius: 0;
    }

    .madb-sidebar.active {
        left: 0;
    }

    .madb-main-content {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .madb-main-wrapper {
        /* 8px top + search (40px) + 8px bottom gap before main container */
        padding: calc(8px + env(safe-area-inset-top, 0px) + 40px + 8px) 6px 6px;
    }
    body.tax-agency_industry .madb-page-header-quote-text-part,  body.tax-tool_category, .madb-page-header-quote-text-part {
        padding-right: 0px;
        width: 100%;
        font-size: 13px !important;
    } 
    .madb-content-container {
        border-radius: 16px;
    }

    .madb-hero-section {
        margin: 1rem;
        border-radius: 16px;
    }

    .madb-hero-content {
        padding: 2rem 1.5rem;
    }

    .madb-hero-title {
        font-size: 2rem;
    }

    .madb-hero-subtitle {
        font-size: 0.8rem;
        margin-bottom: 1.5rem;
    }

    body.single-agency .madb-hero-section .madb-hero-subtitle {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 1.15rem;
    }

    body.single-agency .madb-hero-section .madb-post-agency-membership-plan {
        font-size: 0.7rem;
        padding: 0.3em 0.7em;
    }

    body.single-agency .madb-hero-section .madb-hero-meta {
        font-size: 0.875rem;
        gap: 1rem 1.25rem;
        margin-bottom: 1.25rem;
    }

    body.single-agency .madb-hero-section .madb-hero-actions .madb-btn {
        font-size: 0.875rem;
        padding: 0.75rem 1.25rem;
    }

    body.single-agency .madb-hero-section .madb-stm-logo-mark--profile {
        --madb-stm-logo-display: 140px;
    }

    body.single-agency .madb-hero-section .madb-agency-profile-logo-image {
        max-width: 96px;
        width: 96px;
    }

    body.single-agency .madb-hero-section .madb-agency-review-warning {
        font-size: 0.8125rem;
        padding: 0.75rem 1rem;
        line-height: 1.45;
    }

    body.single-agency .madb-hero-section .madb-agency-review-warning__icon {
        font-size: 1.15rem;
    }

    body.single-agency .madb-hero-section .madb-hero-title {
        font-size: 1.65rem;
        line-height: 1.15;
    }

    body.single-agency .madb-hero-section .madb-hero-identity {
        gap: 0.85rem;
        margin-bottom: 0.75rem;
    }

    body.single-agency .madb-hero-section .madb-hero-title-row {
        gap: 0.65rem;
    }

    body.single-agency .madb-hero-content {
        padding: 1.35rem 1.15rem;
    }

    body.single-agency .madb-post-about-container,
    body.single-agency .madb-post-agency-jobs-container,
    body.single-agency .madb-post-agency-services-container,
    body.single-agency .madb-post-agency-reviews-container,
    body.single-agency .madb-post-agency-awards-container,
    body.single-agency .madb-post-agency-partnerships-container,
    body.single-agency .madb-post-agency-showcase-container,
    body.single-agency .madb-review-summary {
        padding-top: 1.5rem;
        padding-bottom: 1.5rem;
    }

    body.single-agency .madb-section-title {
        font-size: 1.15rem;
    }

    .madb-hero-actions {
        flex-direction: row;
        gap: 0.5rem;
    }

    .madb-btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.8rem;
    }

    .madb-section-title {
        font-size: 1.125rem;
    }

    .madb-section-header {
        padding: 0 1rem;
    }

    .madb-container {
        padding: 0 1rem;
    }

    .madb-agency-card {
        flex: 0 0 147px;
    }

    .madb-agency-slider {
        padding: 0 1rem 1rem 1rem;
        gap: 0.75rem;
    }

    .madb-services-section {
        margin-left: 1rem !important;
        margin-right: 1rem !important;
    }


    .madb-cta-section {
        margin: 1rem;
    }

    .madb-cta-content {
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }

    .madb-cta-title {
        font-size: 1.5rem;
    }

    .madb-cta-subtitle {
        font-size: 0.95rem;
    }

    .madb-industry-info h4 {
        font-size: 0.85rem;
    }

    .madb-industry-info span {
        font-size: .7rem;
        padding: 0.15rem 0.65rem;
    }

    .madb-agency-overlay {
        padding: .5rem;
    }

    .madb-agency-genre-tag {
        top: 8px;
        left: 8px;
        font-size: .65rem;
        padding: 0.15rem 0.4rem;
        height: 1.4rem;
        max-width: calc(100% - 16px);
    }

    .madb-agency-industry-tag {
        top: calc(8px + 1.4rem + 5px);
        left: 8px;
        font-size: .65rem;
        padding: 0.15rem 0.4rem;
        height: 1.4rem;
        margin-top: 0;
        max-width: calc(100% - 16px);
    }

    .madb-agency-industry-dropdown {
        top: calc(8px + 1.4rem + 5px);
        left: 8px;
    }

    .madb-agency-industry-dropdown .madb-agency-industry-tag {
        font-size: .65rem;
        padding: 0.15rem 0.4rem;
        height: 1.4rem;
        margin-top: 0;
    }

    .madb-agency-card-image:not(:has(.madb-agency-genre-tag)) .madb-agency-industry-tag,
    .madb-agency-card-image:not(:has(.madb-agency-genre-tag)) .madb-agency-industry-dropdown {
        top: 8px;
    }

    .madb-section {
        padding: 0.3rem 0;
    }
}

/* ==========================================================================
   RESPONSIVE - TABLET
   ========================================================================== */

@media (min-width: 769px) and (max-width: 1024px) {
    .madb-main-wrapper {
        padding: calc(70px + 1.5rem) 1rem 1rem;
    }

    .madb-hero-section {
        margin: 1.5rem;
    }

    .madb-section-header,
    .madb-agency-slider,
    .madb-container {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .madb-services-section {
        margin-left: 1.5rem !important;
        margin-right: 1.5rem !important;
    }

    .madb-agency-card {
        flex: 0 0 260px;
    }

}

/* ==========================================================================
   RESPONSIVE - LARGE SCREENS
   ========================================================================== */

@media (min-width: 1400px) {
    .madb-agency-card {
        flex: 0 0 191px;
    }

    .madb-hero-title {
        font-size: 3.5rem;
    }
}

/* ==========================================================================
   LOADING STATES & ANIMATIONS
   ========================================================================== */

@keyframes madbFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.madb-section {
    animation: madbFadeIn 0.6s ease-out;
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

.madb-btn:focus,
.madb-category-card:focus,
.madb-agency-card-link:focus,
.madb-tool-card-link:focus,
.madb-job-card-link:focus {
    outline: 1px solid #8b5cf6;
    outline-offset: 2px;
}

/* Remove outline on hover for buttons since it's now on hover */
.madb-btn:hover {
    outline: 2px solid #8b5cf6;
    outline-offset: 4px;
}

/* ==========================================================================
   UTILITIES
   ========================================================================== */

.madb-text-center {
    text-align: center;
}

.madb-mt-1 {
    margin-top: 0.5rem;
}

.madb-mt-2 {
    margin-top: 1rem;
}

.madb-mt-3 {
    margin-top: 1.5rem;
}

.madb-mt-4 {
    margin-top: 2rem;
}

.madb-mb-1 {
    margin-bottom: 0.5rem;
}

.madb-mb-2 {
    margin-bottom: 1rem;
}

.madb-mb-3 {
    margin-bottom: 1.5rem;
}

.madb-mb-4 {
    margin-bottom: 2rem;
}

.madb-hidden {
    display: none;
}

.madb-visible {
    display: block;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */

.madb-footer {
    background-color: transparent;
    padding: 2.5rem 2rem 2rem;
    margin-top: 4rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.madb-footer-widgets-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 2.5rem 3rem;
    margin-bottom: 0;
}

.madb-footer-widget-full {
    width: 100%;
    margin-top: 2.5rem;
    margin-bottom: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.madb-footer-widget-full .madb-footer-widget {
    max-width: 100%;
}

.madb-footer-widget-full .madb-footer-menu {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem 2rem;
}

.madb-footer-widget {
    min-width: 0;
}

.madb-footer-widget-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.madb-footer-widget-title a {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.madb-footer-widget-title a:hover {
    opacity: 0.7;
}

.madb-footer-widget-content {
    font-size: 0.9rem;
    line-height: 1.6;
}

.madb-footer-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.madb-footer-menu li {
    margin-bottom: 0.875rem;
    line-height: 1.5;
}

.madb-footer-menu a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.madb-footer-social {
    text-align: center;
    margin: 2.5rem 0;
    padding: 2.5rem 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Hidden until brand social accounts exist — set display:flex to restore */
.madb-footer-social-icons {
    list-style: none;
    padding: 0;
    margin: 0;
    display: none;
    justify-content: center;
    align-items: center;
    gap: 5.5rem;
    flex-wrap: wrap;
    row-gap: 1.5rem;
}

.madb-footer-social-icons li {
    margin: 0;
    padding: 0;
}

.madb-footer-social-icons a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0.5rem;
    border-radius: 50%;
}

.madb-footer-social-icons a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.madb-footer-links {
    text-align: center;
    margin: 2rem 0;
}

.madb-footer-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    justify-items: center;
}

.madb-footer-links-list li {
    margin: 0;
}

.madb-footer-links-list a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.madb-footer-links-list a:hover {
    color: #ffffff;
}

.madb-footer-copyright {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 2rem;
}

.madb-footer-copyright-text {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    line-height: 1.6;
    flex: 1;
    min-width: 300px;
}

.madb-footer-copyright-text a {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: underline;
    transition: color 0.3s ease;
}

.madb-footer-copyright-text a:hover {
    color: #ffffff;
}

.madb-footer-copyright-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.madb-footer-copyright-links li {
    margin: 0;
}

.madb-footer-copyright-link a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.3s ease;
}

.madb-footer-copyright-link a:hover {
    color: #ffffff;
}

/* Hide original footer on home2 page */
body.page-template-page-home2 footer.style1 {
    display: none;
}

/* Responsive Mega Menu */
@media (max-width: 1024px) {
    .madb-mega-menu-main-items {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .madb-mega-menu-submenu {
        min-width: 100%;
        left: 0;
        transform: none;
    }

    .madb-mega-menu-column--two-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .madb-mega-menu-main-items {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .madb-mega-menu-submenu {
        position: relative;
        margin-top: 1rem;
    }
}

/* Responsive Footer */
@media (max-width: 1400px) {
    .madb-footer-widgets-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem;
    }
}

@media (max-width: 1024px) {
    .madb-footer-widgets-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .madb-footer-widget-full .madb-footer-menu {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .madb-footer {
        padding: 2rem 1rem 1.5rem;
    }

    .madb-footer-title {
        font-size: 2rem;
    }

    .madb-footer-subtitle {
        font-size: 1rem;
    }

    .madb-footer-widgets-row {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .madb-footer-widget-full .madb-footer-menu {
        grid-template-columns: 1fr;
    }

    .madb-footer-social {
        margin: 2rem 0;
        padding: 2rem 0;
    }

    .madb-footer-social-icons {
        gap: 3rem;
        row-gap: 1.25rem;
    }

    .madb-footer-social-icons a {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
    }

    .madb-footer-copyright {
        flex-direction: column;
        align-items: flex-start;
    }

    .madb-footer-copyright-text {
        min-width: auto;
    }

    .madb-footer-links-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }

    .madb-footer-copyright-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* --- Tool Category Archive Styles (Added via Agent) --- */

.main-tools-wrapper {
    margin: 1% 3%;
}

.madb-archive-header {
    margin-bottom: 3rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border-radius: 12px;
}

.madb-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

/* Stat Cards retain their own little bubbles? Or also transparent? 
   User said "same blur in the MAIN CONTAINER". 
   If I make these transparent, they float. 
   I'll make header transparent.
*/
.madb-stat-card {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.08);
    /* Keep stats as cards */
    border-radius: 12px;
    display: flex;
    flex-direction: column;
}

.madb-tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.madb-tool-grid-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s;
    height: 100%;
}

.madb-tool-grid-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.madb-cat-grid-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1.5rem;
    transition: transform 0.2s;
}

.madb-cat-grid-card:hover {
    transform: translateY(-5px);
}

.madb-search-box {
    margin-bottom: 4rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
}


/* Fix margins for full width containers in tool category */
.madb-archive-header,
.madb-search-box {
    margin-left: 2rem;
    margin-right: 2rem;
}



/* PAGINATION STYLES */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.pagination a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    border-color: rgba(255, 255, 255, 0.3);
}

.pagination .current {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    border-color: #8b5cf6;
    color: #fff;
    cursor: default;
}

.madb-agency-jobs-pagination {
    margin-top: 1.75rem;
    margin-bottom: 0.5rem;
}
/* Fix background color */
body.madb-body-home2 {
    background-color: #141414 !important;
}

/* Service template specific background */
body.madb-service-template {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%) !important;
}

/* Background video - Dark mode default (low opacity) */
.madb-bg-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    opacity: 0.5 !important;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

/* Light mode - full opacity when body has light-mode class */
body.light-mode .madb-bg-video {
    opacity: 1 !important;
}

/* Light mode - content container background */
body.light-mode .madb-content-container {
    background: rgb(255 255 255 / 8%);
}

/* Light mode - popular agency title */
body.light-mode .madb-popular-agency-title {
    color: #000000;
}

/* Light mode - recently viewed subtitle */
body.light-mode .madb-recently-viewed-subtitle {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    width: 113px;
    padding: 0px 10px;
    font-weight: 600;
    border-radius: 6px;
    text-transform: capitalize;
    transition: background 0.3s ease;
    display: inline-block;
}

/* ==========================================================================
   LIGHT MODE - CARD STYLES
   ========================================================================== */

/* Popular Agency Card - Light Mode */
body.light-mode .madb-popular-agency-card {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body.light-mode .madb-popular-agency-card:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(0, 0, 0, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Agency Card - Light Mode */

/* Category Card - Light Mode */
body.light-mode .madb-category-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.light-mode .madb-category-card:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.08) 100%);
    border-color: #8b5cf6;
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.25);
}

body.light-mode .madb-category-icon {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(139, 92, 246, 0.08) 100%);
}

body.light-mode .madb-category-card:hover .madb-category-icon {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25) 0%, rgba(139, 92, 246, 0.15) 100%);
}

body.light-mode .madb-category-title {
    color: #333;
}

/* Tool Card - Light Mode */
body.light-mode .madb-tool-card-image {
    background-color: #f5f5f5;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .madb-tool-card:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

body.light-mode .madb-tool-title {
    color: #333;
}

/* Job Card - Light Mode */
body.light-mode .madb-job-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.light-mode .madb-job-card:hover {
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.12) 0%, rgba(229, 9, 20, 0.05) 100%);
    border-color: rgba(229, 9, 20, 0.4);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

body.light-mode .madb-job-title {
    color: #333;
}

body.light-mode .madb-job-company {
    color: #666;
}

body.light-mode .madb-job-location,
body.light-mode .madb-job-salary,
body.light-mode .madb-job-date {
    color: #666;
}

/* Stat Card - Light Mode */
body.light-mode .madb-stat-card {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.light-mode .madb-stat-value {
    color: #333;
}

body.light-mode .madb-stat-label {
    color: #666;
}

/* Tool Grid Card - Light Mode */
body.light-mode .madb-tool-grid-card {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.light-mode .madb-tool-grid-card:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Category Grid Card - Light Mode */
body.light-mode .madb-cat-grid-card {
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

body.light-mode .madb-cat-grid-card:hover {
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Hero video background - Dark mode default (low opacity) */
.madb-hero-video-bg {
    opacity: 0.5 !important;
    transition: opacity 0.4s ease;
}

/* Light mode - full opacity for hero video */
body.light-mode .madb-hero-video-bg {
    opacity: 1 !important;
}

/* Theme Toggle */
.madb-theme-toggle--corner {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 10;
}

.madb-theme-toggle--dock {
    display: none;
}

.madb-theme-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.madb-toggle-label {
    position: relative;
    display: block;
    width: 120px;
    height: 60px;
    cursor: pointer;
    border-radius: 30px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.madb-toggle-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.madb-toggle-bg-night {
    background-image: url('../images/night bg.png');
    background-size: auto;
    background-position: -3px;
    opacity: 1;
    z-index: 1;
}

.madb-toggle-bg-day {
    background-image: url('../images/day bg.png');
    opacity: 0;
    z-index: 1;
}

.madb-toggle-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-size: contain;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.madb-toggle-button-moon {
    background-image: url('../images/moon button.png');
    left: 5px;
    opacity: 1;
}

.madb-toggle-button-sun {
    background-image: url('../images/sun button.png');
    right: 5px;
    opacity: 0;
    transform: translateY(-50%) translateX(60px);
}

/* Dark mode (default) - unchecked */
.madb-theme-toggle input:not(:checked) + .madb-toggle-label .madb-toggle-bg-night {
    opacity: 1;
}

.madb-theme-toggle input:not(:checked) + .madb-toggle-label .madb-toggle-bg-day {
    opacity: 0;
}

.madb-theme-toggle input:not(:checked) + .madb-toggle-label .madb-toggle-button-moon {
    opacity: 1;
    left: 5px;
    transform: translateY(-50%);
}

.madb-theme-toggle input:not(:checked) + .madb-toggle-label .madb-toggle-button-sun {
    opacity: 0;
    right: 5px;
    transform: translateY(-50%) translateX(60px);
}

/* Light mode (checked) */
.madb-theme-toggle input:checked + .madb-toggle-label .madb-toggle-bg-night {
    opacity: 0;
}

.madb-theme-toggle input:checked + .madb-toggle-label .madb-toggle-bg-day {
    opacity: 1;
}

.madb-theme-toggle input:checked + .madb-toggle-label .madb-toggle-button-moon {
    opacity: 0;
    left: 5px;
    transform: translateY(-50%) translateX(-60px);
}

.madb-theme-toggle input:checked + .madb-toggle-label .madb-toggle-button-sun {
    opacity: 1;
    right: 5px;
    transform: translateY(-50%);
}

@media (max-width: 768px) {
    .madb-theme-toggle--corner {
        display: none !important;
    }
}

/* ==========================================================================
   404 PAGE STYLES
   ========================================================================== */

/* Error Code Animation */
.madb-404-code {
    display: flex;
    justify-content: left;
    align-items: self-start;
    gap: 0.5rem;
    margin-bottom: 0px;
    margin-top: -27px;
}

.madb-404-code .digit {
    font-size: 6rem;
    font-weight: 900;
    color: #ee1d7a;
    text-shadow: 0 0 20px rgba(238, 29, 122, 0.3);
    animation: bounce 2s infinite ease-in-out;
    display: inline-block;
}

.madb-404-code .digit:nth-child(2) {
    animation-delay: 0.1s;
}

.madb-404-code .digit:nth-child(3) {
    animation-delay: 0.2s;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Popular Pages */
.madb-404-popular-pages h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 1.5rem;
}

.madb-404-popular-pages ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.madb-404-popular-pages li a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 500;
}

.madb-404-popular-pages li a:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: #8b5cf6;
}

/* 404 Page Responsive */
@media (max-width: 768px) {
    .madb-404-code {
        margin-bottom: 1.5rem;
    }

    .madb-404-code .digit {
        font-size: 4rem;
    }

    .madb-hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .madb-btn {
        width: 100%;
        max-width: 300px;
    }

    .madb-404-popular-pages ul {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .madb-404-code .digit {
        font-size: 3rem;
    }

    .madb-hero-title {
        font-size: 2rem;
    }

    .madb-hero-subtitle {
        font-size: 1rem;
    }
}

/* ==========================================================================
   LIVE USER COUNTER - TAXONOMY AGENCY INDUSTRY TEMPLATE SPECIFIC
   ========================================================================== */

 .madb-hero-section .madb-live-users-counter {
    position: relative;
    bottom: auto;
    right: auto;
    left: auto;
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 2;

}

body.tax-agency_industry .madb-live-users-avatars {
    display: flex;
    align-items: center;
    position: relative;
    height: 60px;
}

body.tax-agency_industry #madb-live-users-avatar-container {
    display: flex;
    align-items: center;
}

body.tax-agency_industry .madb-live-user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #000;
    object-fit: cover;
    margin-left: -12px;
    display: block;
}

body.tax-agency_industry .madb-live-user-avatar:first-child {
    margin-left: 0;
}

body.tax-agency_industry .madb-live-users-text {
    display: flex;
    flex-direction: column;
    white-space: nowrap;
}

body.tax-agency_industry .madb-live-users-count {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
}

body.tax-agency_industry .madb-live-users-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    line-height: 1.2;
}

@media (max-width: 768px) {
    body.tax-agency_industry .madb-hero-section .madb-live-users-counter {
        margin-top: 1.25rem;
        gap: 8px;
        max-width: 100%;
        flex-wrap: wrap;
    }
    
    body.tax-agency_industry .madb-live-users-avatars {
        height: 40px;
        max-width: 200px;
        overflow: hidden;
    }
    
    body.tax-agency_industry #madb-live-users-avatar-container {
        overflow: hidden;
    }
    
    body.tax-agency_industry .madb-live-user-avatar {
        width: 40px;
        height: 40px;
    }
    
    body.tax-agency_industry .madb-live-users-count {
        font-size: 12px;
    }
    
    body.tax-agency_industry .madb-live-users-label {
        font-size: 10px;
    }
}

/* ==========================================================================
   TEST HERO SECTION - NEW IMPLEMENTATION
   ========================================================================== */

.hero-banner {
    position: relative;
    margin: 2rem;
    border-radius: 20px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(30, 30, 30, 0.4) 0%, rgba(20, 20, 20, 0.6) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
            transparent 0%,
            rgba(0, 0, 0, 0.3) 50%,
            rgba(0, 0, 0, 0.7) 85%,
            rgba(0, 0, 0, 0.9) 100%);
    z-index: 2;
    pointer-events: none;
}

.hero-background-video {
    position: absolute;
    top: -80%;
    left: 0;
    width: 100%;
    height: 180%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
    opacity: 0.5;
    pointer-events: none;
    will-change: transform;
}

.hero-container {
    position: relative;
    z-index: 5;
    padding: 3rem;
    min-height: 400px;
}

.hero-container::after {
    content: "";
    display: table;
    clear: both;
}

.hero-content {
    display: block;
    max-width: 600px;
}

.hero-heading {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: #ffffff;
    text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.8);
}

.hero-description {
    font-size: 1.3rem;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
    max-width: 500px;
}

.hero-actions {
    margin-bottom: 2rem;
}

.hero-button {
    display: inline-block;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    margin-right: 1rem;
    vertical-align: middle;
}

.hero-button svg {
    display: inline-block;
    vertical-align: middle;
    margin-right: 0.5rem;
}

.hero-button-primary {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: #ffffff;
}

.hero-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

.hero-button-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-button-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.hero-social-proof {
    float: right;
    clear: both;
    margin-top: -87px;
}

.active-users-avatars {
    display: inline-block;
    vertical-align: middle;
    position: relative;
    height: 60px;
    line-height: 60px;
    margin-right: 10px;
}

#active-users-avatars-container {
    white-space: nowrap;
    font-size: 0;
    line-height: 0;
}

.user-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid #000;
    object-fit: cover;
    margin-left: -12px;
    display: inline-block;
    vertical-align: middle;
}

.user-avatar:first-child {
    margin-left: 0;
}

.active-users-info {
    display: inline-block;
    vertical-align: middle;
    white-space: nowrap;
    line-height: 1.2;
}

.active-users-count {
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    display: block;
}

.active-users-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 11px;
    line-height: 1.2;
    display: block;
}

@media (max-width: 1463px) {
    .hero-social-proof {
        margin-top: 0;
    }
}

@media (max-width: 768px) {
    .hero-banner {
        margin: 1rem;
    }

    .hero-container {
        padding: 2rem 1.5rem;
        min-height: auto;
    }

    .hero-heading {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 0.8rem;
        margin-bottom: 1.5rem;
    }

    .hero-button {
        display: block;
        width: 100%;
        text-align: center;
        margin-bottom: 1rem;
        margin-right: 0;
    }

    .hero-social-proof {
        float: none;
        margin-top: 2rem;
    }

    .active-users-avatars {
        height: 40px;
        line-height: 40px;
        max-width: 200px;
        overflow: hidden;
    }
    
    #active-users-avatars-container {
        overflow: hidden;
    }

    .user-avatar {
        width: 40px;
        height: 40px;
    }

    .active-users-count {
        font-size: 12px;
    }

    .active-users-label {
        font-size: 10px;
    }
}

/* ==========================================================================
   SERVICES SECTION
   ========================================================================== */

.madb-section .madb-services-section,
.madb-services-section {
    margin-top: 80px !important;
    margin-left: 2rem !important;
    margin-right: 2rem !important;
    padding: 60px 40px !important;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%) !important;
    border-radius: 16px !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    color: #fff !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1) !important;
    box-sizing: border-box !important;
    width: auto !important;
    max-width: none !important;
    overflow: hidden !important;
    clear: both !important;
    position: relative !important;
    z-index: 1 !important;
}

.madb-services-header {
    margin-bottom: 0 !important;
}

.madb-services-title-wrapper {
    margin-bottom: 0 !important;
}

.madb-services-title {
    font-size: 2rem !important;
    margin-bottom: 15px !important;
    color: #fff !important;
    font-weight: 700 !important;
    letter-spacing: -0.5px !important;
    line-height: 1.2 !important;
}

.madb-services-title-accent {
    width: 60px !important;
    height: 4px !important;
    background: linear-gradient(90deg, #e50914 0%, #ff6b6b 100%) !important;
    border-radius: 2px !important;
    margin-bottom: 40px !important;
}

.madb-services-content {
    margin-top: 0 !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.madb-services-description {
    margin-bottom: 40px !important;
}

.madb-services-description p {
    color: rgba(255,255,255,0.85) !important;
    margin-bottom: 0 !important;
    font-size: 1.05rem !important;
    line-height: 1.7 !important;
    font-weight: 300 !important;
}

.madb-services-grid-wrapper {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

.madb-services-grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 16px !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

/* Region browse pills on /agencies/ hub */
.madb-regions-browse-grid {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
    gap: 14px 18px !important;
}

.madb-regions-browse-grid .madb-service-item {
    margin-left: 4px !important;
    margin-right: 4px !important;
}

.madb-service-item {
    margin-bottom: 0 !important;
    min-width: 0 !important;
    max-width: 100% !important;
}

.madb-service-link {
    color: rgba(255,255,255,0.9) !important;
    text-decoration: none !important;
    display: flex !important;
    align-items: center !important;
    padding: 12px 16px !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
    background: rgba(255,255,255,0.03) !important;
    border: 1px solid rgba(255,255,255,0.08) !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    position: relative !important;
    overflow: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    min-width: 0 !important;
}

.madb-service-link:hover {
    background: rgba(99, 102, 241, 0.15) !important;
    border-color: rgba(99, 102, 241, 0.35) !important;
    color: #fff !important;
    transform: translateX(4px) !important;
}

.madb-service-indicator {
    display: inline-block !important;
    width: 6px !important;
    height: 6px !important;
    background: #6366f1 !important;
    border-radius: 50% !important;
    margin-right: 12px !important;
    transition: all 0.3s ease !important;
    flex-shrink: 0 !important;
}

.madb-service-label {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

@media (max-width: 1100px) {
    .madb-services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 640px) {
    .madb-section .madb-services-section,
    .madb-services-section {
        padding: 40px 20px !important;
        margin-top: 48px !important;
        margin-left: 1rem !important;
        margin-right: 1rem !important;
    }
    .madb-services-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }
    .madb-services-title {
        font-size: 1.5rem !important;
    }
}

/* Agency rating stars — gold yellow; inactive at 50% */
.madb-page .madb-rating-stars .madb-star,
.st-review-accordion-item .madb-rating-stars .madb-star {
    color: #ffd700 !important;
    opacity: 0.5;
    line-height: 1;
}

.madb-page .madb-rating-stars .madb-star {
    font-size: 2.25rem !important;
}

.st-review-accordion-item .madb-rating-stars .madb-star {
    font-size: 24px !important;
}

.madb-page .madb-rating-stars .madb-star.filled,
.madb-page .madb-rating-stars .madb-star.half,
.st-review-accordion-item .madb-rating-stars .madb-star.filled,
.st-review-accordion-item .madb-rating-stars .madb-star.half {
    color: #ffd700 !important;
    opacity: 1;
}

.st-review-accordion-item .madb-rating-stars .madb-star.half::after {
    color: #ffd700 !important;
    opacity: 0.5;
}

.st-review-accordion-item .madb-rating-stars {
    gap: 4px;
    margin-left: 6px;
}

/* Reviews accordion — breathing room */
.st-reviews-accordion {
    gap: 1.25rem;
}

.st-review-accordion-item {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
}

.st-accordion-header.review-accordion-header {
    padding: 1.5rem 1.75rem;
    font-size: 1.125rem;
    line-height: 1.45;
}

.st-accordion-content.review-accordion-content {
    padding: 0 1.75rem 2rem 1.75rem !important;
}

.review-custom-content {
    padding: 1.25rem 0 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.0625rem;
    line-height: 1.8;
    letter-spacing: 0.01em;
}

.review-custom-content p {
    margin: 0 0 1.25rem;
}

.review-custom-content p:last-child {
    margin-bottom: 0;
}

.review-meta {
    margin-top: 1.75rem !important;
    padding-top: 1.25rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    font-size: 0.9375rem;
    color: rgba(255, 255, 255, 0.65);
    line-height: 1.6;
}

.review-meta a {
    color: #a78bfa;
    text-decoration: underline;
}


/* ==========================================================================
   AGENCY PROFILE — layout without app.css (MAdb-native)
   Grid, About copy, HQ/Offices shell, Open Positions cards
   ========================================================================== */

/* Minimal row/column grid used by profile sections */
body.single-agency .main-post .row {
    display: flex;
    flex-flow: row wrap;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    body.single-agency .main-post .row {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Nested grids inherit parent gutters — no second horizontal pad */
body.single-agency .main-post .row .row {
    padding-left: 0;
    padding-right: 0;
}

body.single-agency .main-post .columns,
body.single-agency .madb-post-about .columns,
body.single-agency .madb-post-agency-jobs-container .columns {
    box-sizing: border-box;
    min-width: 0;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

body.single-agency .small-12 {
    flex: 0 0 100%;
    max-width: 100%;
}

@media (min-width: 768px) {
    body.single-agency .medium-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
    body.single-agency .medium-4 {
        flex: 0 0 33.333%;
        max-width: 33.333%;
    }
    body.single-agency .medium-8 {
        flex: 0 0 66.666%;
        max-width: 66.666%;
    }
}

/* Section vertical rhythm */
body.single-agency .madb-post-about-container,
body.single-agency .madb-post-agency-jobs-container,
body.single-agency .madb-post-agency-services-container,
body.single-agency .madb-post-agency-reviews-container,
body.single-agency .madb-post-agency-awards-container,
body.single-agency .madb-post-agency-partnerships-container,
body.single-agency .madb-post-agency-showcase-container,
body.single-agency .madb-review-summary {
    padding-top: 2.5rem;
    padding-bottom: 2.5rem;
}

/* About body copy */
body.single-agency #agency-about .madb-post-content-about {
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.5;
    max-width: 100%;
    font-size: 0.875rem;
}

body.single-agency #agency-about .main-post .madb-post-content-about p,
body.single-agency #agency-about .madb-post-content-about p,
body.single-agency #agency-about .madb-post-content-about p:last-child {
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.6;
    font-size: 1.1rem;
    margin: 16px 0 15px;
}

@media (min-width: 769px) {
    body.single-agency #agency-about .madb-post-content-about {
        line-height: 1.7;
        max-width: 52rem;
        font-size: 1rem;
    }

    body.single-agency #agency-about .main-post .madb-post-content-about p,
    body.single-agency #agency-about .madb-post-content-about p,
    body.single-agency #agency-about .madb-post-content-about p:last-child {
        margin: 0 0 1.1rem;
        font-size: 1.4rem;
    }

    body.single-agency #agency-about .madb-post-content-about > p:last-child {
        margin-bottom: 0;
    }
}

/* HQ / Offices map shell (tabs file handles chrome; ensure base visibility) */
body.single-agency .madb-post-agency-about-map-container {
    margin-top: 0.5rem;
}

body.single-agency .madb-tab {
    width: 100%;
}

body.single-agency .madb-tab-items {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

body.single-agency .madb-tab-content {
    display: none;
}

body.single-agency .madb-tab-content.active {
    display: block;
}

/* Open Positions — job cards */
body.single-agency .madb-agency-jobs-grid {
    display: flex;
    flex-flow: row wrap;
    gap: 1.25rem 0;
    width: 100%;
}

body.single-agency .madb-agency-jobs-grid > .columns {
    margin-bottom: 0.5rem;
}

body.single-agency .job-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 280px;
    padding: 1.25rem;
    box-sizing: border-box;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

body.single-agency .job-card:hover {
    border-color: rgba(139, 92, 246, 0.7);
    background: rgba(255, 255, 255, 0.09);
    transform: translateY(-2px);
}

body.single-agency .job-card-top {
    flex: 1 1 auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    padding-bottom: 1rem;
    margin-bottom: 0.85rem;
}

body.single-agency .job-card-image {
    margin-bottom: 0.85rem;
}

body.single-agency .job-card-image img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 6px;
    background: #fff;
}

body.single-agency .job-card-title {
    margin: 0 0 0.6rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    color: #fff;
}

body.single-agency .job-card-description {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.68);
}

body.single-agency .job-card-content {
    margin-top: auto;
}

body.single-agency .job-card-meta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

body.single-agency .job-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.65);
}

body.single-agency .job-card-meta svg {
    flex-shrink: 0;
}

body.single-agency .madb-agency-jobs-pagination {
    margin-top: 1.5rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

@media (min-width: 768px) {
    body.single-agency .madb-agency-jobs-pagination {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

/* Light mode — profile about + jobs */
body.light-mode.single-agency #agency-about .madb-post-content-about,
body.light-mode.single-agency #agency-about .madb-post-content-about p {
    color: rgba(17, 17, 17, 0.88);
}

body.light-mode.single-agency .job-card {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.12);
    color: #111;
}

body.light-mode.single-agency .job-card:hover {
    border-color: rgba(139, 92, 246, 0.55);
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode.single-agency .job-card-top {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

body.light-mode.single-agency .job-card-title {
    color: #111;
}

body.light-mode.single-agency .job-card-description,
body.light-mode.single-agency .job-card-meta span {
    color: rgba(17, 17, 17, 0.65);
}
