/**
 * UDH API Sync - Frontend Styles
 * Colors: Cyan #3ea9da, Navy #081839
 */

:root {
    --udh-cyan: #3ea9da;
    --udh-navy: #081839;
    --udh-light-gray: #f8f9fa;
    --udh-border: #e9ecef;
    --udh-text: #333;
    --udh-text-light: #666;
    --udh-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    --udh-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.12);
    --udh-transition: all 0.3s ease;
}

/* =====================
   DOCTORS ARCHIVE PAGE
   ===================== */

.udh-doctors-archive {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
}

/* Filter Bar */
.udh-filter-bar {
    background: #fff;
    border-radius: 12px;
    padding: 20px 25px;
    margin-bottom: 40px;
    box-shadow: var(--udh-shadow);
}

.udh-filter-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.udh-filter-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.udh-filter-right {
    flex: 1;
    max-width: 350px;
    min-width: 250px;
}

/* Available Button */
.udh-available-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--udh-cyan);
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--udh-transition);
    font-family: inherit;
}

.udh-available-btn:hover {
    background: #2d96c5;
    transform: translateY(-2px);
}

.udh-pulse {
    width: 10px;
    height: 10px;
    background: #4ade80;
    border-radius: 50%;
    animation: pulse-animation 2s infinite;
}

@keyframes pulse-animation {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.7;
        transform: scale(1.2);
    }
}

/* Specialty Dropdown */
.udh-specialty-dropdown select {
    padding: 12px 40px 12px 20px;
    border: 2px solid var(--udh-border);
    border-radius: 8px;
    font-size: 14px;
    color: var(--udh-text);
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 15px center;
    appearance: none;
    cursor: pointer;
    min-width: 180px;
    font-family: inherit;
    transition: var(--udh-transition);
}

.udh-specialty-dropdown select:focus {
    outline: none;
    border-color: var(--udh-cyan);
}

/* Search Box */
.udh-search-box {
    position: relative;
    width: 100%;
}

.udh-search-box input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border: 2px solid var(--udh-border);
    border-radius: 8px;
    font-size: 14px;
    transition: var(--udh-transition);
    font-family: inherit;
    direction: rtl;
}

.udh-search-box input:focus {
    outline: none;
    border-color: var(--udh-cyan);
}

.udh-search-box input::placeholder {
    color: #999;
}

.udh-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

/* Doctors Grid */
.udh-doctors-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 50px;
}

/* Doctor Card */
.udh-doctor-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--udh-shadow);
    transition: var(--udh-transition);
}

.udh-doctor-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--udh-shadow-hover);
}

.udh-doctor-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.udh-card-image {
    position: relative;
    height: 280px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.udh-card-logo {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.udh-card-logo img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.udh-doctor-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--udh-transition);
}

.udh-doctor-card:hover .udh-doctor-photo {
    transform: scale(1.05);
}

.udh-no-photo-placeholder {
    color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.udh-card-content {
    padding: 20px;
    text-align: center;
    background: #fff;
}

.udh-card-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--udh-navy);
    margin: 0 0 8px;
    line-height: 1.4;
}

.udh-card-specialty {
    font-size: 14px;
    color: var(--udh-text-light);
    margin: 0 0 8px;
}

.udh-card-level {
    display: inline-block;
    font-size: 12px;
    color: var(--udh-cyan);
    background: rgba(62, 169, 218, 0.1);
    padding: 4px 12px;
    border-radius: 15px;
}

/* No Results */
.udh-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: var(--udh-text-light);
    font-size: 18px;
}

/* Loading Overlay */
.udh-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.udh-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--udh-border);
    border-top-color: var(--udh-cyan);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.udh-loading-overlay p {
    margin-top: 15px;
    color: var(--udh-text-light);
}

/* Pagination */
.udh-pagination-container {
    margin: 50px 0 20px;
    display: flex;
    justify-content: center;
}

.udh-pagination-container ul.page-numbers,
.udh-pagination,
.udh-pagination-wrap {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.udh-pagination-container .page-numbers li,
.udh-pagination .udh-page-link,
.udh-pagination .udh-page-dots {
    margin: 0;
}

.udh-pagination-container .page-numbers a,
.udh-pagination-container .page-numbers span,
.udh-pagination .udh-page-link,
.udh-pagination .udh-page-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 10px;
    border-radius: 8px;
    background: #fff;
    color: var(--udh-text);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: var(--udh-transition);
    border: 1px solid var(--udh-border);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.02);
}

.udh-pagination-container .page-numbers a:hover,
.udh-pagination .udh-page-link:hover {
    background: #f0f7fb;
    border-color: var(--udh-cyan);
    color: var(--udh-cyan);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(62, 169, 218, 0.15);
}

.udh-pagination-container .page-numbers .current,
.udh-pagination .udh-page-link.active {
    background: var(--udh-cyan);
    color: #fff;
    border-color: var(--udh-cyan);
    box-shadow: 0 4px 12px rgba(62, 169, 218, 0.3);
}

.udh-pagination-container .page-numbers .dots,
.udh-pagination .udh-page-dots {
    border: none;
    background: transparent;
    cursor: default;
    box-shadow: none;
    color: var(--udh-text-light);
}

.udh-pagination-container .page-numbers .prev,
.udh-pagination-container .page-numbers .next {
    background: #fff;
    font-size: 20px;
}

.udh-pagination-container .page-numbers .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    line-height: 1;
}

/* =====================
   SINGLE DOCTOR PAGE - NEW DESIGN
   ===================== */

.udh-single-doctor {
    font-family: inherit;
}

.udh-single-doctor[dir="rtl"] {
    direction: rtl;
}

