/* === CSS Variables === */
:root {
    --primary: #00c2a8;
    --primary-dark: #008f7d;
    --primary-light: #8fe9dc;
    --accent: #ff6b6b;
    --accent-dark: #e55555;
    --text: #333333;
    --text-light: #666666;
    --text-white: #ffffff;
    --bg: #ffffff;
    --bg-light: #f5f7fa;
    --bg-dark: #1a1a2e;
    --border: #e0e0e0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.15);
    --radius: 16px;
    --radius-sm: 10px;
    --transition: all 0.3s ease;
    --max-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    padding-top: 0;
    padding-bottom: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

a:hover {
    color: var(--primary-dark);
}

/* === Gallery Styles === */

.t156__item {
    position: relative;
    overflow: hidden;
}

.t-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.t-img:hover {
    transform: scale(1.03);
}

/* === Zoom Styles === */
.t-zoomable {
    cursor: zoom-in;
}

select#phoneCode {
    width: 120px;
}

/* === Lightbox Styles === */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* === Header === */
.header {
    background: var(--bg);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 4000;
    transition: var(--transition);
}

.header-inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    flex-shrink: 0;
}

.logo-img {
    height: 50px;
    width: auto;
}

.header-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-phone {
    color: var(--primary);
    font-weight: 700;
    font-size: 16px;
    white-space: nowrap;
}

.header-social {
    display: flex;
    gap: 10px;
}

.social-link {
    color: var(--text-light);
    transition: var(--transition);
    display: flex;
    align-items: center;
}

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

.cta-button {
    background: var(--accent);
    color: var(--text-white);
    border: none;
    padding: 10px 24px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    font-size: 14px;
}

.cta-button:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    transition: var(--transition);
}

.header-nav {
    max-width: var(--max-width);
    margin: 0 auto;
    border-top: 1px solid var(--border);
    padding: 0 20px;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 0;
    overflow-x: auto;
}

.nav-item {
    position: relative;
}

.nav-link {
    display: block;
    padding: 12px 20px;
    color: var(--text);
    font-weight: 600;
    font-size: 14px;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    transition: var(--transition);
}

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

/* === Mobile menu backdrop (hidden by default / desktop) === */
.menu-backdrop {
    display: none;
}

/* === Hero Section === */
.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    margin-top: 110px;
    overflow: hidden;
    z-index: 2000;
    background: linear-gradient(135deg, #e8f8fc 0%, #c8eef8 30%, #a8e4f6 60%, #88daf0 100%);
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 600px 400px at 20% 50%, rgba(255, 255, 255, 0.3) 0%, transparent 70%),
        radial-gradient(ellipse 400px 300px at 80% 30%, rgba(0, 180, 216, 0.1) 0%, transparent 70%),
        radial-gradient(ellipse 500px 350px at 50% 80%, rgba(0, 119, 182, 0.08) 0%, transparent 70%);
    z-index: 1;
}

.hero::after {
    content: "";
    position: absolute;
    width: 350px;
    height: 350px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
    top: -80px;
    right: -80px;
    z-index: 1;
    animation: heroFloat 12s ease-in-out infinite;
    pointer-events: none;
}

@keyframes heroFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(-30px, 20px) scale(1.05);
    }

    66% {
        transform: translate(20px, -15px) scale(0.95);
    }
}

.hero-decor-1 {
    position: absolute;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    bottom: 10%;
    left: 5%;
    z-index: 1;
    animation: heroFloat2 10s ease-in-out infinite;
    pointer-events: none;
}

.hero-decor-2 {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.15);
    top: 20%;
    right: 15%;
    z-index: 1;
    animation: heroFloat3 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes heroFloat2 {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(25px, -20px);
    }
}

@keyframes heroFloat3 {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    50% {
        transform: translate(-15px, 15px) rotate(180deg);
    }
}

.hero-cross {
    position: absolute;
    width: 40px;
    height: 40px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.12;
    animation: heroFloat 15s ease-in-out infinite;
}

.hero-cross::before,
.hero-cross::after {
    content: "";
    position: absolute;
    background: white;
    border-radius: 3px;
}

.hero-cross::before {
    width: 14px;
    height: 40px;
    left: 13px;
    top: 0;
}

.hero-cross::after {
    width: 40px;
    height: 14px;
    left: 0;
    top: 13px;
}

