/* =========================================================
   GLOBAL VARIABLES
   ========================================================= */
:root {
  --container-width: 1100px;
  --container-padding: 28px;
  --blue: rgba(120, 170, 220, 0.95);
  --blue-overlay: rgba(123, 186, 230, 0.92);
  --underline: rgba(90, 150, 220, 0.8);
}

html, body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* =========================================================
   LAYOUT HELPERS
   ========================================================= */
.container {
  width: min(var(--container-width), 92vw);
  margin-inline: auto;
}

.section {
  padding: 120px 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.button {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid currentColor;
  text-decoration: none;
  font-weight: 500;
}

/* =========================================================
   HEADER + NAV (COMPILED SINGLE IMPLEMENTATION)
   Works with your header.php:
   #masthead, #site-navigation, .menu-toggle, #primary-menu, #hero
   ========================================================= */

#masthead {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 18px 0;
  background: transparent;
  border: 0;
  transition: background-color 220ms ease, padding 220ms ease;
}

/* Admin bar offset */
body.admin-bar #masthead {
  top: 32px;
}

/* Header inner */
.header-inner.container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
}

/* Logo */
#masthead .custom-logo-link img {
  width: auto;
  display: block;
  max-height: 60px;
  transition: max-height 220ms ease;
}

/* Hide site title/tagline if present */
#masthead .site-title,
#masthead .site-description {
  display: none;
}

/* Base nav list reset */
.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Nav links */
#masthead .main-navigation a{
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
  text-decoration: none;
  font-weight: 600;
  text-underline-offset: 6px;
}

/* Keep WP current-menu underline */
#masthead .main-navigation li.current-menu-item > a{
  
  text-underline-offset: 6px;
}

/* After hero (blue @ 85%) */
#masthead.has-bg {
    padding: 20px 0;
    background: rgba(120, 170, 220, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, .08);
}

#masthead.has-bg .custom-logo-link img {
  max-height: 46px;
}

/* Desktop nav layout */
@media (min-width: 801px) {
  .main-navigation ul {
    display: flex;
    align-items: center;
    gap: 22px;
  }

  #masthead .main-navigation a:hover,
  #masthead .main-navigation a.is-active {
    text-decoration: underline;
  }

  /* Hamburger hidden on desktop */
  .menu-toggle { display: none; }
}

/* Space for fixed header on normal pages */
body {
  padding-top: 90px;
}

/* Homepage hero should sit under header */
.home body {
  padding-top: 0;
}

/* Blue header bar on Photography archive + taxonomy pages */
.post-type-archive-photo #masthead,
.tax-photo_category #masthead {
  background: var(--blue);
      padding: 1.5em 0 !important;
}

.post-type-archive-photo #masthead .main-navigation a,
.tax-photo_category #masthead .main-navigation a {
  color: #fff;
  text-shadow: 0 2px 10px rgba(0,0,0,.35);
}

/* =========================================================
   MOBILE MENU (fullscreen overlay, centered links)
   ========================================================= */
@media (max-width: 800px) {

  /* Scroll-lock when menu open */
  html.menu-open,
  html.menu-open body{
    overflow: hidden !important;
    height: 100% !important;
  }

  /* Show toggle */
  #masthead #site-navigation .menu-toggle {
    display: block !important;

    position: fixed !important;
    top: 18px !important;
    right: 18px !important;
    z-index: 1000001 !important;

    width: 52px !important;
    height: 52px !important;
    margin: 0 !important;
    padding: 0 !important;

    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;

    cursor: pointer !important;
    appearance: none !important;
  }

  /* Remove focus ring box on Android */
  #masthead #site-navigation .menu-toggle:focus,
  #masthead #site-navigation .menu-toggle:focus-visible{
    outline: none !important;
    box-shadow: none !important;
  }

  /* Hide any inner spans/icons (we draw the icon ourselves) */
  #masthead #site-navigation .menu-toggle span[aria-hidden="true"],
  #masthead #site-navigation .menu-toggle svg,
  #masthead #site-navigation .menu-toggle i,
  #masthead #site-navigation .menu-toggle .dashicons {
    display: none !important;
  }

  /* Hamburger (3 lines) */
  #masthead #site-navigation .menu-toggle::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;

    width: 26px;
    height: 2px;
    background: #fff;
    border-radius: 2px;

    transform: translate(-50%, -50%);
    box-shadow: 0 -8px 0 #fff, 0 8px 0 #fff;

    transition: transform 220ms ease, box-shadow 220ms ease;
  }

  /* Second stroke for X (hidden when closed) */
  #masthead #site-navigation .menu-toggle::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;

    width: 26px;
    height: 2px;
    background: #fff;
    border-radius: 2px;

    transform: translate(-50%, -50%);
    opacity: 0;

    transition: transform 220ms ease, opacity 220ms ease;
  }

  /* Open state => X */
  #masthead #site-navigation .menu-toggle.is-open::before {
    box-shadow: none;
    transform: translate(-50%, -50%) rotate(45deg);
  }

  #masthead #site-navigation .menu-toggle.is-open::after {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  /* Fullscreen overlay menu (ul becomes overlay) */
  #masthead #site-navigation ul#primary-menu {
    position: fixed !important;
    inset: 0 !important;

    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;

    z-index: 1000000 !important;

    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;

    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;

    background: var(--blue-overlay) !important;

    /* Keep overlay stable on mobile */
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;

    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;

    transition: opacity 280ms ease !important;
  }

  /* When nav is toggled => show overlay */
  #masthead #site-navigation.toggled ul#primary-menu {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  /* Full width centered links + dividers */
  #masthead #site-navigation ul#primary-menu li {
    width: 100% !important;
    text-align: center !important;
  }

  #masthead #site-navigation ul#primary-menu li a {
    display: block !important;
    padding: 18px 0 !important;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 600 !important;
    font-size: 22px !important;
    text-shadow: 0 2px 10px rgba(0,0,0,.25) !important;
  }

  #masthead #site-navigation ul#primary-menu li + li a {
    border-top: 1px solid rgba(255,255,255,0.35) !important;
  }
}

