/**
 * Priyo Directory Theme - Complete 100% Stylesheet
 * Responsive: Mobile Clean Slider, PC 3-Column Ad & Two-End Footer
 * Author: মো. মোস্তফা খান
 */

/* ১. রুট ভ্যারিয়েবল ও রিসেট */
:root {
    --primary-color: #047857;
    --primary-hover: #065f46;
    --primary-light: #ecfdf5;
    --text-main: #0f172a;
    --text-muted: #475569;
    --bg-desktop: #f1f5f9;
    --bg-app: #ffffff;
    --card-bg: #ffffff;
    --border-color: #cbd5e1;
    --border-light: #e2e8f0;
    --danger-color: #ef4444;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-card: 0 4px 10px rgba(0, 0, 0, 0.06);
    --app-max-width: 1240px;
    --radius-card: 16px;
    --radius-btn: 10px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: 'Hind Siliguri', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-desktop);
    color: var(--text-main);
    line-height: 1.5;
    padding-bottom: 85px;
    min-height: 100vh;
}

a { 
    text-decoration: none; 
    color: inherit; 
}

img { 
    max-width: 100%; 
    height: auto; 
    display: block; 
}

/* ২. স্টিকি হেডার বার */
.app-header-sticky {
    position: sticky;
    top: 0;
    z-index: 999;
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
    width: 100%;
}