.hero-cross-1 {
    top: 15%;
    left: 8%;
    animation-delay: -3s;
}

.hero-cross-2 {
    bottom: 20%;
    right: 10%;
    animation-delay: -7s;
    animation-duration: 18s;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 60px 20px;
    color: var(--text);
    width: 100%;
}

.hero-content h1 {
    font-size: 2.6rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--primary-dark);
    max-width: 780px;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 550px;
    color: var(--text-light);
}

.hero-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-white);
    border-color: var(--primary);
}

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

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--text-white);
}

.btn-outline-light {
    background: transparent;
    color: var(--text-white);
    border-color: var(--text-white);
}

.btn-outline-light:hover {
    background: var(--text-white);
    color: var(--primary);
}

.btn-accent {
    background: var(--accent);
    color: var(--text-white);
    border-color: var(--accent);
}

.btn-accent:hover {
    background: var(--accent-dark);
    border-color: var(--accent-dark);
    color: var(--text-white);
    transform: translateY(-2px);
}

.btn-large {
    padding: 16px 40px;
    font-size: 1.1rem;
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    pointer-events: none;
}

/* === Form Success/Error States === */
.form-success {
    text-align: center;
    padding: 40px 0;
}

.form-success h3 {
    color: var(--primary);
    margin-bottom: 15px;
}

.form-error {
    background: #ffe0e0;
    color: #d32f2f;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 18px;
    text-align: center;
    font-size: 0.9rem;
    animation: fadeIn 0.3s ease;
}

/* === Hero Features === */
.hero-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 100px;
}

.feature {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(0, 180, 216, 0.1);
}

.feature:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
}

.feature h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--primary-dark);
}

.feature p {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* === Section Common === */
.section-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--primary-dark);
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 36px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

/* === Services Grid === */
.services-section {
    padding: 60px 0;
    background: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.service-card {
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: block;
    position: relative;
    overflow: hidden;
    border: none;
    color: #fff;
}

.service-card:nth-child(1) {
    background: linear-gradient(135deg, #48cae4 0%, #00b4d8 100%);
    color: #fff;
}

.service-card:nth-child(2) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #0a3d2a;
}

.service-card:nth-child(3) {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
    color: #3a1a5c;
}

.service-card:nth-child(4) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #5c1a2a;
}

.service-card:nth-child(5) {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #5c3a1a;
}

.service-card:nth-child(6) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #0d3b66;
}

.service-card:nth-child(7) {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #5c2a00;
}

