/* ----- Cross-browser compatible reset ----- */
html, body, div, span, h1, h2, h3, p, a, ul, li, img,
header, nav, main, section, article, footer, form,
input, textarea, button, canvas, table, thead, tbody, tr, th, td {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
    box-sizing: border-box;
}

/* ----- Base styles with fallbacks ----- */
html, body {
    height: 100%;
}

body {
    min-height: 100vh;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    background: #f4f4f4;
    color: #264653;
}

main {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
}

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

h1, h2, h3 {
    font-weight: 700;
    padding: 0.5rem 0;
}

/* ----- Header with proper alignment ----- */
.header {
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 0.5rem 0;
}

.header .container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-wrap: nowrap;
    flex-wrap: nowrap;
}

.logo {
    font-size: 1.3rem;
    color: #2a9d8f;
    font-weight: 700;
    -webkit-box-flex: 0;
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
}

/* ----- Navigation - FIXED TEXT WRAPPING ----- */
.nav-list {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list li {
    margin: 0 0.25rem;
    -webkit-box-flex: 0;
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
}

.nav-list a {
    color: #264653;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    display: block;
    white-space: nowrap; /* PREVENTS TEXT WRAPPING */
    font-size: 0.9rem;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -ms-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

.nav-list a:hover,
.nav-list a.active {
    color: #2a9d8f;
    background: rgba(42, 157, 143, 0.1);
}

/* ----- Hamburger menu ----- */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.hamburger span {
    width: 24px;
    height: 3px;
    background: #264653;
    margin: 2px 0;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -ms-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}

/* ----- Hero section ----- */
.hero {
    background: url('../img/hero.jpg') center center;
    background-size: cover;
    height: 50vh;
    max-height: 460px;
    min-height: 320px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    color: #fff;
    text-align: center;
}

.hero__content {
    background: rgba(0, 0, 0, 0.4);
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    margin: 0 1rem;
}

.hero__content h2 {
    font-size: 1.9rem;
    margin-bottom: 0.5rem;
}

.hero__content p {
    font-size: 1rem;
    margin-bottom: 1rem;
}

.hero__content .btn-group {
    margin-top: 0.5rem;
}

@media (min-width: 992px) {
    .hero {
        height: 45vh;
    }

    .hero__content {
        max-width: 540px;
        padding: 1.75rem 2rem;
    }

    .hero__content h2 {
        font-size: 1.8rem;
    }

    .hero__content p {
        font-size: 0.98rem;
    }
}

/* ----- Buttons ----- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    margin: 0.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    -webkit-transition: opacity 0.3s ease;
    -moz-transition: opacity 0.3s ease;
    -ms-transition: opacity 0.3s ease;
    -o-transition: opacity 0.3s ease;
    transition: opacity 0.3s ease;
}

.btn.primary {
    background: #2a9d8f;
    color: #fff;
}

.btn.secondary {
    background: #fff;
    color: #2a9d8f;
    border: 2px solid #2a9d8f;
}

.btn:hover {
    opacity: 0.9;
}

/* ----- Cards and layouts ----- */
.flex {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    margin: -0.5rem;
}

.card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 0.5rem;
    -webkit-box-flex: 1;
    -ms-flex: 1 1 260px;
    flex: 1 1 260px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card img {
    width: 100%;
    height: 150px;
    -o-object-fit: cover;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Fallback for browsers without object-fit */
.card img {
    background-size: cover;
    background-position: center;
}


/* ----- About / Team section ----- */
.about-layout {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -ms-flex-direction: row;
    flex-direction: row;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 1.5rem;
}

.about-text {
    -webkit-box-flex: 2;
    -ms-flex: 2 1 320px;
    flex: 2 1 320px;
}

.about-text h2,
.about-text h3 {
    margin-top: 0;
}

.about-highlight {
    background: #e9f7f5;
    border-left: 4px solid #2a9d8f;
    padding: 1rem 1.25rem;
    border-radius: 6px;
    margin: 1rem 0 1.5rem;
}

.about-meta {
    font-size: 0.95rem;
    color: #555;
}

.about-meta strong {
    color: #264653;
}

.about-side {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 260px;
    flex: 1 1 260px;
}

.about-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.about-card h3 {
    margin-top: 0;
}

.about-tagline {
    font-style: italic;
    color: #555;
    margin-bottom: 1rem;
}

.about-bullets {
    margin-top: 1rem;
    padding-left: 1.25rem;
}

.about-bullets li {
    margin-bottom: 0.35rem;
}

@media (max-width: 768px) {
    .about-layout {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
    }
}

.qr-section {
    padding: 1.5rem 0 2.5rem;
    text-align: center;
}

.qr-section p {
    max-width: 420px;
    margin: 0.25rem auto 0.75rem;
    color: #555;
    font-size: 0.96rem;
}

.qr-image {
    max-width: 220px;
    width: 60%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

@media (max-width: 768px) {
    .qr-section {
        padding: 1.75rem 0 2.5rem;
    }

    .qr-image {
        width: 70%;
        max-width: 260px;
    }
}


/* ----- Sections spacing ----- */
.highlight {
    padding: 3rem 0;
}

.call {
    padding: 2rem 0;
    text-align: center;
}

.recent-activities {
    padding: 2rem 0 3rem;
}

.recent-activities h2 {
    margin-bottom: 1.5rem;
}

.activity-card {
    position: relative;
}

.activity-date {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.activity-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #2a9d8f;
    font-weight: 600;
}

.activity-link:hover {
    text-decoration: underline;
}



.home-section-title {
    text-align: center;
    margin-bottom: 0.25rem;
}

.home-section-subtitle {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 2rem;
    color: #555;
    font-size: 0.98rem;
}

.stats {
    text-align: center;
}

/* ----- Stats counters ----- */
.stats h3 {
    font-size: 2rem;
    color: #2a9d8f;
    margin-bottom: 0.5rem;
}

/* ----- Forms ----- */
form {
    max-width: 500px;
}

label {
    display: block;
    margin: 1rem 0 0.5rem 0;
    font-weight: 600;
}

input, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

input:focus, textarea:focus {
    border-color: #2a9d8f;
    outline: none;
}

/* ----- Tables ----- */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background: #f8f9fa;
    font-weight: 600;
}


/* ----- Before / After showcase ----- */
.before-after-intro {
    max-width: 800px;
    margin-bottom: 2rem;
}

.before-after-grid {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 2rem;
}

.before-after-item {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.before-after-header h3 {
    margin-bottom: 0.25rem;
}

.before-after-header p {
    font-size: 0.95rem;
    color: #555;
}

.before-after-images {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.before-after-col {
    -webkit-box-flex: 1;
    -ms-flex: 1 1 260px;
    flex: 1 1 260px;
}

.before-after-label {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #888;
    margin-bottom: 0.5rem;
}

.before-after-col img {
    width: 100%;
    height: 220px;
    -o-object-fit: cover;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.before-after-caption {
    font-size: 0.9rem;
    color: #555;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .before-after-item {
        padding: 1rem;
    }

    .before-after-images {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
    }

    .before-after-col img {
        height: 200px;
    }
}

/* ----- Footer ----- */
/* ----- Footer ----- */
.footer {
    padding: 2rem 1rem;
    text-align: center;
    background: #fff;
    border-top: 1px solid #ddd;
    margin-top: 2rem;
}

.footer .container {
    max-width: 900px;
    margin: 0 auto;
}

.footer p {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: #555;
}

/* ----- Social media ----- */
.social-media h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: #f5f5f5;
    border-radius: 50%;
    color: #333;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #0077b6; /* синьо за hover */
    color: #fff;
    transform: translateY(-3px);
}


/* ----- Mobile styles - FIXED MENU WRAPPING ----- */
@media (max-width: 768px) {
    .container {
        padding: 0 0.75rem;
    }

    .header .container {
        padding: 0 1rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    /* Mobile navigation - prevents text wrapping */
    .nav-list {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        background: #fff;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        -webkit-transform: translateY(-100%);
        -moz-transform: translateY(-100%);
        -ms-transform: translateY(-100%);
        -o-transform: translateY(-100%);
        transform: translateY(-100%);
        -webkit-transition: transform 0.3s ease;
        -moz-transition: transform 0.3s ease;
        -ms-transition: transform 0.3s ease;
        -o-transition: transform 0.3s ease;
        transition: transform 0.3s ease;
        padding: 1rem;
        opacity: 0;
        visibility: hidden;
    }

    .nav-list.active {
        -webkit-transform: translateY(0);
        -moz-transform: translateY(0);
        -ms-transform: translateY(0);
        -o-transform: translateY(0);
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav-list li {
        margin: 0;
        width: 100%;
    }

    /* Mobile menu links - fixed text wrapping */
    .nav-list a {
        display: block;
        padding: 1rem;
        border-bottom: 1px solid #eee;
        white-space: nowrap; /* PREVENTS TEXT WRAPPING ON MOBILE */
        overflow: hidden;
        text-overflow: ellipsis; /* Shows "..." if text is too long */
        font-size: 1rem; /* Slightly larger font on mobile */
    }

    .hamburger {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
    }

    .hero {
        height: 50vh;
        padding: 1rem;
    }

    .hero__content {
        padding: 1.5rem;
    }

    .flex {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
    }

    .card {
        margin: 0.5rem 0;
    }

    .btn {
        display: block;
        margin: 0.5rem 0;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }

    /* Home page spacing & typography on mobile */
    .hero__content h2 {
        font-size: 1.5rem;
    }

    .hero__content p {
        font-size: 0.96rem;
    }

    .highlight {
        padding: 2.25rem 0 2.5rem;
        margin-top: 1.5rem;
    }

    .home-section-title {
        font-size: 1.35rem;
        margin-bottom: 0.5rem;
    }

    .home-section-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.75rem;
    }

    .recent-activities {
        padding: 1.75rem 0 2.5rem;
    }

    .call {
        padding: 2rem 0 2.5rem;
    }

}

/* ----- Tablet adjustments - PREVENTS WRAPPING ON MEDIUM SCREENS ----- */
@media (max-width: 1024px) and (min-width: 769px) {
    .nav-list a {
        padding: 0.5rem 0.5rem;
        font-size: 0.85rem;
    }
}

/* ----- Small mobile adjustments ----- */
@media (max-width: 480px) {
    .container {
        padding: 0 0.5rem;
    }

    .hero__content {
        padding: 1rem;
    }

    .card {
        padding: 1rem;
    }

    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .nav-list a {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
}
.socials {
    display: flex;
    gap: 15px; /* space between icons */
    flex-wrap: wrap; /* wrap links on smaller screens */
    margin-top: 10px;
}

.socials a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px; /* space between icon and text */
    transition: color 0.3s ease;
}

.socials a:hover {
    color: #0056b3;
}

.socials i {
    font-size: 1.2em;
}
