/* Diorama Dreamland – Main Stylesheet
 * Based on the original 2012 design by wolfgang.rittner.at
 * Ported to modern CSS (Flexbox) with responsive additions.
 */

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

body {
  margin: 0;
  padding: 0;
  background-color: #120E0B;
  color: #75665e;
  font-family: Verdana, Arial, sans-serif;
  font-size: 11.5pt;
  line-height: 1.5;
  background-image: url('../img/header-line.png');
  background-repeat: repeat-x;
  background-position: 0 3px;
}

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

.muted { color: #403731; }

h1, h2 { color: #ad978b; }

h1 {
  font-weight: normal;
  font-size: 13pt;
  margin-top: 0;
}

h2 {
  font-weight: normal;
  font-size: 13pt;
  margin-bottom: 0.5em;
}

p {
  font-size: 11.5pt;
  line-height: 150%;
  margin: 0 0 1em 0;
}

hr {
  border: 0;
  border-top: 1px solid #29211c;
  border-bottom: 1px solid #413731;
}

a {
  color: #ad978b;
  text-decoration: underline;
}

a:hover {
  color: #e09e00;
}

/* === Container === */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px;
}

/* === Row / Grid (Flexbox replacement for Bootstrap 2 spans) === */
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.span2  { flex: 0 0 calc(16.666% - 10px); }
.span3  { flex: 0 0 calc(25% - 10px); }
.span4  { flex: 0 0 calc(33.333% - 10px); }
.span5  { flex: 0 0 calc(41.666% - 10px); }
.span6  { flex: 0 0 calc(50% - 5px); }
.span7  { flex: 0 0 calc(58.333% - 10px); }
.span8  { flex: 0 0 calc(66.666% - 10px); }
.span9  { flex: 0 0 calc(75% - 10px); }
.span12 { flex: 0 0 100%; }

/* === LANDING PAGE === */
.landing-page .container {
  background-image: url('../img/header-image.jpg');
  background-repeat: no-repeat;
  background-position: center 10px;
  background-size: 1100px auto;
  padding-left: 70px;
  padding-right: 70px;
}

.landing-page #header {
  text-align: center;
  min-height: 500px;
  padding-top: 10px;
}

.landing-page #header .site-title {
  display: block;
  margin: 2px auto 0 auto;
  max-width: 100%;
  height: auto;
}

.landing-page #header h1 {
  color: #ad978b;
  font-size: 26pt;
  font-weight: normal;
  line-height: 40pt;
  margin-top: 280px;
  margin-bottom: 0;
}

.landing-page #header p {
  color: #75665e;
  font-size: 17pt;
  font-weight: normal;
  line-height: 22.5pt;
  margin-top: 0;
}

/* Main navigation on landing (thumbnail row) */
.landing-page #main-nav {
  margin-bottom: 40px;
}

.landing-page #main-nav .row {
  justify-content: center;
  text-align: center;
  padding-top: 15px;
  gap: 0;
}

.landing-page #main-nav .nav-item {
  flex: 0 0 auto;
  text-align: center;
  padding: 0 8px;
}

.landing-page #main-nav .nav-item a {
  color: #ad978b;
  text-decoration: none;
  font-size: 11.5pt;
  display: block;
}

.landing-page #main-nav .nav-item a:hover {
  color: #e09e00;
}

.landing-page #main-nav .nav-item img {
  display: block;
  margin-top: 7px;
  width: 130px;
  height: 58px;
  object-fit: cover;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.landing-page #main-nav .nav-item a:hover img {
  opacity: 1;
}

/* Content columns on landing */
.landing-page .content-columns {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  position: relative;
}

.landing-page #content-left {
  flex: 1 1 60%;
  min-width: 300px;
}

.landing-page #content-right {
  flex: 0 0 320px;
}

.landing-page #content-right h1 {
  margin-left: 0;
}

/* Blockquote */
.blockquote {
  color: #5f534c;
  font-size: 13pt;
  line-height: 18pt;
  padding-left: 25px;
  text-align: right;
  position: relative;
  margin-top: 60px;
}

