/*
Main stylesheet for MosWPmall
Author: Mosho
Date: 2025-09-18
Version: 0.9
*/

/* ================================
   ===  GLOBALA VARIABLER  ===
   ================================ */
:root {
  --topbar-min-height: 150px;
  --color-primary: #bfa288;   /* Beige */
  --color-secondary: #630000; /* Deep red/brown */
  --color-tertiary: #a0a0a0;  /* Gray */
  --color-black: #000;
  --color-white: #fff;

  --font-primary: "EB Garamond", serif;
  --font-secondary: "Roboto", sans-serif;
}

/* ================================
   ===  GLOBALA STILAR  ===
   ================================ */
body {
  font-family: var(--font-primary);
  background-color: var(--color-white);
  color: var(--color-black);
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-primary);
  font-weight: 700;
  margin-bottom: 0.5rem;
}

p,
li,
a,
span {
  font-family: var(--font-secondary);
  font-weight: 400;
}

.container {
  width: min(1200px, 100%);
  margin: 0 auto;
  padding: 0 2rem;
}

/* ================================
   ===  NAVIGATION (header) ===
   ================================ */
.topbar {
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.95) 0%,
    rgba(0, 0, 0, 0.85) 100%
  );
  min-height: var(--topbar-min-height);
  padding: 0.5rem 2rem;
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid transparent;
  border-image: linear-gradient(to right, var(--color-primary), transparent);
  border-image-slice: 1;
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 3px;
  background: linear-gradient(to top, rgba(191, 162, 136, 0), var(--color-primary));
  pointer-events: none;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.site-logo {
  max-height: 100px;
  width: auto;
  border-radius: 50%;
  margin: 0 1rem;
  object-fit: contain;
}

.main-menu {
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  margin: 0 0 0 auto;
  align-items: center;
  list-style: none;
  padding: 0;
}

.main-menu li {
  list-style: none;
}

.main-menu .menu-item a {
  color: var(--color-white) !important;
  padding: 0.75rem 1rem;
  transition: all 0.3s ease;
  border-radius: 0;
  display: block;
  text-decoration: none;
  font-size: 1.1rem;
  font-family: var(--font-primary);
  border: 1px solid var(--color-white);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
}

.main-menu .menu-item a:hover,
.main-menu .menu-item a:focus {
  background-color: var(--color-primary);
  color: var(--color-black) !important;
  border-color: var(--color-primary);
}

.main-menu .menu-item.current-menu-item a {
  background-color: var(--color-primary);
  color: var(--color-black) !important;
  border-color: var(--color-primary);
}

/* ================================
   ===  LOGOTYP & FALLBACK TEXT  ===
   ================================ */
.site-title-fallback {
  font-size: 1.25rem;
  font-weight: bold;
  color: var(--color-white);
}

/* ================================
   ===  FOOTER  ===
   ================================ */
.site-footer {
  background-color: var(--color-black);
  color: var(--color-white);
  font-size: 0.95rem;
  padding: 3rem 1rem 1.5rem;
  min-height: 350px;
}

.footer-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  align-items: start;
  margin-bottom: 2rem;
}

.footer-section {
  text-align: left;
}

.footer-logo {
  max-height: 90px;
  width: auto;
  display: block;
  margin: 0 auto 1rem;
}

.footer-brand {
  text-align: center;
}

.footer-brand p {
  margin: 0;
  line-height: 1.6;
}

.footer-section h3 {
  font-family: var(--font-primary);
  font-size: 1.15rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-menu li {
  display: block;
}

.site-footer a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.site-footer a:hover {
  color: var(--color-secondary);
}

.footer-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-form label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: var(--font-secondary);
  font-size: 0.9rem;
}

.footer-form input,
.footer-form textarea {
  width: 100%;
  padding: 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--color-white);
  font-family: var(--font-secondary);
}

.footer-form input::placeholder,
.footer-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.footer-form textarea {
  min-height: 120px;
  resize: vertical;
}

.footer-submit {
  align-self: flex-start;
  background-color: var(--color-secondary);
  color: var(--color-white);
  padding: 0.65rem 1.5rem;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.footer-submit:hover {
  background-color: var(--color-primary);
  color: var(--color-black);
}

.footer-social-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-social-list a {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
}

.footer-social-list svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 1rem;
  text-align: center;
  font-size: 0.85rem;
}

