/* === CSS Custom Properties === */
:root {
  --color-dark: #2d3436;
  --color-dark-alt: #3d4447;
  --color-accent: #d4a574;
  --color-accent-hover: #c4955a;
  --color-white: #ffffff;
  --color-light: #f5f5f5;
  --color-alt-row: #EFEFEF;
  --color-gray: #555;
  --color-gray-light: #ccc;
  --color-text: #333;
  --color-overlay: rgba(45, 52, 54, 0.7);
  --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
  --max-width: 1200px;
  --nav-height: 130px;
  --transition: 0.3s ease;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

/* === Header / Navigation === */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  background: var(--color-white);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header__inner {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.header__logo img {
  height: 120px;
  width: auto;
}

.header__logo span {
  color: var(--color-dark);
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav__links {
  display: flex;
  list-style: none;
  gap: 1.5rem;
}

.nav__links a {
  color: var(--color-dark);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: color var(--transition);
}

.nav__links a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width var(--transition);
}

.nav__links a:hover::after,
.nav__links a.active::after {
  width: 100%;
}

.nav__links a:hover {
  color: var(--color-accent);
}

.nav__links .btn {
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
}

.nav__links .btn::after {
  display: none;
}

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

.hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--color-dark);
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Nav */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav__links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-white);
    flex-direction: column;
    align-items: center;
    padding: 2rem 0;
    gap: 1.5rem;
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition);
  }

  .nav__links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: all;
  }
}

/* === Hero Section === */
.hero {
  position: relative;
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.5rem;
  margin-top: var(--nav-height);
  overflow: hidden;
}

.hero__bg {
  position: fixed;
  inset: 0;
  background-image: url("/images/gallery/FB_IMG_1673251422848.jpg"); /* fallback */
  background-size: cover;
  background-position: center;
  z-index: -2;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: -1;
}

.hero__content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero__content h1 {
  font-size: 2.5rem;
  color: var(--color-white);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero__content h1 span {
  color: var(--color-accent);
}

.hero__content p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 550px;
  margin-left: auto;
  margin-right: auto;
}

.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn--primary {
  background: var(--color-accent);
  color: var(--color-dark);
}

.btn--primary:hover {
  background: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(212, 165, 116, 0.4);
}

.btn--outline {
  background: transparent;
  color: var(--color-white);
  border: 2px solid var(--color-accent);
}

.btn--outline:hover {
  background: var(--color-accent);
  color: var(--color-dark);
}

/* === Section Base === */
.section {
  padding: 5rem 1.5rem;
}

.section--dark {
  background: var(--color-alt-row);
  color: var(--color-text);
}

.section--light {
  background: var(--color-white);
}

.section__header {
  text-align: center;
  margin-bottom: 3rem;
}

.section__header h2 {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.section__header .accent-line {
  width: 60px;
  height: 3px;
  background: var(--color-accent);
  margin: 0 auto;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
}

/* === About Section === */
.about__content {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.8;
  color: var(--color-text);
}

/* === Services Section === */
.services__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.service-card {
  background: var(--color-white);
  border-radius: 8px;
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.service-card__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
  color: var(--color-dark);
}

.service-card p {
  color: var(--color-gray);
  line-height: 1.7;
}

@media (min-width: 768px) {
  .services__grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* === Contact Section === */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.contact__info h3 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: var(--color-dark);
}

.contact__info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
  color: var(--color-gray);
}

.contact__info-item strong {
  display: block;
  color: var(--color-text);
  margin-bottom: 0.25rem;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-form input,
.contact-form textarea {
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-gray-light);
  border-radius: 4px;
  background: var(--color-white);
  color: var(--color-text);
  font-family: var(--font-main);
  font-size: 0.95rem;
  transition: border-color var(--transition);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
  color: #999;
}

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

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

@media (min-width: 768px) {
  .contact__grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* === Footer === */
.footer {
  background: var(--color-dark);
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.9rem;
}

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

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

.footer__links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer__copy {
  margin-top: 0.5rem;
}

/* === Gallery Page === */
.gallery-page {
  padding-top: calc(var(--nav-height) + 2rem);
  padding-bottom: 4rem;
  min-height: 100vh;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  padding: 0 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.gallery-grid__item {
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  aspect-ratio: 4/3;
}

.gallery-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.gallery-grid__item:hover img {
  transform: scale(1.05);
}

@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

/* === Lightbox === */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--color-white);
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--color-white);
  font-size: 2rem;
  cursor: pointer;
  padding: 1rem 1.25rem;
  border-radius: 4px;
  transition: background var(--transition);
}

.lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox__nav--prev {
  left: 1rem;
}

.lightbox__nav--next {
  right: 1rem;
}

/* === Admin Page === */
.admin-page {
  padding-top: calc(var(--nav-height) + 2rem);
  padding-bottom: 4rem;
  min-height: 100vh;
  background: var(--color-light);
}

