/**
 * U Hla Tun Hospice Myanmar - Custom Site Enhancements & Component Overrides
 */

/* ==========================================================================
   Navigation Highlighting & States
   ========================================================================== */
/* Desktop active navigation: Brand Blue Accent */
#top-menu > li.current-menu-item > a,
#top-menu > li.current_page_item > a,
#top-menu > li.current-menu-ancestor > a,
#top-menu > li.current_page_parent > a {
    color: var(--color-brand-blue-accent) !important;
    font-weight: 700;
}

/* Sub-menu active link highlighting */
#top-menu .sub-menu li.current-menu-item > a {
    color: var(--color-brand-blue-accent) !important;
    font-weight: 700;
}

/* Mobile Navigation active highlighting (on clean white header) */
@media only screen and (max-width: 980px) {
    .et_mobile_menu > li.current-menu-item > a,
    .et_mobile_menu > li.current-menu-ancestor > a,
    .et_mobile_menu > li.current_page_parent > a,
    .et_mobile_menu .sub-menu li.current-menu-item > a {
        color: var(--color-brand-blue-accent) !important;
        font-weight: 700;
    }
}

/* ==========================================================================
   Smart Slider 3 Carousel Setup
   ========================================================================== */
#n2-ss-2,
.n2-ss-slider.n2-ss-load-fade {
    position: relative !important;
    opacity: 1 !important;
    width: 100% !important;
    max-width: var(--layout-max-width) !important;
    margin: 0 auto !important;
    display: block !important;
    visibility: visible !important;
    overflow: hidden;
}

#n2-ss-2-placeholder {
    display: none !important;
}

div#n2-ss-2 .n2-ss-slider-1,
div#n2-ss-2 .n2-ss-slider-2,
div#n2-ss-2 .n2-ss-slider-3 {
    position: relative !important;
    width: 100% !important;
    height: var(--slider-desktop-height) !important;
    overflow: hidden !important;
}

div#n2-ss-2 .n2-ss-slide {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
}

div#n2-ss-2 .n2-ss-slide-background,
div#n2-ss-2 .n2-ss-slide-background-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

div#n2-ss-2 .n2-ss-slide-background-image img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    opacity: 1 !important;
    visibility: visible !important;
}

#n2-ss-2-arrow-previous {
    position: absolute;
    left: 25px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 20;
}

#n2-ss-2-arrow-next {
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    z-index: 20;
}

/* Animations Failsafe */
.et_animated {
    opacity: 1 !important;
    visibility: visible !important;
}

/* ==========================================================================
   Home Quick Action Cards (Strictly Scoped to .home)
   ========================================================================== */
.home .et_pb_row_1 {
    margin-top: 24px !important;
    margin-bottom: 24px !important;
}

.home .et_pb_row_1 .et_pb_column .et_pb_module.et_pb_text {
    background: var(--color-bg-surface) !important;
    border-radius: var(--border-radius-md) !important;
    box-shadow: var(--shadow-card-action) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    border-top: 2px solid var(--color-brand-green-accent) !important;
    padding: 16px 12px !important;
    text-align: center !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease !important;
}

.home .et_pb_row_1 .et_pb_column .et_pb_module.et_pb_text:hover {
    transform: translateY(-2px) !important;
    box-shadow: var(--shadow-card-action-hover) !important;
    border-color: rgba(46, 163, 242, 0.35) !important;
}

.home .et_pb_row_1 .item-header a {
    color: var(--color-brand-blue-deep) !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    font-style: italic !important;
    text-decoration: none !important;
    display: block !important;
    letter-spacing: 0.3px;
    transition: color 0.2s ease !important;
}

.home .et_pb_row_1 .item-header a:hover {
    color: var(--color-brand-blue-accent) !important;
}

@media only screen and (max-width: 980px) {
    .mobile_nav.opened #mobile_menu {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    div#n2-ss-2 .n2-ss-slider-1,
    div#n2-ss-2 .n2-ss-slider-2,
    div#n2-ss-2 .n2-ss-slider-3 {
        height: var(--slider-tablet-height) !important;
    }
}

@media only screen and (max-width: 600px) {
    div#n2-ss-2 .n2-ss-slider-1,
    div#n2-ss-2 .n2-ss-slider-2,
    div#n2-ss-2 .n2-ss-slider-3 {
        height: var(--slider-mobile-height) !important;
    }
}

/* ==========================================================================
   Facebook Hybrid Cards (Yangon & Mandalay Branches)
   ========================================================================== */
.fb-hybrid-container {
    max-width: 440px;
    margin: 15px auto 0 auto;
    position: relative;
    border-radius: 12px;
    box-sizing: border-box;
}

.fb-card {
    background: var(--color-bg-surface);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.fb-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.14);
}

.fb-cover {
    height: 140px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: #e4e6eb;
}

.fb-cover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.45) 100%);
}

.fb-content {
    padding: 0 20px 22px 20px;
    text-align: center;
    position: relative;
}

.fb-avatar-wrap {
    margin-top: -42px;
    margin-bottom: 10px;
    display: inline-block;
    position: relative;
}

.fb-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #ffffff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.16);
    display: block;
    background: #f0f2f5;
}

.fb-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: #ffffff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

.fb-info {
    margin-bottom: 16px;
}

.fb-title {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1c1e21 !important;
    margin: 0 0 6px 0 !important;
    line-height: 1.3 !important;
}

.fb-subtitle {
    font-size: 14px !important;
    color: #65676b !important;
    margin: 0 !important;
    line-height: 1.5 !important;
    font-family: var(--font-family-primary), var(--font-family-myanmar) !important;
}

.fb-actions {
    margin-top: 14px;
}

.fb-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--color-social-facebook);
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 600;
    padding: 10px 24px;
    border-radius: 6px;
    text-decoration: none !important;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    box-shadow: 0 2px 6px rgba(24, 119, 242, 0.3);
}

.fb-btn:hover {
    background: var(--color-social-facebook-hover);
    box-shadow: 0 4px 14px rgba(24, 119, 242, 0.45);
    color: #ffffff !important;
}

.fb-btn svg {
    margin-right: 8px;
    flex-shrink: 0;
}