.header-inner-box {
    max-width: var(--app-max-width);
    margin: 0 auto;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-icon-btn {
    background: none;
    border: none;
    padding: 6px;
    display: flex;
    align-items: center;
    cursor: pointer;
    color: var(--text-main);
}

.app-brand-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-header-logo {
    max-height: 52px;
    width: auto;
    object-fit: contain;
}

.default-logo-text { 
    text-align: center; 
}

.site-main-title { 
    font-size: 1.4rem; 
    font-weight: 800; 
    color: var(--primary-color); 
    display: block; 
    line-height: 1.2; 
}

.site-sub-title { 
    font-size: 0.85rem; 
    font-weight: 600; 
    color: var(--text-muted); 
    display: block; 
}

.notification-btn { 
    position: relative; 
}

.notification-btn .red-dot {
    position: absolute; 
    top: 2px; 
    right: 2px; 
    width: 9px; 
    height: 9px; 
    background: var(--danger-color); 
    border-radius: 50%; 
    border: 1.5px solid #ffffff;
}

/* ৩. মূল কন্টেইনার */
.app-main-container {
    max-width: var(--app-max-width);
    margin: 0 auto;
    padding: 16px;
    background: var(--bg-app);
    min-height: calc(100vh - 150px);
}

@media (min-width: 1241px) {
    .app-main-container {
        border-left: 1px solid var(--border-color);
        border-right: 1px solid var(--border-color);
        box-shadow: 0 0 25px rgba(0, 0, 0, 0.05);
    }
}

/* ৪. হিরো সেকশন */
@media (max-width: 849px) {
    .hidden-on-mobile,
    .side-ad-slot {
        display: none !important;
        visibility: hidden !important;
        height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }
    
    .hero-ad-slider-container {
        display: block !important;
        width: 100% !important;
    }
    
    .center-main-slider {
        width: 100% !important;
    }

    .slider-wrapper {
        height: 195px !important;
    }
}

.hero-ad-slider-container {
    margin-bottom: 16px;
}

.center-main-slider {
    position: relative;
    border-radius: var(--radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: #000000;
}

.slider-wrapper {
    position: relative;
    width: 100%;
}

@media (min-width: 850px) {
    .hero-ad-slider-container {
        display: grid !important;
        grid-template-columns: 220px 1fr 220px !important;
        align-items: stretch;
        gap: 16px;
    }

    .side-ad-slot {
        display: flex !important;
        visibility: visible !important;
        border-radius: var(--radius-card);
        overflow: hidden;
        box-shadow: var(--shadow-sm);
        background: #ffffff;
        border: 1.5px solid var(--border-color);
        align-items: center;
        justify-content: center;
        position: relative;
        height: 100% !important;
    }

    .slider-wrapper {
        height: 310px !important;
    }
}

.ad-link-wrap {
    display: block;
    width: 100%;
    height: 100%;
}

.side-ad-slot img {
    width: 100%;
    height: 100%;
    max-height: 310px;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.25s ease;
}

.side-ad-slot:hover img {
    transform: scale(1.02);
}

.ad-placeholder-box {
    width: 100%;
    height: 100%;
    min-height: 140px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    text-align: center;
    border: 2px dashed #cbd5e1;
    border-radius: var(--radius-card);
}

.ad-badge-label {
    background: #e2e8f0;
    color: #475569;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    margin-bottom: 6px;
    display: inline-block;
}

.ad-size-hint {
    color: #047857;
    font-size: 0.95rem;
    font-weight: 800;
    margin: 4px 0;
}

.ad-call-action {
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 600;
}

.slider-slide {
    position: absolute;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    opacity: 0; 
    transition: opacity 0.6s ease-in-out;
}

.slider-slide.active { 
    opacity: 1; 
}

.slider-slide img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
}

.default-hero-banner {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    width: 100%; 
    height: 100%; 
    padding: 24px; 
    color: #ffffff; 
    display: flex; 
    flex-direction: column; 
    justify-content: center;
}

.banner-pill {
    background: rgba(255, 255, 255, 0.2);
    font-size: 0.75rem; 
    padding: 3px 12px; 
    border-radius: 12px; 
    width: fit-content; 
    margin-bottom: 8px;
}

.slider-dots {
    position: absolute;
    bottom: 12px; 
    left: 50%; 
    transform: translateX(-50%); 
    display: flex; 
    gap: 6px; 
    z-index: 10;
}

.slider-dots .dot {
    width: 8px; 
    height: 8px; 
    background: rgba(255, 255, 255, 0.5); 
    border-radius: 50%; 
    cursor: pointer;
}

.slider-dots .dot.active {
    background: #ffffff;
    width: 22px;
    border-radius: 10px;
}

/* ৫. চলন্ত নোটিশ টিকার */
.app-ticker-box {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: 30px;
    padding: 6px 14px 6px 6px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.ticker-badge {
    background: var(--primary-color);
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    white-space: nowrap;
    margin-right: 12px;
    z-index: 2;
}

.ticker-track-wrapper {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
}

.ticker-content { 
    display: inline-block; 
    white-space: nowrap; 
}

.ticker-text-marquee {
    display: inline-block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    padding-left: 100%;
    animation: marquee-anim 16s linear infinite;
}

.ticker-track-wrapper:hover .ticker-text-marquee {
    animation-play-state: paused;
}

@keyframes marquee-anim {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

.ticker-arrow-btn {
    font-size: 1.6rem;
    color: var(--primary-color);
    font-weight: 700;
    padding-left: 8px;
    line-height: 1;
    z-index: 2;
}

/* ৬. লাইভ সার্চ বার */
.app-search-section { 
    position: relative; 
    margin-bottom: 16px; 
}

.search-input-group { 
    position: relative; 
    display: flex; 
    align-items: center; 
}

.search-icon { 
    position: absolute; 
    left: 16px; 
    color: var(--text-muted); 
    pointer-events: none; 
}

.search-input-group input {
    width: 100%;
    padding: 13px 18px 13px 48px;
    border: 1.5px solid var(--border-color);
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    outline: none;
    background: #ffffff;
    box-shadow: var(--shadow-sm);
    color: var(--text-main);
}

.search-input-group input:focus { 
    border-color: var(--primary-color); 
}

.search-results-dropdown {
    position: absolute; 
    top: calc(100% + 6px); 
    left: 0; 
    right: 0; 
    background: #ffffff; 
    border: 1px solid var(--border-color); 
    border-radius: 14px; 
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.12); 
    z-index: 110; 
    display: none; 
    max-height: 320px; 
    overflow-y: auto;
}

.search-results-dropdown ul { 
    list-style: none; 
}

.search-results-dropdown li a { 
    display: block; 
    padding: 12px 18px; 
    border-bottom: 1px solid var(--border-light); 
}

.search-results-dropdown li a:hover { 
    background: var(--border-light); 
}

.search-results-dropdown .res-title { 
    font-size: 1rem; 
    font-weight: 700; 
    color: var(--text-main); 
}

.search-results-dropdown .res-sub { 
    font-size: 0.85rem; 
    font-weight: 600; 
    color: var(--text-muted); 
}

/* ৭. উপজেলা ফিল্টার চিপস */
.app-upazila-filter { 
    margin-bottom: 16px; 
}

.section-heading { 
    display: flex; 
    align-items: center; 
    gap: 8px; 
    margin-bottom: 10px; 
}

.section-heading h4 { 
    font-size: 1.05rem; 
    font-weight: 800; 
    color: var(--primary-color); 
}

.upazila-chips-scroll { 
    display: flex; 
    gap: 10px; 
    overflow-x: auto; 
    padding-bottom: 6px; 
    scrollbar-width: none; 
}

.upazila-chips-scroll::-webkit-scrollbar { 
    display: none; 
}

.upazila-chip {
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: 20px;
    padding: 7px 18px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-main);
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.upazila-chip:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* ৮. ক্যাটাগরি গ্রিড (নাচানাচি রোধে সাইজ ফিক্সড) */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (min-width: 768px) {
    .services-grid { 
        grid-template-columns: repeat(5, 1fr); 
        gap: 16px; 
    }
}

@media (min-width: 1024px) {
    .services-grid { 
        grid-template-columns: repeat(6, 1fr); 
        gap: 16px; 
    }
}

.service-card {
    background: var(--card-bg);
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-card);
    padding: 14px 6px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    min-height: 145px; /* হাইট লক করা হয়েছে */
    contain: layout paint;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
    box-shadow: var(--shadow-card);
    border-color: var(--primary-color);
}

.service-card:active { 
    transform: scale(0.98); 
}

.card-icon-wrap {
    width: 55px; 
    height: 55px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    margin-bottom: 6px;
    flex-shrink: 0;
}

.card-icon-wrap img { 
    width: 48px; 
    height: 48px; 
    object-fit: contain; 
    aspect-ratio: 1 / 1;
    display: block;
}

.default-cat-svg-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-light);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-title {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 4px;
    line-height: 1.3;
}

