/*
Theme Name:  M5Events Photography
Theme URI:   https://m5events.com
Author:      M5Events
Author URI:  https://m5events.com
Description: A bold pixel/retro aesthetic photography theme for M5Events with 9 gallery sections, glitch hero animation, and full WordPress customizer support.
Version:     1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License:     GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: m5events
Tags:        photography, portfolio, custom-colors, custom-logo, full-site-editing, responsive-layout
*/

/* =========================================================
   RESET & BASE
   ========================================================= */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
body {
  background: var(--m5-white);
  color: var(--m5-black);
  font-family: 'Space Mono', monospace;
  overflow-x: hidden;
  cursor: auto;
}
body.m5-cursor-ready,
body.m5-cursor-ready a,
body.m5-cursor-ready button,
body.m5-cursor-ready [role="button"] {
  cursor: none !important;
}

/* =========================================================
   CSS VARIABLES
   ========================================================= */
:root {
  --m5-pink: #FF2D9B;
  --m5-black: #0a0a0a;
  --m5-white: #f5f5f0;
  --m5-green: #00FF41;
  --m5-yellow: #FFE600;
  --m5-grid: #e8e8e0;
}

/* =========================================================
   CUSTOM CURSOR
   ========================================================= */
.m5-cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  background: var(--m5-pink);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  clip-path: polygon(0 0, 60% 0, 60% 40%, 100% 40%, 100% 60%, 60% 60%, 60% 100%, 40% 100%, 40% 60%, 0 60%);
  transition: background 0.1s;
  box-shadow: 0 0 0 2px #000;
}
.m5-cursor.clicked {
  background: var(--m5-green);
  transform: translate(-50%, -50%) scale(1.5);
}
@media (max-width: 1024px) {
  .m5-cursor {
    display: none !important;
  }
  body,
  body * {
    cursor: auto !important;
  }
}

/* =========================================================
   PIXEL GRID
   ========================================================= */
.pixel-bg {
  background-image:
    linear-gradient(var(--m5-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--m5-grid) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* =========================================================
   NAVIGATION
   ========================================================= */
.m5-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  height: 64px;
  background: var(--m5-black);
  border-bottom: 3px solid var(--m5-pink);
}
.m5-nav__logo {
  font-family: 'Press Start 2P', monospace;
  font-size: 14px;
  color: var(--m5-pink);
  letter-spacing: 2px;
  text-decoration: none;
}
.m5-nav__links {
  display: flex !important;
  gap: 24px;
  list-style: none;
  align-items: center;
}
.m5-nav__links > li > a {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: var(--m5-white);
  text-decoration: none;
  letter-spacing: 1px;
  text-transform: uppercase;
  transition: color 0.1s;
  cursor: pointer;
}
.m5-nav__links > li > a:hover,
.m5-nav__links > li > a:focus {
  color: var(--m5-pink);
  outline: none;
}
.m5-nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}
.m5-nav__hamburger span {
  display: block;
  width: 24px;
  height: 3px;
  background: var(--m5-white);
}
.m5-nav__has-sub {
  position: relative;
}
.m5-nav__sub {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--m5-black);
  border: 2px solid var(--m5-pink);
  min-width: 180px;
  list-style: none;
  padding: 8px 0;
  z-index: 200;
  clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
}
.m5-nav__has-sub:hover .m5-nav__sub,
.m5-nav__has-sub.open .m5-nav__sub {
  display: block;
}
.m5-nav__sub li a {
  display: block;
  padding: 10px 20px;
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: var(--m5-white);
  text-decoration: none;
  letter-spacing: 1px;
  white-space: nowrap;
  transition: background 0.1s, color 0.1s;
  cursor: pointer;
}
.m5-nav__sub li a:hover {
  background: rgba(255, 45, 155, 0.15);
  color: var(--m5-pink);
}

/* =========================================================
   HERO
   ========================================================= */
