/*
Theme Name: Nepalud Custom
Theme URI: https://example.com/
Author: Nepalud
Description: Standalone theme — home slider, gallery + lightbox, contact form. Copy or zip this folder into any site’s wp-content/themes.
Version: 1.4.6
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nepalud-custom
*/

:root {
  --color-bg: #0f1419;
  --color-surface: #1a2332;
  --color-text: #e8eef5;
  --color-muted: #8b9cb3;
  --color-accent: #3d8bfd;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --space: 1.25rem;
  --max-width: 720px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--color-text);
  background: radial-gradient(ellipse 120% 80% at 50% -20%, #1e3a5f 0%, var(--color-bg) 55%);
}

a {
  color: var(--color-accent);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
}

.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  padding: var(--space) calc(var(--space) * 1.5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(26, 35, 50, 0.85);
  backdrop-filter: blur(8px);
}

.site-header .inner {
  max-width: calc(var(--max-width) + 4rem);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space);
  flex-wrap: wrap;
}

.site-title {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.site-title a {
  color: inherit;
}

.site-description {
  margin: 0.25rem 0 0;
  font-size: 0.85rem;
  color: var(--color-muted);
}

.site-main {
  flex: 1;
  padding: calc(var(--space) * 2) calc(var(--space) * 1.5);
}

.site-main .inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.post,
.page {
  background: var(--color-surface);
  border-radius: 12px;
  padding: calc(var(--space) * 1.5);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.entry-title {
  margin: 0 0 var(--space);
  font-size: 1.75rem;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.entry-meta {
  margin: 0 0 var(--space);
  font-size: 0.875rem;
  color: var(--color-muted);
}

.entry-content :first-child {
  margin-top: 0;
}

.entry-content :last-child {
  margin-bottom: 0;
}

.site-footer {
  padding: var(--space) calc(var(--space) * 1.5);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-muted);
}

.pagination {
  margin-top: calc(var(--space) * 2);
  display: flex;
  justify-content: center;
  gap: var(--space);
  flex-wrap: wrap;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  background: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--color-text);
}

.pagination .page-numbers.current {
  background: rgba(61, 139, 253, 0.25);
  border-color: rgba(61, 139, 253, 0.45);
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ----- Home: full-height slider + top-right menu ----- */
body.home,
body.gallery-hero-layout {
  background: #0b0f14;
  color: var(--color-text);
}

.hero-overlay-header {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 50;
  padding: calc(var(--space) * 1.1) calc(var(--space) * 2);
  pointer-events: none;
}

.hero-overlay-nav {
  pointer-events: auto;
}

.hero-menu,
.inner-menu,
.footer-menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: flex-end;
}

.hero-menu a {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
}

.hero-menu a:hover,
.hero-menu a:focus,
.hero-menu .current-menu-item > a {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.hero-slider {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.25s ease-in-out;
  z-index: 0;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-slide--placeholder {
  background: linear-gradient(160deg, #1a3a52 0%, #0f1419 45%, #152238 100%);
}

.hero-slide__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(6, 12, 20, 0.35) 0%,
    rgba(6, 12, 20, 0.15) 40%,
    rgba(6, 12, 20, 0.55) 100%
  );
  pointer-events: none;
}

.hero-slider__empty-msg {
  position: absolute;
  left: 50%;
  top: 62%;
  transform: translateX(-50%);
  max-width: 22rem;
  padding: 1rem 1.25rem;
  margin: 0;
  text-align: center;
  font-size: 0.9rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(0, 0, 0, 0.35);
  border-radius: 10px;
  z-index: 5;
}

.hero-slider__empty-msg a {
  color: #b8d9ff;
}

.hero-slider__headline {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  pointer-events: none;
}

.hero-slider__title {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 2.75rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: none;
  color: #fff;
  text-align: center;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.45);
}

.hero-slider__nav {
  position: absolute;
  inset: 0;
  z-index: 25;
  pointer-events: none;
}

.hero-slider__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: auto;
  width: 3rem;
  height: 3.5rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.hero-slider__btn:hover,
.hero-slider__btn:focus-visible {
  background: rgba(61, 139, 253, 0.45);
  outline: none;
}

.hero-slider__btn--prev {
  left: max(0.75rem, env(safe-area-inset-left));
}

.hero-slider__btn--next {
  right: max(0.75rem, env(safe-area-inset-right));
}

.hero-slider__dots {
  position: absolute;
  left: 50%;
  bottom: max(1.75rem, env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 25;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  pointer-events: auto;
}

.hero-slider__dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.65);
  border-radius: 50%;
  background: transparent;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.hero-slider__dot:hover,
.hero-slider__dot:focus-visible {
  outline: none;
  border-color: #fff;
  background: rgba(255, 255, 255, 0.35);
}

.hero-slider__dot.is-active {
  background: #fff;
  border-color: #fff;
  transform: scale(1.25);
}

@media (max-width: 640px) {
  .hero-slider__btn {
    width: 2.5rem;
    height: 3rem;
    font-size: 1.5rem;
  }

  .hero-slider__btn--prev {
    left: 0.35rem;
  }

  .hero-slider__btn--next {
    right: 0.35rem;
  }

  .hero-slider__dots {
    bottom: 1.25rem;
    gap: 0.4rem;
  }
}

/* Interior pages */
body:not(.home) .site-header--inner {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 20, 26, 0.92);
  backdrop-filter: blur(10px);
}

