/* ============================================================
   STATIC PAGES — contact / about / privacy / terms
   Templates: template-contact.php, template-about.php,
              template-privacy-policy.php, template-terms-of-use.php
   Content managed in Dashboard → Settings → Pages.
   Light surface with dark-readable text in BOTH themes; the page
   background goes dark in dark mode while cards stay light, exactly
   like the rest of the site's dark-mode design.
   ============================================================ */

.tpl-page {
    padding: 56px 0 88px;
    background-color: var(--ds-bg, var(--color-bg-secondary, #f8f7fa));
    color: var(--ds-text, var(--color-text, #2a2733));
}

/* ---------- Hero ---------- */
.tpl-hero {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 46px;
    padding: 0 20px;
}

.tpl-hero-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--ds-primary, #4d3f76) 0%, var(--ds-primary-dark, #3a2f59) 100%);
    color: #ffffff;
    margin-bottom: 22px;
    box-shadow: 0 12px 26px var(--ds-shadow-md, rgba(77, 63, 118, 0.15));
}

.tpl-hero-badge svg {
    width: 32px;
    height: 32px;
}

.tpl-title {
    font-size: 38px;
    font-weight: 800 !important;
    color: var(--ds-text, var(--color-text, #2a2733)) !important;
    letter-spacing: -0.5px;
    margin: 0 0 14px;
    line-height: 1.2;
}

.tpl-intro {
    font-size: 17px;
    line-height: 1.75;
    color: var(--ds-text-muted, var(--color-text-secondary, #666));
    margin: 0 auto;
    max-width: 640px;
}

/* ---------- Cards ---------- */
.tpl-card {
    background: var(--ds-bg-card, #ffffff);
    border: 1px solid var(--ds-border, #e6e2ef);
    border-radius: var(--ds-radius-lg, 16px);
    box-shadow: 0 4px 18px var(--ds-shadow-subtle, rgba(45, 35, 66, 0.05));
}

.tpl-card-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--ds-text, var(--color-text, #2a2733));
    margin: 0 0 20px;
}

/* ---------- Contact page ---------- */
.tpl-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    padding: 0 20px;
    max-width: 1080px;
    margin: 0 auto;
    align-items: start;
}

.tpl-form-card,
.tpl-channels-card {
    padding: 30px;
}

/* Form */
.tpl-contact-form .tpl-field {
    margin-bottom: 16px;
}

.tpl-contact-form .tpl-field label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--ds-text, var(--color-text, #2a2733));
    margin-bottom: 7px;
}

.tpl-contact-form .tpl-field input,
.tpl-contact-form .tpl-field textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    color: var(--ds-text, var(--color-text, #2a2733));
    background: var(--ds-bg-muted, var(--color-bg-secondary, #f8f7fa));
    border: 1px solid var(--ds-border-input, #e0e0e0);
    border-radius: 10px;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.tpl-contact-form .tpl-field input:focus,
.tpl-contact-form .tpl-field textarea:focus {
    outline: none;
    border-color: var(--ds-border-focus, #4d3f76);
    background: var(--ds-bg-card, #ffffff);
    box-shadow: 0 0 0 4px var(--ds-shadow-focus, rgba(77, 63, 118, 0.15));
}

.tpl-contact-form .tpl-field textarea {
    resize: vertical;
    min-height: 120px;
}

/* Honeypot — visually hidden, filled by bots only */
.tpl-hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Submit button — must keep WHITE text in both themes. The site-wide
   `button` rule forces color:var(--sheel-cream) which is dark in dark
   mode, so we override it to stay readable on the plum button. */
.tpl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 28px;
    font-size: 16px;
    color: #ffffff !important;
    cursor: pointer;
}

.tpl-btn svg {
    width: 18px;
    height: 18px;
}

.tpl-btn:hover {
    background-color: var(--ds-primary-dark, #3a2f59) !important;
    color: #ffffff !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 16px 32px rgba(77, 63, 118, 0.24) !important;
}

[data-theme="dark"] .tpl-btn,
[data-theme="dark"] .tpl-btn:hover {
    color: #ffffff !important;
}

/* Form status */
.tpl-form-status {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 600;
}

.tpl-form-status.is-success {
    color: var(--ds-success-text, #155724);
    background: var(--ds-success-bg, #d4edda);
    border: 1px solid rgba(26, 158, 90, 0.25);
}

.tpl-form-status.is-error {
    color: var(--ds-danger-text, #721c24);
    background: var(--ds-danger-bg, #f8d7da);
    border: 1px solid rgba(226, 123, 123, 0.35);
}

/* Channels */
.tpl-channel-list {
    list-style: none;
    margin: 0 0 18px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tpl-channel a {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--ds-bg-muted, var(--color-bg-secondary, #f8f7fa));
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.tpl-channel a:hover {
    background: var(--ds-bg-alt, #f5f5f5);
    transform: translateY(-1px);
}

.tpl-channel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--ds-bg-card, #ffffff);
    color: var(--ds-primary, #4d3f76);
    box-shadow: 0 2px 8px var(--ds-shadow-xs, rgba(0, 0, 0, 0.05));
}

.tpl-channel-icon svg {
    width: 22px;
    height: 22px;
}

.tpl-channel-icon.tpl-whatsapp {
    color: var(--ds-whatsapp, #25d366);
}

.tpl-channel-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.tpl-channel-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ds-text-muted, var(--color-text-secondary, #666));
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.tpl-channel-value {
    font-size: 16px;
    font-weight: 700;
    color: var(--ds-text, var(--color-text, #2a2733));
    word-break: break-word;
}

.tpl-hours {
    font-size: 14px;
    color: var(--ds-text-muted, var(--color-text-secondary, #666));
    border-top: 1px solid var(--ds-border, #e6e2ef);
    padding-top: 16px;
    margin: 4px 0 22px;
}

.tpl-socials-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--ds-text, var(--color-text, #2a2733));
    margin: 0 0 12px;
}

.tpl-socials-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tpl-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--ds-bg-card, #ffffff);
    border: 1px solid var(--ds-border, #e6e2ef);
    color: var(--ds-primary, #4d3f76);
    text-decoration: none;
    transition: transform 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.tpl-social-btn svg {
    width: 20px;
    height: 20px;
}

.tpl-social-btn:hover {
    transform: translateY(-3px);
    color: var(--ds-primary-dark, #3a2f59);
    box-shadow: 0 8px 18px var(--ds-shadow-sm, rgba(77, 63, 118, 0.15));
}

/* ---------- Blocks grid (about + contact info cards) ---------- */
.tpl-blocks-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

.tpl-contact-blocks {
    margin-top: 40px;
}

.tpl-block-card {
    padding: 28px;
}

.tpl-block-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: rgba(77, 63, 118, 0.09);
    color: var(--ds-primary, #4d3f76);
    margin-bottom: 18px;
}

.tpl-block-icon {
    width: 26px;
    height: 26px;
}

.tpl-block-heading {
    font-size: 18px;
    font-weight: 700;
    color: var(--ds-text, var(--color-text, #2a2733));
    margin: 0 0 10px;
}

.tpl-block-body {
    font-size: 15px;
    line-height: 1.75;
    color: var(--ds-text-muted, var(--color-text-secondary, #666));
}

.tpl-block-body p {
    margin: 0 0 10px;
}

.tpl-block-body p:last-child {
    margin-bottom: 0;
}

/* ---------- Legal sections (privacy / terms) ---------- */
.tpl-legal-sections {
    max-width: 820px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tpl-legal-section {
    padding: 28px 30px;
}

.tpl-legal-heading {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    font-size: 19px;
    font-weight: 700;
    color: var(--ds-text, var(--color-text, #2a2733));
    margin: 0 0 12px;
}

.tpl-legal-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 34px;
    height: 34px;
    padding: 0 6px;
    border-radius: 10px;
    background: rgba(77, 63, 118, 0.09);
    color: var(--ds-primary, #4d3f76);
    font-size: 14px;
    font-weight: 800;
}

.tpl-legal-body {
    font-size: 15px;
    line-height: 1.8;
    color: var(--ds-text-muted, var(--color-text-secondary, #666));
}

.tpl-legal-body p {
    margin: 0 0 12px;
}

.tpl-legal-body p:last-child {
    margin-bottom: 0;
}

.tpl-legal-empty {
    padding: 40px 30px;
    text-align: center;
    color: var(--ds-text-muted, var(--color-text-secondary, #666));
    font-size: 16px;
}

/* ---------- Dark mode ----------
   The page background goes dark; cards stay light with dark text so
   content is always readable. Text sitting directly on the page
   background (hero) switches to the light on-dark token. */
[data-theme="dark"] .tpl-page {
    background-color: var(--ds-bg-dark, #120e1c) !important;
}

[data-theme="dark"] .tpl-title {
    color: var(--ds-text-on-dark, #e8e4f0) !important;
}

[data-theme="dark"] .tpl-intro {
    color: rgba(232, 228, 240, 0.78) !important;
}

[data-theme="dark"] .tpl-card {
    background: var(--ds-bg-card, #ffffff) !important;
    border-color: var(--ds-border, #d6d0e8) !important;
}

[data-theme="dark"] .tpl-card-title,
[data-theme="dark"] .tpl-block-heading,
[data-theme="dark"] .tpl-legal-heading,
[data-theme="dark"] .tpl-socials-label,
[data-theme="dark"] .tpl-contact-form .tpl-field label,
[data-theme="dark"] .tpl-channel-value {
    color: var(--ds-text, #2a2733) !important;
}

[data-theme="dark"] .tpl-contact-form .tpl-field input,
[data-theme="dark"] .tpl-contact-form .tpl-field textarea {
    background: var(--ds-bg-muted, #f0ecf5) !important;
    color: var(--ds-text, #2a2733) !important;
}

[data-theme="dark"] .tpl-contact-form .tpl-field input:focus,
[data-theme="dark"] .tpl-contact-form .tpl-field textarea:focus {
    background: var(--ds-bg-card, #ffffff) !important;
}

[data-theme="dark"] .tpl-channel a {
    background: var(--ds-bg-muted, #f0ecf5) !important;
}

[data-theme="dark"] .tpl-channel a:hover {
    background: var(--ds-bg-alt, #f5f5f5) !important;
}

[data-theme="dark"] .tpl-hours,
[data-theme="dark"] .tpl-block-body,
[data-theme="dark"] .tpl-legal-body,
[data-theme="dark"] .tpl-legal-empty,
[data-theme="dark"] .tpl-channel-label {
    color: var(--ds-text-muted, #6b5b96) !important;
}

/* ---------- RTL ---------- */
[dir="rtl"] .tpl-legal-heading {
    flex-direction: row-reverse;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
    .tpl-page {
        padding: 36px 0 60px;
    }

    .tpl-title {
        font-size: 27px;
    }

    .tpl-intro {
        font-size: 15px;
    }

    .tpl-form-card,
    .tpl-channels-card {
        padding: 22px;
    }

    .tpl-legal-section {
        padding: 22px;
    }

    .tpl-hero-badge {
        width: 56px;
        height: 56px;
        border-radius: 16px;
    }

    .tpl-hero-badge svg {
        width: 26px;
        height: 26px;
    }
}
