/*
Theme Name: Svelvik IF
Theme URI: https://svelvikif.no
Description: Offisiell nettside for Svelvik Idrettsforening
Author: Svelvik IF
Version: 1.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: svelvik-theme
*/

:root {
  --blue: #1a3fa3;
  --red: #d41e46;
  --dark: #0d0d0d;
  --white: #ffffff;
  --light-gray: #f4f4f4;
  --mid-gray: #e0e0e0;
  --text: #1a1a1a;
  --text-muted: #666;
}

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

body {
  font-family: 'Barlow', sans-serif;
  background: var(--white);
  color: var(--text);
  overflow-x: hidden;
}

/* ── TOPBAR ── */
.topbar {
  background: var(--dark);
  color: rgba(255,255,255,0.7);
  font-size: 0.78rem;
  padding: 6px 40px;
  display: flex;
  justify-content: flex-end;
  gap: 24px;
  letter-spacing: 0.03em;
}
.topbar a { color: inherit; text-decoration: none; }
.topbar a:hover { color: #fff; }

/* ── NAVBAR ── */
.site-nav {
  background: var(--white);
  border-bottom: 3px solid var(--blue);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 40px;
  height: 72px;
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  margin-right: 32px;
  flex-shrink: 0;
}
.nav-logo img { height: 54px; background: #000; border-radius: 4px; padding: 2px; }
.nav-logo-text { line-height: 1.15; }
.nav-logo-text strong {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: 1.25rem;
  letter-spacing: 0.06em;
  color: var(--blue);
  text-transform: uppercase;
}
.nav-logo-text span {
  display: block;
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--red);
  text-transform: uppercase;
}

/* WordPress auto-generated menu */
.main-navigation { flex: 1; }
.main-navigation ul {
  display: flex;
  list-style: none;
  gap: 0;
}
.main-navigation ul li { position: relative; }
.main-navigation ul li a {
  display: flex;
  align-items: center;
  padding: 0 13px;
  height: 72px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.main-navigation ul li a:hover,
.main-navigation ul li:hover > a { color: var(--red); background: var(--light-gray); }

/* Dropdown */
.main-navigation ul ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  flex-direction: column;
  background: var(--white);
  min-width: 220px;
  border-top: 3px solid var(--red);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 999;
}
.main-navigation ul li:hover > ul { display: flex; }
.main-navigation ul ul li a {
  height: auto;
  padding: 10px 18px;
  font-size: 0.86rem;
  border-bottom: 1px solid var(--mid-gray);
}
.main-navigation ul ul li a:hover { padding-left: 24px; color: var(--blue); }

.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}
.hamburger span { display: block; width: 24px; height: 2px; background: var(--dark); margin: 5px 0; }

/* ── HERO ── */
.hero {
  background: var(--dark);
  position: relative;
  min-height: 500px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(26,63,163,0.88) 0%, rgba(13,13,13,0.96) 58%),
    url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.025'%3E%3Cpath d='M0 0h40v40H0zm40 40h40v40H40z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover, 80px 80px;
}
.hero-stripe {
  position: absolute; right: 0; top: 0; bottom: 0; width: 45%;
  background: var(--red);
  clip-path: polygon(18% 0, 100% 0, 100% 100%, 0% 100%);
  opacity: 0.1;
}
.hero-decor {
  position: absolute; right: 8%; bottom: -20px;
  font-size: 22rem; opacity: 0.04; line-height: 1;
  pointer-events: none; user-select: none;
}
.hero-content {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 80px 40px;
  z-index: 1;
}
.hero-eyebrow {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.82rem; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--red); margin-bottom: 14px;
  display: flex; align-items: center; gap: 10px;
}
.hero-eyebrow::before { content: ''; display: inline-block; width: 32px; height: 2px; background: var(--red); }
.hero h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900;
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  line-height: 0.95;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}
.hero h1 span { color: var(--red); }
.hero-slogan {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600; font-size: 1.1rem;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: rgba(255,255,255,0.5); margin-bottom: 28px;
}
.hero-slogan em { color: rgba(255,255,255,0.8); font-style: normal; }
.hero p {
  font-size: 1.05rem; color: rgba(255,255,255,0.7);
  max-width: 460px; line-height: 1.65; margin-bottom: 36px;
}
.hero-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 13px 28px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; font-size: 0.88rem;
  letter-spacing: 0.09em; text-transform: uppercase;
  text-decoration: none; border-radius: 2px; transition: all 0.2s;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: #b51838; transform: translateY(-1px); }