.m5-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  min-height: 100vh;
  padding: 64px 60px 80px;
  position: relative;
  overflow: hidden;
  background: var(--m5-black);
}
.m5-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.15) 2px, rgba(0, 0, 0, 0.15) 4px);
  pointer-events: none;
  z-index: 3;
}
#m5PixelCanvas {
  display: none !important;
  visibility: hidden !important;
}
.m5-hero__content {
  position: relative;
  z-index: 4;
  text-align: left;
  grid-column: 1;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 24px;
}
.m5-hero__eyebrow {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  color: var(--m5-green);
  letter-spacing: 4px;
  animation: m5blink 1.2s step-end infinite;
}
@keyframes m5blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
.m5-hero__title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(32px, 5vw, 72px);
  color: var(--m5-white);
  line-height: 1.3;
  letter-spacing: 4px;
}
.m5-hero__title span {
  color: var(--m5-pink);
  display: block;
  animation: m5glitch 3s infinite;
}
@keyframes m5glitch {
  0%, 90%, 100% { text-shadow: none; transform: none; }
  91% { text-shadow: -4px 0 var(--m5-green), 4px 0 var(--m5-pink); transform: skewX(-5deg); }
  92% { text-shadow: 4px 0 var(--m5-green), -4px 0 var(--m5-pink); transform: skewX(5deg); }
  93% { text-shadow: none; transform: none; }
  94% { text-shadow: -2px 0 var(--m5-yellow); transform: translateX(3px); }
  95% { text-shadow: none; transform: none; }
}
.m5-hero__sub {
  font-size: 13px;
  color: rgba(245, 245, 240, 0.6);
  letter-spacing: 3px;
  text-transform: uppercase;
}
.m5-hero__cta {
  display: inline-block;
  align-self: flex-start;
  padding: 14px 32px;
  background: var(--m5-pink);
  color: var(--m5-black);
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.1s, background 0.1s;
  clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
}
.m5-hero__cta:hover {
  background: var(--m5-green);
  transform: translate(-3px, -3px);
}

/* DINO */
.m5-hero__dino {
  grid-column: 2;
  position: relative;
  z-index: 4;
  display: flex;
  align-items: stretch;
  justify-content: center;
  height: 100%;
}
.m5-hero__dino img {
  width: 100%;
  height: 100vh;
  object-fit: contain;
  object-position: center bottom;
  display: block;
  filter: none;
}

.m5-hero__mountains {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 80px;
  z-index: 5;
  grid-column: 1 / -1;
}
.m5-hero__mountains svg {
  width: 100%;
  display: block;
}
.m5-hero__photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  z-index: 1;
  opacity: 0.3;
  grid-column: 1 / -1;
}

/* =========================================================
   MARQUEE
   ========================================================= */
.m5-marquee {
  background: var(--m5-pink);
  border-top: 3px solid var(--m5-black);
  border-bottom: 3px solid var(--m5-black);
  padding: 14px 0;
  overflow: hidden;
  white-space: nowrap;
}
.m5-marquee__track {
  display: inline-flex;
  gap: 48px;
  animation: m5marquee 18s linear infinite;
}
@keyframes m5marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.m5-marquee__item {
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  color: var(--m5-black);
  letter-spacing: 2px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.m5-marquee__item::before {
  content: '★';
  font-size: 10px;
}

/* =========================================================
   ABOUT
   ========================================================= */
.m5-about {
  padding: 100px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
}
.m5-about__title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(24px, 3.5vw, 52px);
  line-height: 1.6;
  margin-bottom: 32px;
}
.m5-about__title em {
  font-style: normal;
  color: var(--m5-pink);
}
.m5-about__text {
  font-size: 13px;
  line-height: 2;
  color: #444;
  margin-bottom: 16px;
}
.m5-stats {
  display: flex;
  gap: 40px;
  margin-top: 48px;
  flex-wrap: wrap;
}
.m5-stat__num {
  font-family: 'Press Start 2P', monospace;
  font-size: 28px;
  color: var(--m5-pink);
  display: block;
}
.m5-stat__label {
  font-size: 10px;
  color: #888;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-top: 6px;
  display: block;
}
.m5-about__visual {
  position: relative;
}
.m5-pixel-box {
  width: 100%;
  aspect-ratio: 1;
  background: var(--m5-black);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.m5-pixel-box::before {
  content: '';
  position: absolute;
  inset: 12px;
  border: 3px solid var(--m5-pink);
}
.m5-pixel-box__icon {
  font-size: 80px;
  animation: m5float 3s ease-in-out infinite;
}
@keyframes m5float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
.m5-pixel-box__shadow {
  position: absolute;
  bottom: -12px;
  right: -12px;
  width: 100%;
  height: 100%;
  background: var(--m5-pink);
  z-index: -1;
}

/* =========================================================
   SECTION HEADER
   ========================================================= */
.m5-section-header {
  text-align: center;
  margin-bottom: 64px;
}
.m5-section-header__title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(22px, 3.5vw, 48px);
  line-height: 1.5;
}
.m5-section-header__sub {
  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #888;
  margin-top: 16px;
}