.inner--header {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem calc(var(--space) * 1.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space);
  flex-wrap: wrap;
}

.site-title--compact {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.site-title--compact a {
  color: var(--color-text);
  text-decoration: none;
}

.inner-menu a {
  color: rgba(232, 238, 245, 0.92);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.inner-menu a:hover,
.inner-menu .current-menu-item > a {
  color: var(--color-accent);
}

.site-main--inner,
.site-main--gallery {
  padding-top: calc(var(--space) * 1.5);
  padding-bottom: calc(var(--space) * 2.5);
}

.site-main--gallery {
  padding-top: calc(var(--space) * 2);
}

/* Gallery page: hero band under overlay menu */
.page-hero--gallery {
  position: relative;
  min-height: 52vh;
  min-height: 52dvh;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.page-hero--placeholder {
  background: linear-gradient(160deg, #1a3a52 0%, #0f1419 45%, #152238 100%);
}

.page-hero__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(6, 12, 20, 0.35) 0%,
    rgba(6, 12, 20, 0.2) 45%,
    rgba(6, 12, 20, 0.65) 100%
  );
  pointer-events: none;
}

.page-hero__inner {
  position: relative;
  z-index: 2;
  padding: 4rem 1.5rem 3rem;
  text-align: center;
  pointer-events: none;
}

.page-hero__title {
  margin: 0;
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #fff;
  text-shadow: 0 4px 28px rgba(0, 0, 0, 0.5);
}

.entry-content--gallery-intro {
  margin-bottom: calc(var(--space) * 1.25);
}

.gallery-page {
  flex: 1;
}

/* Wider content column than default .site-main .inner (720px); beats .inner--wide specificity on this page */
.gallery-page .site-main .inner.inner--wide {
  max-width: min(96vw, 1440px);
}

/* Lightbox */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 4rem;
}

.gallery-lightbox[hidden] {
  display: none !important;
}

.gallery-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 8, 12, 0.92);
  z-index: 0;
  cursor: zoom-out;
}

.gallery-lightbox__shell {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: min(96vw, 1440px);
  min-height: 0;
}

.gallery-lightbox__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  max-height: min(92vh, 100%);
  gap: 0.75rem;
}

.gallery-lightbox__img {
  position: relative;
  z-index: 2;
  max-width: 100%;
  width: auto;
  height: auto;
  max-height: min(78vh, 900px);
  max-height: min(78dvh, 900px);
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.gallery-lightbox__meta {
  flex-shrink: 0;
  max-width: 36rem;
  padding: 0 0.75rem;
  text-align: center;
  color: rgba(232, 238, 245, 0.95);
}

.gallery-lightbox__meta[hidden] {
  display: none !important;
}

.gallery-lightbox__heading {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
}

.gallery-lightbox__text {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(232, 238, 245, 0.78);
}

.gallery-lightbox__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 4;
  width: 2.75rem;
  height: 2.75rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.gallery-lightbox__close:hover,
.gallery-lightbox__close:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  outline: none;
}

.gallery-lightbox__prev,
.gallery-lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 3rem;
  height: 3.5rem;
  border: none;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.gallery-lightbox__prev {
  left: 0.75rem;
}

.gallery-lightbox__next {
  right: 0.75rem;
}