@media (max-width: 760px) {
  .hero-section {
    padding: 2.5rem 1rem;
  }

  .footer-section {
    text-align: center;
  }

  .footer-form {
    align-items: center;
  }

  .footer-form label {
    width: 100%;
    max-width: 320px;
  }

  .footer-form input,
  .footer-form textarea {
    max-width: 320px;
  }

  .footer-submit {
    width: 100%;
    max-width: 200px;
    text-align: center;
  }

  .footer-social-list {
    justify-content: center;
  }
}

/* ================================
   ===  WIDGETS  ===
   ================================ */
.widget {
  margin-bottom: 1.5rem;
}

.widget-title {
  font-family: var(--font-primary);
  font-weight: bold;
  margin-bottom: 0.5rem;
  color: var(--color-secondary);
}

/* ================================
   ===  KNAPPAR  ===
   ================================ */
.btn-custom {
  background-color: var(--color-primary);
  color: var(--color-black);
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  border: none;
  transition: all 0.3s ease;
}

.btn-custom:hover {
  background-color: var(--color-secondary);
  color: var(--color-white);
}

/* ================================
   ===  FRONT PAGE (hero + posts) ===
   ================================ */
.hero-section {
  background-color: var(--color-primary);
  color: var(--color-black);
  padding: 3rem 1rem;
  margin-top: 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: max(280px, calc(80vh - var(--topbar-min-height)));
}

.hero-section h1 {
  font-family: var(--font-primary);
  font-size: 2.8rem;
  margin-bottom: 1rem;
}

.hero-section .tagline {
  font-family: var(--font-secondary);
  font-size: 1.25rem;
  margin-bottom: 2rem;
}

.latest-posts {
  margin: 3rem auto;
}

.latest-posts h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

.latest-posts-list {
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.latest-posts-list article {
  background: var(--color-white);
  padding: 1.75rem;
  border-radius: 0;
  border: 1px solid var(--color-tertiary);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1 1 clamp(240px, 30%, 360px);
}

.latest-posts-list .entry-title {
  font-size: 1.25rem;
  margin: 0;
}

.latest-posts-list .entry-summary {
  font-family: var(--font-secondary);
  line-height: 1.7;
  color: var(--color-black);
}

.latest-posts-list .read-more {
  margin-top: auto;
  font-family: var(--font-secondary);
  font-weight: 500;
  color: var(--color-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.latest-posts-list .read-more:hover {
  color: var(--color-primary);
}

@media (max-width: 1024px) {
  .latest-posts-list {
    justify-content: space-between;
  }
}

@media (max-width: 680px) {
  .latest-posts-list {
    flex-direction: column;
    gap: 2rem;
  }
}

/* ================================
   ===  SIDMALL (page.php) ===
   ================================ */
.page-content {
  margin: 3rem auto;
  max-width: 800px;
}

.page-title {
  font-family: var(--font-primary);
  font-size: 2rem;
  margin-bottom: 1rem;
  text-align: center;
}

.page-body {
  font-family: var(--font-secondary);
  font-size: 1rem;
  line-height: 1.8;
}

/* ================================
   ===  BLOGG & ARTIKELSIDOR  ===
   ================================ */
#primary.content-area {
  width: min(1100px, 100%);
  margin: 3rem auto;
  padding: 0 1.5rem;
}

@media (max-width: 768px) {
  #primary.content-area {
    margin: 2rem auto;
    padding: 0 1rem;
  }
}

.site-main .page-header {
  margin-bottom: 2.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(99, 0, 0, 0.2);
}

.site-main .page-title {
  font-size: clamp(1.8rem, 2.8vw, 2.4rem);
  margin-bottom: 0.5rem;
  text-align: left;
}

.archive-description,
.author-header .author-info,
.error-404 .page-content,
.no-results .page-content {
  font-family: var(--font-secondary);
  line-height: 1.8;
  color: #333;
}

.site-main article {
  background-color: var(--color-white);
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  margin-bottom: 2.5rem;
}

.site-main article:last-of-type {
  margin-bottom: 3rem;
}

.entry-header {
  margin-bottom: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.entry-title {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.3;
  margin: 0;
}

.entry-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.entry-title a:hover,
.entry-title a:focus {
  color: var(--color-secondary);
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--color-tertiary);
}

.entry-meta a {
  color: inherit;
  text-decoration: none;
}

.entry-meta a:hover,
.entry-meta a:focus {
  color: var(--color-secondary);
}

.post-thumbnail {
  margin: 0 0 1.5rem;
}

.post-thumbnail img {
  width: 100%;
  height: auto;
  display: block;
}

.entry-content,
.entry-summary {
  font-family: var(--font-secondary);
  line-height: 1.9;
  color: var(--color-black);
}

.entry-content > *:not(:last-child),
.entry-summary > *:not(:last-child) {
  margin-bottom: 1.1rem;
}

.entry-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.5rem;
  border-left: 4px solid var(--color-primary);
  background: rgba(191, 162, 136, 0.15);
  font-style: italic;
}

