/**
 * Directorist Premium Theme Integration Styles
 * Re-imagined for Tuhono Trust (HealthPoint Sync)
 * Aesthetics: Slick, Modern, Premium, Healthcare-Focused
 */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@200..800&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

:root {
    --tuh-navy: #1a2e4a;
    --tuh-navy-light: #2d4a6f;
    --tuh-teal: #3bb4c4;
    --tuh-teal-light: #5ec8d6;
    --tuh-white: #ffffff;
    --tuh-gray-light: #f8f9fa;
    --tuh-gray: #6c757d;
    --tuh-accent: #fbc02d;
    /* Subtle accent for highlights */
    --tuh-glass: rgba(255, 255, 255, 0.95);
    --tuh-radius-lg: 24px;
    --tuh-radius-md: 16px;
    --tuh-shadow: 0 10px 40px rgba(26, 46, 74, 0.08);
    --tuh-shadow-hover: 0 20px 60px rgba(26, 46, 74, 0.15);
}

/* ===================================
   GLOBAL ENHANCEMENTS
   =================================== */

body {
    -webkit-font-smoothing: antialiased;
}

.single-at_biz_dir {
    font-family: 'Open Sans', system-ui, sans-serif;
    color: var(--tuh-navy);
    line-height: 1.8;
    background-color: #fcfdfe;
}

.atbdp-single-listing-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
}

/* ===================================
   HEADER & HERO SECTION
   =================================== */

.single-at_biz_dir .directorist-single-header,
.single-at_biz_dir .atbdp-single-header {
    background: var(--tuh-white);
    border-radius: var(--tuh-radius-lg);
    box-shadow: var(--tuh-shadow);
    padding: 0;
    margin-bottom: 3rem;
    overflow: hidden;
    border: 1px solid rgba(59, 180, 196, 0.1);
}

.atbd-listing-title h1,
.atbdp_listing_title,
.entry-title {
    font-family: 'Manrope', sans-serif !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em;
    font-size: clamp(2.2rem, 5vw, 3.2rem) !important;
    color: var(--tuh-navy);
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.single-at_biz_dir .atbdp_listing_title::after {
    display: none;
    /* Hide the old line, use modern spacing */
}

/* ===================================
   QUICK INFO BAR (Slick Version)
   =================================== */

.single-at_biz_dir .directorist-single-info,
.single-at_biz_dir .atbdp-listing-info-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--tuh-navy), #14213d);
    border-radius: 0 0 var(--tuh-radius-lg) var(--tuh-radius-lg);
    border: none;
}

.single-at_biz_dir .directorist-single-info-item,
.single-at_biz_dir .atbdp-listing-info-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 1rem 1.5rem;
    border-radius: var(--tuh-radius-md);
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.single-at_biz_dir .directorist-single-info-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.single-at_biz_dir .directorist-single-info-item i,
.single-at_biz_dir .atbdp-listing-info-item i {
    color: var(--tuh-teal-light);
    font-size: 1.4rem;
    margin-right: 1rem;
}

/* ===================================
   FEATURED IMAGE & GALLERY
   =================================== */

.single-at_biz_dir .directorist-single-image,
.atbd-single-image,
.atbdp-listing-slider {
    margin-bottom: 0;
    border-radius: var(--tuh-radius-lg) var(--tuh-radius-lg) 0 0;
    max-height: 500px;
    position: relative;
    box-shadow: none;
}

.single-at_biz_dir .atbd-single-image img {
    height: 500px;
    width: 100%;
    object-fit: cover;
    filter: brightness(0.95);
    transition: filter 0.5s ease;
}

.single-at_biz_dir .atbd-single-image:hover img {
    filter: brightness(1);
}

/* Base Category Badges */
.atbdp-category-badge,
.directory-category,
.directorist-badge {
    background: rgba(59, 180, 196, 0.1) !important;
    color: var(--tuh-teal) !important;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(59, 180, 196, 0.2);
    padding: 0.6rem 1.25rem !important;
    border-radius: 50px !important;
    font-family: 'Manrope', sans-serif;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 0.75rem !important;
    letter-spacing: 0.05em;
    margin-right: 0.75rem;
}

/* ===================================
   LAYOUT STRUCTURE
   =================================== */

