/* K4 Worksheet Post */

.k4-worksheet-page {
    padding: 24px 16px 60px;
}

.k4-worksheet-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}

.k4-worksheet-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
    color: #777;
}

.k4-worksheet-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.k4-worksheet-breadcrumb a:hover {
    text-decoration: underline;
}

.k4-worksheet-card {
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 12px;
    overflow: hidden;
}

.k4-worksheet-header {
    padding: 28px 30px 12px;
}

.k4-worksheet-header h1 {
    margin: 0 0 10px;
    font-size: clamp(28px, 4vw, 44px);
    line-height: 1.15;
}

.k4-worksheet-meta {
    color: #777;
    font-size: 14px;
}

.k4-worksheet-featured-image {
    margin: 10px 30px 0;
    border-radius: 10px;
    overflow: hidden;
    background: #f5f5f5;
}

.k4-worksheet-featured-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 700px;
    object-fit: contain;
}

.k4-worksheet-content {
    padding: 25px 30px 5px;
}

.k4-worksheet-content > *:first-child {
    margin-top: 0;
}

.k4-worksheet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 25px 30px;
}

.k4-worksheet-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 7px;
    border: 0;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    box-sizing: border-box;
}

.k4-worksheet-btn-primary {
    background: #43ad4f;
    color: #fff !important;
}

.k4-worksheet-btn-primary:hover {
    background: #369b43;
}

.k4-worksheet-btn-secondary {
    background: #eef2f0;
    color: #222 !important;
}

.k4-worksheet-btn-light {
    background: #f7f7f7;
    color: #444 !important;
    border: 1px solid #e2e2e2;
}

.k4-worksheet-share {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    padding: 0 30px 28px;
    border-bottom: 1px solid #eee;
}

.k4-worksheet-share > span {
    font-weight: 600;
    margin-right: 3px;
}

.k4-worksheet-share a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 13px;
    border-radius: 6px;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 13px;
    font-weight: 600;
}

.k4-share-pinterest {
    background: #bd081c;
}

.k4-share-facebook {
    background: #1877f2;
}

.k4-worksheet-details {
    padding: 28px 30px;
    border-bottom: 1px solid #eee;
}

.k4-worksheet-details h2,
.k4-worksheet-extra h2 {
    margin: 0 0 18px;
    font-size: 24px;
}

.k4-worksheet-details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}

.k4-detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 15px 17px;
    border-right: 1px solid #e8e8e8;
    border-bottom: 1px solid #e8e8e8;
}

.k4-detail-item:nth-child(2n) {
    border-right: 0;
}

.k4-detail-item strong {
    font-size: 13px;
    color: #777;
}

.k4-detail-item span {
    font-size: 15px;
}

.k4-worksheet-extra {
    padding: 28px 30px;
    border-bottom: 1px solid #eee;
}

.k4-worksheet-extra p {
    margin-bottom: 0;
}

.k4-worksheet-related {
    margin-top: 35px;
}

.k4-related-heading {
    margin-bottom: 18px;
}

.k4-related-heading h2 {
    margin: 0;
    font-size: 27px;
}

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

.k4-related-card {
    display: block;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e7e7e7;
    border-radius: 10px;
    text-decoration: none !important;
    color: inherit !important;
    transition: transform .18s ease, box-shadow .18s ease;
}

.k4-related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
}

.k4-related-image {
    aspect-ratio: 16 / 10;
    background: #f4f4f4;
    overflow: hidden;
}

.k4-related-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.k4-related-body {
    padding: 14px;
}

.k4-related-body h3 {
    margin: 0 0 8px;
    font-size: 17px;
    line-height: 1.35;
}

.k4-related-body span {
    font-size: 13px;
    font-weight: 600;
    color: #43ad4f;
}

@media (max-width: 900px) {
    .k4-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .k4-worksheet-page {
        padding: 15px 10px 40px;
    }

    .k4-worksheet-header,
    .k4-worksheet-content,
    .k4-worksheet-details,
    .k4-worksheet-extra {
        padding-left: 18px;
        padding-right: 18px;
    }

    .k4-worksheet-featured-image {
        margin-left: 18px;
        margin-right: 18px;
    }

    .k4-worksheet-actions {
        padding-left: 18px;
        padding-right: 18px;
        flex-direction: column;
    }

    .k4-worksheet-btn {
        width: 100%;
    }

    .k4-worksheet-share {
        padding-left: 18px;
        padding-right: 18px;
    }

    .k4-worksheet-details-grid {
        grid-template-columns: 1fr;
    }

    .k4-detail-item,
    .k4-detail-item:nth-child(2n) {
        border-right: 0;
    }

    .k4-related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .k4-related-body {
        padding: 10px;
    }

    .k4-related-body h3 {
        font-size: 14px;
    }

    .k4-related-body span {
        font-size: 12px;
    }
}

