/*
Theme Name: Black Rose Boudoir
Theme URI: https://blackroseboudoir.co.uk
Author: Black Rose Boudoir Photography
Author URI: https://blackroseboudoir.co.uk
Description: A dark, elegant photography portfolio theme for Black Rose Boudoir Photography. Features a masonry gallery, lightbox, contact form, and full WordPress Customizer support.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: blackrose
Tags: photography, portfolio, dark, elegant, one-page, customizer-ready
*/

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

:root {
  --clr-bg:        #0a0a0a;
  --clr-surface:   #111111;
  --clr-border:    #1e1e1e;
  --clr-text:      #e8e0d8;
  --clr-muted:     #8a8078;
  --clr-accent:    #c8a882;
  --clr-rose:      #8b2a3a;
  --clr-rose-light:#c4516a;
  --clr-white:     #ffffff;
  --font-display:  'Cormorant Garamond', 'Georgia', serif;
  --font-body:     'Tahoma', 'Trebuchet MS', sans-serif;
  --transition:    0.3s ease;
  --max-width:     1400px;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--clr-bg);
  background-attachment: fixed;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--clr-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Dark overlay on top of the page background image,
   applied via a pseudo-element so sections can be semi-transparent */
body.has-page-bg::before {
  content: '';
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.62);
  z-index: 0;
  pointer-events: none;
}

/* Everything sits above the fixed overlay */
.site-header,
#page,
.mobile-nav,
.brr-lightbox {
  position: relative;
  z-index: 1;
}

a {
  color: var(--clr-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--clr-rose-light);
}

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

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 300;
  letter-spacing: 0.05em;
  line-height: 1.2;
  color: var(--clr-white);
}

h1 { font-size: clamp(2rem, 5vw, 4rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 2rem); }

p { margin-bottom: 1.2em; }
p:last-child { margin-bottom: 0; }

/* ============================================================
   SITE HEADER & NAVIGATION
   ============================================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 900;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(0,0,0,0.85), transparent);
  transition: background var(--transition), padding var(--transition);
}

.site-header.scrolled {
  background: rgba(10, 10, 10, 0.97);
  padding: 0.75rem 2rem;
  box-shadow: 0 1px 0 var(--clr-border);
}

.site-branding .site-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--clr-white);
  line-height: 1.2;
}

.site-branding .site-title a {
  color: inherit;
}

.site-branding .site-title a:hover {
  color: var(--clr-accent);
}

.site-branding .site-description {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clr-muted);
  margin-top: 0.1rem;
}

/* Main Navigation */
.main-navigation {
  display: flex;
  align-items: center;
}

.main-navigation ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

.main-navigation a {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--clr-text);
  padding: 0.25rem 0;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
  color: var(--clr-accent);
  border-bottom-color: var(--clr-accent);
}

/* Hamburger */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--clr-white);
  transition: all var(--transition);
}

.menu-toggle.active span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Mobile nav overlay */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 10, 0.97);
  z-index: 800;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.mobile-nav.open {
  display: flex;
}

.mobile-nav ul {
  list-style: none;
  text-align: center;
}

.mobile-nav li + li {
  margin-top: 1.5rem;
}

.mobile-nav a {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 300;
  letter-spacing: 0.1em;
  color: var(--clr-white);
}

.mobile-nav a:hover {
  color: var(--clr-accent);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: transparent;
}

/* .hero-bg is kept in markup but hidden — page bg handles the image */
.hero-bg {
  display: none;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.15) 0%,
    rgba(0,0,0,0.05) 50%,
    rgba(0,0,0,0.35) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  max-width: 800px;
}

.hero-eyebrow {
  display: block;
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.5rem, 7vw, 5.5rem);
  font-weight: 300;
  color: var(--clr-white);
  margin-bottom: 1.5rem;
  line-height: 1.05;
}

.hero-subtitle {
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  color: var(--clr-muted);
  max-width: 500px;
  margin: 0 auto 2.5rem;
  letter-spacing: 0.05em;
}

.hero-cta {
  display: inline-block;
  padding: 0.85rem 2.5rem;
  border: 1px solid var(--clr-accent);
  color: var(--clr-accent);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  transition: all var(--transition);
}

.hero-cta:hover {
  background: var(--clr-accent);
  color: var(--clr-bg);
}

.hero-scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--clr-muted);
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  animation: float 2s ease-in-out infinite;
}

.hero-scroll-hint::after {
  content: '';
  display: block;
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--clr-muted), transparent);
}

