/*
Theme Name: EdFlex
Theme URI: https://edflex.ca/
Author: EdFlex
Description: Block theme for EdFlex — college course development, revamps and course hosting.
Version: 1.6.1
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: edflex
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
:where(.wp-site-blocks) > * { margin-block-start: 0; }
.ef-wrap { max-width: 1200px; margin-inline: auto; padding-inline: 24px; }

/* ---------- Header ---------- */
.ef-header { background: #fff; border-bottom: 1px solid var(--wp--preset--color--line); }
.ef-logo { text-decoration: none; display: inline-flex; flex-direction: column; line-height: 1; }
.ef-logo__mark { display: block; width: 136px; height: auto; }
.ef-logo__word { font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 30px; letter-spacing: -0.5px; }
.ef-logo__ed { color: var(--wp--preset--color--blue); }
.ef-logo__flex { color: var(--wp--preset--color--green-dark); }
.ef-logo__tag { font-size: 11px; color: var(--wp--preset--color--muted); letter-spacing: 1.5px; text-transform: uppercase; margin-top: 2px; }
.ef-header .wp-block-navigation a { color: var(--wp--preset--color--ink); text-decoration: none; font-weight: 500; }
.ef-header .wp-block-navigation a:hover { color: var(--wp--preset--color--blue); }

/* ---------- Shared section bits ---------- */
.ef-section { padding-block: 88px; }
.ef-eyebrow { font-size: 14px !important; letter-spacing: 2px; text-transform: uppercase; font-weight: 600; color: var(--wp--preset--color--green-dark); margin-bottom: 12px !important; }
.ef-dark .ef-eyebrow, .ef-eyebrow.on-dark { color: var(--wp--preset--color--green); }
.ef-lead { font-size: 18px; color: var(--wp--preset--color--body); max-width: 720px; margin-left: max(0px, calc((100% - 1200px) / 2)) !important; margin-right: auto !important; }
.ef-dark { background: var(--wp--preset--color--navy); color: #fff; }
.ef-dark h1, .ef-dark h2, .ef-dark h3 { color: #fff; }
.ef-dark .ef-lead, .ef-dark p.ef-soft { color: #C9D4DE; }
.ef-dark a:not(.wp-element-button) { color: #FFFFFF; }
.ef-dark a:not(.wp-element-button):hover { color: var(--wp--preset--color--green); }
.ef-white { background: #fff; border-block: 1px solid var(--wp--preset--color--line); }
.ef-tint { background: var(--wp--preset--color--tint); }

/* ---------- Hero ---------- */
.ef-hero { padding-block: 88px 96px; }
.ef-hero h1 { font-size: clamp(38px, 5vw, 60px); line-height: 1.05; letter-spacing: -1.5px; margin: 0 0 24px; }
.ef-hero .ef-lead { font-size: 20px; color: #C9D4DE; max-width: 560px; }
.ef-shell { width: 100%; max-width: 460px; margin-inline: auto; background: #fff; color: var(--wp--preset--color--ink); border-radius: 16px; padding: 24px; box-sizing: border-box; box-shadow: 0 24px 60px rgba(0,0,0,.35); font-size: 15px; }
.ef-shell__top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 8px; }
.ef-shell__title { font-family: var(--wp--preset--font-family--display); font-weight: 600; font-size: 18px; }
.ef-pill { font-size: 13px; background: #E6F1DC; color: #2F5F0E; padding: 4px 10px; border-radius: 999px; font-weight: 600; }
.ef-shell__row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #F2F5F4; border-radius: 8px; margin-top: 8px; }
.ef-shell__row.is-open { background: #EAF3F9; flex-wrap: wrap; }
.ef-shell__num { font-family: var(--wp--preset--font-family--display); color: var(--wp--preset--color--muted); width: 26px; }
.ef-shell__chips { display: flex; flex-wrap: wrap; gap: 6px; padding-left: 38px; width: 100%; }
.ef-shell__chips span { font-size: 13px; background: #fff; border: 1px solid #C6DCEB; border-radius: 6px; padding: 3px 8px; }

/* ---------- Proof strip ---------- */
.ef-proof { padding-block: 24px; font-size: 15px; color: #33424F; }
.ef-proof p { margin: 0; }
.ef-proof p:first-child { font-weight: 600; color: var(--wp--preset--color--ink); }

/* ---------- Cards ---------- */
.ef-card { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 14px; padding: 28px !important; }
.ef-card h3 { font-size: 22px; margin: 14px 0 8px; }
.ef-card p { margin: 0; color: var(--wp--preset--color--body); }
.ef-card p + p { margin-top: 12px; }
.ef-card.is-soft { background: var(--wp--preset--color--bg); }
.ef-card.is-dark { background: var(--wp--preset--color--navy); border-color: var(--wp--preset--color--navy); }
.ef-card.is-dark h3 { color: #fff; }
.ef-card.is-dark p { color: #C9D4DE; }
.ef-card.is-wide { grid-column: 1 / -1; }
.ef-icon { display: block; line-height: 0; }

/* ---------- Checklist ---------- */
ul.ef-checks { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 10px; color: #33424F; }
ul.ef-checks li { position: relative; padding-left: 30px; }
ul.ef-checks li::before { content: ""; position: absolute; left: 0; top: 4px; width: 20px; height: 20px;
  background: no-repeat center / 20px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233E7D14' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E"); }

/* ---------- Case studies ---------- */
.ef-case { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 16px; overflow: hidden; }
.ef-case__head { background: var(--wp--preset--color--navy); padding: 28px !important; }
.ef-case__head p { margin: 0 0 6px; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--wp--preset--color--green); font-weight: 600; }
.ef-case__head h3 { margin: 0; color: #fff; font-size: 26px; line-height: 1.2; }
.ef-case__body { padding: 28px !important; }
.ef-case__body p { color: var(--wp--preset--color--body); margin: 0 0 16px; }
.ef-case__body strong { color: var(--wp--preset--color--ink); }
.ef-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.ef-tags span { font-size: 13px; background: #EAF3F9; color: #0B4A6E; border-radius: 6px; padding: 4px 10px; }

/* ---------- Principles & process ---------- */
.ef-principle h3, .ef-step h3 { font-size: 20px; margin: 6px 0; }
.ef-principle p, .ef-step p { margin: 0; color: var(--wp--preset--color--body); font-size: 16px; }
.ef-step { border-top: 3px solid var(--wp--preset--color--blue); padding-top: 18px !important; }
.ef-step__num { font-family: var(--wp--preset--font-family--display); font-size: 15px !important; color: var(--wp--preset--color--blue-dark); font-weight: 600; margin: 0 !important; }

/* ---------- Contact form (Contact Form 7) ---------- */
.wpcf7 { max-width: 560px; margin-top: 32px; }
.ef-form-card { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 16px; padding: 32px !important; }
.ef-form-card .wpcf7 { max-width: none; margin-top: 0; }
.ef-form-card h2 { font-size: 26px; margin: 0 0 6px; }
.ef-form-card > p { color: var(--wp--preset--color--body); margin: 0 0 20px; }
.wpcf7 form { display: grid; gap: 18px; }
.wpcf7 form p { margin: 0; }
.wpcf7 label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 15px; color: var(--wp--preset--color--ink); }
.wpcf7 .wpcf7-form-control-wrap { display: block; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 textarea, .wpcf7 select {
  font: inherit; font-weight: 400; font-size: 16px; color: var(--wp--preset--color--ink);
  width: 100%; box-sizing: border-box; min-height: 46px; padding: 12px 14px;
  background: #fff; border: 1px solid #A9B6C1; border-radius: 8px; }
.wpcf7 textarea { min-height: 150px; resize: vertical; }
.wpcf7 select { appearance: none; -webkit-appearance: none; padding-right: 44px; cursor: pointer;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234A5A68' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center / 18px; }
.wpcf7 input:focus-visible, .wpcf7 textarea:focus-visible, .wpcf7 select:focus-visible { outline: 2px solid var(--wp--preset--color--blue); outline-offset: 1px; border-color: var(--wp--preset--color--blue); }
.wpcf7 input:focus-visible, .wpcf7 textarea:focus-visible { outline: 2px solid var(--wp--preset--color--blue); outline-offset: 1px; border-color: var(--wp--preset--color--blue); }
.wpcf7 input[type="submit"] { font: inherit; font-weight: 600; font-size: 16px; color: #fff; background: var(--wp--preset--color--blue);
  border: 0; border-radius: 8px; padding: 14px 24px; min-height: 48px; cursor: pointer; }
.wpcf7 input[type="submit"]:hover { background: var(--wp--preset--color--blue-dark); }
.wpcf7 .wpcf7-spinner { vertical-align: middle; }
.wpcf7-not-valid-tip { color: #B42318; font-size: 14px; font-weight: 500; margin-top: 4px; }
.wpcf7 form .wpcf7-response-output { margin: 0; padding: 12px 14px; border-radius: 8px; font-size: 15px; }
.wpcf7 form.invalid .wpcf7-response-output, .wpcf7 form.unaccepted .wpcf7-response-output, .wpcf7 form.spam .wpcf7-response-output, .wpcf7 form.failed .wpcf7-response-output { border: 1px solid #F5B556; background: #FFF6E8; color: #6B3F00; }
/* After a successful send, the form is replaced by the confirmation. */
.wpcf7 form.sent > :not(.wpcf7-response-output) { display: none; }
.wpcf7 form.sent .wpcf7-response-output { border: 0; background: #E6F1DC; color: #23480A; padding: 28px; font-size: 18px; font-weight: 500; line-height: 1.5; }

/* ---------- Contact page ---------- */
.ef-contact-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 18px; }
.ef-contact-list li { display: grid; gap: 2px; }
.ef-contact-list strong { font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--wp--preset--color--green-dark); }
.ef-contact-list a { font-size: 19px; font-weight: 600; text-decoration: none; }
.ef-contact-list span { font-size: 19px; font-weight: 600; }
ol.ef-next { margin: 12px 0 0; padding-left: 22px; display: grid; gap: 8px; color: var(--wp--preset--color--body); }

/* ---------- Blog ---------- */
.ef-page-hero { padding-block: 72px 80px; }
.ef-page-hero h1 { font-size: clamp(36px, 4.5vw, 54px); line-height: 1.08; letter-spacing: -1.2px; margin: 0 0 16px; color: #fff; }
.ef-page-hero .ef-lead { color: #C9D4DE; }
.ef-post-grid { gap: 28px !important; }
.ef-post-card { background: #fff; border: 1px solid var(--wp--preset--color--line); border-radius: 16px; overflow: hidden; height: 100%; display: flex; flex-direction: column; transition: box-shadow .2s ease, transform .2s ease; }
.ef-post-card:hover { box-shadow: 0 14px 34px rgba(15,30,46,.12); transform: translateY(-2px); }
.ef-post-card__image { margin: 0 !important; }
.ef-post-card__image img { display: block; width: 100%; }
.ef-post-card__body { padding: 22px 24px 26px !important; display: flex; flex-direction: column; gap: 10px; flex-grow: 1; }
.ef-post-card__body > * { margin: 0 !important; }
.ef-post-cat, .ef-post-cat a { font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 600; color: var(--wp--preset--color--green-dark); text-decoration: none; }
.ef-post-cat.on-dark, .ef-post-cat.on-dark a { color: var(--wp--preset--color--green); }
.ef-post-card__title { font-size: 21px !important; line-height: 1.25; letter-spacing: -0.3px; }
.ef-post-card__title a { color: var(--wp--preset--color--ink); text-decoration: none; }
.ef-post-card__title a:hover { color: var(--wp--preset--color--blue-dark); }
.ef-post-card__excerpt p { margin: 0; color: var(--wp--preset--color--body); font-size: 16px; }
.ef-post-card__excerpt .wp-block-post-excerpt__more-text { display: none; }
.ef-post-date { font-size: 14px; color: var(--wp--preset--color--muted); margin-top: auto !important; }
.wp-block-query-pagination { margin-top: 48px; gap: 12px; font-weight: 600; }

.ef-post-hero { padding-block: 72px 140px; }
.ef-post-hero h1 { font-size: clamp(32px, 4.2vw, 50px); line-height: 1.1; letter-spacing: -1px; margin: 12px 0 18px; color: #fff; }
.ef-post-meta { gap: 14px; color: #A9B6C1; font-size: 15px; }
.ef-post-meta > * { margin: 0; }
.ef-post-meta p::after { content: "·"; margin-left: 14px; }
.ef-article { padding-bottom: 88px; }
.ef-article__image { margin-top: -96px !important; margin-bottom: 48px !important; margin-left: auto !important; margin-right: auto !important; }
.ef-article__image img { border-radius: 16px; box-shadow: 0 20px 50px rgba(15,30,46,.25); display: block; width: 100%; }
.ef-prose { font-size: 18px; line-height: 1.75; color: #24323F; }
.ef-prose > p:first-child { font-size: 21px; line-height: 1.6; color: var(--wp--preset--color--ink); }
.ef-prose h2, .ef-prose h3 { letter-spacing: -0.4px; margin-top: 48px !important; margin-bottom: 12px !important; }
.ef-prose h2 { font-size: 28px !important; }
.ef-prose h3 { font-size: 22px !important; }
.ef-prose ul, .ef-prose ol { padding-left: 24px; }
.ef-prose li { margin-bottom: 8px; }
.ef-prose li::marker { color: var(--wp--preset--color--green-dark); }
.ef-prose a { color: var(--wp--preset--color--blue-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.ef-cta { background: var(--wp--preset--color--navy); color: #C9D4DE; border-radius: 16px; padding: 36px !important; margin-top: 56px !important; }
.ef-cta h3 { color: #fff; font-size: 24px; margin: 0 0 8px; }
.ef-cta p { margin: 0 0 20px; }
.ef-back { margin-top: 32px !important; font-weight: 600; }
.ef-back a { text-decoration: none; }
@media (max-width: 600px) {
  .ef-post-hero { padding-block: 48px 110px; }
  .ef-article__image { margin-top: -80px !important; }
  .ef-cta { padding: 26px !important; }
}

/* ---------- Footer ---------- */
.ef-footer { background: #0A1520; color: #A9B6C1; font-size: 14px; }
.ef-footer a { color: #C9D4DE; }
.ef-footer .wp-block-navigation a { color: #C9D4DE; }

/* ---------- Buttons: outline on dark ---------- */
.wp-block-button.is-style-outline-light .wp-block-button__link { background: transparent; color: #fff; border: 1px solid #5C7186; }
.wp-block-button.is-style-green .wp-block-button__link { background: var(--wp--preset--color--green); color: var(--wp--preset--color--navy); }

@media (max-width: 600px) {
  .ef-header .wp-block-buttons { display: none; }
  .ef-section { padding-block: 64px; }
  .ef-hero { padding-block: 56px 64px; }
}

/* Service pages (v1.6.0) */
.ef-page-hero .wp-block-buttons { margin-top: 28px; }
.ef-page-hero h1 { max-width: 900px; }
.ef-card a, .ef-section .ef-lead a, .ef-section ul.ef-checks a { color: var(--wp--preset--color--blue-dark); text-underline-offset: 3px; }
.ef-faq { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px 40px; margin-top: 36px; }
.ef-faq__item { border-top: 1px solid var(--wp--preset--color--line); padding-top: 20px !important; }
.ef-faq__item h3 { font-size: 19px !important; margin: 0 0 8px !important; }
.ef-faq__item p { margin: 0; color: var(--wp--preset--color--body); }
