/* =====================================================================
   RajewskiMed – custom.css  (wyczyszczona, zdeduplikowana wersja)
   Miejsce docelowe: templates/shaper_doctor/css/custom.css
   Helix3 ładuje ten plik automatycznie.
   ---------------------------------------------------------------------
   UWAGA – co zostało USUNIĘTE względem starej wersji:
   - dwa globalne, sprzeczne hacki [type="button"]:not(:disabled)
     (raz color:#fff !important, raz color:#000). Biły się i #fff!important
     wygrywał globalnie -> potencjalnie biały tekst na wszystkich buttonach.
     Jeśli okaże się, że coś konkretnego tego wymagało, dopiszemy scoped.
   - zdublowane bloki .blog-zabiegi-item .item-image oraz @keyframes fadeInUp
     (scalone w jeden).
   ===================================================================== */


/* =========================================================
   FOOTER
   ========================================================= */
#sp-footer #sp-footer2 .sp-copyright {
    color: #fff !important;
    float: right;
}

#sp-footer a {
    color: #fff !important;
}

.sppb-feature-box-title {
    position: relative;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.sppb-feature-box-title::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 42px;
    height: 3px;
    background-color: #fc0405;
}
/* =========================================================
   IKONY / DROBIAZGI GLOBALNE
   ========================================================= */
.sppb-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.sppb-icon-container {
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

[class*=" icon-"] {
    line-height: 1.25 !important;
}

.fields-container {
    list-style: none;
}


/* =========================================================
   PAGE TITLE (baner)
   ========================================================= */
#sp-page-title .sp-page-title::before {
    background: rgba(29, 29, 29, 0.5) !important;
}

#sp-page-title .sp-page-title h2 {
    font-size: 48px;
}

@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
       only screen and (min-resolution: 144dpi) {
    #sp-header .sp-default-logo {
        display: flex;
    }
}


/* =========================================================
   HEADER – TOP BAR & LOGO
   ========================================================= */
#sp-top2 {
    display: flex !important;
    align-items: center !important;
    justify-content: right !important;
}

#sp-top2 * {
    display: flex;
    align-items: center;
    justify-content: center;
}

#mod-custom148 p,
#mod-custom148 {
    margin: 0;
}

#sp-header {
    height: 120px;
}

#sp-header .logo {
    height: 120px;
}

.sp-megamenu-parent {
    padding: 25px;
}


/* =========================================================
   GALERIA ZABIEGÓW + LIGHTBOX
   (klasa .zabiegi-galeria dodawana ręcznie w treści artykułu;
    obsługę klikania robi js/custom.js)
   ========================================================= */
.zabiegi-galeria h3,
.zabiegi-galeria p {
    text-align: center;
}

.zabiegi-galeria p:has(img) {
    margin: 1.5rem 0;
}

.zabiegi-galeria > p > img,
.zabiegi-galeria .zabiegi-zoom {
    display: block;
    width: min(100%, 520px);
    margin-right: auto;
    margin-left: auto;
}

.zabiegi-galeria img {
    display: block;
    width: 100%;
    height: auto;
}

.zabiegi-zoom {
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}

.zabiegi-zoom:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 4px;
}

.zabiegi-lightbox {
    width: auto;
    max-width: 96vw;
    padding: 0;
    border: 0;
    background: transparent;
    overflow: visible;
}

.zabiegi-lightbox::backdrop {
    background: rgba(0, 0, 0, 0.9);
}

.zabiegi-lightbox img {
    display: block;
    width: auto;
    max-width: 96vw;
    height: auto;
    max-height: 90vh;
    margin: auto;
}

.zabiegi-lightbox__close {
    position: fixed;
    top: 1rem;
    right: 1rem;
    width: 3rem;
    height: 3rem;
    padding: 0;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #000000;
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
}


/* =========================================================
   MODUŁ ARTYKUŁÓW (mod_articles) – lista + button
   ========================================================= */
.mod-articles-link {
    color: #212529;
}

.mod-articles-items.mod-articles-grid.grid-cols-2.mod-list {
    list-style: none;
    padding: 0;
}

.mod-articles-item {
    background: #fff;
    padding: 30px;
    display: table;
    width: 100%;
    border-radius: 3px;
    box-shadow: 1px 1.732px 4px 0px rgba(0, 0, 0, 0.03);
}