.service-card:nth-child(8) {
    background: linear-gradient(135deg, #a1c4fd 0%, #c2e9fb 100%);
    color: #1a2a4c;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.35);
    color: inherit;
}

.service-card h3 {
    color: inherit;
    font-size: 1.05rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.service-card p {
    color: inherit;
    opacity: 0.85;
    font-size: 0.85rem;
    line-height: 1.4;
}

/* === About Section === */
.about-section {
    padding: 60px 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-image img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

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

.about-text p {
    margin-bottom: 14px;
}

.specialists-list {
    list-style: disc;
    padding-left: 20px;
    margin-top: 10px;
}

.specialists-list li {
    margin-bottom: 4px;
}

.btn-read-more {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    padding: 10px 0;
    font-size: 1rem;
    transition: var(--transition);
}

.btn-read-more:hover {
    color: var(--primary-dark);
}

/* === Why Section === */
.why-section {
    padding: 60px 0;
    background: var(--bg-light);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.why-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 28px 20px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.why-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.why-icon {
    font-size: 2.5rem;
    margin-bottom: 14px;
}

.why-card h3 {
    font-size: 1rem;
    color: var(--primary-dark);
    margin-bottom: 8px;
}

.why-card p {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* === Doctors Section === */
.doctors-section {
    padding: 60px 0;
}

.doctors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 36px;
}

.doctor-card {
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
}

.doctor-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.doctor-image {
    min-height: 320px;
    height: auto;
    overflow: hidden;
    background: var(--bg-light);
}

.doctor-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    transition: var(--transition);
}

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

.doctor-info {
    padding: 18px;
}

.doctor-info h3 {
    color: var(--primary-dark);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.doctor-info p {
    color: var(--text-light);
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.doctor-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
}

.reviews-carousel {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.review-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.review-card p {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 18px;
    line-height: 1.7;
}

.review-author {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.stars {
    color: #ffc107;
}

/* === Clinics Section === */
.clinics-section {
    padding: 60px 0;
    background: var(--bg-light);
}

/* === Clinic Maps (expandable) === */
.clinic-map {
    margin-top: 16px;
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

.clinic-map-toggle {
    cursor: pointer;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: underline;
    padding: 4px 0;
    user-select: none;
}

.clinic-map-toggle:hover {
    color: var(--accent-dark);
}

.clinic-map-wrapper {
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.clinic-map-wrapper iframe {
    display: block;
    width: 100%;
}


/* === Clinic Maps (stacked, on "О клинике" page) === */
.clinics-block {
    margin: 30px 0;
}

.clinic-block {
    margin-bottom: 32px;
}

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

.clinic-block-title {
    color: var(--primary-dark);
    margin: 0 0 6px;
    font-size: 1.15rem;
}

.clinic-block-address {
    margin: 0 0 10px;
    color: var(--text);
}

.clinics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.clinic-card {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.clinic-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.clinic-card h3 {
    color: var(--primary-dark);
    margin-bottom: 16px;
    font-size: 1.2rem;
}

.clinic-card p {
    color: var(--text-light);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

/* === CTA Section === */
.cta-section {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--text-white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
    top: -100px;
    left: -100px;
    z-index: 1;
    animation: ctaFloat 14s ease-in-out infinite;
    pointer-events: none;
}

@keyframes ctaFloat {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(30px, 25px) scale(1.1);
    }
}

.cta-decor-cross {
    position: absolute;
    width: 30px;
    height: 30px;
    z-index: 1;
    pointer-events: none;
    opacity: 0.08;
    animation: ctaFloat 12s ease-in-out infinite;
}

.cta-decor-cross::before,
.cta-decor-cross::after {
    content: "";
    position: absolute;
    background: white;
    border-radius: 2px;
}

.cta-decor-cross::before {
    width: 10px;
    height: 30px;
    left: 10px;
    top: 0;
}

.cta-decor-cross::after {
    width: 30px;
    height: 10px;
    left: 0;
    top: 10px;
}

.cta-decor-cross-1 {
    top: 15%;
    right: 12%;
    animation-delay: -4s;
}

.cta-decor-cross-2 {
    bottom: 20%;
    left: 8%;
    animation-delay: -8s;
    animation-duration: 16s;
}

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 12px;
    position: relative;
    z-index: 2;
}

.cta-section p {
    font-size: 1.1rem;
    margin-bottom: 28px;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.cta-contacts {
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    position: relative;
    z-index: 2;
}

.cta-contacts a {
    color: var(--text-white);
}

/* === Modal === */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 6000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 36px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    color: var(--text-light);
}

.modal-content h2 {
    color: var(--primary);
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 4px;
    font-weight: 500;
    color: var(--text);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
}

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

.form-consent {
    margin-bottom: 18px;
}

.form-consent label {
    font-size: 0.8rem;
    color: var(--text-light);
    display: block;
    margin-left: 24px;
}

/* === Page Sections === */
.page-section {
    padding: 60px 0;
    margin-top: 110px;
}

.page-content {
    line-height: 1.8;
    color: var(--text-light);
}

.container h1 {
    color: var(--primary-dark);
    margin: 24px 0 14px;
    text-align: center;
}

.page-content h2 {
    color: var(--primary-dark);
    margin: 24px 0 14px;
}

.page-content ul,
.page-content ol {
    padding-left: 20px;
    margin: 14px 0;
}

.page-content li {
    margin-bottom: 6px;
}

/* === Articles Grid (list /articles/) === */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 40px;
}

.article-card {
    display: flex;
    flex-direction: column;
}

.article-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-light);
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.article-card-body {
    padding-top: 16px;
}

.article-card-body h2 {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 12px;
}

.article-card-body h2 a {
    color: var(--primary);
}

.article-card-body h2 a:hover {
    color: var(--primary-dark);
}

.article-card-desc {
    font-size: 1rem;
    line-height: 1.55;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 28px;
    }

    .article-card {
        flex-direction: row;
        align-items: flex-start;
        gap: 16px;
    }

    .article-card-image {
        flex: 0 0 40%;
        width: 40%;
        aspect-ratio: auto;
        border-radius: var(--radius-sm);
    }

    .article-card-body {
        flex: 1;
        min-width: 0;
        padding-top: 0;
    }

    .article-card-body h2 {
        font-size: 1.15rem;
        margin-bottom: 8px;
    }

    .article-card-desc {
        font-size: 0.9rem;
    }
}

/* === Related Articles (bottom of single article) === */
.related-divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 48px 0 32px;
}

.related-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 24px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.related-card {
    display: flex;
    flex-direction: column;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition);
}

.related-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.related-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.related-card-title {
    padding: 14px 16px;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--primary);
}

.related-card:hover .related-card-title {
    color: var(--primary-dark);
}

@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .related-card {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }

    .related-card img {
        flex: 0 0 32%;
        width: 32%;
        aspect-ratio: 1;
    }

    .related-card-title {
        flex: 1;
        padding: 10px 12px 10px 0;
        font-size: 0.9rem;
    }
}

.single-header-image {
    max-height: 350px;
    overflow: hidden;
    border-radius: var(--radius);
    margin-bottom: 28px;
}

.single-header-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-subtitle {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 18px;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 36px;
}

.content-card {
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.content-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.content-card-image {
    height: 220px;
    overflow: hidden;
}

.content-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.content-card-body {
    padding: 18px;
}

.content-card-body h2 {
    color: var(--primary-dark);
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.content-card-meta {
    color: var(--primary);
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.read-more {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* === Patient Grid (list /patient/) === */
.patient-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 40px;
}

.patient-card {
    display: flex;
    flex-direction: column;
}

.patient-card-image {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-light);
}

.patient-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.patient-card-body {
    padding-top: 16px;
}

.patient-card-body h2 {
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 12px;
}

.patient-card-body h2 a {
    color: var(--primary);
}

.patient-card-body h2 a:hover {
    color: var(--primary-dark);
}

.patient-card-desc {
    font-size: 1rem;
    line-height: 1.55;
    color: var(--text-light);
}

@media (max-width: 768px) {
    .patient-grid {
        grid-template-columns: 1fr;
        gap: 24px;
        margin-top: 28px;
    }

    .patient-card {
        flex-direction: row;
        align-items: flex-start;
        gap: 16px;
    }

    .patient-card-image {
        flex: 0 0 40%;
        width: 40%;
        aspect-ratio: auto;
        border-radius: var(--radius-sm);
    }

    .patient-card-body {
        flex: 1;
        min-width: 0;
        padding-top: 0;
    }

    .patient-card-body h2 {
        font-size: 1.15rem;
        margin-bottom: 8px;
    }

    .patient-card-desc {
        font-size: 0.9rem;
    }
}


/* === Cookie Banner === */
.cookie-banner {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 10px 20px;
    z-index: 3500;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.cookie-banner.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.cookie-banner-content {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.cookie-banner-content p {
    flex: 1;
    font-size: 0.8rem;
    line-height: 1.3;
}

.cookie-banner-content a {
    color: var(--primary-light);
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.cookie-buttons .btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    padding: 8px 18px;
    font-size: 0.8rem;
}

.cookie-buttons .btn-outline {
    border-color: var(--text-white);
    color: var(--text-white);
    padding: 8px 18px;
    font-size: 0.8rem;
}

/* === Mobile Nav === */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 5000;
    padding: 6px 0;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    border-top: 1px solid var(--border);
}

.mobile-nav.visible {
    transform: translateY(0);
}

.mobile-nav-list {
    display: flex;
    justify-content: space-around;
    list-style: none;
    align-items: center;
}

.mobile-nav-item a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--text-light);
    font-size: 12px;
    padding: 6px 8px;
    transition: var(--transition);
}

.mobile-nav-item a.active,
.mobile-nav-item a:hover {
    color: var(--primary);
}

.mobile-nav-icon {
    width: 32px;
    height: 32px;
    font-size: 22px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* === Footer === */
.footer {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 50px 0 20px;
}

.footer-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 28px;
    margin-bottom: 36px;
}

.footer-logo {
    height: 45px;
    margin-bottom: 14px;
    filter: brightness(0) invert(1);
}

.footer-desc {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
    margin-bottom: 18px;
}

.footer-social {
    display: flex;
    gap: 14px;
}

.footer-social a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer-social a:hover {
    color: var(--primary-light);
}

.footer-brand h4,
.footer-links h4 {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 14px;
    font-size: 0.95rem;
}

.footer-clinic-locations {
    margin-top: 18px;
}

.footer-clinic-locations h4 {
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 8px;
    margin-top: 14px;
    font-size: 0.9rem;
}

.footer-clinic-locations h4:first-child {
    margin-top: 0;
}

.footer-address {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 12px;
    font-size: 0.85rem;
}

.footer-phone {
    color: rgba(255, 255, 255, 0.7);
    display: block;
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.footer-phone:hover {
    color: rgba(255, 255, 255, 0.9);
}

.footer-email {
    color: rgba(255, 255, 255, 0.7);
    display: block;
    margin-bottom: 8px;
}

.footer-email:hover {
    color: rgba(255, 255, 255, 0.9);
}

.footer-links ul,
.footer-legal ul {
    list-style: none;
}

.footer-links li,
.footer-legal li {
    margin-bottom: 8px;
}

.footer-links a,
.footer-clinic-locations a {
    color: rgba(255, 255, 255, 0.6) !important;
    transition: var(--transition);
    text-decoration: none;
}

.footer-links a:hover,
.footer-clinic-locations a:hover {
    color: rgba(255, 255, 255, 0.9) !important;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
}

.copyright {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
}

.footer-disclaimer {
    color: rgba(255, 255, 255, 0.35);
    font-size: 0.7rem;
    max-width: 450px;
    text-align: right;
}

/* === Terms Page === */
.terms-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
}

.terms-content th,
.terms-content td {
    padding: 10px;
    border: 1px solid var(--border);
    text-align: left;
}

.terms-content th {
    background: var(--bg-light);
    font-weight: 600;
    color: var(--primary);
}

/* === Price table === */
.price-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.price-table th {
    background-color: #e0f6f3;
    color: #00796b;
    font-weight: 600;
    padding: 14px 16px;
    text-align: left;
    font-size: 1rem;
}

.price-table td {
    padding: 12px 16px;
    vertical-align: top;
    border-bottom: 1px solid #e0e0e0;
    font-size: 0.95rem;
}

.price-table tr:nth-child(even) td:first-child {
    background-color: #f5fbfa;
}

.price-table td:last-child {
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
}

/* === Animations === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* === Utility === */
.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;
}

/* === Map === */
.map-container {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    height: 400px;
    width: 100%;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
    .hero-features {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .doctors-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 768px) {

    /* Top menu as slide-down panel (toggled by .header.open) */
    .header-nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: var(--bg);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
        transform: translateY(-110%);
        transition: transform 0.3s ease, visibility 0s linear 0.3s;
        z-index: 3999;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        border-top: 1px solid var(--border);
        padding: 10px 0 16px;
        visibility: hidden;
        pointer-events: none;
    }

    .header.open .header-nav {
        transform: translateY(0);
        visibility: visible;
        pointer-events: auto;
        transition: transform 0.3s ease, visibility 0s;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        overflow-x: visible;
        max-width: 100%;
    }

    .nav-link {
        padding: 14px 24px;
        font-size: 16px;
        border-bottom: 1px solid var(--border);
    }

    .nav-link:hover,
    .nav-link.active {
        border-bottom-color: var(--border);
    }

    .header-right .header-phone,
    .header-right .header-social,
    .header-right .cta-button {
        display: none !important;
    }

    .mobile-toggle {
        display: flex !important;
        margin-left: auto;
    }

    /* Hide header on scroll down (toggled by JS) */
    .header.header-hidden {
        top: -100%;
    }

    /* Darken page content behind the open menu */
    .menu-backdrop {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
        z-index: 3998;
    }

    .header.open .menu-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    /* Hamburger -> X */
    .header.open .mobile-toggle span:nth-child(1) {
        transform: translateY(6px) rotate(45deg);
    }

    .header.open .mobile-toggle span:nth-child(2) {
        opacity: 0;
    }

    .header.open .mobile-toggle span:nth-child(3) {
        transform: translateY(-6px) rotate(-45deg);
    }

    .hero {
        margin-top: 70px;
        min-height: auto;
    }

    .hero::after,
    .hero-decor-1,
    .hero-decor-2,
    .hero-cross,
    .cta-decor-cross {
        display: none !important;
    }

    .hero-content {
        padding: 40px 16px;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .hero-features {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-bottom: 100px;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .services-grid.services-list {
        grid-template-columns: 1fr;
    }

    .service-card {
        padding: 20px 14px;
    }

    .service-card h3 {
        font-size: 0.9rem;
    }

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

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

    .reviews-carousel {
        grid-template-columns: 1fr;
    }

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

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

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

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

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-disclaimer {
        text-align: center;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .modal-content {
        padding: 24px;
        margin: 10px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-contacts {
        flex-direction: column;
        gap: 8px;
    }

    /* Bottom nav: hidden by default, slides in on scroll (JS adds .visible) */
    .mobile-nav {
        display: block !important;
    }

    /* Hide bottom nav while the top menu is open */
    .header.open~.mobile-nav {
        transform: translateY(100%);
    }

    body {
        padding-bottom: 60px;
    }

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

/* === Services Grid === */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 32px;
}

.service-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

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

.service-card-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.service-card-body {
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.service-card-text {
    flex: 1;
    min-width: 0;
}

.service-card-link-wrap {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
}

.service-card-body h2 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    font-weight: 600;
    color: var(--text);
}

.service-card-body h2 a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.service-card-body h2 a:hover {
    color: var(--primary);
}

.service-card-desc {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 0;
    line-height: 1.6;
}

.service-card-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    color: darkgray;
    font-size: 1.5rem;
    font-weight: 300;
    text-decoration: none;
    transition: var(--transition);
}

.service-card-link:hover {
    background: var(--primary);
    color: var(--text-white);
    transform: scale(1.1);
}



/* === Clinic Gallery Section (Tilda T156 Bento Grid) === */
.clinic-gallery-section {
    margin: 0;
    padding: 40px 0;
    width: 100%;
    background: transparent;
}

.clinic-gallery-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.8rem;
    color: var(--text);
}

.t156__container {
    --t156-indent-10-half: 5px;
    --t156-indent-20-half: 10px;
    --t156-indent-40-half: 20px;
    --t156-base-padding: 20px;
    --t156-base-padding-sm: 10px;
    --t156-padding-none: 0;
    --t156-padding-15: 15px;
    --t156-padding-35: 35px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-rows: auto;
    grid-auto-flow: row;
    gap: 0;
    width: 100%;
    box-sizing: border-box;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding-left: var(--t156-base-padding);
    padding-right: var(--t156-base-padding);
}

.t156__container .t156__item {
    position: relative;
    overflow: hidden;
    margin: 0;
    padding: 2px;
    width: 100%;
    height: 100%;
}

.t156__container .t156__item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    cursor: zoom-in;
    border-radius: 0;
    margin: 0;
    padding: 0;
}

/* === GL16N Grid Pattern (cycle of 10) === */

/* Large items - LEFT (cols 1-2, spans 2 rows) */
.t156__container .t156__item:nth-child(10n+1) {
    grid-column: 1 / span 2;
    grid-row: span 2;
}

/* Small items - RIGHT side (cols 3-4) */
.t156__container .t156__item:nth-child(10n+2) {
    grid-column: 3;
}

.t156__container .t156__item:nth-child(10n+3) {
    grid-column: 4;
}

.t156__container .t156__item:nth-child(10n+4) {
    grid-column: 3;
}

.t156__container .t156__item:nth-child(10n+5) {
    grid-column: 4;
}

/* Small items - LEFT side (cols 1-2) — rows 3-4, side by side with large-right */
.t156__container .t156__item:nth-child(10n+6) {
    grid-column: 1;
    grid-row: 3;
}

.t156__container .t156__item:nth-child(10n+7) {
    grid-column: 2;
    grid-row: 3;
}

.t156__container .t156__item:nth-child(10n+8) {
    grid-column: 1;
    grid-row: 4;
}

.t156__container .t156__item:nth-child(10n+9) {
    grid-column: 2;
    grid-row: 4;
}

/* Large items - RIGHT (cols 3-4, spans 2 rows) — rows 3-4, side by side with small-left */
.t156__container .t156__item:nth-child(10n) {
    grid-column: 3 / span 2;
    grid-row: 3 / span 2;
}

/* === Tail handling (incomplete last block) === */

/* When last item is a large one (10n+1) and it's truly last: stays 2x2 — OK */

/* When there's 1 small after large (10n+1 then 10n+2 is last): make it fill right half */
.t156__container .t156__item:nth-last-child(1):nth-child(10n+2) {
    grid-column: 3 / span 2;
    grid-row: span 2;
}

/* When there are 2 smalls after large (10n+1, then 10n+2 & 10n+3 last): each fills half of right side vertically */
.t156__container .t156__item:nth-last-child(2):nth-child(10n+2) {
    grid-column: 3 / span 2;
    grid-row: span 1;
}

.t156__container .t156__item:nth-last-child(1):nth-child(10n+3) {
    grid-column: 3 / span 2;
    grid-row: span 1;
}

/* When there are 3 smalls after large (10n+1, then 10n+2/3/4 last): last one stretches */
.t156__container .t156__item:nth-last-child(1):nth-child(10n+4) {
    grid-column: 3 / span 2;
    grid-row: span 1;
}

.review-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
    padding: 16px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
}

.review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.review-text {
    flex: 1;
}

.review-text p {
    margin-bottom: 8px;
    line-height: 1.6;
}

.review-author {
    font-weight: 600;
    font-style: italic;
    color: var(--text-light);
    margin-top: 4px;
}

/* === Mobile / tablet gallery: 2 columns, large items (1, 10, 11, 20, ...) full width ===
   ВАЖНО: все объявления здесь — с !important.
   Десктопные правила "хвоста" (строки 2135-2155) имеют специфичность (0,4,0),
   которая ВЫШЕ, чем у простого сброса (0,3,0): без !important они продолжают
   ставить элементы в колонки 3-4, которых на мобильных нет, — картинки
   сжимаются до 0px и исчезают. !important делает мобильный блок безусловным. */
@media (max-width: 992px) {
    .t156__container {
        grid-template-columns: repeat(2, 1fr) !important;
        grid-auto-rows: 160px !important;
        /* dense: мелкие элементы подтягиваются в "дыры",
           которые остаются после полноширинных крупных */
        grid-auto-flow: row dense !important;
    }

    /* Сбрасываем ВСЕ десктопные позиционирования (grid-column: 3/4, grid-row: 3/4
       и "хвостовые" grid-column: 3 / span 2) — иначе элементы улетают в
       неявные 3-4 колонки и не отображаются */
    .t156__container .t156__item:nth-child(n) {
        grid-column: auto !important;
        grid-row: auto !important;
    }

    /* Крупные элементы цикла (1-я, 10-я, 11-я, 20-я, ...) — на всю ширину, 2 ряда */
    .t156__container .t156__item:nth-child(10n+1),
    .t156__container .t156__item:nth-child(10n) {
        grid-column: 1 / -1 !important;
        grid-row: span 2 !important;
    }

    /* "Хвост": если остался один одиночный элемент (например, 23-е фото клиники,
       4-я лицензия, 2-я выписка) — растягиваем его на всю ширину,
       чтобы не было пустой ячейки 
    .t156__container .t156__item:nth-last-child(1):not(:nth-child(10n+1)):not(:nth-child(10n)) {
        grid-column: 1 / -1 !important;
    }

    .t156__container .t156__item:nth-last-child(2):not(:nth-child(10n+1)):not(:nth-child(10n)) {
        grid-column: 1 / -1 !important;
    }
*/
    .review-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .review-avatar {
        width: 56px;
        height: 56px;
    }
}

@media (max-width: 480px) {

    /* Оставляем 2 колонки (как в эталонном макете), только уменьшаем высоту ряда.
       !important — чтобы перекрыть 160px из блока 992px (там тоже !important) */
    .t156__container {
        grid-auto-rows: 130px !important;
    }
}

/* === Gallery Lightbox === */
.gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

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

.gallery-lightbox img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 4px;
}

