:root {
    --primary-color: #005A9C;
    --secondary-color: #00BFFF;
    --dark-color: #2c3e50;
    --light-color: #ffffff;
    --gray-bg: #f4f7f6;
    --transition-speed: 0.3s;

    /* Sticky header: solid bar when scrolled (matches previous opaque header tint). */
    --header-solid-bg: rgba(51, 117, 176, 0.98);
    --header-shadow-scrolled: 0 10px 32px rgba(15, 23, 42, 0.14);
    --header-transition-duration: 0.4s;
    --header-shadow-transition-duration: 0.55s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark-color);
    line-height: 1.6;
}

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

h1, h2, h3 {
    line-height: 1.2;
    margin-bottom: 20px;
    font-weight: 700;
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 60px;
}

section {
    padding: 80px 0;
}

.header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background-color: transparent;
    box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    transition:
        background-color var(--header-transition-duration) ease,
        box-shadow var(--header-shadow-transition-duration) ease;
}

.header.header--scrolled {
    background-color: var(--header-solid-bg);
    box-shadow: var(--header-shadow-scrolled);
}

/* Contrast on bright hero imagery when the bar is still transparent. */
.header:not(.header--scrolled) .navigation a,
.header:not(.header--scrolled) .lang-switcher a {
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.35);
}

@media (prefers-reduced-motion: reduce) {
    .header {
        transition-duration: 0.01ms;
    }

    .hero-parallax {
        animation: none !important;
        transform: none !important;
    }
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    font-size: 1rem;
    padding: 5px 0;
    color: var(--primary-color);
    text-decoration: none;
}

.logo img {
    height: 60px;
    width: auto;
    vertical-align: middle;
}

.navigation a,
.lang-switcher a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-speed);
}

.navigation a {
    margin: 0 15px;
}

.navigation a:hover,
.lang-switcher a.active {
    color: var(--secondary-color);
}

.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light-color);
    overflow: hidden;
}

/* Extra area so translateY parallax does not show edges while the hero drifts during scroll. */
.hero-parallax {
    position: absolute;
    left: 0;
    width: 100%;
    top: -18%;
    height: 136%;
    background-image: url('../assets/background_main.jpg');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    will-change: transform;
    z-index: 0;
}

@keyframes hero-parallax-scroll {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(0, 42vh, 0);
    }
}

/* Use browser-driven scroll animation when available to keep the parallax tied to scroll. */
@supports (animation-timeline: scroll()) {
    .hero-parallax {
        animation-name: hero-parallax-scroll;
        animation-duration: 1s;
        animation-timing-function: linear;
        animation-fill-mode: both;
        animation-timeline: scroll(root block);
        animation-range: 0 100vh;
    }
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.05));
}

.hero-container {
    position: relative;
    z-index: 2;
}

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

.hero p {
    font-size: 1.6rem;
    max-width: 700px;
    margin: 0 auto 40px;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.7);
}

.services-section {
    background-color: var(--gray-bg);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    text-align: center;
}

.service-card {
    background-color: var(--light-color);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: 100%;
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.service-card i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
}

.service-card h3 {
    color: var(--primary-color);
}

.service-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.service-card-link:hover .service-card {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.about-section {
    background-color: var(--primary-color);
    color: var(--light-color);
    text-align: center;
}

.about-section h2 {
    color: var(--light-color);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.about-number {
    font-size: 3.5rem;
    font-weight: 700;
}

.projects-section {
    background-color: var(--gray-bg);
}

.scroll-container {
    overflow-x: auto;
    padding-bottom: 20px;
}

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

.scroll-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.scroll-container::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 10px;
}

.scroll-container::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

.projects-grid-scrollable {
    display: flex;
    flex-wrap: nowrap;
    gap: 30px;
    padding: 10px 0;
}

.projects-grid-scrollable .project-card {
    flex: 0 0 350px;
    height: 450px;
}

.project-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.project-card img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
    height: 100%;
    object-fit: cover;
}

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

.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: var(--light-color);
    padding: 40px 20px 20px;
}

.project-info h3 {
    margin: 0;
}

.more-projects-link {
    text-align: center;
    margin-top: 60px;
}

.detailed-info-section {
    padding: 80px 0;
    background-color: var(--light-color);
}

.section-title {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 60px;
}

.section-title h2 {
    margin-bottom: 15px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.7;
}

.info-block {
    display: flex;
    gap: 50px;
    align-items: flex-start;
    margin-bottom: 80px;
}

.info-block.reverse {
    flex-direction: row-reverse;
}

.info-image {
    width: 350px;
    height: 350px;
    flex-shrink: 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(44, 62, 80, 0.15);
}

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

.info-text {
    flex-grow: 1;
    flex-basis: 0;
}

.info-text i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.info-text h3 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.info-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
}

.info-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 700;
    transition: letter-spacing var(--transition-speed);
}

.info-link:hover {
    letter-spacing: 0.5px;
}

.info-title-link {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-speed);
}

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

.info-title-link h3 {
    margin-bottom: 15px;
}

.values-section {
    padding: 80px 0;
    background-color: #ffffff;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    text-align: center;
}

