/* 
    Malsara.lk Global Responsive Fixes 
    This stylesheet addresses common layout breakages on mobile and desktop views.
*/

:root {
    --primary-color: #C84B7A;
    --heading-color: #8B1A3A;
    --text-color: #1A1A1A;
    --text-muted: #7A6570;
}

/* 1. Prevent Horizontal Scrolling */
html, body {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative;
    margin: 0;
    padding: 0;
}

@media (max-width: 768px) {
    .container, .container-fluid, .row {
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* 2. Responsive Typography */
h1 { font-size: clamp(1.8rem, 5vw, 3.5rem) !important; line-height: 1.2 !important; }
/* h2 { font-size: clamp(1.5rem, 4vw, 2.5rem) !important; line-height: 1.3 !important; } */

/* 3. Hero Sections Global Fixes */
.hero-section-new, .new-hero-section, .hero, .contact-hero {
    min-height: auto !important;
    padding: 60px 15px !important;
}

/* 4. Global Modal Fixes */
.popup-overlay, .ms-video-overlay {
    padding: 10px !important;
}

.popup-modal {
    max-width: 95% !important;
    width: auto !important;
}

.ms-video-content {
    max-width: 900px !important;
    width: min(900px, 95vw) !important;
}

@media (max-width: 576px) {
    .popup-modal {
        padding: 20px 15px !important;
    }
    
    .popup-title {
        font-size: 1.25rem !important;
    }
    
    .popup-message {
        font-size: 0.9rem !important;
    }
}

/* 5. Profile Badge Overflow Fix */
.profile-card .profile-badge, 
.nm-profile-badge, 
.profile-badge {
    max-width: calc(100% - 16px) !important;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 576px) {
    .profile-badge {
        right: 8px !important;
        top: 8px !important;
        font-size: 9px !important;
        padding: 4px 6px !important;
    }
    .profile-badge.badge-featured,
    .badge-featured {
        left: 8px !important;
        right: auto !important;
        width: auto !important;
    }
}