.btn-outline { border: 2px solid rgba(255,255,255,0.35); color: #fff; }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,0.08); }

/* ── QUICK LINKS ── */
.quick-links { background: var(--blue); }
.quick-links-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.ql-item {
  display: flex; align-items: center; gap: 14px;
  padding: 20px 26px; color: rgba(255,255,255,0.8);
  text-decoration: none; border-right: 1px solid rgba(255,255,255,0.1);
  transition: background 0.2s;
}
.ql-item:last-child { border-right: none; }
.ql-item:hover { background: rgba(255,255,255,0.1); color: #fff; }
.ql-icon { font-size: 1.35rem; flex-shrink: 0; }
.ql-text strong {
  display: block; font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; font-size: 0.92rem;
  letter-spacing: 0.05em; text-transform: uppercase; color: #fff;
}
.ql-text span { font-size: 0.76rem; opacity: 0.65; }

/* ── SECTION ── */
.section-header {
  display: flex; align-items: baseline;
  justify-content: space-between; margin-bottom: 32px;
}
.section-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 900; font-size: 2rem;
  text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--dark); position: relative; padding-left: 16px;
}
.section-title::before {
  content: ''; position: absolute; left: 0; top: 50%;
  transform: translateY(-50%); width: 4px; height: 80%;
  background: var(--red); border-radius: 2px;
}
.section-link {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.83rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--blue); text-decoration: none;
  display: flex; align-items: center; gap: 5px;
}
.section-link:hover { color: var(--red); }
.section-link::after { content: '→'; }

/* ── NEWS ── */
.news-section { padding: 64px 40px; background: var(--white); }
.news-section .inner { max-width: 1200px; margin: 0 auto; }
.news-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 20px; }
.news-card {
  background: var(--white); border: 1px solid var(--mid-gray);
  border-radius: 4px; overflow: hidden; text-decoration: none;
  color: inherit; display: flex; flex-direction: column;
  transition: transform 0.2s, box-shadow 0.2s;
}
.news-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.1); }
.news-card.featured { grid-row: span 2; }
.news-img {
  width: 100%; aspect-ratio: 16/9; object-fit: cover;
  background: linear-gradient(135deg, var(--blue) 0%, #0d1f5a 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; min-height: 180px; flex-shrink: 0;
}
.news-img img { width: 100%; height: 100%; object-fit: cover; }
.news-card.featured .news-img { min-height: 280px; font-size: 4.5rem; }
.news-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.news-category {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--red); margin-bottom: 7px;
}
.news-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700; font-size: 1.12rem;
  line-height: 1.25; color: var(--dark); margin-bottom: 10px; flex: 1;
}
.news-card.featured .news-title { font-size: 1.45rem; }
.news-excerpt { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 14px; }
.news-meta { font-size: 0.76rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; margin-top: auto; }
.news-meta::before { content: ''; display: inline-block; width: 16px; height: 1px; background: var(--mid-gray); }

/* WordPress post loop in news grid */
.wp-news-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 20px; }
.wp-news-grid article:first-child { grid-row: span 2; }
.wp-news-grid article:first-child .news-img { min-height: 280px; }
.wp-news-grid article:first-child .news-title { font-size: 1.45rem; }

