/*
Theme Name: Gysingeforsarna
Theme URI: https://gysingeforsarna.se
Author: Gysingeforsarnas FVOF
Author URI: https://gysingeforsarna.se
Description: Nyhetssida fÃ¶r Gysingeforsarnas FVOF. Beige/sand-stil som matchar huvudsidan.
Version: 1.1
License: GNU General Public License v2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: gysingeforsarna
*/

/* ============================================
   Gysingeforsarnas FVOF â€” WordPress-tema 2026
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&display=swap');
:root {
  --bg:         #f7f3ec;
  --vit:        #fffdf9;
  --sand-mo:    #ede7d9;
  --gron:       #43593b;
  --gron-mo:    #43593b;
  --gron-nav:   #43593b;
  --bark:       #8b6914;
  --text:       #1e1e14;
  --text-ljus:  #5a5640;
  --ram:        #ddd5c0;
}

/* RESET â€” tar bort WordPress & temakonflikter */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Hindrar WordPress frÃ¥n att lÃ¤gga till egna margin/padding pÃ¥ body */
html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg) !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* Alla bilder hanteras rÃ¤tt â€” override WordPress */
img,
.entry-content img,
.post-thumbnail img,
.wp-post-image {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  display: block;
}

a { color: var(--vit); text-decoration: none; }
a:hover { color: var(--gron-mo); text-decoration: underline; }

/* DÃ¶lj WordPress admin-bar-space */
html { margin-top: 0 !important; }
#wpadminbar { display: none !important; }

/* ===== HEADER ===== */
.site-header {
  background: var(--vit);
  border-bottom: 1px solid var(--ram);
  padding: 12px 0;
  width: 100%;
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-branding a { text-decoration: none; }

.site-title {
  font-family: Georgia, serif;
  font-size: 1.15em;
  font-weight: bold;
  color: var(--gron);
  line-height: 1.2;
}

.site-description {
  font-size: 0.75em;
  color: var(--text-ljus);
  margin-top: 2px;
}

/* ===== NAV ===== */
.main-nav {
  background: var(--gron-nav);
  width: 100%;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-inner {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-wrap: wrap;
  list-style: none;
}

/* WordPress lÃ¤gger in <ul> i nav-menyn */
.main-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  padding: 0;
  margin: 0;
  width: 100%;
}

.main-nav ul li { position: static; }

.main-nav ul li a,
.main-nav > .nav-inner > a {
  display: block;
  padding: 11px 16px;
  color: rgba(255,255,255,0.8) !important;
  font-size: 0.87em;
  font-weight: 600;
  border-bottom: 3px solid transparent;
  transition: all 0.18s;
  text-decoration: none !important;
  font-family: Georgia, serif;
}

.main-nav ul li a:hover,
.main-nav ul li.current-menu-item a,
.main-nav ul li.current_page_item a {
  color: #fff !important;
  background: rgba(255,255,255,0.1);
  border-bottom-color: var(--bark);
}

/* DÃ¶lj sub-menyer */
.main-nav ul ul { display: none !important; }

/* ===== BANNER ===== */
.site-banner {
  position: relative;
  height: 200px;
  overflow: hidden;
  background: var(--gron-nav);
  width: 100%;
}

.site-banner img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  object-position: center 55%;
  opacity: 1;
}

/* GrÃ¶nt overlay â€” Ã¤ndra 0.30 fÃ¶r mer/mindre grÃ¶nt */
.site-banner::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(37, 61, 25, 0.30);
  pointer-events: none;
}

.banner-text {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
}

.banner-text h2 {
  font-family:  'Playfair Display', Georgia, serif;
  font-size: 1.7em;
  color: #fff;
  font-weight: bold;
  text-shadow: 0 2px 10px rgba(0,0,0,0.6);
  margin-bottom: 6px;
 }

.banner-text p {
  color: rgba(255,255,255,0.85);
  font-size: 0.88em;
  text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}

/* ===== SIDLAYOUT ===== */
.page-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px;
  display: grid;
  grid-template-columns: 1fr 230px;
  gap: 24px;
  align-items: start;
}

/* ===== INLAGGSLISTA ===== */
.posts-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0; /* viktigt for grid */
}

.post-card {
  background: var(--vit);
  border: 1px solid var(--ram);
  border-radius: 7px;
  overflow: hidden;
}

/* Inlaggsbilder i listan â€” begrÃ¤nsa hÃ¶jd */
.post-card .post-bild {
  width: 100% !important;
  max-height: 260px !important;
  height: auto !important;
  object-fit: cover;
}

