/* ===================================
   Modern CSS for U.S. Hydro X
   Mobile-First Responsive Design
   =================================== */

/* CSS Custom Properties (Variables) */
:root {
    /* Brand Colors - Red accent theme */
    --primary-red: #d60028;
    --primary-red-dark: #b30625;
    --primary-red-light: #ff1744;
    --dark-bg: #39454b;
    --dark-overlay: rgba(57, 69, 75, 0.45);
    --dark-overlay-gradient: linear-gradient(135deg, rgba(57, 69, 75, 0.65) 0%, rgba(57, 69, 75, 0.5) 50%, rgba(57, 69, 75, 0.65) 100%);
    
    /* Neutral Colors */
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;
    
    /* Status Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', roboto, sans-serif;
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Spacing Scale */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    
    /* Layout */
    --container-max-width: 1200px;
    --container-padding: var(--space-md);
    --navbar-height: 70px;
    
    /* Border Radius */
    --radius-sm: 0.25rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   Reset & Base Styles
   =================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

@media (min-width: 768px) {
    html {
        font-size: 17px;
    }
}

@media (min-width: 1024px) {
    html {
        font-size: 18px;
    }
}

@media (min-width: 1440px) {
    html {
        font-size: 19px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: var(--font-primary);
    font-weight: var(--font-weight-normal);
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===================================
   Accessibility
   =================================== */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-blue);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    border-radius: var(--radius-sm);
    z-index: 1000;
    transition: top var(--transition-fast);
}

.skip-to-content:focus {
    top: 6px;
}

/* Focus styles */
:focus {
    outline: 2px solid var(--primary-red);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* ===================================
   Typography
   =================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    margin-bottom: var(--space-md);
    color: var(--gray-900);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); }

p {
    margin-bottom: var(--space-md);
    max-width: 65ch;
}

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

a:hover, a:focus {
    color: var(--primary-red-dark);
    text-decoration: underline;
}

/* ===================================
   Layout Components
   =================================== */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

.section {
    padding: var(--space-3xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-title {
    margin-bottom: var(--space-md);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 860px;
    margin: 0 auto;
}

.gallery .section-subtitle {
    max-width: 1040px;
}

/* Section headers on dark backgrounds */
.hero .section-title,
.about .section-title,
.services .section-title {
    color: var(--white);
}

.hero .section-subtitle,
.about .section-subtitle,
.services .section-subtitle {
    color: rgba(255, 255, 255, 0.9);
}

/* ===================================
   Navigation
   =================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    z-index: 1000;
    transition: all var(--transition-fast);
}

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

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: var(--navbar-height);
}

.logo img {
    height: 40px;
    width: auto;
    transition: transform var(--transition-fast);
}

.logo:hover img {
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: var(--space-xl);
    margin: 0;
    padding: 0;
}

.nav-link {
    font-weight: var(--font-weight-semibold);
    color: var(--gray-700);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--gray-100) 100%);
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-red-light));
    transition: all var(--transition-fast);
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-link:hover::before, .nav-link.active::before {
    opacity: 1;
}

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

.nav-link:hover::after, .nav-link.active::after {
    width: 80%;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
    border-radius: var(--radius-sm);
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--gray-700);
    margin: 3px 0;
    transition: all var(--transition-fast);
    transform-origin: center;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    color: var(--white);
    overflow: hidden;
    background-color: var(--dark-bg);
}

/* Hero Video Background */
.hero-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;
}

/* Hide video for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .hero-video {
        display: none;
    }
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--dark-overlay-gradient);
    z-index: 1;
}

/* Additional gradient for vignette effect */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
    z-index: 2;
}

.hero-overlay {
    display: none;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding-top: var(--navbar-height);
}

.hero-title {
    color: var(--white);
    margin-bottom: var(--space-lg);
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.8), 0 2px 4px rgba(0, 0, 0, 0.6);
    font-size: 4.25em;
    line-height: 1em;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-size: 1.125rem;
    margin-bottom: var(--space-2xl);
    opacity: 0.95;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-weight: var(--font-weight-normal);
    line-height: 1.6;
    color: var(--white);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.5);
}