/* =========================================================
   GALLERIES
   ========================================================= */
.m5-galleries {
  padding: 100px 60px;
  background: var(--m5-black);
}
.m5-galleries .m5-section-header__title {
  color: var(--m5-white);
}
.m5-galleries .m5-section-header__sub {
  color: rgba(255, 255, 255, 0.4);
}
.m5-galleries__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  max-width: 1400px;
  margin: 0 auto;
}
.m5-gallery-card {
  position: relative;
  aspect-ratio: 4/3;
  background: #111;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  text-decoration: none;
}
.m5-gallery-card__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.4s ease;
}
.m5-gallery-card__bg.no-image {
  background-image: repeating-conic-gradient(#1a1a1a 0% 25%, #222 0% 50%);
  background-size: 16px 16px;
}
.m5-gallery-card:hover .m5-gallery-card__bg {
  transform: scale(1.08);
}
.m5-gallery-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.85) 0%, transparent 60%);
  z-index: 1;
  transition: background 0.3s;
}
.m5-gallery-card:hover .m5-gallery-card__overlay {
  background: linear-gradient(0deg, rgba(255, 45, 155, 0.85) 0%, rgba(0, 0, 0, 0.4) 100%);
}
.m5-gallery-card__icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 48px;
  z-index: 2;
  opacity: 0.3;
  transition: opacity 0.3s, transform 0.3s;
}
.m5-gallery-card:hover .m5-gallery-card__icon {
  opacity: 1;
  transform: translate(-50%, -60%) scale(1.2);
}
.m5-gallery-card__body {
  position: relative;
  z-index: 2;
}
.m5-gallery-card__num {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: var(--m5-pink);
  display: block;
  margin-bottom: 6px;
  letter-spacing: 2px;
}
.m5-gallery-card__title {
  font-family: 'Press Start 2P', monospace;
  font-size: 13px;
  color: var(--m5-white);
  display: block;
  line-height: 1.6;
}
.m5-gallery-card__desc {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.6);
  display: block;
  margin-top: 6px;
  line-height: 1.6;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.m5-gallery-card:hover .m5-gallery-card__desc {
  max-height: 60px;
}
.m5-gallery-card__arrow {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  background: var(--m5-pink);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  font-size: 14px;
  color: var(--m5-black);
  opacity: 0;
  transform: translate(8px, -8px);
  transition: opacity 0.3s, transform 0.3s;
  clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
}
.m5-gallery-card:hover .m5-gallery-card__arrow {
  opacity: 1;
  transform: translate(0, 0);
}

/* =========================================================
   SINGLE GALLERY
   ========================================================= */
