/*
Theme Name: The Copenhagen Card
Theme URI: https://thecopenhagencard.com
Author: The Copenhagen Card
Description: Custom theme for thecopenhagencard.com — independent buying guide for the Copenhagen Card.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: Private
Text Domain: thecopenhagencard
*/

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, video { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ─── Variables ─────────────────────────────────────────── */
:root {
  --color-bg:           #FAFAF8;
  --color-header-bg:    #FFFFFF;
  --color-text:         #303B4D;
  --color-text-muted:   #7A8494;
  --color-accent-blue:  #ADCFEA;
  --color-sand:         #C4A882;
  --color-sand-dark:    #9E7D55;
  --color-sand-wash:    #F2EAE0;
  --color-divider:      #E8E6E1;
  --color-cta-bg:       #9E7D55;
  --color-cta-text:     #FFFFFF;
  --color-cta-hover:    #7D6240;

  --font-primary:       'Montserrat', sans-serif;
  --font-size-base:     17px;
  --line-height:        1.7;

  --max-width-prose:    760px;
  --max-width-section:  900px;

  --header-height:      66px;
  --side-pad-mobile:    20px;
  --side-pad-desktop:   48px;
}

/* ─── Base ───────────────────────────────────────────────── */
html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: var(--line-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ─── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  color: var(--color-text);
  line-height: 1.2;
}

h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.06;
}

h1 .h1-sub {
  display: block;
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 300;
  font-style: italic;
  color: var(--color-sand);
  letter-spacing: -0.01em;
  line-height: 1.15;
  margin-top: 0.15em;
}

h2 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h3 {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

p {
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
}

p + p { margin-top: 1em; }

strong { font-weight: 700; }

/* ─── Layout ─────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width-section);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--side-pad-mobile);
  padding-right: var(--side-pad-mobile);
}

.container--prose {
  max-width: var(--max-width-prose);
}

.section {
  padding-top: 56px;
  padding-bottom: 64px;
  border-bottom: 1px solid var(--color-divider);
}

.section:last-child { border-bottom: none; }

#page-wrap {
  padding-top: var(--header-height);
}

/* ─── Admin bar offset (logged-in view) ─────────────────────── */
.admin-bar .site-header { top: 32px; }

@media screen and (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}

@media (min-width: 768px) {
  .container {
    padding-left: var(--side-pad-desktop);
    padding-right: var(--side-pad-desktop);
  }
}

/* ─── Header ─────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--color-header-bg);
  border-bottom: 1px solid var(--color-divider);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--side-pad-mobile);
}

.site-logo img {
  height: 40px;
  width: auto;
  display: block;
}

/* Nav */
.primary-nav {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-header-bg);
  padding: 32px var(--side-pad-mobile);
  overflow-y: auto;
  z-index: 99;
}

.primary-nav.is-open { display: block; }

.primary-nav ul {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.primary-nav li a {
  display: block;
  padding: 14px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-text);
  border-bottom: 1px solid var(--color-divider);
  letter-spacing: 0.02em;
}

.primary-nav li.nav-cta {
  margin-top: 24px;
  border-bottom: none;
}

.primary-nav li.nav-cta a {
  border-bottom: none;
  display: inline-flex;
  padding: 12px 24px;
}

/* Hamburger */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (min-width: 900px) {
  .nav-toggle { display: none; }

  .header-inner {
    padding: 0 var(--side-pad-desktop);
  }

  .primary-nav {
    display: block;
    position: static;
    background: none;
    padding: 0;
    overflow: visible;
  }

  .primary-nav ul {
    flex-direction: row;
    align-items: center;
    gap: 4px;
  }

  .primary-nav li a {
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.04em;
    border-bottom: none;
    border-radius: 4px;
    transition: color 0.15s;
  }

  .primary-nav li a:hover {
    color: var(--color-sand-dark);
  }

  .primary-nav li.nav-cta { margin-top: 0; }

  .primary-nav li.nav-cta a {
    padding: 9px 20px;
    display: inline-flex;
  }
}

