:root {
  --bg: #f7f7f7;
  --text: #333;
  --primary: #f27c2f;
  --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: var(--bg);
  color: var(--text);
}

/* === HERO SECTION === */
.hero {
  padding: 5rem 1rem;
  text-align: center;
}
.hero h1 {
  font-size: 2.8rem;
  margin-bottom: 1rem;
  color: var(--primary);
}
.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: #444;
}
.hero-buttons a {
  background: 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;
}

/* Overlay */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(114, 114, 114, 0.55);
  color: #fff;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  opacity: 1;
  text-align: center;
}

.overlay h3 {
  font-size: 1.4rem;
  font-weight: 700;
}

.overlay p {
  font-size: 1rem;
  word-break: break-all;
}

.overlay a {
  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-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-buttons {
  display: flex;
  justify-content: center;
}

.footer-buttons a {
  background: 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;
  width: fit-content;
}

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

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

footer a {
  color: #777;
}


/* === LOGIN PAGE === */
.login-body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 70px;
  height: 100vh;
  background: var(--bg);
}

.login-form {
  background: var(--light);
  padding: 30px 25px;
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.15);
  text-align: center;
  width: 320px;
}

.login-form h2 {
  font-size: 1.6rem;
  margin-bottom: 10px;
  color: var(--primary);
}

.login-form p {
  font-size: 0.95rem;
  margin-bottom: 20px;
  color: var(--text);
}

.login-form input {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
}

.login-form button {
  width: 100%;
  padding: 10px;
  background: var(--hero-btn-bg);
  color: var(--hero-btn-text);
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.login-form button + button {
  margin-top: 10px;
}

.login-form button:hover {
  background: var(--hero-btn-hover);
}

.password-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 15px;
}

.password-wrapper input {
  width: 100%;
  padding: 10px 40px 10px 12px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  background-color: var(--light);
  color: var(--text);
  box-sizing: border-box;
}

.password-wrapper .toggle-password {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-90%);
  background: none !important;
  border: none !important;
  box-shadow: none !important;
  width: auto !important;
  height: auto !important;
  padding: 0 !important;
  margin: 0 !important;
  color: #555;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.password-wrapper .toggle-password:hover {
  color: #000;
  transform: translateY(-90%) scale(1.1);
}

.login-form .error {
  color: red;
  margin-bottom: 10px;
}


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

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

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

  .hero h1 {
    color: var(--primary);
  }

  .hero p {
    color: #cfcfcf;
  }
  
  .hero-buttons a {
      color: var(--hero-btn-text);
  }

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

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

  .overlay h3 {
    color: #fff;
  }

  .overlay p {
    color: #ddd;
  }
  
  .overlay a {
      color: var(--overlay-btn-text);
  }

  .login-body {
    background: var(--bg);
  }

  .login-form {
    background-color: #1e1e1e;
    border: 1px solid #333;
  }

  .login-form h2 {
    color: var(--primary);
  }

  .login-form p {
    color: #bbb;
  }

  .login-form input {
    background-color: #121212;
    color: #fff;
    border: 1px solid #555;
  }

  .login-form button {
    background-color: var(--hero-btn-bg);
    color: var(--hero-btn-text);
  }
  
  .footer-buttons a {
    background: var(--hero-btn-bg);
    color: var(--hero-btn-text);
  }
}


/* === RESPONSIVE BREAKPOINTS === */
@media (max-width: 992px) {
  .hero h1 { font-size: 2.3rem; }
  .hero p { font-size: 1rem; }
  
  .hero-buttons a:hover {
    background-color: var(--hero-btn-bg);
  }

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

  .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);
  }

  .login-form button:hover {
    background: var(--hero-btn-bg);
  }
  
  .password-wrapper .toggle-password:hover {
    color: #000;
    transform: translateY(-90%) scale(1.0);
  }
  
  .footer-buttons a:hover {
    background-color: var(--hero-btn-bg);
  }
}

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