.blockquote::before {
  content: "\201C";
  font-size: 120pt;
  font-family: Arial, sans-serif;
  color: #211b17;
  position: absolute;
  left: -10px;
  top: -30px;
  z-index: 0;
  line-height: 1;
}

/* Latest galleries list */
.latest-galleries {
  list-style: none;
  margin: 0;
  padding: 0;
}

.latest-galleries li {
  margin-bottom: 15px;
}

.latest-galleries li a {
  text-decoration: none;
  color: #ad978b;
  display: block;
}

.latest-galleries li a:hover {
  color: #e09e00;
}

.latest-galleries li img {
  display: block;
  margin-top: 5px;
  width: 140px;
  height: 90px;
  object-fit: cover;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.latest-galleries li a:hover img {
  opacity: 1;
}

/* === TWO-COLUMN SUBPAGES === */
.two-column #header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  padding-top: 15px;
}

.two-column #header .site-title {
  max-width: 425px;
  height: auto;
}

.two-column #main-nav {
  font-size: 10.5pt;
}

.two-column #main-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 0;
}

.two-column #main-nav li {
  padding: 0 8px;
  border-right: 1px solid #29211c;
}

.two-column #main-nav li:last-child {
  border-right: none;
}

.two-column #main-nav a {
  text-decoration: none;
  color: #352a21;
  transition: color 0.2s;
}

.two-column #main-nav a:hover,
.two-column #main-nav a.active,
.two-column #main-nav .current-menu-item a {
  color: #ad978b;
}

/* Two-column content area */
.two-column .content-area {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
}

.two-column #content {
  flex: 1 1 0;
  min-width: 0;
}

.two-column #sidebar {
  flex: 0 0 200px;
}

/* Sub-navigation (sidebar for Tips & Tricks, Galleries) */
.subpage-nav {
  list-style-type: none;
  margin: 0;
  padding: 0;
}

.subpage-nav li {
  margin-bottom: 10px;
  text-align: right;
}

.subpage-nav li a {
  text-decoration: none;
  color: #352A21;
  transition: color 0.2s;
}

.subpage-nav li.active a,
.subpage-nav li a:hover,
.subpage-nav .current_page_item a {
  color: #ad978b;
}

.subpage-nav li img {
  opacity: 0.5;
  transition: opacity 0.2s;
  display: block;
  margin-top: 4px;
}

.subpage-nav li.active img,
.subpage-nav li:hover img {
  opacity: 1;
}

/* === GALLERY === */
.dd-gallery {
  display: grid;
  gap: 10px;
}

.dd-gallery-cols-2 { grid-template-columns: repeat(2, 1fr); }
.dd-gallery-cols-3 { grid-template-columns: repeat(3, 1fr); }
.dd-gallery-cols-4 { grid-template-columns: repeat(4, 1fr); }

.dd-gallery-item {
  display: block;
  overflow: hidden;
  border: 2px solid #29211c;
  transition: border-color 0.2s;
}

.dd-gallery-item:hover {
  border-color: #ad978b;
}

.dd-gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.3s;
}

.dd-gallery-item:hover img {
  transform: scale(1.03);
}

/* Gallery archive grid */
.gallery-archive-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}

.gallery-archive-item {
  text-align: center;
}

.gallery-archive-item a {
  text-decoration: none;
  color: #ad978b;
  display: block;
}

.gallery-archive-item a:hover {
  color: #e09e00;
}

.gallery-archive-item img {
  display: block;
  width: 100%;
  height: 140px;
  object-fit: cover;
  border: 2px solid #29211c;
  transition: border-color 0.2s;
  margin-bottom: 8px;
}

.gallery-archive-item a:hover img {
  border-color: #ad978b;
}

.gallery-archive-item .title {
  font-size: 10pt;
}

/* === LIGHTBOX === */
.dd-lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  cursor: pointer;
}

.dd-lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.dd-lightbox-overlay img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  cursor: default;
}

.dd-lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #ad978b;
  font-size: 36px;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}

