/*
Theme Name: Blub
Theme URI: https://borndesign.dk
Author: Per-Olof Olofsson
Author URI: https://borndesign.dk
Description: A secure WordPress theme.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blub
Tags: custom-menu, custom-logo, e-commerce
*/

/* ==========================================================================
   Base Styles
   ========================================================================== */

:root {
  --blub-primary: #2563eb;
  --blub-secondary: #475569;
  --blub-text: #1e293b;
  --blub-bg: #ffffff;
  --blub-border: #e2e8f0;
  --blub-max-width: 1200px;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--blub-text);
  background: var(--blub-bg);
}

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

a {
  color: var(--blub-primary);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

/* Layout */
.site {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-content {
  flex: 1;
  width: 100%;
  max-width: var(--blub-max-width);
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Page builder pages: let the builder control layout */
.blub-wpbakery-page .site-content {
  max-width: none;
  padding: 0;
}

/* Gutenberg: full-width and wide block alignment */
.entry-content > .alignwide {
  max-width: calc(var(--blub-max-width) + 200px);
  margin-left: calc(50% - ((var(--blub-max-width) + 200px) / 2));
  margin-right: calc(50% - ((var(--blub-max-width) + 200px) / 2));
  width: auto;
}

.entry-content > .alignfull {
  max-width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
}

.entry-content > .alignleft {
  float: left;
  margin-right: 2rem;
  margin-bottom: 1rem;
  max-width: 50%;
}

.entry-content > .alignright {
  float: right;
  margin-left: 2rem;
  margin-bottom: 1rem;
  max-width: 50%;
}

.entry-content > .aligncenter {
  margin-left: auto;
  margin-right: auto;
}

.wp-block-separator.is-style-wide {
  max-width: none;
}

.content-area {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.primary {
  flex: 1;
  min-width: 0;
}

.widget-area {
  width: 300px;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .widget-area {
    width: 100%;
  }
}

/* Header */
.site-header {
  background: var(--blub-bg);
  border-bottom: 1px solid var(--blub-border);
  padding: 1rem;
}

.site-header .wrap {
  max-width: var(--blub-max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.site-branding .site-title {
  margin: 0;
  font-size: 1.5rem;
}

.site-branding .site-title a {
  color: var(--blub-text);
}

/* Navigation */
.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.main-navigation a {
  color: var(--blub-secondary);
  font-weight: 500;
  font-size: 0.95rem;
}

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

/* Posts */
.entry-header { margin-bottom: 1rem; }

.entry-title {
  font-size: 1.75rem;
  line-height: 1.3;
  margin: 0 0 0.5rem;
}

.entry-meta {
  font-size: 0.875rem;
  color: var(--blub-secondary);
}

.entry-content {
  margin-bottom: 2rem;
}

.entry-content h2, .entry-content h3, .entry-content h4 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.entry-footer {
  font-size: 0.875rem;
  color: var(--blub-secondary);
  padding-top: 1rem;
  border-top: 1px solid var(--blub-border);
}

/* Footer */
.site-footer {
  background: var(--blub-text);
  color: #94a3b8;
  padding: 2rem 1rem;
  margin-top: auto;
}

.site-footer .wrap {
  max-width: var(--blub-max-width);
  margin: 0 auto;
}

.footer-widgets {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .footer-widgets {
    grid-template-columns: 1fr;
  }
}

.site-info {
  text-align: center;
  font-size: 0.875rem;
  padding-top: 1rem;
  border-top: 1px solid #334155;
}

/* Accessibility */
.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 !important;
  width: 1px;
  word-wrap: normal !important;
}

.screen-reader-text:focus {
  background: #f1f1f1;
  clip: auto !important;
  clip-path: none;
  color: #21759b;
  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;
}

/* Skip link */
.skip-link:focus {
  background: var(--blub-primary);
  color: #fff;
  padding: 0.5rem 1rem;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100000;
}