@media (min-width: 992px) {
    .atbdp-single-listing-wrapper .atbdp-single-contents-wrapper {
        display: grid;
        grid-template-columns: 1fr 380px;
        gap: 3rem;
        align-items: start;
    }
}

/* ===================================
   CONTENT MODULES (Slick Cards)
   =================================== */

.atbdp-content-module,
.atbd-listing-section {
    background: var(--tuh-white);
    padding: 3rem !important;
    margin-bottom: 3rem !important;
    border-radius: var(--tuh-radius-lg) !important;
    box-shadow: var(--tuh-shadow) !important;
    border: 1px solid rgba(59, 180, 196, 0.05) !important;
    position: relative;
    overflow: hidden;
}

.atbdp-content-module::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 6px;
    height: 100%;
    background: linear-gradient(to bottom, var(--tuh-teal), var(--tuh-navy));
    opacity: 0.3;
}

.atbdp-widget-title,
.atbd-listing-section-title {
    font-family: 'Manrope', sans-serif !important;
    font-weight: 800 !important;
    font-size: 1.8rem !important;
    color: var(--tuh-navy);
    margin-bottom: 2rem !important;
    padding-bottom: 0 !important;
    border-bottom: none !important;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.atbdp-widget-title i,
.atbd-listing-section-title i {
    color: var(--tuh-teal);
    font-size: 1.5rem;
}

/* ===================================
   CONTACT INFO CARD
   =================================== */

.atbdp-contact-info {
    background: linear-gradient(135deg, #f8fbfb, #ffffff) !important;
    border: 1px solid rgba(59, 180, 196, 0.1) !important;
    color: var(--tuh-navy) !important;
}

.atbdp-contact-info .atbdp-info-item {
    background: var(--tuh-white);
    padding: 1.25rem;
    border-radius: var(--tuh-radius-md);
    margin-bottom: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.atbdp-contact-info .atbdp-info-item i {
    color: var(--tuh-teal);
    background: rgba(59, 180, 196, 0.1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.atbdp-contact-info a {
    color: var(--tuh-navy) !important;
    font-weight: 600;
}

/* ===================================
   BUSINESS HOURS (Modern Look)
   =================================== */

.atbdp-business-hours {
    border: 1px solid var(--tuh-gray-light);
    border-radius: var(--tuh-radius-md);
}

.atbdp-business-hour {
    padding: 1.25rem 1.5rem !important;
    transition: background 0.3s ease;
}

.atbdp-business-hour.current-day {
    background: rgba(59, 180, 196, 0.08) !important;
    border-left: 4px solid var(--tuh-teal) !important;
}

.atbdp-business-hour .day {
    font-family: 'Manrope', sans-serif;
    font-weight: 700 !important;
}

/* ===================================
   SIDEBAR (Premium Sticky)
   =================================== */

.atbdp-single-sidebar .atbdp-widget {
    background: var(--tuh-white);
    border-radius: var(--tuh-radius-lg);
    box-shadow: var(--tuh-shadow);
    padding: 2.5rem !important;
    margin-bottom: 2rem;
    border: 1px solid rgba(59, 180, 196, 0.05);
}

.atbdp-single-sidebar .atbdp-widget-title {
    font-size: 1.4rem !important;
    margin-bottom: 1.5rem !important;
}

/* CTA Sidebar Widget */
.atbdp-contact-owner {
    background: linear-gradient(135deg, var(--tuh-navy), var(--tuh-navy-light)) !important;
    padding: 3rem 2rem !important;
    text-align: center;
    border-radius: var(--tuh-radius-lg) !important;
}

.atbdp-contact-owner h4 {
    font-family: 'Manrope', sans-serif;
    color: white !important;
    font-size: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

.atbdp-contact-owner .btn {
    width: 100%;
    background: var(--tuh-teal) !important;
    color: white !important;
    border-radius: var(--tuh-radius-md) !important;
    padding: 1rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 10px 20px rgba(59, 180, 196, 0.3) !important;
}

/* ===================================
   MAP ENHANCEMENTS
   =================================== */

.atbdp-map-wrapper,
#healthpoint-map-container {
    border-radius: var(--tuh-radius-lg);
    border: 4px solid var(--tuh-white);
    box-shadow: var(--tuh-shadow);
    overflow: hidden;
}

/* ===================================
   BUTTONS (Slick Styling)
   =================================== */

.atbdp-button,
.atbd-button,
.btn-primary,
input[type="submit"] {
    background: linear-gradient(135deg, var(--tuh-teal), var(--tuh-teal-light)) !important;
    border: none !important;
    border-radius: 50px !important;
    padding: 1.15rem 2.5rem !important;
    font-family: 'Manrope', sans-serif !important;
    font-weight: 800 !important;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
    box-shadow: 0 10px 25px rgba(59, 180, 196, 0.3) !important;
    text-transform: none !important;
}

.atbdp-button:hover,
input[type="submit"]:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 35px rgba(59, 180, 196, 0.4) !important;
    background: linear-gradient(135deg, var(--tuh-navy), var(--tuh-navy-light)) !important;
}

/* ===================================
   LISTING CARDS (Archive Page)
   =================================== */

.atbdp-listing-card {
    border: none !important;
    border-radius: var(--tuh-radius-lg) !important;
    box-shadow: var(--tuh-shadow) !important;
    transition: all 0.4s ease !important;
    background: var(--tuh-white);
    padding: 1.25rem !important;
    /* Added better card padding */
}

.atbdp-listing-card:hover {
    transform: translateY(-12px) !important;
    box-shadow: var(--tuh-shadow-hover) !important;
}

.atbdp-listing-card-title a {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    color: var(--tuh-navy);
}

/* ===================================
   HEALTHPOINT CUSTOM MAP WIDGET
   =================================== */

.healthpoint-map-container {
    background: var(--tuh-white);
    border-radius: var(--tuh-radius-lg);
    box-shadow: var(--tuh-shadow);
    border: 1px solid rgba(59, 180, 196, 0.1);
    padding: 1rem;
}

.hp-map-controls {
    background: #f0f4f7;
    border-radius: var(--tuh-radius-md);
    margin-bottom: 1rem;
    padding: 1.25rem !important;
}

.hp-map-filter,
.hp-map-search-input {
    border-radius: 12px !important;
    border: 1px solid rgba(26, 46, 74, 0.1) !important;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

/* Popup Slickness */
.hp-map-popup .leaflet-popup-content-wrapper {
    border-radius: 20px !important;
    padding: 0 !important;
    box-shadow: 0 20px 50px rgba(26, 46, 74, 0.25) !important;
    overflow: hidden;
}

.hp-popup-content {
    padding: 2rem !important;
    /* Added internal padding to popups */
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hp-popup-title a {
    font-family: 'Manrope', sans-serif;
    font-weight: 800;
    color: var(--tuh-navy);
}

.hp-popup-button {
    background: var(--tuh-teal) !important;
    border-radius: 12px !important;
    padding: 0.75rem 1.5rem !important;
    font-weight: 700 !important;
    display: inline-block;
    margin-top: 0.5rem;
}

.hp-popup-category {
    background: rgba(59, 180, 196, 0.1);
    color: var(--tuh-teal);
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-right: 5px;
    margin-bottom: 5px;
    display: inline-block;
}

/* Progress / Loading */
#hp-map-listing-count {
    border-radius: 0 0 var(--tuh-radius-md) var(--tuh-radius-md);
    background: var(--tuh-navy);
    font-family: 'Manrope', sans-serif;
    letter-spacing: 0.02em;
}

/* ===================================
   ANIMATIONS
   =================================== */

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

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

.atbdp-content-module {
    animation: fadeInUp 0.6s ease out backwards;
}

.atbdp-content-module:nth-child(1) {
    animation-delay: 0.1s;
}

.atbdp-content-module:nth-child(2) {
    animation-delay: 0.2s;
}

.atbdp-content-module:nth-child(3) {
    animation-delay: 0.3s;
}

/* ===================================
   RESPONSIVE FIXES
   =================================== */

@media (max-width: 768px) {
    .atbdp-single-listing-wrapper {
        padding: 2rem 1.25rem;
    }

    .atbdp-content-module {
        padding: 2rem !important;
    }

    .atbd-listing-title h1 {
        font-size: 2.2rem !important;
    }

    .atbd-single-image img {
        height: 300px;
    }
}