/* ==============================================================
   Premium Maid Service UI/UX Upgrade
   ============================================================== */

:root {
    --primary: #1E88E5;
    --secondary: #00C853;
    --accent: #FFC107;
    --bg-light: #F8FAFC;
    --bg-white: #FFFFFF;
    --text-main: #111827;
    --text-muted: #6B7280;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 40px rgba(30, 136, 229, 0.15);
    --border-radius: 16px;
    --transition-smooth: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--text-main);
    letter-spacing: -0.02em;
}

p {
    color: var(--text-muted);
}

/* --- Glassmorphism Utilities --- */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
}

.glass-card {
    background: var(--bg-white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(0,0,0,0.03);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.glass-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(30, 136, 229, 0.2);
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: 0.7s;
    z-index: -1;
}

.glass-card:hover::before {
    left: 150%;
}

/* --- Sticky Header Scrolled State --- */
.header-scrolled {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08) !important;
    transition: var(--transition-smooth);
}
.header-scrolled .custom-top-bar {
    display: none !important; /* Hide top bar on scroll */
}

/* Navbar Link Hover (Animated Underline) */
.nav-menu ul li a {
    position: relative;
}
.nav-menu ul li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition-smooth);
}
.nav-menu ul li a:hover {
    color: var(--primary) !important;
}
.nav-menu ul li a:hover::after {
    width: 100%;
}

/* --- Premium Buttons --- */
.btn-premium {
    background: linear-gradient(135deg, var(--primary) 0%, #1565C0 100%);
    color: #fff !important;
    border: none;
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(30, 136, 229, 0.3);
    transition: var(--transition-smooth);
    z-index: 1;
}
.btn-premium::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, #1565C0 0%, var(--primary) 100%);
    z-index: -1;
    transition: var(--transition-smooth);
    opacity: 0;
}
.btn-premium:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 25px rgba(30, 136, 229, 0.4);
}
.btn-premium:hover::before {
    opacity: 1;
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent) 0%, #F57F17 100%) !important;
    color: var(--text-main) !important;
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3) !important;
}

/* --- Floating Elements --- */
.floating-widget {
    position: fixed;
    left: 20px;
    bottom: 20px;
    display: flex;
    flex-direction: column-reverse;
    gap: 15px;
    z-index: 9999;
}
.float-btn {
    width: 55px; height: 55px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 24px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    transition: var(--transition-smooth);
    text-decoration: none;
    position: relative;
}
.float-btn:hover {
    transform: translateY(-5px) scale(1.1);
    color: #fff;
}
.float-wa { background: #25D366; }
.float-call { background: var(--primary); }
.float-top { background: var(--text-main); opacity: 0; visibility: hidden; position: fixed; right: 20px; bottom: 20px; z-index: 9999; }
.float-top.show { opacity: 1; visibility: visible; }

/* Pulse Animation */
@keyframes pulseGlow {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6); }
    70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}
.float-wa { animation: pulseGlow 2s infinite; }

/* --- Section Upgrades --- */
.why-choose-us-section, .services-card-section {
    position: relative;
}
/* Blob Background */
.why-choose-us-section::after {
    content: '';
    position: absolute;
    top: -100px; right: -100px;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(30,136,229,0.05) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: 0;
}

/* Inject global premium class to sections */
.premium-section {
    padding: 100px 0;
    position: relative;
    z-index: 1;
}

/* Override existing cards to use glass-card */
.card, .item .card, .services-card-section .card, .why-choose-us-section .col-md-6 {
    border: none !important;
}

/* Accordion Upgrade */
.accordion-item {
    border: 1px solid rgba(0,0,0,0.05) !important;
    border-radius: 12px !important;
    margin-bottom: 15px;
    background: var(--bg-white);
    transition: var(--transition-smooth);
}
.accordion-item:hover {
    box-shadow: var(--shadow-soft);
}
.accordion-button {
    border-radius: 12px !important;
    background: transparent !important;
    font-weight: 600;
}
.accordion-button:not(.collapsed) {
    color: var(--primary) !important;
    box-shadow: none;
}

/* Smooth Images */
img {
    transition: var(--transition-smooth);
}
img:hover {
    transform: scale(1.03);
}

/* Mobile Menu Base Styles */
.mobile-menu {
    background: #fff;
    border-top: 1px solid #eaeaea;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0;
}
.mobile-menu.active {
    max-height: 400px;
    padding: 15px 0;
}

/* Input Fields */
.form-control {
    border-radius: 8px !important;
    border: 1px solid rgba(0,0,0,0.1) !important;
    padding: 14px 20px !important;
    background: #FAFAFA !important;
    transition: var(--transition-smooth);
}
.form-control:focus {
    background: #FFF !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.1) !important;
}

/* ==============================================================
   Mobile Responsive Adjustments
   ============================================================== */
@media (max-width: 991px) {
    .header-scrolled .custom-main-nav {
        padding: 5px 0;
    }
    .floating-widget {
        left: 15px;
        bottom: 15px;
        transform: scale(0.85);
        transform-origin: bottom left;
    }
    .why-choose-us-section img, .faq-section img {
        height: auto !important;
        max-height: 350px;
        margin-top: 30px;
    }
    .why-choose-us-section .col-lg-6 img {
        height: 350px !important;
    }
    .faq-section .accordion {
        margin-bottom: 30px;
    }
    .contact-section .col-lg-5 {
        margin-bottom: 30px !important;
    }
    .services-card-section .card-img-top {
        height: 200px !important;
    }
}

