/* ============================================================
   KAINET Legal Pages — Stylesheet
   Implements Brand Identity guidelines:
   - Plus Jakarta Sans throughout (modern sans-serif)
   - Kainet Teal #0B6B6F, Trust Navy #102A43
   - Warm Coral #FF8A5B accents only
   - Soft Mist #F6FAF9 backgrounds
   - Generous whitespace, high readability
   ============================================================ */

.kainet-legal-page {
    min-height: 100vh;
    background: var(--mist);
    padding-top: 68px; /* nav height */
}

.legal-hero {
    background: var(--navy);
    padding: 60px 5vw 52px;
    position: relative;
    overflow: hidden;
}
.legal-hero::before {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(ellipse 70% 80% at 80% 50%, rgba(11,107,111,0.18) 0%, transparent 70%);
    pointer-events: none;
}
.legal-hero-inner {
    max-width: 860px;
    margin: 0 auto;
    position: relative;
}
.legal-hero-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--coral);
    margin-bottom: 16px;
}
.legal-hero-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    color: white;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}
.legal-hero-meta {
    font-size: 13px;
    color: rgba(255,255,255,0.45);
    font-weight: 300;
}

.legal-body-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 52px 5vw 80px;
}

/* Policy intro */
.legal-intro-box {
    background: var(--teal-8);
    border: 1px solid var(--teal-14);
    border-left: 4px solid var(--teal);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 44px;
    font-size: 15px;
    color: var(--navy);
    font-weight: 300;
    line-height: 1.75;
}

/* Company info block */
.legal-company-block {
    background: white;
    border: 1px solid var(--navy-12);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 44px;
}
.legal-company-block h3 {
    font-size: 12px;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--navy-12);
}
.legal-company-rows {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
}
.legal-company-row {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 13px;
    line-height: 1.55;
    padding: 9px 16px 9px 0;
    border-bottom: 1px solid rgba(16,42,67,0.05);
    min-width: 0;
}
.legal-company-row:nth-last-child(-n+2) { border-bottom: none; }
.legal-company-row span:first-child {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--navy-60);
    letter-spacing: 0.07em;
    text-transform: uppercase;
}
.legal-company-row span:last-child {
    color: var(--navy);
    font-weight: 400;
    word-break: break-word;
    overflow-wrap: break-word;
}
.legal-company-row a { color: var(--teal); text-decoration: none; }
.legal-company-row a:hover { text-decoration: underline; }

/* Section headings */
.legal-section {
    margin-bottom: 44px;
}
.legal-section-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--teal-14);
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.01em;
}
.legal-section-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--teal-8);
    color: var(--teal);
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

/* Body text */
.legal-body p {
    font-size: 15px;
    color: var(--navy-60);
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 14px;
}
.legal-body strong {
    font-weight: 600;
    color: var(--navy);
}
.legal-body a { color: var(--teal); text-decoration: none; }
.legal-body a:hover { text-decoration: underline; }

/* Lists */
.legal-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}
.legal-list li {
    font-size: 15px;
    color: var(--navy-60);
    font-weight: 300;
    line-height: 1.7;
    padding: 4px 0 4px 20px;
    position: relative;
}
.legal-list li::before {
    content: '';
    position: absolute;
    left: 6px; top: 13px;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--teal);
    opacity: 0.5;
}

/* Notice/warning boxes */
.legal-notice {
    background: rgba(255,138,91,0.07);
    border: 1px solid rgba(255,138,91,0.22);
    border-left: 4px solid var(--coral);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--navy);
    line-height: 1.7;
    font-weight: 400;
}
.legal-notice strong { color: #b85a2a; }

/* Contact box */
.legal-contact-box {
    background: var(--navy);
    border-radius: var(--radius-lg);
    padding: 32px 36px;
    margin-top: 44px;
    color: rgba(255,255,255,0.7);
}
.legal-contact-box h3 {
    font-size: 15px;
    font-weight: 700;
    color: white;
    margin-bottom: 20px;
    letter-spacing: 0.02em;
}
.legal-contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 32px;
}
.legal-contact-item {
    font-size: 13px;
    line-height: 1.55;
    font-weight: 300;
}
.legal-contact-item strong {
    display: block;
    font-weight: 600;
    color: rgba(255,255,255,0.85);
    margin-bottom: 2px;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.legal-contact-item a { color: var(--coral); text-decoration: none; }
.legal-contact-item a:hover { text-decoration: underline; }

/* Navigation between policies */
.legal-policy-nav {
    background: white;
    border: 1px solid var(--navy-12);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 44px;
}
.legal-policy-nav p {
    font-size: 13px;
    color: var(--navy-60);
    margin-bottom: 12px;
    font-weight: 300;
}
.legal-policy-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.legal-policy-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--teal);
    text-decoration: none;
    padding: 5px 12px;
    border: 1px solid var(--teal-14);
    border-radius: var(--radius-pill);
    background: var(--teal-8);
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.legal-policy-link:hover { background: var(--teal-18); border-color: var(--teal-30); }
.legal-policy-link.current { background: var(--teal); color: white; border-color: var(--teal); }

