:root {
    --primary: #190782;
    --primary-light: #3827F5;
    --secondary: #0077b6;
    --accent: #ffc107;
    --accent-hover: #ffca2c;
    --success: #28a745;
    --danger: #dc3545;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --bg-light: #f8fafc;
    --bg-card: #ffffff;
    /*--bg-card: #f0f0f0;*/
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-light);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    transition: all 0.3s ease;
    text-decoration: none;
}

/* Header & Nav */
.nav-menu {
    background: rgba(25, 7, 130, 0.9) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.nav-menu.is-sticky {
    padding: 10px 0;
    background: rgba(25, 7, 130, 0.98) !important;
    box-shadow: var(--shadow-lg);
}

.navbar-brand {
    font-size: 1.5rem !important;
    display: flex;
    flex-direction: column;
}

.navbar-brand span {
    letter-spacing: -0.5px;
}

.navbar-brand p {
    font-size: 0.75rem !important;
    opacity: 0.8;
}

.nav-link {
    font-size: 0.95rem !important;
    font-weight: 500 !important;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
}

.nav-link:hover {
    color: var(--accent) !important;
    background: rgba(255, 255, 255, 0.05);
}

/* Hero Section */
.slider {
    height: 90vh !important;
    background-attachment: fixed !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider h4 {
    font-size: 3.5rem !important;
    line-height: 1.1;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.slider p {
    font-size: 1.25rem !important;
    opacity: 0.9;
}

.search-box {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    padding: 1.5rem !important;
    box-shadow: var(--shadow-lg) !important;
}

.search-box .form-control {
    background: white !important;
    border: none !important;
    height: 60px !important;
    font-size: 1.1rem !important;
    padding-left: 1.5rem !important;
    box-shadow: var(--shadow-sm) !important;
}

.search-box .btn-warning {
    height: 60px !important;
    font-size: 1.1rem !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-md) !important;
}

/* Explore Section */
.explore {
    padding: 100px 0 !important;
    background: var(--bg-light) !important;
}

.pop-h2 {
    font-size: 2.5rem !important;
    margin-bottom: 3rem !important;
    position: relative;
    display: inline-block;
}

.pop-h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--primary-light);
    border-radius: 2px;
}

.cat-wrapper {
    margin-bottom: 3rem !important;
}

.cat-scroll {
    gap: 1rem !important;
    padding: 10px !important;
}

.cat-scroll .item a {
    background: white !important;
    border: 1px solid var(--border-color) !important;
    padding: 12px 24px !important;
    border-radius: 30px !important;
    font-weight: 500 !important;
    color: var(--text-main) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    display: inline-block;
    box-shadow: var(--shadow-sm);
}

.cat-scroll .item a:hover {
    background: var(--primary) !important;
    color: white !important;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Business Cards */
.comp-item-box {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)) !important;
    gap: 1rem !important;
    padding: 1rem !important;
    margin-left: 10px;
    margin-right: 10px;
}

.comp-item {
    background: var(--bg-card) !important;
    /*border-radius: var(--radius-md) !important;*/
    overflow: hidden !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    border: 1px solid var(--border-color) !important;
    display: flex !important;
    flex-direction: row !important;
    /*height: 200px !important;*/
      height: 100%; 
    width: auto !important;
    margin: 0 !important;
    object-fit: cover;
}

.comp-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg) !important;
}

.comp-item .d-logo {
    height: 100% !important;
    width: 100% !important;
    overflow: hidden !important;
    position: relative !important;
    /*background: #f1f5f9;*/
    background: #f0f0f0;
}

.comp-item .d-logo img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.6s ease;
}

.comp-item:hover .d-logo img {
    transform: scale(1.1);
}

.comp-item .d-logo:has(.business-logo-circle) {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
}

.comp-item .d-logo:has(.business-logo-circle) a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.business-logo-circle {
    width: 128px;
    height: 128px;
    /*border-radius: 10%;*/
    /*background: #fff;*/
    /*border: 1px solid var(--border-color);*/
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.comp-item .d-logo img.business-logo-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: 1.1rem;
    /*background: #fff;*/
}