.m5-gallery-single {
  min-height: 100vh;
  background: var(--m5-black);
  padding: 100px 48px 80px;
}
.m5-gallery-single__header {
  max-width: 1400px;
  margin: 0 auto 48px;
}
.m5-gallery-single__back {
  display: inline-block;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--m5-pink);
  text-decoration: none;
  letter-spacing: 2px;
  margin-bottom: 32px;
  transition: color 0.1s;
}
.m5-gallery-single__back:hover {
  color: var(--m5-green);
}
.m5-gallery-single__meta {
  display: flex;
  align-items: center;
  gap: 24px;
}
.m5-gallery-single__icon {
  font-size: 56px;
}
.m5-gallery-single__title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(20px, 4vw, 48px);
  color: var(--m5-white);
  line-height: 1.4;
  margin-bottom: 8px;
}
.m5-gallery-single__desc {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.8;
  margin-bottom: 8px;
}
.m5-gallery-single__count {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: var(--m5-pink);
  letter-spacing: 2px;
}
.m5-gallery-single__empty {
  text-align: center;
  padding: 80px 24px;
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  letter-spacing: 2px;
}
.m5-gallery-single__content {
  max-width: 1400px;
  margin: 0 auto;
  color: var(--m5-white);
}

/* Masonry */
.m5-masonry {
  columns: 4 280px;
  column-gap: 6px;
  max-width: 1400px;
  margin: 0 auto;
}
.m5-masonry__item {
  position: relative;
  break-inside: avoid;
  margin-bottom: 6px;
  overflow: hidden;
  cursor: pointer;
  display: block;
}
.m5-masonry__item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: saturate(0.85);
}
.m5-masonry__item:hover img {
  transform: scale(1.04);
  filter: saturate(1.2);
}
.m5-masonry__overlay {
  position: absolute;
  inset: 0;
  background: rgba(255, 45, 155, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}
.m5-masonry__item:hover .m5-masonry__overlay {
  background: rgba(255, 45, 155, 0.3);
}
.m5-masonry__zoom {
  font-size: 32px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.3s, transform 0.3s;
}
.m5-masonry__item:hover .m5-masonry__zoom {
  opacity: 1;
  transform: scale(1);
}

/* Lightbox */
.m5-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
}
.m5-lightbox.active {
  display: flex;
}
.m5-lightbox__wrap {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.m5-lightbox__wrap img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  display: block;
  border: 3px solid var(--m5-pink);
}
.m5-lightbox__caption {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 12px;
  letter-spacing: 2px;
}
.m5-lightbox__counter {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: var(--m5-pink);
  margin-top: 8px;
  letter-spacing: 2px;
}
.m5-lightbox__close,
.m5-lightbox__prev,
.m5-lightbox__next {
  position: fixed;
  background: var(--m5-pink);
  color: var(--m5-black);
  border: none;
  cursor: pointer;
  font-family: 'Press Start 2P', monospace;
  transition: background 0.1s, transform 0.1s;
  z-index: 9001;
}
.m5-lightbox__close {
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  font-size: 16px;
  clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
}
.m5-lightbox__prev {
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 28px;
  clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
}
.m5-lightbox__next {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 28px;
  clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
}
.m5-lightbox__close:hover {
  background: var(--m5-green);
}
.m5-lightbox__prev:hover {
  background: var(--m5-green);
  transform: translateY(-50%) scale(1.1);
}
.m5-lightbox__next:hover {
  background: var(--m5-green);
  transform: translateY(-50%) scale(1.1);
}

/* =========================================================
   PROCESS
   ========================================================= */
.m5-process {
  padding: 100px 80px;
}
.m5-process .m5-section-header__title {
  color: var(--m5-black);
}
.m5-process__steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
}
.m5-process__steps::before {
  content: '';
  position: absolute;
  top: 32px;
  left: 10%;
  right: 10%;
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--m5-pink) 0, var(--m5-pink) 12px, transparent 12px, transparent 20px);
}
.m5-step {
  text-align: center;
  padding: 32px 20px;
  background: var(--m5-white);
  border: 3px solid var(--m5-black);
  transition: transform 0.2s, box-shadow 0.2s;
}
.m5-step:hover {
  transform: translate(-4px, -4px);
  box-shadow: 7px 7px 0 var(--m5-pink);
}
.m5-step__num {
  font-family: 'Press Start 2P', monospace;
  font-size: 28px;
  color: var(--m5-pink);
  display: block;
  margin-bottom: 16px;
}
.m5-step__icon {
  font-size: 32px;
  display: block;
  margin-bottom: 16px;
}
.m5-step__title {
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  line-height: 1.8;
  display: block;
  margin-bottom: 12px;
}
.m5-step__desc {
  font-size: 11px;
  color: #666;
  line-height: 1.8;
}

