@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;700&display=swap');

html {
    scroll-behavior: smooth;
}

:root {
    --primary-green: #a3e635;
    --bg-dark: #000000;
    --bg-card: #111111;
    --text-white: #ffffff;
    --text-gray: #aaaaaa;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.6;
}

/* Header & Nav */
header {
    padding: 20px 50px;
    position: absolute;
    width: 100%;
    box-sizing: border-box;
    z-index: 10;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 60px;
}

nav a {
    color: var(--text-white);
    text-decoration: none;
    margin-left: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 1px;
}

/* Hero */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8)), url('img/hero_bg.jpg') center/cover;
    display: flex;
    align-items: center;
    padding: 0 10%;
}

.hero h1 {
    font-size: 5rem;
    margin: 0;
    font-weight: 800;
}

.hero .subtitle {
    font-size: 1.5rem;
    color: var(--text-white);
}

.hero .subtitle span {
    color: var(--primary-green);
}

.hero-desc {
    color: var(--text-gray);
    max-width: 600px;
    margin-top: 20px;
}

.hero-cta {
    display: flex;
    gap: 15px;
    margin-top: 40px;
}

.btn-outline {
    border: 1px solid var(--text-gray);
    padding: 10px 25px;
    color: var(--text-white);
    text-decoration: none;
    font-size: 0.8rem;
    border-radius: 4px;
}

/* Icons Bar */
.feature-icons {
    display: flex;
    justify-content: space-around;
    padding: 50px;
    border-bottom: 1px solid #333;
}

.icon-item {
    text-align: center;
    color: var(--text-white);
    font-size: 0.8rem;
    font-weight: bold;
}

.icon-item img {
    width: 70px;
    height: 70px;
    margin: 0 auto 10px;
    display: block;
}

/* Process Section */
.process-section {
    padding: 100px 5%;
    text-align: center;
}

.process-section h3 {
    font-size: 2rem;
    margin-bottom: 60px;
}

.process-steps {
    display: flex;
    justify-content: center;
    /* Центрує всі елементи разом */
    gap: 60px;
    /* Задає точну відстань між колонками (можете змінити на 40px або 80px за смаком) */
    position: relative;
    flex-wrap: wrap;
    /* Дозволяє блокам переноситись на менших екранах */
}

/* About Us Section */
.about-section {
    padding: 80px 5%;
    background-color: var(--bg-dark);
}

.about-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
}

.about-text {
    flex: 1;
    text-align: left;
}

.about-text h3 {
    font-size: 2rem;
    color: var(--primary-green);
    margin-bottom: 20px;
}

.about-text p {
    color: var(--text-gray);
    font-size: 1.1rem;
    line-height: 1.8;
}

.about-image {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Плейсхолдер для майбутнього фото */
.image-placeholder {
    width: 100%;
    max-width: 500px;
    height: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #777;
    border-radius: 8px;
    font-weight: bold;
    letter-spacing: 2px;
}

/* Стиль для самого тегу <img>, коли ви його додасте */
.about-image img {
    width: 100%;
    max-width: 500px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(163, 230, 53, 0.1);
    object-fit: cover;
}


.step {
    flex: 0 1 320px;
    z-index: 2;
    padding: 0 10px;
}

.step-img {
    width: 100%;
    min-width: 250px;
    height: 250px;
    margin: 0 auto 20px;
    border-radius: 8px;
    overflow: hidden;
    /* The grey background and border have been removed */
}

.step-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}


.step h4 {
    color: var(--primary-green);
    font-size: 0.9rem;
}

.step p {
    font-size: 0.8rem;
    color: var(--text-gray);
}

/* Comparison/Video Grid */
.media-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 50px 5%;
}

.comparison-grid,
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.comp-item img,
.video-item img {
    width: 100%;
    border: 1px solid #333;
}

