/* ========================================
   BADURA GLANZ - MAIN STYLESHEET
   ======================================== */

/* ========================================
   1. CSS VARIABLES
   ======================================== */
:root {
    --primary-color: #0B9134;
    --primary-dark: #0a7d2c;
    --primary-light: #0eb83a;
    --secondary-color: #050505;
    --text-color: #333333;
    --text-light: #666666;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.15);
}

/* ========================================
   2. GLOBAL STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

/* ========================================
   3. HEADER STYLES
   ======================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
    z-index: 1000;
    transition: var(--transition);
}

.main-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.navbar {
    padding: 1rem 0;
    background: transparent;
}

.navbar-brand img {
    height: 50px;
    width: auto;
    transition: var(--transition);
}

.navbar-nav {
    gap: 1rem;
}

.nav-link {
    color: var(--text-color);
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-cta {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.nav-cta:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    color: var(--white);
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    transition: var(--transition);
    width: 44px;
    height: 44px;
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 3px rgba(11, 145, 52, 0.2);
    outline: none;
}

/* ========================================
   4. VIDEO HERO SECTION
   ======================================== */
.video-hero {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Video Slider Container */
.video-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

.video-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    will-change: opacity;
}

.video-slide.active {
    opacity: 1;
}

.video-background {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    background: linear-gradient(180deg, 
        rgba(0,0,0,0.6) 0%, 
        rgba(0,0,0,0.3) 50%, 
        rgba(0,0,0,0.6) 100%);
    z-index: -1;
    pointer-events: none;
}

/* Video Loading State */
.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 3rem;
    z-index: 1;
    opacity: 0.5;
}

.video-slide.loading .video-loading {
    display: block;
}

.video-slide:not(.loading) .video-loading {
    display: none;
}

/* Hero Content */
.hero-content {
    text-align: center;
    color: var(--white);
    z-index: 1;
    padding: 0 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    pointer-events: auto;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
    font-size: 1.5rem;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-features {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 3rem;
    animation: fadeInUp 1s ease-out 0.6s both;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.feature-item i {
    color: #4ade80;
    font-size: 1.25rem;
}

/* ========================================
   5. SLIDER CONTROLS
   ======================================== */
/* Progress Bar */
.slider-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 2;
}

.slider-progress-bar {
    height: 100%;
    background: var(--primary-color);
    width: 0;
    transition: width 10s linear;
}

.slider-progress-bar.active {
    width: 100%;
}

/* Navigation Arrows */
.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: var(--white);
    font-size: 1.5rem;
    z-index: 2;
    opacity: 0.7;
}

.slider-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.slider-nav.prev {
    left: 30px;
}

.slider-nav.next {
    right: 30px;
}

/* Slider Indicators */
.slider-indicators {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.slider-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.slider-dot.active {
    background: var(--primary-color);
    border-color: rgba(255, 255, 255, 0.5);
    width: 40px;
    border-radius: 20px;
}

/* Mobile Play Button */
.mobile-play-button {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 3;
    -webkit-tap-highlight-color: transparent;
}

.mobile-play-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateX(-50%) scale(1.1);
}

.mobile-play-button:active {
    transform: translateX(-50%) scale(0.95);
}

.mobile-play-button:focus {
    outline: 2px solid var(--white);
    outline-offset: 2px;
}

.mobile-play-button i {
    color: var(--white);
    font-size: 1.5rem;
    margin-left: 3px;
    transition: transform 0.2s ease;
    pointer-events: none;
}

.mobile-play-button:active i {
    transform: scale(0.9);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 2rem;
    color: var(--white);
    animation: bounce 2s infinite;
    cursor: pointer;
    z-index: 2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* ========================================
   6. BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: var(--transition);
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1.125rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(11, 145, 52, 0.3);
}

.btn-outline-white {
    background-color: transparent;
    color: var(--white);
    border-color: var(--white);
}

