/* =============================================
   COMPONENTS — KochajSię.pl
   ============================================= */

/* ─── BUTTONS ────────────────────────────────── */
.btn {
     display: inline-flex;
     align-items: center;
     gap: 10px;
     font-family: var(--sans);
     font-size: 12px;
     font-weight: 700;
     letter-spacing: .08em;
     text-transform: uppercase;
     text-decoration: none;
     border: none;
     border-radius: var(--r-pill);
     cursor: pointer;
     padding: 14px 30px;
     transition: all .25s;
}

.btn-p {
     background: var(--r5);
     color: #fff;
}

.btn-p:hover {
     background: var(--r6);
     transform: translateY(-1px);
}

.btn-o {
     background: transparent;
     color: var(--r5);
     border: 2px solid var(--r5);
}

.btn-o:hover {
     background: var(--r5);
     color: #fff;
}

.btn-g {
     display: inline-flex;
     align-items: center;
     gap: 8px;
     color: var(--r5);
     font-family: var(--sans);
     font-size: 12px;
     font-weight: 700;
     letter-spacing: .08em;
     text-transform: uppercase;
     text-decoration: none;
     border-bottom: 2px solid currentColor;
     padding-bottom: 2px;
     transition: color .2s;
}

.btn-g:hover {
     color: var(--r6);
}

/* ─── CARDS ──────────────────────────────────── */
.card {
     background: #fff;
     border: 1px solid rgba(212, 86, 106, .1);
     border-radius: var(--r-card);
     overflow: hidden;
     transition: transform .3s, box-shadow .3s;
}

.card:hover {
     transform: translateY(-3px);
     box-shadow: var(--shadow-card);
}

.card-img {
     width: 100%;
     height: 220px;
     display: flex;
     align-items: center;
     justify-content: center;
     position: relative;
     overflow: hidden;
}

.card-img img {
     width: 100%;
     height: 100%;
     object-fit: cover;
}

.card-body {
     padding: 24px 26px 28px;
}

.card-cat {
     font-family: var(--sans);
     font-size: 10px;
     font-weight: 700;
     letter-spacing: .13em;
     text-transform: uppercase;
     color: var(--r4);
     margin-bottom: 10px;
}

.card-title {
     font-family: var(--serif);
     font-size: 21px;
     font-weight: 700;
     line-height: 1.22;
     color: var(--ink);
     margin-bottom: 10px;
     letter-spacing: -.01em;
}

.card-meta {
     font-size: 12px;
     color: var(--ink3);
     display: flex;
     gap: 10px;
     margin-top: 14px;
}

/* ─── TAGS ───────────────────────────────────── */
.tag {
     display: inline-block;
     font-family: var(--sans);
     font-size: 11px;
     font-weight: 700;
     letter-spacing: .06em;
     text-transform: uppercase;
     color: var(--r5);
     background: rgba(212, 86, 106, .1);
     border-radius: 4px;
     padding: 5px 12px;
     margin: 3px;
}

/* ─── BREADCRUMB ─────────────────────────────── */
.bc {
     display: flex;
     gap: 8px;
     align-items: center;
     font-size: 12px;
     color: var(--ink3);
     margin-bottom: 24px;
     flex-wrap: wrap;
}

.bc a {
     color: var(--r4);
     text-decoration: none;
     font-weight: 500;
}

.bc-sep {
     color: rgba(0, 0, 0, .25);
}

/* ─── CUSTOM CHECKBOX (RODO) ─────────────────── */
.custom-checkbox {
     display: flex;
     align-items: flex-start;
     gap: 12px;
     cursor: pointer;
     position: relative;
     margin-top: 20px;
}

.custom-checkbox input {
     position: absolute;
     opacity: 0;
     cursor: pointer;
     height: 0;
     width: 0;
}

.checkmark {
     position: relative;
     top: 2px;
     height: 18px;
     width: 18px;
     background-color: rgba(255, 255, 255, 0.1);
     border: 1px solid rgba(255, 255, 255, 0.3);
     border-radius: 4px;
     flex-shrink: 0;
     transition: all 0.2s;
}