/* ─── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 14px;
  border-radius: 24px;
  padding: 15px 24px;
  transition: background-color 0.2s, color 0.2s;
  text-decoration: none;
  line-height: 1;
  letter-spacing: 0.01em;
}

.btn-cta {
  background: var(--color-cta-bg);
  color: #FFFFFF !important;
}

.btn-cta:hover {
  background: var(--color-cta-hover);
  color: #FFFFFF !important;
}

.btn-nav {
  padding: 9px 20px;
  font-size: 12px;
}

.btn-full {
  width: 100%;
}

@media (min-width: 640px) {
  .btn-full {
    width: auto;
  }
}

/* CTA block — centered, full-width mobile */
.cta-block {
  text-align: center;
  padding: 32px 0;
}

.cta-block .btn {
  width: 100%;
  max-width: 340px;
}

/* ─── Section Label ───────────────────────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-sand);
}

.section-label-line {
  flex: 1;
  height: 1px;
  background: var(--color-divider);
}

/* ─── Kicker (hero only) ──────────────────────────────────── */
.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.kicker-line {
  width: 32px;
  height: 1px;
  background: var(--color-accent-blue);
  flex-shrink: 0;
}

.kicker-text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* ─── Tables ─────────────────────────────────────────────── */
.price-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-primary);
}

.price-table th {
  background: var(--color-sand-wash);
  color: var(--color-sand-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--color-divider);
}

.price-table td {
  padding: 12px 16px;
  color: var(--color-text);
  font-size: 14px;
  border-bottom: 1px solid var(--color-divider);
}

.price-table td:first-child { font-weight: 600; }

.price-table tr:last-child td { border-bottom: none; }

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--color-divider);
  border-radius: 6px;
}

/* ─── Info / Buy Cards ───────────────────────────────────── */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 24px;
}

@media (min-width: 640px) {
  .cards-grid { grid-template-columns: 1fr 1fr; }
}

.buy-card {
  background: var(--color-header-bg);
  border: 1px solid var(--color-divider);
  border-left: 3px solid var(--color-sand);
  border-radius: 6px;
  padding: 24px;
}

.buy-card-number {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-accent-blue);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.buy-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
  margin-bottom: 8px;
}

.buy-card-body {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* ─── Numbered Steps ─────────────────────────────────────── */
.steps-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  margin-top: 24px;
}

.step {
  display: flex;
  gap: 20px;
  position: relative;
  padding-bottom: 32px;
}

.step:last-child { padding-bottom: 0; }

.step-connector {
  position: absolute;
  left: 22px;
  top: 46px;
  bottom: 0;
  width: 1px;
  background: var(--color-divider);
}

.step:last-child .step-connector { display: none; }

.step-number {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--color-sand-dark);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

.step-content { padding-top: 10px; }

.step-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 6px;
}

.step-body {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.65;
}

.step-body strong { color: var(--color-text); }

.step-body a {
  color: var(--color-sand-dark);
  text-decoration: underline;
  text-decoration-color: var(--color-sand);
}

/* ─── Quick Facts Panel ──────────────────────────────────── */
.facts-panel {
  background: var(--color-header-bg);
  border: 1px solid var(--color-divider);
  border-radius: 6px;
  overflow: hidden;
}

.facts-header {
  background: var(--color-sand-wash);
  padding: 13px 20px;
  border-bottom: 1px solid var(--color-divider);
}

.facts-header-text {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-sand-dark);
}

.facts-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--color-divider);
}

.facts-row:last-child { border-bottom: none; }

.facts-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.facts-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-text);
  text-align: right;
}

.facts-detail {
  font-size: 10px;
  color: var(--color-text-muted);
  display: block;
  font-weight: 500;
}

/* ─── FAQ ────────────────────────────────────────────────── */
.faq-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.faq-item h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 10px;
  line-height: 1.4;
}

.faq-item p {
  font-size: 15px;
  color: var(--color-text);
}

/* ─── Attraction Card ────────────────────────────────────── */
.attraction-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: 24px;
}

