:root {
  /* Dark defaults */
  --bg: #0b0d10;
  --surface: #111418;
  --surface-2: #171a20;
  --text: #e7eaee;
  --muted: #bdc5d1;
  --accent: #caa44a;      /* warm amber */
  --accent-2: #a27f2d;    /* darker amber */
  --ring: rgba(202, 164, 74, 0.35);
  --border: #21262d;
  --radius: 12px;
}

/* Theme variable overrides */
.theme-modern.theme-dark, html.theme-modern.theme-dark {
  --bg: #0b0d10;
  --surface: #111418;
  --surface-2: #171a20;
  --text: #e7eaee;
  --muted: #bdc5d1;
  --accent: #caa44a;
  --accent-2: #a27f2d;
  --ring: rgba(202, 164, 74, 0.35);
  --border: #21262d;
}
.theme-modern.theme-light, html.theme-modern.theme-light {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --text: #0b0d12;
  --muted: #364254; /* improved contrast */
  --accent: #996600; /* legacy brand tone */
  --accent-2: #7a5200;
  --ring: rgba(153, 102, 0, 0.25);
  --border: #e1e6ef;
}

/* Base */
body.theme-modern {
  background: linear-gradient(180deg, var(--bg), var(--surface-2) 30%, var(--bg) 100%);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html, body { height: 100%; }
.theme-modern, html.theme-modern, body.theme-modern { overflow-x: hidden; }
.wrapper { min-height: 100vh; display: flex; flex-direction: column; }
main.main-content { flex: 1 0 auto; }
.site-footer { margin-top: auto; }

/* Containers */
.container, .container-fluid {
  padding-left: 20px;
  padding-right: 20px;
}

/* Links */
body.theme-modern a {
  color: var(--accent);
  text-decoration: none;
  transition: color .18s ease, box-shadow .18s ease;
}
body.theme-modern a:hover {
  color: var(--accent-2);
  text-decoration: none;
}

/* Modern header */
.modern-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13, 16, 19, 0.6);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
  padding: max(10px, env(safe-area-inset-top)) 0 10px;
}
.theme-modern.theme-light .modern-header { background: rgba(255,255,255,0.7); }
.modern-header .row { position: relative; }
.modern-header .header-brand { position: absolute; left: 50%; transform: translateX(-50%); }
.modern-header .brand-link { text-align: center; gap: 8px; }
.modern-header .brand-logo { width: 28px; height: 28px; border-radius: 6px; }
.modern-header .brand-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: 10px;
}
.modern-header .brand-main {
  font-weight: 700;
  letter-spacing: 0.2px;
  color: var(--text);
}
.modern-header .brand-accent {
  color: var(--accent);
  font-weight: 600;
}

/* Menu button */
.btn-menu {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 8px;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.btn-menu span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 1px;
}
.btn-menu:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

/* User link icon color tweaks */
.user-link .fa-user-circle { color: var(--muted); }
.user-link:hover .fa-user-circle { color: var(--accent); }