.custom-checkbox:hover input ~ .checkmark {
     background-color: rgba(255, 255, 255, 0.2);
}

.custom-checkbox input:checked ~ .checkmark {
     background-color: var(--r4);
     border-color: var(--r4);
}

.checkmark:after {
     content: "";
     position: absolute;
     display: none;
}

.custom-checkbox input:checked ~ .checkmark:after {
     display: block;
}

.custom-checkbox .checkmark:after {
     left: 6px;
     top: 2px;
     width: 5px;
     height: 10px;
     border: solid white;
     border-width: 0 2px 2px 0;
     transform: rotate(45deg);
}

.checkbox-text {
     font-size: 11px;
     line-height: 1.5;
     color: rgba(255, 255, 255, 0.6);
}

.checkbox-text a {
     color: #fff;
     text-decoration: underline;
     text-underline-offset: 2px;
}

/* ─── SIDEBAR ────────────────────────────────── */
.sidebar-w {
     background: #fff;
     border: 1px solid rgba(212, 86, 106, .1);
     padding: 26px 28px;
     margin-bottom: 24px;
     border-radius: 24px;
}

.sidebar-title {
     font-family: var(--serif);
     font-size: 22px;
     font-weight: 700;
     color: var(--ink);
     margin-bottom: 16px;
     padding-bottom: 12px;
     border-bottom: 1px solid rgba(212, 86, 106, .1);
}

.sidebar-cats {
     list-style: none;
}

.sidebar-cats li {
     display: flex;
     justify-content: space-between;
     align-items: center;
     padding: 9px 0;
     border-bottom: 1px solid rgba(212, 86, 106, .06);
}

.sidebar-cats a {
     font-size: 14px;
     color: var(--ink2);
     text-decoration: none;
     font-weight: 500;
}

.sidebar-cats a:hover {
     color: var(--r5);
}

.sidebar-cats span {
     font-size: 11px;
     color: var(--r4);
     font-weight: 700;
}

.author-av {
     width: 52px;
     height: 52px;
     border-radius: 50%;
     background: var(--r2);
     flex-shrink: 0;
     display: flex;
     align-items: center;
     justify-content: center;
     font-family: var(--serif);
     font-size: 20px;
     font-style: italic;
     color: var(--r4);
}

/* ─── EXT LINK ───────────────────────────────── */
.ext-link {
     display: inline-flex;
     align-items: center;
     gap: 8px;
     font-size: 12px;
     font-weight: 700;
     letter-spacing: .06em;
     text-transform: uppercase;
     text-decoration: none;
     color: var(--r5);
     border: 1.5px solid rgba(212, 86, 106, .3);
     padding: 7px 14px;
     border-radius: 40px;
     transition: border-color .2s, color .2s;
}

.ext-link:hover {
     border-color: var(--r4);
     color: var(--r5);
}

/* ─── MODAL ──────────────────────────────────── */
.modal-overlay {
     position: fixed;
     top: 0;
     left: 0;
     right: 0;
     bottom: 0;
     z-index: 9999;
     display: flex;
     align-items: center;
     justify-content: center;
     opacity: 0;
     visibility: hidden;
     pointer-events: none;
     transition: opacity 0.3s ease, visibility 0.3s ease;
}

/* CSS :target — otwiera modal po kliknięciu href="#modal-id" */
.modal-overlay:target {
     opacity: 1;
     visibility: visible;
     pointer-events: all;
}

.modal-overlay:target::before {
     content: '';
     position: fixed;
     inset: 0;
     background: rgba(32, 16, 20, 0.55);
     backdrop-filter: blur(4px);
     z-index: -1;
}

.modal-backdrop {
     position: fixed;
     inset: 0;
     z-index: 0;
     cursor: default;
}

