:root {
  --primary: #f27c2f;
  --bg: #f7f7f7;
  --text: #333;
  --light: #fff;
  --overlay-btn-bg: var(--light);
  --overlay-btn-text: var(--primary);
  --overlay-btn-hover: #fce5d4;
  --hero-btn-bg: var(--primary);
  --hero-btn-text: var(--light);
  --hero-btn-hover: #ff9d59;
}

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

body {
  font-family: "Segoe UI", Tahoma, sans-serif;
  background-color: var(--bg);
  color: var(--text);
}

/* === HERO SECTION === */
.hero {
  background: linear-gradient(180deg, #ffffff, #f0f0f0);
  padding: 5rem 1rem;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  line-height: 1.2;
  color: var(--primary);
}

.hero p {
  font-size: 1.2rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  color: #444;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-buttons a {
  background-color: var(--hero-btn-bg);
  color: var(--hero-btn-text);
  padding: 0.7rem 1.4rem;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s;
}

.hero-buttons a:hover {
  background-color: var(--hero-btn-hover);
}

/* === GALLERY GRID === */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: 1400px;
  margin: 4rem auto;
  padding: 0 1rem;
  justify-items: center;
}

.gallery-item {
  position: relative;
  width: 100%;
  max-width: 480px;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
}

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

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

/* Overlay */
.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(3px);
  color: #fff;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 600ms cubic-bezier(.2,.8,.2,1),
              transform 600ms cubic-bezier(.2,.8,.2,1);
}

.gallery-item:hover .overlay {
  opacity: 1;
  transform: translateY(0);
}

.overlay h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.3rem;
}

.overlay p {
  font-size: 1rem;
  line-height: 1.4;
  color: #eaeaea;
}

.overlay a {
  align-self: flex-start;
  display: inline-block;
  text-decoration: none;
  background: var(--overlay-btn-bg);
  color: var(--overlay-btn-text);
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  font-size: 1rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(0,0,0,0.28);
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.overlay a:hover,
.overlay a:focus {
  transform: translateY(-3px);
  background: var(--overlay-btn-hover);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
  outline: none;
}

/* === FOOTER === */
footer {
  text-align: center;
  font-size: 0.85rem;
  color: #777;
  padding: 1rem;
  margin-top: 1rem;
}

/* === DARK MODE === */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;
    --text: #eaeaea;
    --primary: #ff9d59;
    --light: #ffffff;
    --overlay-btn-bg: var(--primary);
    --overlay-btn-text: var(--light);
    --overlay-btn-hover: #ff7e24;
    --hero-btn-bg: var(--primary);
    --hero-btn-text: var(--light);
    --hero-btn-hover: #ff7724;
  }

  body {
    background-color: var(--bg);
    color: var(--text);
  }

  .hero {
    background: linear-gradient(180deg, #1c1c1c, #121212);
  }

  .hero p {
    color: #cfcfcf;
  }

  .gallery-item {
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.6);
  }

  .overlay {
    background: rgba(0, 0, 0, 0.7);
  }

  .overlay p {
    color: #ddd;
  }
}

/* === RESPONSIVE BREAKPOINTS === */

/* Tablet & Mobile shared */
@media (max-width: 992px) {
  .hero h1 { font-size: 2.3rem; }
  .hero p { font-size: 1rem; }

  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-item:hover img { transform: none; }

  .gallery-item .overlay {
    position: absolute;
    inset: 0;
    opacity: 1;
    background: rgba(0, 0, 0, 0.5);
    transform: none;
    transition: none;
    backdrop-filter: blur(1px);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .overlay a {
    align-self: center;
  }

  .overlay a:hover,
  .overlay a:focus {
    background-color: var(--overlay-btn-bg);
    transform: none;
    box-shadow: 0 10px 24px rgba(0,0,0,0.28);
  }
}

/* Mobile only */
@media (max-width: 600px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 0.95rem; }
  .hero-buttons a {
    font-size: 0.9rem;
    padding: 0.6rem 1rem;
  }
}