/* Off-canvas menu */
.off-canvas-wrapper .off-canvas-content {
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  color: var(--text);
}
.off-canvas-wrapper .off-canvas-header {
  border-bottom: 1px solid var(--border);
}
.off-canvas-wrapper {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2000;
}
.off-canvas-wrapper .off-canvas-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  opacity: 0;
  transition: opacity .2s ease;
}
.off-canvas-wrapper .off-canvas-content {
  position: absolute;
  top: 0;
  right: 0;
  width: min(86vw, 360px);
  height: 100%;
  transform: translateX(100%);
  transition: transform .25s ease;
}
.off-canvas-wrapper.active { pointer-events: auto; }
.off-canvas-wrapper.active .off-canvas-overlay { opacity: 1; }
.off-canvas-wrapper.active .off-canvas-content { transform: translateX(0); }
body.fix { overflow: hidden; }
.asside-navigation-area { padding: 16px; }
.asside-navigation-area .asside-menu { list-style: none; padding-left: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.asside-navigation-area .asside-menu > li > a {
  display: block;
  padding: 12px 14px;
  color: var(--text);
  border-radius: 10px;
  font-weight: 500;
  letter-spacing: .2px;
}
.asside-navigation-area .asside-menu > li > a:hover {
  background: rgba(202, 164, 74, 0.15);
  color: var(--accent);
}

/* Cards (portfolio/blog) */
.single-portfolio .thumbnail img,
.post-item .thumb img {
  border-radius: var(--radius);
  width: 100%;
  height: auto !important;
  transition: transform .25s ease, filter .25s ease;
}
.single-portfolio .content,
.post-item .content {
  border-radius: 0 0 var(--radius) var(--radius);
}
.single-portfolio .thumbnail { position: relative; overflow: hidden; border-radius: var(--radius); }
.single-portfolio .thumbnail::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.25) 100%);
  opacity: 0; transition: opacity .25s ease; pointer-events: none;
}
.single-portfolio:hover .thumbnail img { transform: scale(1.03); }
.single-portfolio:hover .thumbnail::after { opacity: 1; }
.single-portfolio .thumbnail a { cursor: pointer; }
#gallery .single-portfolio .thumbnail a { cursor: zoom-in; }

/* Like button overlay */
.like-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(0,0,0,0.45);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
  transition: transform .18s ease, background .18s ease;
  z-index: 2;
}
.like-btn:hover { transform: translateY(-1px); background: rgba(0,0,0,0.6); }
.like-btn.liked { background: #e02424; color: #fff; border-color: #b71c1c; }

/* Sections spacing */
.home-slider-area,
.portfolio-area,
.blog-area { padding-top: 28px; padding-bottom: 28px; }

/* Hero (top section) */
.home-slider-area {
  padding-top: calc(16px + env(safe-area-inset-top));
  padding-bottom: 16px;
  background: linear-gradient(180deg, var(--surface), rgba(0,0,0,0));
  border-bottom: 1px solid var(--border);
  position: relative;
}
.theme-modern.theme-light .home-slider-area {
  background: linear-gradient(180deg, var(--surface), rgba(255,255,255,0));
}
.home-slider-area .slider-content-area { text-align: center; margin: 0 !important; padding: 4px 0; }
.home-slider-area h2 {
  margin: 0;
  font-weight: 700;
  letter-spacing: .2px;
}
.home-slider-area h2::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  margin: 8px auto 0;
  background: var(--accent);
  border-radius: 2px;
}
.home-slider-area h2 small {
  display: block;
  margin-top: 6px;
  font-size: .7em;
  font-weight: 400;
  color: var(--muted);
}
.home-slider-area .title, .home-slider-area p { margin-bottom: 0; }

/* Hero decorative shapes */
.home-slider-area::before {
  content: "";
  position: absolute;
  top: -140px; left: -140px;
  width: 600px; height: 600px;
  background:
    radial-gradient(closest-side, var(--accent) 0%, rgba(0,0,0,0) 80%);
  opacity: .18;
  filter: blur(0.2px);
  pointer-events: none;
}

.home-slider-area::after {
    content: "";
    position: absolute;
    bottom: -140px; right: -140px;
    width: 600px; height: 600px;
    background:
            radial-gradient(closest-side, var(--accent) 0%, rgba(0,0,0,0) 80%);
    opacity: .18;
    filter: blur(0.2px);
    pointer-events: none;
}

@media (max-width: 576px) {
  .home-slider-area::before { width: 340px; height: 340px; top: -120px; left: -160px; opacity: .14; }
  .home-slider-area::after { width: 260px; height: 260px; top: -80px; right: -120px; opacity: .18; }
}

/* Scroll to top */
.scroll-to-top {
    margin-left: auto;
    position: fixed;
    bottom: 16px;
    right: 16px;
    cursor: pointer;
    width: 42px; height: 42px;
    border-radius: 10px;
    background: linear-gradient(180deg, var(--surface), var(--surface-2));
    border: 1px solid var(--border);
    color: var(--text);
}
.scroll-to-top:hover { border-color: var(--accent); color: var(--accent); }

