/*
Theme Name: Modern Theme – Starfleet
Theme URI: https://example.com/modern-theme
Author: Grok
Author URI: https://x.ai
Description: Star Trek tema sa Customizerom – boje, veličine teksta, meni. Bosanski jezik. Glossy meni, logo bez okvira.
Version: 2.1.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: modern-theme
Tags: blog, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, two-columns, right-sidebar, responsive-layout, dark
*/

/* ==========================================================================
   CSS Variables – Star Trek / LCARS palette
   Ändra dessa för att skapa egna gradientfärger
   ========================================================================== */
:root {
  /* Primary – Starfleet blue / cyan */
  --color-primary: #00b4d8;
  --color-primary-hover: #48cae4;
  --color-accent: #ff9f1c;          /* Gold / amber */
  --color-accent-2: #e63946;        /* Red alert */

  /* Text */
  --color-text: #e0f7fa;
  --color-text-light: #90e0ef;
  --color-text-muted: #7b9eab;

  /* Backgrounds – dark space */
  --color-bg: #0a1628;
  --color-bg-alt: #0d2137;
  --color-bg-card: rgba(13, 33, 55, 0.85);
  --color-border: #1b3a4b;

  /* Gradients – anpassa fritt */
  --gradient-bg: linear-gradient(160deg, #050d1a 0%, #0a1628 40%, #0d2137 70%, #0a1a2e 100%);
  --gradient-header: linear-gradient(90deg, #0a1628 0%, #0d2137 50%, #0a1628 100%);
  --gradient-menu: linear-gradient(135deg, #0077b6 0%, #00b4d8 40%, #48cae4 70%, #90e0ef 100%);
  --gradient-menu-hover: linear-gradient(135deg, #00b4d8 0%, #48cae4 50%, #ade8f4 100%);
  --gradient-button: linear-gradient(135deg, #0077b6, #00b4d8);
  --gradient-card: linear-gradient(145deg, rgba(13, 33, 55, 0.9), rgba(10, 22, 40, 0.95));
  --gradient-logo-area: linear-gradient(90deg, #001d3d, #003566, #001d3d);

  --color-link: #48cae4;
  --font-sans: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Orbitron', 'Inter', system-ui, sans-serif;
  --max-width: 1200px;
  --content-width: 780px;
  --header-height: 90px;
  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 4px 20px rgba(0, 180, 216, 0.15);
  --shadow-lg: 0 8px 32px rgba(0, 180, 216, 0.25);
  --glow: 0 0 12px rgba(0, 180, 216, 0.4);
  --transition: 0.25s ease;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text);
  background: var(--gradient-bg);
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-link);
  text-decoration: none;
  transition: color var(--transition), text-shadow var(--transition);
}

a:hover {
  color: var(--color-primary-hover);
  text-shadow: 0 0 8px rgba(72, 202, 228, 0.5);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.75em;
  color: var(--color-text);
  letter-spacing: 0.02em;
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.375rem; }
h4 { font-size: 1.125rem; }

p {
  margin-bottom: 1.25em;
}

ul, ol {
  margin-bottom: 1.25em;
  padding-left: 1.5em;
}

/* ==========================================================================
   Layout
   ========================================================================== */
.site-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.site-content {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  padding: 2.5rem 0 4rem;
}

.site-content.no-sidebar {
  grid-template-columns: 1fr;
  max-width: var(--content-width);
  margin: 0 auto;
}

.content-area {
  min-width: 0;
}

/* ==========================================================================
   Header – Starfleet bridge style
   ========================================================================== */
.site-header {
  background: var(--gradient-header);
  border-bottom: 2px solid var(--color-primary);
  box-shadow: 0 4px 30px rgba(0, 180, 216, 0.2);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  min-height: var(--header-height);
  gap: 1.5rem;
}

/* Logo area – egen tydlig plats */
.site-branding {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
  padding: 0.25rem 0;
  background: transparent;
  border: none;
  box-shadow: none;
  min-height: 50px;
}

/* Optional frame – enabled via Customizer checkbox */
.site-branding.has-frame {
  padding: 0.5rem 1.25rem;
  background: var(--gradient-logo-area);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(0, 180, 216, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--glow);
  min-height: 64px;
}

.site-branding .custom-logo-link {
  display: block;
  line-height: 0;
}

.site-branding .custom-logo {
  max-height: 50px;
  width: auto;
}

.site-title-group {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.site-title {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.site-title a {
  color: var(--color-primary);
  text-shadow: 0 0 10px rgba(0, 180, 216, 0.5);
}

.site-title a:hover {
  color: var(--color-primary-hover);
}

.site-description {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  margin: 0;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* ==========================================================================
   Navigation – Glossy gradient menu (Star Trek LCARS style)
   Undermenyer dolda tills hover / expand
   ========================================================================== */
.main-navigation {
  display: flex;
  align-items: center;
}

/* Endast top-level-menyn i rad */
.main-navigation > ul {
  display: flex;
  list-style: none;
  gap: 0.4rem;
  margin: 0;
  padding: 0;
  align-items: center;
}

.main-navigation li {
  position: relative;
  list-style: none;
}

/* Top-level länkar */
.main-navigation > ul > li > a {
  display: block;
  color: #0a1628;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.7rem 1.35rem;
  background: var(--gradient-menu);
  border-radius: 4px 16px 4px 16px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  box-shadow:
    0 4px 14px rgba(0, 119, 182, 0.45),
    0 1px 3px rgba(0, 0, 0, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.55),
    inset 0 -2px 4px rgba(0, 50, 80, 0.25),
    inset 0 0 20px rgba(255, 255, 255, 0.08);
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Extra glossy shine layers */
.main-navigation > ul > li > a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 55%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.5) 0%,
    rgba(255, 255, 255, 0.15) 40%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
  border-radius: 4px 16px 0 0;
}

.main-navigation > ul > li > a:hover,
.main-navigation > ul > li.current-menu-item > a,
.main-navigation > ul > li.current-menu-ancestor > a {
  background: var(--gradient-menu-hover);
  color: #001d3d;
  box-shadow:
    0 6px 20px rgba(0, 180, 216, 0.6),
    0 1px 3px rgba(0, 0, 0, 0.2),
    inset 0 2px 0 rgba(255, 255, 255, 0.65),
    inset 0 -2px 4px rgba(0, 50, 80, 0.2),
    0 0 24px rgba(72, 202, 228, 0.45);
  transform: translateY(-2px);
}

/* Strelica za stavke sa podmenijem */
.main-navigation .menu-item-has-children > a::after {
  content: ' ▾';
  font-size: 0.7em;
  opacity: 0.85;
  position: static;
  display: inline;
  background: none;
  height: auto;
  width: auto;
  left: auto;
  right: auto;
  bottom: auto;
}

/* ========== UNDERMENYER – dolda som standard ========== */
.main-navigation .sub-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 220px;
  margin: 0.35rem 0 0;
  padding: 0.4rem;
  list-style: none;
  background: linear-gradient(160deg, #0d2137 0%, #0a1628 100%);
  border: 1px solid rgba(0, 180, 216, 0.45);
  border-radius: 8px;
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.5),
    0 0 20px rgba(0, 180, 216, 0.15);
  z-index: 200;
}

/* Visa undermeny vid hover (desktop) */
.main-navigation li:hover > .sub-menu,
.main-navigation li.focus > .sub-menu,
.main-navigation li.toggled-submenu > .sub-menu {
  display: block;
}

/* Undermenylänkar */
.main-navigation .sub-menu a {
  display: block;
  color: var(--color-text);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.65rem 1rem;
  background: transparent;
  border-radius: 6px;
  box-shadow: none;
  transition: all var(--transition);
}

.main-navigation .sub-menu a::before {
  display: none;
}

.main-navigation .sub-menu a:hover,
.main-navigation .sub-menu .current-menu-item > a {
  background: rgba(0, 180, 216, 0.2);
  color: var(--color-primary-hover);
  text-shadow: 0 0 8px rgba(72, 202, 228, 0.4);
  transform: none;
  box-shadow: none;
}

/* Nästlade undermenyer (nivå 3) */
.main-navigation .sub-menu .sub-menu {
  top: 0;
  left: 100%;
  margin: 0 0 0 0.35rem;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: var(--gradient-menu);
  border: none;
  cursor: pointer;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius);
  color: #0a1628;
  box-shadow: 0 2px 8px rgba(0, 119, 182, 0.4);
}

.menu-toggle svg {
  width: 22px;
  height: 22px;
}

/* ==========================================================================
   Posts & Content – Full content, no truncation
   ========================================================================== */
.post,
article {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

/* Subtle top accent bar (LCARS style) */
.post::before,
article::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--gradient-menu);
}

.entry-header {
  margin-bottom: 1.5rem;
}

.entry-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}

.entry-title a {
  color: var(--color-text);
}

.entry-title a:hover {
  color: var(--color-primary);
}

.entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 1rem;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
}

.entry-meta a {
  color: var(--color-text-light);
}

.entry-meta a:hover {
  color: var(--color-primary);
}

.entry-thumbnail {
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.entry-thumbnail img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.entry-content {
  font-size: 1.0625rem;
  color: var(--color-text);
}

.entry-content h2,
.entry-content h3 {
  margin-top: 2rem;
  color: var(--color-primary);
}

.entry-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.entry-content a:hover {
  color: var(--color-primary-hover);
}

.entry-content img {
  border-radius: var(--radius);
  margin: 1.5rem 0;
  border: 1px solid var(--color-border);
}

.entry-content blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  background: rgba(255, 159, 28, 0.08);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--color-text-light);
}