/* =========================================================
   HERO SLIDER
   ========================================================= */
.hero {
    height: 100vh;
    min-height: 560px;
    position: relative;
    margin-top: -100px;
    margin-left: calc(-1 * var(--container-padding));
    margin-right: calc(-1 * var(--container-padding));
    width: calc(100% + (var(--container-padding) * 2));
    overflow: hidden;
}

.hero-swiper,
.hero-swiper .swiper-wrapper,
.hero-swiper .swiper-slide,
.hero-slide {
  height: 100%;
}

.hero-slide {
  background-size: cover;
  background-position: center;
  position: relative;
}

/* Gradient overlay for text */
.hero-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: end start;
  padding: 40px;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0));
}

.hero-title {
  margin: 0;
  color: #fff;
  font-size: clamp(28px, 4vw, 56px);
  line-height: 1.05;
}

/* Swiper controls */
.hero .swiper-button-prev,
.hero .swiper-button-next {
  color: #fff;
  top: 50%;
  transform: translateY(-50%);
}

.hero .swiper-button-prev { left: 40px; right: auto; }
.hero .swiper-button-next { right: 40px; left: auto; }

.swiper-horizontal > .swiper-pagination-bullets .swiper-pagination-bullet,
.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet {
  margin: 0 var(--swiper-pagination-bullet-horizontal-gap, 4px);
  background: #fff;
}

.swiper-pagination-bullet-active {
  opacity: 1;
  background: var(--swiper-pagination-color, var(--swiper-theme-color)) !important;
}

/* =========================================================
   PHOTOGRAPHY GRID (GLOBAL)
   ========================================================= */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.photo-card {
  display: block;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.photo-card img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
}

.photo-meta {
  position: absolute;
  inset: auto 0 0 0;
  padding: 10px 12px;
  background: linear-gradient(to top, rgba(0,0,0,.55), rgba(0,0,0,0));
}

.photo-title {
  color: #fff;
  font-size: 14px;
}

/* =========================================================
   ABOUT SECTION
   ========================================================= */
.about-section {
  background: #fff;
  display: flex;
  align-items: center;
}

.about-inner {
  text-align: center;
  max-width: 900px;
}

.about-section .section-title {
  margin: 0 0 26px;
  font-size: 28px;
  font-weight: 600;
  display: inline-block;
  position: relative;
  padding-bottom: 10px;
}

.about-section .section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 110px;
  height: 4px;
  background: var(--underline);
}

.about-copy {
  margin: 0 auto;
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.9;
}

.about-copy p {
  margin: 0 0 18px;
}

/* =========================================================
   HOMEPAGE PHOTOGRAPHY SECTION (small 3x3)
   ========================================================= */
.photography-home {
  background: #e9e9e9;
  text-align: center;
}

.photography-home .section-title {
  margin: 0 0 10px;
  font-size: 28px;
  font-weight: 600;
  display: inline-block;
  position: relative;
  padding-bottom: 10px;
}

.photography-home .section-title::after {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: 140px;
  height: 4px;
  background: var(--underline);
}

.photography-home .section-intro {
  margin: 0 auto 26px;
  max-width: 640px;
  font-size: 14px;
  opacity: 0.9;
}