/* Einsatzbereiche */
.areas-section {
    padding: 100px 5%;
    text-align: center;
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.area-item {
    font-size: 0.8rem;
    font-weight: bold;
}

.area-item img {
    width: 70px;
    height: 70px;
    margin: 0 auto 15px;
    display: block;
}

/* Footer Contact */
.footer-contact {
    display: flex;
    justify-content: space-between;
    padding: 100px 5%;
    background: #080808;
}

.contact-info h3 {
    color: var(--primary-green);
}

.highlight {
    color: var(--primary-green);
}

.btn-primary {
    display: inline-block;
    border: 1px solid var(--primary-green);
    padding: 15px 30px;
    color: var(--primary-green);
    text-decoration: none;
    font-weight: bold;
    margin-top: 20px;
}

footer {
    text-align: center;
    padding: 20px;
    font-size: 0.8rem;
    color: var(--text-gray);
    border-top: 1px solid #222;
}

/* Gallery Section */
.gallery-section {
    padding: 100px 5% 50px 5%;
    text-align: center;
}

.gallery-section h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.gallery-columns-container {
    display: flex;
    gap: 40px;
    justify-content: space-between;
    margin-top: 40px;
    text-align: center;
}

.gallery-column {
    flex: 1;
    min-width: 0;
}

@media (max-width: 992px) {
    .gallery-columns-container {
        flex-direction: column;
        gap: 20px;
    }
}

.gallery-subsection-title {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin: 20px 0 20px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.gallery-container {
    position: relative;
    width: 100%;
    margin-bottom: 40px;
}

/* Scroll Gallery Container */
.scroll-gallery {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding: 15px 5px;
    text-align: center;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    /* Hide scrollbar for Firefox */
    -ms-overflow-style: none;
    /* Hide scrollbar for IE/Edge */
}

.scroll-gallery::-webkit-scrollbar {
    display: none;
    /* Hide scrollbar for Chrome, Safari and Opera */
}

/* Photo Media Items */
.scroll-gallery img {
    height: 300px;
    width: auto;
    aspect-ratio: 4/3;
    border-radius: 10px;
    object-fit: cover;
    flex: 0 0 auto;
    scroll-snap-align: center;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.3s ease;
    border: 1px solid #222;
}

.scroll-gallery img:hover {
    transform: scale(1.03);
    border-color: var(--primary-green);
    box-shadow: 0 4px 20px rgba(163, 230, 53, 0.15);
}

/* Video Media Items (Original Aspect Ratio) */
.scroll-gallery video {
    height: 300px;
    width: auto;
    border-radius: 10px;
    flex: 0 0 auto;
    scroll-snap-align: center;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.3s ease;
    border: 1px solid #222;
}

.scroll-gallery video:hover {
    transform: scale(1.03);
    border-color: var(--primary-green);
    box-shadow: 0 4px 20px rgba(163, 230, 53, 0.15);
}

/* Gallery Arrows */
.gallery-arrow {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 45px;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    opacity: 1;
    transition: background-color 0.2s, opacity 0.3s, color 0.2s;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.gallery-arrow:hover {
    background-color: rgba(163, 230, 53, 0.2);
    color: var(--primary-green);
}

.gallery-arrow.disabled {
    opacity: 0 !important;
    pointer-events: none;
}

.gallery-arrow.prev {
    left: 0;
    border-radius: 0 8px 8px 0;
}

.gallery-arrow.next {
    right: 0;
    border-radius: 8px 0 0 8px;
}

@media (max-width: 768px) {
    .gallery-arrow {
        width: 40px;
    }
}

/* Lightbox Modal */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    overflow: hidden;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    position: relative;
}

.lightbox-content {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(163, 230, 53, 0.15);
    transform: scale(0.9);
    transition: transform 0.3s ease;
    object-fit: contain;
    cursor: zoom-in;
    user-select: none;
    -webkit-user-drag: none;
    position: relative;
}

.lightbox.active .lightbox-content {
    transform: scale(1);
}

.lightbox-content.zoomed {
    transform: scale(2) !important;
    cursor: grab;
    max-width: 100%;
    max-height: 100vh;
}

.lightbox-content.zoomed:active {
    cursor: grabbing;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1010;
    user-select: none;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: var(--primary-green);
}

/* Primary Button Hover Optimization */
.btn-primary {
    transition: all 0.3s ease;
    border-radius: 4px;
}

.btn-primary:hover {
    background-color: var(--primary-green);
    color: #000;
    box-shadow: 0 0 15px var(--primary-green);
}

/* Gallery Grid Page Styles */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-grid img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #222;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.3s ease;
}

.gallery-grid img:hover {
    transform: scale(1.03);
    border-color: var(--primary-green);
    box-shadow: 0 4px 20px rgba(163, 230, 53, 0.15);
}

.gallery-grid video {
    width: 100%;
    height: auto;
    border-radius: 8px;
    border: 1px solid #222;
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), border-color 0.3s ease;
}

.gallery-grid video:hover {
    transform: scale(1.03);
    border-color: var(--primary-green);
    box-shadow: 0 4px 20px rgba(163, 230, 53, 0.15);
}

/* =============================================
   MOBILE RESPONSIVE STYLES
   ============================================= */

/* --- Tablet (max 992px) --- */
@media (max-width: 992px) {

    /* Header */
    header {
        padding: 15px 25px;
    }

    nav a {
        margin-left: 18px;
        font-size: 0.8rem;
    }

    /* Hero */
    .hero h1 {
        font-size: 3.5rem;
    }

    .hero .subtitle {
        font-size: 1.2rem;
    }

    /* Process Steps */
    .process-steps {
        flex-wrap: wrap;
        gap: 30px;
        justify-content: center;
    }

    .step {
        flex: 0 0 calc(33% - 15px);
    }

    /* Areas Grid */
    .areas-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }

    /* Footer Contact */
    .footer-contact {
        flex-direction: column;
        gap: 40px;
        padding: 60px 5%;
    }
}

