:root {
    --primary: #87C7B3;
    --secondary: #264653;
    --accent: #e9c46a;
    --text: #343434;
    --white: #ffffff;
    --light-bg: #f8f9fa;
    --gray: #6c757d;
    --border-color: rgba(0,0,0,0.05);
}

/* Square corners – targeted reset zamiast globalnego * { border-radius: 0 }
   Dzięki temu nie trzeba walczyć z !important przy zaokrągleniach */
.btn, .card, .modal-content,
.dropdown-menu, .dropdown-item,
.badge, .alert, .input-group > *,
.form-control, .nav-link,
.treatments-section .card,
.blog-card, .team-card, .treatment-card,
.expertise-card, .gallery-card,
.treatment-image, .popular-categories, .popular-tags,
.blog-hero-section, .search-wrapper,
.pagination .page-link,
.treatment-card, .procedure-item,
.blog-content, .blog-image-wrapper {
    border-radius: 0 !important;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text);
}

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

/* ============================================
   HEADER / NAVBAR
   ============================================ */

.site-header {
    opacity: 1;
    z-index: 1030; /* wystarczy 1030 – powyżej Bootstrap sticky (1020) */
}

.navbar-brand {
    font-size: 28px;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s;
}

.navbar-nav .nav-link:hover {
    color: var(--primary) !important;
}

.navbar-nav .nav-link.active {
    background-color: var(--primary) !important;
    color: var(--white) !important;
}

/* Dropdown */
.dropdown-menu {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-top: 3px solid var(--primary);
    padding: 0.5rem 0;
    min-width: 240px;
}

.dropdown-item {
    padding: 0.6rem 1.2rem;
    transition: all 0.3s;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover,
.dropdown-item.active {
    background-color: var(--primary);
    color: var(--white);
    padding-left: 1.5rem;
}

/* ============================================
   PRZYCISKI
   ============================================ */

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

.btn-primary:hover {
    background-color: var(--secondary);
    border-color: var(--secondary);
}

.btn-secondary {
    background-color: var(--secondary);
    border-color: var(--secondary);
}

.btn-secondary:hover {
    background-color: var(--primary);
    border-color: var(--primary);
}

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

.btn-outline-accent {
    border: 1px solid var(--primary);
    color: var(--primary);
}

.btn-outline-accent:hover {
    border-color: var(--secondary);
    color: var(--secondary);
    background-color: var(--white);
}

/* ============================================
   HERO CAROUSEL
   ============================================ */

.hero-carousel {
    width: 100%;
    height: 80vh;
    min-height: 600px;
    max-height: 900px;
    position: relative;
    overflow: hidden;
}

.hero-carousel .carousel,
.hero-carousel .carousel-inner,
.hero-carousel .carousel-item {
    height: 100%;
    width: 100%;
}

.hero-carousel .carousel-item h2 span {
    color: var(--primary);
}

.hero-carousel .carousel-image {
    height: 100%;
    width: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

.hero-carousel .carousel-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 100%);
    z-index: 1;
}

.hero-carousel .container {
    position: relative;
    z-index: 2;
    height: 100%;
}

.hero-carousel .carousel-item .display-3 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation-duration: 1s;
}

.hero-carousel .carousel-item .fs-3 {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.hero-carousel .carousel-indicators {
    z-index: 3;
}

.hero-carousel .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 8px;
    background-color: rgba(255,255,255,0.5);
}

.hero-carousel .carousel-indicators button.active {
    background-color: var(--primary);
}

.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
    width: 5%;
    opacity: 0.8;
    z-index: 3;
}

.hero-carousel .carousel-control-prev:hover,
.hero-carousel .carousel-control-next:hover {
    opacity: 1;
}

/* ============================================
   SEKCJE OGÓLNE
   ============================================ */

.section-title {
    font-size: 36px;
    color: var(--secondary);
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 70px;
    height: 4px;
    background-color: var(--primary);
}

