/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px; /* Offset for fixed nav when scrolling to anchors */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    overflow-x: hidden;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: contain;
    /* Important: avoid transforms on body, they can break position:fixed on mobile browsers */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: transform 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
    transform: translateY(0);
}

.navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-lg);
}

.navbar.navbar-hidden {
    transform: translateY(-100%);
}

.navbar.navbar-visible {
    transform: translateY(0);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo-img {
    height: 85px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.logo-pat {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e40af;
    letter-spacing: -0.5px;
}

.logo-iot {
    font-size: 0.75rem;
    font-weight: 500;
    color: #6b7280;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: -2px;
}

.logo i {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    /* Mobile touch optimization */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    display: block;
    padding: 0.5rem 0;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

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

.nav-link-active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Hero Section with Image */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: left;
    overflow: hidden;
    will-change: scroll-position;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -webkit-font-smoothing: antialiased;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    contain: layout style paint;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    will-change: auto;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    -ms-transform: translateZ(0);
    -o-transform: translateZ(0);
    /* Optimized image rendering */
    image-rendering: auto;
    -webkit-font-smoothing: antialiased;
    opacity: 1;
    transition: opacity 0.3s ease;
    /* Remove filter for better performance, use overlay brightness instead */
    filter: none;
    /* GPU acceleration */
    perspective: 1000px;
    -webkit-perspective: 1000px;
    -webkit-backface-visibility: hidden;
    contain: strict;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15); /* Lighter overlay for better performance */
    z-index: 1;
    transition: background 0.5s ease;
    will-change: auto;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    pointer-events: none;
}

/* Video Section Below Hero - optimized for smooth scrolling */
.hero-video-section {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 400px;
    max-height: 100vh;
    overflow: hidden;
    background: #000 url('images/hero-image.jpg') center/cover no-repeat;
    margin: 0;
    padding: 0;
    z-index: 10;
    /* Optimize for smooth scrolling on desktop */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: scroll-position;
    contain: layout style paint;
    /* Ensure smooth scrolling on mobile */
    -webkit-overflow-scrolling: touch;
}

.hero-video-section .hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
    margin: 0;
    padding: 0;
    pointer-events: none;
    -webkit-touch-callout: none;
    user-select: none;
    /* Smooth scrubbing – own compositor layer */
    will-change: contents;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    contain: strict;
    isolation: isolate;
}

/* Mobile: show full video without cropping (letterbox/pillarbox as needed) */
@media (max-width: 992px) {
    .hero-video-section {
        /* allow the section to size to the video height on mobile so whole ratio is visible */
        height: auto;
        min-height: 40vh;
        padding: 0;
        background: transparent;
    }

    .hero-video-section .hero-video {
        position: relative;
        /* prevent legacy min-width/height from stretching the element */
        min-width: 0;
        min-height: 0;
        width: auto;
        max-width: 100%;
        height: auto;
        max-height: 60vh;
        object-fit: contain;
        object-position: center center;
        display: block;
    }

    /* Hide the scrub indicator on small screens for less clutter */
    .hero-scrub-indicator {
        display: none;
    }

    /* Mood/mode videos should also show full ratio on small screens */
    .mode-video {
        width: 100%;
        height: auto;
        max-height: 60vh;
        object-fit: contain;
        object-position: center;
    }
}

/* Mobile play overlay for hero video */
.mobile-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none; /* allow touches to pass through except the button */
    background: rgba(0,0,0,0.35);
}
.mobile-play-btn {
    background: rgba(255,255,255,0.95);
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    pointer-events: auto; /* button should receive clicks */
}

/* Stacked hero layers: opacity controlled by script for crossfade; higher index = on top */
.hero-video-section .hero-video.hero-video-layer {
    opacity: 0;
    z-index: 0;
    transition: opacity 0.45s ease;
}

.hero-video-section .hero-video.hero-video-layer[data-hero-index="1"] { z-index: 1; }
.hero-video-section .hero-video.hero-video-layer[data-hero-index="2"] { z-index: 2; }
.hero-video-section .hero-video.hero-video-layer[data-hero-index="0"] { z-index: 0; }

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
    pointer-events: none;
    /* GPU acceleration for smooth scrolling */
    will-change: auto;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}
@media (max-width: 768px) {
}

/* Hero video scroll hint pill */
.hero-scroll-hint {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 4px 20px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.45);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 500;
    padding: 0.45rem 1.1rem;
    border-radius: 999px;
    pointer-events: none;
    white-space: nowrap;
    letter-spacing: 0.01em;
    animation: heroHintPulse 2s ease-in-out infinite;
}
.hero-scroll-chevron {
    font-size: 0.68rem;
    animation: heroChevronBounce 1.4s ease-in-out infinite;
}
@keyframes heroHintPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.55; }
}
@keyframes heroChevronBounce {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(3px); }
}

/* Prevent page scroll while hero sequence is playing on mobile */
/* (old .no-scroll removed; scroll prevention uses JS listeners now) */

.hero-video.fade-out {
    opacity: 1 !important; /* Keep video visible always */
}

/* Single hero video (legacy) stays visible; layers get opacity from script */
.hero-video-section .hero-video:not(.hero-video-layer) {
    opacity: 1 !important;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2); /* Reduced from 0.4 to 0.2 for brighter image */
    z-index: 1;
    transition: background 0.5s ease;
}

.hero .container {
    max-width: 100%;
    padding: 0;
    margin: 0;
    width: 100%;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 2rem;
    padding-left: 0;
    animation: fadeInUp 1s ease;
    margin-left: 6rem; /* Approximately 5-8 cm spacing from left edge */
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: flex-start;
    align-items: flex-start;
}