.card-count-badge {
    background: var(--primary-light);
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
    border: 1px solid rgba(4, 120, 87, 0.2);
}

/* ৯. লেভেল ৩ সার্ভিস প্রোভাইডার লিস্ট কার্ড */
.category-page-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.back-nav-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
}

.category-header-title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--text-main);
}

.service-items-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}

@media (min-width: 768px) {
    .service-items-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
}

.service-entry-card {
    background: var(--card-bg);
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.entry-card-header {
    display: flex;
    align-items: center;
    padding: 16px;
    position: relative;
}

.entry-avatar {
    margin-right: 14px;
    flex-shrink: 0;
}

.provider-thumb, .avatar-placeholder-circle {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--border-color);
}

.avatar-placeholder-circle {
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.entry-meta-details {
    flex-grow: 1;
    padding-right: 20px;
}

.provider-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 3px;
}

.provider-meta-line {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.view-detail-arrow {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.provider-call-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary-color);
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 700;
    padding: 12px 0;
    width: 100%;
    transition: background 0.2s ease;
}

.provider-call-btn:hover {
    background: var(--primary-hover);
}

/* ১০. পেজ ও যোগাযোগ কার্ড স্টাইল */
.contact-cards-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

@media (min-width: 768px) {
    .contact-cards-container {
        grid-template-columns: repeat(3, 1fr);
    }
}

.contact-quick-card {
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: var(--shadow-sm);
}

.contact-quick-card .c-icon {
    font-size: 1.8rem;
}

.contact-quick-card h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted);
}

.contact-highlight {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--primary-color);
}

.page-content-wrapper {
    background: #ffffff;
    border-radius: 14px;
    border: 1.5px solid var(--border-color);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    font-size: 1.05rem;
    line-height: 1.8;
}

/* ১১. সাইডবার ড্রয়ার মেনু */
.side-drawer {
    position: fixed; 
    top: 0; 
    left: -340px; 
    width: 320px; 
    height: 100%; 
    background: #ffffff; 
    z-index: 1001; 
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
    box-shadow: 4px 0 25px rgba(0, 0, 0, 0.15); 
    display: flex; 
    flex-direction: column;
}

