/* Custom CSS for BM Construct & Cleaning */

/* Reset and base styles */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scroll only */
    overflow-y: auto; /* Allow vertical scroll */
    height: auto; /* Allow content to determine height */
    min-height: 100vh; /* Minimum full viewport height */
}

/* Mobile-first responsive design */
@media (max-width: 768px) {
    /* Ensure content fits mobile screens without horizontal scroll */
    body {
        overflow-x: hidden;
        overflow-y: auto; /* Explicitly allow vertical scroll on mobile */
    }
    
    /* Header adjustments for mobile */
    #main-header .logo-container {
        padding: 1rem;
    }
    
    #main-header .logo-container img {
        height: 4rem; /* Smaller logo on mobile */
    }
    
    /* Service cards stack vertically on mobile */
    #service-selection {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card .bg-white\/10 {
        height: auto;
        min-height: 16rem;
        padding: 2rem 1rem;
    }
    
    /* Features section adjustments */
    #features-section {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    /* Form adjustments for mobile */
    .form-section .bg-white\/10 {
        padding: 1.5rem;
    }
    
    /* Info section spacing */
    .info-section {
        margin-top: 2rem;
    }
    
    /* Header navigation for service pages */
    header {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .back-button {
        align-self: flex-start;
    }
    
    /* Grid layout for service pages on mobile */
    .max-w-6xl.mx-auto.grid.lg\\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Carousel adjustments */
    .image-carousel {
        height: 12rem;
    }
    
    /* Text size adjustments */
    h1 {
        font-size: 2rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    .text-4xl {
        font-size: 1.75rem !important;
    }
    
    .text-3xl {
        font-size: 1.5rem !important;
    }
    
    /* Loading screen adjustments */
    #loading-screen h2 {
        font-size: 1.75rem !important;
    }
    
    #loading-screen .w-80 {
        width: 16rem;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    #main-header .logo-container img {
        height: 6rem;
    }
    
    .service-card .bg-white\/10 {
        height: 18rem;
    }
    
    #features-section {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Enhanced animations and transitions */
.service-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-4px);
}

.service-icon {
    transition: transform 0.3s ease;
}

.logo-container {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.back-button {
    transition: all 0.3s ease;
}

.back-button:hover {
    transform: translateX(-4px);
}

.submit-button {
    transition: all 0.3s ease;
}

.submit-button:hover {
    transform: translateY(-2px);
}

.social-icon {
    transition: all 0.3s ease;
}

.social-icon:hover {
    transform: scale(1.1);
}

/* Carousel enhancements */
.carousel-image {
    transition: opacity 0.5s ease-in-out;
}

.carousel-prev, .carousel-next {
    transition: all 0.3s ease;
}

.carousel-prev:hover, .carousel-next:hover {
    transform: scale(1.1);
}

.carousel-dot {
    transition: all 0.3s ease;
    cursor: pointer;
}

.carousel-dot:hover {
    transform: scale(1.2);
}

/* Form enhancements */
input, textarea {
    transition: all 0.3s ease;
}

input:focus, textarea:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Background particle animations */
.particle {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.8;
    }
}