/* Fallback: stary .is-active dla kompatybilności z JS */
.modal-overlay.is-active {
     opacity: 1;
     visibility: visible;
     pointer-events: all;
}

.modal-overlay.is-active::before {
     content: '';
     position: fixed;
     inset: 0;
     background: rgba(32, 16, 20, 0.55);
     backdrop-filter: blur(4px);
     z-index: -1;
}

.modal {
     background: #fff;
     width: 100%;
     max-width: 560px;
     border-radius: var(--r-card);
     box-shadow: var(--shadow-card);
     position: relative;
     padding: 40px;
     z-index: 1;
     transform: translateY(24px);
     transition: transform 0.35s cubic-bezier(.22,.68,0,1.2);
     margin: 20px;
     max-height: calc(100vh - 40px);
     overflow-y: auto;
}

.modal-overlay:target .modal,
.modal-overlay.is-active .modal {
     transform: translateY(0);
}

.modal-close {
     position: absolute;
     top: 20px;
     right: 20px;
     background: transparent;
     border: none;
     color: var(--ink3);
     cursor: pointer;
     padding: 8px;
     display: flex;
     align-items: center;
     justify-content: center;
     text-decoration: none;
     line-height: 1;
     z-index: 2;
}
     border-radius: 50%;
     transition: background 0.2s, color 0.2s;
}

.modal-close:hover {
     background: var(--r1);
     color: var(--r5);
}

.modal-close svg {
     width: 24px;
     height: 24px;
     stroke: currentColor;
     stroke-width: 2;
     stroke-linecap: round;
     stroke-linejoin: round;
}

.modal-header {
     text-align: center;
     margin-bottom: 24px;
}

.modal-title {
     font-family: var(--serif);
     font-size: 28px;
     font-weight: 700;
     color: var(--ink);
     margin-bottom: 8px;
}

.modal-desc {
     font-size: 14px;
     color: var(--ink2);
     line-height: 1.5;
}

.modal-contact-grid {
     display: grid;
     grid-template-columns: repeat(2, 1fr);
     gap: 12px;
}

.modal-contact-item.full-width {
     grid-column: 1 / -1;
}

@media (max-width: 768px) {
     .modal-contact-grid {
          grid-template-columns: 1fr;
     }
     
     .modal {
          padding: 28px 24px;
          margin: 16px;
     }
}

.modal-contact-item {
     display: flex;
     align-items: center;
     gap: 16px;
     padding: 16px;
     border: 1px solid rgba(212, 86, 106, 0.1);
     border-radius: 12px;
     text-decoration: none;
     color: var(--ink);
     transition: border-color 0.2s, background 0.2s;
}

.modal-contact-item:hover {
     border-color: var(--r3);
     background: var(--r1);
}

.modal-contact-icon {
     width: 40px;
     height: 40px;
     border-radius: 50%;
     background: var(--r2);
     color: var(--r6);
     display: flex;
     align-items: center;
     justify-content: center;
     flex-shrink: 0;
}

.modal-contact-icon svg {
     width: 20px;
     height: 20px;
     stroke: currentColor;
     stroke-width: 2;
     fill: none;
}

.modal-contact-text strong {
     display: block;
     font-weight: 700;
     font-size: 15px;
     margin-bottom: 2px;
}

.modal-contact-text span {
     font-size: 13px;
     color: var(--ink2);
}

/* Modal form inputs (minimalist lead) */
.modal-form {
     display: flex;
     flex-direction: column;
     gap: 16px;
}

.modal-input {
     width: 100%;
     padding: 14px 20px;
     border: 1px solid rgba(212, 86, 106, 0.2);
     border-radius: var(--r-pill);
     font-family: var(--sans);
     font-size: 15px;
     color: var(--ink);
     background: #fff;
     outline: none;
     transition: border-color 0.2s, box-shadow 0.2s;
}

.modal-input::placeholder {
     color: var(--ink3);
     opacity: 0.6;
}

.modal-input:focus {
     border-color: var(--r4);
     box-shadow: 0 0 0 3px rgba(212, 86, 106, 0.1);
}