.admin-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Login form */
.login-card {
  max-width: 400px;
  margin: 4rem auto;
  background: var(--color-white);
  padding: 2.5rem 2rem;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.login-card h2 {
  margin-bottom: 1.5rem;
  color: var(--color-dark);
}

.login-card input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--color-gray-light);
  border-radius: 4px;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.login-card input:focus {
  outline: none;
  border-color: var(--color-accent);
}

.login-card .error {
  color: #e74c3c;
  font-size: 0.9rem;
  margin-bottom: 1rem;
  display: none;
}

/* Upload zone */
.upload-zone {
  border: 2px dashed var(--color-gray-light);
  border-radius: 8px;
  padding: 3rem 2rem;
  text-align: center;
  margin-bottom: 2rem;
  background: var(--color-white);
  cursor: pointer;
  transition: var(--transition);
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--color-accent);
  background: rgba(212, 165, 116, 0.05);
}

.upload-zone p {
  color: var(--color-gray);
  margin-bottom: 1rem;
}

.upload-zone input[type="file"] {
  display: none;
}

.upload-progress {
  display: none;
  margin-bottom: 2rem;
}

.upload-progress__bar {
  height: 4px;
  background: var(--color-gray-light);
  border-radius: 4px;
  overflow: hidden;
}

.upload-progress__fill {
  height: 100%;
  background: var(--color-accent);
  width: 0%;
  transition: width 0.3s ease;
}

/* Admin gallery grid */
.admin-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.admin-gallery__item {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--color-white);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.admin-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-gallery__delete {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: rgba(231, 76, 60, 0.9);
  color: white;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}

.admin-gallery__item:hover .admin-gallery__delete {
  opacity: 1;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.admin-header h2 {
  color: var(--color-dark);
}

/* === Gallery Captions === */
.gallery-grid__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: var(--color-white);
  font-size: 0.85rem;
  line-height: 1.4;
}

/* === Lightbox Caption === */
.lightbox__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox__content .lightbox__img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox__caption {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  text-align: center;
  padding: 0.75rem 1rem 0;
  max-width: 600px;
}

.lightbox__caption:empty {
  display: none;
}

/* === Featured Star (Admin) === */
.featured-star {
  position: absolute;
  top: 0.5rem;
  left: 0.5rem;
  background: rgba(0, 0, 0, 0.5);
  color: #999;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition), color var(--transition);
  z-index: 1;
}

.admin-gallery__item:hover .featured-star,
.featured-star.active {
  opacity: 1;
}

.featured-star.active {
  color: #f1c40f;
  background: rgba(0, 0, 0, 0.6);
}

.admin-gallery__item.featured {
  box-shadow: 0 0 0 3px #f1c40f, 0 2px 10px rgba(0, 0, 0, 0.08);
}

/* === Hero Button (Admin) === */
.hero-btn {
  position: absolute;
  top: 0.5rem;
  right: 2.5rem;
  background: rgba(0, 0, 0, 0.5);
  color: #999;
  border: none;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  cursor: pointer;
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition), color var(--transition);
  z-index: 1;
}

.admin-gallery__item:hover .hero-btn,
.hero-btn.active {
  opacity: 1;
}

.hero-btn.active {
  color: #3498db;
  background: rgba(0, 0, 0, 0.6);
}

.admin-gallery__item.is-hero {
  outline: 2px solid #3498db;
  outline-offset: -2px;
}

/* === Admin Description Input === */
.admin-gallery__desc {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.4rem 0.5rem;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: var(--color-white);
  font-size: 0.8rem;
  font-family: var(--font-main);
  outline: none;
  opacity: 0;
  transition: opacity var(--transition);
}

.admin-gallery__item:hover .admin-gallery__desc,
.admin-gallery__desc:focus {
  opacity: 1;
}

.admin-gallery__desc::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* === Featured Gallery (Home Page) === */
.featured-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.featured-gallery .gallery-grid__item {
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  aspect-ratio: 4/3;
}

.featured-gallery .gallery-grid__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.featured-gallery .gallery-grid__item:hover img {
  transform: scale(1.05);
}

@media (min-width: 768px) {
  .featured-gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1024px) {
  .featured-gallery {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* === Responsive Breakpoints === */
@media (min-width: 480px) {
  .hero__content h1 {
    font-size: 3rem;
  }
}

@media (min-width: 768px) {
  .hero__content h1 {
    font-size: 3.5rem;
  }

  .section {
    padding: 6rem 2rem;
  }
}

@media (min-width: 1024px) {
  .hero__content h1 {
    font-size: 4rem;
  }

  .header {
    padding: 0 3rem;
  }

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

@media (min-width: 1200px) {
  .section {
    padding: 7rem 2rem;
  }
}