/* ── SPONSORS ── */
.sponsors-section {
  background: var(--light-gray); padding: 40px;
  border-top: 1px solid var(--mid-gray); border-bottom: 1px solid var(--mid-gray);
}
.sponsors-inner { max-width: 1200px; margin: 0 auto; }
.sponsors-label {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.75rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--text-muted); text-align: center; margin-bottom: 24px;
}
.sponsors-grid {
  display: flex; justify-content: center;
  align-items: center; gap: 32px; flex-wrap: wrap;
}
.sponsor-box {
  width: 150px; height: 60px; background: var(--mid-gray);
  border-radius: 4px; display: flex; align-items: center;
  justify-content: center; font-size: 0.73rem; color: var(--text-muted);
  font-family: 'Barlow Condensed', sans-serif; letter-spacing: 0.08em; text-transform: uppercase;
}
.sponsor-box img { max-width: 120px; max-height: 48px; object-fit: contain; }

/* ── INFO CARDS ── */
.info-section { background: var(--dark); padding: 64px 40px; }
.info-inner { max-width: 1200px; margin: 0 auto; }
.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.info-card {
  background: #161616; padding: 36px 32px;
  border-top: 3px solid transparent;
  transition: border-color 0.2s, background 0.2s;
}
.info-card:hover { background: #1e1e1e; border-color: var(--red); }
.info-card-icon { font-size: 2rem; margin-bottom: 14px; }
.info-card h3 {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
  font-size: 1.15rem; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--white); margin-bottom: 10px;
}
.info-card p { font-size: 0.87rem; color: rgba(255,255,255,0.5); line-height: 1.65; margin-bottom: 16px; }
.info-card a {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 0.82rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--red); text-decoration: none;
}
.info-card a:hover { color: #ff3a60; }

/* ── FOOTER ── */
.site-footer { background: #0a0a0a; color: rgba(255,255,255,0.6); padding: 56px 40px 32px; }
.footer-inner {
  max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 24px;
}
.footer-brand img { height: 64px; background: #000; border-radius: 4px; padding: 2px; margin-bottom: 16px; display: block; }
.footer-slogan {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
  font-size: 1rem; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.4); margin-bottom: 12px;
}
.footer-brand p { font-size: 0.84rem; line-height: 1.7; max-width: 280px; }
.footer-col h4 {
  font-family: 'Barlow Condensed', sans-serif; font-weight: 700;
  font-size: 0.8rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--white); margin-bottom: 16px;
}
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul li a { font-size: 0.84rem; color: rgba(255,255,255,0.5); text-decoration: none; transition: color 0.2s; }
.footer-col ul li a:hover { color: var(--white); }
.fc-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 10px; font-size: 0.83rem; }
.footer-bottom {
  max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between;
  align-items: center; font-size: 0.77rem;
}
.footer-bottom a { color: rgba(255,255,255,0.35); text-decoration: none; }
.social-links { display: flex; gap: 10px; }
.social-link {
  width: 34px; height: 34px; border: 1px solid rgba(255,255,255,0.15);
  border-radius: 2px; display: flex; align-items: center;
  justify-content: center; color: rgba(255,255,255,0.45);
  text-decoration: none; font-size: 0.85rem; transition: all 0.2s;
}
.social-link:hover { border-color: var(--red); color: var(--red); }

/* ── RESPONSIVE ── */
@media (max-width: 960px) {
  .news-grid, .wp-news-grid { grid-template-columns: 1fr 1fr; }
  .news-card.featured, .wp-news-grid article:first-child { grid-column: span 2; grid-row: span 1; }
  .quick-links-inner { grid-template-columns: repeat(2, 1fr); }
  .info-grid { grid-template-columns: 1fr; gap: 2px; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 640px) {
  .topbar { display: none; }
  .nav-inner { padding: 0 16px; }
  .main-navigation { display: none; }
  .hamburger { display: block; }
  .hero-content { padding: 56px 20px; }
  .news-grid, .wp-news-grid { grid-template-columns: 1fr; }
  .news-card.featured, .wp-news-grid article:first-child { grid-column: 1; }
  .news-section, .info-section { padding: 48px 20px; }
  .sponsors-section { padding: 32px 20px; }
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .site-footer { padding: 40px 20px 24px; }
  .quick-links-inner { grid-template-columns: 1fr 1fr; }
}