/* Centered underline variant */
.section-title--centered::after,
.uslugi .section-title::after,
.treatments-section .section-title::after,
.team-section .section-title::after,
.treatments-slider-section .section-title::after,
.blog-carousel-section .section-title::after,
.partners-section .section-title::after,
.gallery-section .section-title::after,
.treatments .section-title::after,
.expertise-section .section-title::after,
.diplomas-slider-section .section-title::after
{
    left: 50%;
    transform: translateX(-50%);
}

.section-subtitle {
    font-size: 20px;
    color: var(--primary);
    font-style: italic;
}

/* ============================================
   KARTY SPECJALIZACJI (PROCEDURY)
   ============================================ */

.procedure-item {
    background: var(--white);
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-left: 4px solid var(--primary);
    height: 100%;
}

.treatment-card.procedure-item {
    border-left: 4px solid var(--primary) !important;
    font-weight: 500;
}

.procedure-link a {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.procedure-link a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

/* ============================================
   KARTY ZABIEGÓW (TREATMENTS)
   ============================================ */

.treatments-section {
    background-color: var(--light-bg);
}

.treatments-section .card,
.treatments-section .card-img-overlay {
    overflow: hidden;
}

.treatments-section .card-img {
    transition: transform 0.5s ease;
}

.treatments-section a:hover .card-img {
    transform: scale(1.05);
}

.treatments-section .card-img-overlay h3.card-title:hover {
    color: var(--primary) !important;
}

.treatment-card {
    background: var(--white);
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    height: 100%;
    border: 1px solid var(--border-color);
}

.treatment-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(135,199,179,0.15);
    border-color: var(--primary);
}

.treatment-title {
    font-size: 22px;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 12px;
}

.treatment-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--primary);
}

.treatment-description {
    font-size: 15px;
    line-height: 1.7;
    color: var(--gray);
    margin-bottom: 0;
}

/* ============================================
   SEKCJA PERSONEL / ZESPÓŁ
   ============================================ */

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

.team-card {
    background: var(--white);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    height: 100%;
    border: 1px solid var(--border-color);
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(135,199,179,0.15);
    border-color: var(--primary);
}

.team-image,
.team-image-wrapper {
    width: 100%;
    height: 280px;
    overflow: hidden;
    position: relative;
}

.team-image img,
.team-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-card:hover .team-image img,
.team-card:hover .team-image-wrapper img {
    transform: scale(1.05);
}

.team-info {
    padding: 25px 20px 20px;
    text-align: center;
}

.team-name {
    font-size: 20px;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 5px;
}

.team-position {
    font-size: 16px;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 12px;
}

.team-position::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background-color: var(--primary);
}

.team-description {
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray);
    margin-bottom: 15px;
}

.team-social {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: var(--light-bg);
    border-radius: 50%;
    color: var(--secondary);
    text-decoration: none;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    font-size: 18px;
}

.social-link:hover {
    background-color: var(--primary);
    color: var(--white);
    transform: translateY(-3px);
}

/* ============================================
   SEKCJA BLOG - KARUZELA
   ============================================ */

.blog-carousel-section {
    background-color: var(--light-bg);
    position: relative;
}

.blog-card {
    background: var(--white);
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.3s ease;
    border: 1px solid var(--border-color);
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(135,199,179,0.15);
    border-color: var(--primary);
    background-color: #f6f9f9;
}

.blog-image-wrapper {
    position: relative;
    overflow: hidden;
    height: 220px;
}

.blog-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.blog-date {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--primary);
    color: var(--white);
    padding: 8px 12px;
    text-align: center;
    min-width: 55px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    z-index: 2;
    font-weight: bold;
    line-height: 1.2;
}

.date-day {
    display: block;
    font-size: 20px;
    font-weight: 700;
}

.date-month {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    opacity: 0.9;
}

.blog-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--secondary);
    color: var(--white);
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    z-index: 2;
}

.blog-content {
    padding: 20px 20px 10px;
}

.blog-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 10px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

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