@media (max-width: 767px) {
    .premium-section, section {
        padding: 50px 0 !important;
    }
    h3 {
        font-size: 28px !important;
    }
    h5 {
        font-size: 14px !important;
    }
    .btn-premium {
        padding: 10px 20px;
        font-size: 14px;
    }
    .footer-section {
        padding: 40px 0 0 !important;
    }
    .footer-section .col-lg-4, .footer-section .col-lg-2, .footer-section .col-lg-3 {
        margin-bottom: 30px !important;
        text-align: center;
    }
    .footer-social {
        justify-content: center;
    }
    .footer-section ul li {
        justify-content: center;
    }
    .footer-section .subfooter .text-md-end {
        text-align: center !important;
        margin-top: 15px;
    }
}

/* ==============================================================
   Aggressive Mobile Responsive Fixes
   ============================================================== */
html, body {
    max-width: 100vw;
    overflow-x: hidden !important;
}

img, video, canvas, svg {
    max-width: 100% !important;
    height: auto;
}

@media (max-width: 767px) {
    /* Fix Slider Text */
    .slider_item_tbcell h2 {
        font-size: 26px !important;
        line-height: 1.3 !important;
        margin-bottom: 15px;
        word-break: break-word;
        padding: 0 15px;
    }
    .slider_item_tbcell p {
        font-size: 14px !important;
    }
    .slider_btn a {
        padding: 10px 20px !important;
        font-size: 12px !important;
        margin-bottom: 10px;
        display: inline-block;
    }
    
    /* Fix row overflow */
    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .container, .container-fluid {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    /* Force columns to behave */
    [class*="col-"] {
        padding-left: 10px !important;
        padding-right: 10px !important;
        max-width: 100% !important;
    }

    /* Fix header logo size */
    .custom-main-nav .logo div {
        width: 45px !important;
        height: 45px !important;
        font-size: 7px !important;
    }

    /* Fix Contact Form */
    .contact-section form {
        padding: 20px !important;
    }
    .weoffer-section .base-header h3 {
        font-size: 24px !important;
        margin-bottom: 15px !important;
    }

    /* Fix Services Card section */
    .services-card-section .item {
        max-width: 100vw;
        overflow: hidden;
    }
    .services-card-section .base-header h3 {
        font-size: 24px !important;
    }
    .services-card-section .card-img-top {
        height: 180px !important;
    }

    /* Fix Testimonials section */
    .testimonial-section .base-header h3 {
        font-size: 24px !important;
    }
    .testimonial-section .container-fluid {
        padding: 0 15px !important;
    }

    /* Fix Contact section */
    .contact-section .col-lg-5 {
        margin-bottom: 30px !important;
    }
    .contact-section .base-header h3,
    .contact-section h3 {
        font-size: 24px !important;
    }
    .contact-section form {
        padding: 20px !important;
    }

    /* Fix About section */
    .about-section .base-header h3 {
        font-size: 24px !important;
    }

    /* Fix Slider */
    .single_slider h2 {
        font-size: 26px !important;
    }
}

/* Navbar Fixes for Mobile */
@media (min-width: 992px) {
    .navbar-collapse {
        display: flex !important;
        justify-content: space-between;
    }
    .nav-menu {
        flex-direction: row !important;
        margin-top: 0 !important;
        gap: 35px !important;
    }
    .nav-btn {
        margin-top: 0 !important;
    }
}
@media (max-width: 991px) {
    .navbar-collapse {
        background: #fff;
        padding: 20px;
        border-radius: 10px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        z-index: 1000;
    }
    .nav-menu {
        flex-direction: column !important;
        gap: 10px !important;
    }
}

/* Service Icon Card Hover */
.service-icon-card:hover {
    transform: translateY(-10px);
    background: #112236 !important;
}
.service-icon-card:hover .icon-box {
    background: #ffb703 !important;
}
.service-icon-card:hover .icon-box i {
    color: #fff !important;
}

/* ==============================================
   Services Dropdown Fix
   ============================================== */

/* Desktop: hover to open */
@media (min-width: 992px) {
    .navbar-nav .dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
        animation: fadeInDown 0.3s ease;
    }
    .navbar-nav .dropdown-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        z-index: 9999;
        min-width: 240px;
        background: #fff;
        border: none;
        border-radius: 12px;
        box-shadow: 0 15px 40px rgba(0,0,0,0.12);
        padding: 10px 0;
    }
    .navbar-nav .dropdown-menu .dropdown-item {
        padding: 10px 20px;
        font-size: 14px;
        font-weight: 500;
        color: #333;
        transition: all 0.2s ease;
    }
    .navbar-nav .dropdown-menu .dropdown-item:hover {
        background: #f0f7ff;
        color: #038fd6;
        padding-left: 25px;
    }
    .navbar-nav .dropdown-menu .dropdown-divider {
        margin: 5px 15px;
    }
}

/* Mobile: click to open */
@media (max-width: 991px) {
    .navbar-nav .dropdown-menu {
        background: #fff;
        border: none;
        border-radius: 10px;
        box-shadow: 0 5px 15px rgba(0,0,0,0.08);
        padding: 8px 0;
        margin-top: 5px;
    }
    .navbar-nav .dropdown-menu .dropdown-item {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Dropdown arrow animation */
.navbar-nav .dropdown-toggle::after {
    transition: transform 0.2s ease;
}
.navbar-nav .dropdown.show .dropdown-toggle::after {
    transform: rotate(180deg);
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