.comp-item:hover .d-logo img.business-logo-img {
    transform: scale(1.03);
}

.deflogo {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 3rem !important;
    background: linear-gradient(45deg, var(--primary), var(--secondary)) !important;
    color: white !important;
    font-weight: 800 !important;
}

.txt_part {
    padding: 1.5rem !important;
    flex-grow: 1 !important;
    display: flex !important;
    flex-direction: column !important;
}

.c-name a {
    font-size: 1rem !important;
    font-weight: 600 !important;
    /*color: var(--text-main) !important;*/
    color: #0073e6;
    margin-bottom: 0.5rem !important;
    display: block;
}

.c-addr {
    font-size: 0.9rem !important;
    color: var(--text-muted) !important;
    margin-bottom: 1rem !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.c-link a {
    background: #e0f2fe !important;
    color: #0369a1 !important;
    padding: 4px 12px !important;
    border-radius: 20px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    display: inline-block !important;
    margin-bottom: 1rem !important;
}

.view-detail-btn {
    margin-top: auto;
    padding: 10px;
    background: var(--primary);
    color: white !important;
    text-align: center;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

/* Footer Modernization */
footer {
    background: #0f172a !important;
    padding: 80px 0 40px !important;
}

footer h5 {
    color: white !important;
    font-size: 1.1rem !important;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2rem !important;
}

footer ul li a {
    color: #94a3b8 !important;
    font-size: 0.95rem !important;
}

footer ul li a:hover {
    color: var(--accent) !important;
    padding-left: 8px !important;
}

.footer-bottom {
    border-top: 1px solid #1e293b !important;
    color: #64748b !important;
}

/* Utils */
.btn-premium {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white !important;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    box-shadow: var(--shadow-md);
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    filter: brightness(1.1);
}

/* Responsive */
@media (max-width: 768px) {
    .slider h4 {
        font-size: 2.25rem !important;
    }
    .pop-h2 {
        font-size: 2rem !important;
    }
}

/* Final responsive polish */
img,
video,
iframe {
    max-width: 100%;
}

.navbar .container,
.container {
    max-width: 1420px;
    padding-left: 12px;
    padding-right: 12px;
}

@media (min-width: 576px) {
    .navbar .container,
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
}

.navbar-collapse {
    transition: all 0.25s ease;
}

.form-control,
.form-select,
.btn {
    min-height: 44px;
}

.modal {
    z-index: 1060;
}

.modal-backdrop {
    z-index: 1050;
}

/* Featured business slider */
.featured-section-head {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: end;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.featured-section-head > div:first-child {
    grid-column: 2;
}

.featured-section-head .pop-h2 {
    margin-bottom: 1rem !important;
}

.featured-slider-actions {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
    grid-column: 3;
    justify-self: end;
}

.featured-slider-btn {
    width: 46px;
    height: 46px;
    border: 1px solid var(--border-color);
    border-radius: 50%;
    background: #fff;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.25s ease;
}

.featured-slider-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.featured-slider-shell {
    margin-left: -8px;
    margin-right: -8px;
    overflow: hidden;
}

.featured-business-slider {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 8px 8px 22px;
    scrollbar-width: none;
}

.featured-business-slider::-webkit-scrollbar {
    display: none;
}

.featured-business-slide {
    flex: 0 0 min(360px, calc(100vw - 48px));
    scroll-snap-align: start;
}

.featured-business-card {
    position: relative;
    min-height: 100%;
    box-shadow: var(--shadow-sm);
}

.featured-business-card .featured-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 2;
}

.featured-business-card .featured-badge span {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--accent);
    color: #111827;
    font-size: 0.78rem;
    font-weight: 800;
    padding: 0.45rem 0.8rem;
    box-shadow: var(--shadow-md);
}

.featured-business-card .d-logo {
    height: 178px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
}

.featured-business-card .d-logo a {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-image-frame {
    width: 136px;
    height: 136px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.featured-business-card .d-logo img.featured-business-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    padding: 1rem;
    background: #fff;
}

.featured-business-card:hover .d-logo img.featured-business-img {
    transform: scale(1.04);
}

.featured-category {
    width: fit-content;
    max-width: 100%;
    border-radius: 999px;
    background: rgba(25, 7, 130, 0.09);
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    margin-bottom: 1rem;
}

.featured-card-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.featured-detail-link {
    color: var(--primary) !important;
    font-weight: 800;
    white-space: nowrap;
}

.featured-empty {
    width: 100%;
    padding: 3rem 1rem;
    text-align: center;
}

@media (min-width: 768px) {
    .featured-business-slide {
        flex-basis: calc((100% - 1.25rem) / 2);
    }
}

@media (min-width: 1200px) {
    .featured-business-slide {
        flex-basis: calc((100% - 3.75rem) / 4);
    }
}

@media (max-width: 991.98px) {
    .nav-menu {
        background: rgba(25, 7, 130, 0.98) !important;
    }

    .navbar-collapse {
        margin-top: 1rem;
        padding: 1rem;
        background: rgba(15, 23, 42, 0.98);
        border: 1px solid rgba(255,255,255,0.12);
        border-radius: 12px;
        box-shadow: var(--shadow-lg);
    }

    .navbar-nav {
        align-items: stretch !important;
    }

    .nav-link {
        padding: 0.75rem 1rem !important;
    }

    .slider {
        min-height: 760px !important;
        height: auto !important;
        padding: 140px 0 80px !important;
        background-attachment: scroll !important;
    }

    .search-box {
        padding: 1rem !important;
    }

    .comp-item-box {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .listing-hero,
    .directory-hero,
    .detail-hero,
    .job-hero {
        border-bottom-left-radius: 28px !important;
        border-bottom-right-radius: 28px !important;
    }
}

@media (max-width: 575.98px) {
    body {
        font-size: 15px;
    }

    .navbar-brand {
        font-size: 1.1rem !important;
        max-width: 210px;
    }

    .navbar-brand p {
        display: none;
    }

    .slider {
        min-height: 680px !important;
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }

    .slider h4 {
        font-size: 2rem !important;
    }

    .slider p {
        font-size: 1rem !important;
    }

    .search-box .form-control,
    .search-box .btn-warning {
        height: 52px !important;
        font-size: 1rem !important;
    }

    .explore,
    footer {
        padding: 56px 0 !important;
    }

    .comp-item-box {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
        padding: 0 !important;
    }

    .cat-pills-wrapper {
        width: 100%;
        justify-content: flex-start;
        border-radius: 14px !important;
    }

    .cat-pill {
        padding: 9px 16px !important;
    }

    .listing-card,
    .business-card,
    .job-card,
    .main-card,
    .sidebar-card,
    .detail-card,
    .filter-card {
        border-radius: 12px !important;
    }

    .listing-img,
    .business-card-img,
    .comp-item .d-logo {
        height: 190px !important;
    }

    .business-logo-circle {
        width: 108px;
        height: 108px;
    }

    .listing-main-img {
        height: 260px !important;
    }

    .modal-dialog {
        margin: 0.75rem;
    }

    .modal-body,
    .apply-form-body {
        padding: 1.25rem !important;
    }

    .apply-header-section {
        padding: 130px 0 120px !important;
        border-bottom-left-radius: 28px !important;
        border-bottom-right-radius: 28px !important;
    }

    .featured-section-head {
        align-items: flex-start;
        flex-direction: column;
        display: flex;
        margin-bottom: 1.5rem;
        text-align: center;
    }

    .featured-slider-actions {
        align-self: center;
    }

    .featured-business-card .d-logo {
        height: 158px !important;
    }

    .featured-image-frame {
        width: 116px;
        height: 116px;
    }
}