.entry-footer {
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border);
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.entry-footer a {
  color: var(--color-primary);
}

/* Single post */
.single .entry-title {
  font-size: 2.1rem;
  color: var(--color-primary);
  text-shadow: 0 0 15px rgba(0, 180, 216, 0.3);
}

/* ==========================================================================
   Sidebar – Console panels
   ========================================================================== */
.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  height: fit-content;
}

.widget {
  background: var(--gradient-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.widget::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 4px;
  height: 100%;
  background: var(--gradient-menu);
}

.widget-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.widget ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.widget li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(27, 58, 75, 0.6);
}

.widget li:last-child {
  border-bottom: none;
}

.widget a {
  color: var(--color-text-light);
}

.widget a:hover {
  color: var(--color-primary);
}

/* Search form */
.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-form input[type="search"] {
  flex: 1;
  padding: 0.7rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-size: 0.95rem;
  background: rgba(10, 22, 40, 0.8);
  color: var(--color-text);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-form input[type="search"]:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.2);
}

.search-form input[type="search"]::placeholder {
  color: var(--color-text-muted);
}

.search-form button {
  padding: 0.7rem 1.25rem;
  background: var(--gradient-button);
  color: #0a1628;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(0, 119, 182, 0.4);
}

.search-form button:hover {
  box-shadow: 0 4px 16px rgba(0, 180, 216, 0.5);
  transform: translateY(-1px);
}