.udh-single-doctor[dir="ltr"] {
    direction: ltr;
}

/* Hero Section - Clean Design */
.udh-doctor-hero-section {
    background: transparent;
    padding: 40px 20px 0;
}

.udh-hero-card {
    max-width: 1100px;
    margin: 0 auto;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.udh-hero-card-inner {
    display: flex;
    padding: 40px;
    gap: 40px;
    align-items: flex-start;
}

[dir="rtl"] .udh-hero-card-inner {
    flex-direction: row-reverse;
}

/* Hero Info - Left side in RTL */
.udh-hero-info {
    flex: 1;
}

.udh-hero-name {
    font-size: 28px;
    font-weight: 700;
    color: var(--udh-cyan);
    margin: 0 0 12px;
    line-height: 1.4;
}

.udh-hero-bio {
    font-size: 14px;
    color: var(--udh-text-light);
    line-height: 1.8;
    margin: 0 0 25px;
}

/* Meta Rows */
.udh-hero-meta {
    margin-bottom: 25px;
}

.udh-meta-row {
    display: flex;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.udh-meta-row:last-child {
    border-bottom: none;
}

.udh-meta-row .udh-meta-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--udh-cyan);
    min-width: 100px;
    flex-shrink: 0;
}

.udh-meta-row .udh-meta-value {
    font-size: 13px;
    color: var(--udh-text);
    line-height: 1.6;
}

/* Hero Buttons */
.udh-hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.udh-btn-book {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--udh-cyan);
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--udh-transition);
}

.udh-btn-book:hover {
    background: #2d96c5;
    transform: translateY(-2px);
    color: #fff;
}

.udh-btn-consult {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: #fff;
    color: var(--udh-text);
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: var(--udh-transition);
}

.udh-btn-consult:hover {
    border-color: var(--udh-cyan);
    color: var(--udh-cyan);
}

/* Hero Photo - Right side in RTL */
.udh-hero-photo {
    flex-shrink: 0;
}

.udh-photo-frame {
    width: 200px;
    height: 240px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
}

.udh-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.udh-photo-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #ccc;
}

.udh-photo-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 50px;
    height: 50px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[dir="rtl"] .udh-photo-badge {
    right: auto;
    left: 10px;
}

.udh-photo-badge img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.udh-photo-badge span {
    font-size: 10px;
    font-weight: 700;
    color: var(--udh-cyan);
}

/* Services Section - Light Gray Background */
.udh-services-section {
    background: #f0f4f7;
    padding: 50px 20px;
}

.udh-services-wrapper {
    max-width: 1100px;
    margin: 0 auto;
}

.udh-services-header {
    text-align: center;
    margin-bottom: 35px;
}

.udh-services-subtitle {
    display: block;
    font-size: 12px;
    color: var(--udh-text-light);
    margin-bottom: 8px;
}

.udh-services-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--udh-navy);
    margin: 0;
}

.udh-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.udh-service-item {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    transition: var(--udh-transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.udh-service-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.udh-service-check {
    width: 32px;
    height: 32px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}

.udh-service-desc {
    font-size: 13px;
    color: var(--udh-text);
    line-height: 1.6;
    margin: 0;
    padding-top: 5px;
}

/* Error Message */
.udh-error {
    text-align: center;
    padding: 60px 20px;
    color: #dc3545;
    font-size: 18px;
}

/* =====================
   RESPONSIVE DESIGN
   ===================== */

@media screen and (max-width: 1200px) {
    .udh-doctors-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 992px) {
    .udh-doctors-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .udh-hero-card-inner {
        flex-direction: column !important;
        text-align: center;
    }

    .udh-hero-photo {
        order: -1;
        margin-bottom: 20px;
    }

    .udh-hero-buttons {
        justify-content: center;
    }

    .udh-meta-row {
        justify-content: center;
    }

    .udh-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .udh-filter-bar-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .udh-filter-left {
        justify-content: center;
    }

    .udh-filter-right {
        max-width: none;
    }

    .udh-doctors-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .udh-card-image {
        height: 300px;
    }

    .udh-hero-card-inner {
        padding: 25px;
    }

    .udh-hero-name {
        font-size: 24px;
    }

    .udh-photo-frame {
        width: 180px;
        height: 220px;
    }

    .udh-services-grid {
        grid-template-columns: 1fr;
    }

    .udh-meta-row {
        flex-direction: column;
        gap: 5px;
    }

    .udh-meta-row .udh-meta-label {
        min-width: auto;
    }
}

@media screen and (max-width: 480px) {
    .udh-available-btn {
        width: 100%;
        justify-content: center;
    }

    .udh-specialty-dropdown {
        width: 100%;
    }

    .udh-specialty-dropdown select {
        width: 100%;
    }

    .udh-hero-buttons {
        flex-direction: column;
    }

    .udh-btn-book,
    .udh-btn-consult {
        width: 100%;
        justify-content: center;
    }
}

/* =====================
   SPECIALIZATIONS PAGE
   ===================== */

.udh-specializations-page {
    background: #ffffff;
    padding: 40px 20px;
    min-height: 500px;
    font-family: inherit;
}

a.udh-spec-card {
    background: linear-gradient(180deg, rgba(22, 67, 159, 0.1) 0%, rgba(8, 24, 57, 0.1) 100%);
    box-shadow: none !important;
}

p.udh-spec-desc {
    color: black;
    padding-bottom: 13px;
    border-bottom: 1px dashed #8080804a;
    margin-bottom: 13px;
}

.udh-specs-container {
    max-width: 1200px;
    margin: 0 auto;
}

.udh-specs-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.udh-spec-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.udh-spec-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.udh-spec-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 15px;
}

.udh-spec-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.udh-spec-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--udh-navy, #081839);
    margin: 0 0 10px;
    line-height: 1.4;
}