.hero-buttons {
    display: flex;
    gap: var(--space-lg);
    justify-content: center;
    flex-wrap: wrap;
}

.scroll-indicator {
    position: fixed;
    bottom: calc(var(--space-xl) + env(safe-area-inset-bottom));
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.scroll-indicator.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.scroll-indicator:hover {
    transform: translateX(-50%) translateY(-4px);
}

.scroll-indicator:hover span {
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

.scroll-indicator span {
    display: block;
    width: 40px;
    height: 40px;
    position: relative;
    animation: scroll-bounce 2s infinite;
}

.scroll-indicator span::before,
.scroll-indicator span::after {
    content: '';
    position: absolute;
    background: var(--white);
    transition: all var(--transition-fast);
}

/* Arrow shaft */
.scroll-indicator span::before {
    width: 3px;
    height: 24px;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Arrow head (chevron) */
.scroll-indicator span::after {
    width: 16px;
    height: 16px;
    border-right: 3px solid var(--white);
    border-bottom: 3px solid var(--white);
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) rotate(45deg);
    background: transparent;
    border-radius: 2px;
}

@keyframes scroll-bounce {
    0%, 100% { 
        transform: translateY(0); 
        opacity: 0.6; 
    }
    50% { 
        transform: translateY(8px); 
        opacity: 1; 
    }
}

/* Scroll indicator for light background sections (Gallery) */
.gallery .scroll-indicator span::before {
    background: var(--gray-800);
}

.gallery .scroll-indicator span::after {
    border-right-color: var(--gray-800);
    border-bottom-color: var(--gray-800);
}

.gallery .scroll-indicator:hover span {
    filter: drop-shadow(0 0 8px rgba(0, 0, 0, 0.3));
}

/* ===================================
   Enhanced Animations
   =================================== */

/* Fade in animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Animation utility classes */
.animate-fade-in {
    animation: fadeIn 1s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 1s ease-out 0.3s both;
}

.animate-fade-in-delay-2 {
    animation: fadeIn 1s ease-out 0.6s both;
}

.animate-scale {
    animation: fadeInScale 0.5s ease-out;
}

/* Hover effects */
.hover-lift {
    transition: transform var(--transition-fast);
}

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

/* Smooth transitions for all interactive elements */
a, button, input, textarea, select {
    transition: all var(--transition-fast);
}

/* Enhanced focus states */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--primary-red);
    outline-offset: 3px;
    border-radius: var(--radius-sm);
}

/* ===================================
   Buttons
   =================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-md) var(--space-xl);
    font-weight: var(--font-weight-semibold);
    text-decoration: none;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 1rem;
    line-height: 1.5;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left var(--transition-slow);
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--primary-red);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.8);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
}

.btn-full-width {
    width: 100%;
    justify-content: center;
}

/* ===================================
   About Section
   =================================== */
.about {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    color: var(--white);
    background-color: var(--dark-bg);
    background: url('data:image/svg+xml,%3Csvg width="256" height="256" xmlns="http://www.w3.org/2000/svg"%3E%3Cpattern id="pattern" x="0" y="0" width="8" height="8" patternUnits="userSpaceOnUse"%3E%3Ccircle cx="1" cy="1" r="1" fill="%23000" opacity="0.1"/%3E%3C/pattern%3E%3Crect fill="url(%23pattern)" width="256" height="256"/%3E%3C/svg%3E'), url('../images/one.webp'), var(--dark-bg);
    background-size: 256px 256px, cover, auto;
    background-attachment: fixed, fixed, scroll;
    background-position: top left, center center, center;
    background-repeat: repeat, no-repeat, no-repeat;
    padding-bottom: 5em;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--dark-overlay-gradient);
    z-index: 1;
}

.about::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at bottom, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
    z-index: 2;
}

.about .container {
    position: relative;
    z-index: 3;
}

.about-content {
    max-width: 45em;
    margin: 0 auto;
}