/* ==========================================================================
   Comments
   ========================================================================== */
.comments-area {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

.comments-title {
  font-family: var(--font-display);
  color: var(--color-primary);
  letter-spacing: 0.04em;
}

.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
}

.comment {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.comment-author {
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--color-text);
}

.comment-meta {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.comment-content {
  margin-bottom: 0.75rem;
  color: var(--color-text-light);
}

.comment-reply-link {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-primary);
}

/* Comment form */
.comment-form label {
  display: block;
  font-weight: 500;
  margin-bottom: 0.375rem;
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 1rem;
  margin-bottom: 1rem;
  background: rgba(10, 22, 40, 0.8);
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.2);
}

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

.comment-form .submit {
  background: var(--gradient-button);
  color: #0a1628;
  border: none;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 2px 8px rgba(0, 119, 182, 0.4);
}

.comment-form .submit:hover {
  box-shadow: 0 4px 16px rgba(0, 180, 216, 0.5);
  transform: translateY(-1px);
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.pagination,
.nav-links {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}

.pagination a,
.pagination span,
.nav-links a,
.nav-links span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 0.85rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--color-text);
  background: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  transition: all var(--transition);
}

.pagination a:hover,
.nav-links a:hover {
  background: var(--gradient-button);
  color: #0a1628;
  border-color: transparent;
  box-shadow: var(--glow);
}

.pagination .current,
.nav-links .current {
  background: var(--gradient-button);
  color: #0a1628;
  border-color: transparent;
}

/* Post navigation */
.post-navigation {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
}

