/* Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600&family=Playfair+Display:ital,wght@0,400;0,700;1,400&display=swap");

:root {
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --accent-color: #d4af37;
  /* Metallic Gold */
  --secondary-bg: #1e1e1e;
  --modal-overlay: rgba(0, 0, 0, 0.95);
  --font-heading: "Playfair Display", serif;
  --font-body: "Outfit", sans-serif;
  --transition: all 0.3s ease;
}

/* Animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease-out,
    transform 0.8s ease-out;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

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

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

/* Header */
header {
  padding: 2rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(18, 18, 18, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-color);
  text-decoration: none;
  letter-spacing: 0.5px;
}

nav ul {
  display: flex;
  gap: 2rem;
  list-style: none;
}

nav a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  transition: var(--transition);
  opacity: 0.8;
}

nav a:hover,
nav a.active {
  color: var(--accent-color);
  opacity: 1;
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 6rem 1rem;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  margin-bottom: 1rem;
  font-weight: 400;
}

.hero p {
  font-size: 1.2rem;
  color: #a0a0a0;
  max-width: 600px;
  margin: 0 auto;
}

/* Gallery Controls */
.gallery-controls {
  margin-bottom: 2rem;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.size-control {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.8rem 1.5rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.size-control label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #aaa;
}

.slider-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.size-label {
  font-size: 0.8rem;
  color: #666;
}

#size-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 120px;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  outline: none;
}

#size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-color);
  cursor: pointer;
  transition: transform 0.2s;
}

#size-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* Gallery Grid */
.gallery-container {
  padding: 2rem 5%;
  max-width: 1600px;
  margin: 0 auto;
}

.gallery {
  display: grid;
  /* Default to 3 columns, controlled by JS via style property --cols */
  grid-template-columns: repeat(var(--cols, 3), 1fr);
  gap: 1.5rem;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  aspect-ratio: 3/4;
  /* Consistent aspect ratio initially */
  background-color: var(--secondary-bg);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
  display: block;
}

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

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
  opacity: 0;
  transition: var(--transition);
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.caption {
  color: white;
  font-family: var(--font-heading);
  font-size: 1.2rem;
  transform: translateY(20px);
  transition: transform 0.4s ease;
}

.caption strong {
  font-weight: 600;
  display: block;
  /* Make title own line */
  margin-bottom: 0.2rem;
}

.caption .desc {
  font-family: var(--font-body);
  font-size: 0.9rem;
  opacity: 0.85;
  font-weight: 300;
  line-height: 1.4;
  display: block;
}

.gallery-item:hover .caption {
  transform: translateY(0);
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--modal-overlay);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 2rem;
}

.lightbox.active {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  max-width: 90%;
  max-height: 90vh;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  transition: var(--transition);
}

/* Lightbox Wrapper */
.lightbox-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.lightbox-close:hover,
.room-view-close:hover {
  color: var(--accent-color);
  transform: rotate(90deg);
}

/* Room View */
.room-view {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--modal-overlay);
  z-index: 1010;
  /* Above lightbox */
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.room-view.active {
  display: flex;
  opacity: 1;
}

.room-container {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
}