.gallery-lightbox .close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 48px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10001;
    line-height: 1;
    transition: opacity 0.3s;
}

.gallery-lightbox .close-btn:hover {
    opacity: 0.7;
}

.gallery-lightbox .nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: darkgray;
    font-size: 48px;
    font-weight: 300;
    cursor: pointer;
    padding: 20px 16px;
    background: rgba(255, 255, 255, 0.08);
    border: none;
    border-radius: 8px;
    transition: background 0.3s;
    z-index: 10001;
    line-height: 1;
}

.gallery-lightbox .nav-btn:hover {
    background: rgba(255, 255, 255, 0.18);
}

.gallery-lightbox .prev-btn {
    left: 20px;
}

.gallery-lightbox .next-btn {
    right: 20px;
}

@media (max-width: 768px) {
    .gallery-lightbox .nav-btn {
        font-size: 32px;
        padding: 14px 10px;
    }

    .gallery-lightbox .prev-btn {
        left: 8px;
    }

    .gallery-lightbox .next-btn {
        right: 8px;
    }

    .gallery-lightbox .close-btn {
        font-size: 36px;
        top: 12px;
        right: 16px;
    }
}

/* Кнопка zoom в лайтбоксе */
.gallery-lightbox .zoom-btn {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10001;
    transition: background 0.3s;
}

