/*
Theme Name: MEGPhoto
Theme URI: https://megphoto.pl
Author: MEGPhoto
Description: Minimalistyczny motyw portfolio dla fotografa z galerią masonry, lightboxem i pełnym zarządzaniem z panelu WordPress.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: megphoto
*/

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

:root {
  --dark: #0a0a0a; --dark-accent: #1a1a1a; --light: #f5f3f0; --light-mid: #e8e4df;
  --warm: #c9b99a; --warm-light: #d4c8ae; --text-dark: #2a2a2a; --text-mid: #6b6b6b;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Outfit', sans-serif;
}

html { scroll-behavior: smooth; }
body { font-family: var(--font-body); color: var(--text-dark); background: var(--light); overflow-x: hidden; -webkit-font-smoothing: antialiased; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--light); }
::-webkit-scrollbar-thumb { background: var(--warm); border-radius: 3px; }

/* ========== NAVIGATION ========== */
nav.main-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.5rem 3rem; transition: background 0.4s, padding 0.4s;
}
nav.main-nav.scrolled { background: rgba(10,10,10,0.85); backdrop-filter: blur(20px); padding: 1rem 3rem; }
.nav-logo { font-family: var(--font-display); font-size: 1.5rem; font-weight: 300; color: #fff; letter-spacing: 0.15em; text-transform: uppercase; text-decoration: none; }
.nav-links { display: flex; gap: 2.5rem; list-style: none; }
.nav-links a { font-size: 0.75rem; font-weight: 400; color: rgba(255,255,255,0.7); text-decoration: none; text-transform: uppercase; letter-spacing: 0.2em; transition: color 0.3s; position: relative; }
.nav-links a::after { content: ''; position: absolute; bottom: -4px; left: 0; width: 0; height: 1px; background: var(--warm); transition: width 0.3s; }
.nav-links a:hover { color: #fff; }
.nav-links a:hover::after { width: 100%; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; z-index: 1001; background: none; border: none; padding: 5px; }
.hamburger span { display: block; width: 24px; height: 1.5px; background: #fff; transition: all 0.3s; }

/* ========== HERO ========== */
.hero { position: relative; height: 100vh; min-height: 600px; background: var(--dark); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,10,0.3) 0%, rgba(10,10,10,0.1) 40%, rgba(10,10,10,0.6) 100%); z-index: 2; }
.hero-bg { position: absolute; inset: 0; background-position: center; background-size: cover; transform: scale(1.05); animation: heroZoom 20s ease-in-out infinite alternate; }
@keyframes heroZoom { from { transform: scale(1.05); } to { transform: scale(1.12); } }
.hero-content { position: relative; z-index: 3; text-align: center; color: #fff; }
.hero-content h1 { font-family: var(--font-display); font-size: clamp(3rem, 8vw, 7rem); font-weight: 300; letter-spacing: 0.12em; text-transform: uppercase; line-height: 1.1; opacity: 0; animation: fadeUp 1.2s ease forwards 0.3s; }
.hero-content .subtitle { font-size: clamp(0.7rem, 1.2vw, 0.9rem); font-weight: 300; letter-spacing: 0.35em; text-transform: uppercase; color: var(--warm); margin-top: 1.5rem; opacity: 0; animation: fadeUp 1.2s ease forwards 0.7s; }
.hero-scroll { position: absolute; bottom: 2.5rem; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; color: rgba(255,255,255,0.5); text-decoration: none; font-size: 0.65rem; letter-spacing: 0.25em; text-transform: uppercase; }
.hero-scroll .line { width: 1px; height: 40px; background: rgba(255,255,255,0.3); position: relative; overflow: hidden; }
.hero-scroll .line::after { content: ''; position: absolute; top: -100%; left: 0; width: 100%; height: 100%; background: var(--warm); animation: scrollLine 2s ease-in-out infinite; }
@keyframes scrollLine { 0% { top: -100%; } 50% { top: 0; } 100% { top: 100%; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }

/* ========== SECTIONS ========== */
.section-header { text-align: center; margin-bottom: 4rem; }
.section-header h2 { font-family: var(--font-display); font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 300; letter-spacing: 0.08em; }
.section-header .accent-line { display: block; width: 50px; height: 1px; background: var(--warm); margin: 1.2rem auto 0; }

/* ========== GALLERY ========== */
.gallery-section { padding: 6rem 2rem 4rem; max-width: 1400px; margin: 0 auto; }
.gallery-filters { display: flex; justify-content: center; gap: 1rem; margin-bottom: 3rem; flex-wrap: wrap; }
.filter-btn { font-size: 0.7rem; font-weight: 400; letter-spacing: 0.2em; text-transform: uppercase; background: none; border: 1px solid var(--light-mid); color: var(--text-mid); padding: 0.6rem 1.5rem; cursor: pointer; transition: all 0.3s; font-family: var(--font-body); }
.filter-btn:hover, .filter-btn.active { border-color: var(--dark); color: var(--dark); }

.masonry { columns: 3; column-gap: 1.2rem; }
.masonry-item { break-inside: avoid; margin-bottom: 1.2rem; position: relative; overflow: hidden; cursor: pointer; border-radius: 2px; opacity: 0; transform: translateY(40px); transition: opacity 0.6s, transform 0.6s; }
.masonry-item.visible { opacity: 1; transform: translateY(0); }
.masonry-item img { width: 100%; display: block; transition: transform 0.6s; }
.masonry-item:hover img { transform: scale(1.04); }
.masonry-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(10,10,10,0.7) 0%, transparent 50%); opacity: 0; transition: opacity 0.4s; display: flex; align-items: flex-end; padding: 1.5rem; }
.masonry-item:hover .masonry-overlay { opacity: 1; }
.masonry-overlay span { font-family: var(--font-display); font-size: 1.1rem; color: #fff; font-weight: 300; letter-spacing: 0.05em; }

/* ========== ABOUT ========== */
.about-strip { display: grid; grid-template-columns: 1fr 1fr; min-height: 500px; }
.about-image { background-position: center; background-size: cover; position: relative; }
.about-image::after { content: ''; position: absolute; inset: 0; background: rgba(10,10,10,0.15); }
.about-text { display: flex; flex-direction: column; justify-content: center; padding: 4rem 5rem; background: var(--dark); color: #fff; }
.about-text h2 { font-family: var(--font-display); font-size: clamp(2rem, 3.5vw, 3rem); font-weight: 300; letter-spacing: 0.06em; margin-bottom: 0.8rem; }
.about-text .accent-line { width: 40px; height: 1px; background: var(--warm); margin-bottom: 2rem; }
.about-text p { font-size: 0.95rem; font-weight: 300; line-height: 1.9; color: rgba(255,255,255,0.7); max-width: 480px; }

/* ========== FOOTER ========== */
footer.site-footer { background: var(--dark); color: #fff; padding: 4rem 2rem 2rem; }
.footer-inner { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; gap: 3rem; align-items: start; }
.footer-col:first-child { justify-self: start; }
.footer-col:nth-child(2) { text-align: center; }
.footer-col:last-child { justify-self: end; text-align: right; }
.footer-logo { font-family: var(--font-display); font-size: 1.3rem; font-weight: 300; letter-spacing: 0.15em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-tagline { font-size: 0.75rem; color: rgba(255,255,255,0.4); letter-spacing: 0.1em; font-weight: 300; }
.social-links { display: flex; gap: 1.2rem; margin-top: 0.5rem; justify-content: center; }
.social-links a { display: flex; align-items: center; justify-content: center; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,0.15); border-radius: 50%; color: rgba(255,255,255,0.6); text-decoration: none; transition: all 0.3s; }
.social-links a:hover { border-color: var(--warm); color: var(--warm); transform: translateY(-2px); }
.social-links svg { width: 16px; height: 16px; fill: currentColor; }
.footer-contact h4 { font-family: var(--font-display); font-size: 1rem; font-weight: 400; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.8rem; color: var(--warm); }
.footer-contact p, .footer-contact a { font-size: 0.8rem; font-weight: 300; color: rgba(255,255,255,0.5); line-height: 1.8; text-decoration: none; transition: color 0.3s; }
.footer-contact a:hover { color: var(--warm); }
.footer-bottom { max-width: 1200px; margin: 3rem auto 0; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.08); text-align: center; font-size: 0.65rem; color: rgba(255,255,255,0.25); letter-spacing: 0.1em; }

/* ========== LIGHTBOX ========== */
.lightbox { position: fixed; inset: 0; background: rgba(10,10,10,0.95); z-index: 9999; display: none; align-items: center; justify-content: center; cursor: zoom-out; backdrop-filter: blur(10px); }
.lightbox.active { display: flex; }
.lightbox img { max-width: 90vw; max-height: 90vh; object-fit: contain; animation: lbFadeIn 0.3s ease; }
.lightbox-close { position: absolute; top: 1.5rem; right: 2rem; font-size: 1.5rem; color: rgba(255,255,255,0.6); cursor: pointer; background: none; border: none; transition: color 0.3s; }
.lightbox-close:hover { color: #fff; }
.lightbox-nav { position: absolute; top: 50%; transform: translateY(-50%); background: none; border: none; color: rgba(255,255,255,0.5); font-size: 2rem; cursor: pointer; padding: 1rem; transition: color 0.3s; }
.lightbox-nav:hover { color: #fff; }
.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }
@keyframes lbFadeIn { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .masonry { columns: 2; }
  .about-text { padding: 3rem; }
  .footer-inner { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
  .footer-col:first-child, .footer-col:last-child { justify-self: center; text-align: center; }
}
@media (max-width: 768px) {
  nav.main-nav { padding: 1.2rem 1.5rem; }
  .nav-links { position: fixed; top: 0; right: -100%; width: 70%; height: 100vh; background: var(--dark); flex-direction: column; justify-content: center; align-items: center; gap: 2rem; transition: right 0.4s; }
  .nav-links.open { right: 0; }
  .hamburger { display: flex; }
  .masonry { columns: 1; }
  .about-strip { grid-template-columns: 1fr; }
  .about-image { min-height: 300px; }
  .about-text { padding: 2.5rem 1.5rem; }
  .gallery-section { padding: 4rem 1rem 3rem; }
}