.blog-excerpt {
    font-size: 14px;
    line-height: 1.6;
    color: var(--gray);
    margin-bottom: 15px;
}

.blog-meta {
    font-size: 12px;
    color: var(--gray);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
    margin-top: 10px;
}

/* Blog carousel controls */
#blogCarousel {
    padding: 0 40px;
}

.blog-carousel-section .carousel-control-prev,
.blog-carousel-section .carousel-control-next {
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
    color: #000;
}

.blog-carousel-section .carousel-control-prev { left: -20px; }
.blog-carousel-section .carousel-control-next { right: -20px; }

.blog-carousel-section .carousel-control-prev:hover,
.blog-carousel-section .carousel-control-next:hover {
    opacity: 1;
    background-color: var(--secondary);
}

.blog-carousel-section .carousel-indicators button {
    width: 12px;
    height: 12px;
    border-radius: 5px;
    background-color: var(--primary);
    opacity: 0.3;
    margin: 0 5px;
    transition: opacity 0.3s ease;
}

.blog-carousel-section .carousel-indicators button.active,
.blog-carousel-section .carousel-indicators button:hover {
    opacity: 1;
}

/* Blog filters */
.blog-filters .btn.active {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
}

/* ============================================
   SEKCJA ZABIEGI SZCZEGÓŁOWE
   ============================================ */

.treatments-detail-section {
    background-color: var(--white);
}

.treatment-detail-item {
    padding: 30px 0;
    border-bottom: 1px solid var(--border-color);
}

.treatment-detail-item:first-child { padding-top: 0; }
.treatment-detail-item:last-child  { border-bottom: none; padding-bottom: 0; }

.treatment-image {
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.treatment-image img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.treatment-detail-item:hover .treatment-image img {
    transform: scale(1.05);
}

.treatment-detail-content {
    padding: 20px 0 20px 30px;
}

.treatment-detail-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--secondary);
    margin-bottom: 15px;
    position: relative;
    padding-bottom: 12px;
}

.treatment-detail-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--primary);
}

.treatment-detail-description {
    font-size: 16px;
    line-height: 1.7;
    color: var(--gray);
    margin-bottom: 20px;
}

/* ============================================
   STOPKA
   ============================================ */

.site-footer {
    background-color: #f6f9f9;
    color: #959595;
}

.site-footer h4 {
    color: #343434;
}

a.phone {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
}

a.phone:hover {
    color: #343434;
}

/* ============================================
   ANIMACJE
   ============================================ */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

.animate__fadeInUp {
    animation: fadeInUp 1s ease forwards;
}

.animate__delay-1s {
    animation-delay: 0.3s;
    opacity: 0;
}

.animate__delay-2s {
    animation-delay: 0.6s;
    opacity: 0;
}

/* ============================================
   SLIDER Z USŁUGAMI
   ============================================ */

#treatmentsCarousel .carousel-indicators button,
#galleryCarousel .carousel-indicators button {
    background-color: #999;
}

#treatmentsCarousel .carousel-indicators .active,
#treatmentsCarousel .treatment-arrow-icon,
#galleryCarousel .carousel-indicators .active {
    background-color: var(--primary);
}

#treatmentsCarousel,
#galleryCarousel {
    position: relative;
    padding-bottom: 60px;
}

#treatmentsCarousel .col-lg-3,
#galleryCarousel .col-lg-3 {
    padding-right: 2px;
    padding-left: 2px;
}

/* ============================================
   GALERIA
   ============================================ */

.gallery-section {
    background-color: var(--white);
}

.gallery-card {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #111;
    cursor: pointer;
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s ease, filter .45s ease;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,.70) 0%, rgba(0,0,0,.10) 55%, transparent 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: .75rem;
}

.gallery-zoom-icon {
    color: #fff;
    margin-bottom: 4.6rem;
    transform: scale(.8);
    opacity: 0;
    transition: opacity .3s ease, transform .3s ease;
}

.gallery-label {
    color: #fff;
    font-size: .9rem;
    font-weight: 500;
    text-align: center;
    padding: 0 1rem;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0,0,0,.6);
}

