/*
Theme Name: Dojang TKD
Description: A full-width, modern theme for a taekwondo dojang: home page, programs, news, events, calendar, free trial and contact forms.
Version: 1.0.0
Requires at least: 6.0
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: dojang-tkd
*/

:root {
	--ink: #0E1116;
	--ink-2: #1B212B;
	--paper: #F4F5F7;
	--white: #FFFFFF;
	--line: #D9DDE3;
	--muted: #4A5260;
	--muted-dark: #D5DAE2;
	--red: #C8102E;
	--red-dark: #A50D26;
	--blue: #0B4DA2;
	--display: 'Barlow Condensed', 'Arial Narrow', sans-serif;
	--body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
	--gutter: clamp(20px, 5vw, 80px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); font-size: 17px; line-height: 1.55; color: var(--ink); background: var(--paper); overflow-x: hidden; }
img { max-width: 100%; height: auto; }
a { color: var(--blue); }
a:hover { color: #08397A; }
:focus-visible { outline: 3px solid #F2C230; outline-offset: 2px; }
input, select, textarea, button { font: inherit; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; text-transform: uppercase; line-height: 1.02; margin: 0; }
p { margin: 0 0 1em; }

.dj-skip { position: absolute; left: -9999px; top: 0; background: var(--white); color: var(--ink); padding: 12px 16px; z-index: 100; }
.dj-skip:focus { left: 8px; top: 8px; }
.dj-wrap { max-width: 1360px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.dj-wrap--narrow { max-width: 920px; }

/* Buttons */
.dj-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border: 1.5px solid transparent; border-radius: 4px; font-weight: 600; text-decoration: none; cursor: pointer; }
.dj-btn--lg { min-height: 54px; padding: 0 28px; font-size: 18px; }
.dj-btn--block { width: 100%; min-height: 54px; font-size: 18px; }
.dj-btn--accent { background: var(--red); color: var(--white); }
.dj-btn--accent:hover { background: var(--red-dark); color: var(--white); }
.dj-btn--ghost { border-color: #8A93A1; color: var(--white); }
.dj-btn--ghost:hover { border-color: var(--white); color: var(--white); }
.dj-btn--dark { background: var(--ink); color: var(--white); }
.dj-btn--dark:hover { background: var(--ink-2); color: var(--white); }
.dj-btn--outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.dj-btn--outline:hover { background: var(--ink); color: var(--white); }

/* Header */
.dj-header { background: var(--ink); color: var(--white); }
.dj-header__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 32px; padding-top: 14px; padding-bottom: 14px; }
.dj-brand a { font-family: var(--display); font-weight: 700; font-size: 28px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--white); text-decoration: none; display: inline-flex; align-items: center; min-height: 46px; }
.dj-brand img { max-height: 56px; width: auto; display: block; }
.dj-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; }
.dj-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0 28px; }
.dj-menu a { color: var(--muted-dark); text-decoration: none; font-weight: 500; display: inline-flex; align-items: center; min-height: 46px; }
.dj-menu a:hover, .dj-menu .current-menu-item > a, .dj-menu .current_page_item > a { color: var(--white); }
.dj-navtoggle { display: none; background: transparent; color: var(--white); border: 1.5px solid #8A93A1; border-radius: 4px; min-height: 46px; padding: 0 18px; font-weight: 600; cursor: pointer; }

@media (max-width: 860px) {
	.dj-navtoggle { display: inline-flex; align-items: center; }
	.dj-nav { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 8px; padding: 8px 0 12px; }
	.dj-nav.is-open { display: flex; }
	.dj-menu { flex-direction: column; }
	.dj-menu a { width: 100%; border-top: 1px solid #2A313C; }
}

/* Hero */
.dj-hero { background-color: var(--ink); background-size: cover; background-position: center; color: var(--white); padding: clamp(72px, 11vw, 170px) 0; }
.dj-hero__text { max-width: 700px; }
.dj-hero__eyebrow { font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; font-size: 14px; color: #C3CAD4; margin: 0 0 20px; }
.dj-hero__title { font-size: clamp(52px, 8vw, 116px); line-height: 0.92; }
.dj-hero__lead { font-size: 20px; color: var(--muted-dark); max-width: 540px; margin: 24px 0 0; }
.dj-hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }

.dj-belts { display: flex; height: 16px; }
.dj-belts span { flex: 1; }
.dj-belts span:nth-child(1) { background: #FFFFFF; }
.dj-belts span:nth-child(2) { background: #F2C230; }
.dj-belts span:nth-child(3) { background: #1F8A4C; }
.dj-belts span:nth-child(4) { background: #0B4DA2; }
.dj-belts span:nth-child(5) { background: #C8102E; }
.dj-belts span:nth-child(6) { background: #0E1116; }

/* Page header */
.dj-pagehead { background: var(--ink); color: var(--white); padding: clamp(48px, 7vw, 96px) 0; }
.dj-pagehead__title { font-size: clamp(44px, 6.5vw, 88px); line-height: 0.95; }
.dj-pagehead__sub { margin: 16px 0 0; color: var(--muted-dark); font-size: 19px; max-width: 620px; }

/* Sections */
.dj-section { padding: clamp(56px, 7vw, 96px) 0; }
.dj-section--white { background: var(--white); }
.dj-h2 { font-size: clamp(36px, 4.5vw, 60px); margin-bottom: 32px; }
.dj-h2--gap { margin-top: 64px; }
.dj-kicker { font-weight: 600; font-size: 14px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue); }
.dj-more { margin: 28px 0 0; font-weight: 600; }
.dj-empty { color: var(--muted); }
.dj-note { background: #FFF6D6; border: 1px solid #E5C64A; padding: 12px 16px; font-size: 15px; }

.dj-grid { display: grid; gap: 20px; }
.dj-grid--4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.dj-grid--3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.dj-card { background: var(--white); border: 1px solid var(--line); display: flex; flex-direction: column; }
.dj-card__photo { height: 210px; background-color: var(--ink-2); background-size: cover; background-position: center; }
.dj-card__img { display: block; background: var(--ink-2); }
.dj-card__img img { display: block; width: 100%; height: 210px; object-fit: cover; }
.dj-card__body { padding: 24px 28px 28px; display: flex; flex-direction: column; gap: 10px; }
.dj-card__body p { margin: 0; color: var(--muted); }
.dj-card__title { font-size: 32px; }
.dj-card__title a, .dj-newsline__title a, .dj-event__title a { color: var(--ink); text-decoration: none; }
.dj-card__title a:hover, .dj-newsline__title a:hover, .dj-event__title a:hover { color: var(--blue); text-decoration: underline; }

.dj-split { display: flex; flex-wrap: wrap; gap: 56px; }
.dj-split__col { flex: 1 1 380px; min-width: 0; }

.dj-event { display: flex; gap: 20px; align-items: center; padding: 18px 0; border-top: 1px solid var(--line); }
.dj-event:last-of-type { border-bottom: 1px solid var(--line); }
.dj-event__date { flex: none; width: 76px; height: 76px; background: var(--ink); color: var(--white); display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--display); text-transform: uppercase; line-height: 1; }
.dj-event__mon { font-size: 17px; letter-spacing: 0.08em; color: var(--muted-dark); }
.dj-event__day { font-size: 36px; font-weight: 700; }
.dj-event__title { font-size: 28px; }
.dj-event__meta { margin: 6px 0 0; color: var(--muted); font-size: 16px; }

.dj-newsline { padding: 18px 0; border-top: 1px solid var(--line); }
.dj-newsline:last-of-type { border-bottom: 1px solid var(--line); }
.dj-newsline__title { font-size: 28px; margin-top: 6px; }

.dj-band { background-color: var(--ink); background-size: cover; background-position: center; color: var(--white); padding: clamp(56px, 7vw, 96px) 0; }
.dj-band__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 48px; }
.dj-band__title { font-size: clamp(40px, 5.5vw, 76px); line-height: 0.95; }
.dj-band__text { margin: 14px 0 0; color: var(--muted-dark); font-size: 19px; }

/* Calendar */
.dj-calnav { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 24px; }
.dj-calnav__title { font-size: clamp(32px, 4vw, 52px); }
.dj-calwrap { overflow-x: auto; border: 1px solid var(--line); }
.dj-cal { width: 100%; min-width: 720px; border-collapse: collapse; table-layout: fixed; }
.dj-cal th { background: var(--ink); color: var(--white); padding: 12px; font-weight: 600; text-align: left; }
.dj-cal td { border: 1px solid var(--line); vertical-align: top; height: 116px; padding: 8px; }
.dj-cal td.is-empty { background: var(--paper); }
.dj-cal td.is-today { background: #EAF1FB; }
.dj-cal td.is-today .dj-cal__num { background: var(--blue); color: var(--white); }
.dj-cal__num { display: inline-flex; align-items: center; justify-content: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 14px; font-weight: 600; font-size: 15px; }
.dj-cal__ev { display: block; margin-top: 6px; padding: 5px 8px; background: var(--red); color: var(--white); font-size: 14px; font-weight: 600; line-height: 1.25; text-decoration: none; border-radius: 3px; overflow-wrap: anywhere; }
.dj-cal__ev:hover { background: var(--red-dark); color: var(--white); }

/* Contact + forms */
.dj-contact { margin: 0 0 28px; display: grid; grid-template-columns: max-content 1fr; gap: 12px 24px; }
.dj-contact dt { font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; font-size: 14px; color: var(--muted); padding-top: 3px; }
.dj-contact dd { margin: 0; }
.dj-map iframe { display: block; width: 100%; height: 320px; border: 1px solid var(--line); }

.dj-form { background: var(--white); border: 1px solid var(--line); padding: clamp(22px, 4vw, 40px); }
.dj-form__row { display: flex; flex-wrap: wrap; gap: 0 18px; }
.dj-form__row .dj-field { flex: 1 1 200px; min-width: 0; }
.dj-field { margin: 0 0 18px; }
.dj-field label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.dj-field input, .dj-field select, .dj-field textarea { width: 100%; min-height: 48px; padding: 10px 14px; border: 1.5px solid #8A93A1; border-radius: 4px; background: var(--white); color: var(--ink); }
.dj-field textarea { resize: vertical; }
.dj-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.dj-alert { padding: 14px 16px; font-weight: 600; border-left-width: 0; }
.dj-alert--ok { background: #E3F4EA; color: #14532D; }
.dj-alert--err { background: #FBE5E8; color: #7A0A1C; }

/* Editor content */
.dj-content { max-width: 100%; }
.dj-content > * { max-width: 820px; }
.dj-content > .alignwide, .dj-content > .wp-block-table, .dj-content > figure.wp-block-table { max-width: 100%; }
.dj-content h2 { font-size: clamp(32px, 4vw, 48px); margin: 48px 0 20px; }
.dj-content h3 { font-size: 28px; margin: 32px 0 12px; }
.dj-content .wp-block-table { margin: 0 0 24px; overflow-x: auto; }
.dj-content table { width: 100%; min-width: 560px; border-collapse: collapse; }
.dj-content th { background: var(--ink); color: var(--white); text-align: left; font-weight: 600; }
.dj-content th, .dj-content td { padding: 14px 18px; border: 1px solid var(--line); }
.dj-content tbody tr:nth-child(even) { background: var(--paper); }
.dj-feature { margin: 0 0 32px; }
.dj-feature img { display: block; width: 100%; }

.dj-pager { margin-top: 40px; }
.dj-pager ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.dj-pager a, .dj-pager span { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; min-height: 46px; padding: 0 12px; border: 1.5px solid var(--ink); color: var(--ink); text-decoration: none; font-weight: 600; }
.dj-pager .current { background: var(--ink); color: var(--white); }

/* Footer */
.dj-footer { background: var(--ink); color: #A9B1BD; font-size: 16px; }
.dj-footer a { color: var(--muted-dark); }
.dj-footer__in { display: flex; flex-wrap: wrap; gap: 32px 72px; padding-top: 48px; padding-bottom: 32px; }
.dj-footer__col { min-width: 180px; }
.dj-footer__col p { margin: 0; }
.dj-footer__name { font-family: var(--display); font-weight: 700; font-size: 26px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--white); margin-bottom: 8px; }
.dj-footer__head { font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; font-size: 14px; color: var(--white); margin-bottom: 8px; }
.dj-footer__copy { border-top: 1px solid #2A313C; padding-top: 20px; padding-bottom: 28px; font-size: 15px; }

/* Small-screen and long-word fixes */
.dj-grid > *, .dj-card__body { min-width: 0; }
.dj-card__title, .dj-newsline__title, .dj-event__title, .dj-pagehead__title, .dj-hero__title { overflow-wrap: anywhere; }
.dj-grid--3 .dj-card__title { font-size: 28px; }
@media (max-width: 860px) {
	.dj-split--form .dj-split__col:last-child { order: -1; }
}