.gallery-lightbox__prev:hover,
.gallery-lightbox__next:hover,
.gallery-lightbox__prev:focus-visible,
.gallery-lightbox__next:focus-visible {
  background: rgba(61, 139, 253, 0.45);
  outline: none;
}

.gallery-lightbox--single .gallery-lightbox__prev,
.gallery-lightbox--single .gallery-lightbox__next {
  display: none;
}

@media (max-width: 640px) {
  .gallery-lightbox {
    padding: 1rem 3rem;
  }

  .gallery-lightbox__prev {
    left: 0.25rem;
  }

  .gallery-lightbox__next {
    right: 0.25rem;
  }
}

.inner--wide {
  max-width: 1200px;
  margin: 0 auto;
}

.page-inner {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

.entry-content--prose {
  margin-bottom: calc(var(--space) * 1.5);
}

/* Gallery page — card grid */
.gallery-view {
  margin: 2rem 0 0;
}

.gallery-view__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem;
}

@media (min-width: 560px) {
  .gallery-view__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .gallery-view__grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.gallery-view__cell {
  margin: 0;
}

.gallery-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.35);
  border-color: rgba(61, 139, 253, 0.35);
}

.gallery-card__open {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: none;
  background: #0d1218;
  cursor: zoom-in;
  text-align: left;
}

.gallery-card__open:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
}

.gallery-card__media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.gallery-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-card__overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    to top,
    rgba(5, 10, 16, 0.75) 0%,
    rgba(5, 10, 16, 0.2) 45%,
    rgba(5, 10, 16, 0.35) 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-card__overlay,
.gallery-card__open:focus-visible .gallery-card__overlay {
  opacity: 1;
}

.gallery-card:hover .gallery-card__img,
.gallery-card__open:focus-visible .gallery-card__img {
  transform: scale(1.06);
}

.gallery-card__overlay-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  color: #fff;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.5);
}

.gallery-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: rgba(61, 139, 253, 0.35);
  position: relative;
}

.gallery-card__icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  margin: -11px 0 0 -11px;
  border: 2px solid #fff;
  border-radius: 2px;
}

.gallery-card__cta {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gallery-card__footer {
  padding: 0.85rem 1rem 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.gallery-card__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--color-text);
}

.gallery-card__excerpt {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--color-muted);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-grid__hint {
  margin-top: 1rem;
  color: var(--color-muted);
  font-size: 0.9rem;
}

.gallery-grid__hint--muted {
  text-align: center;
  padding: 2rem 1rem;
}

/* Contact */
.contact-notice {
  padding: 0.85rem 1rem;
  border-radius: 8px;
  margin-bottom: 1.25rem;
}

.contact-notice--success {
  background: rgba(46, 160, 67, 0.2);
  border: 1px solid rgba(46, 160, 67, 0.45);
  color: #b8e6c1;
}

.contact-notice--error {
  background: rgba(200, 80, 80, 0.18);
  border: 1px solid rgba(220, 100, 100, 0.4);
  color: #f0b4b4;
}

.contact-form__field label {
  display: block;
  font-size: 0.875rem;
  margin-bottom: 0.35rem;
  color: var(--color-muted);
}

.contact-form__field input,
.contact-form__field textarea {
  width: 100%;
  max-width: 36rem;
  padding: 0.65rem 0.75rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(26, 35, 50, 0.85);
  color: var(--color-text);
  font: inherit;
}

.contact-form__field input:focus,
.contact-form__field textarea:focus {
  outline: 2px solid rgba(61, 139, 253, 0.5);
  outline-offset: 1px;
}

.contact-form__actions {
  margin-top: 1rem;
}

.contact-form__btn {
  display: inline-flex;
  align-items: center;
  padding: 0.65rem 1.4rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  background: var(--color-accent);
  color: #fff;
}

.contact-form__btn:hover {
  filter: brightness(1.08);
}

/* Footer (home + interior) */
.site-footer {
  padding: calc(var(--space) * 1.75) calc(var(--space) * 1.5);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 11, 16, 0.92);
}

.site-footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  text-align: center;
}

.site-footer__nav {
  margin-bottom: 0.75rem;
}

.site-footer__nav .footer-menu {
  justify-content: center;
  gap: 1.25rem 2rem;
}

.footer-menu a {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.footer-menu a:hover,
.footer-menu .current-menu-item > a {
  color: var(--color-text);
}

.site-footer__copy {
  margin: 0;
  font-size: 0.82rem;
  color: rgba(139, 156, 179, 0.75);
}