/* Loading animations */
.loading-icon {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Gradient text effect */
.gradient-text {
    background: linear-gradient(45deg, #60a5fa, #a855f7);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass morphism effect */
.glass {
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Touch-friendly buttons for mobile */
@media (max-width: 768px) {
    button, .back-button, .social-icon {
        min-height: 44px;
        min-width: 44px;
    }
    
    .carousel-prev, .carousel-next {
        padding: 0.75rem;
    }
    
    .carousel-dot {
        width: 0.75rem;
        height: 0.75rem;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-white\/10 {
        background-color: rgba(255, 255, 255, 0.2);
        border: 2px solid rgba(255, 255, 255, 0.5);
    }
}

/* Dark mode enhancements */
@media (prefers-color-scheme: dark) {
    /* Already optimized for dark theme */
}

/* Print styles */
@media print {
    .absolute, .fixed {
        position: static !important;
    }
    
    .bg-gradient-to-br {
        background: #1e3a8a !important;
    }
    
    .text-white {
        color: #000 !important;
    }
}


/* Advanced Technological Effects */
.tech-enhanced {
    position: relative;
    overflow: hidden;
}

.tech-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 255, 0.1), transparent);
    transition: left 0.8s ease-in-out;
    z-index: 1;
}

.tech-enhanced:hover::before {
    left: 100%;
}

.tech-frame {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
}

.tech-frame::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, 
        rgba(0, 255, 255, 0.1) 0%, 
        transparent 25%, 
        transparent 75%, 
        rgba(0, 255, 255, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.tech-enhanced:hover .tech-frame::after {
    opacity: 1;
}

.tech-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, 
        rgba(0, 255, 255, 0.05) 0%, 
        transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.tech-enhanced:hover .tech-overlay {
    opacity: 1;
}

.scan-line {
    position: absolute;
    top: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #00ffff 50%, 
        transparent 100%);
    transform: translateY(-100%);
    animation: scan 3s infinite;
    opacity: 0;
}

.tech-enhanced:hover .scan-line {
    opacity: 1;
}

@keyframes scan {
    0% { transform: translateY(-100%); }
    50% { transform: translateY(2000%); }
    100% { transform: translateY(-100%); }
}

.tech-icon {
    position: relative;
    z-index: 2;
}

.tech-icon::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: conic-gradient(from 0deg, 
        transparent, 
        rgba(0, 255, 255, 0.3), 
        transparent, 
        rgba(0, 255, 255, 0.3), 
        transparent);
    border-radius: 50%;
    animation: rotate 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tech-enhanced:hover .tech-icon::before {
    opacity: 1;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.tech-title {
    position: relative;
    background: linear-gradient(135deg, #ffffff, #00ffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 20px rgba(0, 255, 255, 0.3);
}

.tech-list {
    list-style: none;
    padding: 0;
}

.tech-item {
    position: relative;
    padding-left: 20px;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.tech-item::before {
    content: '▶';
    position: absolute;
    left: 0;
    color: #00ffff;
    font-size: 12px;
    transition: all 0.3s ease;
}

.tech-enhanced:hover .tech-item::before {
    color: #ffffff;
    text-shadow: 0 0 10px #00ffff;
}

.tech-enhanced:hover .tech-item {
    color: #ffffff;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

/* Particle Effect */
.tech-enhanced::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(0, 255, 255, 0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(0, 255, 255, 0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(0, 255, 255, 0.4), transparent),
        radial-gradient(1px 1px at 130px 80px, rgba(0, 255, 255, 0.3), transparent);
    background-repeat: repeat;
    background-size: 150px 100px;
    animation: particles 20s linear infinite;
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.tech-enhanced:hover::after {
    opacity: 1;
}

@keyframes particles {
    0% { transform: translateY(0); }
    100% { transform: translateY(-100px); }
}

/* Enhanced Hover Effects for Service Categories */
.service-category {
    transition: transform 0.3s ease;
}

.service-category:hover {
    transform: translateY(-10px);
}

/* Glitch Effect for Titles */
.tech-title {
    position: relative;
}

.tech-title::before,
.tech-title::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
}

.tech-enhanced:hover .tech-title::before {
    animation: glitch-1 0.3s ease-in-out;
    color: #ff0000;
    z-index: -1;
}

.tech-enhanced:hover .tech-title::after {
    animation: glitch-2 0.3s ease-in-out;
    color: #00ffff;
    z-index: -2;
}

@keyframes glitch-1 {
    0%, 100% { transform: translate(0); opacity: 0; }
    20% { transform: translate(-2px, 2px); opacity: 0.8; }
    40% { transform: translate(-2px, -2px); opacity: 0.8; }
    60% { transform: translate(2px, 2px); opacity: 0.8; }
    80% { transform: translate(2px, -2px); opacity: 0.8; }
}

@keyframes glitch-2 {
    0%, 100% { transform: translate(0); opacity: 0; }
    20% { transform: translate(2px, 2px); opacity: 0.6; }
    40% { transform: translate(2px, -2px); opacity: 0.6; }
    60% { transform: translate(-2px, 2px); opacity: 0.6; }
    80% { transform: translate(-2px, -2px); opacity: 0.6; }
}

/* Matrix Rain Effect */
.matrix-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.1;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .tech-enhanced::before {
        display: none;
    }
    
    .scan-line {
        display: none;
    }
    
    .tech-enhanced::after {
        display: none;
    }
}


/* Testimonials Section Styles */
.testimonial-card {
    transition: transform 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
}

.testimonial-card blockquote::before {
    content: '"';
    font-size: 4rem;
    color: rgba(0, 255, 255, 0.3);
    position: absolute;
    top: -10px;
    left: -10px;
    font-family: serif;
    line-height: 1;
}

.testimonial-card blockquote::after {
    content: '"';
    font-size: 4rem;
    color: rgba(0, 255, 255, 0.3);
    position: absolute;
    bottom: -30px;
    right: -10px;
    font-family: serif;
    line-height: 1;
}

/* Star Rating Animation */
.testimonial-card .flex i[data-lucide="star"] {
    transition: all 0.3s ease;
}

.testimonial-card:hover .flex i[data-lucide="star"] {
    transform: scale(1.1);
    filter: drop-shadow(0 0 5px rgba(255, 193, 7, 0.5));
}

/* Customer Image Hover Effect */
.testimonial-card img {
    transition: all 0.3s ease;
}

.testimonial-card:hover img {
    transform: scale(1.05);
    filter: brightness(1.1);
}

/* Testimonial Text Glow Effect */
.testimonial-card:hover blockquote {
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.2);
}

/* Animated Border for Customer Images */
.testimonial-card .w-12.h-12.rounded-full {
    position: relative;
}

.testimonial-card .w-12.h-12.rounded-full::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: conic-gradient(from 0deg, 
        transparent, 
        rgba(0, 255, 255, 0.5), 
        transparent, 
        rgba(0, 255, 255, 0.5), 
        transparent);
    border-radius: 50%;
    animation: rotate 3s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.testimonial-card:hover .w-12.h-12.rounded-full::before {
    opacity: 1;
}

/* Staggered Animation for Testimonials */
.testimonial-card:nth-child(1) {
    animation-delay: 0.1s;
}

.testimonial-card:nth-child(2) {
    animation-delay: 0.2s;
}

.testimonial-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Pulse Effect for Stars */
@keyframes pulse-star {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.testimonial-card:hover .flex i[data-lucide="star"]:nth-child(1) {
    animation: pulse-star 1s ease-in-out infinite;
    animation-delay: 0.1s;
}

.testimonial-card:hover .flex i[data-lucide="star"]:nth-child(2) {
    animation: pulse-star 1s ease-in-out infinite;
    animation-delay: 0.2s;
}

.testimonial-card:hover .flex i[data-lucide="star"]:nth-child(3) {
    animation: pulse-star 1s ease-in-out infinite;
    animation-delay: 0.3s;
}

.testimonial-card:hover .flex i[data-lucide="star"]:nth-child(4) {
    animation: pulse-star 1s ease-in-out infinite;
    animation-delay: 0.4s;
}

.testimonial-card:hover .flex i[data-lucide="star"]:nth-child(5) {
    animation: pulse-star 1s ease-in-out infinite;
    animation-delay: 0.5s;
}

/* Responsive Testimonials */
@media (max-width: 768px) {
    .testimonial-card blockquote::before,
    .testimonial-card blockquote::after {
        font-size: 2rem;
    }
    
    .testimonial-card .w-12.h-12.rounded-full::before {
        display: none;
    }
    
    .testimonial-card:hover .flex i[data-lucide="star"] {
        animation: none;
    }
}