@media print {
    .k4-worksheet-page {
        padding: 0;
    }

    .k4-worksheet-breadcrumb,
    .k4-worksheet-actions,
    .k4-worksheet-share,
    .k4-worksheet-related,
    .k4-worksheet-extra {
        display: none !important;
    }

    .k4-worksheet-card {
        border: 0;
    }

    .k4-worksheet-featured-image {
        margin: 0;
    }
}


.k4-worksheet-downloads{padding:28px 30px;border-top:1px solid #eee;border-bottom:1px solid #eee}.k4-worksheet-downloads h2{margin:0 0 18px;font-size:24px}.k4-worksheet-download-list{display:flex;flex-direction:column;gap:12px}.k4-worksheet-download-item{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:14px 16px;background:#f8f9f8;border:1px solid #e5e7e5;border-radius:8px}.k4-pdf-download-name{font-size:16px;font-weight:600}.k4-pdf-download-actions{display:flex;flex-wrap:wrap;gap:8px;flex-shrink:0}.k4-pdf-download-actions .k4-worksheet-btn{min-height:40px;padding:0 15px;font-size:14px}@media(max-width:640px){.k4-worksheet-downloads{padding-left:18px;padding-right:18px}.k4-worksheet-download-item{align-items:stretch;flex-direction:column;gap:12px}.k4-pdf-download-actions{flex-direction:column}.k4-pdf-download-actions .k4-worksheet-btn{width:100%}}@media print{.k4-worksheet-downloads{display:none!important}}


/* Worksheet metadata links and custom HTML */
.k4-detail-item a.k4-worksheet-filter-link {
    color: #43ad4f;
    text-decoration: none;
    font-weight: 600;
}
.k4-detail-item a.k4-worksheet-filter-link:hover {
    text-decoration: underline;
}
.k4-worksheet-html-content {
    padding: 28px 30px;
    border-bottom: 1px solid #eee;
}
.k4-worksheet-html-content > *:first-child { margin-top: 0; }
.k4-worksheet-html-content > *:last-child { margin-bottom: 0; }
@media (max-width:640px) {
    .k4-worksheet-html-content { padding-left:18px; padding-right:18px; }
}

/* =========================================================
 * Worksheet Feedback
 * ========================================================= */


/* Feedback Section */

.k4-worksheet-feedback {
    max-width: 900px;
    margin: 50px auto;
}

.k4-feedback-header {
    text-align: center;
}

.k4-feedback-header h2 {
    margin: 0 0 8px;
    font-size: 26px;
    font-weight: 500;
    color: #59657a;
}

.k4-feedback-header p {
    margin: 0 0 20px;
    color: #888;
    font-size: 14px;
}

/* Open Feedback Button */

.k4-feedback-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #ff4868;
    background: #fff;
    color: #ff4868;
    border-radius: 30px;
    padding: 11px 25px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}

.k4-feedback-toggle:hover {
    background: #ff4868;
    color: #fff;
    transform: translateY(-1px);
}

.k4-feedback-toggle-icon {
    font-size: 16px;
}

/* Form Wrapper */

.k4-feedback-form-wrapper {
    margin-top: 25px;
}

.k4-feedback-form-wrapper[hidden] {
    display: none !important;
}

/* Card */

.k4-feedback-card {
    border: 1px solid #e1e1e1;
    border-radius: 12px;
    padding: 32px;
    background: #fff;
    box-shadow: 0 3px 12px rgba(0,0,0,0.03);
}

.k4-feedback-icon {
    font-size: 28px;
    margin-bottom: 10px;
}

.k4-feedback-card h3 {
    margin: 0 0 8px;
    color: #59657a;
    font-size: 23px;
    font-weight: 500;
}

.k4-feedback-description {
    margin: 0 0 25px;
    color: #777;
    line-height: 1.6;
}

/* Radio */

.k4-feedback-type {
    margin-bottom: 22px;
}

.k4-feedback-type-label {
    display: block;
    margin-bottom: 12px;
    color: #59657a;
    font-weight: 600;
}

.k4-feedback-radio-group {
    display: flex;
    gap: 15px;
}

.k4-feedback-radio {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    cursor: pointer;
    transition: all .2s ease;
}

.k4-feedback-radio:hover {
    border-color: #ff4868;
}

.k4-feedback-radio input {
    position: absolute;
    opacity: 0;
}

.k4-radio-custom {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid #bbb;
    border-radius: 50%;
    position: relative;
}

.k4-feedback-radio input:checked + .k4-radio-custom {
    border-color: #ff4868;
}