.modal-small {
     font-size: 12px;
     color: var(--ink3);
     text-align: center;
     margin-top: 16px;
}

/* ─── STATS STRIP ────────────────────────────── */
.stats-strip {
     padding: 60px 0;
     background: #fff;
     border-top: 1px solid rgba(212, 86, 106, .08);
     border-bottom: 1px solid rgba(212, 86, 106, .08);
     margin: 40px 0;
}

.stats-grid {
     display: flex;
     justify-content: space-around;
     align-items: center;
     text-align: center;
     max-width: 1100px;
     margin: 0 auto;
     gap: 20px;
}

.stats-item {
     flex: 1;
}

.stats-number {
     font-family: var(--serif);
     font-size: clamp(32px, 4vw, 44px);
     font-weight: 700;
     color: var(--ink);
     line-height: 1;
     margin-bottom: 8px;
}

.stats-label {
     font-family: var(--sans);
     font-size: 11px;
     font-weight: 700;
     text-transform: uppercase;
     letter-spacing: 0.12em;
     color: var(--r4);
}

.stats-sep {
     width: 1px;
     height: 50px;
     background: rgba(212, 86, 106, .15);
     flex-shrink: 0;
}

@media (max-width: 768px) {
     .stats-grid {
          flex-direction: column;
          gap: 40px;
     }
     
     .stats-sep {
          display: none;
     }
}


/* ─── RELATED LINKS (Warto przeczytać) ───────── */
.wp-block-related-links {
     margin: 0;
     padding: 36px 40px 32px;
     background: linear-gradient(135deg, var(--parch) 0%, var(--r2) 100%);
     border-radius: 24px;
     position: relative;
}

.wp-block-related-links .related-links-title {
     font-family: var(--serif);
     font-size: 22px;
     font-weight: 700;
     color: var(--r5);
     margin-top: 0 !important;
     margin-bottom: 20px;
     display: flex;
     align-items: center;
     gap: 12px;
}

.wp-block-related-links .related-links-title svg {
     color: var(--r4);
     flex-shrink: 0;
}

.related-links-list {
     list-style: none;
     padding-left: 0;
     margin: 0;
}

.related-links-list li {
     position: relative;
     padding: 8px 0 8px 24px;
     line-height: 1.4;
}

.related-links-list li::before {
     content: "";
     position: absolute;
     left: 4px;
     top: 16px;
     width: 8px;
     height: 8px;
     background-color: var(--r2);
     border-radius: 50%;
}

.related-links-list a {
     color: var(--r6);
     text-decoration: none;
     font-family: var(--sans);
     font-size: 17px;
     font-weight: 500;
     background-image: linear-gradient(to right, rgba(212, 86, 106, 0.35), rgba(212, 86, 106, 0.35));
     background-size: 0% 5px;
     background-position: 0 95%;
     background-repeat: no-repeat;
     transition: color 0.3s ease, background-size 0.35s ease;
     display: inline;
     position: relative;
     -webkit-box-decoration-break: clone;
     box-decoration-break: clone;
}

.related-links-list a:hover {
     color: var(--r5);
     background-size: 100% 5px;
}

/* Ikona strzałki dla linków zewnętrznych */
.related-links-list a .icon-external {
     width: 15px;
     height: 15px;
     flex-shrink: 0;
     opacity: 0.6;
     margin-left: 4px;
     vertical-align: middle;
     display: inline-block;
     transition: opacity 0.2s, transform 0.2s;
}

.related-links-list a:hover .icon-external {
     opacity: 1;
     transform: translate(2px, -1px);
}

/* ─── EXPERT CARD ────────────────────────────── */
.expert-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: 1px solid rgba(212, 86, 106, 0.08);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.expert-card:hover {
    box-shadow: 0 8px 16px rgba(107, 17, 39, 0.04);
    border-color: rgba(212, 86, 106, 0.12);
}

