/*
Theme Name: copenhagen-favorites
Theme URI: https://copenhagen-favorites.com
Author: Copenhagen Favorites
Description: Custom editorial theme for Copenhagen Favorites — a Copenhagen travel and lifestyle blog.
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: copenhagen-favorites
*/

/* ============================================================
   GOOGLE FONTS
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300;1,9..40,400&display=swap');

/* ============================================================
   CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  --blue:          #13214f;
  --white:         #FFFFFF;
  --bg:            #FFFFFF;
  --text:          #111111;
  --muted:         #6C7280;
  --border:        #E5E7EB;

  --font-serif:    'Instrument Serif', Georgia, serif;
  --font-sans:     'DM Sans', system-ui, -apple-system, sans-serif;

  --max-width:     1200px;
  --nav-height:    64px;
  --pad:           48px;
  --section-pad:   80px;

  --ease:          0.2s ease;
}

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

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background-color: var(--bg);
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 0 !important;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--ease), opacity var(--ease);
}

ul, ol { list-style: none; }

/* wp-block-list base reset — actual styling scoped to #oc-main below */
.wp-block-list { list-style: disc; }

button {
  cursor: pointer;
  font-family: var(--font-sans);
  border: none;
  background: none;
  padding: 0;
}

input, textarea, select {
  font-family: var(--font-sans);
  font-size: 14px;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.1;
  color: var(--text);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }

p {
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
}

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.oc-container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.oc-section {
  padding-block: var(--section-pad);
}

/* Screen reader only */
.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;
}

/* ============================================================
   PROSE — body content styling for blog posts
   ============================================================ */
.entry-content h1,
.entry-content h2,
.entry-content h3,
.entry-content h4,
.entry-content h5,
.entry-content h6 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--text);
  line-height: 1.2;
  margin-top: 2em;
  margin-bottom: 0.5em;
  max-width: 760px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

.entry-content h1 { font-size: clamp(2rem, 4vw, 3rem); }
.entry-content h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.entry-content h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
.entry-content h4 { font-size: 1.1rem; }

.entry-content p {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.85;
  color: var(--muted);
  margin-bottom: 1.5em;
  max-width: 760px;
  margin-inline: auto;
  padding-inline: var(--pad);
}

.entry-content ul,
.entry-content ol {
  max-width: 760px;
  margin-inline: auto;
  padding-inline: var(--pad);
  margin-bottom: 1.5em;
  padding-left: calc(var(--pad) + 20px);
}

.entry-content ul li,
.entry-content ol li {
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 0.5em;
}

.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }

.entry-content ul li::marker,
.entry-content ol li::marker {
  color: var(--blue);
}

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

.entry-content a:hover {
  opacity: 0.75;
}

.entry-content strong {
  font-weight: 600;
  color: var(--text);
}

.entry-content em {
  font-style: italic;
}

.entry-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin-inline: auto;
}

.entry-content figure {
  max-width: 760px;
  margin-inline: auto;
  padding-inline: var(--pad);
  margin-bottom: 2em;
}

.entry-content figcaption {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
  font-family: var(--font-sans);
  letter-spacing: 0.05em;
}

.entry-content hr {
  max-width: 760px;
  margin-inline: auto;
  margin-block: 3em;
  border: none;
  border-top: 1px solid var(--border);
}

.entry-content blockquote {
  max-width: 760px;
  margin-inline: auto;
  padding-inline: var(--pad);
  margin-block: 2em;
  border-left: 3px solid var(--blue);
  padding-left: 24px;
}

.entry-content blockquote p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text);
  padding-inline: 0;
}

.entry-content code {
  font-family: monospace;
  font-size: 13px;
  background: var(--bg);
  padding: 2px 6px;
  border-radius: 3px;
  color: var(--text);
}

/* ============================================================
   GUTENBERG BLOCK WRAPPER RESET
   ============================================================ */
/* Remove default padding Gutenberg adds to block wrappers for our custom blocks */
.wp-block-cpfav-featured-article,
.wp-block-cpfav-latest-articles,
.wp-block-cpfav-about-contact,
.wp-block-cpfav-text-banner,
.wp-block-cpfav-hero-banner,
.wp-block-cpfav-forms,
.wp-block-cpfav-contact-page,
.wp-block-cpfav-submit-spot-banner,
.wp-block-cpfav-blog-header,
.wp-block-cpfav-blog-toc,
.wp-block-cpfav-blog-quote,
.wp-block-cpfav-blog-images,
.wp-block-cpfav-blog-bullets,
.wp-block-cpfav-read-next,
.wp-block-cpfav-page-title,
.wp-block-cpfav-policy-section,
.wp-block-cpfav-blog-image-single {
  padding: 0 !important;
  margin: 0 !important;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.oc-btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 12px 24px;
  border: 1px solid var(--text);
  color: var(--text);
  background: transparent;
  cursor: pointer;
  border-radius: 0;
  text-decoration: none;
  line-height: 1;
  transition: background var(--ease), color var(--ease);
}