.gallery-card:hover img {
    transform: scale(1.06);
    filter: brightness(.85);
}

.gallery-card:hover .gallery-zoom-icon {
    opacity: 1;
    transform: scale(1);
}

.gallery-service-link {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.gallery-service-link:hover {
    color: #fff;
    opacity: .85;
}

/* Lightbox */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 1080;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox[hidden] { display: none !important; }

.gallery-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.92);
    cursor: zoom-out;
}

.gallery-lightbox-content {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 1100px;
    padding: 2rem;
    gap: 1rem;
}

.gallery-lb-figure {
    margin: 0;
    text-align: center;
    max-width: 80vw;
}

.gallery-lb-figure img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    display: block;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    transition: opacity .25s ease;
}

.gallery-lb-figure figcaption {
    color: rgba(255,255,255,.85);
    margin-top: .75rem;
    font-size: .95rem;
    font-weight: 500;
    letter-spacing: .02em;
}

.gallery-lb-nav {
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .2s ease, transform .2s ease;
}

.gallery-lb-nav:hover {
    background: rgba(255,255,255,.25);
    transform: scale(1.1);
}

.gallery-lb-close {
    position: absolute;
    top: -1rem;
    right: 0;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    cursor: pointer;
    transition: background .2s ease;
    z-index: 2;
}

.gallery-lb-close:hover { background: rgba(255,255,255,.25); }

.gallery-lb-counter {
    position: absolute;
    bottom: .5rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,.55);
    font-size: .8rem;
    letter-spacing: .04em;
    pointer-events: none;
}

@keyframes lbFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.gallery-lightbox:not([hidden]) {
    animation: lbFadeIn .25s ease forwards;
}

/* ============================================
   CAROUSEL CONTROLS (GLOBAL)
   Sekcje specyficzne (hero, blog) nadpisują poniżej
   ============================================ */

.carousel-control-prev,
.carousel-control-next {
    position: absolute;
    top: 40%;
    bottom: auto;
    transform: translateY(-50%);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    color: var(--primary);
    text-align: center;
    background-color: transparent;
    border: 0;
    opacity: 1;
    transition: opacity .2s ease, transform .2s ease, background-color .2s ease;
}

.carousel-control-prev { left: -22px; }
.carousel-control-next { right: -22px; }

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background-color: var(--primary);
    transform: translateY(-50%) scale(1.1);
    opacity: .8;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 24px;
    height: 24px;
}

/* ============================================
   PARTNERZY
   ============================================ */

.partners-section {
    background-color: var(--white);
    overflow: hidden;
}

.partners-track-wrapper {
    overflow: hidden;
    position: relative;
}

.partners-track-wrapper::before,
.partners-track-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 2;
    pointer-events: none;
}

