/*
Theme Name: Backskiste Sail
Theme URI: https://www.backskiste.de
Author: Platon (AI)
Description: Modernes Segel-Magazin Theme nach Sailmagazine-Style
Version: 1.0.0
License: GNU General Public License v2+
Text Domain: backskiste-sail
*/

/* ============================================
   CSS RESET & BASE
   ============================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #1a1a1a;
  background-color: #ffffff;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: #0a1628;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
h4 { font-size: 1.1rem; }

p {
  margin-bottom: 1rem;
}

/* ============================================
   LAYOUT UTILITIES
   ============================================ */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ============================================
   HEADER
   ============================================ */
.site-header {
  background-color: #0a1628;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
  height: 70px;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.3rem;
  text-decoration: none;
}

.site-logo svg {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}

.site-logo span {
  color: #c8a45a;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.main-nav ul {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.main-nav a {
  color: #e8e8e8;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
  text-decoration: none;
}

.main-nav a:hover,
.main-nav a:focus {
  color: #c8a45a;
}

.header-social {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-social a {
  color: #e8e8e8;
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.header-social a:hover {
  color: #c8a45a;
}

.header-social svg {
  width: 20px;
  height: 20px;
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background-color: #ffffff;
  transition: transform 0.3s, opacity 0.3s;
}

/* Mobile menu */
.mobile-menu {
  display: none;
  background-color: #1a2d4a;
  padding: 1rem 1.5rem;
}

.mobile-menu.open {
  display: block;
}

.mobile-menu ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-menu a {
  color: #e8e8e8;
  font-size: 1rem;
  text-decoration: none;
  display: block;
  padding: 0.25rem 0;
}

.mobile-menu a:hover {
  color: #c8a45a;
}

.mobile-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.mobile-social a {
  color: #e8e8e8;
  display: flex;
  align-items: center;
}

.mobile-social svg {
  width: 22px;
  height: 22px;
}

/* ============================================
   SEARCH OVERLAY
   ============================================ */
.search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: #e8e8e8;
  display: flex;
  align-items: center;
  padding: 0;
  transition: color 0.2s;
}

.search-toggle:hover {
  color: #c8a45a;
}

.search-toggle svg {
  width: 20px;
  height: 20px;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-section {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 500px;
  max-height: 800px;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10, 22, 40, 0.2) 0%,
    rgba(10, 22, 40, 0.5) 50%,
    rgba(10, 22, 40, 0.85) 100%
  );
}

.hero-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 3rem 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

.hero-category {
  display: inline-block;
  background-color: #c8a45a;
  color: #0a1628;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.8rem;
  margin-bottom: 1rem;
  text-decoration: none;
}

.hero-title {
  color: #ffffff;
  font-size: clamp(1.8rem, 5vw, 3.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1rem;
  max-width: 900px;
}

.hero-title a {
  color: inherit;
  text-decoration: none;
}

.hero-title a:hover {
  color: #c8a45a;
}

.hero-meta {
  color: rgba(255,255,255,0.8);
  font-size: 0.9rem;
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.hero-meta .author {
  color: #c8a45a;
  font-weight: 600;
}

.hero-excerpt {
  color: rgba(255,255,255,0.85);
  font-size: 1.1rem;
  max-width: 600px;
  margin-top: 0.75rem;
  line-height: 1.5;
}

/* ============================================
   SECTION HEADERS
   ============================================ */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #0a1628;
}

.section-header h2 {
  color: #0a1628;
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.section-header .view-all {
  color: #c8a45a;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  transition: color 0.2s;
}

.section-header .view-all:hover {
  color: #0a1628;
}

/* ============================================
   ARTICLE CARDS
   ============================================ */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

.card {
  background: #ffffff;
  border-radius: 0;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  transition: transform 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.card-image-wrap {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background-color: #e8e8e8;
}

.card-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s;
}

.card:hover .card-image-wrap img {
  transform: scale(1.05);
}

.card-category {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background-color: #c8a45a;
  color: #0a1628;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.25rem 0.6rem;
  text-decoration: none;
  z-index: 2;
}

.card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #0a1628;
  line-height: 1.3;
  margin-bottom: 0.5rem;
}

.card-title a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s;
}