.udh-spec-desc {
    font-size: 12px;
    color: var(--udh-text-light, #666);
    line-height: 1.7;
    margin: 0 0 15px;
    flex-grow: 1;
}

.udh-spec-footer {
    display: flex;
    align-items: center;
}

.udh-spec-doctors {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--udh-cyan, #3ea9da);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.udh-spec-doctors svg {
    width: 14px;
    height: 14px;
}

/* Specializations Pagination */
.udh-specs-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.udh-specs-pagination .udh-page-num,
.udh-specs-pagination .udh-page-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    color: var(--udh-text, #333);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.udh-specs-pagination .udh-page-num:hover,
.udh-specs-pagination .udh-page-arrow:hover {
    background: var(--udh-cyan, #3ea9da);
    color: #fff;
}

.udh-specs-pagination .udh-page-num.active {
    background: var(--udh-cyan, #3ea9da);
    color: #fff;
}

/* Specializations Responsive */
@media screen and (max-width: 992px) {
    .udh-specs-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media screen and (max-width: 768px) {
    .udh-specs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 480px) {
    .udh-specs-grid {
        grid-template-columns: 1fr;
    }

    .udh-spec-card {
        padding: 20px;
    }
}

/* =====================
   ELEMENTOR WIDGETS
   ===================== */

.udh-specialties-slider {
    width: 100%;
    padding: 10px 0;
}

.udh-spec-slide {
    position: relative;
    height: 300px;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
    background-color: #f5f5f5;
    background-size: cover;
    background-position: center;
}

.udh-spec-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.5s ease;
    z-index: 1;
}

.udh-spec-slide:hover .udh-spec-bg-image {
    transform: scale(1.05);
}

.udh-spec-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(30, 166, 227, 0.4) 0%, rgba(9, 64, 103, 0.9) 100%);
    z-index: 2;
    transition: opacity 0.3s ease;
}

.udh-spec-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 25px;
    color: #fff;
    text-align: right;
    /* RTL Default */
}

/* Check direction for LTR */
body:not(.rtl) .udh-spec-content {
    text-align: left;
}

.udh-spec-top {
    display: flex;
    justify-content: flex-start;
    /* Icon on left in LTR, right in RTL */
}

body:not(.rtl) .udh-spec-top {
    justify-content: flex-end;
    /* Adjust based on design pref, user image showed icon on top right/left? Image showed top right for icon */
}

.udh-spec-icon-box {
    width: 60px;
    height: 60px;
    background: #fff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.udh-spec-icon-box img {
    width: 35px;
    height: 35px;
    object-fit: contain;
}

.udh-spec-middle {
    margin-top: auto;
    margin-bottom: 20px;
}

.udh-spec-title {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.4;
}

.udh-spec-desc {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.udh-spec-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px dashed rgba(255, 255, 255, 0.2);
    padding-top: 15px;
    flex-direction: row-reverse;
}

.udh-spec-btn {
    width: 40px;
    height: 40px;
    background: #00b8d4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.udh-spec-btn:hover {
    background: #fff;
    transform: scale(1.1);
}

.udh-spec-btn i {
    color: #fff;
    font-size: 18px;
    transition: color 0.3s ease;
}

.udh-spec-btn:hover i {
    color: #00b8d4;
}

.udh-spec-count {
    font-size: 14px;
    font-weight: 600;
}

/* Swiper Pagination Customization */
.udh-specialties-slider .swiper-pagination-bullet {
    background: #ccc;
    opacity: 1;
}

.udh-specialties-slider .swiper-pagination-bullet-active {
    background: #00b8d4;
}

/* Hero Slider Styles */
.udh-hero-slider {
    width: 100%;
    position: relative;
}

.udh-hero-slide {
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Positioning Arrows for Hero Slider */
.udh-hero-slider .owl-nav {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    pointer-events: none;
    /* Allow clicking through the container */
    display: flex;
    justify-content: space-between;
    z-index: 10;
}

.udh-hero-slider .owl-nav button.owl-prev,
.udh-hero-slider .owl-nav button.owl-next {
    pointer-events: auto;
    /* Re-enable clicks on buttons */
    background: rgba(0, 0, 0, 0.5) !important;
    color: #fff !important;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 24px !important;
    margin: 0 20px !important;
    border: none;
    outline: none;
    transition: background 0.3s, transform 0.2s;
}

.udh-hero-slider .owl-nav button.owl-prev span,
.udh-hero-slider .owl-nav button.owl-next span {
    font-size: 30px;
    line-height: 1;
    position: relative;
    top: -2px;
    /* Visual adjustment for default Owl arrows */
}

.udh-hero-slider .owl-nav button:hover {
    background: rgba(0, 184, 212, 0.9) !important;
    transform: scale(1.1);
}

@media screen and (max-width: 768px) {

    /* Hero Slider Responsive Arrows */
    .udh-hero-slider .owl-nav button.owl-prev,
    .udh-hero-slider .owl-nav button.owl-next {
        width: 35px !important;
        height: 35px !important;
        margin: 0 10px !important;
    }

    .udh-hero-slider .owl-nav button.owl-prev span,
    .udh-hero-slider .owl-nav button.owl-next span {
        font-size: 20px !important;
        line-height: 35px !important;
        top: 0 !important;
    }
}

/* Specialties Slider Navigation (Centered like Hero) */
.udh-specialties-slider .owl-nav {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    z-index: 10;
}

.udh-specialties-slider .owl-nav button.owl-prev,
.udh-specialties-slider .owl-nav button.owl-next {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.5);
    /* Default fallback */
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin: 0 -20px;
    /* Slight negative margin to pull outside container if desired, or 0 if inside */
    border: none;
    outline: none;
    transition: background 0.3s, transform 0.2s;
}

/* Adjust negative margin on hover or responsive if needed */
/* For inside bounds: margin: 0 10px; */
.udh-specialties-slider .owl-nav button.owl-prev,
.udh-specialties-slider .owl-nav button.owl-next {
    margin: 0 10px;
}

.udh-specialties-slider .owl-nav button.owl-prev span,
.udh-specialties-slider .owl-nav button.owl-next span {
    font-size: 30px;
    line-height: 1;
    position: relative;
    top: -2px;
}

.udh-specialties-slider .owl-nav button:hover {
    background: var(--udh-cyan, #3ea9da);
    transform: scale(1.1);
}

/* =====================
   DOCTORS GRID WIDGET (2 Rows)
   ===================== */
.udh-doctors-grid-container {
    width: 100%;
    overflow: hidden;
    /* Hide the overflowing parts of Row 2 */
    padding: 20px 0;
}

.udh-doc-grid-row {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

.udh-doc-row-1 .udh-doc-grid-item {
    width: calc(100% / 6 - 20px);
    /* Approx width */
    flex: 0 0 calc(16.666% - 17px);
}

.udh-doc-row-2 {
    width: 116.666%;
    /* (7/6) * 100% */
    margin-left: -8.333%;
    /* Shift left by half item width */
    margin-right: 0;
}

.udh-doc-row-2 .udh-doc-grid-item {
    flex: 1;
    /* Distribute evenly */
}

/* RTL Support for Grid */
body.rtl .udh-doc-row-2,
[dir="rtl"] .udh-doc-row-2 {
    margin-left: 0;
    margin-right: -8.333%;
    /* Shift right by half item width */
}

.udh-doc-grid-item {
    background: transparent;
    border-radius: 20px;
    text-align: center;
    transition: transform 0.3s ease;
}

.udh-doc-grid-item:hover {
    transform: translateY(-5px);
}

.udh-doc-grid-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    /* Square images */
    border-radius: 20px;
    overflow: hidden;
    margin-bottom: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.udh-doc-grid-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.udh-doc-grid-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--udh-navy, #081839);
    margin: 0 0 5px;
}

.udh-doc-grid-spec {
    font-size: 13px;
    color: var(--udh-text-light, #666);
    margin: 0;
}

/* Responsive Grid */
@media screen and (max-width: 1024px) {
    .udh-doc-grid-row {
        flex-wrap: wrap;
        justify-content: center;
    }

    .udh-doc-row-1 .udh-doc-grid-item,
    .udh-doc-row-2 .udh-doc-grid-item {
        flex: 0 0 calc(33.333% - 20px);
        /* 3 per row on tablet */
        width: auto;
    }

    .udh-doc-row-2 {
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

@media screen and (max-width: 768px) {

    .udh-doc-row-1 .udh-doc-grid-item,
    .udh-doc-row-2 .udh-doc-grid-item {
        flex: 0 0 calc(50% - 10px);
        /* 2 per row on mobile */
    }
}

/* =====================
   ACCREDITATIONS SLIDER WIDGET
   ===================== */
.udh-accreditations-slider {
    padding: 20px 5px;
    /* Space for shadow */
}

.udh-acc-slide {
    background: #F7F7F7;
    border-radius: 10px;
    padding: 20px;
    text-align: right;
    box-shadow: none !important;
    /* Subtle shadow */
    transition: all 0.3s ease;
    border: 1px solid transparent;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 200px;
    /* Uniform height */
}

.udh-acc-slide:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-color: rgba(62, 169, 218, 0.2);
    /* Cyan tint on hover */
}

.udh-acc-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
}

.udh-acc-logo {
    height: 120px; /* increased from 70px */
    display: flex;
    align-items: center;      /* changed from flex-start */
    justify-content: center;  /* changed from flex-start */
    margin-bottom: 15px;
    width: 100%;
    text-align: center;
}

.udh-acc-logo img {
    max-height: 100%;
    width: auto !important;
    max-width: 100%;
    object-fit: contain;
    border-radius: 10px;
}

.udh-acc-title {
    font-size: 12px;
    font-weight: 600;
    color: #333;
    margin: 0 0 15px;
    line-height: 1.4;
    flex-grow: 1;
    /* Push link to bottom */
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.udh-acc-link {
    font-size: 13px;
    color: var(--udh-cyan, #3ea9da);
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    transition: color 0.3s;
    margin: 0;
    transition: all 0.2s ease;
}

.udh-acc-link:hover {
    color: var(--udh-secondary, #3B9AE1) !important;
}

/* Breadcrumbs Widget */
.udh-breadcrumbs-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(8, 24, 57, 0.6);
    /* Default fallback */
    padding: 10px 20px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
}

.udh-breadcrumbs-item {
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
}

.udh-breadcrumbs-item a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.udh-breadcrumbs-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
}

/* RTL Support for Breadcrumbs */
body.rtl .udh-breadcrumbs-container {
    flex-direction: row;
}

body.rtl .udh-breadcrumbs-separator i {
    transform: rotate(180deg);
    /* Flip arrow for RTL if needed, usually arrow-left becomes right logic */
}

/* If using specific arrow-left icon, RTL might need rotation or specific icon */
body.rtl .fa-arrow-left {
    transform: rotate(0deg);
}

/* Ensure SVG has size */
.udh-breadcrumbs-separator svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}



.udh-acc-link i {
    margin-right: 5px;
    transition: transform 0.3s;
}

[dir="rtl"] .udh-acc-link i {
    margin-right: 0;
    margin-left: 5px;
}


/* Specializations Archive Footer Icon */
.udh-spec-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px dashed #e0e0e0;
    padding-top: 15px;
    margin-top: auto;
    flex-direction: row-reverse;
    /* Match Widget Layout */
}

.udh-spec-btn-icon {
    width: 40px;
    height: 40px;
    background: #00b8d4;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: #fff;
    font-size: 18px;
}

.udh-spec-card:hover .udh-spec-btn-icon {
    background: #081839;
    transform: rotate(45deg);
    /* Optional effect */
}

.udh-spec-footer .udh-spec-count {
    color: #081839;
    /* Dark Navy for light background */
}

[dir="rtl"] .udh-acc-link:hover i {
    transform: translateX(3px);
    /* RTL move left */
}

/* =====================
   Doctors Archive Redesign
   ===================== */

/* Filter Bar */
.udh-filter-bar {
    margin-bottom: 30px;
    padding: 10px 0;
}

.udh-filter-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.udh-specialty-dropdown select,
.udh-search-box input {
    background: #fff;
    border: 1px solid #eee;
    height: 50px;
    padding: 0 20px;
    border-radius: 8px;
    font-size: 14px;
    color: #333;
    outline: none;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
    min-width: 250px;
}

.udh-specialty-dropdown select:focus,
.udh-search-box input:focus {
    border-color: #00b8d4;
    box-shadow: 0 5px 15px rgba(0, 184, 212, 0.1);
}

.udh-search-box {
    position: relative;
    width: 100%;
    max-width: 400px;
}

.udh-search-box input {
    width: 100%;
}

.udh-search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

[dir="rtl"] .udh-search-icon {
    left: auto;
    right: 15px;
}

/* Doctors Grid */
.udh-doctors-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1024px) {
    .udh-doctors-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .udh-doctors-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .udh-filter-bar-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .udh-specialty-dropdown select,
    .udh-search-box {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .udh-doctors-grid {
        grid-template-columns: 1fr;
    }
}

/* Floating Card Design */
.udh-doctor-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.udh-doctor-card-link {
    display: block;
    position: relative;
    text-decoration: none;
}

.udh-no-photo-placeholder {
    color: #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
}

.udh-hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

a.udh-btn-book,
a.udh-btn-consult {
    border-radius: 50px;
}

.udh-service-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.page-id-402 main#content {
    width: 100% !important;
    max-width: 100%;
}

section.udh-services-section {
    margin-top: 3rem;
}

.udh-card-image {
    position: relative;
    width: 100%;
    padding-top: 120%;
    /* Aspect ratio ~4:5 */
    background: #e0e0e0;
}

.udh-card-image img.udh-doctor-photo {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
}

/* Logo in corner */
.udh-card-logo {
    position: absolute;
    top: 15px;
    left: 15px;
    /* LTR */
    z-index: 2;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

[dir="rtl"] .udh-card-logo {
    left: auto;
    right: 15px;
}

.udh-card-content {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.83);
    backdrop-filter: blur(5px);
    padding: 15px 10px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    z-index: 2;
}

.udh-card-name {
    margin: 0 0 5px;
    color: #081839;
    font-size: 16px;
    font-weight: 700;
}

.udh-card-specialty {
    margin: 0;
    color: #666;
    font-size: 13px;
}

.udh-card-level {
    display: none;
    /* Hide level for cleaner look unless requested */
}

/* Hover Effect */
.udh-doctor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}