@media (min-width: 540px) {
  .attraction-grid { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .attraction-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.attraction-card {
  background: var(--color-header-bg);
  border: 1px solid var(--color-divider);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.attraction-card-image {
  position: relative;
  height: 140px;
  overflow: hidden;
  background: var(--color-sand-wash);
}

.attraction-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.attraction-badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge-advance {
  background: var(--color-sand-dark);
  color: #FFFFFF;
}

.badge-walk-in {
  background: var(--color-accent-blue);
  color: var(--color-text);
}

.attraction-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.attraction-type {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.attraction-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1.3;
}

.attraction-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.6;
  flex: 1;
}

.attraction-tip {
  background: var(--color-bg);
  border-radius: 4px;
  padding: 8px 10px;
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.5;
  display: flex;
  gap: 6px;
}

.attraction-tip::before {
  content: '·';
  color: var(--color-sand);
  font-weight: 700;
  flex-shrink: 0;
}

.attraction-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--color-divider);
}

.attraction-price {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
}

.btn-card {
  padding: 8px 14px;
  font-size: 11px;
  border-radius: 20px;
  background: var(--color-sand-dark);
  color: #FFFFFF;
  font-weight: 700;
}

.btn-card:hover {
  background: var(--color-cta-hover);
  color: #FFFFFF;
}

/* ─── Comparison Check/Cross ─────────────────────────────── */
.check { color: var(--color-sand-dark); font-weight: 700; }
.cross { color: var(--color-text-muted); }

/* ─── Entry content (WordPress block content) ────────────── */
.entry-content h2 { margin-top: 48px; margin-bottom: 16px; }
.entry-content h3 { margin-top: 32px; margin-bottom: 12px; }
.entry-content p  { margin-bottom: 16px; }
.entry-content ul,
.entry-content ol {
  list-style: disc;
  padding-left: 20px;
  margin-bottom: 16px;
}
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 6px; font-size: 16px; line-height: 1.65; }
.entry-content a  { color: var(--color-sand-dark); text-decoration: underline; text-decoration-color: var(--color-sand); }
.entry-content a:hover { color: var(--color-cta-hover); }
.entry-content .table-wrap { margin: 24px 0; }

/* ─── Block / content gap fix ───────────────────────────────── */
.entry-content,
.page-content,
main,
.site-main,
.wp-block-group,
.hentry,
.site-main article {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
.wp-block-html { margin-top: 0 !important; }

/* ─── Footer ─────────────────────────────────────────────── */
.site-footer {
  background: var(--color-bg);
  border-top: 1px solid var(--color-divider);
  padding: 56px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--side-pad-mobile);
  width: 100%;
}

@media (min-width: 768px) {
  .footer-inner {
    grid-template-columns: 1fr 2fr;
    padding: 0 var(--side-pad-desktop);
  }
}

.footer-brand .site-logo img {
  height: 36px;
  margin-bottom: 16px;
}

.footer-brand p {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: 12px;
}

.footer-disclosure {
  font-size: 11px;
  color: var(--color-text-muted);
  line-height: 1.6;
  padding-top: 12px;
  border-top: 1px solid var(--color-divider);
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}

@media (min-width: 640px) {
  .footer-links { grid-template-columns: repeat(4, 1fr); }
}

.footer-link-group h4 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text);
  margin-bottom: 8px;
}

.footer-link-group ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-link-group a {
  font-size: 14px;
  color: var(--color-text-muted);
  transition: color 0.15s;
  line-height: 1.4;
}

.footer-link-group a:hover { color: var(--color-sand-dark); }

.footer-bottom {
  margin-top: 48px;
  padding: 20px var(--side-pad-mobile);
  border-top: 1px solid var(--color-divider);
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.footer-bottom-bar {
  border-top: 1px solid var(--color-divider);
}

.footer-copyright {
  font-size: 12px;
  color: var(--color-text-muted);
}

.footer-legal {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-legal a {
  font-size: 12px;
  color: var(--color-text-muted);
  transition: color 0.15s;
}

.footer-legal a:hover { color: var(--color-sand-dark); }

/* ─── 404 ────────────────────────────────────────────────── */
.not-found {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px var(--side-pad-mobile);
}

.not-found h1 {
  font-size: 6rem;
  font-weight: 800;
  color: var(--color-divider);
  line-height: 1;
  margin-bottom: 16px;
}

.not-found p {
  color: var(--color-text-muted);
  margin-bottom: 32px;
  max-width: 400px;
}

/* ─── Utility ────────────────────────────────────────────── */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.text-muted { color: var(--color-text-muted); }
.text-sand  { color: var(--color-sand); }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
