/* Soccer Engine Theme: site shell, news cards, article. Plugin output is styled in soccer-engine.css. */

:root {
  --se-ink: var(--wp--preset--color--foreground);
  --se-muted: var(--wp--preset--color--muted);
  --se-border: var(--wp--preset--color--border);
  --se-surface: var(--wp--preset--color--surface);
  --se-accent: var(--wp--preset--color--accent);
  --se-violet: var(--wp--preset--color--violet);
  --se-night: var(--wp--preset--color--dark);
  --se-night-soft: var(--wp--preset--color--dark-soft);
  --se-lime: var(--wp--preset--color--lime);
  --se-radius: var(--wp--custom--border--radius);
  --se-radius-lg: var(--wp--custom--border--radius-lg);
  --se-display: var(--wp--preset--font-family--display);
  --se-brand: linear-gradient(100deg, var(--se-accent) 0%, var(--se-violet) 100%);
}

body { -webkit-font-smoothing: antialiased; }
.wp-site-blocks { display: flex; flex-direction: column; min-height: 100vh; }
.wp-site-blocks > main { flex: 1; }
.wp-site-blocks > * + * { margin-block-start: 0; }

/* ---------- Header */
.se-header { position: relative; padding-block: 0; }
.se-header::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--se-brand); }
.se-header__inner { min-height: 4.25rem; gap: 1.5rem; }
.se-brand a { display: inline-flex; align-items: center; gap: .6rem; color: #fff; }
.se-brand a::before { content: ""; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--se-brand); box-shadow: inset 0 0 0 .32rem var(--se-night), inset 0 0 0 .5rem #fff; flex: none; }
.se-header__nav { gap: 1.5rem; }
.se-nav .wp-block-navigation__container { gap: 0; }
.se-nav .wp-block-navigation-item__content { padding: 1.45rem .8rem; color: #fff; text-transform: uppercase; letter-spacing: .04em; font-size: .8125rem; position: relative; }
.se-nav .wp-block-navigation-item__content:hover { text-decoration: none; color: var(--se-lime); }
.se-nav .current-menu-item > .wp-block-navigation-item__content::after { content: ""; position: absolute; left: .8rem; right: .8rem; bottom: 0; height: 3px; background: #fff; z-index: 1; }
.se-button-small .wp-block-button__link { padding: .5rem 1rem; font-size: .8125rem; background: var(--se-brand); white-space: nowrap; }
.se-nav .wp-block-navigation__responsive-container.is-menu-open { padding: 1.5rem; }
.se-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { padding: .7rem 0; font-size: 1.1rem; }
@media (max-width: 599px) { .se-header__cta { display: none !important; } }

/* ---------- Hero band on inner pages */
.se-hero { position: relative; padding-block: clamp(2rem, 5vw, 3.5rem); overflow: hidden; background: radial-gradient(120% 140% at 100% 0%, #3a1a8a 0%, transparent 55%), radial-gradient(90% 120% at 0% 100%, #7a0a4d 0%, transparent 50%), var(--se-night) !important; }
.se-hero__title { margin: 0; font-size: var(--wp--preset--font-size--display); color: #fff; }
.se-hero__title--article { font-size: clamp(2rem, 4vw, 3.1rem); text-transform: none; max-width: 22ch; letter-spacing: 0; }
.se-hero__meta { margin-top: .9rem; color: var(--wp--preset--color--on-dark-muted); font-size: .875rem; }
.se-hero > * + * { margin-block-start: .6rem; }

.se-kicker, .se-kicker a { font-size: .75rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--se-accent); text-decoration: none; }
.se-kicker--light, .se-kicker--light a { color: var(--se-lime); }
p.se-kicker { margin-block: 0; }

/* ---------- Page body */
.se-body { padding-block: var(--wp--custom--layout--section); }
.se-body--data { padding-block: clamp(1.5rem, 3vw, 2.5rem) var(--wp--custom--layout--section); }
.se-main--full > .wp-block-post-content > :first-child { margin-block-start: 0; }
.se-body .wp-block-post-content > p:first-child { color: var(--se-muted); font-size: 1.05rem; }

.se-section { padding-block: clamp(2rem, 4vw, 3.25rem); }
.se-section--tint { background: var(--se-surface); }
.se-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; border-bottom: 2px solid var(--se-ink); padding-bottom: .55rem; }
.se-section-head h2 { margin: 0; font-size: 1.75rem; }
.se-section-head p { margin: 0; font-size: .8125rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.se-section-head a { color: var(--se-ink); }
.se-section-head a::after { content: " \2192"; color: var(--se-accent); }

/* ---------- Panels (sidebar blocks, table card) */
.se-panel { background: #fff; border: 1px solid var(--se-border); border-radius: var(--se-radius-lg); padding: 1.1rem 1.1rem .6rem; box-shadow: var(--wp--custom--shadow--card); }
.se-panel + .se-panel { margin-top: 1.5rem; }
.se-panel__title { margin: 0 0 .9rem; font-size: 1.35rem; padding-bottom: .5rem; border-bottom: 2px solid var(--se-ink); }

/* ---------- News cards */
.se-news-grid .wp-block-post-template { gap: 1.5rem; }
.se-card { height: 100%; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--se-border); border-radius: var(--se-radius-lg); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease; }
.se-card:hover { transform: translateY(-3px); box-shadow: var(--wp--custom--shadow--card); }
.se-card > * { margin-block: 0; }
.se-card__media { margin: 0; background: var(--se-night-soft); }
.se-card__media img { display: block; width: 100%; }
.se-card__body { padding: 1rem 1.1rem 1.15rem; display: flex; flex-direction: column; gap: .5rem; flex: 1; }
.se-card__body > * { margin-block: 0; }
.se-card__title { font-family: var(--wp--preset--font-family--body); text-transform: none; letter-spacing: -.01em; font-size: 1.1rem; line-height: 1.3; font-weight: 700; }
.se-card__title a:hover { color: var(--se-accent); text-decoration: none; }
.se-card__excerpt { color: var(--se-muted); font-size: .9rem; line-height: 1.55; }
.se-card__excerpt p { margin: 0; }
.se-card__date { margin-top: auto !important; padding-top: .4rem; color: var(--se-muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.se-pagination { margin-top: 2.5rem; gap: .5rem; font-weight: 600; }
.se-pagination a, .se-pagination .current { padding: .35rem .75rem; border-radius: var(--se-radius); color: var(--se-ink); }
.se-pagination .current { background: var(--se-ink); color: #fff; }

/* Compact list: thumb left, title right */
.se-news-list .wp-block-post-template { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.se-news-list .wp-block-post-template > li { margin: 0; }
.se-news-item { display: grid; grid-template-columns: 6.25rem 1fr; gap: .9rem; align-items: center; padding: .8rem 0; border-top: 1px solid var(--se-border); }
.se-news-list li:first-child .se-news-item { border-top: 0; padding-top: 0; }
.se-news-item > * { margin-block: 0; }
.se-news-item__media { margin: 0; border-radius: var(--se-radius); overflow: hidden; background: var(--se-night-soft); }
.se-news-item__media img { display: block; width: 100%; }
.se-news-item__body > * { margin-block: 0; }
.se-news-item__title { margin-top: .25rem !important; font-family: var(--wp--preset--font-family--body); text-transform: none; letter-spacing: -.01em; font-size: .95rem; line-height: 1.3; font-weight: 700; }
.se-news-item__title a:hover { color: var(--se-accent); text-decoration: none; }

/* ---------- Home: lead story */
.se-lead { gap: 1.75rem; margin-bottom: 0; }
.se-lead-story { position: relative; border-radius: var(--se-radius-lg); overflow: hidden; background: var(--se-night); min-height: 100%; }
.se-lead-story > * { margin-block: 0; }
.se-lead-story .wp-block-post-template { margin: 0; padding: 0; list-style: none; height: 100%; }
.se-lead-story .wp-block-post-template > li { height: 100%; position: relative; }
.se-lead-story__media { margin: 0; height: 100%; }
.se-lead-story__media a, .se-lead-story__media img { display: block; width: 100%; height: 100%; min-height: 24rem; object-fit: cover; }
.se-lead-story__body { position: absolute; inset: auto 0 0 0; padding: 5rem 1.6rem 1.5rem; background: linear-gradient(to top, rgba(12, 15, 44, .96) 20%, rgba(12, 15, 44, .7) 60%, transparent); color: #fff; pointer-events: none; }
.se-lead-story__body > * { margin-block: 0; pointer-events: auto; }
.se-lead-story__title { margin-top: .5rem !important; font-size: clamp(1.9rem, 3.2vw, 2.8rem); text-transform: none; letter-spacing: 0; max-width: 20ch; }
.se-lead-story__title a { color: #fff !important; }
.se-lead-story__excerpt { margin-top: .6rem !important; color: #d5d7ee; max-width: 52ch; font-size: .95rem; }
.se-lead-story__excerpt p { margin: 0; }

/* ---------- Home: match strip */
.se-strip { background: var(--se-night-soft) !important; padding-block: .9rem; }
.se-strip > * { margin-block: 0; }

/* ---------- CTA band */
.se-cta { background: var(--se-brand) !important; color: #fff; padding-block: clamp(2.5rem, 5vw, 3.5rem); text-align: center; }
.se-cta h2 { margin: 0 0 .5rem; font-size: clamp(1.8rem, 3.4vw, 2.6rem); color: #fff; }
.se-cta p { margin: 0 auto 1.25rem; max-width: 46rem; color: #f3e9ff; }
.se-cta .wp-block-button__link { background: #fff; color: var(--se-ink); }
.se-cta .wp-block-button__link:hover { background: var(--se-night); color: #fff; }
.se-built { margin-top: 2rem; font-size: .875rem; color: var(--se-muted); }
.se-built summary { cursor: pointer; font-weight: 600; color: var(--se-ink); }
.se-built pre { background: var(--se-night); color: #e9eaff; border-radius: var(--se-radius); padding: 1rem; font-size: .8125rem; }

/* ---------- Article */
.se-article { gap: 2.5rem; }
.se-article__image { margin: 0 0 1.75rem; border-radius: var(--se-radius-lg); overflow: hidden; }
.se-article__image img { display: block; width: 100%; }
.se-article__content { font-size: 1.0625rem; line-height: 1.75; }
.se-article__content > p:first-child { font-size: 1.2rem; line-height: 1.6; color: var(--se-ink); font-weight: 500; }
.se-article__content h2 { font-size: 1.6rem; margin-top: 2.25rem; }
.se-article__side { position: sticky; top: 1.5rem; align-self: flex-start; }
@media (max-width: 781px) { .se-article__side { position: static; } }

/* ---------- Footer */
.se-footer { padding-block: 3rem 1.5rem; margin-top: 0; font-size: .9rem; }
.se-footer__grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr); gap: 2rem; }
.se-footer__grid > * { margin-block: 0; }
.se-footer__brand .wp-block-site-tagline { margin-top: .75rem; max-width: 26rem; line-height: 1.5; }
.se-footer__title { margin: 0 0 .8rem; font-size: 1.05rem; color: #fff; letter-spacing: .05em; }
.se-footer__col p { margin: 0 0 .45rem; }
.se-footer a { color: var(--wp--preset--color--on-dark-muted); }
.se-footer a:hover { color: #fff; text-decoration: none; }
.se-footer__bottom { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, .12); }
.se-footer__bottom p { margin: 0; }
@media (max-width: 781px) { .se-footer__grid { grid-template-columns: 1fr 1fr; } .se-footer__brand { grid-column: 1 / -1; } }

/* ---------- Inner pages: data runs wide, prose stays readable */
.se-body .wp-block-post-content > :where(p, ul, ol, details) { max-width: 46rem; }
.se-body .wp-block-post-content > * + * { margin-block-start: 1.5rem; }
.se-league-news { margin-top: 3rem !important; }
.se-section--built { padding-block: 1.5rem 2.5rem; }
.se-section--built .se-built { margin-top: 0; }
.se-panel--flush { height: 100%; }
.se-lead > .wp-block-column { display: flex; flex-direction: column; }
.se-lead > .wp-block-column > * { flex: 1; }
.se-data { gap: 2rem; }
.se-data .se-section-head:not(:first-child) { margin-top: 2.25rem; }

/* ---------- Small screens */
@media (max-width: 781px) {
  .se-brand a { font-size: 1.2rem; white-space: nowrap; }
  .se-header__inner { min-height: 3.5rem; }
  .se-news-grid .wp-block-post-template { grid-template-columns: 1fr !important; }
  .se-lead-story__media a, .se-lead-story__media img { min-height: 17rem; }
  .se-section-head h2 { font-size: 1.45rem; }
}
@media (min-width: 600px) and (max-width: 1000px) { .se-news-grid .wp-block-post-template { grid-template-columns: repeat(2, 1fr) !important; } }

/* Everything in the hero band lines up on the wide column */
.se-hero > * { max-width: var(--wp--style--global--wide-size) !important; margin-inline: auto !important; }
.se-body .se-article__content > p:first-child { color: var(--se-ink); font-size: 1.2rem; }
/* A list item without a thumbnail uses the full width */
.se-news-item:not(:has(.se-news-item__media)) { grid-template-columns: 1fr; }

/* ---------- Team and player hero (inc/entity-hero.php) */
.se-hero--entity { padding-block: clamp(1.75rem, 4vw, 3rem); }
.se-entity { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1.25rem clamp(1rem, 3vw, 2rem); align-items: center; }
.se-entity__badge { width: clamp(4.75rem, 11vw, 8rem); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; padding: clamp(.6rem, 1.4vw, 1rem); border-radius: var(--se-radius-lg); background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.se-entity__badge img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.se-entity__photo { width: clamp(5.5rem, 14vw, 10rem); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: linear-gradient(160deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .04)); border: 3px solid rgba(255, 255, 255, .2); }
.se-entity__photo img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.se-entity__text > * { margin-block: 0; }
.se-entity__text .se-hero__title { margin-top: .35rem; overflow-wrap: anywhere; }
.se-entity__form { display: flex; align-items: center; gap: .7rem; margin-top: .9rem; }
.se-entity__form > span, .se-fact dt { font-size: .6875rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--wp--preset--color--on-dark-muted); }
.se-entity__club { display: inline-flex; align-items: center; gap: .55rem; margin-top: .8rem; padding: .3rem .8rem .3rem .35rem; border-radius: var(--wp--custom--border--pill); background: rgba(255, 255, 255, .1); color: #fff; font-size: .875rem; font-weight: 600; }
.se-entity__club:hover { background: rgba(255, 255, 255, .2); text-decoration: none; color: #fff; }
.se-entity__club img { width: 1.6rem; height: 1.6rem; object-fit: contain; padding: .15rem; border-radius: 50%; background: #fff; }
.se-facts { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .6rem; margin: .25rem 0 0; }
.se-fact { min-width: 5.25rem; padding: .65rem .9rem .7rem; border: 1px solid rgba(255, 255, 255, .12); border-radius: var(--se-radius); background: rgba(255, 255, 255, .07); }
.se-fact dd { margin: .3rem 0 0; font-family: var(--se-display); font-size: 1.65rem; line-height: 1; font-weight: 700; color: #fff; white-space: nowrap; font-variant-numeric: tabular-nums; }
.se-fact dd .flag { vertical-align: baseline; }
.se-fact--lead { border-color: transparent; background: var(--se-brand); }
.se-fact--lead dt { color: rgba(255, 255, 255, .85); }
.se-card-y::before, .se-card-r::before { content: ""; display: inline-block; width: .6rem; height: .85rem; margin-right: .3rem; border-radius: 2px; background: #ffd21f; }
.se-card-r::before { background: #e5173f; margin-left: .5rem; }
@media (max-width: 600px) {
  .se-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .se-fact { min-width: 0; padding: .55rem .6rem .6rem; }
  .se-fact dd { font-size: 1.35rem; }
}

/* ---------- News cards: one rhythm inside the card (WordPress adds its own block gap) */
.se-card .se-card__body > * { margin-block: 0 !important; }
.se-card .se-card__body > .se-card__date { margin-top: auto !important; }

@media (max-width: 600px) {
  .se-body .se-article__content > p:first-child { font-size: 1.1rem; }
  .se-article__content { font-size: 1rem; line-height: 1.7; }
}

/* ---------- Logo mark (assets/images/mark.svg) in place of the placeholder ring */
.se-brand a::before { width: 2rem; height: 2rem; border-radius: 0; box-shadow: none; background: url(../images/mark.svg) center / contain no-repeat; }
.se-panel__sub { margin: 1rem 0 .5rem; font-size: 1.1rem; }
.se-panel > .wp-block-shortcode, .se-panel > p { margin-block: 0 .6rem; }
/* Search results: a club crest or a player cut-out is shown whole, not cropped like a news photo */
.se-news-grid li.type-wpse_team .se-card__media, .se-news-grid li.type-wpse_player .se-card__media { background: var(--se-surface); }
.se-news-grid li.type-wpse_team .se-card__media img, .se-news-grid li.type-wpse_player .se-card__media img { object-fit: contain !important; padding: 1.1rem; box-sizing: border-box; }
.se-news-grid li.type-wpse_team .se-card__date, .se-news-grid li.type-wpse_player .se-card__date, .se-news-grid li.type-page .se-card__date,
.se-news-grid li.type-wpse_team .se-card__excerpt, .se-news-grid li.type-wpse_player .se-card__excerpt { display: none; }
.se-news-grid li.type-wpse_team .se-card__body::before { content: "Club"; }
.se-news-grid li.type-wpse_player .se-card__body::before { content: "Player"; }
.se-news-grid li.type-wpse_team .se-card__body::before, .se-news-grid li.type-wpse_player .se-card__body::before { font-size: .75rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--se-accent); }

/* ---------- Shortcode gallery (/shortcodes/) */
.se-example { margin-top: 2.5rem !important; padding-top: 1.75rem; border-top: 2px solid var(--se-ink); }
.se-example > * { margin-block: 0; }
.se-example > h2 { font-size: 1.6rem; }
.se-example > p { margin-top: .35rem; color: var(--se-muted); }
.se-code { margin: .9rem 0 1.1rem !important; padding: .75rem 1rem; border-radius: var(--se-radius); background: var(--se-night); color: #e9eaff; font-size: .8125rem; overflow-x: auto; white-space: pre; }
.se-code code { background: none; padding: 0; color: inherit; font-size: inherit; }
.se-example__live > * { margin-block: 0; }
.se-example__live .wpse_team_form .team_wrap { display: inline-flex; align-items: center; gap: .6rem; margin-bottom: .6rem; }
.se-example__live .wpse_team_form .team_logo { width: 2.5rem; height: 2.5rem; display: inline-flex; float: none; margin: 0; }
.se-example__live .wpse_team_form .team_logo img { max-width: 100%; max-height: 100%; width: auto; height: auto; }
.se-example__live .wpse_team_form .team_name { font-weight: 700; }

/* ---------- Header between phone and desktop: nine links do not fit under 1200px, so the menu
   stays behind the button there (WordPress itself only switches at 600px). */
.se-brand a { white-space: nowrap; }
@media (max-width: 1199px) {
  .se-nav .wp-block-navigation__responsive-container:not(.is-menu-open) { display: none !important; }
  .se-nav .wp-block-navigation__responsive-container-open { display: flex !important; }
}
@media (min-width: 1200px) {
  .se-nav .wp-block-navigation__container { flex-wrap: nowrap; }
  .se-nav .wp-block-navigation-item__content { white-space: nowrap; }
}
@media (min-width: 1200px) and (max-width: 1499px) {
  .se-nav .wp-block-navigation__container { gap: .25rem; }
  .se-nav .wp-block-navigation-item__content { padding-inline: .5rem; font-size: .75rem; }
  .se-header__nav { gap: .75rem; }
}