/* =====================
   Blog Archive Redesign
   ===================== */

.udh-blog-archive {
    padding: 50px 0;
    font-family: inherit;
}

/* Featured Card */
.udh-blog-featured-card {
    background: #eef4f8;
    /* Light blueish grey */
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 50px;
    display: flex;
    align-items: center;
    gap: 40px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.02);
}
/* Commented by Jihad */
/* [dir="rtl"] .udh-blog-featured-card {
    flex-direction: row;
} */
[dir="rtl"] .udh-blog-featured-card {
    flex-direction: row;
}

@media (max-width: 768px) {
    [dir="rtl"] .udh-blog-featured-card {
        flex-direction: column !important;
    }

    [dir="rtl"] .udh-blog-featured-image {
        order: -1 !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    [dir="rtl"] .udh-blog-featured-image img {
        width: 100%;
        height: 220px;
        object-fit: cover;
        border-radius: 12px;
    }
}

/* On mobile, stack them */
/* @media (max-width: 768px) {
    .udh-blog-featured-card {
        flex-direction: column-reverse;
        padding: 20px;
        text-align: center;
    }
} */
/* Add by Jihad */
@media (max-width: 768px) {
    .udh-blog-featured-card {
        flex-direction: column;
        padding: 20px;
        text-align: right;
        gap: 20px;
    }

    .udh-blog-featured-image {
        max-width: 100%;
        width: 100%;
        order: -1;
    }

    .udh-blog-featured-image img {
        width: 100%;
        height: 220px;
        object-fit: cover;
        border-radius: 12px;
        margin: 0;
    }

    .udh-blog-featured-content {
        width: 100%;
    }

    .udh-blog-title.large {
        font-size: 18px;
        margin-bottom: 10px;
    }

    .udh-blog-excerpt {
        font-size: 14px;
    }
}

/* End of Jihad code */

.udh-blog-featured-content {
    flex: 1;
}

.udh-blog-featured-image {
    flex: 1;
    max-width: 50%;
}

/* COmmented by Jihad */
/* @media (max-width: 768px) {
    .udh-blog-featured-image {
        max-width: 100%;
        width: 100%;
        margin-bottom: 20px;
    }
} */

.udh-blog-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.udh-blog-title.large {
    font-size: 24px;
    font-weight: 700;
    color: #081839;
    margin-bottom: 15px;
    line-height: 1.4;
}

.udh-blog-title.large a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

.udh-blog-title.large a:hover {
    color: #00b8d4;
}

.udh-blog-excerpt {
    font-size: 15px;
    color: #555;
    line-height: 1.8;
    margin-bottom: 20px;
}

.udh-blog-read-more {
    font-weight: 700;
    color: #00b8d4;
    text-decoration: none;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.3s;
}

.udh-blog-read-more:hover {
    gap: 8px;
    color: #081839;
}

/* Grid Layout */
.udh-blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 992px) {
    .udh-blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .udh-blog-grid {
        grid-template-columns: 1fr;
    }
}