.partners-track-wrapper::before {
    left: 0;
    background: linear-gradient(to right, #fff 0%, transparent 100%);
}

.partners-track-wrapper::after {
    right: 0;
    background: linear-gradient(to left, #fff 0%, transparent 100%);
}

.partners-track {
    display: flex;
    align-items: center;
    gap: 3rem;
    width: max-content;
    animation: partnersScroll 25s linear infinite;
    will-change: transform;
}

.partners-track:hover {
    animation-play-state: paused;
}

.partner-item {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.partner-item img {
    max-height: 60px;
    max-width: 160px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: .55;
    transition: filter .3s ease, opacity .3s ease;
}

.partner-item a:hover img,
.partner-item img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

@keyframes partnersScroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* ============================================
   RESPONSYWNOŚĆ
   ============================================ */

@media (max-width: 992px) {
    .hero-carousel {
        height: 70vh;
        min-height: 500px;
    }
    .hero-carousel .carousel-item .display-3 { font-size: 2.5rem; }
    .hero-carousel .carousel-item .fs-3      { font-size: 1.3rem !important; }
    .blog-image-wrapper                      { height: 200px; }
    .blog-title                              { font-size: 17px; }
    #blogCarousel                            { padding: 0 30px; }
}

@media (max-width: 768px) {
    .hero-carousel {
        height: 60vh;
        min-height: 400px;
    }
    .hero-carousel .carousel-item .display-3 { font-size: 2rem; }
    .hero-carousel .carousel-item .fs-3      { font-size: 1.1rem !important; }
    .hero-carousel .btn                      { padding: 0.5rem 1.5rem !important; font-size: 1rem; }

    .section-title {
        font-size: 28px;
        text-align: center;
    }
    .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .section-subtitle             { text-align: center; }
    .treatment-detail-content     { padding: 20px 0 0 0; }
    .treatment-detail-title       { font-size: 20px; }
    .treatment-image,
    .team-image,
    .team-image-wrapper           { height: 220px; }
    .blog-image-wrapper           { height: 180px; }
    .blog-meta                    { flex-direction: column; align-items: flex-start; gap: 5px; }
}

@media (max-width: 576px) {
    .hero-carousel {
        height: 70vh;
        min-height: 450px;
    }
    .hero-carousel .carousel-item .display-3 { font-size: 1.8rem; }
    .hero-carousel .carousel-item .fs-3      { font-size: 1rem !important; }
    .hero-carousel .d-flex                   { flex-direction: column; gap: 10px !important; }
    .hero-carousel .btn                      { width: 100%; margin: 5px 0; }

    .section-title { font-size: 24px; }

    .treatment-card      { text-align: center; }
    .treatment-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .treatment-detail-title       { font-size: 18px; }
    .treatment-detail-description { font-size: 14px; }

    .team-card {
        max-width: 350px;
        margin: 0 auto;
    }

    #blogCarousel                { padding: 0 20px; }
    .blog-image-wrapper          { height: 160px; }
    .blog-title                  { font-size: 16px; }

    .gallery-lb-nav              { display: none; }
    .gallery-lightbox-content    { padding: 1rem; }
    .gallery-lb-figure           { max-width: 95vw; }
}

/* Dostępność – reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ============================================
   DYPLOMY
   ============================================ */

.diplomas-slider-section {
    background: #f8f9fa;
}

.diploma-card {
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: transparent;
}

.diploma-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.diploma-image-container {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    padding: 15px;
    box-sizing: border-box;
    /* Wysokość responsywna – jedne reguły zamiast 4 duplikatów */
    height: clamp(180px, 20vw, 300px);
}

.diploma-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: transform 0.3s ease;
}

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

.diploma-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
    padding: 20px 12px 12px 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.diploma-card:hover .diploma-overlay {
    opacity: 1;
}

.diploma-title {
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Modal dyplomów */
.diploma-modal-content {
    background: #111;
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
    border: none;
}

.diploma-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background: rgba(0,0,0,0.6);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.diploma-modal-title {
    color: #fff;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 60%;
}

.diploma-modal-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.diploma-counter {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}

.diploma-close-btn {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 1rem;
    padding: 0;
}

.diploma-close-btn:hover {
    background: rgba(255,255,255,0.2);
}

.diploma-modal-body {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 0;
}

.diploma-img-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 16px 80px;
    box-sizing: border-box;
}

#modalDiplomaImage {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.6);
    transition: opacity 0.2s ease;
    display: block;
}

.diploma-img-caption {
    color: rgba(255,255,255,0.65);
    font-size: 0.85rem;
    text-align: center;
    margin-top: 12px;
    max-width: 600px;
    line-height: 1.5;
}

.diploma-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    z-index: 20;
    padding: 0;
}

.diploma-nav-btn:hover {
    background: rgba(255,255,255,0.22);
    transform: translateY(-50%) scale(1.08);
}

.diploma-nav-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
    transform: translateY(-50%);
}

.diploma-nav-prev { left: 16px; }
.diploma-nav-next { right: 16px; }

.diploma-modal-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: rgba(0,0,0,0.5);
    border-top: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

