/* ================================================
   Islands Games — Bludit Theme
   Matches islandsgames.com design system
   ================================================ */

:root {
  --ocean-deep: #0a2e42;
  --ocean-mid: #0d5c7a;
  --ocean-blue: #1270a0;
  --teal: #008080;
  --teal-light: #10b0b0;
  --turquoise: #40e0d0;
  --turquoise-light: #90f0e0;
  --sand: #f8f5ef;
  --sand-warm: #f0ead8;
  --white: #ffffff;
  --text-dark: #0a2232;
  --text-mid: #2a5a78;
  --text-light: rgba(255,255,255,0.88);
  --nav-height: 86px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--sand);
  color: var(--text-dark);
  line-height: 1.6;
  font-size: 16px;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* ── NAV ── */
.ig-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 48px;
  height: var(--nav-height);
  background: rgba(10, 40, 62, 0.88);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(64,224,208,0.18);
}
.ig-nav-logo img {
  height: 60px; width: auto; display: block;
}
.ig-nav-back {
  display: inline-flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.88);
  font-size: 14px; font-weight: 600;
  letter-spacing: 0.03em;
  border: 1px solid rgba(255,255,255,0.25);
  padding: 9px 20px; border-radius: 6px;
  transition: all 0.2s;
  white-space: nowrap;
}
.ig-nav-back:hover {
  color: var(--turquoise);
  border-color: var(--turquoise);
}

/* ── BLOG HEADER ── */
.ig-blog-header {
  background: linear-gradient(180deg, #0d3352 0%, #135d8a 50%, #1888b8 100%);
  padding: calc(var(--nav-height) + 50px) 20px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.ig-blog-header::before {
  content: '';
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(64,224,208,0.18) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.3;
}
.ig-blog-header-inner { position: relative; z-index: 1; }

.ig-eyebrow {
  display: inline-block;
  background: rgba(64,224,208,0.12);
  border: 1px solid rgba(64,224,208,0.3);
  color: var(--turquoise);
  font-size: 11px; font-weight: 600;
  letter-spacing: 0.2em; text-transform: uppercase;
  padding: 6px 16px; border-radius: 4px;
  margin-bottom: 20px;
}
.ig-blog-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(36px, 6vw, 60px);
  font-weight: 700; letter-spacing: -0.02em;
  color: var(--white); margin-bottom: 16px;
}
.ig-blog-subtitle {
  font-size: 16px; font-weight: 500;
  color: rgba(255,255,255,0.75);
  max-width: 560px; margin: 0 auto;
  line-height: 1.6;
}

/* ── LAYOUT ── */
.ig-container {
  max-width: 1280px; margin: 0 auto;
  padding: 48px 32px 80px;
}
.ig-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 36px;
  align-items: start;
}

/* ── POST CARDS — horizontal layout ── */
.ig-main { display: flex; flex-direction: column; gap: 24px; }

.ig-card {
  background: var(--white);
  border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(10,46,66,0.07), 0 6px 28px rgba(10,46,66,0.05);
  border: 1px solid rgba(10,46,66,0.06);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex; flex-direction: row;
}
.ig-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 40px rgba(10,46,66,0.12);
}
.ig-card-thumb {
  display: block; overflow: hidden;
  width: 220px; min-width: 220px;
  flex-shrink: 0;
  aspect-ratio: 3/2;
}
.ig-card-thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.4s;
}
.ig-card:hover .ig-card-thumb img { transform: scale(1.04); }

/* card sans image — fallback vertical */
.ig-card:not(:has(.ig-card-thumb img)) {
  flex-direction: column;
}

.ig-card-body { padding: 24px 28px 28px; }

.ig-badge {
  display: inline-block;
  background: rgba(0,128,128,0.08);
  color: var(--teal);
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase;
  padding: 3px 10px; border-radius: 4px;
  margin-bottom: 12px;
}
.ig-card-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px; font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text-dark); margin-bottom: 10px;
  line-height: 1.3;
}
.ig-card-title a:hover { color: var(--ocean-mid); }
.ig-card-excerpt {
  font-size: 15px; color: var(--text-mid);
  line-height: 1.65; margin-bottom: 18px;
  font-weight: 400;
}
.ig-card-meta {
  display: flex; justify-content: space-between; align-items: center;
}
.ig-meta-date {
  font-size: 13px; color: rgba(10,46,66,0.4); font-weight: 500;
}
.ig-read-more {
  font-size: 13px; font-weight: 700;
  color: var(--teal); letter-spacing: 0.03em;
  transition: color 0.2s;
}
.ig-read-more:hover { color: var(--teal-light); }