.hero-buttons-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 1rem;
    /* Mobile touch optimization */
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    min-height: 44px; /* Minimum touch target size */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.btn-brochure {
    background: #dc2626;
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-brochure:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: white;
    border-color: white;
}

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

.btn-danger {
    background: #dc2626;
    color: white;
    border: 2px solid #dc2626;
}

.btn-danger:hover {
    background: #b91c1c;
    border-color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
    color: white;
    font-size: 1.5rem;
    z-index: 2;
}

/* Services Section */
.services {
    padding: 6rem 0;
    background: var(--bg-white);
    position: relative;
    margin-top: 0;
    padding-top: 6rem;
}

/* Section Video Backgrounds */
.section-with-video {
    position: relative;
    overflow: hidden;
}

.section-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 0;
    object-fit: cover;
    object-position: center;
    opacity: 0.3;
    transition: opacity 1s ease-in-out;
    pointer-events: none;
}

.section-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    z-index: 1;
    transition: background 0.5s ease;
}

.section-with-video .container {
    position: relative;
    z-index: 2;
}

/* Video fade transitions */
.section-video.fade-in {
    opacity: 0.3;
    animation: fadeInVideo 1.5s ease-in-out;
}

.section-video.fade-out {
    opacity: 0;
}

@keyframes fadeInVideo {
    from {
        opacity: 0;
    }
    to {
        opacity: 0.3;
    }
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.section-header.animate {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
}

.service-card.animate {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.service-image {
    width: 100%;
    height: 220px;
    margin: 0 auto 1.5rem;
    border-radius: 0.5rem;
    overflow: hidden;
    background: var(--bg-light);
    border: 3px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 4px;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
    border-radius: 0.25rem;
    background: var(--bg-white);
}

.service-card:hover .service-image {
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.15);
}

.service-card:hover .service-image img {
    transform: scale(1.02);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* About Section */
.about {
    padding: 6rem 0;
    background: var(--bg-light);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.about-content.animate {
    opacity: 1;
    transform: translateY(0);
}

.about-text h2 {
    margin-bottom: 1.5rem;
}

.about-text p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-item h3 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-item p {
    color: var(--text-light);
    font-weight: 500;
}

.about-image {
    position: relative;
}

.about-image-img {
    width: 100%;
    height: 400px;
    object-fit: contain;
    object-position: center;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    background: var(--bg-light);
    padding: 0.5rem;
}

.image-placeholder {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 5rem;
    box-shadow: var(--shadow-lg);
}

/* PAT IoT App - standalone section (after Services) */
.pat-app-section {
    padding: 5rem 0;
    background: var(--bg-light);
}

.pat-app-block {
    margin-top: 4rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.pat-app-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.pat-app-text .section-title {
    margin-bottom: 1.5rem;
}

.pat-app-text p {
    color: var(--text-light);
    margin-bottom: 1.25rem;
    line-height: 1.8;
}

.pat-app-text p:last-child {
    margin-bottom: 0;
}

.pat-app-image {
    position: relative;
}

.pat-app-img {
    width: 100%;
    height: auto;
    max-height: 420px;
    object-fit: contain;
    object-position: center;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    background: var(--bg-light);
}

@media (max-width: 992px) {
    .pat-app-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .pat-app-content .pat-app-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .pat-app-section {
        padding: 3rem 0;
    }
    .pat-app-block {
        margin-top: 3rem;
        padding-top: 2rem;
    }
    .pat-app-img {
        max-height: 320px;
    }
}

/* Our Clients Section - Auto-scrolling logos */
.clients-section {
    padding: 4rem 0;
    background: var(--bg-light);
    overflow: hidden;
}

.clients-section .section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.clients-scroll-wrap {
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 5%, black 95%, transparent);
}

.clients-track {
    display: flex;
    align-items: center;
    gap: 4rem;
    width: max-content;
    animation: clientsScroll 40s linear infinite;
    padding: 1rem 0;
}

.clients-track:hover {
    animation-play-state: paused;
}

@keyframes clientsScroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.client-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 240px;
    height: 120px;
    padding: 0 1.25rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.client-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.client-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(0.4);
    opacity: 0.85;
    transition: filter 0.2s ease, opacity 0.2s ease;
}

.client-logo:hover img {
    filter: grayscale(0);
    opacity: 1;
}

.client-logo.placeholder {
    background: var(--bg-white);
    border: 1px dashed var(--border-color);
}

.client-logo.placeholder::before {
    content: 'Logo';
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
}

.client-logo.placeholder img {
    display: none;
}

/* Video Modes Section */
.video-modes-section {
    position: relative;
    width: 100%;
    height: 80vh;
    min-height: 600px;
    overflow: hidden;
    background: #000;
}

.video-modes-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.mode-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    z-index: 0;
    object-fit: cover;
    object-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    pointer-events: none;
    will-change: opacity;
}

.mode-video.active {
    opacity: 1;
    z-index: 1;
}

.mode-video.playing {
    opacity: 1;
    z-index: 1;
}

.mode-video.fade-in {
    opacity: 1;
    z-index: 2;
}

.mode-video.fade-out {
    opacity: 0;
    z-index: 0;
}

/* Ensure video fills the entire space */
@media (min-aspect-ratio: 16/9) {
    .mode-video {
        width: 100%;
        height: auto;
        min-height: 100%;
    }
}

@media (max-aspect-ratio: 16/9) {
    .mode-video {
        width: auto;
        height: 100%;
        min-width: 100%;
    }
}

.video-overlay-modes {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    z-index: 2;
    pointer-events: none;
}

/* Mode Control Buttons - Compact */
.video-mode-controls-wrapper {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Arrow hint - "Tap to switch mode" - only visible before any button is pressed */
.mode-controls-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    animation: modeHintFade 2s ease-in-out infinite;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.mode-controls-hint.mode-controls-hint-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-4px);
    animation: none;
}