@media (max-width: 576px) {
    .diploma-img-stage       { padding: 12px 56px; }
    .diploma-nav-btn         { width: 40px; height: 40px; font-size: 1rem; }
    .diploma-nav-prev        { left: 8px; }
    .diploma-nav-next        { right: 8px; }
    .diploma-modal-title     { font-size: 0.8rem; max-width: 50%; }
}

/* ============================================
   SIDEBAR (globalnie – nie duplikować w single.php)
   ============================================ */

.sidebar .widget {
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.07);
    padding: 1.5rem;
    /*margin-bottom: 1.5rem;*/
}

.sidebar .widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 1rem;
    padding-bottom: .6rem;
   /* border-bottom: 2px solid #0d6efd;*/
    display: flex;
    align-items: center;
    gap: .5rem;
}

/*.sidebar .widget-title::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 1.1em;
    background: #0d6efd;
}*/

.sidebar .widget_search .search-field,
.sidebar .widget_search input[type="search"] {
    width: 100%;
    padding: .5rem 1rem;
    border: 1px solid #dee2e6;
    outline: none;
    font-size: .9rem;
}

.sidebar .widget_search .search-submit {
    padding: .5rem 1rem;
    background: #0d6efd;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background .2s;
}

.sidebar .widget_search .search-submit:hover { background: #0b5ed7; }
.sidebar .widget_search form                 { display: flex; }

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 320px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #dee2e6 transparent;
}

.sidebar .widget_tag_cloud .tagcloud {
    max-height: none;
    overflow: visible;
}

.sidebar ul li {
    padding: .45rem 0;
    border-bottom: 1px solid #f1f3f5;
    font-size: .92rem;
}

.sidebar ul li:last-child { border-bottom: none; }

.sidebar ul li a {
    color: #333;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .5rem;
    transition: color .2s, padding-left .2s;
}

.sidebar ul li a::before {
    content: '›';
    color: var(--primary);
    font-size: 1.1rem;
    font-weight: 700;
    flex-shrink: 0;
}

.sidebar ul li a:hover { color: var(--primary); padding-left: 4px; }

.sidebar ul li .post-count,
.sidebar ul li a .count {
    background: #e9ecef;
    color: #666;
    font-size: .75rem;
    padding: .1rem .5rem;
    border-radius: 20px;
    margin-left: auto;
}

.sidebar .widget_recent_entries ul li a    { font-weight: 500; }
.sidebar .widget_recent_entries .post-date {
    display: block;
    font-size: .78rem;
    color: #999;
    margin-top: 2px;
}

/* ============================================
   MODAL GALERII (single.php)
   ============================================ */

#galleryModal {
    z-index: 1060;
}

#galleryModal .modal-dialog {
    margin: 0;
    max-width: 100%;
    height: 100%;
}

#galleryModal .modal-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: #0d0d0d;
}

.gallery-modal-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .6rem 1rem;
    background: rgba(0,0,0,.6);
    flex-shrink: 0;
    z-index: 10;
}

.gallery-modal-bar .gallery-counter {
    color: rgba(255,255,255,.75);
    font-size: .85rem;
    letter-spacing: .5px;
}

.gallery-modal-bar .btn-close-gallery {
    background: none;
    border: none;
    color: #fff;
    opacity: .8;
    cursor: pointer;
    padding: .3rem .5rem;
    line-height: 1;
    font-size: 1.4rem;
    transition: opacity .2s;
}

.gallery-modal-bar .btn-close-gallery:hover { opacity: 1; }

.gallery-modal-stage {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.gallery-modal-stage .carousel,
.gallery-modal-stage .carousel-inner,
.gallery-modal-stage .carousel-item {
    height: 100%;
}

.gallery-modal-stage .carousel-item-inner {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 4rem;
}

.gallery-modal-stage .carousel-item-inner img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    display: block;
    border-radius: 4px;
    box-shadow: 0 8px 40px rgba(0,0,0,.6);
}