.content-block {
    margin-bottom: var(--space-xl);
    padding: 2em;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    color: var(--white);
    transition: all var(--transition-fast);
}

.content-block:hover {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: translateY(-4px);
}

.content-block:last-child {
    margin-bottom: 0;
}

.content-block h2 {
    color: var(--white);
    margin-bottom: var(--space-md);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.content-block h3 {
    color: var(--white);
    margin-bottom: var(--space-md);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.content-block p {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.about-image {
    display: none;
}

/* ===================================
   Services Section
   =================================== */
.services {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    color: var(--white);
    background-color: var(--dark-bg);
    background: url('data:image/svg+xml,%3Csvg width="256" height="256" xmlns="http://www.w3.org/2000/svg"%3E%3Cpattern id="pattern" x="0" y="0" width="8" height="8" patternUnits="userSpaceOnUse"%3E%3Ccircle cx="1" cy="1" r="1" fill="%23000" opacity="0.1"/%3E%3C/pattern%3E%3Crect fill="url(%23pattern)" width="256" height="256"/%3E%3C/svg%3E'), url('../images/two.webp'), var(--dark-bg);
    background-size: 256px 256px, cover, auto;
    background-attachment: fixed, fixed, scroll;
    background-position: top left, center center, center;
    background-repeat: repeat, no-repeat, no-repeat;
    padding-bottom: 5em;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--dark-overlay-gradient);
    z-index: 1;
}

.services::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
    z-index: 2;
}

.services .container {
    position: relative;
    z-index: 3;
}

.services-content {
    max-width: 45em;
    margin: 0 auto;
    margin-bottom: var(--space-2xl);
}

.service-description {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    padding: 2em;
    border-radius: var(--radius-xl);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    color: var(--white);
    margin-bottom: var(--space-xl);
    transition: all var(--transition-fast);
}

.service-description:hover {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform: translateY(-4px);
}

.service-description h2 {
    color: var(--white);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.service-description p {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
}

.service-card {
    background: rgba(255, 255, 255, 0.95);
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: all var(--transition-fast);
    color: var(--gray-800);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    background: var(--white);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-md);
    display: block;
}

.service-card h3 {
    color: var(--dark-bg);
    margin-bottom: var(--space-sm);
    font-size: 1.1rem;
}

.service-card p {
    color: var(--gray-600);
    margin: 0;
    font-size: 0.95rem;
}

/* ===================================
   Gallery Section
   =================================== */
.gallery {
    background: var(--white);
    padding: 6em 0;
    position: relative;
    padding-bottom: 8em;
}

.gallery .container {
    position: relative;
}

.gallery-grid {
    display: flex;
    gap: clamp(0.75rem, 2vw, 1.75rem);
    margin-bottom: var(--space-2xl);
    align-items: stretch;
    min-height: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0.5rem;
    padding-inline: 0.25rem;
    touch-action: pan-x;
    user-select: none;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.gallery-grid::-webkit-scrollbar {
    height: 9px;
}

.gallery-grid::-webkit-scrollbar-track {
    background: rgba(2, 14, 38, 0.08);
    border-radius: 999px;
}

.gallery-grid::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, var(--primary-red), var(--primary-red-light));
    border-radius: 999px;
}

.gallery-grid.is-dragging {
    cursor: grabbing;
}

.gallery-item {
    flex: 0 0 clamp(260px, 32vw, 420px);
    scroll-snap-align: center;
    position: relative;
    background: var(--white);
    border-radius: 1.1rem;
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(2, 14, 38, 0.12);
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), opacity var(--transition-normal), filter var(--transition-normal);
    cursor: pointer;
    opacity: 1;
    transform: none;
    filter: saturate(0.95);
}

.gallery-item:hover {
    transform: scale(1.04);
    box-shadow: 0 24px 46px rgba(2, 14, 38, 0.24);
    filter: saturate(1.08);
}

