/*
Theme Name: Ettan Direkt
Theme URI: https://ettandirekt.se
Author: Toni Lappalainen / Ettan Direkt
Description: Ett modernt WordPress-tema för nyheter, intervjuer, analyser och podd om Hockeyettan.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.7
Requires PHP: 8.0
Text Domain: ettandirekt
*/

:root {
  --ed-navy: #03182d;
  --ed-navy-2: #061f39;
  --ed-blue: #0b72d9;
  --ed-blue-dark: #0757a5;
  --ed-ice: #eef4f9;
  --ed-white: #ffffff;
  --ed-text: #101820;
  --ed-muted: #637080;
  --ed-border: #dce3ea;
  --ed-shadow: 0 8px 28px rgba(3, 24, 45, .09);
  --ed-radius: 5px;
  --ed-max: 1460px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #f4f6f8;
  color: var(--ed-text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--ed-blue); }
button, input, textarea, select { font: inherit; }

.ed-shell { width: min(calc(100% - 40px), var(--ed-max)); margin: 0 auto; }
.ed-site-main { padding: 22px 0 44px; }

/* Header */
.ed-header { background: linear-gradient(135deg, #021427 0%, #061f39 100%); color: #fff; box-shadow: 0 3px 18px rgba(0,0,0,.18); position: relative; z-index: 20; }
.ed-header-top { min-height: 104px; display: grid; grid-template-columns: 360px 1fr auto; align-items: center; gap: 26px; }
.ed-brand { display: inline-flex; align-items: center; min-width: 0; }
.ed-brand img { width: min(100%, 330px); max-height: 76px; object-fit: contain; object-position: left center; }
.ed-brand-wordmark { display: block; }
.ed-brand-title { display: block; font-family: Impact, "Arial Narrow", sans-serif; font-size: clamp(30px, 3vw, 54px); line-height: .86; letter-spacing: .5px; font-style: italic; font-weight: 900; text-transform: uppercase; white-space: nowrap; }
.ed-brand-title span { color: var(--ed-blue); font-size: .58em; margin-left: 7px; }
.ed-brand-tagline { display: block; margin-top: 8px; color: rgba(255,255,255,.9); font-weight: 800; font-size: 12px; font-style: italic; letter-spacing: .4px; text-transform: uppercase; }
.ed-nav { justify-self: center; }
.ed-nav ul { display: flex; list-style: none; margin: 0; padding: 0; align-items: center; gap: clamp(18px, 2vw, 34px); }
.ed-nav a { color: #fff; font-family: "Arial Narrow", Arial, sans-serif; font-weight: 900; font-size: 14px; text-transform: uppercase; letter-spacing: .2px; }
.ed-nav a:hover, .ed-nav .current-menu-item > a { color: #69b4ff; }
.ed-header-actions { display: flex; align-items: center; gap: 16px; }
.ed-social { display: flex; gap: 13px; align-items: center; }
.ed-social a { color: #fff; font-weight: 900; font-size: 14px; opacity: .9; }
.ed-search-toggle, .ed-menu-toggle { border: 0; background: transparent; color: #fff; cursor: pointer; padding: 8px; }
.ed-menu-toggle { display: none; }
.ed-search-panel { display: none; padding: 0 0 18px; }
.ed-search-panel.is-open { display: block; }
.ed-search-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; max-width: 640px; margin-left: auto; }
.ed-search-form input { border: 0; border-radius: var(--ed-radius); padding: 12px 14px; }
.ed-search-form button { border: 0; border-radius: var(--ed-radius); padding: 12px 18px; color: #fff; background: var(--ed-blue); font-weight: 800; cursor: pointer; }

/* Core layout */
.ed-home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 18px; align-items: start; }
.ed-content-column { min-width: 0; }
.ed-sidebar { display: grid; gap: 14px; }
.ed-top-grid { display: grid; grid-template-columns: 2.05fr .95fr .95fr; gap: 14px; margin-bottom: 14px; }
.ed-mid-grid { display: grid; grid-template-columns: .95fr 1.18fr; gap: 14px; margin-bottom: 14px; }

.ed-card { background: #fff; border: 1px solid var(--ed-border); border-radius: var(--ed-radius); box-shadow: 0 2px 12px rgba(3,24,45,.035); overflow: hidden; }
.ed-section { background: #fff; border: 1px solid var(--ed-border); border-radius: var(--ed-radius); padding: 16px; }
.ed-section-title { margin: 0 0 14px; font-family: Impact, "Arial Narrow", sans-serif; font-size: 18px; line-height: 1; text-transform: uppercase; letter-spacing: .15px; }
.ed-section-title::after { content: ""; display: block; width: 42px; height: 3px; margin-top: 9px; background: var(--ed-blue); }
.ed-kicker { display: inline-flex; align-items: center; min-height: 28px; padding: 6px 10px 5px; background: var(--ed-blue); color: #fff; font-family: "Arial Narrow", Arial, sans-serif; font-size: 12px; font-weight: 900; line-height: 1; text-transform: uppercase; letter-spacing: .3px; }

/* Hero and cards */
.ed-hero { position: relative; min-height: 342px; background: var(--ed-navy); }
.ed-hero a { display: block; min-height: 342px; color: #fff; }
.ed-hero-media { position: absolute; inset: 0; }
.ed-hero-media img { width: 100%; height: 100%; object-fit: cover; }
.ed-hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.06) 34%, rgba(0,0,0,.9) 100%); }
.ed-hero-fallback { position: absolute; inset: 0; background: radial-gradient(circle at 30% 30%, #294f70 0%, #06182b 55%, #020d18 100%); }
.ed-hero-content { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding: 16px 18px 17px; }
.ed-hero-copy { width: min(92%, 610px); }
.ed-hero h1 { margin: 0 0 8px; font-family: Impact, "Arial Narrow", sans-serif; font-size: clamp(32px, 3.15vw, 53px); line-height: 1.03; letter-spacing: .1px; text-shadow: 0 2px 10px rgba(0,0,0,.35); }
.ed-meta { font-size: 13px; color: rgba(255,255,255,.9); }
.ed-feature-card { display: flex; flex-direction: column; min-width: 0; }
.ed-feature-image { position: relative; aspect-ratio: 1.3 / 1; overflow: hidden; background: var(--ed-navy); }
.ed-feature-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .25s ease; }
.ed-feature-card:hover img { transform: scale(1.025); }
.ed-feature-image .ed-kicker { position: absolute; top: 0; left: 0; z-index: 2; }
.ed-feature-body { display: flex; flex-direction: column; flex: 1; padding: 16px 17px 17px; }
.ed-feature-body h2 { margin: 0 0 18px; font-family: "Arial Narrow", Arial, sans-serif; font-size: 19px; line-height: 1.17; font-weight: 900; }
.ed-text-link { margin-top: auto; color: var(--ed-blue); font-size: 14px; font-weight: 800; }

/* News list */
.ed-news-list { display: grid; }
.ed-news-row { display: grid; grid-template-columns: 105px minmax(0, 1fr) auto; gap: 13px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--ed-border); }
.ed-news-row:first-child { padding-top: 0; }
.ed-news-row:last-child { border-bottom: 0; }
.ed-news-thumb { width: 105px; aspect-ratio: 1.55 / 1; background: var(--ed-ice); overflow: hidden; border-radius: 2px; }
.ed-news-thumb img { width: 100%; height: 100%; object-fit: cover; }
.ed-news-row h3 { margin: 0; font-size: 14px; line-height: 1.32; font-weight: 850; }
.ed-news-time { color: var(--ed-muted); white-space: nowrap; font-size: 12px; }
.ed-more-wrap { padding-top: 11px; text-align: center; }
.ed-more-button { display: inline-flex; align-items: center; gap: 9px; padding: 9px 15px; border: 1px solid var(--ed-border); border-radius: 3px; color: var(--ed-blue); font-size: 13px; font-weight: 800; background: #fff; }

/* Interviews */
.ed-interview-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: 8px; }
.ed-story-tile { position: relative; min-height: 296px; overflow: hidden; background: var(--ed-navy); color: #fff; }
.ed-story-tile.ed-small { min-height: 144px; }
.ed-story-tile img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.ed-story-tile::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 35%, rgba(0,0,0,.92) 100%); }
.ed-story-content { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-end; padding: 14px 16px; }
.ed-story-content .ed-kicker { margin-bottom: 8px; }
.ed-story-content h3 { margin: 0; font-family: "Arial Narrow", Arial, sans-serif; font-weight: 900; font-size: 24px; line-height: 1.08; }
.ed-story-tile.ed-small h3 { font-size: 17px; }
.ed-story-content p { margin: 8px 0 0; color: rgba(255,255,255,.9); font-size: 13px; }
.ed-story-stack { display: grid; gap: 8px; }

/* Tables/sidebar */
.ed-table-card { padding: 16px 22px 12px; }
.ed-standings { width: 100%; border-collapse: collapse; font-size: 13px; }
.ed-standings th { padding: 6px 5px 8px; color: var(--ed-muted); border-bottom: 1px solid var(--ed-border); font-size: 11px; text-transform: uppercase; text-align: left; }
.ed-standings td { padding: 7px 5px; }
.ed-standings th:nth-child(3), .ed-standings th:nth-child(4), .ed-standings td:nth-child(3), .ed-standings td:nth-child(4) { text-align: right; }
.ed-table-link { display: block; text-align: center; color: var(--ed-blue); font-size: 13px; font-weight: 800; padding: 8px 0 2px; border-top: 1px solid var(--ed-border); margin-top: 5px; }
.ed-podcast { padding: 20px; min-height: 207px; color: #fff; background: radial-gradient(circle at 85% 40%, #173c63 0%, #061b31 48%, #031326 100%); position: relative; }
.ed-podcast::after { content: ""; position: absolute; right: 22px; top: 25px; width: 94px; height: 94px; border: 2px solid rgba(255,255,255,.8); clip-path: polygon(25% 6%,75% 6%,96% 50%,75% 94%,25% 94%,4% 50%); }
.ed-podcast h2 { position: relative; z-index: 2; margin: 0; font-family: Impact, "Arial Narrow", sans-serif; font-size: 26px; letter-spacing: .5px; text-transform: uppercase; }
.ed-podcast p { position: relative; z-index: 2; margin: 0 0 24px; font-size: 13px; }
.ed-podcast-wave { width: 65%; height: 22px; margin-bottom: 14px; opacity: .36; background: repeating-linear-gradient(90deg, rgba(255,255,255,.95) 0 2px, transparent 2px 7px); mask-image: linear-gradient(180deg, transparent 0%, #000 40%, #000 60%, transparent 100%); }
.ed-podcast-button { position: relative; z-index: 2; display: inline-flex; padding: 9px 14px; border: 1px solid rgba(255,255,255,.85); border-radius: 3px; font-size: 13px; font-weight: 800; color: #fff; }
.ed-newsletter { padding: 20px; color: #fff; background: var(--ed-navy); }
.ed-newsletter h2 { margin: 0 0 4px; font-family: "Arial Narrow", Arial, sans-serif; text-transform: uppercase; font-size: 16px; }
.ed-newsletter p { margin: 0 0 14px; font-size: 13px; color: rgba(255,255,255,.9); }
.ed-newsletter-form { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.ed-newsletter-form input { width: 100%; border: 0; border-radius: 3px; padding: 10px 12px; font-size: 13px; }
.ed-newsletter-form button { border: 0; border-radius: 3px; padding: 10px 17px; background: var(--ed-blue); color: #fff; font-weight: 800; cursor: pointer; }

/* Columns */
.ed-columns { margin-top: 14px; padding: 16px 20px; }
.ed-column-grid { display: grid; grid-template-columns: 94px repeat(3, 1fr); gap: 20px; align-items: stretch; }
.ed-column-intro { padding-top: 5px; }
.ed-column-item { display: grid; grid-template-columns: 96px 1fr; gap: 16px; padding-left: 18px; border-left: 1px solid var(--ed-border); }
.ed-column-photo { width: 96px; height: 115px; object-fit: cover; background: var(--ed-ice); align-self: end; }
.ed-column-label { color: var(--ed-blue); font-size: 10px; font-weight: 900; text-transform: uppercase; }
.ed-column-item h3 { margin: 5px 0 7px; font-family: "Arial Narrow", Arial, sans-serif; font-size: 17px; line-height: 1.18; }
.ed-column-author { color: var(--ed-muted); font-size: 12px; }

/* Article/archive */
.ed-page-grid { display: grid; grid-template-columns: minmax(0, 850px) 340px; gap: 28px; align-items: start; }
.ed-article, .ed-archive-wrap { padding: clamp(20px, 4vw, 52px); background: #fff; border: 1px solid var(--ed-border); }
.ed-article-header { margin-bottom: 22px; }
.ed-article-header h1, .ed-archive-title { margin: 10px 0; font-family: Impact, "Arial Narrow", sans-serif; font-size: clamp(38px, 5vw, 67px); line-height: 1; letter-spacing: -.3px; }
.ed-article-meta { color: var(--ed-muted); font-size: 14px; }
.ed-article-featured { margin: 0 0 28px; }
.ed-article-content { font-size: 18px; line-height: 1.72; }
.ed-article-content h2, .ed-article-content h3 { font-family: "Arial Narrow", Arial, sans-serif; line-height: 1.15; }
.ed-article-content a { color: var(--ed-blue); text-decoration: underline; }
.ed-article-content blockquote { margin: 30px 0; padding: 3px 0 3px 24px; border-left: 5px solid var(--ed-blue); font-family: Georgia, serif; font-size: 25px; line-height: 1.42; }
.ed-author-box { display: grid; grid-template-columns: 92px 1fr; gap: 18px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--ed-border); }
.ed-author-box img { border-radius: 3px; }
.ed-archive-list { display: grid; gap: 16px; margin-top: 25px; }
.ed-archive-item { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--ed-border); }
.ed-archive-item img { width: 100%; aspect-ratio: 1.55 / 1; object-fit: cover; }
.ed-archive-item h2 { margin: 4px 0 7px; font-family: "Arial Narrow", Arial, sans-serif; font-size: 27px; line-height: 1.08; }

/* Footer */
.ed-footer { padding: 38px 0; background: #021427; color: rgba(255,255,255,.86); }
.ed-footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.ed-footer h3 { color: #fff; margin: 0 0 11px; font-family: "Arial Narrow", Arial, sans-serif; text-transform: uppercase; }
.ed-footer p, .ed-footer li { font-size: 14px; }
.ed-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ed-footer-bottom { margin-top: 28px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); font-size: 12px; }

/* Utilities */
.ed-placeholder { background: linear-gradient(135deg, #274965, #06182b); }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (max-width: 1180px) {
  .ed-header-top { grid-template-columns: 295px 1fr auto; }
  .ed-nav ul { gap: 16px; }
  .ed-nav a { font-size: 12px; }
  .ed-home-grid { grid-template-columns: minmax(0,1fr) 310px; }
  .ed-top-grid { grid-template-columns: 1.65fr 1fr 1fr; }
  .ed-column-grid { grid-template-columns: 1fr 1fr; }
  .ed-column-intro { grid-column: 1 / -1; }
}

@media (max-width: 980px) {
  .ed-shell { width: min(calc(100% - 24px), var(--ed-max)); }
  .ed-header-top { min-height: 84px; grid-template-columns: 1fr auto; }
  .ed-brand { max-width: 290px; }
  .ed-nav { display: none; grid-column: 1 / -1; width: 100%; padding-bottom: 17px; }
  .ed-nav.is-open { display: block; }
  .ed-nav ul { align-items: flex-start; flex-direction: column; gap: 12px; }
  .ed-menu-toggle { display: inline-flex; }
  .ed-social { display: none; }
  .ed-home-grid, .ed-page-grid { grid-template-columns: 1fr; }
  .ed-sidebar { grid-template-columns: 1fr 1fr; }
  .ed-podcast, .ed-newsletter { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .ed-site-main { padding-top: 12px; }
  .ed-top-grid, .ed-mid-grid { grid-template-columns: 1fr; }
  .ed-hero, .ed-hero a { min-height: 365px; }
  .ed-feature-card { display: grid; grid-template-columns: 42% 58%; }
  .ed-feature-image { aspect-ratio: auto; min-height: 180px; }
  .ed-interview-grid { grid-template-columns: 1fr; }
  .ed-story-stack { grid-template-columns: 1fr 1fr; }
  .ed-sidebar { grid-template-columns: 1fr; }
  .ed-podcast, .ed-newsletter { grid-column: auto; }
  .ed-column-grid { grid-template-columns: 1fr; }
  .ed-column-intro { grid-column: auto; }
  .ed-column-item { border-left: 0; border-top: 1px solid var(--ed-border); padding: 15px 0 0; }
  .ed-footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .ed-archive-item { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .ed-brand-title { font-size: 34px; }
  .ed-header-actions { gap: 4px; }
  .ed-hero h1 { font-size: 38px; }
  .ed-feature-card { display: block; }
  .ed-feature-image { min-height: 210px; }
  .ed-news-row { grid-template-columns: 82px minmax(0,1fr); }
  .ed-news-thumb { width: 82px; }
  .ed-news-time { display: none; }
  .ed-story-stack { grid-template-columns: 1fr; }
  .ed-newsletter-form { grid-template-columns: 1fr; }
  .ed-column-item { grid-template-columns: 80px 1fr; }
  .ed-column-photo { width: 80px; height: 100px; }
  .ed-article, .ed-archive-wrap { padding: 20px; }
}