.gallery-lightbox .zoom-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.gallery-lightbox .zoom-btn svg {
    width: 22px;
    height: 22px;
    fill: none;
    stroke: #fff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.gallery-lightbox .zoom-btn .icon-zoom-out {
    display: none;
}

.gallery-lightbox.zoomed .zoom-btn .icon-zoom-in {
    display: none;
}

.gallery-lightbox.zoomed .zoom-btn .icon-zoom-out {
    display: block;
}

/* Состояние zoom: изображение можно перетаскивать */
.gallery-lightbox img {
    transition: transform 0.25s ease-out;
    will-change: transform;
    touch-action: none;
}

.gallery-lightbox.zoomed {
    cursor: grab;
}

.gallery-lightbox.zoomed:active {
    cursor: grabbing;
}

.gallery-lightbox.zoomed img {
    max-width: none;
    max-height: none;
    transition: none;
    cursor: inherit;
}

@media (max-width: 768px) {
    .gallery-lightbox .zoom-btn {
        top: 10px;
        left: 10px;
        width: 40px;
        height: 40px;
    }

    .gallery-lightbox .zoom-btn svg {
        width: 20px;
        height: 20px;
    }
}

/* Стили для Markdown-таблиц внутри контента */
.page-content table {
    display: block;
    /* Превращаем таблицу в контейнер с горизонтальной прокруткой:
       если таблица не влезает в экран (мобильные), появляется скролл,
       последний столбец с ценами остаётся доступным */
    width: auto;
    min-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-collapse: collapse;
    /* Убирает двойные линии между ячейками */
    margin: 25px 0;
    font-size: 16px;
}