/* =========================================================
   CTA BANNER
   ========================================================= */
.m5-cta {
  padding: 80px 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
  border-top: 4px solid var(--m5-black);
  border-bottom: 4px solid var(--m5-black);
}
.m5-cta::before,
.m5-cta::after {
  display: none;
}
.m5-cta__title {
  font-family: 'Press Start 2P', monospace;
  font-size: clamp(20px, 4vw, 48px);
  color: var(--m5-black);
  line-height: 1.5;
  position: relative;
  z-index: 1;
  margin-bottom: 24px;
}
.m5-cta__text {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.8);
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
  letter-spacing: 1px;
}
.m5-btn-dark {
  display: inline-block;
  padding: 16px 40px;
  background: var(--m5-black);
  color: var(--m5-white);
  font-family: 'Press Start 2P', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-decoration: none;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: transform 0.1s, background 0.1s;
  clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
}
.m5-btn-dark:hover {
  background: var(--m5-green);
  color: var(--m5-black);
  transform: translate(-3px, -3px);
}

/* =========================================================
   FOOTER
   ========================================================= */
.m5-footer {
  background: var(--m5-black);
  padding: 80px 100px 48px;
  border-top: 3px solid var(--m5-pink);
}
.m5-footer__top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 48px;
}
.m5-footer__logo {
  font-family: 'Press Start 2P', monospace;
  font-size: 18px;
  color: var(--m5-pink);
  display: block;
  margin-bottom: 20px;
  text-decoration: none;
}
.m5-footer__tagline {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 2;
  max-width: 300px;
}
.m5-footer__col h4 {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: var(--m5-white);
  letter-spacing: 2px;
  margin-bottom: 20px;
}
.m5-footer__col ul {
  list-style: none;
}
.m5-footer__col ul li {
  margin-bottom: 10px;
}
.m5-footer__col ul li a {
  color: var(--m5-pink);
  text-decoration: none;
  transition: color 0.1s, padding-left 0.1s;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  letter-spacing: 1px;
}
.m5-footer__col ul li a:hover {
  color: var(--m5-green);
  padding-left: 8px;
}
.m5-footer__bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.m5-footer__copy {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 1px;
}
.m5-footer__social {
  display: flex;
  gap: 16px;
}
.m5-footer__social a {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.1s;
  clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
}
.m5-footer__social a:hover {
  background: var(--m5-pink);
  color: var(--m5-black);
}

/* =========================================================
   SCROLL REVEAL
   ========================================================= */
.m5-reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.m5-reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   WORDPRESS OVERRIDES
   ========================================================= */
.wp-caption {
  max-width: 100%;
}
.wp-caption-text {
  font-size: 11px;
  color: #888;
  text-align: center;
  margin-top: 6px;
}
img {
  max-width: 100%;
  height: auto;
}

/* =========================================================
   FOOGALLERY
   ========================================================= */