.mod-articles-item .mod-articles-title {
    text-align: left;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.mod-articles-item .mod-articles-image-link {
    display: block;
    text-decoration: none;
    margin: 0 auto 20px auto;
    text-align: center;
}

.mod-articles-item .mod-articles-image-wrap {
    width: 100%;
    max-width: 350px;
    height: 250px;
    overflow: hidden;
    border-radius: 3px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin: 0 auto;
}

.mod-articles-item .mod-articles-image-link:hover .mod-articles-image-wrap {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mod-articles-item .mod-articles-image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.mod-articles-more-wrapper {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
}

.mod-articles-more-btn {
    display: inline-block;
    padding: 0 35px;
    line-height: 50px;
    background-color: #284d73;
    color: #ffffff;
    text-decoration: none;
    border: none;
    border-radius: 3px;
    font-size: 16px;
    font-weight: 600;
    transition: 0.3s;
}

.mod-articles-more-btn:hover {
    background-color: #1e3a54;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}


/* =========================================================
   KATEGORIA ZABIEGI (3 kolumny: tytuł + zdjęcie)
   Aktywne tylko gdy override generuje .blog-zabiegi-item.
   Zostawione „w zanadrzu" na etap wdrażania nowego wyglądu.
   ========================================================= */
a.blog-zabiegi-item,
.blog-zabiegi-item {
    background: #fff;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 30px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e5e5e5;
    display: flex;
    flex-direction: column;
    height: 100%;
    text-decoration: none;
}

a.blog-zabiegi-item:hover,
.blog-zabiegi-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: #284d73;
}

.blog-zabiegi-item .item-title {
    font-size: 18px;
    margin: 0;
    padding: 25px 20px;
    color: #212529;
    font-weight: 500;
    text-align: center;
    background: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    cursor: pointer;
}

a.blog-zabiegi-item:hover .item-title,
.blog-zabiegi-item:hover .item-title {
    background: #284d73;
    color: #fff;
}

.blog-zabiegi-item .item-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-zabiegi-item .item-title a:hover {
    color: #fff !important;
}

/* jeden, scalony blok .item-image */
.blog-zabiegi-item .item-image {
    position: relative;
    width: 100%;
    height: 280px;
    min-height: 280px;
    max-height: 280px;
    overflow: hidden;
    flex: 1 1 280px;
    flex-shrink: 0;
}

.blog-zabiegi-item .item-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.1) 100%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

a.blog-zabiegi-item:hover .item-image::before,
.blog-zabiegi-item:hover .item-image::before {
    opacity: 1;
}

.blog-zabiegi-item .item-image img {
    width: 100%;
    height: 100%;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.5s ease;
}

a.blog-zabiegi-item:hover .item-image img,
.blog-zabiegi-item:hover .item-image img {
    transform: scale(1.08);
}

.blog-zabiegi-item .item-caption-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(40, 77, 115, 0.9);
    color: #fff;
    padding: 12px 15px;
    font-size: 13px;
    text-align: center;
    z-index: 2;
    transition: background 0.3s ease;
}

a.blog-zabiegi-item:hover .item-caption-overlay {
    background: rgba(30, 58, 84, 0.95);
}

/* grid dla listy zabiegów */
.items-leading,
.items-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: stretch;
}

.items-leading > *,
.items-row > * {
    display: flex;
}

@media (max-width: 992px) {
    .items-leading,
    .items-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .items-leading,
    .items-row {
        grid-template-columns: 1fr;
    }

    .blog-zabiegi-item .item-image {
        height: 220px;
        min-height: 220px;
        max-height: 220px;
    }

    .blog-zabiegi-item .item-title {
        font-size: 16px;
        padding: 20px 15px;
        height: 85px;
    }
}


/* =========================================================
   KATEGORIA OPINIE (tytuł + 250 znaków) – zapas
   ========================================================= */
.blog-opinie-item {
    background: #fff;
    padding: 35px;
    border-radius: 0;
    box-shadow: none;
    margin-bottom: 25px;
    border: 1px solid #e5e5e5;
    border-left: 5px solid #284d73;
    transition: all 0.3s ease;
    position: relative;
}

.blog-opinie-item::before {
    content: '\201C';
    position: absolute;
    top: 5px;
    left: 5px;
    font-size: 60px;
    color: #284d73;
    opacity: 0.1;
    font-family: Georgia, serif;
    line-height: 1;
    transition: opacity 0.3s ease;
}

.blog-opinie-item:hover {
    transform: translateX(5px);
    box-shadow: -5px 5px 20px rgba(0, 0, 0, 0.08);
    border-left-color: #1e3a54;
}

.blog-opinie-item:hover::before {
    opacity: 0.15;
}

.blog-opinie-item .item-title {
    font-size: 22px;
    margin-bottom: 18px;
    color: #284d73;
    font-weight: 700;
    position: relative;
    padding-bottom: 12px;
}

.blog-opinie-item .item-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: #284d73;
}

.blog-opinie-item .item-title a {
    color: #212529;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-opinie-item .item-title a:hover {
    color: #1e3a54;
}