@keyframes float {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   SECTION HEADERS
   ============================================================ */
.section-header {
  text-align: center;
  padding: 5rem 2rem 3rem;
}

.section-eyebrow {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(1.75rem, 4vw, 3rem);
  font-weight: 300;
  color: var(--clr-white);
  margin-bottom: 1rem;
}

.section-divider {
  width: 40px;
  height: 1px;
  background: var(--clr-rose-light);
  margin: 1rem auto;
}

.section-intro {
  max-width: 600px;
  margin: 0 auto;
  color: var(--clr-muted);
  font-size: 0.95rem;
  line-height: 1.8;
}

/* ============================================================
   GALLERY / PORTFOLIO GRID
   ============================================================ */
#gallery {
  background: transparent;
  padding-bottom: 5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 4px;
  padding: 0 4px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  cursor: pointer;
  background: var(--clr-surface);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.4s ease;
  filter: brightness(0.9);
}

.gallery-item:hover img {
  transform: scale(1.05);
  filter: brightness(0.7);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(139,42,58,0.6), rgba(0,0,0,0.4));
  opacity: 0;
  transition: opacity var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item:hover .gallery-item-overlay {
  opacity: 1;
}

.gallery-item-overlay svg {
  width: 40px;
  height: 40px;
  fill: var(--clr-white);
  opacity: 0.9;
}

/* WordPress Gallery Block support */
.wp-block-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 4px;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.brr-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
}

.brr-lightbox.active {
  display: flex;
}

.brr-lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  box-shadow: 0 0 80px rgba(0,0,0,0.8);
}

.brr-lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--clr-white);
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.brr-lightbox-close:hover {
  background: var(--clr-rose);
  border-color: var(--clr-rose);
}

.brr-lightbox-prev,
.brr-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid rgba(255,255,255,0.15);
  color: var(--clr-white);
  font-size: 1.5rem;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition);
}

.brr-lightbox-prev { left: 1.5rem; }
.brr-lightbox-next { right: 1.5rem; }

.brr-lightbox-prev:hover,
.brr-lightbox-next:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.4);
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
#about {
  background: transparent;
  padding: 0 0 5rem;
}

.about-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}

.about-image-wrap {
  position: relative;
}

.about-image-wrap::before {
  content: '';
  position: absolute;
  inset: -12px;
  border: 1px solid var(--clr-rose);
  opacity: 0.4;
  z-index: 0;
}

.about-image-wrap img {
  position: relative;
  z-index: 1;
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  filter: grayscale(20%);
}

.about-text {
  padding: 1rem 0;
}

.about-text h2 {
  margin-bottom: 1.5rem;
}

.about-text p {
  color: var(--clr-muted);
  font-size: 0.95rem;
  line-height: 1.9;
}

.about-signature {
  margin-top: 2rem;
  font-family: var(--font-display);
  font-size: 2rem;
  font-style: italic;
  color: var(--clr-accent);
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
#contact {
  background: transparent;
  padding-bottom: 6rem;
}

.contact-inner {
  max-width: 650px;
  margin: 0 auto;
  padding: 0 2rem;
}

.contact-intro {
  text-align: center;
  color: var(--clr-muted);
  margin-bottom: 3rem;
  font-size: 1.05rem;
  line-height: 1.8;
}

/* Contact form */
.brr-contact-form .form-row {
  margin-bottom: 1.5rem;
}

.brr-contact-form label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clr-muted);
  margin-bottom: 0.5rem;
}

.brr-contact-form input,
.brr-contact-form textarea,
.brr-contact-form select {
  width: 100%;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  color: var(--clr-text);
  padding: 0.85rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  transition: border-color var(--transition);
  outline: none;
  -webkit-appearance: none;
}

.brr-contact-form input:focus,
.brr-contact-form textarea:focus {
  border-color: var(--clr-accent);
}

.brr-contact-form textarea {
  height: 140px;
  resize: vertical;
}

.brr-contact-form .submit-btn {
  display: inline-block;
  width: 100%;
  padding: 1rem 2rem;
  background: transparent;
  border: 1px solid var(--clr-accent);
  color: var(--clr-accent);
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
}

.brr-contact-form .submit-btn:hover {
  background: var(--clr-accent);
  color: var(--clr-bg);
}

.form-success {
  display: none;
  text-align: center;
  padding: 2rem;
  border: 1px solid var(--clr-accent);
  color: var(--clr-accent);
  font-size: 0.95rem;
  line-height: 1.7;
}