.post-navigation .nav-links {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.post-navigation a {
  color: var(--color-text-light);
  font-size: 0.9rem;
}

.post-navigation a:hover {
  color: var(--color-primary);
}

.nav-subtitle {
  display: block;
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: linear-gradient(180deg, #0a1628 0%, #050d1a 100%);
  border-top: 2px solid var(--color-primary);
  padding: 2.5rem 0;
  margin-top: auto;
  box-shadow: 0 -4px 30px rgba(0, 180, 216, 0.1);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  text-align: center;
}

.site-info {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-family: var(--font-display);
  letter-spacing: 0.03em;
}

.site-info a {
  color: var(--color-text-light);
}

.site-info a:hover {
  color: var(--color-primary);
}

/* ==========================================================================
   404 Page
   ========================================================================== */
.error-404 {
  text-align: center;
  padding: 4rem 0;
}

.error-404 h1 {
  font-size: 5rem;
  color: var(--color-primary);
  text-shadow: 0 0 30px rgba(0, 180, 216, 0.5);
  margin-bottom: 0.5rem;
}

.error-404 .page-subtitle {
  font-size: 1.35rem;
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
}

.error-404 .button,
.button {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  background: var(--gradient-button);
  color: #0a1628 !important;
  border-radius: var(--radius);
  font-weight: 600;
  font-family: var(--font-display);
  letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(0, 119, 182, 0.4);
  transition: all var(--transition);
}

.error-404 .button:hover,
.button:hover {
  box-shadow: 0 4px 16px rgba(0, 180, 216, 0.5);
  transform: translateY(-1px);
  text-shadow: none;
}

/* ==========================================================================
   Page header (archive, search etc.)
   ========================================================================== */
.page-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.page-title {
  color: var(--color-primary);
  font-size: 1.75rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
  .site-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .sidebar {
    position: static;
  }
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    min-height: auto;
  }

  .site-branding {
    flex: 1;
    min-height: 52px;
    padding: 0.4rem 1rem;
  }

  .site-title {
    font-size: 1.1rem;
  }

  .menu-toggle {
    display: block;
  }

  .main-navigation {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg-alt);
    border-bottom: 2px solid var(--color-primary);
    padding: 1rem;
    display: none;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  }

  .main-navigation.toggled {
    display: block;
  }

  .main-navigation > ul {
    flex-direction: column;
    gap: 0.4rem;
  }

  .main-navigation > ul > li > a {
    border-radius: 4px 12px 4px 12px;
    text-align: center;
  }

  /* Mobil: undermenyer dolda, expandera vid klick */
  .main-navigation .sub-menu {
    position: static;
    display: none;
    margin: 0.3rem 0 0.3rem 0.75rem;
    padding: 0.3rem;
    border: 1px solid rgba(0, 180, 216, 0.3);
    box-shadow: none;
    min-width: 0;
  }

  .main-navigation li.toggled-submenu > .sub-menu {
    display: block;
  }

  .main-navigation li:hover > .sub-menu {
    display: none; /* stäng av hover på mobil */
  }

  .main-navigation li.toggled-submenu:hover > .sub-menu {
    display: block;
  }

  .main-navigation .sub-menu a {
    text-align: left;
    padding: 0.55rem 0.85rem;
  }

  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }

  .entry-title {
    font-size: 1.4rem;
  }

  .single .entry-title {
    font-size: 1.6rem;
  }

  .post,
  article {
    padding: 1.5rem;
  }

  .site-content {
    padding: 1.5rem 0 3rem;
  }
}

@media (max-width: 480px) {
  .site-container,
  .header-inner,
  .footer-inner {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .entry-meta {
    gap: 0.5rem;
  }

  .site-branding {
    padding: 0.35rem 0.75rem;
  }
}

/* ==========================================================================
   Accessibility & Utilities
   ========================================================================== */
.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background-color: #0d2137;
  border-radius: 3px;
  box-shadow: 0 0 2px 2px rgba(0, 180, 216, 0.6);
  clip: auto !important;
  clip-path: none;
  color: #48cae4;
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  height: auto;
  left: 5px;
  line-height: normal;
  padding: 15px 23px 14px;
  text-decoration: none;
  top: 5px;
  width: auto;
  z-index: 100000;
}

/* WordPress core classes */
.alignleft {
  float: left;
  margin-right: 1.5rem;
  margin-bottom: 1rem;
}

.alignright {
  float: right;
  margin-left: 1.5rem;
  margin-bottom: 1rem;
}

.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-top: 0.5rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

/* Sticky post */
.sticky .entry-title::before {
  content: '◆ ';
  color: var(--color-accent);
}
