/* Custom Styles for KM Innovate Cleaning */

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    padding: 0;
}

/* Ensure containers don't exceed viewport on mobile */
@media (max-width: 768px) {
    .container {
        max-width: 100% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* Hero Section */
.hero-swiper {
    width: 100%;
    height: 100%;
}

.hero-swiper .swiper-slide {
    position: relative;
}

.hero-swiper .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: white;
    opacity: 0.5;
    transition: all 0.3s ease;
}

.hero-swiper .swiper-pagination-bullet-active {
    opacity: 1;
    background: #FF6B35;
    width: 30px;
    border-radius: 6px;
}

.hero-swiper .swiper-button-next,
.hero-swiper .swiper-button-prev {
    color: white;
    background: rgba(30, 58, 95, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.hero-swiper .swiper-button-next:hover,
.hero-swiper .swiper-button-prev:hover {
    background: rgba(30, 58, 95, 0.8);
    transform: scale(1.1);
}

.hero-swiper .swiper-button-next::after,
.hero-swiper .swiper-button-prev::after {
    font-size: 20px;
}

/* Responsive Hero Navigation */
@media (max-width: 768px) {
    .hero-swiper .swiper-button-next,
    .hero-swiper .swiper-button-prev {
        width: 40px;
        height: 40px;
    }
    
    .hero-swiper .swiper-button-next::after,
    .hero-swiper .swiper-button-prev::after {
        font-size: 16px;
    }
}

/* Header Styles */
.logo-container img {
    transition: transform 0.3s ease;
}

.logo-container:hover img {
    transform: scale(1.05);
}

/* Navigation Links */
.nav-link {
    position: relative;
    color: #1E3A5F;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
    color: #FF6B35;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #FF6B35;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Navigation */
.mobile-nav-link {
    color: #1E3A5F;
    font-weight: 500;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
    padding-left: 1rem;
}

.mobile-nav-link:hover {
    color: #FF6B35;
    border-left-color: #FF6B35;
    padding-left: 1.5rem;
}

/* Language Toggle */
.lang-btn {
    color: #6B7280;
    transition: all 0.3s ease;
}

.lang-btn:hover {
    color: #1E3A5F;
    background-color: #F3F4F6;
}

.lang-btn.active {
    color: #FFFFFF;
    background-color: #1E3A5F;
    font-weight: 600;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    z-index: 1000;
    animation: whatsapp-pulse 2s infinite;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

@keyframes whatsapp-pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.8);
    }
}

/* Sticky Header Effect */
#header.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 26px;
    }
    
    /* Make header responsive */
    #header .flex-1 .flex {
        flex-direction: column;
    }
    
    #header .px-6 {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

@media (max-width: 768px) {
    /* Hide desktop header complex styles on mobile */
    #header .container > .flex {
        flex-direction: column;
    }
    
    #header .border-r {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
        width: 100%;
        justify-content: center;
    }
    
    #header .flex-1 .flex.items-center {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    #header .flex.items-center.gap-6 {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .language-toggle {
        margin-left: 0 !important;
        border-left: none !important;
        padding-left: 0 !important;
    }
    
    /* Mobile-specific header improvements */
    #mobile-menu {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
        width: 100vw;
        position: relative;
        left: 50%;
        right: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
    }
    
    #mobile-menu:not(.hidden) {
        max-height: 600px;
    }
    
    /* Override any flex-direction rules for mobile menu */
    #mobile-menu * {
        box-sizing: border-box;
    }
}

/* Button Styles */
.btn-primary {
    background-color: #FF6B35;
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background-color: #e85a25;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
    background-color: transparent;
    color: #1E3A5F;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
    border: 2px solid #1E3A5F;
    cursor: pointer;
}

.btn-secondary:hover {
    background-color: #1E3A5F;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 58, 95, 0.3);
}

/* Section Spacing */
section {
    padding: 5rem 0;
}

@media (max-width: 768px) {
    section {
        padding: 3rem 0;
    }
}

/* Smooth Scrolling Offset for Fixed Header */
section[id] {
    scroll-margin-top: 120px;
}

section[id="home"] {
    scroll-margin-top: 0;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1E3A5F;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 0.5rem;
    font-family: 'Open Sans', sans-serif;
    transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: #2EC4B6;
    box-shadow: 0 0 0 3px rgba(46, 196, 182, 0.1);
}

.form-error {
    color: #EF4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-success {
    color: #10B981;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Radio Button Styles */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid #E5E7EB;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-option:hover {
    border-color: #2EC4B6;
    background-color: #F0FDFA;
}

.radio-option input[type="radio"] {
    margin-top: 0.25rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.radio-option input[type="radio"]:checked + label {
    color: #1E3A5F;
    font-weight: 600;
}

.radio-option.selected {
    border-color: #2EC4B6;
    background-color: #F0FDFA;
}

/* Before/After Slider Styles */
.before-after-slider {
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    touch-action: none;
}

.before-after-slider .before-image-wrapper {
    overflow: hidden;
    transition: width 0.1s ease-out;
}

.before-after-slider .slider-handle {
    z-index: 10;
    transition: left 0.1s ease-out;
}

.before-after-slider .slider-handle:hover .rounded-full {
    transform: translate(-50%, -50%) scale(1.1);
}

.before-after-slider.dragging * {
    cursor: ew-resize !important;
}