.expert-card__link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.expert-card__img-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    background: var(--mesh-a);
}

.expert-card__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.expert-card:hover .expert-card__img {
    transform: scale(1.08);
}

.expert-card__badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--r5);
    color: #fff;
    padding: 6px 14px;
    border-radius: 100px;
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 12px rgba(212, 86, 106, 0.3);
}

.expert-card__content {
    padding: 24px 24px 28px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.expert-card__eyebrow {
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--r4);
    margin-bottom: 6px;
    display: block;
}

.expert-card__name {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--ink);
    margin-bottom: 10px;
    line-height: 1.2;
}

.expert-card__bio {
    font-size: 14px;
    line-height: 1.6;
    color: var(--ink2);
    margin-bottom: 24px;
}

.expert-card__bottom {
    margin-top: auto;
}

.expert-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 20px;
}

.expert-card__tag {
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 600;
    color: var(--r5);
    background: var(--r1);
    padding: 3px 8px;
    border-radius: 4px;
}

.expert-card__footer {
    padding-top: 16px;
    border-top: 1px solid rgba(212, 86, 106, 0.06);
    display: flex;
    gap: 8px;
}

.expert-card__btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: var(--sans);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 10px 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
    background: var(--r5);
    color: #fff;
    white-space: nowrap;
}

.expert-card__btn:hover {
    background: var(--r6);
    transform: translateY(-1px);
}

.expert-card__btn--alt {
    background: var(--r1);
    color: var(--r5);
}

.expert-card__btn--alt:hover {
    background: var(--r2);
}

@media (max-width: 480px) {
    .expert-card__footer {
        flex-direction: column;
    }
}

/* ════════════════════════════════════════════
   MAILPOET SYSTEM PAGES
   ════════════════════════════════════════════ */

.mailpoet-page-wrapper {
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--shadow-card);
    padding: 48px;
    border: 1px solid rgba(212, 86, 106, .1);
}

.mailpoet-page-wrapper input[type="email"],
.mailpoet-page-wrapper input[type="text"],
.mailpoet-page-wrapper select {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid rgba(212, 86, 106, .2);
    border-radius: 12px;
    font-family: var(--sans);
    font-size: 14px;
    color: var(--ink);
    background: var(--cream);
    transition: border-color .2s;
    margin-bottom: 16px;
    box-sizing: border-box;
}

.mailpoet-page-wrapper input[type="email"]:focus,
.mailpoet-page-wrapper input[type="text"]:focus,
.mailpoet-page-wrapper select:focus {
    border-color: var(--r4);
    outline: none;
    background: #fff;
}

.mailpoet-page-wrapper input[type="submit"],
.mailpoet-page-wrapper button[type="submit"] {
    background: var(--r5);
    color: #fff;
    border: none;
    border-radius: var(--r-pill);
    padding: 14px 30px;
    font-family: var(--sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: all .25s;
    box-shadow: var(--shadow-btn);
    width: 100%;
    margin-top: 8px;
}

.mailpoet-page-wrapper input[type="submit"]:hover,
.mailpoet-page-wrapper button[type="submit"]:hover {
    background: var(--r6);
    transform: translateY(-1px);
}

.mailpoet-page-wrapper .mailpoet_validate_success,
.mailpoet-page-wrapper .mailpoet-subscription-success {
    background: rgba(212, 86, 106, .08);
    border: 1px solid rgba(212, 86, 106, .2);
    border-radius: 12px;
    padding: 16px 20px;
    color: var(--r6);
    font-size: 14px;
    margin-top: 16px;
}

.mailpoet-page-wrapper .mailpoet_validate_error {
    background: rgba(239, 68, 68, .05);
    border: 1px solid rgba(239, 68, 68, .2);
    border-radius: 12px;
    padding: 16px 20px;
    color: #b91c1c;
    font-size: 14px;
    margin-top: 16px;
}

@media (max-width: 768px) {
    .mailpoet-page-wrapper {
        padding: 28px 20px;
    }
}
