/*
Theme Name: Roysnið
Theme URI: https://roysnid.com
Author: Roysnið
Description: Skrædd til Roysnið – felag fyri frælsan ítrótt í Eysturoynni. Grønt og reytt brand-snið við forsíðu, venjingarkortum, tíðindum og kappingum.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: roysnid
*/

:root {
  --navy: #123b28;
  --navy-dark: #0b291b;
  --blue: #1b7a46;
  --blue-light: #e8f3ec;
  --accent: #d91d47;
  --text: #24312a;
  --text-muted: #5c6b62;
  --border: #e3ede6;
  --bg-soft: #f4f8f5;
  --white: #ffffff;
  --radius: 10px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--white);
  line-height: 1.6;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); }
a:not(.btn) { text-decoration: none; }
a:not(.btn):hover { text-decoration: underline; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ---------- Top bar ---------- */
.topbar { background: var(--navy-dark); color: #b9cdc1; font-size: 13px; }
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 36px;
}
.topbar a { color: #d8eadf; }

/* ---------- Header ---------- */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo img, .custom-logo { height: 54px !important; width: auto !important; display: block; flex-shrink: 0; }

nav.main-nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav.main-nav li { position: relative; }
nav.main-nav a {
  display: block;
  color: var(--text);
  font-weight: 600;
  font-size: 15px;
  padding: 10px 14px;
  border-radius: 6px;
}
nav.main-nav a:hover {
  background: var(--blue-light);
  color: var(--navy);
  text-decoration: none !important;
}
nav.main-nav li.menu-item-has-children > a::after {
  content: " ▾";
  font-size: 10px;
  opacity: 0.6;
}
nav.main-nav .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(11, 41, 27, 0.14);
  padding: 8px;
  z-index: 60;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
}
nav.main-nav li:hover > .sub-menu,
nav.main-nav li:focus-within > .sub-menu { display: flex; }
nav.main-nav .sub-menu a { font-size: 14px; padding: 9px 12px; }

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  border: none;
  text-decoration: none !important;
  transition: background 0.15s ease;
}
.btn-primary { background: var(--blue); color: var(--white) !important; }
.btn-primary:hover { background: #156038; }
.btn-accent { background: var(--accent); color: var(--white) !important; }
.btn-accent:hover { background: #b81539; }
.btn-outline {
  background: transparent;
  color: var(--white) !important;
  border: 2px solid rgba(255,255,255,0.7);
}
.btn-outline:hover { border-color: var(--white); background: rgba(255,255,255,0.1); }
.btn-sm { padding: 9px 18px; font-size: 14px; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  color: var(--navy);
  cursor: pointer;
}

/* ---------- Notice strip ---------- */
.notice { background: var(--accent); color: var(--white); font-weight: 600; font-size: 15px; }
.notice .container { display: flex; align-items: center; gap: 10px; padding: 12px 24px; }
.notice a { color: var(--white); text-decoration: underline; }

/* ---------- Hero (front page) ---------- */
.hero {
  position: relative;
  background: url('images/hero-team.jpg') center / cover no-repeat;
  color: var(--white);
  overflow: hidden;
}
.hero-inner {
  position: relative;
  margin: 72px 0 88px;
  padding: 36px 40px;
  width: fit-content;
  max-width: 640px;
  background: rgba(9, 33, 22, 0.55);
  border-radius: 16px;
}
.hero .kicker {
  display: inline-block;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 100px;
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 22px;
}
.hero h1 { font-size: 46px; font-weight: 800; line-height: 1.15; margin-bottom: 18px; color: var(--white); }
.hero p.lead { font-size: 19px; color: #dcebe2; margin-bottom: 32px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* ---------- Page head (subpages) ---------- */
.page-head {
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, #1c6b40 100%);
  color: var(--white);
  padding: 56px 0;
}
.page-head .eyebrow {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #8fd4ae;
  margin-bottom: 8px;
}
.page-head h1 { font-size: 38px; font-weight: 800; line-height: 1.15; color: var(--white); }
.page-head p { color: #cfe6d8; font-size: 17px; max-width: 640px; margin-top: 10px; }

/* ---------- Training cards ---------- */
.training-cards { position: relative; padding-top: 48px; z-index: 5; }
.cards-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 6px 24px rgba(11, 41, 27, 0.08);
}
.card .day {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--blue);
  margin-bottom: 6px;
}
.card .time { font-size: 30px; font-weight: 800; color: var(--navy); line-height: 1.1; }
.card h3 { font-size: 17px; margin: 10px 0 8px; color: var(--navy); }
.card p { font-size: 14px; color: var(--text-muted); }
.card.card-next { background: var(--navy); border-color: var(--navy); color: var(--white); }
.card.card-next .day { color: #ff5f79; }
.card.card-next .time { font-size: 20px; line-height: 1.3; color: var(--white); }
.card.card-next h3 { color: var(--white); }
.card.card-next p { color: #b9cdc1; }

/* ---------- Sections ---------- */
section, .site-section { padding: 72px 0; }
.soft { background: var(--bg-soft); }

.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head .eyebrow, .content-block .eyebrow, .eyebrow {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--blue);
  margin-bottom: 8px;
}
.section-head h2, .content-block h2 {
  font-size: 32px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1.2;
  margin-bottom: 12px;
}
.section-head p { color: var(--text-muted); font-size: 17px; }

/* ---------- Content blocks ---------- */
.content-block { max-width: 760px; }
.content-block p { margin-bottom: 16px; }
.content-block ul { margin: 0 0 16px 22px; }
.content-block li { margin-bottom: 8px; }
.content-block figure, .entry-content figure { margin: 24px 0; }
.content-block figure img, .entry-content figure img { border-radius: var(--radius); }
.content-block figcaption, .entry-content figcaption { font-size: 14px; color: var(--text-muted); margin-top: 8px; }
.content-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 44px;
  align-items: start;
}
.content-split img { border-radius: var(--radius); }

.info-box {
  background: var(--blue-light);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin: 20px 0;
}
.info-box h3 { color: var(--navy); font-size: 17px; margin-bottom: 10px; }
.info-box ul { margin-left: 20px; }

/* ---------- Stats ---------- */
.stats { background: var(--navy); color: var(--white); padding: 56px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; }
.stat .num { font-size: 42px; font-weight: 800; color: #ff5f79; }
.stat .label { font-size: 15px; color: #b9cdc1; }

/* ---------- News / teaser cards ---------- */
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.news-card .thumb {
  height: 170px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}
.news-card .thumb span {
  background: rgba(255,255,255,0.92);
  color: var(--navy);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 4px;
}
.news-card .body { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.news-card .date { font-size: 13px; color: var(--text-muted); margin-bottom: 6px; }
.news-card h3 { font-size: 17px; color: var(--navy); margin-bottom: 8px; line-height: 1.35; }
.news-card p { font-size: 15px; color: var(--text-muted); flex: 1; }
.news-card a.more { font-weight: 600; font-size: 15px; margin-top: 14px; }

/* ---------- Article / post ---------- */
.article { max-width: 720px; }
.article .date { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }
.article p { margin-bottom: 18px; font-size: 16.5px; }
.article img { border-radius: var(--radius); margin: 8px 0 24px; }

/* ---------- Board list ---------- */
.board-list { list-style: none; margin: 0 0 20px !important; }
.board-list li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  margin: 0 !important;
}
.board-list .role { color: var(--text-muted); }

/* ---------- Album list ---------- */
.album-list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 32px;
  margin: 0 !important;
}
.album-list li {
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 0 !important;
}
.album-list a { font-weight: 600; }

/* ---------- Join CTA ---------- */
.join {
  background: linear-gradient(135deg, var(--navy) 0%, #1c6b40 100%);
  color: var(--white);
  text-align: center;
}
.join h2 { font-size: 32px; font-weight: 800; margin-bottom: 12px; color: var(--white); }
.join p { color: #cfe6d8; font-size: 17px; max-width: 560px; margin: 0 auto 28px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-dark); color: #9fb8aa; font-size: 14px; }
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding: 56px 0 40px;
}
.site-footer h4 {
  color: var(--white);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.site-footer ul { list-style: none; }
.site-footer li { margin-bottom: 9px; }
.site-footer a { color: #9fb8aa; }
.site-footer a:hover { color: var(--white); }
.footer-logo {
  display: inline-block;
  background: var(--white);
  border-radius: 8px;
  padding: 8px 14px;
  margin-bottom: 14px;
}
.footer-logo img { height: 46px; width: auto; display: block; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
}

/* ---------- WP alignment helpers ---------- */
.alignleft { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 14px; color: var(--text-muted); margin-top: 8px; }
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute !important;
  height: 1px; width: 1px;
  overflow: hidden;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .cards-grid, .news-grid, .album-list { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .content-split { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .hero-inner { margin: 40px 0 56px; padding: 26px 24px; }
  .page-head h1 { font-size: 30px; }

  nav.main-nav {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 12px 24px 20px;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 12px 24px rgba(11,41,27,0.1);
  }
  nav.main-nav.open { display: block; }
  nav.main-nav ul { flex-direction: column; align-items: stretch; }
  .nav-toggle { display: block; }
  .header-join { display: none; }
  nav.main-nav .sub-menu {
    display: flex;
    position: static;
    border: none;
    box-shadow: none;
    padding: 0 0 0 18px;
    min-width: 0;
  }
}