.card-title a:hover {
  color: #c8a45a;
}

.card-excerpt {
  color: #555;
  font-size: 0.9rem;
  line-height: 1.5;
  flex: 1;
  margin-bottom: 0.75rem;
}

.card-meta {
  color: #888;
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid #eee;
}

.card-meta .author {
  color: #c8a45a;
  font-weight: 600;
}

.read-more {
  color: #c8a45a;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: color 0.2s;
}

.read-more:hover {
  color: #0a1628;
}

/* ============================================
   SITE CONTENT SECTIONS
   ============================================ */
.site-section {
  padding: 3.5rem 0;
}

.site-section:nth-child(even) {
  background-color: #f8f9fa;
}

.site-section + .site-section {
  border-top: 1px solid #eee;
}

/* ============================================
   NEWSLETTER SECTION
   ============================================ */
.newsletter-section {
  background-color: #0a1628;
  padding: 4rem 1.5rem;
  text-align: center;
}

.newsletter-section h2 {
  color: #ffffff;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
}

.newsletter-section p {
  color: rgba(255,255,255,0.75);
  font-size: 1rem;
  max-width: 500px;
  margin: 0 auto 1.5rem;
}

.newsletter-form {
  display: flex;
  gap: 0;
  max-width: 480px;
  margin: 0 auto;
}

.newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.9rem 1.2rem;
  border: none;
  font-size: 0.95rem;
  background: rgba(255,255,255,0.1);
  color: #ffffff;
  border: 1px solid rgba(255,255,255,0.2);
  border-right: none;
}

.newsletter-form input[type="email"]::placeholder {
  color: rgba(255,255,255,0.5);
}

.newsletter-form input[type="email"]:focus {
  outline: none;
  background: rgba(255,255,255,0.15);
  border-color: #c8a45a;
}

.newsletter-form button {
  background-color: #c8a45a;
  color: #0a1628;
  border: none;
  padding: 0.9rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.2s;
  white-space: nowrap;
}

.newsletter-form button:hover {
  background-color: #b8943f;
}

/* ============================================
   SINGLE POST
   ============================================ */
.single-featured-image {
  width: 100%;
  height: 55vh;
  min-height: 400px;
  max-height: 600px;
  position: relative;
  overflow: hidden;
  background-color: #0a1628;
}

.single-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-header {
  padding: 2.5rem 1.5rem;
  text-align: center;
  border-bottom: 1px solid #eee;
}

.single-header .category-badge {
  display: inline-block;
  background-color: #c8a45a;
  color: #0a1628;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.3rem 0.8rem;
  margin-bottom: 1rem;
  text-decoration: none;
}

.single-header h1 {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  max-width: 860px;
  margin: 0 auto 1rem;
  line-height: 1.15;
}

.single-meta {
  color: #888;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.single-meta .author {
  color: #c8a45a;
  font-weight: 600;
}

.single-content {
  padding: 2.5rem 1.5rem;
  max-width: 720px;
  margin: 0 auto;
}

.single-content p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.3rem;
  color: #1a1a1a;
}

.single-content h2,
.single-content h3,
.single-content h4 {
  margin: 2rem 0 0.75rem;
  color: #0a1628;
}

.single-content ul,
.single-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  list-style: disc;
}

.single-content li {
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

.single-content a {
  color: #c8a45a;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.single-content a:hover {
  color: #0a1628;
}

.single-content blockquote {
  border-left: 4px solid #c8a45a;
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  background: #f8f9fa;
  font-size: 1.1rem;
  font-style: italic;
  color: #0a1628;
}

.single-content figure {
  margin: 2rem 0;
}

.single-content figure img {
  width: 100%;
  height: auto;
}

.single-content figcaption {
  text-align: center;
  color: #888;
  font-size: 0.85rem;
  margin-top: 0.5rem;
}

/* ============================================
   POST NAVIGATION
   ============================================ */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  padding: 2rem 1.5rem;
  max-width: 720px;
  margin: 0 auto;
  border-top: 1px solid #eee;
}