/* Square tiles */
.photo-grid--home {
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.photo-grid--home .photo-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

/* No title overlay on home grid */
.photo-grid--home .photo-meta {
  display: none;
}

.photography-home .section-link {
  margin: 50px 0 0;
}

.photography-home .section-link a {
  text-decoration: none;
  font-size: 16px;
  color: #71a3d8;
  font-weight: 700;
}

.photography-home .section-link a:hover {
  text-decoration: underline;
}

/* =========================================================
   ARCHIVE HERO IMAGE
   ========================================================= */
.archive-hero img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

/* =========================================================
   PHOTO ARCHIVE
   ========================================================= */
.photo-archive__header{
  text-align: center;
  margin: 0 0 12px;
}

.photo-archive__title{
  margin: 0 0 26px;
  font-size: 28px;
  font-weight: 600;
  display: inline-block;
  position: relative;
  padding-bottom: 10px;
}

.photo-archive__title::after{
  content: "";
  display: block;
  width: 140px;
  height: 4px;
  margin: 10px auto 0;
  border-radius: 999px;
  background: #5b8fe6;
}

.photo-filters{
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 12px 0 22px;
  padding: 0;
}

.photo-filters .filter{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid #5b8fe6;
  text-decoration: none;
  font-size: 13px;
  line-height: 1;
  color: #2f5fb9;
  background: transparent;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.photo-filters .filter.is-active{
  background: #5b8fe6;
  color: #fff;
}

.photo-filters .filter:hover{
  background: rgba(91, 143, 230, 0.12);
}

.photo-filters .filter.is-active:hover{
  background: #5b8fe6;
}

.photo-filters .filter:focus,
.photo-filters .filter:active{
  outline: none;
  text-decoration: none;
}

.photo-grid--archive {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.photo-grid--archive .photo-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  display: block;
}

.photo-pagination {
  margin-top: 26px;
  display: flex;
  justify-content: center;
}

.photo-pagination .nav-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.photo-pagination .page-numbers {
  display: inline-block;
  padding: 6px 10px;
  border-radius: 6px;
  text-decoration: none;
  color: rgba(40, 100, 180, 1);
  font-weight: 600;
}

.photo-pagination .page-numbers.current {
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.photo-pagination .page-numbers:hover {
  text-decoration: underline;
}

/* =========================================================
   GLIGHTBOX TYPOGRAPHY
   ========================================================= */
.glightbox-clean .gslide-title {
  font-size: 1.2em;
  font-weight: 700;
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: #000;
  margin-bottom: 19px;
  line-height: 1.4em;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .hero { min-height: 480px; }

  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .photo-card img { height: 260px; }

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

@media (max-width: 520px) {
  .hero-overlay { padding: 20px; }

  .photo-grid { grid-template-columns: 1fr; }
  .photo-card img { height: 240px; }

  .photo-grid--archive { grid-template-columns: 1fr; }

  .photo-grid--home { max-width: 92vw; }
}

/* =========================================================
   CONTACT section layout
   ========================================================= */
#contact .container{
  text-align: center;
}

#contact .section-title{
  display: inline-block;
  margin: 0 0 10px;
  font-weight: 800;
  position: relative;
}

#contact .section-title::after{
  content: "";
  display: block;
  width: 110px;
  height: 5px;
  margin: 8px auto 0;
  border-radius: 999px;
  background: #5b8fe6;
}

#contact .section-intro{
  max-width: 720px;
  margin: 0 auto 18px;
  line-height: 1.4;
}

/* CF7 form sizing + centering */
#contact .wpcf7{
  margin: 0 auto;
  text-align: left;
}

#contact .wpcf7 form p{
  margin: 0;
}

/* Grid layout */
#contact .cf7-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 14px;
}

#contact .cf7-col--full{
  grid-column: 1 / -1;
}

/* Labels */
#contact .wpcf7 label{
  display: block;
  font-size: 13px;
  margin-bottom: 6px;
}

/* Inputs */
#contact .wpcf7 input[type="text"],
#contact .wpcf7 input[type="email"],
#contact .wpcf7 textarea{
  width: 100%;
  border: 1px solid #7aa3ff;
  border-radius: 0;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  box-sizing: border-box;
  background: #fff;
}

#contact .wpcf7 textarea{
  min-height: 130px;
  resize: vertical;
}

/* Focus */
#contact .wpcf7 input:focus,
#contact .wpcf7 textarea:focus{
  border-color: #5b8fe6;
}

/* Button */
#contact .cf7-actions{
  margin-top: 10px;
}

#contact .wpcf7 input[type="submit"]{
  border: 0;
  background: #5b8fe6;
  color: #fff;
  padding: 10px 18px;
  font-size: 13px;
  cursor: pointer;
}

#contact .wpcf7 input[type="submit"]:hover{
  filter: brightness(0.95);
}

/* Mobile: stack */
@media (max-width: 640px){
  #contact .cf7-row{
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* =========================================================
   FOOTER
   ========================================================= */
.site-footer{
  background: #6fa2d8;
  padding: 26px 0;
  margin-top: 60px;
}

.site-footer__copy{
  margin: 0;
  text-align: center;
  color: #fff;
  font-size: 13px;
  line-height: 1;
}