.post-card-inner { padding: 18px 22px; }

.post-meta {
  font-size: 0.78em;
  color: var(--text-ljus);
  margin-bottom: 7px;
}

.post-card h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.15em;
  color: var(--gron);
  margin-bottom: 9px;
  line-height: 1.35;
}

.post-card h2 a { color: var(--vit); text-decoration: none; }
.post-card h2 a:hover { color: var(--gron-mo); text-decoration: underline; }

.post-excerpt { font-size: 0.92em; color: var(--text); margin-bottom: 13px; }

.las-mer {
  display: inline-block;
  padding: 7px 15px;
  background: var(--gron);
  color: #fff !important;
  border-radius: 5px;
  font-size: 0.84em;
  font-weight: bold;
  text-decoration: none !important;
  transition: background 0.18s;
}

.las-mer:hover { background: var(--gron-mo) !important; }

/* Paginering */
.pagination {
  display: flex;
  gap: 7px;
  justify-content: center;
  margin-top: 20px;
  flex-wrap: wrap;
}

.pagination a, .pagination span {
  padding: 6px 12px;
  border: 1px solid var(--ram);
  border-radius: 5px;
  font-size: 0.84em;
  background: var(--vit);
  color: var(--gron);
  text-decoration: none;
}

.pagination a:hover { background: var(--sand-mo); }
.pagination .current { background: var(--gron); color: #fff; border-color: var(--gron); }

/* ===== ENSKILT INLÃ„GG ===== */
.single-post {
  background: var(--vit);
  border: 1px solid var(--ram);
  border-radius: 7px;
  padding: 24px;
  min-width: 0;
}

.single-post h1 {
  font-family: Georgia, serif;
  font-size: 1.5em;
  color: var(--gron);
  margin-bottom: 9px;
  line-height: 1.3;
}

.entry-content {
  font-size: 0.94em;
  line-height: 1.8;
  margin-top: 16px;
}

.entry-content p { margin-bottom: 13px; }
.entry-content h2, .entry-content h3 { font-family: Georgia, serif; color: var(--gron); margin: 18px 0 9px; }

/* VIKTIG FIX â€” bilder i inlÃ¤gg */
.entry-content img {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  border-radius: 5px;
  margin: 12px 0;
  border: 1px solid var(--ram);
}

/* WordPress figure/figcaption */
.entry-content figure {
  max-width: 100% !important;
  margin: 14px 0;
}

.entry-content figure img {
  max-width: 100% !important;
  width: 100% !important;
}

.entry-content figcaption {
  font-size: 0.8em;
  color: var(--text-ljus);
  margin-top: 5px;
  text-align: center;
}

.entry-content ul, .entry-content ol { padding-left: 20px; margin-bottom: 13px; }
.entry-content li { margin-bottom: 4px; }
.entry-content a { color: var(--gron); }
.entry-content blockquote {
  border-left: 4px solid var(--bark);
  padding: 10px 16px;
  background: var(--sand-mo);
  border-radius: 0 5px 5px 0;
  margin: 13px 0;
  font-style: italic;
  color: var(--text-ljus);
}

.tillbaka-lank {
  display: inline-block;
  color: var(--text-ljus);
  font-size: 0.84em;
  margin-bottom: 16px;
  text-decoration: none;
}

.tillbaka-lank:hover { color: var(--gron); }

/* Navigering mellan inlägg */
.post-nav {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--ram);
  display: flex;
  justify-content: space-between;
  font-size: 0.84em;
  gap: 16px;
}

.post-nav a { color: var(--gron); }

/* ===== SIDEBAR ===== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.widget {
  background: var(--vit);
  border: 1px solid var(--ram);
  border-radius: 7px;
  overflow: hidden;
}

.widget-title {
  background: var(--gron);
  color: #fff;
  font-family: Georgia, serif;
  font-size: 0.85em;
  font-weight: bold;
  padding: 8px 13px;
}

.widget-inner {
  padding: 11px 13px;
}

/* WordPress widget-stilar override */
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li {
  padding: 6px 0;
  border-bottom: 1px solid var(--sand-mo);
  font-size: 0.84em;
}
.widget ul li:last-child { border-bottom: none; }
.widget ul li a { color: var(--gron); }
.widget ul li a:hover { color: var(--gron-mo); }

.widget select {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid var(--ram);
  border-radius: 5px;
  font-size: 0.84em;
  background: var(--bg);
  color: var(--text);
}