.room-bg {
  display: block;
  max-width: 100%;
  max-height: 80vh;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.painting-overlay {
  position: absolute;
  top: 20%; /* 1/5 of the way from the top */
  left: 33.3%; /* 1/3 of the way from the left */
  width: 35%; /* Fixed width box */
  height: 40%; /* Fixed height box (20% to 60%) */
  display: flex;
  justify-content: flex-start; /* Align left */
  align-items: flex-start; /* Align top */
  pointer-events: none;
  overflow: hidden; /* CUT OFF anything that exceeds this box */
}

#room-img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain; /* Ensure image scales to fit INSIDE the box */
  box-shadow: 5px 10px 20px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

/* Realistic Frames - Modern Gallery Float */
.frame-black {
  border: 4px solid #1a1a1a;
  box-shadow:
    inset 0 0 0 4px #f9f9f9,
    /* Creates the "float" gap */ inset 0 0 0 5px rgba(0, 0, 0, 0.1),
    /* Subtle inner definition */ 0 25px 50px -12px rgba(0, 0, 0, 0.5),
    /* Soft, wide ambient shadow */ 0 10px 15px -3px rgba(0, 0, 0, 0.3); /* Tighter contact shadow */
}

.frame-white {
  border: 4px solid #f0f0f0;
  box-shadow:
    inset 0 0 0 4px #ffffff,
    /* Very bright inner gap */ inset 0 0 0 5px rgba(0, 0, 0, 0.05),
    /* Extremely subtle inner definition */ 0 25px 50px -12px rgba(0, 0, 0, 0.3),
    /* Soft, lighter ambient shadow */ 0 10px 15px -3px rgba(0, 0, 0, 0.15); /* Tighter contact shadow */
}

/* Frame Controls */
.frame-controls {
  position: absolute;
  top: 2rem;
  left: 2rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  z-index: 1020;
  background: rgba(0, 0, 0, 0.6);
  padding: 0.8rem 1.2rem;
  border-radius: 30px;
  backdrop-filter: blur(5px);
}

.frame-controls span {
  color: white;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.frame-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition:
    transform 0.2s ease,
    border-color 0.2s ease;
}

.frame-btn:hover {
  transform: scale(1.1);
}

.frame-btn.active {
  border-color: var(--accent-color);
  transform: scale(1.1);
}

.frame-btn.black {
  background-color: #1a1a1a;
}

.frame-btn.white {
  background-color: #f0f0f0;
}

/* Close Buttons */
.room-view-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  transition: var(--transition);
  z-index: 1020;
}

/* View Switch Buttons */
.view-switch-btn {
  background-color: transparent;
  border: 1px solid var(--accent-color);
  color: var(--accent-color);
  padding: 0.8rem 1.5rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 1rem;
}

.view-switch-btn:hover {
  background-color: var(--accent-color);
  color: var(--bg-color);
}

.view-switch-btn.floating {
  position: absolute;
  bottom: 2rem;
  right: 2rem;
  /* Move to bottom right to avoid overlap */
  left: auto;
  /* Reset left */
  transform: none;
  /* Reset transform */
  margin: 0;
  background-color: rgba(18, 18, 18, 0.8);
  z-index: 1020;
}

/* Footer */
footer {
  text-align: center;
  padding: 4rem 1rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: #666;
  font-size: 0.9rem;
}

/* About Section */
.about-section {
  padding: 6rem 5%;
  background-color: var(--secondary-bg);
  margin-top: 4rem;
}

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.about-section h2,
.contact-section h2 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  margin-bottom: 2rem;
  color: var(--accent-color);
}

.about-content {
  display: block; /* Removed flex */
  max-width: 1000px;
  margin: 0 auto;
  text-align: left;
}

.about-image-container {
  float: left;
  width: 350px; /* Specific width for wrap */
  margin: 0 2rem 1.5rem 0;
}

.about-img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.about-text {
  /* Removed flex to allow text wrap */
}

.about-text p {
  margin-bottom: 1.5rem;
  font-size: 1.05rem;
  color: #ccc;
  line-height: 1.7;
}

.contact-email {
  margin-top: 1rem;
  color: var(--accent-color);
  font-family: var(--font-body);
  font-size: 1.1rem;
  opacity: 0.8;
}

/* Contact Section */
.contact-section {
  padding: 6rem 5%;
  text-align: center;
}

.contact-section p {
  margin-bottom: 2rem;
  color: #a0a0a0;
  font-size: 1.2rem;
}

.contact-btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  background-color: transparent;
  border: 2px solid var(--accent-color);
  color: var(--accent-color);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  text-decoration: none;
  transition: var(--transition);
  margin-bottom: 2rem;
}

.contact-btn:hover {
  background-color: var(--accent-color);
  color: var(--bg-color);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
}

.social-links a {
  color: var(--text-color);
  text-decoration: none;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
  opacity: 0.7;
}

.social-links a:hover {
  color: var(--accent-color);
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.5rem;
  }

  header {
    padding: 1.5rem;
    flex-direction: column;
    gap: 1rem;
  }

  .logo {
    font-size: 1.3rem;
  }

  .gallery {
    grid-template-columns: 1fr;
  }

  .about-content {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 2.5rem;
  }

  .about-image-container {
    float: none;
    width: 100%;
    margin: 0 0 2rem 0;
  }
}