.dd-lightbox-close:hover {
  color: #e09e00;
}

.dd-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #ad978b;
  font-size: 48px;
  cursor: pointer;
  user-select: none;
  padding: 20px;
  transition: color 0.2s;
}

.dd-lightbox-nav:hover {
  color: #e09e00;
}

.dd-lightbox-prev { left: 10px; }
.dd-lightbox-next { right: 10px; }

/* === FOOTER === */
#footer {
  margin-top: 60px;
  padding-bottom: 40px;
  color: #5f534c;
}

#footer .row {
  justify-content: space-between;
}

#footer .span6:last-child {
  text-align: right;
}

#footer, #footer * {
  font-size: 8pt;
  line-height: 1.4;
}

#footer hr {
  margin: 30px 0 10px 0;
}

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

#footer a:hover {
  text-decoration: underline;
}

/* === MOBILE HAMBURGER MENU === */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: #ad978b;
  font-size: 28px;
  cursor: pointer;
  padding: 8px 12px;
  line-height: 1;
  border-radius: 4px;
  transition: background 0.2s;
}

.mobile-menu-toggle:hover {
  background: rgba(173, 151, 139, 0.1);
}

.mobile-menu-toggle .bar {
  display: block;
  width: 24px;
  height: 2px;
  background: #ad978b;
  margin: 5px 0;
  transition: transform 0.3s, opacity 0.3s;
}

.mobile-menu-toggle.active .bar:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .bar:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .bar:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* === RESPONSIVE: TABLET (max 960px) === */
@media (max-width: 960px) {
  .container {
    padding: 0 15px;
  }

  .landing-page .container {
    padding-left: 30px;
    padding-right: 30px;
    background-size: 100% auto;
  }

  .landing-page #header {
    min-height: 400px;
  }

  .landing-page #header h1 {
    font-size: 22pt;
    margin-top: 220px;
  }

  .landing-page #main-nav .nav-item img {
    width: 100px;
    height: 45px;
  }
}