.value-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.value-card h4 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.cta-section {
    background-color: var(--gray-bg);
}

.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.contact-card {
    background: var(--light-color);
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 5px 25px rgba(0,0,0,0.07);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.contact-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.contact-card h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.contact-card p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
}

.contact-card a, .contact-card span {
    display: block;
    color: var(--dark-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    line-height: 1.6;
}

.contact-card a:hover {
    color: var(--primary-color);
}

.video-section {
    background-color: #ffffff;
}

.video-wrapper {
    max-width: 960px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(44, 62, 80, 0.15);
}

.video-wrapper video {
    width: 100%;
    height: auto;
    display: block;
}

.footer {
    background-color: #2c3e50;
    color: #bdc3c7;
    padding: 60px 0 0;
}

.footer-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 45px;
    padding-bottom: 50px;
}

.footer-col-about {
    max-width: 350px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
    margin-bottom: 15px;
    display: inline-block;
}

.footer-about {
    font-size: 0.9rem;
    line-height: 1.7;
}

.footer-col h4 {
    font-size: 1.2rem;
    color: #ffffff;
    margin-bottom: 25px;
    font-weight: 500;
}

.footer-links, .footer-contacts {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-contacts li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.footer-contacts i {
    color: var(--secondary-color);
    font-size: 1rem;
    margin-top: 5px;
    flex-shrink: 0;
}

.footer-links a, .footer-contacts a, .footer-contacts span {
    color: #bdc3c7;
    text-decoration: none;
    transition: color var(--transition-speed);
    line-height: 1.6;
}

.footer-links a:hover, .footer-contacts a:hover {
    color: #ffffff;
}

.footer-bottom {
    padding: 25px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    color: #8a99a8;
    font-size: 0.9rem;
}

.page-header {
    position: relative;
    padding: 160px 0 100px;
    text-align: center;
    color: var(--light-color);
    background-size: cover;
    background-position: center;
}

.page-header h1 {
    font-size: 3rem;
}

.page-header p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

.pools-header, .fountains-header, .water-treatment-header {
    position: relative;
}

.pools-header .hero-overlay,
.fountains-header .hero-overlay,
.water-treatment-header .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.25);
    z-index: 0;
}

.pools-header .container,
.fountains-header .container,
.water-treatment-header .container {
    position: relative;
    z-index: 1;
}

.pools-header {
    /* background-image: url('../assets/background_fontan.jpg'); */
    background: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.05)), url('../assets/background_pool_002.png') no-repeat center center/cover;
}

.fountains-header {
    background-image: url('../assets/fontan_005.jpg');
}

.water-treatment-header {
    background-image: url('../assets/vodoochistka_001.jpg');
}

.intro-section {
    background: var(--light-color);
    padding: 60px 0;
}

.text-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
}

.services-detailed-section {
    background-color: var(--gray-bg);
}

.services-detailed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
}

.service-detailed-card {
    background: var(--light-color);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.service-detailed-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.service-detailed-card i {
    font-size: 3rem;
    margin-bottom: 20px;
    color: var(--primary-color);
    width: 64px;
    text-align: center;
}

.service-detailed-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.service-detailed-card p {
    font-size: 0.95rem;
}

.gallery-section {
    padding: 80px 0;
    background: var(--light-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    position: relative;
    z-index: 1100;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--light-color);
    margin: 5px 0;
    transition: var(--transition-speed);
}

@media(max-width: 900px) {
    .cta-container {
        flex-direction: column;
        text-align: center;
    }

    .cta-text h2 {
        text-align: center;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .footer-top, .footer-bottom, .footer-contacts {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

@media(max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .navigation {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: rgba(51, 117, 176, 0.98);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding-top: 80px;
        transition: right 0.5s;
        z-index: 1000;
        box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    }

    .navigation.active {
        right: 0;
    }

    .navigation a {
        margin: 0;
        padding: 15px 20px;
        font-size: 1.1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: left;
        display: block;
        width: 100%;
    }

    .lang-switcher {
        position: static;
        margin-top: auto;
        padding: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        background-color: rgba(0, 0, 0, 0.1);
        display: flex;
        justify-content: center;
    }

    .lang-switcher a {
        padding: 0 10px;
    }

    h1 {
        font-size: 2.5rem;
    }

    /* .hero h1 beats bare h1 specificity; scale down for narrow viewports. */
    .hero h1 {
        font-size: 1.85rem;
        line-height: 1.2;
        margin-bottom: 14px;
    }

    .hero p {
        font-size: 1.05rem;
        line-height: 1.55;
        margin-bottom: 24px;
    }

    h2 {
        font-size: 2rem;
    }

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

    .info-block, .info-block.reverse {
        flex-direction: column;
        gap: 30px;
        align-items: center;
        text-align: center;
    }

    .info-block {
        margin-bottom: 60px;
    }

    .info-text h2 {
        text-align: center;
    }

    .page-header {
        padding: 120px 0 80px;
    }

    .page-header h1 {
        font-size: 2.2rem;
    }

    .footer-content {
        flex-direction: column;
        gap: 20px;
    }

    .info-image {
        width: 100%;
        height: 250px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }

    .hero p {
        font-size: 0.95rem;
    }
}