.mode-hint-text {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.mode-hint-arrow {
    font-size: 0.9rem;
    animation: arrowBounce 1.2s ease-in-out infinite;
}

@keyframes arrowBounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(5px); opacity: 0.8; }
}

@keyframes modeHintFade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.85; }
}

.video-mode-controls {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    background: rgba(20, 20, 20, 0.88);
    backdrop-filter: blur(12px);
    padding: 12px 18px;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.mode-btn {
    min-width: 72px;
    height: 52px;
    padding: 0 14px;
    border: 1.5px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.25s ease;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

.mode-btn-icon {
    font-size: 1.35rem;
    display: block;
}

.mode-btn-label {
    font-size: 0.65rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    opacity: 0.9;
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.35);
    transform: scale(1.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.mode-btn.active {
    background: rgba(37, 99, 235, 0.35);
    border-color: rgba(96, 165, 250, 0.7);
    color: #93c5fd;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3);
}

/* Solutions Section */
.solutions {
    padding: 6rem 0;
    background: var(--bg-white);
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.solution-card {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid var(--border-color);
}

.solution-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.solution-card.featured {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.solution-card.featured:hover {
    transform: scale(1.05) translateY(-5px);
}

.solution-badge {
    position: absolute;
    top: -15px;
    right: 2rem;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}

.solution-card h3 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.solution-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.solution-features {
    list-style: none;
    margin-bottom: 2rem;
}

.solution-features li {
    padding: 0.75rem 0;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.solution-features i {
    color: var(--secondary-color);
}

/* Products Section */
.products-section {
    padding: 6rem 0;
    background: var(--bg-white);
    overflow: hidden;
}

.products-scroll-container {
    position: relative;
    margin-top: 3rem;
}

.products-scroll-wrapper {
    display: flex;
    gap: 2rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 1rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
    -webkit-overflow-scrolling: touch;
}

.products-scroll-wrapper::-webkit-scrollbar {
    height: 8px;
}

.products-scroll-wrapper::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 4px;
}

.products-scroll-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.products-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.product-card {
    min-width: 350px;
    max-width: 350px;
    background: var(--bg-white);
    padding: 0;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}

.product-card.animate {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.product-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background: var(--bg-light);
    position: relative;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
}

/* Show full curtain product image without cropping */
.product-image img[src*="curtain-switch"] {
    object-fit: contain;
    background: var(--bg-light);
    padding: 0.5rem;
}

.product-card:hover .product-image img {
    transform: scale(1.05);
}

.product-label {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    padding: 1.25rem 1.5rem 0.5rem;
    text-align: center;
    line-height: 1.4;
}

.product-caption {
    color: var(--text-light);
    padding: 0 1.5rem 1.5rem;
    text-align: center;
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
}

.scroll-indicators {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.scroll-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.scroll-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
    box-shadow: var(--shadow-lg);
}

.scroll-btn:active {
    transform: scale(0.95);
}

.scroll-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Product Gallery Section */
.product-gallery-section {
    padding: 6rem 0;
    background: var(--bg-light);
    overflow: hidden;
}

.gallery-scroll-container {
    position: relative;
    margin-top: 3rem;
}

.gallery-scroll-wrapper {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    padding: 1rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) transparent;
    -webkit-overflow-scrolling: touch;
}

.gallery-scroll-wrapper::-webkit-scrollbar {
    height: 8px;
}

.gallery-scroll-wrapper::-webkit-scrollbar-track {
    background: var(--bg-light);
    border-radius: 4px;
}

.gallery-scroll-wrapper::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.gallery-scroll-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.gallery-item {
    min-width: 400px;
    max-width: 400px;
    height: 400px;
    flex-shrink: 0;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transform: translateY(30px);
}

.gallery-item.animate {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.gallery-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    transition: transform 0.3s ease;
    cursor: default;
    pointer-events: none;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.05);
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 99999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: auto;
}

.lightbox.active {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    visibility: visible !important;
    opacity: 1 !important;
    z-index: 10001;
}

.lightbox-image {
    max-width: 100% !important;
    max-height: 90vh !important;
    width: auto !important;
    height: auto !important;
    min-width: 200px !important;
    min-height: 200px !important;
    object-fit: contain !important;
    border-radius: 0.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    transition: opacity 0.3s ease;
    background: transparent !important;
    position: relative !important;
    z-index: 10002 !important;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 2.5rem;
    font-weight: 300;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10000;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-prev {
    left: 30px;
}

.lightbox-next {
    right: 30px;
}

.lightbox-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.lightbox-counter {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    background: rgba(0, 0, 0, 0.5);
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-size: 1rem;
    z-index: 10000;
}

.gallery-scroll-buttons {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    padding: 0 1rem;
}

.gallery-scroll-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    pointer-events: all;
}

.gallery-scroll-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.gallery-scroll-btn:active {
    transform: scale(0.95);
}

/* Warranty Section */
.warranty-section {
    padding: 6rem 0;
    background: var(--bg-light);
}

.warranty-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.warranty-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    align-items: start;
}

.warranty-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    transform: translateY(30px);
}

.warranty-card.animate {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.warranty-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.warranty-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.warranty-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.warranty-period {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.warranty-card p {
    color: var(--text-light);
    line-height: 1.8;
}

.warranty-terms {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.warranty-terms h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.warranty-terms ul {
    list-style: none;
    margin-bottom: 2rem;
}

.warranty-terms ul li {
    padding: 0.75rem 0;
    color: var(--text-light);
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    line-height: 1.6;
}

.warranty-terms ul li i {
    color: var(--secondary-color);
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.warranty-contact {
    background: var(--bg-light);
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-top: 2rem;
}

.warranty-contact p {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.warranty-contact p:last-child {
    color: var(--text-light);
    margin-bottom: 0;
}

/* Contact Section */
.contact {
    padding: 4rem 0;
    background: var(--bg-white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
    margin-top: 2rem;
    align-items: start;
}

/* Contact Box (Aside) */
.contact-box {
    background: var(--bg-white);
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
    border: 2px solid var(--border-color);
    overflow: hidden;
    position: sticky;
    top: 100px;
}

.contact-box-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 1.25rem 1.5rem;
    text-align: center;
}

.contact-box-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.contact-box-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item-compact {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.info-item-compact:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
}

.info-icon-compact {
    width: 36px;
    height: 36px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.info-text-compact h4 {
    margin: 0 0 0.25rem 0;
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 600;
}

.info-text-compact p {
    color: var(--text-light);
    line-height: 1.5;
    font-size: 0.85rem;
    margin: 0;
}

/* QR Code in Box */
.qr-code-box {
    margin-top: 0.5rem;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.qr-code-image-compact {
    width: 120px;
    height: 120px;
    object-fit: contain;
    background: white;
    padding: 0.5rem;
    border-radius: 0.5rem;
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.qr-code-label {
    color: var(--text-dark);
    font-weight: 600;
    text-align: center;
    font-size: 0.8rem;
    margin: 0;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input,
.form-group textarea {
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--bg-white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.footer-section ul {
    list-style: none;
}

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

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: white;
}

.footer-section .logo-img {
    height: 120px;
    width: auto;
    object-fit: contain;
}

.footer-section .logo-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.2;
}

.footer-section .logo-pat {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    letter-spacing: -0.5px;
}

.footer-section .logo-iot {
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: -2px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 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: white;
    transition: all 0.3s ease;
}

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

.newsletter-form {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-family: inherit;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.newsletter-form .btn {
    padding: 0.75rem 1.5rem;
    white-space: nowrap;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

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

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

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow);
        padding: 2rem 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        width: 100%;
        padding: 1rem 0;
    }

    .hero-content {
        margin-left: 1.5rem;
        padding: 1.5rem;
        max-width: 100%;
    }

    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1.125rem;
        line-height: 1.6;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        gap: 0.75rem;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image-img {
        height: 300px;
    }

    .clients-section {
        padding: 3rem 0;
    }

    .client-logo {
        width: 180px;
        height: 90px;
    }

    .clients-track {
        gap: 3rem;
        animation-duration: 35s;
    }

    .products-scroll-wrapper {
        padding: 0.5rem 0;
    }

    .warranty-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .warranty-info {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-section {
        text-align: center;
    }

    .video-modes-section {
        height: 60vh;
        min-height: 400px;
    }

    .video-mode-controls-wrapper {
        bottom: 18px;
        gap: 8px;
    }

    .video-mode-controls {
        padding: 10px 14px;
        gap: 10px;
    }

    .mode-btn {
        min-width: 64px;
        height: 46px;
        padding: 0 10px;
        font-size: 0.9rem;
    }

    .mode-btn-icon {
        font-size: 1.2rem;
    }

    .mode-btn-label {
        font-size: 0.6rem;
    }

    .mode-hint-text {
        font-size: 0.7rem;
    }

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

    .about-content {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-box {
        position: relative;
        top: 0;
        order: -1;
    }

    .contact-box-content {
        padding: 1.25rem;
    }

    .qr-code-image-compact {
        width: 100px;
        height: 100px;
    }

    .solutions-grid {
        grid-template-columns: 1fr;
    }

    .solution-card.featured {
        transform: scale(1);
    }

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

    .newsletter-form {
        flex-direction: column;
    }

    .logo-img {
        height: 70px;
    }

    .footer-section .logo-img {
        height: 90px;
    }
    
    .hero-video-section {
        margin-top: 60px; /* Smaller gap on mobile */
        /* Mobile/tablet scrub mode: natural scroll, no scroll-lock */
        height: 220vh; /* Creates scroll distance to scrub video */
        max-height: none;
        min-height: 600px;
        overflow: visible;
    }
    
    .hero-video-section .hero-video {
        /* Sticky video stays on screen while user scrolls */
        position: sticky;
        top: 90px; /* below fixed navbar */
        height: calc(100vh - 90px);
        width: 100%;
        object-fit: cover;
    }

    .product-card {
        min-width: 280px;
        max-width: 280px;
    }

    .product-image {
        height: 200px;
    }

    .product-label {
        font-size: 1.1rem;
        padding: 1rem 1.25rem 0.5rem;
    }

    .product-caption {
        padding: 0 1.25rem 1.25rem;
        font-size: 0.9rem;
    }

    .gallery-item {
        min-width: 300px;
        max-width: 300px;
        height: 300px;
    }

    .gallery-scroll-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .lightbox-content {
        max-width: 95%;
        max-height: 85%;
    }

    .lightbox-image {
        max-height: 85vh;
    }

    .lightbox-close {
        top: 10px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 2rem;
    }

    .lightbox-nav {
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }

    .lightbox-prev {
        left: 15px;
    }

    .lightbox-next {
        right: 15px;
    }

    .lightbox-counter {
        bottom: 15px;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .scroll-indicators {
        margin-top: 1.5rem;
    }

    .warranty-content {
        grid-template-columns: 1fr;
    }

    .warranty-info {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .video-modes-section {
        height: 50vh;
        min-height: 300px;
    }

    .video-mode-controls-wrapper {
        bottom: 14px;
        gap: 6px;
    }

    .video-mode-controls {
        padding: 8px 12px;
        gap: 8px;
    }

    .mode-btn {
        min-width: 58px;
        height: 42px;
        padding: 0 8px;
        font-size: 0.85rem;
    }

    .mode-btn-icon {
        font-size: 1.1rem;
    }

    .mode-btn-label {
        font-size: 0.55rem;
    }

    .mode-hint-text {
        font-size: 0.65rem;
    }

    .hero-content {
        margin-left: 1rem;
        padding: 1rem;
    }

    .hero-title {
        font-size: 1.75rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem;
        line-height: 1.5;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .service-card {
        padding: 1.25rem;
    }

    .service-card h3 {
        font-size: 1.25rem;
    }

    .service-image {
        height: 180px;
        border-width: 2px;
        padding: 3px;
    }

    .clients-section {
        padding: 2.5rem 0;
    }

    .client-logo {
        width: 150px;
        height: 75px;
    }

    .clients-track {
        gap: 2.5rem;
        animation-duration: 30s;
    }

    .about-content {
        gap: 1.5rem;
    }

    .about-image-img {
        height: 250px;
    }

    .stats {
        gap: 1.5rem;
    }

    .stat-item h3 {
        font-size: 2rem;
    }

    .product-card {
        min-width: 260px;
        max-width: 260px;
    }

    .product-image {
        height: 180px;
    }

    .gallery-item {
        min-width: 280px;
        max-width: 280px;
        height: 280px;
    }

    .contact-content {
        gap: 1.5rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .contact-box-content {
        padding: 1rem;
    }

    .warranty-card {
        padding: 1.5rem;
    }

    .container {
        padding: 0 15px;
    }

    .hero {
        min-height: 90vh;
    }

    .hero-video-section {
        /* Mobile scrub mode: keep it tall enough for smooth scrub */
        height: 200vh;
        min-height: 520px;
        margin-top: 40px;
        max-height: none;
        overflow: visible;
    }
    
    .hero-video-section .hero-video {
        position: sticky;
        top: 90px; /* below fixed navbar */
        height: calc(100vh - 90px);
        width: 100%;
        object-fit: cover;
    }

    .video-modes-section {
        height: 50vh;
        min-height: 300px;
    }

    .logo-img {
        height: 65px;
    }

    .footer-section .logo-img {
        height: 70px;
    }
}

/* ========== Blog Page ========== */
.page-blog {
    /* Prevent fixed navbar from covering blog content */
    padding-top: 86px;
}

/* More compact navbar on blog pages (so it doesn't dominate the page) */
.page-blog .nav-wrapper {
    padding: 0.25rem 0;
}

.page-blog .logo-img {
    height: 60px;
}

.page-blog .nav-link {
    padding: 0.35rem 0;
}

.blog-hero {
    /* Top padding pushes title/subtitle below fixed navbar when scrolled up */
    padding: 2.5rem 0 1.25rem;
    margin-top: 0;
    scroll-margin-top: 90px;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
    text-align: center;
}

.blog-hero-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.35rem;
}

.blog-hero-subtitle {
    font-size: 1rem;
    color: var(--text-light);
    max-width: 560px;
    margin: 0 auto;
    line-height: 1.4;
}

.blog-section {
    padding: 2rem 0 4rem;
    scroll-margin-top: 90px; /* Account for fixed navbar when scrolling */
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.blog-card {
    background: var(--bg-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.blog-card-image {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.05);
}

.blog-card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary-color);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
}

.blog-card-content {
    padding: 1.5rem;
}

.blog-card-date {
    display: block;
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.blog-card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.blog-card-excerpt {
    font-size: 0.95rem;
    color: var(--text-light);
    line-height: 1.6;
}

.blog-card-admin-actions {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 10;
}

.blog-card-edit-btn,
.blog-card-delete-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.blog-card-edit-btn {
    background: var(--primary-color);
    color: white;
    text-decoration: none;
}

.blog-card-edit-btn:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
}

.blog-card-delete-btn {
    background: #dc2626;
    color: white;
}

.blog-card-delete-btn:hover {
    background: #b91c1c;
    transform: scale(1.1);
}

.blog-loading,
.blog-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--text-light);
    padding: 2rem;
}

.blog-empty code {
    background: var(--bg-light);
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Blog post single page */
.blog-post-page {
    padding: 3.5rem 0 4rem;
    margin-top: 0;
    scroll-margin-top: 90px; /* Account for fixed navbar when scrolling */
    min-height: 50vh;
}

.blog-post-loading,
.blog-post-error {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
}

.blog-post-error .btn {
    margin-top: 1rem;
}

.blog-post-header {
    margin-bottom: 2rem;
}

.blog-post-category {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.blog-post-title {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.blog-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

.blog-post-date {
    display: inline;
}

.blog-post-author,
.blog-post-read-time {
    display: inline;
}

.blog-post-image-wrap {
    margin-bottom: 2rem;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.blog-post-image-wrap img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
}

.blog-post-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.blog-post-body p {
    margin-bottom: 1.25rem;
}

/* Blog post gallery – extra pics inside the post */
.blog-post-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 2rem;
}

.blog-post-gallery-item {
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--bg-light);
}

.blog-post-gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.blog-post-gallery-caption {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

.blog-post-back {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.blog-post-back > p {
    margin: 0.5rem 0;
}

.blog-post-back a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.blog-post-back a:hover {
    text-decoration: underline;
}

.blog-post-back i {
    margin-right: 0.5rem;
}

.blog-post-back .blog-post-edit-link {
    margin-top: 1rem;
    margin-left: 0;
}

.blog-post-back .blog-post-edit-link a {
    display: inline-block;
    font-size: 0.95rem;
    color: var(--primary-color);
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    background: transparent;
}

.blog-post-back .blog-post-edit-link a:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Admin panel – edit post (shown when ?edit=1) */
.blog-admin-create-wrap {
    margin-bottom: 2rem;
}

.blog-admin-create-link-wrap {
    margin-top: 1rem;
}

.blog-admin-panel {
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-light);
    border: 2px solid var(--primary-color);
    border-radius: 1rem;
}

.blog-admin-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.blog-admin-title i {
    margin-right: 0.5rem;
}

.blog-admin-hint {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.blog-admin-hint code {
    background: var(--bg-white);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.85rem;
}

.blog-admin-form label {
    display: block;
    margin-bottom: 1rem;
    font-weight: 500;
    color: var(--text-dark);
}

.blog-admin-form input[type="text"],
.blog-admin-form input[type="date"],
.blog-admin-form textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    padding: 0.6rem 0.75rem;
    margin-top: 0.35rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-family: inherit;
    font-size: 1rem;
}

.blog-admin-form textarea {
    min-height: 120px;
    resize: vertical;
}

.blog-admin-images {
    margin: 1.5rem 0;
}

.blog-admin-images strong {
    display: block;
    margin-bottom: 0.75rem;
}

#adminImagesList {
    margin-bottom: 0.75rem;
}

.blog-admin-image-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    margin-bottom: 0.5rem;
}

.blog-admin-image-row input[name="imgSrc"] {
    flex: 1;
    min-width: 0;
}

.blog-admin-image-row input[name="imgCaption"] {
    flex: 1;
    min-width: 0;
}

.blog-admin-remove-img {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 2px solid var(--border-color);
    background: var(--bg-white);
    color: var(--text-light);
    border-radius: 0.5rem;
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
    flex-shrink: 0;
}

.blog-admin-remove-img:hover {
    border-color: #dc2626;
    color: #dc2626;
}

.blog-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1.5rem;
}

.blog-admin-save-status {
    margin-top: 0.75rem;
    font-size: 0.9rem;
}

.blog-admin-save-status.success {
    color: var(--success, #16a34a);
}

.blog-admin-save-status.error {
    color: var(--danger, #dc2626);
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 6rem 0 0.75rem; /* Enough top padding so subtitle isn’t under nav when scrolled up */
        margin-top: 120px;
    }

    .blog-hero-title {
        font-size: 1.5rem;
    }

    .blog-hero-subtitle {
        font-size: 0.95rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ============================================
   COMPREHENSIVE MOBILE OVERHAUL
   Targets: phones up to 768px wide
   ============================================ */

@media (max-width: 768px) {

    /* --- Navbar --- */
    .logo-img {
        height: 52px;
    }
    .footer-section .logo-img {
        height: 64px;
    }
    .nav-wrapper {
        padding: 0.4rem 0;
    }

    /* --- Hero Section --- */
    .hero {
        min-height: 85vh;
    }
    .hero-content {
        margin-left: 0;
        padding: 1.25rem 1rem;
        text-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    .hero-buttons {
        align-items: center;
        width: 100%;
    }
    .hero-buttons-row {
        width: 100%;
        flex-direction: column;
        gap: 0.75rem;
    }
    .hero-buttons-row .btn,
    .btn-brochure {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    .scroll-indicator {
        display: none;
    }

    /* --- Section Spacing --- */
    .products-section,
    .services,
    .warranty-section {
        padding: 3rem 0;
    }
    .pat-app-section {
        padding: 3rem 0;
    }
    .contact {
        padding: 3rem 0;
    }
    .clients-section {
        padding: 2.5rem 0;
    }
    .product-gallery-section {
        padding: 3rem 0;
    }
    .section-header {
        margin-bottom: 1.5rem;
    }
    .section-title {
        font-size: 1.6rem;
    }
    .section-subtitle {
        font-size: 0.95rem;
    }

    /* --- Products Scroll --- */
    .products-scroll-container {
        margin-top: 1.5rem;
    }
    .product-card {
        min-width: 240px;
        max-width: 240px;
    }
    .product-image {
        height: 175px;
    }
    .product-label {
        font-size: 1rem;
        padding: 0.75rem 1rem 0.4rem;
    }
    .product-caption {
        font-size: 0.85rem;
        padding: 0 1rem 1rem;
    }
    .scroll-btn {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    /* --- Services Grid --- */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .service-card {
        padding: 1.25rem;
    }
    .service-image {
        height: 180px;
    }
    .service-card h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
    .service-card p {
        font-size: 0.9rem;
    }

    /* --- PAT App Section --- */
    .pat-app-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    .pat-app-content .pat-app-image {
        order: -1;
    }
    .pat-app-img {
        max-height: 260px;
        width: auto;
        margin: 0 auto;
        display: block;
    }
    .pat-app-text p {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    /* --- Video Modes --- */
    .video-modes-section {
        height: 55vh;
        min-height: 320px;
    }

    /* --- About Section --- */
    .about-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    .about-text p {
        font-size: 0.95rem;
        line-height: 1.7;
    }
    .about-image-img {
        height: 240px;
        width: 100%;
        object-fit: cover;
        border-radius: 0.75rem;
    }

    /* --- Clients --- */
    .client-logo {
        width: 150px;
        height: 75px;
    }
    .clients-track {
        gap: 2rem;
        animation-duration: 28s;
    }

    /* --- Gallery --- */
    .gallery-item {
        min-width: 240px;
        max-width: 240px;
        height: 240px;
    }
    .gallery-scroll-btn {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    /* --- Warranty --- */
    .warranty-section {
        padding: 3rem 0;
    }
    .warranty-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 1.5rem;
    }
    .warranty-info {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .warranty-card {
        padding: 1.25rem;
    }
    .warranty-terms {
        padding: 1.25rem;
    }
    .warranty-terms h3 {
        font-size: 1.2rem;
    }
    .warranty-icon {
        width: 48px;
        height: 48px;
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    /* --- Contact --- */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 1.5rem;
    }
    .contact-box {
        position: relative;
        top: 0;
        order: -1;
    }
    .contact-form {
        padding: 0;
    }
    .form-group input,
    .form-group textarea {
        font-size: 16px; /* prevents iOS zoom */
        padding: 0.85rem;
    }

    /* --- Footer --- */
    .footer {
        padding: 2.5rem 0 1.5rem;
    }
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        margin-bottom: 1.5rem;
    }
    .footer-section {
        text-align: center;
    }
    .footer-section ul {
        padding: 0;
    }
    .social-links {
        justify-content: center;
    }
    .newsletter-form {
        flex-direction: column;
        gap: 0.75rem;
    }
    .newsletter-form input,
    .newsletter-form .btn {
        width: 100%;
        max-width: 320px;
        margin: 0 auto;
    }
    .footer-bottom {
        text-align: center;
        font-size: 0.85rem;
    }

    /* --- Prevent horizontal overflow --- */
    section,
    .container {
        max-width: 100%;
        overflow-x: hidden;
    }
}

/* Extra small phones (< 400px) */
@media (max-width: 400px) {
    .hero-title {
        font-size: 1.6rem;
    }
    .hero-subtitle {
        font-size: 0.9rem;
    }
    .section-title {
        font-size: 1.4rem;
    }
    .product-card {
        min-width: 200px;
        max-width: 200px;
    }
    .product-image {
        height: 150px;
    }
    .gallery-item {
        min-width: 200px;
        max-width: 200px;
        height: 200px;
    }
    .logo-img {
        height: 44px;
    }
    .video-modes-section {
        height: 45vh;
        min-height: 260px;
    }
    .about-image-img {
        height: 200px;
    }
    .container {
        padding: 0 12px;
    }
}

/* ═══════════════════════════════════════════════════════
   LIQUID GLASS — Modern glassmorphism
   ═══════════════════════════════════════════════════════ */

/* Navbar — deep frosted glass */
.navbar {
    background: rgba(255, 255, 255, 0.68) !important;
    backdrop-filter: blur(28px) saturate(200%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(200%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.55) !important;
    box-shadow: 0 4px 24px rgba(37, 99, 235, 0.07), inset 0 -1px 0 rgba(255,255,255,0.5) !important;
}
.navbar.scrolled {
    background: rgba(255, 255, 255, 0.85) !important;
    backdrop-filter: blur(36px) saturate(220%) !important;
    -webkit-backdrop-filter: blur(36px) saturate(220%) !important;
}

/* Hero secondary button — glass over image */
.btn-secondary {
    background: rgba(255, 255, 255, 0.18) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.55) !important;
    color: white !important;
    border-radius: 0.5rem !important;
}
.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.32) !important;
    border-color: rgba(255, 255, 255, 0.85) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15) !important;
}

/* Services section — blue-tinted gradient so glass reads well */
.services {
    background: linear-gradient(140deg, #f0f4ff 0%, #e8effd 55%, #f0f9ff 100%) !important;
}

/* Service cards — liquid glass */
.service-card {
    background: rgba(255, 255, 255, 0.52) !important;
    backdrop-filter: blur(18px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.88) !important;
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.07),
                inset 0 1px 0 rgba(255,255,255,0.95) !important;
}
.service-card:hover {
    background: rgba(255, 255, 255, 0.76) !important;
    box-shadow: 0 20px 48px rgba(37, 99, 235, 0.13),
                inset 0 1px 0 rgba(255,255,255,1) !important;
    transform: translateY(-8px) !important;
    border-color: rgba(255, 255, 255, 1) !important;
}

/* Products section — subtle gradient */
.products-section {
    background: linear-gradient(160deg, #ffffff 0%, #f3f7ff 100%) !important;
}

/* Product cards — liquid glass */
.product-card {
    background: rgba(255, 255, 255, 0.62) !important;
    backdrop-filter: blur(18px) saturate(160%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(160%) !important;
    border: 1px solid rgba(255, 255, 255, 0.9) !important;
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.07),
                inset 0 1px 0 rgba(255,255,255,0.9) !important;
}
.product-card:hover {
    background: rgba(255, 255, 255, 0.85) !important;
    box-shadow: 0 20px 48px rgba(37, 99, 235, 0.13) !important;
    transform: translateY(-8px) !important;
}

/* PAT App section */
.pat-app-section {
    background: linear-gradient(160deg, #ffffff 0%, #f0f4ff 100%) !important;
}
.pat-app-img {
    border-radius: 1.5rem !important;
    box-shadow: 0 24px 64px rgba(37, 99, 235, 0.14),
                0 0 0 1px rgba(255,255,255,0.7) !important;
}

/* Warranty section — blue gradient */
.warranty-section {
    background: linear-gradient(140deg, #f0f4ff 0%, #e8effd 55%, #f0f9ff 100%) !important;
}

/* Warranty cards — liquid glass */
.warranty-card {
    background: rgba(255, 255, 255, 0.52) !important;
    backdrop-filter: blur(18px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.88) !important;
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.07),
                inset 0 1px 0 rgba(255,255,255,0.95) !important;
}
.warranty-card:hover {
    background: rgba(255, 255, 255, 0.76) !important;
    box-shadow: 0 20px 48px rgba(37, 99, 235, 0.13) !important;
    transform: translateY(-5px) !important;
}

/* Warranty terms box — glass */
.warranty-terms {
    background: rgba(255, 255, 255, 0.52) !important;
    backdrop-filter: blur(18px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(18px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.88) !important;
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.07),
                inset 0 1px 0 rgba(255,255,255,0.95) !important;
}

/* Contact section */
.contact {
    background: linear-gradient(140deg, #f0f4ff 0%, #e8effd 55%, #f0f9ff 100%) !important;
}

/* Contact form inputs — glass */
.contact-form input,
.contact-form textarea {
    background: rgba(255, 255, 255, 0.62) !important;
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.82) !important;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.04),
                0 2px 8px rgba(37,99,235,0.04) !important;
    border-radius: 0.625rem !important;
}
.contact-form input:focus,
.contact-form textarea:focus {
    background: rgba(255, 255, 255, 0.88) !important;
    border-color: rgba(37, 99, 235, 0.45) !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1),
                inset 0 1px 4px rgba(0,0,0,0.04) !important;
    outline: none !important;
}

/* Contact info card — glass */
.contact-box {
    background: rgba(255, 255, 255, 0.58) !important;
    backdrop-filter: blur(22px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(22px) saturate(180%) !important;
    border: 1px solid rgba(255, 255, 255, 0.88) !important;
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.09),
                inset 0 1px 0 rgba(255,255,255,1) !important;
}

/* Hero buttons — equal size, Get Demo + Brochure on row 1, Learn More below */
.hero-buttons .btn {
    min-width: 160px !important;
    text-align: center !important;
    justify-content: center !important;
    padding: 0.875rem 2rem !important;
}
.hero-buttons .hero-buttons-row:last-child .btn-secondary {
    width: 100% !important;
}

/* Get Demo + Brochure buttons — liquid glass (gradient-based, works inside hero) */
.btn-primary {
    background: linear-gradient(
        160deg,
        rgba(96, 165, 250, 0.55) 0%,
        rgba(37, 99, 235, 0.38) 100%
    ) !important;
    border: 1px solid rgba(147, 197, 253, 0.65) !important;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35),
                inset 0 1px 0 rgba(255,255,255,0.4),
                inset 0 -1px 0 rgba(0,0,0,0.12) !important;
    color: white !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15) !important;
}
.btn-primary:hover {
    background: linear-gradient(
        160deg,
        rgba(96, 165, 250, 0.75) 0%,
        rgba(37, 99, 235, 0.6) 100%
    ) !important;
    border-color: rgba(191, 219, 254, 0.85) !important;
    box-shadow: 0 12px 36px rgba(37, 99, 235, 0.5),
                inset 0 1px 0 rgba(255,255,255,0.5) !important;
    transform: translateY(-2px) !important;
}

.btn-brochure {
    background: linear-gradient(
        160deg,
        rgba(248, 113, 113, 0.55) 0%,
        rgba(220, 38, 38, 0.38) 100%
    ) !important;
    border: 1px solid rgba(252, 165, 165, 0.6) !important;
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.32),
                inset 0 1px 0 rgba(255,255,255,0.38),
                inset 0 -1px 0 rgba(0,0,0,0.12) !important;
    color: white !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15) !important;
}
.btn-brochure:hover {
    background: linear-gradient(
        160deg,
        rgba(248, 113, 113, 0.75) 0%,
        rgba(220, 38, 38, 0.6) 100%
    ) !important;
    border-color: rgba(252, 165, 165, 0.82) !important;
    box-shadow: 0 12px 36px rgba(220, 38, 38, 0.45),
                inset 0 1px 0 rgba(255,255,255,0.48) !important;
    transform: translateY(-2px) !important;
}

/* Scroll arrow buttons — glass pills with visible blue icons */
.scroll-btn, .gallery-scroll-btn {
    background: rgba(255, 255, 255, 0.68) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    border: 1.5px solid rgba(37, 99, 235, 0.25) !important;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.12) !important;
    color: #2563eb !important;
    transition: all 0.25s ease !important;
}
.scroll-btn:hover, .gallery-scroll-btn:hover {
    background: #2563eb !important;
    color: white !important;
    border-color: #2563eb !important;
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.28) !important;
    transform: scale(1.08) !important;
}

/* Gallery buttons — below images, not overlapping */
.gallery-scroll-buttons {
    position: static !important;
    transform: none !important;
    display: flex !important;
    justify-content: center !important;
    gap: 1rem !important;
    margin-top: 1.5rem !important;
    padding: 0 !important;
    pointer-events: auto !important;
    width: auto !important;
}

/* ── Gallery Lightbox ─────────────────────────────────────────────────────── */
#galleryLightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 99999;
    align-items: center;
    justify-content: center;
}
#galleryLightbox.glb-open { display: flex; }

.glb-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.92);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.glb-img-wrap {
    position: relative;
    z-index: 1;
    max-width: 92vw;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.glb-img {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 0.75rem;
    box-shadow: 0 24px 80px rgba(0,0,0,0.6);
    display: block;
}
.glb-counter {
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.05em;
}
.glb-close {
    position: absolute;
    top: 1.25rem;
    right: 1.25rem;
    z-index: 2;
    width: 44px; height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.glb-close:hover { background: rgba(255,255,255,0.28); }

.glb-prev, .glb-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 52px; height: 52px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.2s;
}
.glb-prev { left: 1.25rem; }
.glb-next { right: 1.25rem; }
.glb-prev:hover, .glb-next:hover { background: rgba(255,255,255,0.3); }

@media (max-width: 600px) {
    .glb-prev { left: 0.5rem; }
    .glb-next { right: 0.5rem; }
    .glb-img  { max-height: 75vh; }
}