.entry-footer {
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.entry-taxonomies {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.entry-taxonomies span {
  background: rgba(191, 162, 136, 0.2);
  padding: 0.35rem 0.6rem;
  border-radius: 999px;
}

.entry-taxonomies a {
  color: var(--color-secondary);
  text-decoration: none;
}

.entry-taxonomies a:hover,
.entry-taxonomies a:focus {
  color: var(--color-black);
}

.page-links {
  display: inline-flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
  font-family: var(--font-secondary);
}

.page-links a,
.page-links span {
  padding: 0.35rem 0.65rem;
  border: 1px solid var(--color-tertiary);
  text-decoration: none;
  color: inherit;
}

.page-links a:hover,
.page-links a:focus,
.page-links .current {
  background-color: var(--color-primary);
  color: var(--color-black);
  border-color: var(--color-primary);
}

.no-results,
.error-404 {
  text-align: center;
  padding: 3rem 2rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
  background-color: var(--color-white);
}

.no-results .page-title,
.error-404 .page-title {
  text-align: center;
}

.no-results .page-content p,
.error-404 .page-content p {
  margin-bottom: 1.5rem;
}

.author-header {
  margin-bottom: 2.5rem;
}

.author-info {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  padding: 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(191, 162, 136, 0.12);
}

.author-info img {
  flex-shrink: 0;
  border-radius: 50%;
}

.author-details {
  text-align: left;
}

.author-details .author-title {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

@media (max-width: 640px) {
  .author-info {
    flex-direction: column;
    text-align: center;
  }

  .author-details {
    text-align: center;
  }
}

#secondary.widget-area {
  margin: 3rem auto;
  width: min(1100px, 100%);
  padding: 0 1.5rem;
}

#secondary .widget {
  padding: 1.5rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background-color: var(--color-white);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

#secondary .widget + .widget {
  margin-top: 1.5rem;
}

.comments-area {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(0, 0, 0, 0.12);
}

.comments-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.5rem;
}

.comment-list .comment {
  border: 1px solid rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
  background-color: var(--color-white);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.comment-list .comment-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.comment-list .comment-metadata {
  font-size: 0.85rem;
  color: var(--color-tertiary);
  margin-bottom: 0.75rem;
}

.comment-navigation {
  display: flex;
  justify-content: space-between;
  margin: 2rem 0;
  font-family: var(--font-secondary);
}

.no-comments {
  text-align: center;
  padding: 1.5rem;
  background: rgba(191, 162, 136, 0.12);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.comment-respond {
  margin-top: 3rem;
  padding: 2rem;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background-color: var(--color-white);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.comment-respond label {
  display: block;
  margin-bottom: 0.35rem;
  font-family: var(--font-secondary);
}

.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
  width: 100%;
  padding: 0.65rem;
  border: 1px solid rgba(0, 0, 0, 0.2);
  border-radius: 0;
  font-family: var(--font-secondary);
}

.comment-respond input[type="submit"] {
  margin-top: 1rem;
  background-color: var(--color-secondary);
  color: var(--color-white);
  padding: 0.65rem 1.5rem;
  border: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.comment-respond input[type="submit"]:hover,
.comment-respond input[type="submit"]:focus {
  background-color: var(--color-primary);
  color: var(--color-black);
}
