:root {
    --page-accent: #0e766f;
}

.subpage-hero {
    --subpage-position: center;
}

.subpage-hero .container {
    transform: translateY(-50px);
}

/* Intro Block */
.intro-block {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.intro-block .section-title {
    margin-top: 16px;
}

/* Reduce padding for intro section to make it more compact */
.section:first-of-type {
    padding-top: clamp(40px, 5vw, 64px);
    padding-bottom: clamp(32px, 4vw, 48px);
}

/* Products Grid */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 32px;
    margin-top: 32px;
}

.product-summary-card {
    background: var(--color-surface);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.product-summary-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 60px rgba(10, 48, 56, 0.16);
}

/* Card Visual */
.card-visual {
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.card-visual-teal {
    background: linear-gradient(135deg, #147c93 0%, #0e766f 100%);
}

.card-visual-green {
    background: linear-gradient(135deg, #2f7d55 0%, #236344 100%);
}

.card-visual-lime {
    background: linear-gradient(135deg, #6d8f32 0%, #5a7a2a 100%);
}

.card-visual-cyan {
    background: linear-gradient(135deg, #0f8a8a 0%, #0c6e6e 100%);
}

.card-visual-gold {
    background: linear-gradient(135deg, #a66c17 0%, #8a5a12 100%);
}

.card-icon {
    width: 64px;
    height: 64px;
    color: rgba(255, 255, 255, 0.95);
}

.card-icon svg {
    width: 100%;
    height: 100%;
}

/* Card Content */
.card-content {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-badge {
    display: inline-block;
    padding: 6px 14px;
    background: var(--color-surface-soft);
    color: var(--color-brand);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 16px;
    align-self: flex-start;
}

.card-content h3 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--color-ink);
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.card-description {
    color: var(--color-muted);
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Card Features */
.card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.card-features li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 10px;
    color: var(--color-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.card-features li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: var(--page-accent);
    font-weight: 700;
    font-size: 0.85rem;
}

.card-features li:last-child {
    margin-bottom: 0;
}

/* Card Link */
.card-link {
    display: inline-flex;
    align-items: center;
    color: var(--page-accent);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    margin-top: auto;
    transition: color 0.2s ease;
}

.card-link:hover {
    color: var(--color-brand-deep);
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 28px;
    margin-top: 32px;
}

.benefit-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 32px 24px;
    background: var(--color-surface-soft);
    border-radius: var(--radius-card);
    transition: background 0.3s ease;
}

.benefit-item:hover {
    background: #e8f4f3;
}

.benefit-icon {
    width: 48px;
    height: 48px;
    background: var(--page-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.benefit-item h3 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-ink);
    margin: 0 0 12px 0;
}

.benefit-item p {
    color: var(--color-muted);
    line-height: 1.6;
    margin: 0;
    font-size: 0.9rem;
}

/* Gallery Section */
.gallery-section {
    padding: clamp(32px, 4vw, 56px) 0;
}

/* Reduce padding for products section to make it more compact */
.section-soft {
    padding-top: clamp(32px, 4vw, 56px);
    padding-bottom: clamp(40px, 5vw, 64px);
}

/* Reduce padding for benefits section to make it more compact */
.section:last-of-type {
    padding-top: clamp(32px, 4vw, 56px);
    padding-bottom: clamp(40px, 5vw, 64px);
}

.gallery-container {
    max-width: 1180px;
    margin: 0 auto;
}

/* Gallery Main Image */
.gallery-main {
    position: relative;
    width: 100%;
    margin-bottom: 24px;
}

.gallery-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: var(--color-surface-soft);
    border-radius: var(--radius-card);
    overflow: hidden;
}

.gallery-image-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s ease;
    z-index: 5;
}

.gallery-image-wrapper.transitioning::before {
    opacity: 1;
    animation: shimmer 1.5s ease-out;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) skewX(-15deg);
    }
    100% {
        transform: translateX(200%) skewX(-15deg);
    }
}

.gallery-main-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1),
                transform 1.2s cubic-bezier(0.4, 0, 0.2, 1),
                filter 1.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    will-change: opacity, transform, filter;
}