.oc-btn:hover {
  background: var(--text);
  color: var(--white);
}

.oc-btn--blue {
  border-color: var(--blue);
  color: var(--blue);
}

.oc-btn--blue:hover {
  background-color: var(--blue) ;
  color: var(--white);
}

.oc-btn--white {
  border-color: var(--white);
  color: var(--white);
}

.oc-btn--white:hover {
  background: var(--white);
  color: var(--blue);
}

.oc-btn--solid {
  background: var(--text);
  color: var(--white);
  border-color: var(--text);
}

.oc-btn--solid:hover {
  background: #333;
}

/* Gutenberg button overrides — no rounded corners */
.wp-block-button__link {
  border-radius: 0 !important;
  font-family: var(--font-sans) !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  padding: 12px 24px !important;
}

.is-style-outline .wp-block-button__link {
  background: transparent !important;
  border-width: 1px !important;
  border-radius: 0 !important;
}

.wp-block-image img,
.wp-block-cover,
.wp-block-post-featured-image img {
  border-radius: 0 !important;
}

/* ============================================================
   GUTENBERG COLOUR PALETTE CLASSES
   ============================================================ */
.has-blue-color            { color: var(--blue) !important; }
.has-blue-background-color { background-color: var(--blue) !important; }
.has-bg-background-color   { background-color: var(--bg) !important; }
.has-white-background-color{ background-color: var(--white) !important; }
.has-text-color-color      { color: var(--text) !important; }
.has-muted-color           { color: var(--muted) !important; }

/* ============================================================
   ANNOUNCEMENT BAR
   ============================================================ */
.oc-announcement {
  background-color: var(--blue);
  padding: 9px var(--pad);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
}

.oc-announcement__link {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  transition: opacity var(--ease);
}

.oc-announcement__link:hover {
  opacity: 0.8;
  color: var(--white);
}

.oc-announcement__close {
  position: absolute;
  right: var(--pad);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  font-size: 18px;
  line-height: 1;
  padding: 4px 8px;
  transition: color var(--ease);
}

.oc-announcement__close:hover {
  color: var(--white);
}

/* ============================================================
   SITE HEADER & NAVIGATION
   ============================================================ */
.oc-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
}

.oc-header__inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--pad);
  height: var(--nav-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

/* Left nav */
.oc-nav-left {
  display: flex;
  align-items: center;
  gap: 28px;
}

/* Logo / center */
.oc-header__logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.oc-header__logo a {
  display: flex;
  align-items: center;
}

.oc-header__logo img {
  height: 50px;
  width: 100px;
  display: block;
}

.oc-header__logo-text {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
  white-space: nowrap;
}

/* Right nav */
.oc-nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
}

/* Nav links */
.oc-nav-link {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.oc-nav-link:hover,
.oc-nav-link[aria-current="page"],
.current-menu-item > .oc-nav-link {
  border-bottom-color: var(--text);
  color: var(--text);
}

.oc-nav-link svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

/* WordPress nav menu reset */
.oc-nav-left ul,
.oc-nav-right ul {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
}

.oc-nav-right ul {
  gap: 20px;
}

.oc-nav-left ul li a,
.oc-nav-right ul li a {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease);
  white-space: nowrap;
}

.oc-nav-left ul li a:hover,
.oc-nav-right ul li a:hover,
.oc-nav-left ul li.current-menu-item a,
.oc-nav-right ul li.current-menu-item a {
  border-bottom-color: var(--text);
}

/* Social icons in nav */
.oc-nav-social {
  display: flex;
  align-items: center;
  gap: 14px;
}

.oc-nav-social a {
  color: var(--text);
  display: flex;
  align-items: center;
  opacity: 0.75;
  transition: opacity var(--ease);
}

.oc-nav-social a:hover {
  opacity: 1;
}

.oc-nav-social svg {
  width: 16px;
  height: 16px;
  display: block;
}

/* Mobile toggle */
.oc-header__toggle {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4px;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
}

.oc-header__toggle svg {
  width: 22px;
  height: 22px;
  display: block;
}

/* Mobile menu */
.oc-mobile-menu {
  background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 8px 0 16px;
}

.oc-mobile-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: block;
}

.oc-mobile-menu li a,
.oc-mobile-menu > a {
  display: block;
  padding: 14px var(--pad);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color var(--ease);
}

.oc-mobile-menu > a:last-child {
  border-bottom: none;
}

.oc-mobile-menu > a {
  color: var(--muted);
}