.blog-opinie-item .item-intro {
    font-size: 16px;
    line-height: 1.8;
    color: #5a6c7d;
    position: relative;
    z-index: 1;
}


/* =========================================================
   PUBLIKACJE (catid 94)
   - lista  -> .pub-row  (klikalny wiersz: data | tytuł | pobierz)
   - artykuł -> .pub-card.pub-card--article (szara karta + data w rogu)
   Markup: override category/blog_item.php oraz article/default.php
   ========================================================= */

/* --- Plakietka z datą (baza, działa wszędzie) --- */
.pub-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    padding: 10px 12px;
    background: #2a4f74;
    color: #fff;
    border-radius: 3px;
    line-height: 1.05;
    text-align: center;
}

.pub-date__day {
    font-size: 24px;
    font-weight: 700;
}

.pub-date__month {
    font-size: 11px;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 2px;
}

.pub-date__year {
    font-size: 11px;
    opacity: 0.9;
}

/* --- LISTA: klikalny wiersz --- */
.pub-row {
    display: flex;
    align-items: center;
    gap: 28px;
    background: #f5f5f5;
    border-radius: 3px;
    padding: 20px 28px;
    margin-bottom: 18px;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.25s ease, transform 0.25s ease, background 0.25s ease;
}

.pub-row:hover {
    background: #eef2f6;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.pub-row__date {
    flex: 0 0 auto;
}

.pub-row__title {
    flex: 1 1 auto;
    font-size: 19px;
    font-weight: 600;
    line-height: 1.35;
    color: #212529;
    transition: color 0.25s ease;
}

.pub-row:hover .pub-row__title {
    color: #2a4f74;
}

.pub-row__file {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    text-align: center;
}

.pub-row__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    border: 1px solid #d4d9df;
    border-radius: 4px;
    background: #fff;
    color: #2a4f74;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.pub-row:hover .pub-row__btn {
    background: #2a4f74;
    border-color: #2a4f74;
    color: #fff;
}

.pub-row__btn .fa {
    color: inherit;
}

.pub-row__size {
    font-size: 12px;
    color: #9aa4ad;
}

@media (max-width: 640px) {
    .pub-row {
        flex-wrap: wrap;
        gap: 16px;
        padding: 18px 20px;
    }

    .pub-row__title {
        flex: 1 1 100%;
        order: 3;
        font-size: 17px;
    }

    .pub-row__date {
        order: 1;
    }

    .pub-row__file {
        order: 2;
        margin-left: auto;
        flex-direction: row;
        gap: 12px;
    }
}

/* --- ARTYKUŁ: szara karta + data w rogu na wysokości tytułu --- */
.pub-card {
    position: relative;
    background: #f5f5f5;
    padding: 32px 35px;
    margin-bottom: 25px;
    border-radius: 3px;
}

.pub-card .pub-date {
    position: absolute;
    top: 40px;
    right: 45px;
}

.pub-card--article {
    padding: 40px 45px;
}

.pub-card--article .pub-title {
    margin: 0 130px 20px 0;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
    color: #212529;
    padding-bottom: 16px;
    border-bottom: 1px solid #e2e6ea;
}

.pub-card--article .pub-body {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
}

.pub-card--article .pub-body ul.fields-container {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pub-card--article .pub-back {
    margin: 28px 0 0;
    padding-top: 18px;
    border-top: 1px solid #e2e6ea;
}

.pub-card--article .pub-back a {
    color: #2a4f74;
    text-decoration: none;
    font-weight: 600;
}

.pub-card--article .pub-back a:hover {
    color: #1e3a54;
}

/* ikonka PDF w karcie artykułu – nie znika na hover
   (nadpisuje globalną regułę body:not(.view-article) ... a:hover .fa {color:#fff}) */
.pub-card .fa {
    color: #2a4f74;
}

.pub-card a:hover .fa {
    color: #2a4f74 !important;
}

@media (max-width: 768px) {
    .pub-card--article {
        padding: 26px 20px;
    }

    .pub-card--article .pub-title {
        margin-right: 92px;
        font-size: 23px;
    }

    .pub-card .pub-date {
        top: 26px;
        right: 20px;
        min-width: 64px;
        padding: 8px 10px;
    }

    .pub-card .pub-date__day {
        font-size: 20px;
    }
}


/* =========================================================
   ANIMACJA wejścia (wspólna)
   ========================================================= */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

a.blog-zabiegi-item,
.blog-zabiegi-item,
.blog-opinie-item {
    animation: fadeInUp 0.6s ease forwards;
}

.blog-zabiegi-item:nth-child(2) { animation-delay: 0.1s; }
.blog-zabiegi-item:nth-child(3) { animation-delay: 0.2s; }
.blog-zabiegi-item:nth-child(4) { animation-delay: 0.3s; }