.gallery-main-image.loading {
    opacity: 0.5;
    transform: scale(1.02);
    filter: blur(2px);
}

.gallery-main-image.fade-out {
    opacity: 0;
    transform: scale(0.98);
    filter: blur(4px);
}

/* Gallery Counter */
.gallery-counter {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    z-index: 10;
}

/* Gallery Navigation Buttons */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--color-ink);
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-nav:hover {
    background: white;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    transform: translateY(-50%) scale(1.05);
}

.gallery-nav:active {
    transform: translateY(-50%) scale(0.95);
}

.gallery-nav-prev {
    left: 16px;
}

.gallery-nav-next {
    right: 16px;
}

.gallery-nav svg {
    width: 20px;
    height: 20px;
}

/* Gallery Thumbnails */
.gallery-thumbnails {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding: 8px 4px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--color-line) transparent;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.gallery-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: transparent;
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background: var(--color-line);
    border-radius: 3px;
}

.gallery-thumbnails::-webkit-scrollbar-thumb:hover {
    background: var(--color-muted);
}

.gallery-thumbnail {
    flex-shrink: 0;
    width: 120px;
    height: 68px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.5;
    position: relative;
    transform: scale(1);
}

.gallery-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--page-accent);
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.gallery-thumbnail:hover {
    opacity: 0.75;
    transform: scale(1.03);
}

.gallery-thumbnail.active {
    opacity: 1;
    border-color: var(--page-accent);
    transform: scale(1.08);
    box-shadow: 0 4px 12px rgba(14, 118, 111, 0.3);
}

.gallery-thumbnail.active::after {
    opacity: 0.15;
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

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

.gallery-lightbox.active {
    display: flex;
    opacity: 1;
}

.gallery-lightbox-image {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-card);
}

.gallery-lightbox-close {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
}

.gallery-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.gallery-lightbox-close svg {
    width: 24px;
    height: 24px;
}

.gallery-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: white;
    transition: all 0.3s ease;
}

.gallery-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-50%) scale(1.1);
}

.gallery-lightbox-nav svg {
    width: 28px;
    height: 28px;
}

.gallery-lightbox-prev {
    left: 24px;
}

.gallery-lightbox-next {
    right: 24px;
}

/* Responsive */
@media (max-width: 920px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .gallery-nav {
        width: 40px;
        height: 40px;
    }

    .gallery-nav-prev {
        left: 12px;
    }

    .gallery-nav-next {
        right: 12px;
    }

    .gallery-thumbnail {
        width: 100px;
        height: 56px;
    }
}

@media (max-width: 640px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card-content {
        padding: 24px 20px;
    }

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

    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .benefit-item {
        padding: 24px 20px;
    }

    .gallery-section {
        padding: 32px 0;
    }

    .gallery-image-wrapper {
        aspect-ratio: 16 / 9;
    }

    .gallery-nav {
        width: 36px;
        height: 36px;
    }

    .gallery-nav svg {
        width: 16px;
        height: 16px;
    }

    .gallery-counter {
        bottom: 12px;
        right: 12px;
        padding: 6px 12px;
        font-size: 0.75rem;
    }

    .gallery-thumbnail {
        width: 80px;
        height: 45px;
    }

    .gallery-lightbox-close,
    .gallery-lightbox-nav {
        width: 44px;
        height: 44px;
    }

    .gallery-lightbox-nav svg {
        width: 24px;
        height: 24px;
    }

    .gallery-lightbox-close {
        top: 16px;
        right: 16px;
    }

    .gallery-lightbox-prev {
        left: 16px;
    }

    .gallery-lightbox-next {
        right: 16px;
    }
}

@media (orientation: portrait) and (max-width: 640px) {
    .subpage-hero .container {
        transform: translateY(0);
    }

    .subpage-hero-copy {
        transform: translateY(-50px);
    }
}
