@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600&display=swap');

:root {
  --bg-color: #f7f7f7;
  --text-color: #1a1a1a;
  --accent-color: #d1b894;
  --card-bg: rgba(255, 255, 255, 0.8);
  --control-bg: rgba(255, 255, 255, 0.4);
  --control-hover: rgba(255, 255, 255, 0.8);
  --border-radius: 12px;
  --transition-speed: 0.4s;
}

body.theme-dark {
  --bg-color: #0f1115;
  --text-color: #e0e0e0;
  --accent-color: #b39b7d;
  --card-bg: rgba(25, 28, 35, 0.6);
  --control-bg: rgba(0, 0, 0, 0.5);
  --control-hover: rgba(255, 255, 255, 0.2);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-speed), color var(--transition-speed);
}

/* Header & Statement */
.hero {
  padding: 6rem 2rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
  letter-spacing: -0.05em;
  background: linear-gradient(90deg, var(--text-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero p {
  font-size: 1.5rem;
  font-weight: 300;
  opacity: 0.8;
}

/* Base Gallery Container */
.gallery-container {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Carousel Component */
.carousel-wrapper {
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  position: relative;
  transition: transform var(--transition-speed), box-shadow var(--transition-speed);
}

.carousel-wrapper:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

body.theme-dark .carousel-wrapper {
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.carousel {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: calc(var(--border-radius) - 6px);
  overflow: hidden;
}

.carousel-inner {
  width: 100%;
  height: 100%;
  position: relative;
}

.carousel-item {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity var(--transition-speed) ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-item.active {
  opacity: 1;
  z-index: 1;
}

.carousel-item img,
.carousel-item video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: rgba(0, 0, 0, 0.05);
}

.carousel-controls {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 0.5rem;
  z-index: 10;
}

.carousel-btn {
  background: var(--control-bg);
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
  transition: background var(--transition-speed);
}

.carousel-btn:hover {
  background: var(--control-hover);
}

.carousel-btn svg {
  width: 20px;
  height: 20px;
  fill: var(--text-color);
}

.carousel-caption {
  margin-top: 1rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: capitalize;
  text-align: center;
  color: var(--text-color);
}

/* --- Layout 1: Grid (Masonry effect using CSS Columns or simple Grid) --- */
.layout-grid .gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

/* --- Layout 2: Horizontal Scroll --- */
.layout-horizontal {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.layout-horizontal .hero {
  padding: 3rem 2rem;
  flex-shrink: 0;
}

.layout-horizontal .gallery-container {
  display: flex;
  gap: 3rem;
  overflow-x: auto;
  padding: 2rem 4rem 4rem;
  margin: 0;
  max-width: none;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  flex-grow: 1;
}

/* Hide scrollbar for a cleaner look */
.layout-horizontal .gallery-container::-webkit-scrollbar {
  display: none;
}
.layout-horizontal .gallery-container {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

.layout-horizontal .carousel-wrapper {
  flex: 0 0 70vw; /* Takes up 70% of viewport width */
  max-width: 900px;
  min-width: 300px;
  scroll-snap-align: center;
}

/* --- Layout 3: Fullscreen Focused --- */
.layout-fullscreen {
  scroll-snap-type: y mandatory;
}

.layout-fullscreen .hero {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  scroll-snap-align: start;
}

.layout-fullscreen .gallery-container {
  padding: 0;
  max-width: none;
}

.layout-fullscreen .carousel-wrapper {
  height: 100vh;
  width: 100vw;
  border-radius: 0;
  padding: 0;
  scroll-snap-align: start;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.layout-fullscreen .carousel {
  width: 80vw;
  max-width: 1200px;
  height: 70vh;
  aspect-ratio: auto; /* let height dictate */
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  border-radius: var(--border-radius);
}

.layout-fullscreen .carousel-caption {
  font-size: 2rem;
  margin-top: 2rem;
  opacity: 0.9;
}