.post-nav-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-decoration: none;
  padding: 1rem;
  background: #f8f9fa;
  transition: background 0.2s;
}

.post-nav-item:hover {
  background: #0a1628;
}

.post-nav-item:hover .nav-label,
.post-nav-item:hover .nav-title {
  color: #ffffff;
}

.post-nav-item:hover .nav-label {
  color: #c8a45a;
}

.post-nav-item.align-right {
  text-align: right;
}

.nav-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #888;
  transition: color 0.2s;
}

.nav-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #0a1628;
  line-height: 1.3;
  transition: color 0.2s;
}

/* ============================================
   RELATED POSTS
   ============================================ */
.related-posts {
  padding: 2.5rem 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
  border-top: 1px solid #eee;
}

/* ============================================
   ARCHIVE PAGE
   ============================================ */
.archive-header {
  background-color: #0a1628;
  padding: 3rem 1.5rem;
  text-align: center;
}

.archive-header h1 {
  color: #ffffff;
  font-size: 2rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.archive-header .category-description {
  color: rgba(255,255,255,0.7);
  margin-top: 0.5rem;
  font-size: 1rem;
}

.archive-grid {
  padding: 3rem 1.5rem;
  max-width: 1280px;
  margin: 0 auto;
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 2rem 1.5rem;
  grid-column: 1 / -1;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #0a1628;
  background: #ffffff;
  border: 1px solid #ddd;
  text-decoration: none;
  transition: all 0.2s;
}

.pagination a:hover {
  background: #0a1628;
  color: #ffffff;
  border-color: #0a1628;
}

.pagination .current {
  background: #c8a45a;
  color: #0a1628;
  border-color: #c8a45a;
}

.pagination .prev,
.pagination .next {
  width: auto;
  padding: 0 1rem;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background-color: #0a1628;
  color: rgba(255,255,255,0.8);
  padding: 3rem 1.5rem 1.5rem;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  margin-bottom: 2rem;
}

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

.footer-logo a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.3rem;
  text-decoration: none;
}

.footer-logo a span {
  color: #c8a45a;
}

.footer-logo svg {
  width: 40px;
  height: 40px;
}

.footer-tagline {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
  line-height: 1.5;
}

.footer-nav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.footer-nav-col h4 {
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.footer-nav-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  list-style: none;
}

.footer-nav-col a {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-nav-col a:hover {
  color: #c8a45a;
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.footer-social a {
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  transition: color 0.2s;
}

.footer-social a:hover {
  color: #c8a45a;
}

.footer-social svg {
  width: 22px;
  height: 22px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

.footer-bottom a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-bottom a:hover {
  color: #c8a45a;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .card-grid-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .main-nav,
  .header-social {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .card-grid,
  .card-grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-section {
    height: 55vh;
    min-height: 400px;
  }

  .hero-content {
    padding: 2rem 1.5rem;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .site-section {
    padding: 2.5rem 0;
  }

  .footer-top {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-nav-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .newsletter-form input[type="email"] {
    border-right: 1px solid rgba(255,255,255,0.2);
  }

  .post-navigation {
    grid-template-columns: 1fr;
  }

  .single-featured-image {
    height: 40vh;
  }
}

@media (max-width: 480px) {
  .card-grid,
  .card-grid-4 {
    grid-template-columns: 1fr;
  }

  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.text-center { text-align: center; }
.text-accent { color: #c8a45a; }
.bg-navy { background-color: #0a1628; color: #fff; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}
::-webkit-scrollbar-track {
  background: #0a1628;
}
::-webkit-scrollbar-thumb {
  background: #c8a45a;
}
