/*
Theme Name: RMC Photography
Theme URI: https://pics.rmcmine.com
Author: Rui Caetano
Author URI: https://www.rmcmine.com
Description: A clean, modern photography portfolio theme. Masonry gallery, lightbox, responsive, customizable accent color.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rmc-photography
Tags: photography, portfolio, responsive, custom-colors, custom-logo, featured-images, grid-layout
*/

:root {
  --accent: #c9a96e;
  --bg: #0b0b0c;
  --bg-2: #141416;
  --text: #f2f2f2;
  --muted: #9a9a9a;
  --border: #26262a;
  --max: 1280px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: opacity .2s; }
a:hover { opacity: .8; }

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

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11,11,12,.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.site-branding { display: flex; align-items: center; gap: 12px; }
.site-logo img { height: 40px; width: auto; }
.site-title {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text);
}
.site-description { display: none; }

.main-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 28px;
}
.main-nav a {
  color: var(--text);
  font-size: .85rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 500;
}
.main-nav a:hover { color: var(--accent); opacity: 1; }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero */
.hero {
  position: relative;
  height: 88vh;
  min-height: 480px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(.55);
  transform: scale(1.05);
  transition: transform 8s ease;
}
.hero:hover .hero-bg { transform: scale(1.12); }
.hero-content { position: relative; z-index: 2; padding: 0 24px; }
.hero h1 {
  font-size: clamp(2rem, 6vw, 4.5rem);
  font-weight: 300;
  letter-spacing: .15em;
  text-transform: uppercase;
  margin: 0 0 16px;
}
.hero p {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--muted);
  max-width: 640px;
  margin: 0 auto 32px;
}
.btn {
  display: inline-block;
  padding: 14px 36px;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-size: .85rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  font-weight: 500;
  transition: all .25s;
}
.btn:hover { background: var(--accent); color: var(--bg); opacity: 1; }

/* Gallery grid */
.gallery-section { padding: 80px 0; }
.section-title {
  font-size: 1.5rem;
  font-weight: 300;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin: 0 0 40px;
  text-align: center;
}

.masonry {
  column-count: 3;
  column-gap: 16px;
}
.masonry-item {
  break-inside: avoid;
  margin-bottom: 16px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}
.masonry-item img {
  width: 100%;
  height: auto;
  transition: transform .5s ease;
  display: block;
}
.masonry-item:hover img { transform: scale(1.05); }
.masonry-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.6), transparent 60%);
  opacity: 0;
  transition: opacity .3s;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}
.masonry-item:hover .overlay { opacity: 1; }
.masonry-item .overlay span {
  font-size: .8rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.95);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox.active { display: flex; }
.lightbox img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}
.lightbox .close {
  position: absolute;
  top: 24px;
  right: 32px;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
}
.lightbox .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  padding: 0 24px;
}
.lightbox .nav.prev { left: 0; }
.lightbox .nav.next { right: 0; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 48px 0;
  margin-top: 80px;
  text-align: center;
  color: var(--muted);
  font-size: .85rem;
  letter-spacing: .08em;
}
.social-links { display: flex; gap: 20px; justify-content: center; margin-bottom: 20px; }
.social-links a { color: var(--muted); font-size: 1.1rem; }
.social-links a:hover { color: var(--accent); opacity: 1; }

/* Single / Page */
.entry-header { padding: 60px 0 24px; text-align: center; }
.entry-title { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 300; letter-spacing: .08em; }
.entry-meta { color: var(--muted); font-size: .85rem; margin-top: 8px; }
.entry-content { max-width: 820px; margin: 0 auto; padding: 0 24px 60px; }
.entry-content p { margin: 0 0 1.2em; }
.entry-content img { margin: 2em auto; border-radius: 2px; }

/* Comments */
.comments-area { max-width: 820px; margin: 0 auto; padding: 0 24px 60px; }

/* Pagination */
.pagination { display: flex; justify-content: center; gap: 8px; padding: 40px 0; }
.pagination a, .pagination span {
  padding: 8px 14px;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: .85rem;
}
.pagination .current { background: var(--accent); color: var(--bg); border-color: var(--accent); }

/* Search / 404 */
.not-found, .search-results-header {
  text-align: center;
  padding: 120px 24px;
}
.not-found h1 { font-size: 3rem; font-weight: 300; }

/* Responsive */
@media (max-width: 900px) {
  .masonry { column-count: 2; }
}
@media (max-width: 600px) {
  .masonry { column-count: 1; }
  .main-nav { display: none; }
  .main-nav.open { display: block; position: absolute; top: 72px; left: 0; right: 0; background: var(--bg-2); padding: 16px 24px; }
  .main-nav.open ul { flex-direction: column; gap: 16px; }
  .menu-toggle { display: block; }
  .hero { height: 70vh; }
}

/* Utilities */
.text-center { text-align: center; }
.muted { color: var(--muted); }