.page-content table thead tr {
    background-color: #e0f6f3;
    color: #00796b;
    font-weight: 600;
    text-align: left;
}

.page-content table th,
.page-content table td {
    padding: 12px 15px;
    border: 1px solid #dddddd;
    /* Сама обводка (серый цвет) */
}

/* Чередование цвета строк (опционально, для удобства чтения) */
.page-content table tbody tr:nth-of-type(even) {
    background-color: #f5fbfa;
}

.page-content table tbody tr:hover {
    background-color: #f5fbfa;
}

.page-content table tr th:last-child {
    text-align: right;
}

.page-content table tr td:last-child {
    text-align: right;
    font-weight: 600;
    white-space: nowrap;
}

/* Таблицы документов (содержат PDF-иконку): столбец с иконкой — по центру */
.page-content table:has(td img[src*="pdf-icon"]) th:nth-child(2),
.page-content table:has(td img[src*="pdf-icon"]) td:nth-child(2) {
    text-align: center;
    vertical-align: middle;
    width: 60px;
}

.page-content table:has(td img[src*="pdf-icon"]) td img {
    vertical-align: middle;
}

/* Отключаем горизонтальный скролл из-за 100vw */
html,
body {
    overflow-x: hidden;
}

/* Блоки, вырывающиеся за пределы container */
.page-content .full-width {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    position: relative;
}

/* Чтобы внутри full-width контент снова был ограничен и центрирован */
.page-content .full-width .t156__container {
    max-width: 1400px;
    /* или ваша обычная ширина container */
    margin: 0 auto;
    padding: 0 20px;
    /* отступы по бокам на мобильных */
}

/* Отзывам тоже можно дать "полноэкранный" фон, но сетку оставить внутри */
.page-content .reviews-grid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Если хотите, чтобы секция имела цветной фон на всю ширину */
.clinic-gallery-section {
    background-color: #f8f9fa;
    /* пример: светло-серый фон */
    padding: 60px 0;
}