.foogallery-container .fg-item img,
.foogallery .fg-item,
.fg-item-inner,
.fg-thumb {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 900px) {
  .m5-about {
    grid-template-columns: 1fr;
    padding: 60px 32px;
  }
  .m5-about__visual {
    display: none;
  }
  .m5-galleries__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .m5-process__steps {
    grid-template-columns: 1fr 1fr;
  }
  .m5-process__steps::before {
    display: none;
  }
  .m5-footer__top {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .m5-footer {
    padding: 60px 24px 40px;
  }
  .m5-nav {
    padding: 0 20px;
  }
  .m5-nav__links {
    display: none !important;
  }
  .m5-nav__hamburger {
    display: flex;
  }

  /* HERO MOBIL */
  .m5-hero {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 100px 24px 120px;
    box-sizing: border-box;
  }
  .m5-hero__content {
    text-align: center;
    align-items: center;
    width: 100%;
    margin-bottom: 40px;
  }
  .m5-hero__title {
    text-align: center;
    font-size: clamp(24px, 6vw, 38px);
  }
  .m5-hero__eyebrow,
  .m5-hero__sub {
    text-align: center;
  }
  .m5-hero__cta {
    align-self: center;
  }
  .m5-hero__dino {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    height: auto;
    display: flex;
    justify-content: center;
  }
  .m5-hero__dino img {
    width: 100%;
    height: auto;
    max-height: 40vh;
    object-fit: contain;
    display: block;
  }
  .m5-hero__mountains {
    height: 40px;
  }

  .m5-masonry {
    columns: 2 200px;
  }
  .m5-gallery-single {
    padding: 90px 20px 60px;
  }
  .m5-gallery-single__meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
@media (max-width: 600px) {
  .m5-galleries__grid {
    grid-template-columns: 1fr;
  }
  .m5-process__steps {
    grid-template-columns: 1fr;
  }
  .m5-galleries,
  .m5-process,
  .m5-cta {
    padding: 60px 24px;
  }
  .m5-masonry {
    columns: 2 140px;
    column-gap: 4px;
  }
  .m5-masonry__item {
    margin-bottom: 4px;
  }
  .m5-lightbox__prev {
    left: 8px;
  }
  .m5-lightbox__next {
    right: 8px;
  }
}

/* =========================================================
   PROFILE INFO TAB
   ========================================================= */
.m5-profile-info {
  max-width: 600px;
}

/* Owner edit form */
.m5-info-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.m5-info-form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.m5-info-form__left {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.m5-info-form__right {
  display: flex;
  flex-direction: column;
}
.m5-info-form__group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.m5-info-form__group--bio {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.m5-info-form__group--bio textarea {
  flex: 1;
  min-height: 220px;
}
.m5-info-form__group label {
  font-family: 'Press Start 2P', monospace;
  font-size: 8px;
  color: var(--m5-pink);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.m5-info-form__optional {
  color: rgba(255, 255, 255, 0.3);
  text-transform: none;
  letter-spacing: 0;
  font-family: 'Space Mono', monospace;
}
.m5-info-form__group input,
.m5-info-form__group textarea {
  width: 100%;
  padding: 12px 16px;
  background: #111;
  border: 2px solid rgba(255, 45, 155, 0.3);
  color: var(--m5-white);
  font-family: 'Space Mono', monospace;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
}
.m5-info-form__group input:focus,
.m5-info-form__group textarea:focus {
  border-color: var(--m5-pink);
  box-shadow: 0 0 0 2px rgba(255, 45, 155, 0.2);
}
.m5-info-form__group textarea {
  resize: vertical;
}
.m5-info-form__actions {
  display: flex;
  align-items: center;
  gap: 16px;
}
.m5-info-form__saved {
  display: none;
  font-family: 'Press Start 2P', monospace;
  font-size: 9px;
  color: var(--m5-green);
  letter-spacing: 1px;
  animation: m5blink 0.6s step-end 2;
}
@media (max-width: 700px) {
  .m5-info-form__grid {
    grid-template-columns: 1fr;
  }
  .m5-info-form__group--bio textarea {
    min-height: 140px;
  }
}

/* Visitor view */
.m5-info-empty {
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
  padding: 24px 0;
}
.m5-info-view {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.m5-info-view__row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.m5-info-view__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.m5-info-view__label {
  font-family: 'Press Start 2P', monospace;
  font-size: 7px;
  color: var(--m5-pink);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.m5-info-view__val {
  color: var(--m5-white);
  font-size: 14px;
}
.m5-info-view__bio {
  color: rgba(245, 245, 240, 0.8);
  font-size: 13px;
  line-height: 1.9;
  padding: 16px;
  background: #111;
  border-left: 3px solid var(--m5-pink);
}
.m5-info-view__buttons {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.m5-info-view__buttons .m5-hero__cta {
  margin-top: 0;
}