/* ADR/CISAS box */
.legal-adr-box {
    background: var(--teal-8);
    border: 1px solid var(--teal-14);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-top: 20px;
    font-size: 14px;
    color: var(--navy);
    line-height: 1.7;
    font-weight: 300;
}
.legal-adr-box strong { font-weight: 600; color: var(--navy); }

/* Responsive */
@media (max-width: 680px) {
    .legal-company-rows { grid-template-columns: 1fr; }
    .legal-company-row:nth-last-child(-n+2) { border-bottom: 1px solid rgba(16,42,67,0.05); }
    .legal-company-row:last-child { border-bottom: none; }
    .legal-contact-grid { grid-template-columns: 1fr; }
}

/* ── VERSION BAR ── */
.legal-version-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.legal-version-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    background: var(--teal-8);
    border: 1px solid var(--teal-14);
    border-radius: var(--radius-pill);
    font-size: 12px;
    font-weight: 700;
    color: var(--teal);
    letter-spacing: 0.04em;
}
.legal-version-date {
    font-size: 12px;
    color: var(--navy-60);
    font-weight: 300;
}
.legal-edit-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    color: var(--coral);
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid rgba(255,138,91,0.25);
    border-radius: var(--radius-pill);
    background: rgba(255,138,91,0.06);
    margin-left: auto;
    transition: background 0.15s, border-color 0.15s;
}
.legal-edit-link:hover {
    background: rgba(255,138,91,0.12);
    border-color: rgba(255,138,91,0.50);
    color: var(--coral);
}

/* ── BLOCK EDITOR CONTENT inside legal pages ── */
/* Ensures Gutenberg blocks render correctly in the legal layout */
.legal-page-content { }

/* Headings from block editor */
.legal-page-content h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--navy);
    margin: 36px 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--teal-14);
    letter-spacing: -0.01em;
}
.legal-page-content h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--navy);
    margin: 24px 0 10px;
}
.legal-page-content p {
    font-size: 15px;
    color: var(--navy-60);
    font-weight: 300;
    line-height: 1.8;
    margin-bottom: 14px;
}
.legal-page-content p strong {
    font-weight: 600;
    color: var(--navy);
}
.legal-page-content a {
    color: var(--teal);
    text-decoration: none;
}
.legal-page-content a:hover { text-decoration: underline; }

/* Lists from block editor */
.legal-page-content ul,
.legal-page-content ol {
    padding-left: 0;
    margin: 0 0 16px;
    list-style: none;
}
.legal-page-content ul li,
.legal-page-content ol li {
    font-size: 15px;
    color: var(--navy-60);
    font-weight: 300;
    line-height: 1.7;
    padding: 4px 0 4px 20px;
    position: relative;
}
.legal-page-content ul li::before {
    content: '';
    position: absolute;
    left: 6px; top: 13px;
    width: 5px; height: 5px;
    border-radius: 50%;
    background: var(--teal);
    opacity: 0.5;
}
.legal-page-content ol { counter-reset: ol-counter; }
.legal-page-content ol li { padding-left: 28px; }
.legal-page-content ol li::before {
    content: counter(ol-counter) '.';
    counter-increment: ol-counter;
    position: absolute;
    left: 0; top: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--teal);
    opacity: 0.7;
    width: 22px;
}

/* Gutenberg separator block */
.legal-page-content hr {
    border: none;
    border-top: 1px solid var(--navy-12);
    margin: 32px 0;
}

/* Callout / notice style — use a Gutenberg group block with class "legal-notice" */
.legal-page-content .legal-notice {
    background: rgba(255,138,91,0.07);
    border: 1px solid rgba(255,138,91,0.22);
    border-left: 4px solid var(--coral);
    border-radius: var(--radius-md);
    padding: 20px 24px;
    margin-bottom: 20px;
}
.legal-page-content .legal-notice p { color: var(--navy); }
.legal-page-content .legal-notice strong { color: #b85a2a; }

/* Info box style */
.legal-page-content .legal-intro-box {
    background: var(--teal-8);
    border: 1px solid var(--teal-14);
    border-left: 4px solid var(--teal);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 44px;
}
.legal-page-content .legal-intro-box p {
    font-size: 15px;
    color: var(--navy);
    margin-bottom: 0;
}

/* ── COMPLAINT PAGE ─────────────────────────────────────── */
.complaint-methods {
    display: flex;
    gap: 0;
    margin-bottom: 36px;
    background: white;
    border: 1px solid var(--navy-12);
    border-radius: var(--radius-lg);
    overflow: hidden;
}
.complaint-method-card {
    flex: 1;
    padding: 20px 22px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    border-right: 1px solid var(--navy-12);
    transition: background 0.2s;
}
.complaint-method-card:last-child { border-right: none; }
.complaint-method-card:hover { background: var(--mist); }
.complaint-method-icon {
    width: 36px; height: 36px;
    background: var(--teal-8);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}
.complaint-method-text { display: flex; flex-direction: column; gap: 4px; }
.complaint-method-text strong {
    font-size: 13px; font-weight: 700; color: var(--navy);
}
.complaint-method-text a,
.complaint-method-text span {
    font-size: 13px; color: var(--navy-60); font-weight: 300; line-height: 1.5; text-decoration: none;
}
.complaint-method-text a { color: var(--teal); }
.complaint-method-text a:hover { text-decoration: underline; }

.complaint-form-wrap {
    background: white;
    border: 1px solid var(--navy-12);
    border-radius: var(--radius-xl);
    padding: 40px;
    margin-bottom: 24px;
}
.complaint-form-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 22px; font-weight: 700; color: var(--navy);
    margin: 0 0 10px; letter-spacing: -0.01em;
    border-bottom: none !important; /* override legal-page-content h2 */
}
.complaint-form-intro {
    font-size: 14px; color: var(--navy-60);
    margin: 0 0 32px; font-weight: 300; line-height: 1.6;
}