.udh-blog-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease;
    height: 100%;
}

.udh-blog-card:hover {
    transform: translateY(-5px);
}

.udh-blog-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.udh-blog-card-image {
    position: relative;
    padding-top: 60%;
    /* Aspect Ratio */
    background: #f0f0f0;
}

.udh-blog-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.udh-blog-card-body {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.udh-blog-title.small {
    font-size: 18px;
    font-weight: 700;
    color: #081839;
    margin-bottom: 10px;
    line-height: 1.4;
}

.udh-blog-excerpt.small {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex: 1;
}

.udh-blog-read-more-small {
    font-size: 13px;
    font-weight: 700;
    color: #00b8d4;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.udh-blog-card:hover .udh-blog-read-more-small {
    color: #081839;
}

/* =======================
   Activities Archive CSS
   ======================= */
.udh-activities-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

@media (max-width: 992px) {
    .udh-activities-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .udh-activities-grid {
        grid-template-columns: 1fr;
    }
}

.udh-activity-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    /* Soft shadow */
    transition: transform 0.3s ease;
    overflow: hidden;
    height: 100%;
}

.udh-activity-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.udh-activity-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.udh-activity-image {
    position: relative;
    padding-top: 60%;
    /* Aspect Ratio similar to screenshot */
    background: #f0f0f0;
}