.btn-outline-white:hover {
    background-color: var(--white);
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* ========================================
   7. FOOTER
   ======================================== */
.main-footer {
    background: var(--secondary-color);
    color: var(--white);
}

.footer-top {
    padding: 3rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.footer-about img {
    filter: brightness(0) invert(1);
    margin-bottom: 1rem;
}

.footer-about p {
    opacity: 0.8;
    margin-bottom: 1rem;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

.footer-top h5 {
    color: var(--white);
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255,255,255,0.8);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    padding-left: 5px;
}

.contact-info p {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-info i {
    color: var(--primary-color);
    flex-shrink: 0;
}

.contact-info a {
    color: rgba(255,255,255,0.8);
}

.contact-info a:hover {
    color: var(--white);
}

.footer-bottom {
    padding: 1.5rem 0;
    background: rgba(0,0,0,0.2);
}

.footer-bottom p {
    margin: 0;
    opacity: 0.8;
}

.footer-legal {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    color: rgba(255,255,255,0.8);
}

.footer-legal a:hover {
    color: var(--white);
}

/* ========================================
   8. MOBILE ACTIONS
   ======================================== */
.mobile-actions {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    flex-direction: column;
    gap: 10px;
    z-index: 999;
}

.action-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.action-btn:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
    color: var(--white);
}

/* ========================================
   9. ANIMATIONS
   ======================================== */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideProgress {
    from {
        width: 0;
    }
    to {
        width: 100%;
    }
}

/* ========================================
   10. MOBILE OPTIMIZATIONS
   ======================================== */
/* Early mobile detection styles */
.is-mobile .video-background {
    display: none !important;
}

.is-mobile .video-slider {
    background: url('../images/cleaning-hero-mobile.jpg') center/cover;
    background-color: #000;
}

/* iOS Safe Area Support */
@supports (padding-top: env(safe-area-inset-top)) {
    .video-hero {
        padding-top: env(safe-area-inset-top);
    }
    
    .hero-content {
        padding-top: env(safe-area-inset-top);
    }
    
    .mobile-actions {
        bottom: calc(20px + env(safe-area-inset-bottom));
    }
    
    .mobile-play-button {
        bottom: calc(80px + env(safe-area-inset-bottom));
    }
    
    @media (max-width: 576px) {
        .mobile-play-button {
            bottom: calc(80px + env(safe-area-inset-bottom));
        }
    }
}

/* ========================================
   11. RESPONSIVE DESIGN
   ======================================== */
/* Tablet - Large */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        margin-top: 1rem;
        padding: 1.5rem;
        border-radius: 12px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    }

    .mobile-actions {
        display: flex;
    }

    .slider-nav {
        opacity: 0.5;
    }

    .slider-nav.prev {
        left: 15px;
    }

    .slider-nav.next {
        right: 15px;
    }
}

/* Tablet - Medium */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.35rem;
    }
    
    .hero-actions {
        flex-direction: row;
        justify-content: center;
    }
    
    .btn {
        padding: 0.875rem 1.75rem;
    }
    
    .slider-nav {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
}

/* Mobile - Large */
@media (max-width: 768px) {
    .hero-content {
        padding: 0 15px;
        margin-top: -50px;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
        text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
        text-shadow: 1px 1px 4px rgba(0,0,0,0.7);
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .hero-features {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        margin-top: 2rem;
    }

    .feature-item {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .video-hero {
        height: 100vh;
        height: 100dvh;
    }

    .video-background {
        min-width: auto;
        min-height: auto;
        width: 100%;
        height: 100%;
        object-fit: cover;
        position: absolute;
        top: 0;
        left: 0;
        transform: none;
    }
    
    .video-slide {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
    }

    .video-overlay {
        background: linear-gradient(180deg, 
            rgba(0,0,0,0.7) 0%, 
            rgba(0,0,0,0.4) 50%, 
            rgba(0,0,0,0.7) 100%);
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
    }

    .mobile-play-button {
        display: flex !important;
    }

    .slider-nav {
        display: none;
    }

    .slider-indicators {
        bottom: 40px;
        gap: 8px;
    }

    .slider-progress {
        height: 3px;
    }

    .slider-dot {
        width: 8px;
        height: 8px;
    }

    .slider-dot.active {
        width: 24px;
    }

    .scroll-indicator {
        bottom: 15px;
        font-size: 1.5rem;
    }

    .video-loading {
        font-size: 2rem;
    }

    .footer-legal {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }

    .footer-bottom .row {
        text-align: center;
    }
}

/* Mobile - Small */
@media (max-width: 576px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.875rem;
    }

    .feature-item {
        font-size: 0.75rem;
        gap: 0.35rem;
    }

    .feature-item i {
        font-size: 1rem;
    }

    .btn {
        padding: 0.75rem 1.25rem;
        font-size: 0.875rem;
    }

    .mobile-play-button {
        width: 50px;
        height: 50px;
        bottom: 80px;
    }

    .mobile-play-button i {
        font-size: 1.25rem;
    }
}

/* Mobile - Very Small */
@media (max-width: 380px) {
    .hero-title {
        font-size: 1.5rem;
    }

    .hero-subtitle {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .btn {
        font-size: 0.8rem;
        padding: 0.7rem 1rem;
    }

    .feature-item {
        font-size: 0.7rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Fix text readability on very small screens */
@media (max-width: 360px) {
    .hero-title {
        font-size: 1.4rem;
    }
    
    .hero-subtitle {
        font-size: 0.75rem;
    }
    
    .btn {
        font-size: 0.75rem;
        padding: 0.6rem 0.9rem;
    }
}

/* iPad specific optimizations */
@media only screen 
and (min-device-width: 768px) 
and (max-device-width: 1024px) 
and (-webkit-min-device-pixel-ratio: 2) {
    .video-background {
        -webkit-transform: translateX(-50%) translateY(-50%) translateZ(0);
        transform: translateX(-50%) translateY(-50%) translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

/* Landscape orientation on mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .hero-content {
        margin-top: 0;
    }

    .hero-title {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .hero-subtitle {
        margin-bottom: 1rem;
    }

    .hero-features {
        display: none;
    }

    .scroll-indicator {
        display: none;
    }
}

/* ========================================
   12. ACCESSIBILITY
   ======================================== */
*:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

button:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .video-slide {
        transition: none !important;
    }
}