.oc-mobile-menu li a:hover,
.oc-mobile-menu > a:hover,
.oc-mobile-menu li.current-menu-item a {
  color: var(--blue);
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
/* footer fix */
.oc-footer {
  background-color: var(--blue);
  padding-top: 64px;
}

.oc-footer__inner {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.oc-footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

/* Logo col */
.oc-footer__logo img {
  height: 50px;
  width: auto;
  margin-bottom: 16px;
}

.oc-footer__logo-text {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--white);
  display: block;
  margin-bottom: 16px;
}

.oc-footer__tagline {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.65;
  max-width: 240px;
}

/* Column titles */
.oc-footer__col-title {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  display: block;
  margin-bottom: 20px;
}

/* Explore links */
.oc-footer__links {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.oc-footer__links a,
.oc-footer__links ul li a {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color var(--ease);
}

.oc-footer__links a:hover,
.oc-footer__links ul li.current-menu-item a {
  color: var(--white);
  text-decoration: underline;
}

.oc-footer__links ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
  list-style: none;
}

/* Social links */
.oc-footer__social {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.oc-footer__social a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  transition: color var(--ease);
}

.oc-footer__social a:hover {
  color: var(--white);
}

.oc-footer__social svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Submit a spot button */
.oc-footer__spot-btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 10px 20px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--white);
  text-decoration: none;
  transition: background var(--ease);
  border-radius: 0;
}

.oc-footer__spot-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  color: var(--white);
}

/* Bottom bar */
.oc-footer__bottom {
  padding-block: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.oc-footer__bottom p {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.35);
}

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
/* ============================================================
   GUTENBERG NATIVE BLOCKS — scoped to #oc-main (blog posts)
   These override global h1/h2/h3 sizes for prose content.
   ============================================================ */

/* Paragraphs */
#oc-main .wp-block-paragraph,
#oc-main > p {
  max-width: 760px;
  margin-inline: auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.85;
  color: var(--muted);
  margin-top: 0;
  margin-bottom: 1.4em;
  font-weight: 300;
}

/* All headings inside post content */
#oc-main .wp-block-heading {
  max-width: 760px;
  margin-inline: auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
  margin-bottom: 0.5em;
  color: var(--text);
}

/* H2 — section titles */
#oc-main h2.wp-block-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 400;
  line-height: 1.2;
  margin-top: 2.5em;
}

/* H3 — sub-labels, location headers */
#oc-main h3.wp-block-heading {
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 2em;
  margin-bottom: 0.75em;
}

/* H4 */
#oc-main h4.wp-block-heading {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  margin-top: 1.5em;
}

/* Bullet + ordered lists */
#oc-main .wp-block-list {
  max-width: 760px;
  margin-inline: auto;
  padding-left: calc(var(--pad) + 1.2em);
  padding-right: var(--pad);
  margin-top: 0;
  margin-bottom: 1.4em;
  box-sizing: border-box;
  list-style: disc;
}

#oc-main .wp-block-list li {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 0.3em;
  font-weight: 300;
}

#oc-main .wp-block-list li::marker {
  color: var(--text);
}

#oc-main ol.wp-block-list {
  list-style: decimal;
}

/* Strong / bold inside prose */
#oc-main .wp-block-paragraph strong,
#oc-main .wp-block-list li strong {
  font-weight: 500;
  color: var(--text);
}

#oc-main {
  min-height: 60vh;
}

#oc-main > .wp-block-group,
#oc-main > .wp-block-columns,
#oc-main > .wp-block-cover,
#oc-main > * {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--pad);
  box-sizing: border-box;
}

/* Full-width exceptions — these handle their own width internally */
#oc-main > .wp-block-group.alignfull,
#oc-main > .alignfull,
#oc-main > .oc-toc {
  max-width: 100%;
  padding-inline: 0;
}

/* These sections handle their own inner max-width */
#oc-main > .wp-block-group.alignfull > .wp-block-group__inner-container {
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  :root {
    --pad: 32px;
    --section-pad: 64px;
  }
}

@media (max-width: 768px) {
  :root {
    --nav-height: 56px;
    --pad: 20px;
    --section-pad: 48px;
  }

  /* Hide desktop nav, show toggle */
  .oc-nav-left,
  .oc-nav-right {
    display: none;
  }

  /* Mobile: only logo + burger are visible (desktop navs are display:none).
     Drop to a 2-column grid so there's no phantom 3rd column / trailing gap
     pushing the burger inward from the right --pad boundary. */
  .oc-header__inner {
    grid-template-columns: 1fr auto;
  }

  /* Logo left-aligns to the header padding instead of being centered (desktop). */
  .oc-header__logo {
    justify-content: flex-start;
  }

  .oc-header__toggle {
    display: flex;
  }

  /* Footer stacks */
  .oc-footer__grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Announcement bar: symmetric padding so flex centering renders true-center
     while reserving room for the close button on the right. */
  .oc-announcement {
    padding-inline: 52px;
  }
  .oc-announcement__link {
    text-align: center;
    line-height: 1.4;
  }
}

@media (max-width: 480px) {
  .oc-footer__bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
}