/* WordPress Contact Form 7 overrides */
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
  width: 100%;
  background: var(--clr-surface) !important;
  border: 1px solid var(--clr-border) !important;
  color: var(--clr-text) !important;
  padding: 0.85rem 1rem !important;
  font-family: var(--font-body) !important;
}

.wpcf7-submit {
  width: 100%;
  background: transparent !important;
  border: 1px solid var(--clr-accent) !important;
  color: var(--clr-accent) !important;
  padding: 1rem !important;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all var(--transition) !important;
}

.wpcf7-submit:hover {
  background: var(--clr-accent) !important;
  color: var(--clr-bg) !important;
}

/* ============================================================
   SITE FOOTER
   ============================================================ */
.site-footer {
  background: rgba(0, 0, 0, 0.55);
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 2.5rem 2rem;
  text-align: center;
}

.site-footer p {
  color: var(--clr-muted);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.site-footer a {
  color: var(--clr-accent);
}

/* ============================================================
   WIDGETS / SIDEBAR (if used)
   ============================================================ */
.widget-area {
  padding: 2rem;
}

.widget + .widget {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--clr-border);
}

.widget-title {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--clr-accent);
  margin-bottom: 1rem;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 2rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

/* ============================================================
   IMAGELY / NEXTGEN GALLERY OVERRIDES
   Forces NextGEN's output to match the dark theme aesthetic.
   ============================================================ */

/* Wrapper */
.imagely-gallery-wrap {
  padding: 0 4px 2rem;
}

/* Reset NextGEN container background */
.ngg-galleryoverview,
.ngg-gallery-thumbnail-box,
.ngg-gallery-thumbnail,
#ngg-gallery-0,
.ngg-album,
.ngg-gallery {
  background: transparent !important;
}

/* Thumbnail grid — override inline widths with CSS grid */
.ngg-galleryoverview .ngg-gallery-thumbnail-box {
  border: none !important;
  padding: 2px !important;
  margin: 0 !important;
}

/* Thumbnail images */
.ngg-gallery-thumbnail img,
.ngg-galleryoverview img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  display: block;
  transition: transform 0.5s ease, filter 0.4s ease !important;
  filter: brightness(0.9);
}

.ngg-gallery-thumbnail:hover img,
.ngg-galleryoverview .ngg-gallery-thumbnail-box:hover img {
  transform: scale(1.04) !important;
  filter: brightness(0.65) !important;
}

/* Remove default NextGEN caption styling */
.ngg-gallery-thumbnail .ngg-caption,
.ngg-galleryoverview .ngg-caption {
  display: none !important;
}

/* Imagely Pro lightbox overrides */
.imagely-lightbox-container,
.ngg-fancybox-wrap,
.ngg-fancybox-skin {
  background: rgba(0, 0, 0, 0.96) !important;
  border: none !important;
  box-shadow: none !important;
}

.ngg-fancybox-close,
.imagely-lightbox-close {
  background: none !important;
  border: 1px solid rgba(255,255,255,0.2) !important;
  color: var(--clr-white) !important;
}

.ngg-fancybox-close:hover,
.imagely-lightbox-close:hover {
  background: var(--clr-rose) !important;
  border-color: var(--clr-rose) !important;
}

/* NextGEN navigation arrows */
.ngg-fancybox-prev,
.ngg-fancybox-next {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.15) !important;
}

/* Gallery placeholder (shown to admins when no shortcode is set) */
.gallery-placeholder {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--clr-muted);
  font-size: 0.95rem;
  border: 1px dashed var(--clr-border);
  margin: 0 4px;
}

.gallery-placeholder a {
  color: var(--clr-accent);
}

/* Pagination */
.ngg-navigation {
  text-align: center !important;
  padding: 2rem !important;
  color: var(--clr-muted) !important;
}

.ngg-navigation a {
  color: var(--clr-accent) !important;
  border: 1px solid var(--clr-border) !important;
  padding: 0.3rem 0.75rem !important;
  margin: 0 2px !important;
  display: inline-block;
  transition: all var(--transition) !important;
}

.ngg-navigation a:hover {
  background: var(--clr-accent) !important;
  color: var(--clr-bg) !important;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .main-navigation { display: none; }
  .menu-toggle { display: flex; }

  .about-inner {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

@media (max-width: 600px) {
  .hero-title { font-size: 2.5rem; }
  .gallery-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2px;
  }

  .brr-lightbox-prev { left: 0.5rem; }
  .brr-lightbox-next { right: 0.5rem; }
}