.udh-activity-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.udh-activity-body {
    padding: 20px;
    text-align: center;
    display: flex;
    /* To center title vertically if needed */
    align-items: center;
    justify-content: center;
    flex: 1;
}

.udh-activity-title {
    font-size: 16px;
    font-weight: 700;
    color: #081839;
    margin: 0;
    line-height: 1.5;
}

/* =====================
   SINGLE SPECIALIZATION PAGE
   ===================== */

.udh-single-spec-page {
    font-family: inherit;
    overflow: hidden;
}

.udh-single-spec-page[dir="rtl"] {
    direction: rtl;
}

/* Hero Section */
/* ========== Bento Grid Hero Section ========== */
.udh-spec-hero {
    background: #ffffff;
    padding: 4rem 2rem;
    position: relative;
}

.udh-spec-bento-grid {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 400px 250px;
    gap: 24px;
}

/* Row 1 - Text Block */
.udh-bento-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
    order: 1;
}

[dir="rtl"] .udh-bento-text {
    order: 1;
}

[dir="ltr"] .udh-bento-text {
    order: 1;
}

.udh-bento-label {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    color: #4AA8D8;
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}

.udh-bento-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #1B2A4E;
    margin: 0 0 20px;
    line-height: 1.4;
}

.udh-bento-desc {
    font-size: 1rem;
    color: #4A5568;
    line-height: 1.8;
}

.udh-bento-desc p {
    margin: 0 0 12px;
}

.udh-bento-desc p:last-child {
    margin-bottom: 0;
}

/* Row 1 - Main Image */
.udh-bento-main-img {
    margin: 0;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    order: 2;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

[dir="rtl"] .udh-bento-main-img {
    order: 2;
}

[dir="ltr"] .udh-bento-main-img {
    order: 2;
}

.udh-bento-main-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Blue tint overlay on images */
.udh-bento-img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 64, 175, 0.08);
    pointer-events: none;
}

/* Row 2 - Left Image */
.udh-bento-img-left {
    margin: 0;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    order: 3;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

[dir="rtl"] .udh-bento-img-left {
    order: 5;
}

.udh-bento-img-left img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Row 2 - Stat Card (Center) */
.udh-bento-stat {
    background: #2C4B85;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
    order: 4;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.udh-bento-stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: #ffffff;
    line-height: 1;
    margin-bottom: 12px;
}

.udh-bento-stat-label {
    font-size: 1.1rem;
    font-weight: 500;
    color: #ffffff;
    line-height: 1.5;
    max-width: 200px;
}

/* Row 2 - Right Image */
.udh-bento-img-right {
    margin: 0;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    order: 5;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

[dir="rtl"] .udh-bento-img-right {
    order: 3;
}

.udh-bento-img-right img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Bottom row: 3 columns */
.udh-bento-img-left,
.udh-bento-stat,
.udh-bento-img-right {
    /* These span the second row as 3 equal columns */
}

/* Override grid for the 3-column bottom row */
.udh-spec-bento-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 400px 250px;
}

/* Redefine to use proper 3-col bottom */
@supports (grid-template-rows: auto) {
    .udh-spec-bento-grid {
        display: grid;
        grid-template-columns: repeat(6, 1fr);
        grid-template-rows: 400px 250px;
        gap: 24px;
    }

    .udh-bento-text {
        grid-column: 1 / 4;
        grid-row: 1;
    }

    [dir="rtl"] .udh-bento-text {
        grid-column: 4 / 7;
    }

    .udh-bento-main-img {
        grid-column: 4 / 7;
        grid-row: 1;
    }

    [dir="rtl"] .udh-bento-main-img {
        grid-column: 1 / 4;
    }

    .udh-bento-img-left {
        grid-column: 1 / 3;
        grid-row: 2;
    }

    [dir="rtl"] .udh-bento-img-left {
        grid-column: 5 / 7;
    }

    .udh-bento-stat {
        grid-column: 3 / 5;
        grid-row: 2;
    }

    .udh-bento-img-right {
        grid-column: 5 / 7;
        grid-row: 2;
    }

    [dir="rtl"] .udh-bento-img-right {
        grid-column: 1 / 3;
    }
}

/* Services Section */
.udh-spec-services {
    background: #fff;
    padding: 60px 20px;
}

.udh-spec-services-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.udh-spec-services-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--udh-navy, #081839);
    text-align: center;
    margin: 0 0 12px;
}