/* ── PAGINATION ── */
.ig-pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 16px; margin-top: 16px;
}
.ig-page-btn {
  background: var(--white); color: var(--ocean-mid);
  border: 1px solid rgba(10,46,66,0.12);
  padding: 9px 20px; border-radius: 6px;
  font-size: 14px; font-weight: 600;
  transition: all 0.2s;
}
.ig-page-btn:hover {
  background: var(--turquoise); color: var(--ocean-deep);
  border-color: var(--turquoise);
}
.ig-page-info { font-size: 14px; color: var(--text-mid); font-weight: 500; }

/* ── SINGLE POST ── */
.ig-post-single {
  background: var(--white); border-radius: 12px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(10,46,66,0.07);
  border: 1px solid rgba(10,46,66,0.06);
}
.ig-post-cover { height: 340px; overflow: hidden; }
.ig-post-cover img { width: 100%; height: 100%; object-fit: cover; }
.ig-post-header { padding: 36px 40px 0; }
.ig-post-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 700; letter-spacing: -0.02em;
  color: var(--text-dark); margin: 14px 0 12px;
  line-height: 1.2;
}
.ig-post-meta {
  font-size: 13px; color: rgba(10,46,66,0.45);
  font-weight: 500; margin-bottom: 32px;
}
.ig-post-content {
  padding: 0 40px 36px;
  font-size: 16px; line-height: 1.8;
  color: var(--text-dark);
}
.ig-post-content h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px; font-weight: 700;
  color: var(--text-dark); margin: 32px 0 14px;
  letter-spacing: -0.01em;
}
.ig-post-content h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px; font-weight: 600;
  color: var(--text-dark); margin: 24px 0 10px;
}
.ig-post-content p { margin-bottom: 18px; }
.ig-post-content a { color: var(--teal); font-weight: 600; }
.ig-post-content a:hover { color: var(--teal-light); }
.ig-post-content ul, .ig-post-content ol {
  margin: 0 0 18px 24px;
}
.ig-post-content li { margin-bottom: 6px; }
.ig-post-content blockquote {
  border-left: 3px solid var(--turquoise);
  padding: 12px 20px; margin: 24px 0;
  background: rgba(64,224,208,0.06);
  border-radius: 0 6px 6px 0;
  font-style: italic; color: var(--text-mid);
}
.ig-post-content img {
  border-radius: 8px; margin: 24px 0;
  box-shadow: 0 4px 20px rgba(10,46,66,0.1);
}
.ig-post-content code {
  background: rgba(10,46,66,0.06);
  padding: 2px 7px; border-radius: 4px;
  font-size: 14px; font-family: monospace;
}
.ig-post-footer {
  padding: 0 40px 36px;
  border-top: 1px solid rgba(10,46,66,0.07);
  padding-top: 24px;
}
.ig-back-btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid rgba(10,46,66,0.15);
  color: var(--text-mid); font-size: 14px; font-weight: 600;
  padding: 9px 20px; border-radius: 6px;
  transition: all 0.2s;
}
.ig-back-btn:hover { border-color: var(--teal); color: var(--teal); }

/* ── SIDEBAR ── */
.ig-sidebar { display: flex; flex-direction: column; gap: 24px; }

.ig-widget {
  background: var(--white); border-radius: 12px;
  padding: 24px; border: 1px solid rgba(10,46,66,0.07);
  box-shadow: 0 2px 10px rgba(10,46,66,0.05);
}
.ig-widget-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dark); margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--turquoise);
}

/* Search */
.ig-search-form {
  display: flex; gap: 8px;
}
.ig-search-input {
  flex: 1; padding: 9px 14px;
  border: 1px solid rgba(10,46,66,0.12); border-radius: 6px;
  font-family: 'DM Sans', sans-serif; font-size: 14px;
  color: var(--text-dark); outline: none;
  transition: border-color 0.2s;
}
.ig-search-input:focus { border-color: var(--teal); }
.ig-search-btn {
  background: var(--turquoise); color: var(--ocean-deep);
  border: none; border-radius: 6px;
  padding: 9px 14px; font-size: 16px; font-weight: 700;
  cursor: pointer; transition: background 0.2s;
}
.ig-search-btn:hover { background: var(--turquoise-light); }