.k4-feedback-radio input:checked + .k4-radio-custom::after {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    background: #ff4868;
    border-radius: 50%;
    top: 3px;
    left: 3px;
}

.k4-feedback-radio strong {
    display: block;
    color: #59657a;
    font-size: 15px;
}

.k4-feedback-radio small {
    display: block;
    margin-top: 3px;
    color: #888;
    font-size: 12px;
}

/* Inputs */

.k4-feedback-form input[type="text"],
.k4-feedback-form input[type="email"],
.k4-feedback-form textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #e5e5e5;
    background: #fafafa;
    border-radius: 7px;
    padding: 14px 16px;
    margin-bottom: 14px;
    font-size: 14px;
    color: #59657a;
    outline: none;
}

.k4-feedback-form textarea {
    min-height: 150px;
    resize: vertical;
    background: #fff;
}

.k4-feedback-form input:focus,
.k4-feedback-form textarea:focus {
    border-color: #ff4868;
    background: #fff;
}

/* Submit */

.k4-feedback-form button[type="submit"] {
    width: 100%;
    border: 0;
    border-radius: 30px;
    padding: 15px 25px;
    background: #ff4868;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .2s ease;
}

.k4-feedback-form button[type="submit"]:hover {
    opacity: .9;
    transform: translateY(-1px);
}

/* Honeypot */

.k4-feedback-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

/* Mobile */

@media (max-width: 600px) {

    .k4-worksheet-feedback {
        margin: 40px 15px;
    }

    .k4-feedback-card {
        padding: 22px;
    }

    .k4-feedback-radio-group {
        flex-direction: column;
    }

    .k4-feedback-header h2 {
        font-size: 23px;
    }
}




/* PDF Download Buttons */

.k4-pdf-download .wp-block-button__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    padding: 12px 22px;
    min-width: 150px;

    background: #ff4868;
    color: #fff;

    border: 0;
    border-radius: 8px;

    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;

    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.10);

    transition:
        background-color 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

/* Download icon */
.k4-pdf-download .wp-block-button__link::before {
    content: "↓";
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
}

/* Hover */
.k4-pdf-download .wp-block-button__link:hover {
    background: #e93658;
    color: #fff;

    transform: translateY(-2px);

    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.14);
}

/* Active */
.k4-pdf-download .wp-block-button__link:active {
    transform: translateY(0);
}

/* =========================================================
   Worksheet HTML Content
   ========================================================= */

.k4-worksheet-html-content {
    margin: 35px 0;
    color: #5f6b7d;
    font-size: 16px;
    line-height: 1.8;
}

/* Main heading */

.k4-worksheet-html-content h2 {
    margin: 0 0 14px;
    color: #59657a;
    font-size: 28px;
    line-height: 1.3;
    font-weight: 500;
}

/* Section headings */

.k4-worksheet-html-content h3 {
    margin: 28px 0 8px;
    color: #59657a;
    font-size: 22px;
    line-height: 1.4;
    font-weight: 500;
}

/* Paragraphs */

.k4-worksheet-html-content p {
    margin: 0 0 14px;
    color: #667085;
    font-size: 16px;
    line-height: 1.8;
}

/* Lists */

.k4-worksheet-html-content ul {
    margin: 8px 0 22px;
    padding-left: 25px;
    list-style: disc;
}

.k4-worksheet-html-content li {
    margin: 5px 0;
    padding-left: 5px;
    color: #667085;
    line-height: 1.7;
}

.k4-worksheet-html-content li::marker {
    color: #ff4868;
}

/* Bold text */

.k4-worksheet-html-content strong {
    color: #59657a;
    font-weight: 600;
}

/* First heading spacing */

.k4-worksheet-html-content h2 + p {
    margin-top: 0;
}

/* Mobile */

@media (max-width: 767px) {

    .k4-worksheet-html-content {
        margin: 25px 0;
        font-size: 15px;
    }

    .k4-worksheet-html-content h2 {
        font-size: 24px;
    }

    .k4-worksheet-html-content h3 {
        font-size: 20px;
        margin-top: 24px;
    }

    .k4-worksheet-html-content p,
    .k4-worksheet-html-content li {
        font-size: 15px;
        line-height: 1.7;
    }

}


.k4-worksheet-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 25px;

    font-size: 14px;
    line-height: 1.6;
    color: #777;
}

.k4-worksheet-breadcrumb a {
    color: #687386;
    text-decoration: none;
    transition: color .2s ease;
}

.k4-worksheet-breadcrumb a:hover {
    color: #ff4868;
}

.k4-breadcrumb-separator {
    color: #aaa;
    font-size: 16px;
}

.k4-breadcrumb-current {
    color: #59657a;
    font-weight: 500;
}
