/*
Theme Name: Yoga Fotografen Modern
Theme URI: https://yogafotografen.no/
Author: Custom theme for Yoga Fotografen
Description: A clean, independent photography portfolio theme that uses the site's existing WordPress Media Library. No commercial plugins or page builder required.
Version: 1.1.0
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 7.4
Text Domain: yogafotografen-modern
License: GNU General Public License v2 or later
*/

:root {
  --yf-bg: #0d0f0f;
  --yf-surface: #151818;
  --yf-text: #f5f4ef;
  --yf-muted: #b9bbb7;
  --yf-line: rgba(255,255,255,.14);
  --yf-accent: #d8c8a6;
  --yf-max: 1440px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--yf-bg);
  color: var(--yf-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}
body.admin-bar .site-header { top: 32px; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea { font: inherit; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link:focus {
  clip: auto; width: auto; height: auto; margin: 0; padding: .75rem 1rem;
  top: .5rem; left: .5rem; z-index: 10000; background: #fff; color: #000;
}
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  background: linear-gradient(to bottom, rgba(0,0,0,.82), rgba(0,0,0,.08));
  transition: background .25s ease, backdrop-filter .25s ease;
}
.site-header.is-scrolled {
  background: rgba(10,12,12,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--yf-line);
}
.header-inner {
  max-width: var(--yf-max); margin: 0 auto; min-height: 82px; padding: 0 28px;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.site-branding { display: flex; align-items: center; gap: 12px; }
.custom-logo { max-height: 48px; width: auto; }
.site-title {
  font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem;
  letter-spacing: .03em; font-weight: 500;
}
.primary-menu { display: flex; align-items: center; gap: 26px; list-style: none; margin: 0; padding: 0; }
.primary-menu a { font-size: .86rem; letter-spacing: .11em; text-transform: uppercase; }
.primary-menu a:hover, .primary-menu .current-menu-item > a { color: var(--yf-accent); }
.menu-toggle { display: none; border: 1px solid var(--yf-line); background: transparent; color: #fff; padding: 8px 12px; }

.hero {
  min-height: 100vh; position: relative; display: grid; place-items: end start;
  overflow: hidden; background: #111;
}
.hero-media, .hero-media img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-media img { object-fit: cover; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0,0,0,.72) 0%, rgba(0,0,0,.20) 65%),
              linear-gradient(0deg, rgba(0,0,0,.58), transparent 55%);
}
.hero-content {
  position: relative; z-index: 2; max-width: 850px; padding: 180px max(28px, calc((100vw - var(--yf-max))/2 + 28px)) 90px;
}
.eyebrow { letter-spacing: .18em; text-transform: uppercase; font-size: .75rem; color: var(--yf-accent); }
.hero h1 {
  font-family: Georgia, "Times New Roman", serif; font-weight: 400;
  font-size: clamp(3rem, 7vw, 7.2rem); line-height: .98; margin: 12px 0 22px;
}
.hero p { max-width: 660px; color: #efefeb; font-size: clamp(1rem, 1.6vw, 1.25rem); }
.button {
  display: inline-flex; align-items: center; justify-content: center; padding: 13px 20px;
  border: 1px solid rgba(255,255,255,.55); margin-top: 16px;
  text-transform: uppercase; letter-spacing: .12em; font-size: .76rem;
}
.button:hover { background: #fff; color: #111; }
.section { padding: 90px 28px; }
.section-inner { max-width: var(--yf-max); margin: 0 auto; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 34px; }
.section-heading h2, .entry-title {
  font-family: Georgia, "Times New Roman", serif; font-weight: 400;
  font-size: clamp(2.2rem, 4.5vw, 4.6rem); line-height: 1.05; margin: 0;
}
.section-heading p { max-width: 540px; color: var(--yf-muted); margin: 0; }

.photo-grid { columns: 3 320px; column-gap: 14px; }
.photo-card {
  break-inside: avoid; margin: 0 0 14px; position: relative; overflow: hidden;
  background: var(--yf-surface); cursor: zoom-in;
}
.photo-card img { width: 100%; transition: transform .55s ease, filter .35s ease; }
.photo-card:hover img { transform: scale(1.025); filter: brightness(.8); }
.photo-caption {
  position: absolute; inset: auto 0 0; padding: 32px 18px 14px;
  background: linear-gradient(transparent, rgba(0,0,0,.78)); opacity: 0;
  transition: opacity .25s ease; font-size: .82rem;
}
.photo-card:hover .photo-caption { opacity: 1; }

.intro-band { background: #f0eee8; color: #151616; }
.intro-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 70px; align-items: start; }
.intro-grid h2 { font-family: Georgia, serif; font-size: clamp(2.4rem, 5vw, 5.5rem); line-height: 1; margin: 0; font-weight: 400; }
.intro-grid .entry-content { font-size: 1.08rem; }
.intro-grid .entry-content > :first-child { margin-top: 0; }

.page-hero { padding: 175px 28px 70px; border-bottom: 1px solid var(--yf-line); }
.page-hero-inner, .content-wrap { max-width: 980px; margin: 0 auto; }
.content-wrap { padding: 60px 28px 100px; }
.entry-content { font-size: 1.06rem; }
.entry-content a { text-decoration: underline; text-decoration-color: var(--yf-accent); text-underline-offset: 3px; }
.entry-content h2, .entry-content h3 { font-family: Georgia, serif; font-weight: 400; margin-top: 2em; }
.entry-content img { margin: 30px auto; }
.entry-content .wp-block-gallery { margin: 35px 0; }

.cta { text-align: center; background: var(--yf-surface); }
.cta h2 { font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 4rem); font-weight: 400; margin: 0 0 15px; }
.site-footer { border-top: 1px solid var(--yf-line); padding: 35px 28px; color: var(--yf-muted); font-size: .88rem; }
.footer-inner { max-width: var(--yf-max); margin: 0 auto; display: flex; justify-content: space-between; gap: 20px; }

.lightbox {
  position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.94);
  display: none; align-items: center; justify-content: center; padding: 40px;
}
.lightbox.is-open { display: flex; }
.lightbox img { max-width: 94vw; max-height: 90vh; object-fit: contain; }
.lightbox-close {
  position: absolute; top: 16px; right: 20px; border: 0; background: transparent;
  color: #fff; font-size: 2.2rem; cursor: pointer;
}
.pagination { display: flex; gap: 12px; justify-content: center; margin-top: 45px; }
.pagination .page-numbers { border: 1px solid var(--yf-line); padding: 8px 12px; }
.pagination .current { background: #fff; color: #111; }

@media (max-width: 820px) {
  body.admin-bar .site-header { top: 46px; }
  .menu-toggle { display: block; }
  .main-navigation {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(10,12,12,.98); border-top: 1px solid var(--yf-line); padding: 22px 28px;
  }
  .main-navigation.is-open { display: block; }
  .primary-menu { display: grid; gap: 16px; }
  .header-inner { min-height: 70px; padding: 0 18px; }
  .hero-content { padding-left: 22px; padding-right: 22px; padding-bottom: 55px; }
  .section { padding: 65px 20px; }
  .section-heading, .footer-inner { display: block; }
  .section-heading p { margin-top: 15px; }
  .intro-grid { grid-template-columns: 1fr; gap: 32px; }
  .photo-grid { columns: 2 160px; column-gap: 8px; }
  .photo-card { margin-bottom: 8px; }
}


/* Version 1.1 refinements */
.custom-logo-link{display:inline-flex;align-items:center}.custom-logo{max-width:min(260px,42vw);max-height:56px;object-fit:contain}.hero-media img{animation:yfHeroFade 1.1s ease both}@keyframes yfHeroFade{from{opacity:0;transform:scale(1.015)}to{opacity:1;transform:scale(1)}}@media(max-width:820px){.custom-logo{max-width:190px;max-height:44px}.hero{min-height:88vh}.hero h1{font-size:clamp(2.7rem,14vw,4.8rem)}}
