@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;500&family=Montserrat:wght@300;400&display=swap');

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

body {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  background: #fafafa;
  color: #222;
  line-height: 1.8;
  min-height: 100vh;
}

/* Header */
header {
  text-align: center;
  padding: 5rem 2rem 4rem;
  background: #fff;
}

header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 3rem;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: #111;
}

header p {
  margin-top: 1rem;
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #999;
}

header a {
  color: #999;
  text-decoration: none;
  transition: color 0.3s;
}

header a:hover {
  color: #111;
}

/* Main Gallery Container */
main {
  background: #fff;
  padding-bottom: 4rem;
}

/* Hero Section */
.hero-section {
  position: relative;
  width: 100%;
  height: 85vh;
  min-height: 500px;
  max-height: 900px;
  overflow: hidden;
  cursor: pointer;
}

.hero-section img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 8s ease;
}

.hero-section:hover img {
  transform: scale(1.03);
}

.hero-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 4rem 3rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.4));
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.hero-location {
  font-family: 'Cormorant Garamond', serif;
  font-size: 2.5rem;
  font-weight: 300;
  color: #fff;
  letter-spacing: 0.2em;
  text-transform: capitalize;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
  .hero-section {
    height: 60vh;
    min-height: 350px;
  }

  .hero-location {
    font-size: 1.5rem;
  }

  .hero-overlay {
    padding: 2rem 1.5rem;
  }
}

/* Gallery Sections */
.location-section {
  padding: 3rem 2rem;
  max-width: 1600px;
  margin: 0 auto;
}

.location-section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 2rem;
  text-align: center;
  text-transform: capitalize;
  color: #333;
  position: relative;
}

.location-section h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 1px;
  background: #ddd;
  margin: 1rem auto 0;
}

/* Photo Grid */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
}

.photo-grid img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  cursor: pointer;
  transition: all 0.5s ease;
  filter: grayscale(0%);
}

.photo-grid img:hover {
  transform: scale(1.01);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Loading State */
.loading {
  text-align: center;
  color: #999;
  padding: 6rem;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

/* Footer */
footer {
  text-align: center;
  padding: 3rem;
  background: #fff;
  border-top: 1px solid #eee;
}

footer a {
  color: #bbb;
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.3s;
}

footer a:hover {
  color: #666;
}

/* ================================
   ADMIN STYLES
   ================================ */

#login-section,
#admin-section > .admin-section {
  max-width: 700px;
  margin: 2rem auto;
  padding: 3rem;
  background: #fff;
  border: 1px solid #eee;
}

.admin-section h2 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 1.5rem;
  color: #333;
}

.admin-section input[type="password"],
.admin-section input[type="text"],
.admin-section select {
  padding: 0.875rem 1rem;
  font-size: 0.95rem;
  font-family: 'Montserrat', sans-serif;
  border: 1px solid #ddd;
  background: #fff;
  color: #333;
  border-radius: 0;
  margin-right: 0.5rem;
  transition: border-color 0.3s;
}

.admin-section input:focus,
.admin-section select:focus {
  outline: none;
  border-color: #111;
}

.admin-section button {
  padding: 0.875rem 2rem;
  font-size: 0.85rem;
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: #111;
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.3s;
}

.admin-section button:hover {
  background: #333;
}

.folder-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}

.folder-controls label {
  color: #666;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

.folder-controls span {
  color: #bbb;
}

.hint {
  color: #999;
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

/* Drop Zone */
#drop-zone {
  border: 2px dashed #ddd;
  padding: 4rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  background: #fafafa;
}

#drop-zone:hover,
#drop-zone.dragover {
  border-color: #111;
  background: #fff;
}

#drop-zone p {
  color: #999;
  font-size: 0.9rem;
}

#drop-zone input[type="file"] {
  margin-top: 1.5rem;
}

/* Upload Progress */
#upload-progress {
  margin-top: 1.5rem;
}

.progress-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
  font-size: 0.9rem;
}

.progress-bar {
  flex: 1;
  height: 4px;
  background: #eee;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: #111;
  transition: width 0.3s;
}

.status {
  font-size: 0.8rem;
  color: #999;
}

.error {
  color: #c0392b;
  margin-top: 0.5rem;
  font-size: 0.9rem;
}

.success {
  color: #27ae60;
}

/* Manage Photos */
.manage-section {
  margin-bottom: 3rem;
}

.manage-section h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.2rem;
  font-weight: 400;
  margin-bottom: 1rem;
  color: #666;
  text-transform: capitalize;
}

.manage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.photo-item {
  position: relative;
}

.photo-item img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  transition: opacity 0.3s;
}

.photo-item:hover img {
  opacity: 0.8;
}

.delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px;
  height: 22px;
  background: #c0392b;
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.photo-item:hover .delete-btn {
  opacity: 1;
}

.delete-btn:hover {
  background: #a93226;
}

.photo-item.deleting {
  opacity: 0.4;
  pointer-events: none;
}

/* Lightbox */
#lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  z-index: 1000;
}

#lightbox.active {
  opacity: 1;
  visibility: visible;
}

#lightbox img {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
  line-height: 1;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #fff;
  font-size: 4rem;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s;
  padding: 1rem;
  line-height: 1;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  opacity: 1;
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.lightbox-counter {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: #999;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

@media (max-width: 768px) {
  .lightbox-prev,
  .lightbox-next {
    font-size: 2.5rem;
  }

  .lightbox-close {
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
  }
}

/* Responsive */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
    letter-spacing: 0.2em;
  }

  .photo-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .photo-grid img {
    height: 250px;
  }

  .location-section {
    padding: 2rem 1rem;
  }
}