.gallery-item img {
    width: 100%;
    height: clamp(240px, 26vw, 320px);
    object-fit: cover;
    display: block;
    transition: transform var(--transition-slow);
}

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

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(214, 0, 40, 0.7), transparent);
    opacity: 0;
    transition: opacity var(--transition-fast);
    display: flex;
    align-items: flex-end;
    padding: var(--space-lg);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-carousel-hud {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    max-width: 760px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(214, 0, 40, 0.18);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72));
    backdrop-filter: blur(12px);
    box-shadow: 0 12px 28px rgba(2, 14, 38, 0.09);
}

.gallery-gesture-hint {
    font-size: 0.86rem;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--gray-600);
    white-space: nowrap;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.gallery-progress-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(214, 0, 40, 0.12);
    outline: none;
    cursor: pointer;
}

.gallery-progress-slider::-webkit-slider-runnable-track {
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(214, 0, 40, 0.2), rgba(255, 23, 68, 0.28));
}

.gallery-progress-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    margin-top: -5px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.95);
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-light));
    box-shadow: 0 4px 12px rgba(214, 0, 40, 0.35);
}

.gallery-progress-slider::-moz-range-track {
    height: 10px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(214, 0, 40, 0.2), rgba(255, 23, 68, 0.28));
}

.gallery-progress-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.95);
    background: linear-gradient(135deg, var(--primary-red), var(--primary-red-light));
    box-shadow: 0 4px 12px rgba(214, 0, 40, 0.35);
}

.gallery .section-header {
    margin-bottom: 3em;
}

/* ===================================
   Contact Section
   =================================== */
.contact {
    background: var(--gray-50);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 5em 0;
}

.contact .container {
    width: 100%;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
    gap: clamp(1.25rem, 2.5vw, 2.5rem);
    align-items: center;
}

.contact .section-header {
    text-align: left;
    margin-bottom: 0;
}

.contact .section-title {
    margin-bottom: 0.45rem;
    line-height: 1.1;
}

.contact .section-subtitle {
    font-size: 1rem;
    line-height: 1.45;
    margin-bottom: 0.55rem;
    max-width: 42ch;
}