/* Form fields */
.cf-row { display: flex; gap: 16px; margin-bottom: 0; }
.cf-row-2 > .cf-field { flex: 1; min-width: 0; }
.cf-field { margin-bottom: 20px; }
.cf-label {
    display: block; font-size: 13px; font-weight: 600;
    color: var(--navy); margin-bottom: 7px; letter-spacing: 0.01em;
}
.cf-required { color: var(--coral); margin-left: 1px; }
.cf-input {
    display: block; width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--navy-12);
    border-radius: var(--radius-md);
    font-size: 14px; font-family: var(--sans);
    color: var(--navy); background: var(--mist);
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
    outline: none; box-sizing: border-box;
    -webkit-appearance: none; appearance: none;
}
.cf-input:focus {
    border-color: var(--teal);
    background: white;
    box-shadow: 0 0 0 3px rgba(11,107,111,0.08);
}
.cf-select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23102A43' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}
.cf-textarea { resize: vertical; min-height: 80px; line-height: 1.65; }

.cf-consent-field { margin-top: 8px; }
.cf-checkbox-label {
    display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
}
.cf-checkbox-label input[type="checkbox"] {
    width: 18px; height: 18px; flex-shrink: 0;
    margin-top: 2px; accent-color: var(--teal); cursor: pointer;
}
.cf-checkbox-label span {
    font-size: 13px; color: var(--navy-60); line-height: 1.65; font-weight: 300;
}
.cf-checkbox-label a { color: var(--teal); }

.cf-error {
    background: rgba(255,138,91,0.07);
    border: 1px solid rgba(255,138,91,0.30);
    border-left: 3px solid var(--coral);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    font-size: 14px; color: #b85a2a;
    margin-top: 16px; line-height: 1.6;
}
.cf-error p { margin: 0; color: #b85a2a; }

.cf-submit-btn {
    display: inline-flex; align-items: center; gap: 8px;
    margin-top: 24px;
    padding: 14px 36px;
    font-size: 15px; font-weight: 600;
    background: var(--coral); color: white;
    border: none; border-radius: var(--radius-pill);
    cursor: pointer; font-family: var(--sans);
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 4px 16px rgba(255,138,91,0.28);
}
.cf-submit-btn:hover:not(:disabled) {
    background: #e8754a;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255,138,91,0.38);
}
.cf-submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.cf-privacy-note {
    font-size: 12px; color: var(--navy-60);
    margin-top: 16px; font-weight: 300; line-height: 1.6;
}
.cf-privacy-note a { color: var(--teal); }

.complaint-success {
    display: flex; gap: 16px; align-items: flex-start;
    background: var(--teal-8);
    border: 1px solid var(--teal-14);
    border-left: 4px solid var(--teal);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 24px;
}
.complaint-success strong {
    display: block; font-size: 15px; font-weight: 700;
    color: var(--navy); margin-bottom: 6px;
}
.complaint-success p {
    font-size: 14px; color: var(--navy-60); margin: 0; font-weight: 300;
}

@media (max-width: 760px) {
    .complaint-methods { flex-direction: column; }
    .complaint-method-card { border-right: none; border-bottom: 1px solid var(--navy-12); }
    .complaint-method-card:last-child { border-bottom: none; }
    .cf-row { flex-direction: column; gap: 0; }
    .complaint-form-wrap { padding: 24px 20px; }
}

.complaint-ref-line { margin: 8px 0 6px; font-size: 14px; color: var(--navy-60); }
.complaint-ref-code {
    font-family: monospace;
    font-size: 15px;
    font-weight: 700;
    color: var(--teal);
    background: var(--teal-8);
    border: 1px solid var(--teal-14);
    border-radius: 6px;
    padding: 2px 10px;
    letter-spacing: 0.05em;
}