/* Social Media Tiles Styling */
.social-media-container {
    margin-top: 30px;
    margin-bottom: 50px;
}

.social-media-container .instagram-video-wrapper {
    max-width: 100%;
}
.social-media-container .fb-video iframe {
    max-width: 100%;
}

.social-tile {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    height: 300px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: block;
}

.social-tile:hover {
    transform: scale(1.02);
}

.social-tile:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease;
}

.social-tile:hover:after {
    background: rgba(0, 0, 0, 0.1);
}

/* Play Button Styling */
.play-btn-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    pointer-events: none;
}

.play-btn {
    width: 60px;
    height: 60px;
    background: #ff0000; /* Match theme green */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.play-btn svg {
    width: 24px;
    height: 24px;
    fill: #fff;
    margin-left: 4px; /* Slight offset for triangle centering */
}

.social-tile:hover .play-btn {
    transform: scale(1.1);
}

/* Platform Icons */
.platform-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 2;
    color: #fff;
    font-size: 20px;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.platform-youtube {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/social/yt-placeholder.png');
}
.platform-facebook {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/social/fb-placeholder.png');
}
.platform-instagram {
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../images/social/ig-placeholder.png');
}

/* ============================================
   Mobile drawer (icon-bar menu) – align & display fix
   For viewports ~400x545 and similar small screens
   ============================================ */
@media (max-width: 991px) {
    /* Drawer: full viewport height, no overflow */
    .megamenu-style-dev.responsive .megamenu-wrapper,
    .megamenu-wrapper.so-megamenu-active {
        max-height: 100vh !important;
        max-height: 100dvh !important;
        height: 100vh !important;
        height: 100dvh !important;
        bottom: 0 !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
    }
    /* Close button: top-right, fixed so content aligns below */
    .megamenu-style-dev.responsive .megamenu-wrapper #remove-megamenu,
    .megamenu-wrapper.so-megamenu-active #remove-megamenu {
        position: absolute !important;
        top: 0 !important;
        right: 0 !important;
        left: auto !important;
        padding: 12px 16px !important;
        margin: 0 !important;
        display: block !important;
        z-index: 10 !important;
        font-size: 18px !important;
        line-height: 1 !important;
    }
    /* Content area: scrollable, full width, proper alignment */
    .megamenu-style-dev.responsive .megamenu-wrapper .megamenu-pattern,
    .megamenu-wrapper.so-megamenu-active .megamenu-pattern {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        overflow-x: hidden !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
        width: 100% !important;
        max-width: 100% !important;
    }
    .megamenu-style-dev.responsive .megamenu-wrapper .megamenu-pattern .container,
    .megamenu-wrapper.so-megamenu-active .megamenu-pattern .container {
        max-width: 100% !important;
        width: 100% !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }
    /* Menu list: block layout, left-aligned, no float */
    .megamenu-style-dev.responsive .megamenu-wrapper ul.megamenu,
    .megamenu-wrapper.so-megamenu-active ul.megamenu {
        display: block !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 40px 0 20px 0 !important;
        text-align: left !important;
        float: none !important;
    }
    .megamenu-style-dev.responsive .megamenu-wrapper ul.megamenu > li,
    .megamenu-wrapper.so-megamenu-active ul.megamenu > li {
        display: block !important;
        float: none !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        text-align: left !important;
    }
    .megamenu-style-dev.responsive .megamenu-wrapper ul.megamenu > li > a,
    .megamenu-wrapper.so-megamenu-active ul.megamenu > li > a {
        display: block !important;
        width: 100% !important;
        padding: 10px 0 !important;
        text-align: left !important;
        line-height: 1.4 !important;
    }
}

/* Extra-small viewport (e.g. 400x545): drawer width and icon-bar */
@media (max-width: 480px) {
    .megamenu-wrapper {
        width: min(280px, 100vw) !important;
    }
    .navbar-toggle .icon-bar {
        display: block !important;
        width: 20px !important;
        height: 2px !important;
        margin: 4px auto !important;
        background: currentColor !important;
    }
}

/* -------------------------------------------------------------------------
   Mobile: Recent Profiles section – ensure it displays (no carousel on this block)
   ------------------------------------------------------------------------- */
@media (max-width: 767px) {
    .layout-4.common-home #content .deal-layout4 .module-wrapper,
    .layout-4.common-home #content .deal-layout4 .so-deal,
    .layout-4.common-home #content .deal-layout4 #recent-profiles-dynamic {
        display: block !important;
        visibility: visible !important;
        min-height: 120px;
    }
    .layout-4.common-home #content .deal-layout4 #recent-profiles-dynamic {
        display: flex !important;
    }
}

/* -------------------------------------------------------------------------
   Mobile: Main banner (sohomepage-slider1) – when carousel not inited yet,
   show first slide only and make its text visible
   ------------------------------------------------------------------------- */
.sohomepage-slider .so-homeslider:not(.owl2-loaded) {
    overflow: hidden;
}
.sohomepage-slider .so-homeslider:not(.owl2-loaded) .item {
    display: none;
}
.sohomepage-slider .so-homeslider:not(.owl2-loaded) .item:first-child {
    display: block;
    width: 100%;
}
.sohomepage-slider .so-homeslider:not(.owl2-loaded) .item:first-child img {
    width: 100%;
    height: auto;
    display: block;
}
.sohomepage-slider .so-homeslider:not(.owl2-loaded) .item:first-child .sohomeslider-description .subtitle-slider,
.sohomepage-slider .so-homeslider:not(.owl2-loaded) .item:first-child .sohomeslider-description .title-slider, 
.sohomepage-slider .so-homeslider:not(.owl2-loaded) .item:first-child .sohomeslider-description .des-slider,
.sohomepage-slider .so-homeslider:not(.owl2-loaded) .item:first-child .sohomeslider-description .slide-button {
    opacity: 1 !important;
}

/* -------------------------------------------------------------------------
   Mobile: Mobile & Tablet slider (sohomepage-slider2) – same fallback when no owl
   ------------------------------------------------------------------------- */
.module.homeslider-layout4 .so-homeslider:not(.owl2-loaded) {
    overflow: hidden;
}
.module.homeslider-layout4 .so-homeslider:not(.owl2-loaded) .item {
    display: none;
}
.module.homeslider-layout4 .so-homeslider:not(.owl2-loaded) .item:first-child {
    display: block;
    width: 100%;
}
.module.homeslider-layout4 .so-homeslider:not(.owl2-loaded) .item:first-child img {
    width: 100%;
    height: auto;
    display: block;
}
.module.homeslider-layout4 .so-homeslider:not(.owl2-loaded) .item:first-child .sohomeslider-description .subtitle-slider,
.module.homeslider-layout4 .so-homeslider:not(.owl2-loaded) .item:first-child .sohomeslider-description .title-slider,
.module.homeslider-layout4 .so-homeslider:not(.owl2-loaded) .item:first-child .sohomeslider-description .des-slider,
.module.homeslider-layout4 .so-homeslider:not(.owl2-loaded) .item:first-child .sohomeslider-description .slide-button {
    opacity: 1 !important;
}

/* Mobile section (banner-deal): ensure image displays */
.module.banner-deal .sale-img img,
.module.banner-deal .sale-img .bn img {
    min-height: 120px;
    object-fit: cover;
}