/* === RESPONSIVE: MOBILE (max 768px) === */
@media (max-width: 768px) {
  body {
    font-size: 10pt;
  }

  .container {
    padding: 0 12px;
  }

  /* --- Landing Page Mobile --- */
  .landing-page .container {
    padding: 0 15px;
    background-image: none;
  }

  .landing-page #header {
    min-height: auto;
    padding: 20px 0;
    text-align: center;
  }

  .landing-page #header .site-title {
    max-width: 280px;
  }

  .landing-page #header h1 {
    font-size: 16pt;
    margin-top: 20px;
    line-height: 1.3;
  }

  .landing-page #header p {
    font-size: 11pt;
    line-height: 1.5;
  }

  /* Mobile Nav: Vertikal als Liste */
  .landing-page #main-nav {
    margin-bottom: 30px;
    border-top: 1px solid #29211c;
    border-bottom: 1px solid #29211c;
    padding: 15px 0;
  }

  .landing-page #main-nav .row {
    flex-direction: column;
    gap: 0;
  }

  .landing-page #main-nav .nav-item {
    padding: 10px 0;
    border-bottom: 1px solid #1e1814;
    display: flex;
    align-items: center;
    gap: 12px;
  }

  .landing-page #main-nav .nav-item:last-child {
    border-bottom: none;
  }

  .landing-page #main-nav .nav-item a {
    font-size: 12pt;
  }

  .landing-page #main-nav .nav-item img {
    width: 60px;
    height: 30px;
    object-fit: cover;
    border-radius: 3px;
    order: -1;
    margin-top: 0;
  }

  /* Content Columns stacked */
  .landing-page .content-columns {
    flex-direction: column;
  }

  .landing-page #content-left {
    order: 2;
  }

  .landing-page #content-right {
    flex: 1 1 100%;
    order: 1;
    margin-bottom: 20px;
  }

  .blockquote {
    font-size: 11pt;
    margin-top: 30px;
    padding-left: 15px;
    text-align: left;
  }

  .blockquote::before {
    font-size: 80pt;
    left: -5px;
    top: -20px;
  }

  .latest-galleries {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 10px;
  }

  .latest-galleries li {
    flex: 0 0 auto;
    margin-bottom: 0;
  }

  .latest-galleries li img {
    width: 120px;
    height: 80px;
    border-radius: 4px;
  }

  /* --- Two-Column Mobile --- */
  .mobile-menu-toggle {
    display: block;
  }

  .two-column #header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
    margin-bottom: 20px;
    position: sticky;
    top: 0;
    background: #120E0B;
    z-index: 100;
    border-bottom: 1px solid #29211c;
  }

  .two-column #header .site-title {
    max-width: 200px;
    height: auto;
  }

  .two-column #main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(18, 14, 11, 0.97);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }

  .two-column #main-nav.mobile-open {
    opacity: 1;
    visibility: visible;
  }

  .two-column #main-nav ul {
    flex-direction: column;
    align-items: center;
    gap: 0;
  }

  .two-column #main-nav li {
    border-right: none;
    border-bottom: 1px solid #29211c;
    padding: 15px 30px;
    text-align: center;
  }

  .two-column #main-nav li:last-child {
    border-bottom: none;
  }

  .two-column #main-nav a {
    font-size: 14pt;
    color: #ad978b;
  }

  /* Content stacked */
  .two-column .content-area {
    flex-direction: column;
  }

  .two-column #content {
    order: 1;
  }

  .two-column #sidebar {
    flex: 1 1 100%;
    order: 2;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #29211c;
  }

  .subpage-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .subpage-nav li {
    text-align: left;
    margin-bottom: 0;
  }

  .subpage-nav li a {
    display: inline-block;
    padding: 6px 12px;
    background: #1e1814;
    border-radius: 4px;
    font-size: 9pt;
    color: #75665e;
  }

  .subpage-nav li.active a,
  .subpage-nav .current_page_item a {
    background: #29211c;
    color: #ad978b;
  }

  .subpage-nav li img {
    display: none;
  }

  /* Gallery: 2 Spalten */
  .dd-gallery-cols-3,
  .dd-gallery-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }

  .dd-gallery {
    gap: 6px;
  }

  .dd-gallery-item {
    border-width: 1px;
  }

  .gallery-archive-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .gallery-archive-item img {
    height: 100px;
  }

  .gallery-archive-item .title {
    font-size: 9pt;
  }

  /* Footer */
  #footer .row {
    flex-direction: column;
    gap: 5px;
  }

  #footer .span6:last-child {
    text-align: left;
  }

  /* Lightbox Mobile */
  .dd-lightbox-overlay img {
    max-width: 95vw;
    max-height: 85vh;
  }

  .dd-lightbox-nav {
    font-size: 36px;
    padding: 15px;
  }

  .dd-lightbox-prev { left: 0; }
  .dd-lightbox-next { right: 0; }

  .dd-lightbox-close {
    top: 10px;
    right: 15px;
    font-size: 30px;
  }

  /* General grid override */
  .row {
    gap: 5px;
  }

  .span2, .span3, .span4, .span5,
  .span6, .span7, .span8, .span9 {
    flex: 1 1 100%;
  }

  /* Typografie anpassen */
  h1 { font-size: 14pt; }
  h2 { font-size: 12pt; }
  p { font-size: 10.5pt; }
}

/* === RESPONSIVE: SMALL PHONE (max 480px) === */
@media (max-width: 480px) {
  .landing-page #header .site-title {
    max-width: 220px;
  }

  .landing-page #header h1 {
    font-size: 14pt;
  }

  .landing-page #header p {
    font-size: 10pt;
  }

  .landing-page #main-nav .nav-item img {
    display: none;
  }

  .dd-gallery-cols-2,
  .dd-gallery-cols-3,
  .dd-gallery-cols-4 {
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
  }

  .gallery-archive-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
  }

  .two-column #header .site-title {
    max-width: 160px;
  }

  .latest-galleries li img {
    width: 100px;
    height: 65px;
  }
}