.udh-spec-services-subtitle {
    font-size: 14px;
    color: #777;
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.udh-spec-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.udh-spec-service-card {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f5f8fa;
    border: 1px solid #e8eef2;
    border-radius: 12px;
    padding: 18px 20px;
    transition: all 0.3s ease;
    cursor: default;
}

.udh-spec-service-card:hover {
    background: #fff;
    border-color: var(--udh-cyan, #3ea9da);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(62, 169, 218, 0.12);
}

.udh-spec-service-card:hover .udh-spec-service-icon {
    color: #fff;
    background: var(--udh-cyan, #3ea9da);
}

.udh-spec-service-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: rgba(62, 169, 218, 0.1);
    border-radius: 50%;
    color: var(--udh-cyan, #3ea9da);
    transition: all 0.3s ease;
    margin-top: 2px;
}

.udh-spec-service-content {
    flex: 1;
}

.udh-spec-service-name {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 700;
    color: var(--udh-navy, #081839);
    line-height: 1.4;
}

.udh-spec-service-desc {
    margin: 0;
    font-size: 13px;
    color: #777;
    line-height: 1.6;
}

/* Doctors Section */
.udh-spec-doctors-section {
    background: #f8fafb;
    padding: 60px 20px;
}

.udh-spec-doctors-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.udh-spec-doctors-title {
    font-size: 26px;
    font-weight: 800;
    color: var(--udh-navy, #081839);
    text-align: center;
    margin: 0 0 40px;
}

/* Doctors Slider Cards (matching doctors archive style) */
.udh-spec-doc-slide {
    padding: 5px;
}

.udh-spec-doc-link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 15px;
    overflow: hidden;
    background: #f9f9f9;
    transition: all 0.3s ease;
    position: relative;
}

.udh-spec-doc-link:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.udh-spec-doc-image {
    position: relative;
    width: 100%;
    padding-top: 120%;
    background: #e0e0e0;
    overflow: hidden;
}

.udh-spec-doc-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.3s ease;
}

.udh-spec-doc-link:hover .udh-spec-doc-image img {
    transform: scale(1.05);
}

.udh-spec-doc-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.udh-spec-doc-info {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(5px);
    padding: 15px 12px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    z-index: 2;
}

.udh-spec-doc-name {
    margin: 0 0 5px;
    color: var(--udh-navy, #081839);
    font-size: 15px;
    font-weight: 700;
    line-height: 1.3;
}

.udh-spec-doc-level {
    margin: 0;
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

/* Doctors Slider Navigation */
.udh-spec-doctors-slider.owl-carousel .owl-nav {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    transform: translateY(-50%);
    pointer-events: none;
    display: flex;
    justify-content: space-between;
    z-index: 10;
}

.udh-spec-doctors-slider.owl-carousel .owl-nav button.owl-prev,
.udh-spec-doctors-slider.owl-carousel .owl-nav button.owl-next {
    pointer-events: auto;
    background: rgba(8, 24, 57, 0.7) !important;
    color: #fff !important;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 22px !important;
    margin: 0 -10px !important;
    border: none;
    outline: none;
    transition: all 0.3s ease;
}

.udh-spec-doctors-slider.owl-carousel .owl-nav button span {
    font-size: 28px;
    line-height: 1;
    position: relative;
    top: -2px;
}

.udh-spec-doctors-slider.owl-carousel .owl-nav button:hover {
    background: var(--udh-cyan, #3ea9da) !important;
    transform: scale(1.1);
}

.udh-spec-doctors-slider.owl-carousel .owl-dots {
    text-align: center;
    margin-top: 25px;
}

.udh-spec-doctors-slider.owl-carousel .owl-dots .owl-dot span {
    width: 10px;
    height: 10px;
    background: #ccc;
    border-radius: 50%;
    display: inline-block;
    margin: 0 4px;
    transition: all 0.3s ease;
}

.udh-spec-doctors-slider.owl-carousel .owl-dots .owl-dot.active span {
    background: var(--udh-cyan, #3ea9da);
    width: 25px;
    border-radius: 5px;
}

/* Single Spec Responsive - Bento Grid */
@media screen and (max-width: 1024px) {
    .udh-spec-bento-grid {
        grid-template-columns: 1fr 1fr !important;
        grid-template-rows: auto auto 180px !important;
    }

    .udh-bento-text {
        grid-column: 1 / -1 !important;
        grid-row: 1 !important;
    }

    .udh-bento-main-img {
        grid-column: 1 / -1 !important;
        grid-row: 2 !important;
        height: 300px;
    }

    .udh-bento-img-left {
        grid-column: 1 / 2 !important;
        grid-row: 3 !important;
    }

    .udh-bento-stat {
        grid-column: 2 / 3 !important;
        grid-row: 3 !important;
    }

    .udh-bento-img-right {
        display: none;
    }

    .udh-spec-services-grid {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 768px) {
    .udh-spec-hero {
        padding: 2rem 1rem;
    }

    .udh-spec-bento-grid {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
        gap: 16px !important;
    }

    .udh-bento-text {
        grid-column: 1 !important;
        grid-row: auto !important;
        padding: 1rem 0;
    }

    .udh-bento-title {
        font-size: 1.75rem;
    }

    .udh-bento-main-img {
        grid-column: 1 !important;
        grid-row: auto !important;
        height: 250px;
    }

    .udh-bento-stat {
        grid-column: 1 !important;
        grid-row: auto !important;
        height: auto;
        padding: 2rem;
    }

    .udh-bento-img-left {
        grid-column: 1 !important;
        grid-row: auto !important;
        height: 200px;
    }

    .udh-bento-img-right {
        display: block;
        grid-column: 1 !important;
        grid-row: auto !important;
        height: 200px;
    }

    .udh-spec-services,
    .udh-spec-doctors-section {
        padding: 40px 15px;
    }

    .udh-spec-services-title,
    .udh-spec-doctors-title {
        font-size: 22px;
    }
}

@media screen and (max-width: 480px) {
    .udh-bento-title {
        font-size: 1.5rem;
    }

    .udh-spec-service-card {
        padding: 14px 16px;
    }

    .udh-spec-service-name {
        font-size: 14px;
    }

    .udh-bento-stat-number {
        font-size: 2.5rem;
    }

    .udh-bento-stat-label {
        font-size: 0.95rem;
    }
}

/* =====================
   DOCTORS FLEXIBLE GRID WIDGET
   ===================== */
.udh-docs-flex-wrapper {
    width: 100%;
}

.udh-docs-flex-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px 20px;
}

.udh-docs-grid-card {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.udh-docs-grid-link {
    display: block;
    position: relative;
    text-decoration: none;
    color: inherit;
}

a.udh-docs-grid-link:hover {
    color: inherit;
    text-decoration: none;
}

.udh-docs-grid-img {
    position: relative;
    width: 100%;
    padding-top: 120%;
    background: linear-gradient(135deg, #f5f7fa 0%, #e4e8eb 100%);
    overflow: hidden;
}

.udh-docs-grid-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.5s ease;
}

.udh-docs-grid-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ccc;
}

.udh-docs-grid-info {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: rgba(255, 255, 255, 0.83);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    padding: 15px 10px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    z-index: 2;
}

.udh-docs-grid-name {
    margin: 0 0 5px;
    color: #081839;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
}

.udh-docs-grid-level {
    margin: 0;
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

/* Hover Effects */
.udh-hover-translate .udh-docs-grid-card:hover {
    transform: translateY(-5px);
}

.udh-hover-scale .udh-docs-grid-card:hover .udh-docs-grid-img img {
    transform: scale(1.08);
}

.udh-hover-both .udh-docs-grid-card:hover {
    transform: translateY(-5px);
}

.udh-hover-both .udh-docs-grid-card:hover .udh-docs-grid-img img {
    transform: scale(1.08);
}

/* No results */
.udh-docs-flex-wrapper .udh-no-doctors {
    text-align: center;
    padding: 40px 20px;
    color: #999;
    font-size: 16px;
}

/* =====================
   BLOG & ARTICLE REFINEMENTS
   ===================== */

/* Global Article Body Defaults */
.single-post .post-content,
.single-post .entry-content,
.udh_activity-single .udh-description-box,
article .entry-content {
    line-height: 1.6 !important;
    text-align: justify;
    color: var(--udh-text);
}

/* Images in Articles - Always 100% Width */
.single-post .post-content img,
.single-post .entry-content img,
article img {
    max-width: 100% !important;
    height: auto !important;
    width: 100% !important;
    object-fit: cover;
    border-radius: 8px;
    margin: 20px 0;
    display: block;
}

/* Restore width for icons or small images */
.single-post .post-content img.wp-smiley,
.single-post .entry-content img.wp-smiley {
    width: auto !important;
    display: inline;
}

/* WP Default Gallery Styling */
.wp-block-gallery,
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin: 30px 0;
}

.gallery-item {
    flex: 1 1 calc(33.333% - 10px);
    margin-bottom: 0 !important;
}

.gallery-item img {
    width: 100% !important;
    height: 250px !important;
    object-fit: cover;
    border-radius: 8px;
    margin: 0 !important;
}

/* Blog Pagination Styling */
.udh-pagination-container {
    margin-top: 80px;
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.udh-pagination-container ul.page-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.udh-pagination-container ul.page-numbers li {
    margin: 0;
    padding: 0;
}

.page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    border-radius: 8px;
    /* Rounded squares instead of circles */
    background: #fff;
    color: var(--udh-navy);
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.page-numbers:hover {
    background: var(--udh-cyan);
    border-color: var(--udh-cyan);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(62, 169, 218, 0.2);
}

.page-numbers.current {
    background: var(--udh-navy);
    color: #fff;
    border-color: var(--udh-navy);
    cursor: default;
    box-shadow: 0 4px 12px rgba(8, 24, 57, 0.15);
}

.page-numbers.current:hover {
    transform: none;
    background: var(--udh-navy);
    color: #fff;
}

/* Fix for dot container if it still appears somehow */
.page-numbers.dots {
    border: none;
    background: transparent;
    cursor: default;
}