.gallery-modal-stage .carousel-control-prev,
.gallery-modal-stage .carousel-control-next {
    width: 3.5rem;
    opacity: .6;
    transition: opacity .2s;
}

.gallery-modal-stage .carousel-control-prev:hover,
.gallery-modal-stage .carousel-control-next:hover { opacity: 1; }

.gallery-modal-thumbs {
    flex-shrink: 0;
    display: flex;
    gap: 6px;
    padding: 8px 12px;
    background: rgba(0,0,0,.7);
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.2) transparent;
    justify-content: center;
}

.gallery-modal-thumbs::-webkit-scrollbar       { height: 4px; }
.gallery-modal-thumbs::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 2px; }

.modal-thumb {
    flex-shrink: 0;
    width: 64px;
    height: 44px;
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    opacity: .5;
    transition: opacity .2s, border-color .2s, transform .15s;
}

.modal-thumb:hover         { opacity: .85; transform: scale(1.05); }
.modal-thumb.is-active     { border-color: #0d6efd; opacity: 1; transform: scale(1.05); }
.modal-thumb img           { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ============================================
   MISC
   ============================================ */

.popular-tags a:hover {
    color: #f0f0f0;
}

.card a img.card-img-top.wp-post-image {
    width: 100%;
    height: 100%;
}

.carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 6px;
    background-color: #6c757d;
}

.carousel-indicators button.active {
    background-color: var(--primary);
}

.label-description span a {
	color: var(--primary)!important;
}
/*===============BackToTop=================*/
#backToTop {
    position:        fixed;
    bottom:          30px;
    right:           25px;
    width:           44px;
    height:          44px;
    border-radius:   3%;
    border:          none;
    background:      var(--primary, #0d6efd);
    color:           #ffffff!important;
    font-size:       1.2rem;
    display:         flex;
    align-items:     center;
    justify-content: center;
    cursor:          pointer;
    opacity:         0;
    visibility:      hidden;
    transition:      opacity .3s, visibility .3s, transform .3s;
    z-index:         999;
    box-shadow:      0 4px 12px rgba(0,0,0,.2);
}
#backToTop.visible {
    opacity:    1;
    visibility: visible;
}
#backToTop:hover {
    transform: translateY(-4px);
}

/* ===== SOCIAL SWITCHER ===== */
.social-switcher {
    max-width: 260px;
}

.social-tabs {
    display: flex;
    gap: 6px;
    background: rgba(0,0,0,0.06);
    padding: 5px;
    border-radius: 10px;
}

.social-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: rgba(0,0,0,0.4);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

/* Hover — lekki odcień koloru platformy */
.social-tab[data-platform="facebook"]:hover { color: #1877F2; background: rgba(24,119,242,0.08); }
.social-tab[data-platform="x"]:hover        { color: #000;     background: rgba(0,0,0,0.08); }
.social-tab[data-platform="linkedin"]:hover { color: #0A66C2;  background: rgba(10,102,194,0.08); }
.social-tab[data-platform="youtube"]:hover  { color: #FF0000;  background: rgba(255,0,0,0.08); }

/* Active — pełny kolor platformy */
.social-tab[data-platform="facebook"].active { background: #1877F2; color: #fff; }
.social-tab[data-platform="x"].active        { background: #000;    color: #fff; }
.social-tab[data-platform="linkedin"].active { background: #0A66C2; color: #fff; }
.social-tab[data-platform="youtube"].active  { background: #FF0000; color: #fff; }

.social-tab.active {
    transform: scale(1.05);
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

.social-panel {
    display: none;
}

.social-panel.active {
    display: block;
    animation: fadeSlideIn 0.25s ease;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.social-panel-link {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.social-panel-link:hover {
    background: #fff;
    border-color: rgba(0,0,0,0.2);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    color: inherit;
}

.social-platform-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1a1a1a;
}

.social-handle {
    font-size: 0.78rem;
    color: rgba(0,0,0,0.45);
}

.social-cta {
    font-size: 0.78rem;
    color: var(--primary, #0d6efd);
    margin-top: 4px;
}