.side-drawer.open { 
    left: 0; 
}

.drawer-header-box { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    padding: 18px; 
    border-bottom: 1px solid var(--border-color); 
}

.close-drawer-btn { 
    background: none; 
    border: none; 
    font-size: 1.8rem; 
    color: var(--text-muted); 
    cursor: pointer; 
    line-height: 1; 
}

.drawer-scroll-body { 
    flex-grow: 1; 
    overflow-y: auto; 
    padding: 16px; 
}

.drawer-section { 
    margin-bottom: 20px; 
}

.section-badge-title { 
    font-size: 0.82rem; 
    font-weight: 800; 
    color: var(--text-muted); 
    text-transform: uppercase; 
    margin-bottom: 10px; 
    display: block; 
}

.drawer-links-list { 
    list-style: none; 
}

.drawer-links-list li a { 
    display: block; 
    padding: 10px 12px; 
    font-size: 0.95rem; 
    font-weight: 700; 
    color: var(--text-main); 
    border-radius: 8px; 
    transition: all 0.15s ease; 
}

.drawer-links-list li a:hover { 
    background: var(--border-light); 
    color: var(--primary-color); 
    padding-left: 16px; 
}

.drawer-about-box {
    background: var(--bg-desktop);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px;
}

.drawer-about-thumb {
    width: 100%;
    height: 110px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 8px;
}

.drawer-about-desc {
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-bottom: 8px;
}

.drawer-about-more {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
}

.drawer-dev-credits {
    border-top: 1.5px solid var(--border-color);
    padding-top: 16px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.dev-line {
    margin-top: 4px;
}

.dev-line strong {
    color: var(--primary-color);
}

.drawer-overlay {
    position: fixed; 
    top: 0; 
    left: 0; 
    right: 0; 
    bottom: 0; 
    background: rgba(0, 0, 0, 0.45); 
    z-index: 1000; 
    display: none;
}

.drawer-overlay.open { 
    display: block; 
}

/* ১২. ফুটার ক্রেডিট বার */
.app-main-desktop-footer {
    width: 100%;
    max-width: var(--app-max-width);
    margin: 24px auto 12px;
    padding: 16px 20px;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-sm);
}

.footer-inner-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-align: center;
}

@media (min-width: 650px) {
    .footer-inner-wrap {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}

.footer-copy-text {
    font-size: 0.92rem;
    color: var(--text-muted);
    font-weight: 600;
    margin: 0;
}

.footer-dev-text {
    font-size: 0.92rem;
    color: var(--text-muted);
    font-weight: 600;
    margin: 0;
}

.footer-dev-text .dev-link {
    color: var(--primary-color);
    font-weight: 800;
    transition: color 0.2s ease;
}

.footer-dev-text .dev-link:hover {
    text-decoration: underline;
    color: var(--primary-hover);
}

/* ১৩. স্টিকি বটম নেভিগেশন বার */
.app-bottom-navbar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: var(--app-max-width);
    height: 64px;
    background: #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1.5px solid var(--border-color);
    box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.06);
    z-index: 998;
}

@media (min-width: 1241px) {
    .app-bottom-navbar {
        border-left: 1px solid var(--border-color);
        border-right: 1px solid var(--border-color);
    }
}

.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    flex: 1;
}

.bottom-nav-link.active { 
    color: var(--primary-color); 
}

.center-floating-profile { 
    position: relative; 
    top: -14px; 
}

.floating-circle-btn {
    width: 50px; 
    height: 50px; 
    background: var(--primary-color); 
    border-radius: 50%; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    box-shadow: 0 4px 12px rgba(4, 120, 87, 0.38); 
    border: 3px solid #ffffff;
}

/* ১৪. পেজিনেশন ও এম্পটি স্টেট */
.custom-pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 18px;
}

.custom-pagination a,
.custom-pagination .current {
    padding: 8px 16px;
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 700;
}

.custom-pagination .current {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.empty-state-box {
    text-align: center;
    padding: 40px 10px;
    color: var(--text-muted);
    font-weight: 600;
}