/* Categories */
.ig-cat-list { list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ig-cat-list a {
  font-size: 14px; font-weight: 500; color: var(--text-mid);
  display: flex; align-items: center; gap: 8px;
  padding: 5px 0; transition: color 0.2s;
}
.ig-cat-list a::before {
  content: ''; width: 6px; height: 6px;
  background: var(--turquoise); border-radius: 50%; flex-shrink: 0;
}
.ig-cat-list a:hover { color: var(--teal); }

/* Recent posts */
.ig-recent-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ig-recent-list a {
  font-size: 14px; font-weight: 500; color: var(--text-mid);
  line-height: 1.4; transition: color 0.2s;
  display: block; padding-bottom: 10px;
  border-bottom: 1px solid rgba(10,46,66,0.07);
}
.ig-recent-list li:last-child a { border-bottom: none; padding-bottom: 0; }
.ig-recent-list a:hover { color: var(--teal); }

/* CTA widget */
.ig-widget-cta {
  background: linear-gradient(135deg, #0d3352, #135d8a);
  border: none; text-align: center;
}
.ig-widget-cta p {
  color: rgba(255,255,255,0.75); font-size: 14px;
  font-weight: 500; margin-bottom: 14px;
}
.ig-cta-btn {
  display: inline-block;
  background: var(--turquoise); color: var(--ocean-deep);
  font-size: 14px; font-weight: 700;
  padding: 10px 24px; border-radius: 6px;
  letter-spacing: 0.04em; transition: background 0.2s;
}
.ig-cta-btn:hover { background: var(--turquoise-light); }

/* ── EMPTY / 404 ── */
.ig-empty {
  text-align: center; padding: 80px 20px;
  background: var(--white); border-radius: 12px;
  border: 1px solid rgba(10,46,66,0.07);
}
.ig-empty-icon { font-size: 48px; margin-bottom: 20px; }
.ig-empty h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 24px; font-weight: 700; margin-bottom: 10px;
}
.ig-empty p { color: var(--text-mid); font-size: 15px; margin-bottom: 28px; }
.ig-nav-btn-solid {
  display: inline-block;
  background: var(--turquoise); color: var(--ocean-deep);
  font-size: 14px; font-weight: 700;
  padding: 11px 28px; border-radius: 6px;
  letter-spacing: 0.04em; transition: background 0.2s;
}
.ig-nav-btn-solid:hover { background: var(--turquoise-light); }

/* ── FOOTER ── */
.ig-footer {
  background: #0c2f48;
  border-top: 1px solid rgba(64,224,208,0.15);
  padding: 32px 48px;
}
.ig-footer-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 16px;
}
.ig-footer-copy {
  font-size: 13px; color: rgba(255,255,255,0.55); font-weight: 400;
}
.ig-footer-links { display: flex; gap: 24px; }
.ig-footer-links a {
  font-size: 13px; color: rgba(255,255,255,0.55);
  transition: color 0.2s;
}
.ig-footer-links a:hover { color: var(--turquoise); }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .ig-layout { grid-template-columns: 1fr; }
  .ig-sidebar { order: -1; }
}

@media (max-width: 700px) {
  .ig-nav { padding: 0 18px; height: 72px; }
  .ig-nav-logo img { height: 50px; }
  .ig-nav-back { font-size: 12px; padding: 6px 12px; }

  .ig-blog-header { padding-top: calc(72px + 48px); padding-bottom: 56px; }
  .ig-container { padding: 40px 16px 60px; }

  /* cards verticales sur mobile */
  .ig-card { flex-direction: column; }
  .ig-card-thumb { width: 100%; min-width: unset; height: 200px; }

  .ig-post-header { padding: 24px 20px 0; }
  .ig-post-content { padding: 0 20px 28px; }
  .ig-post-footer { padding: 0 20px 28px; }
  .ig-footer { padding: 28px 20px; }
  .ig-footer-inner { flex-direction: column; text-align: center; }
  .ig-footer-links { justify-content: center; }
}