/* Forms */
input[type="text"], input[type="email"], input[type="password"], textarea, select {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--ring);
  border-color: var(--accent);
}

/* Buttons */
.btn, .btn-link, button, .button {
  border-radius: 10px;
}
.btn-warning, .btn.btn-warning { color: #0b0d10; }
.btn-warning:hover { filter: brightness(0.98); }
.btn-primary, .btn.btn-primary {
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  border-color: var(--accent-2);
}
.btn-primary:hover, .btn.btn-primary:hover { filter: brightness(1.05); }
.btn-outline-primary { border-color: var(--accent); color: var(--accent); }
.btn-outline-primary:hover { background: var(--accent); color: #0b0d10; }
.btn-link { color: var(--accent); }
.btn-link:hover { color: var(--accent-2); }

/* Subtle borders */
hr { border-top-color: var(--border) !important; opacity: .8; }

/* Typography tweaks */
h1, h2, h3, h4 { color: var(--text); letter-spacing: .2px; }
p { color: var(--muted); }

/* Utility */
.glass {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
}

@media (max-width: 576px) {
  .modern-header .brand-main { font-size: 1rem; }
  .modern-header .brand-accent { font-size: 1rem; }
}

/* Footer */
.site-footer {
  padding: 16px 16px;
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  border-top: 1px solid var(--border);
}
.site-footer .container-fluid { padding-left: 0; padding-right: 0; }
.site-footer small { color: var(--muted); }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  border-spacing: 0;
}
thead th {
  color: #c9d1d9;
  font-weight: 600;
  text-transform: none;
  border-bottom: 1px solid var(--border);
}
tbody td { border-top: 1px solid var(--border); color: var(--muted); }
tr:hover td { background: rgba(255,255,255,0.02); }

/* Tags */
a.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
}
a.tag.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(202, 164, 74, 0.15);
}

/* Filter menu links should be fully clickable */
.messonry-button a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
}
.messonry-button a .filter-text { line-height: 1.3; }

/* Portfolio grid spacing */
.portfolio-list {
  row-gap: 16px;
  --bs-gutter-x: 16px;
  --bs-gutter-y: 16px;
}
.portfolio-list .col.mb-30 { margin-bottom: 16px !important; }

/* About us */
.aboutus .aboutus-photo { width: 100%; height: auto; border-radius: var(--radius); display: block; }
.aboutus .row { align-items: flex-start; }

/* Disable AOS animations globally */
[data-aos] { opacity: 1 !important; transform: none !important; transition: none !important; }

/* Album page spacing: keep gaps equal via gutters */
#gallery .thumbnail { padding: 0; }

/* Album page images inherit natural aspect ratio */
#gallery .thumbnail img { width: 100%; height: auto; object-fit: contain; }

/* Theme Toggle */
.btn-theme {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface), var(--surface-2));
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-theme:hover { border-color: var(--accent); color: var(--accent); }
.btn-theme .icon-sun { display: none; }
.theme-modern.theme-light .btn-theme .icon-sun { display: inline-block; }
.theme-modern.theme-light .btn-theme .icon-moon { display: none; }

.event {
    font-size: 1rem;
}

@media only screen and (max-width: 991px) {
    .event a.lightbox {
        cursor: default;
    }
}

.event h3.title {
    font-size: 1.8rem;
    margin-top: .5rem;
    margin-bottom: .3rem;
}

.event div[title] {
    display: block;
    white-space: nowrap;
    overflow-x: hidden;
    text-overflow: ellipsis;
}

.pswp__custom-caption {
    background: black;
    font-size: 1.3rem;
    color: #fff;
    padding: 2rem;
    border-radius: 2rem;
    position: absolute;
    right: 2rem;
    bottom: 2rem;
//transform: translateX(-50%);
}
.pswp__custom-caption a {
    color: #fff;
    text-decoration: underline;
}
.hidden-caption-content {
    display: none;
}

.pswp__custom-caption h3.title {
    color: white;
    font-size: 2rem;
}