.contact .section-header p {
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

.contact .section-header > p[style] {
    margin-top: 0.5rem !important;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    line-height: 1.45;
}

.contact-form-wrapper {
    max-width: 560px;
    width: 100%;
    margin: 0;
}

.contact-info {
    display: grid;
    grid-template-columns: minmax(140px, auto) minmax(200px, 1fr) minmax(120px, auto);
    gap: 0.85rem 2rem;
    margin-top: 1.5rem;
    padding: 1.5rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid var(--gray-200);
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    align-items: center;
    justify-items: center;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.contact-name {
    font-weight: var(--font-weight-semibold);
    color: var(--gray-800);
    font-size: 1rem;
    text-align: center;
    justify-self: center;
    white-space: nowrap;
}

.contact-email {
    font-size: 0.92rem;
    color: var(--primary-red);
    text-decoration: none;
    transition: color var(--transition-fast);
    text-align: center;
    justify-self: center;
    white-space: nowrap;
}

.contact-email:hover {
    color: var(--primary-red-dark);
    text-decoration: underline;
}

.contact-phone {
    font-size: 0.92rem;
    color: var(--gray-600);
    font-weight: var(--font-weight-semibold);
    text-align: center;
    justify-self: center;
    white-space: nowrap;
}

.contact-card {
    background: var(--white);
    padding: var(--space-xl);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary-red);
}

.contact-card h3 {
    color: var(--primary-red);
    margin-bottom: var(--space-md);
}

.contact-card p {
    margin: 0;
    line-height: 1.8;
}

.contact-card a {
    font-weight: var(--font-weight-semibold);
}

/* ===================================
   Forms
   =================================== */
.contact-form {
    background: var(--white);
    padding: clamp(0.9rem, 1.8vw, 1.25rem);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.contact-form textarea {
    min-height: 110px;
    max-height: 150px;
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: var(--font-weight-semibold);
    color: var(--gray-700);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: var(--space-md);
    border: 2px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

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

.error-message {
    display: block;
    color: var(--error);
    font-size: 0.875rem;
    margin-top: var(--space-sm);
}

.form-group.error input,
.form-group.error textarea {
    border-color: var(--error);
}

/* ===================================
   Footer
   =================================== */
.footer {
    background: var(--gray-900);
    color: var(--white);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--gray-700);
}

.footer-logo img {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
}

.footer-credentials img {
    width: clamp(320px, 38vw, 520px);
    max-width: 100%;
    height: auto;
    opacity: 0.8;
}

.footer-bottom {
    text-align: center;
    color: var(--gray-400);
}

.footer-bottom p {
    margin-bottom: var(--space-sm);
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

/* ===================================
   Modal
   =================================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.modal.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.modal-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    touch-action: pan-y pinch-zoom;
}

.modal-content:active {
    cursor: grabbing;
}

.modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: none;
    border: none;
    color: var(--white);
    font-size: 2rem;
    cursor: pointer;
    z-index: 10001;
}

.modal img {
    max-width: 100%;
    max-height: 100%;
    border-radius: var(--radius-lg);
    transition: transform 0.15s ease-out, opacity 0.15s ease-out;
    will-change: transform, opacity;
    user-select: none;
    -webkit-user-drag: none;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    width: 100%;
    pointer-events: none;
}

.modal-prev,
.modal-next {
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: var(--white);
    padding: var(--space-md);
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: var(--radius-md);
    pointer-events: all;
    transition: background var(--transition-fast);
}

.modal-prev:hover,
.modal-next:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Hide modal navigation buttons on small screens - swipe instead */
@media (max-width: 640px) {
    .modal-prev,
    .modal-next {
        opacity: 0.3;
        font-size: 1.2rem;
        padding: var(--space-sm);
    }
    
    .modal-prev:active,
    .modal-next:active {
        opacity: 0.8;
    }
}

/* ===================================
   Back to Top Button
   =================================== */
.back-to-top {
    position: fixed;
    bottom: var(--space-xl);
    right: var(--space-xl);
    width: 50px;
    height: 50px;
    background: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
}

.back-to-top:hover {
    background: var(--primary-red-dark);
    transform: translateY(-2px);
}

.back-to-top.visible {
    display: flex;
}

/* ===================================
   Animations
   =================================== */
.animate-fade-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeIn 1s ease-out forwards;
}

.animate-fade-in-delay {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeIn 1s ease-out 0.2s forwards;
}

.animate-fade-in-delay-2 {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeIn 1s ease-out 0.4s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================
   Responsive Design
   =================================== */

/* Desktop and larger screens */
@media (min-width: 1200px) {
    h1 { font-size: clamp(2.4rem, 4.2vw, 4rem); }
    h2 { font-size: clamp(2rem, 3.2vw, 3rem); }
    h3 { font-size: clamp(1.4rem, 2.3vw, 2rem); }

    p,
    .hero-subtitle,
    .section-subtitle,
    .content-block p,
    .service-description p {
        font-size: 1.1rem;
        line-height: 1.7;
    }

    .nav-link {
        font-size: 1.02rem;
    }
}

/* Ultra-wide displays */
@media (min-width: 1600px) {
    h1 { font-size: clamp(2.8rem, 3.7vw, 4.5rem); }
    h2 { font-size: clamp(2.2rem, 2.7vw, 3.25rem); }

    p,
    .hero-subtitle,
    .section-subtitle,
    .content-block p,
    .service-description p {
        font-size: 1.18rem;
    }

    .nav-link {
        font-size: 1.08rem;
    }
}

/* Landscape Orientation - Larger containers for better readability */
@media (orientation: landscape) and (min-width: 768px) {
    .about-content,
    .services-content {
        max-width: 80em;
        font-size: 1.05rem;
    }
    
    .hero-subtitle {
        max-width: 950px;
    }
    
    .content-block h2,
    .service-description h2 {
        font-size: 2rem;
    }
    
    .content-block p,
    .service-description p {
        font-size: 1.05rem;
        line-height: 1.7;
    }
    
    /* Ensure contact and footer stay centered */
    .contact .section-header,
    .footer-bottom {
        text-align: center;
    }
    
    .contact .section-header p,
    .footer-bottom p {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Tablet Styles */
@media (max-width: 768px) {
    :root {
        --container-padding: var(--space-md);
        --navbar-height: 60px;
    }
    
    .nav-links {
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: var(--space-xl);
        box-shadow: var(--shadow-lg);
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
        gap: var(--space-lg);
    }
    
    .nav-links.active {
        transform: translateX(0);
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .hero, .about, .services {
        min-height: auto;
        padding: 6em 0;
        padding-bottom: 5em;
    }
    
    .hero-title {
        font-size: 3em;
    }
    
    .about-content,
    .services-content {
        max-width: 100%;
    }
    
    .content-block,
    .service-description {
        padding: 1.25em;
        border-radius: 1em;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .footer-content {
        flex-direction: column;
        gap: var(--space-xl);
        text-align: center;
    }

    .contact {
        min-height: auto;
        display: block;
        padding: 4em 0;
    }

    .contact .container {
        display: block;
    }

    .contact .section-header,
    .contact .section-header p {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .contact-info {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem 1.25rem;
        max-width: 100%;
    }
    
    .contact-name,
    .contact-email,
    .contact-phone {
        justify-self: center;
        text-align: center;
    }
    
    .contact-name {
        padding-top: 0.75rem;
        border-top: 1px solid var(--gray-200);
        width: 100%;
    }
    
    .contact-name:first-child {
        padding-top: 0;
        border-top: none;
    }
    
    .contact-phone {
        padding-bottom: 0.75rem;
        border-bottom: 1px solid var(--gray-200);
        width: 100%;
    }

    .contact-form-wrapper {
        margin: 0 auto;
        max-width: 100%;
    }
}

/* Mobile Styles */
@media (max-width: 480px) {
    :root {
        --container-padding: 1em;
    }
    
    .hero, .about, .services {
        padding: 4em 1em;
        background-attachment: scroll, scroll, scroll;
        padding-bottom: 5em;
    }
    
    .hero-title {
        font-size: 2.5em;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .gallery {
        padding: 3em 0;
        padding-bottom: 5em;
    }
    
    .gallery-grid {
        gap: var(--space-md);
        min-height: auto;
        scroll-padding-inline: 0;
        padding-inline: 0;
    }

    .gallery-item {
        flex-basis: 84vw;
    }

    .gallery-carousel-hud {
        grid-template-columns: 1fr;
        border-radius: 1rem;
        gap: 0.5rem;
        text-align: center;
    }
    
    .gallery-gesture-hint {
        font-size: 0.75rem;
    }
    
    .gallery-item img {
        height: 220px;
    }
    
    .content-block,
    .service-description {
        padding: 1.25em;
    }
    
    .service-card {
        padding: var(--space-xl);
    }
    
    .contact-form {
        padding: var(--space-xl);
    }
    
    .back-to-top {
        bottom: var(--space-lg);
        right: var(--space-lg);
        width: 45px;
        height: 45px;
    }
    
    .scroll-indicator {
        bottom: calc(var(--space-lg) + env(safe-area-inset-bottom));
    }
    
    .scroll-indicator span {
        width: 35px;
        height: 35px;
    }
    
    .scroll-indicator span::before {
        height: 20px;
    }
    
    .scroll-indicator span::after {
        width: 14px;
        height: 14px;
    }
    
    .btn {
        padding: var(--space-sm) var(--space-lg);
        font-size: 0.95rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .back-to-top,
    .scroll-indicator {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: var(--space-xl) 0;
    }
    
    .section {
        padding: var(--space-lg) 0;
        break-inside: avoid;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --shadow-md: 0 0 0 1px var(--gray-400);
        --shadow-lg: 0 0 0 2px var(--gray-400);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1e293b;
        --gray-50: #0f172a;
        --gray-100: #1e293b;
        --gray-200: #334155;
        --gray-800: #f1f5f9;
        --gray-900: #ffffff;
    }
    
    .navbar {
        background: rgba(30, 41, 59, 0.95);
        border-bottom-color: var(--gray-600);
    }
}