/* --- Mobile (max 768px) --- */
@media (max-width: 768px) {

    /* Header: stack logo + nav vertically */
    header {
        padding: 15px 20px;
        position: relative;
        background: rgba(0, 0, 0, 0.9);
    }

    .header-container {
        flex-direction: column;
        gap: 12px;
        align-items: center;
    }

    .logo img {
        height: 45px;
    }

    nav {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
        width: 100%;
    }

    nav a {
        margin-left: 0;
        font-size: 0.75rem;
        padding: 6px 10px;
        border: 1px solid #333;
        border-radius: 4px;
        flex: 1 1 auto;
        text-align: center;
    }

    /* Hero */
    .hero {
        height: auto;
        min-height: 60vh;
        padding: 20px 6% 50px;
        align-items: flex-end;
    }

    .hero h1 {
        font-size: 2.6rem;
        line-height: 1.1;
    }

    .hero .subtitle {
        font-size: 1rem;
        line-height: 1.4;
    }

    .hero-desc {
        font-size: 0.9rem;
        margin-top: 14px;
    }

    .hero-cta {
        flex-wrap: wrap;
        gap: 10px;
        margin-top: 24px;
    }

    .btn-outline {
        font-size: 0.75rem;
        padding: 9px 18px;
    }

    /* Feature Icons Bar */
    .feature-icons {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
        padding: 30px 20px;
    }

    .icon-item img {
        width: 50px;
        height: 50px;
    }

    /* Process Section */
    .process-section {
        padding: 60px 5%;
    }

    .process-section h3 {
        font-size: 1.4rem;
        margin-bottom: 40px;
    }

    .process-steps {
        flex-direction: column !important;
        gap: 40px !important;
    }

    /* 2. Даємо кожному кроку достатньо місця по ширині */
    .step {
        width: 100% !important;
        max-width: 400px !important;
        margin: 0 auto !important; /* Центруємо на екрані */
    }

    /* 3. Фіксуємо розмір контейнера для фото */
    .step-img {
        width: 100% !important;
        height: 250px !important; /* Ви можете змінити цю висоту за бажанням (наприклад 200px або 300px) */
        margin-bottom: 20px !important;
        overflow: hidden !important;
    }

    /* 4. Забороняємо самому зображенню деформуватися і стискатися */
    .step-img img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important; /* Головне правило: ідеально заповнює контейнер без розтягування */
        display: block !important;
    }

    /* Gallery Section */
    .gallery-section {
        padding: 50px 4% 30px;
    }

    .gallery-section h3 {
        font-size: 1.4rem;
    }

    .gallery-subsection-title {
        font-size: 1rem;
    }

    .scroll-gallery img {
        height: 220px;
    }

    .scroll-gallery video {
        height: 220px;
    }

    /* Areas Grid */
    .areas-section {
        padding: 60px 5%;
    }

    .areas-section h3 {
        font-size: 1.4rem;
    }

    .areas-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
        margin-top: 30px;
    }

    .area-item img {
        width: 52px;
        height: 52px;
        margin-bottom: 10px;
    }

/* Знаходимо контейнер, де лежать іконки областей (наприклад, .areas-grid або .features-grid) */
    /* Якщо у вашому коді клас називається інакше, змініть .areas-grid на ваш клас */
    .areas-grid, .feature-icons {
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important; /* Центрує елементи в рядках */
        gap: 20px !important;
    }

    /* Робимо так, щоб елементи займали приблизно половину ширини екрана (мінус відступи) */
    .area-item, .feature-item {
        flex: 0 1 calc(50% - 10px) !important;
        min-width: 140px !important; /* Щоб іконки не стискалися занадто сильно */
    }
    
    /* Contact Section */
    .footer-contact {
        flex-direction: column;
        gap: 30px;
        padding: 50px 6%;
    }

    .contact-info a,
    .contact-info p {
        font-size: 0.9rem;
    }

    .cta-area h3 {
        font-size: 1.2rem;
    }
    
    /* Gallery Grid Page */
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .gallery-grid img {
        height: 180px;
    }
    
    .about-container {
        flex-direction: column !important;
        gap: 30px !important;
    }
    
    .about-text {
        width: 100% !important;
        text-align: center !important;
    }
    
    .about-image {
        width: 100% !important;
    }
    
    .about-image img, 
    .image-placeholder {
        max-width: 100% !important;
        height: auto !important;
        margin: 0 auto !important;
    }
}

/* --- Small Mobile (max 480px) --- */
@media (max-width: 480px) {

    .hero h1 {
        font-size: 2rem;
    }

    .hero .subtitle {
        font-size: 0.9rem;
    }

    /* Feature icons: 2 columns */
    .feature-icons {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
        padding: 24px 16px;
    }

    /* Areas: 2 columns */
    .areas-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .area-item img {
        width: 44px;
        height: 44px;
    }

    .scroll-gallery img {
        height: 180px;
    }

    .scroll-gallery video {
        height: 180px;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .gallery-grid img {
        height: 140px;
    }

    nav a {
        font-size: 0.7rem;
        padding: 5px 8px;
    }
}