.post-date-small {
  display: block;
  font-size: 0.74em;
  color: var(--text-ljus);
  margin-top: 1px;
}

/* Snabblankar */
.snabb-lank {
  display: block;
  padding: 6px 0;
  border-bottom: 1px solid var(--sand-mo);
  font-size: 0.83em;
  color: var(--gron) !important;
  text-decoration: none !important;
}

.snabb-lank:last-child { border-bottom: none; }
.snabb-lank:hover { color: var(--gron-mo) !important; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--gron-nav);
  color: rgba(255,255,255,0.55);
  text-align: center;
  padding: 16px 24px;
  font-size: 0.78em;
  margin-top: 24px;
  width: 100%;
}

.site-footer a { color: rgba(255,255,255,0.7); }
.site-footer a:hover { color: #fff; }

/* DÃ¶lj fÃ¶rfattarnamn i footer */
.site-footer .author-name,
.site-footer #footer-author,
.site-footer .wp-credits { display: none !important; }

/* ===== HAMBURGARMENY ===== */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 14px;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.2s;
}

/* ===== RESPONSIVT ===== */
@media (max-width: 720px) {
/* Tvinga allt innehåll att hålla sig inom skärmen */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Fixa tabeller så de går att skrolla i sidled på mobilen */
table {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Hindra långa ord/länkar från att trycka ut designen */
.entry-content, .post-excerpt, p, a {
    word-wrap: break-word;
    overflow-wrap: break-word;
}
  /* Header */
  .header-inner {
    padding: 0 14px;
    gap: 10px;
  }
  .site-title { font-size: 1em; }
  .site-description { font-size: 0.7em; }

  /* Hamburgarmeny synlig */
  .hamburger { display: flex; }

  /* Nav dold som standard pÃ¥ mobil */
  .main-nav ul {
    display: none;
    flex-direction: column;
    width: 100%;
    background: var(--gron-nav);
  }

  /* Nav Ã¶ppen via JS */
  .main-nav ul.nav-open {
    display: flex;
  }

  .main-nav ul li {
    width: 100%;
    border-top: 1px solid rgba(255,255,255,0.08);
  }

  .main-nav ul li a {
    padding: 13px 18px !important;
    font-size: 0.95em !important;
    white-space: normal;
  }

  /* nav-inner mÃ¥ste vara flex-wrap fÃ¶r knapp + meny */
  .nav-inner {
    flex-wrap: wrap;
    padding: 0;
  }

  /* Banner */
  .site-banner { height: 120px; }
  .banner-text h2 { font-size: 1.1em; }
  .banner-text p { font-size: 0.78em; }

  /* Layout â€” en kolumn */
  .page-wrap {
    grid-template-columns: 1fr;
    padding: 12px;
    gap: 14px;
  }

  /* InlÃ¤ggskort */
  .post-card-inner { padding: 14px 16px; }
  .post-card h2 { font-size: 1.05em; }
  .post-card .post-bild { max-height: 200px !important; }

  /* Enskilt inlÃ¤gg */
  .single-post { padding: 14px; }
  .single-post h1 { font-size: 1.2em; }
  .entry-content { font-size: 0.92em; }
  .entry-content img { width: 100% !important; height: auto !important; }
  .entry-content figure { width: 100% !important; }

  /* Post-navigering */
  .post-nav { flex-direction: column; gap: 10px; }

  /* Footer */
  .site-footer { padding: 14px 16px; font-size: 0.75em; }
}

/* Tablet */
@media (max-width: 900px) and (min-width: 721px) {
  .page-wrap {
    grid-template-columns: 1fr 190px;
    padding: 16px;
  }
}

/* EXTRA FIXAR FÖR MOBILRESPONSIVITET */
@media (max-width: 720px) {
  
  /* Förhindra att sidan går att skrolla i sidled */
  html, body {
    position: relative;
    overflow-x: hidden;
    width: 100%;
  }

  /* Tvinga tabeller (vattenföring etc) att bli skrollbara internt istället för att trycka ut sidan */
  table {
    display: block;
    width: 100% !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1em;
  }

  /* Bryt långa länkar eller ord som annars hamnar utanför skärmen */
  .entry-content, .post-excerpt, p, a {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  /* Se till att grid-layouten verkligen kollapsar */
  .page-wrap {
    display: block !important;
    width: 100% !important;
    padding: 10px !important;
  }

  /* Menyn - tvinga fram hamburgarknappen tydligare */
  .hamburger {
    display: flex !important;
    margin-right: 15px;
  }
}
