:root{
  /* Világos téma (default) */
  --bg2:#ffffff;
  --panel:#0e2d23;
  --stroke:rgba(184,149,106,.25);
  --text:#f3efe9;
  --muted:#cfc6bb;
  --accent:#af914b;
  --accent2:#8b7355;
  --accent-glow:rgba(184,149,106,.35);
  --shadow:0 12px 34px rgba(0,0,0,.40); 
  --r:16px;
  --header-h: 78px;
}

/* Sötét téma */
[data-theme="dark"]{
  --bg2:#0a1f1a;
  --panel:#0e2d23;
  --stroke:rgba(184,149,106,.25);
  --text:#f3efe9;
  --muted:#cfc6bb;
  --accent:#af914b;
  --accent2:#8b7355;
  --accent-glow:rgba(184,149,106,.35);
  --shadow:0 12px 34px rgba(0,0,0,.40);
}

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

html, body{
  height: 100%;
  margin: 0;
}

body{
  font-family: 'Cabin', sans-serif;
  background: var(--bg2);
  color: var(--text);
  line-height: 1.6;
  font-weight: 400;
   display: flex;
  flex-direction: column;
  min-height: 100vh;
  align-items: stretch;
}
main{
  flex: 1;
   width: 100%;
  min-width: 0; 
}
h1{
  
  font-family: 'Cormorant SC', serif;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  font-weight: 600;
  color: var(--accent);
  text-align:center;
  margin-bottom: 1.6rem;
}
h2{
  font-family: 'Cormorant SC', serif;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  font-weight: 600;
  color: var(--accent);
  text-align:center;
  margin-bottom: 1.6rem;
}
.page-anyagok h1{
   font-family: 'Cormorant SC', serif;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  font-weight: 600;
  color: var(--accent);
  text-align:center;
  margin-bottom: 1.6rem;
}
.page-wip h1{
   font-family: 'Cormorant SC', serif;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  font-weight: 600;
  color: var(--accent);
  text-align:center;
  margin-bottom: 1.6rem;
}
.page-portfolio h1{
   font-family: 'Cormorant SC', serif;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  font-weight: 600;
  color: var(--accent);
  text-align:center;
  margin-bottom: 1.6rem;
}
.page-rolunk h1{
  font-family: 'Cormorant SC', serif;
  font-size: clamp(1.7rem, 2.8vw, 2.4rem);
  font-weight: 600;
  color: var(--accent);
  text-align:center;
  margin-bottom: 1.6rem;
}

/* HEADER & NAV */
header{
  background: rgba(15, 15, 30, .95);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .3);
  min-height: var(--header-h);
}

nav{
  max-width: 1200px;
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.logo{
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Cormorant SC', serif;
  letter-spacing: .3px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  background-clip:text;
  user-select:none;
  white-space:nowrap;
  cursor:pointer;
  text-decoration: none;
}

.nav-links{
  list-style:none;
  display:flex;
  gap:1.2rem;
  flex-wrap:wrap;
  justify-content:flex-end;
}

.nav-links a{
  color: var(--text);
  text-decoration:none;
  font-weight: 600;
  opacity:.92;
  transition: color .2s ease, opacity .2s ease;
  display: block;
  padding: 0.5rem 0;
}

.nav-links a:hover{ color: var(--accent); opacity:1; }
.nav-links a.active{ color: var(--accent); opacity:1; }

/* BURGER MENU */
.nav-toggle{
  display: none;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.burger-icon{
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 28px;
}

.burger-line{
  width: 100%;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
  transition: all 0.3s ease;
}

.nav-toggle[aria-expanded="true"] .burger-line:nth-child(1){
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .burger-line:nth-child(2){
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .burger-line:nth-child(3){
  transform: translateY(-8px) rotate(-45deg);
}

.theme-toggle{
  background: none;
  border: 1px solid var(--stroke);
  border-radius: 999px;
  padding: .45rem .7rem;
  cursor: pointer;
  color: var(--accent);
  font-size: 1rem;
  display: flex;
  gap: .3rem;
  align-items: center;
}


/* CONTAINER */
.container{
  max-width:1200px;
  margin:0 auto;
  padding: 3.5rem 1.5rem;
}


.hero-wrapper{
  position: relative;
  width: 100%;
}

.hero-image{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background:center/cover no-repeat;
  z-index: 0;
}

.hero-overlay{
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.hero-wrapper h1{
  font-family: 'Cormorant SC', serif;
  font-size: clamp(2.2rem, 4.2vw, 3.9rem);
  font-weight: 400;
   line-height: 1.22;  
  letter-spacing: .04em;  
  margin-bottom: 1.5rem;
  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, .5);
  max-width: 900px;
   margin: 0 auto 1.5rem;
  text-align: center;
}

.hero-wrapper p{
  color: color-mix(in oklab, var(--text) 85%, white);
   font-size: clamp(1.1rem, 1.6vw, 1.45rem);
  max-width: 700px;
  margin: 0 auto 2rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}

.hero-cta{
  font-family: 'Cormorant SC', serif;
   color:var(--accent);
  font-size: clamp(1.9rem, 3.6vw, 2.8rem);
  font-weight: 600;
  margin-top: 1.2rem;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .5);
}


.page-hero{
  padding: 0;
  max-width: none;
}

.hero-wrapper.hero-full{
  position: relative;
  min-height: calc(100vh - var(--header-h) + 10rem);
  padding-bottom: 5rem;
  overflow: hidden;

}

.hero-wrapper.hero-full::before{
  content:"";
  position:absolute;
  inset:0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(10,15,20,.55),
    rgba(10,15,20,.75)
  );
}


/* Hero image crossfade with two layers */
.hero-wrapper.hero-full .hero-image{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  z-index:0;
  overflow:hidden;
}


.hero-wrapper.hero-full .hero-image .hero-slide{
  position:absolute;
  inset:0;
  background-size:cover;
  background-position:center;
  opacity:0;
  animation: heroFade 40s infinite; 
  will-change: opacity;
}


.hero-wrapper.hero-full .hero-image .s1{ background-image:url('../img/epo1.webp'); }
.hero-wrapper.hero-full .hero-image .s2{ background-image:url('../img/epo2.webp'); }
.hero-wrapper.hero-full .hero-image .s3{ background-image:url('../img/epo3.webp'); }
.hero-wrapper.hero-full .hero-image .s4{ background-image:url('../img/epo4.webp'); }


.hero-wrapper.hero-full .hero-image .s1{ animation-delay: 0s;  }
.hero-wrapper.hero-full .hero-image .s2{ animation-delay: 10s; }
.hero-wrapper.hero-full .hero-image .s3{ animation-delay: 20s; }
.hero-wrapper.hero-full .hero-image .s4{ animation-delay: 30s; }


@keyframes heroFade{
  0%   { opacity:0; }
  8%   { opacity:1; }
  25%  { opacity:1; }
  33%  { opacity:0; }
  100% { opacity:0; }
}

.hero-wrapper.hero-full .hero-overlay{
  flex: 1;
  align-items: center;
  text-align: center;
  padding: clamp(5rem, 12vh, 10rem) 1.5rem 18rem;
width: 100%;
}

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

.hero-cards{
  position: relative;
  z-index: 2;
  max-width: 1600px; 
  margin: -10rem auto 0;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.6rem;  
   align-items: stretch;
}

.hero-cards .card{
  background: var(--panel);
  min-height: 220px;
  display: flex;
  height: 100%;
  flex-direction: column;
  border: 1px solid var(--stroke);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  padding: 1.5rem; 
}

.hero-wrapper.hero-full .hero-overlay,
.hero-wrapper.hero-full .hero-cards{
  position: relative;
  z-index: 2;
}

/* TYPOGRAPHY */


.lead{
  text-align:center;
  max-width: 860px;
  margin: 0 auto 2.2rem;
  color: var(--accent);
  font-size: 1.15rem;
}

/* BUTTONS */
.btn{
  display:inline-block;
  padding: .95rem 1.6rem;
  border-radius: 999px;
  border:none;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color:#fff;
  font-weight: 700;
  cursor:pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  text-decoration:none;
  font-family: 'Cabin', sans-serif;
}

.btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 10px 30px var(--accent-glow);
}

/* GRID & CARDS */
.grid{
  display:grid;
  gap:1.6rem;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  align-items:start;
}
/* Kártya fejléc: cím + gomb */
.card-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

/* Részletek gomb */
.card-toggle{
  background: none;
  border: 0;
  font-family: 'Cabin', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
}

.card-toggle .chev{
  display: inline-block;
  transition: transform .25s ease;
}

/* Lenyíló részelek */
.card .details{
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease, opacity .25s ease;
  opacity: 0;
}
.page-anyagok .grid{
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem;
}
@media (max-width: 900px){
  .page-anyagok .grid{
    grid-template-columns: 1fr;
  }
}

/* Nyitott állapot */
.card.is-open .details{
  max-height: 2000px; 
  opacity: 1;
}

.card.is-open .card-toggle .chev{
  transform: rotate(180deg);
}
.card{
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  padding: 1.2rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .18);
  align-self:start;
}

.card.clickable{
  cursor:pointer;
  transition: transform .2s ease, box-shadow .2s ease;
}

.card.clickable:hover{
  transform: translateY(-4px);
  box-shadow: 0 10px 30px var(--accent-glow);
}

.card h2{
  color: var(--accent);
  margin-bottom: .6rem;
  font-size: 2rem;
  font-family: 'Cormorant SC', serif;
  font-weight: 500;
}

.card p{ color: var(--muted); }

/* WOOD CARD SPECIFIC STYLES */
.card-preview{
  margin-bottom: 0.8rem;
}

.card-preview h3{
  margin-bottom: 0.4rem;
}

.card-preview p{
  font-size: 0.95rem;
  margin-bottom: 0.8rem;
}

.card-preview img{
  width: 100%;
  height: 320px;                 
  object-fit: contain;
  border-radius: 8px;
  display: block;
 
}

/* DETAILS */
.page-anyagok .details{
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .35s ease, opacity .25s ease;
  margin-top: 1rem;
}

.page-anyagok .card.is-open .details{
  max-height: 2500px; /* sok kép/leírás miatt */
  opacity: 1;
}

.page-anyagok .card-toggle .chev{
  display: inline-block;
  transition: transform .25s ease;
}

.page-anyagok .card.is-open .card-toggle .chev{
  transform: rotate(180deg);
}

.details .gallery{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.details .gallery img{
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.details p{
  margin-bottom:.7rem;
  color: var(--text);
  opacity:.92;
  font-size: 1.1rem;
}

/* IMAGE MODAL */
.image-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.modal-content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
  z-index: 10000;
}

.modal-content img {
  max-width: 100%;
  max-height: 95vh;
  width: auto;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-close {
  position: absolute;
  top: -3rem;
  right: 0;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.5);
  color: white;
  font-size: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  line-height: 1;
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* PORTFOLIO */
.portfolio{
  width:100%;
  display:grid;
  gap:1.3rem;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.shot{
  width:100%; 
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  overflow:hidden;
  height: 280px;
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
}

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

.shot:hover img{ transform: scale(1.06); }

/* BADGE */
.badge{
  display:inline-block;
  padding:.35rem .8rem;
  border-radius:999px;
  background: rgba(184, 149, 106, .18);
  border: 1px solid rgba(184, 149, 106, .25);
  color: var(--text);
  font-size:.9rem;
  margin-bottom:.7rem;
}

/* ABOUT */
.about{
  max-width: 900px;
  margin: 0 auto;
  padding: 2.2rem;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: calc(var(--r) + 4px);
  box-shadow: var(--shadow);
}

.about p{
  margin-bottom: 1rem;
  color: var(--text);
  opacity:.92;
}

/* CONTACT FORM */
.contact-form{
  max-width: 600px;
  margin: 2rem auto;
  background: var(--panel);
  padding: 2rem;
  border-radius: var(--r);
  border: 1px solid var(--stroke);
}

.contact-form h3{
  color: var(--accent);
  margin-bottom: 1rem;
  text-align:center;
  font-family: 'Cormorant SC', serif;
  font-weight: 500;
}

.contact-form input,
.contact-form textarea{
  width:100%;
  padding: 1rem;
  margin-bottom: 1rem;
  background: rgba(255,255,255,.1);
  border: 1px solid var(--stroke);
  border-radius: 8px;
  color: var(--text);
  font-family: inherit;
}

.contact-form button{
  width:100%;
  padding: 1rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border:none;
  border-radius: 8px;
  color:#fff;
  font-weight: 700;
  cursor:pointer;
  transition: transform .3s;
}

.contact-form button:hover{ transform: translateY(-2px); }

/* FOOTER */
footer{
  text-align:center;
  padding: 1.8rem 1rem;
  background: rgba(15, 15, 30, .95);
  margin-top: auto; 
  color: var(--muted);
}

/* RESPONSIVE */



@media (max-width: 1100px){
  .hero-wrapper.hero-full .hero-overlay{
    padding-bottom: 22rem;
  }
  .hero-cards{
    grid-template-columns: repeat(2, 1fr);
    margin-top: -14rem;
  }
}

@media (min-width: 769px) {
  .hero-wrapper.hero-full .hero-image .hero-slide{
    animation: heroFade 40s infinite;
  }
  
  .hero-wrapper.hero-full .hero-image .s1{ animation-delay: 0s;  }
  .hero-wrapper.hero-full .hero-image .s2{ animation-delay: 10s; }
  .hero-wrapper.hero-full .hero-image .s3{ animation-delay: 20s; }
  .hero-wrapper.hero-full .hero-image .s4{ animation-delay: 30s; }
}

@media (max-width: 768px){
  .details .gallery{
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-wrapper.hero-full {
    min-height: 70vh; 
  }

  .hero-wrapper.hero-full .hero-image .hero-slide{
    animation: none !important;
    animation-delay: 0s !important;
    transition: none !important;
    will-change: auto !important;
  }


  .hero-wrapper.hero-full .hero-image .s1{
    opacity: 1 !important;
    display: block !important;
  }


  .hero-wrapper.hero-full .hero-image .s2,
  .hero-wrapper.hero-full .hero-image .s3,
  .hero-wrapper.hero-full .hero-image .s4{
    opacity: 0 !important;
    display: none !important;
    visibility: hidden !important;
  }
}


@media (prefers-reduced-motion: reduce){
  .hero-wrapper.hero-full .hero-image .hero-slide{
    animation: none !important;
    transition: none !important;
  }
  
  .hero-wrapper.hero-full .hero-image .s1{
    opacity: 1 !important;
  }
  
  .hero-wrapper.hero-full .hero-image .s2,
  .hero-wrapper.hero-full .hero-image .s3,
  .hero-wrapper.hero-full .hero-image .s4{
    display: none !important;
  }
}

@media (max-width: 660px){
  .nav-toggle{
    display: flex;
  }

  nav{
    position: relative;
  }

  .nav-links{
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    flex-direction: column;
    gap: 0;
    background: rgba(15, 15, 30, .98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, .3);
    padding: 1rem 1.5rem;
  }

  .nav-links.open{
    display: flex;
  }

  .nav-links a{
    padding: 0.8rem 0;
    border-bottom: 1px solid var(--stroke);
    font-size: 1.05rem;
  }

  .nav-links a:last-child{
    border-bottom: none;
  }
  
}

@media (max-width: 580px){
  
  .hero-cards{
    grid-template-columns: repeat(1, 1fr);
    margin-top: -14rem;
  }
  
  .grid{
    grid-template-columns: 1fr;
  }
  
  .details .gallery{
    grid-template-columns: 1fr;
  }
  
  .details .gallery img{
    height: 180px;
  }
}

/* Theme toggle: only show the icon of the CURRENT theme */
.theme-toggle .sun,.theme-toggle .moon{line-height:1;}
body[data-theme="dark"] .theme-toggle .sun{display:none;}
body:not([data-theme="dark"]) .theme-toggle .moon{display:none;}


/* WIP layout (image + video support) */
.wip-grid{
   columns: 2;column-gap: 1.6rem;
}

.wip-card{   display: inline-block;
  width: 100%;
  margin: 0 0 1.6rem;
  break-inside: avoid;

  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  padding: 1.4rem;
}

.wip-card h3{
  font-family:"Cormorant SC",serif;font-weight:600;letter-spacing:.2px;margin-bottom:.4rem;color: var(--accent);font-size: 2rem;
}
.wip-meta{margin-top:.75rem;color:var(--accent);font-size:.95rem;display:flex;gap:.75rem;flex-wrap:wrap;}
.wip-badge{border:1px solid var(--stroke);border-radius:999px;padding:.15rem .6rem;color:var(--accent);}
.wip-gallery{margin-top:1rem;display:grid;grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem;}
@media (max-width:520px){.wip-gallery{grid-template-columns:1fr;}}
@media (max-width: 900px){ .wip-grid{ columns: 1; } }
.wip-media{width:100%;border-radius:16px;border:1px solid var(--stroke);background:rgba(0,0,0,.2);overflow:hidden;}
.wip-media img{width:100%;height:360px;display:block;aspect-ratio: 4 / 3;object-fit: cover;}
.wip-media video{width:100%;height:360px;display:block;aspect-ratio: 4 / 3;object-fit: cover;}
.wip-caption{margin-top:.35rem;color:var(--accent);font-size:.9rem;}
.wip-card p{
  font-size: 1.1rem;      
  line-height: 1.7;
   margin-bottom: 1rem;
  color: color-mix(in oklab, var(--text) 92%, white);
}
.wip-gallery:has(.wip-media:only-child){
  grid-template-columns: 1fr;
}
.wip-gallery:has(.wip-media:only-child) .wip-media{
  width: 100%;
}
.wip-gallery:has(.wip-media:only-child) .wip-media img,
.wip-gallery:has(.wip-media:only-child) .wip-media video{
  height: 520px;          
}

/* =====================================================
   ADMIN 
   ===================================================== */

body.admin{
  background:#ffffff;
  color:#333;
}

/* Admin wrapper */
body.admin .admin-wrap,
body.admin .wrap{
  max-width: 1200px;
  margin: 5rem auto 3rem;
  padding: 0 1.5rem;
  background: #ffffff;
}

/* Topbar */
body.admin .topbar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:1rem;
  flex-wrap:wrap;
  margin-bottom:2rem;
  padding-bottom:1rem;
  border-bottom:2px solid #b8956a;
}
body.admin .topbar h1{
  font-family:'Cormorant SC', serif;
  color:#af914b;
  margin:0;
}
body.admin .topbar .subtext{
  color:#8b7355;
  font-size:.95rem;
}
body.admin .topbar a{
  color:#af914b;
  text-decoration:none;
  font-weight:600;
}
body.admin .topbar a:hover{ opacity:.7; }

/* Admin dashboard grid */
body.admin .admin-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 1.3rem;
  margin-top: 1.5rem;
}
@media (max-width: 980px){
  body.admin .admin-grid{ grid-template-columns: repeat(2, minmax(260px, 1fr)); }
}
@media (max-width: 640px){
  body.admin .admin-grid{ grid-template-columns: 1fr; }
}

body.admin .admin-card{
  background:#ffffff;
  border:2px solid #b8956a;
  border-radius:16px;
  padding:1.5rem;
  box-shadow:0 4px 12px rgba(184,149,106,.15);
  transition: transform .2s ease, box-shadow .2s ease;
}
body.admin .admin-card:hover{
  transform: translateY(-4px);
  box-shadow:0 8px 24px rgba(184,149,106,.25);
}
body.admin .admin-card h3{
  font-family:'Cormorant SC', serif;
  color:#af914b;
  margin-bottom:.8rem;
  font-size:1.4rem;
  font-weight:600;
}
body.admin .admin-card p{
  color:#8b7355;
  margin-bottom:1rem;
  line-height:1.5;
}
body.admin .admin-card a{
  display:inline-block;
  margin-top:.6rem;
  color:#af914b;
  text-decoration:none;
  font-weight:600;
}
body.admin .admin-card a:hover{ opacity:.7; }

/* Login wrapper */
body.admin .login-wrap{
  max-width: 100%;
  width: min(520px, calc(100% - 3rem));
  margin: 6rem auto;
  padding: 2rem;
  background:#ffffff;
  border:2px solid #b8956a;
  border-radius:16px;
  box-shadow:0 8px 24px rgba(184,149,106,.2);
}
body.admin.login-page{
  min-height: 100vh;
  display: grid;
  place-items: center;
}

body.admin .login-wrap h1{
  font-family:'Cormorant SC', serif;
  color:#af914b;
  margin-bottom:.8rem;
  font-size:2rem;
}
body.admin .login-wrap .subtext{
  color:#8b7355;
  margin-bottom:1.5rem;
}

/* Form fields */
body.admin .field{
  display:flex;
  flex-direction:column;
  gap:.4rem;
  margin: 1.2rem 0;
}
body.admin .field label{
  color:#af914b;
  font-weight:600;
  font-size:.95rem;
}

body.admin input[type="text"],
body.admin input[type="password"],
body.admin input[type="number"],
body.admin input[type="email"],
body.admin textarea,
body.admin select{
  width:100%;
  padding:.75rem .9rem;
  border-radius:12px;
  border:2px solid #b8956a;
  background:#ffffff;
  color:#333;
  font-family:'Cabin', sans-serif;
  font-size:1rem;
}
body.admin textarea{
  min-height:120px;
  resize:vertical;
  line-height:1.5;
}
body.admin input[type="text"]:focus,
body.admin input[type="password"]:focus,
body.admin input[type="number"]:focus,
body.admin input[type="email"]:focus,
body.admin textarea:focus,
body.admin select:focus{
  outline:none;
  border-color:#af914b;
  box-shadow:0 0 0 3px rgba(184,149,106,.1);
}

/* File input */
body.admin input[type="file"]{
  color:#333;
  font-size:.9rem;
}
body.admin input[type="file"]::file-selector-button{
  padding:.5rem 1rem;
  border-radius:8px;
  border:2px solid #b8956a;
  background: rgba(184,149,106,.1);
  color:#af914b;
  cursor:pointer;
  margin-right:.8rem;
  font-family:'Cabin', sans-serif;
  font-weight:600;
}
body.admin input[type="file"]::file-selector-button:hover{
  background: rgba(184,149,106,.2);
}

/* Buttons */
body.admin .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:.75rem 1.4rem;
  border-radius:999px;
  border:2px solid #b8956a;
  background: linear-gradient(135deg, #af914b, #8b7355);
  color:#fff;
  font-weight:700;
  cursor:pointer;
  transition: transform .2s ease, box-shadow .2s ease;
  font-family:'Cabin', sans-serif;
  font-size:.95rem;
}
body.admin .btn:hover{
  transform: translateY(-2px);
  box-shadow:0 6px 20px rgba(184,149,106,.35);
}
body.admin .btn.danger{
  background:#fff;
  color:#d32f2f;
  border-color:#d32f2f;
}
body.admin .btn.danger:hover{
  background:#ffebee;
  box-shadow:0 6px 20px rgba(211,47,47,.25);
}

/* Messages */
body.admin .err, body.admin .error{
  color:#c62828;
  background:#ffebee;
  padding:.75rem 1rem;
  border-radius:8px;
  margin-top:1rem;
  border:2px solid #ef5350;
}
body.admin .msg, body.admin .notice{
  color:#af914b;
  background: rgba(184,149,106,.1);
  padding:.75rem 1rem;
  border-radius:8px;
  margin:1rem 0;
  border:2px solid #b8956a;
}

/* Layout helpers */
body.admin .row{
  display:flex;
  gap:.75rem;
  flex-wrap:wrap;
  align-items:flex-start;
}


body.admin .card{
  background:#ffffff;
  border:2px solid #b8956a;
  border-radius:16px;
  padding:1.2rem;
  box-shadow:0 4px 12px rgba(184,149,106,.12);
  margin-bottom:1rem;
}
body.admin .card h3,
body.admin .card h4{
  font-family:'Cormorant SC', serif;
  color:#af914b;
  margin-bottom:.8rem;
  font-weight:600;
  font-size:20px;
}
body.admin .card label{
  color:#af914b;
  font-weight:600;
  font-size:.95rem;
  display:block;
  margin-bottom:.3rem;
}

/* Thumbs + mini */
body.admin .thumb{
  width:100%;
  border-radius:12px;
  border:2px solid #b8956a;
  display:block;
  margin-top:.5rem;
  object-fit:cover;
  background:#f5f5f5;
}
body.admin img.thumb{
  display: block;
  width: 100%;
  max-width: 100%;
  height: 500px;       
  object-fit: cover;   
  border-radius: 14px;
}
body.admin .mini{
  font-size:.9rem;
  color:#8b7355;
  margin-top:.3rem;
}

body.admin .preview-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.2rem;
  align-items: start;
}

body.admin .preview-item{
  border: 2px solid #b8956a;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(184,149,106,.12);
  overflow: hidden;           
}

  body.admin .preview-item img{
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    background: transparent;
  }
  body.admin .preview-item video{
    display: block;
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: center;
    background: transparent;
  }
  body.admin .btn.small{
    padding: .4rem .9rem;
    font-size: .85rem;
  }
  body.admin .material-gallery{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  @media (max-width: 720px){
    body.admin .material-gallery{ grid-template-columns: 1fr; }
  }

  /* Compact media list for WIP */
  body.admin .preview-grid.compact{
    grid-template-columns: 1fr;
    gap: .8rem;
  }
  @media (min-width: 720px){
    body.admin .preview-grid.compact{
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
  body.admin .preview-grid.compact .preview-item img,
  body.admin .preview-grid.compact .preview-item video{
    height: 140px;
  }
  body.admin .preview-grid.compact .preview-controls{
    padding: .5rem .7rem;
  }
body.admin .upload-preview{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-top: .8rem;
}

body.admin .upload-preview img,
body.admin .upload-preview video{
  width: 100%;
  height: 180px;
  display: block;
  object-fit: cover;
  border-radius: 12px;
  border: 2px solid #b8956a;
  background: #f5f5f5;
}
body.admin .preview-controls{
  padding: .75rem .9rem;
  border-top: 2px solid #b8956a;
  display: flex;
  gap: .6rem;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}
body.admin .preview-controls input[type="number"]{
  width: 64px;
  min-width: 64px;
  text-align: center;
  padding: .45rem .4rem;
}
/* Admin gallery */
body.admin .gal{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:.8rem;
  margin-top:1rem;
}
body.admin .gal img{
  width:100%;
  height:140px;
  object-fit:cover;
  border-radius:8px;
  border:2px solid #b8956a;
}
body.admin .gal .mini{
  margin-top:.4rem;
  text-align:center;
}


  body.admin .grid{
    display:grid;
    gap:1.3rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items:start;
  }
  @media (max-width: 900px){
    body.admin .grid{ grid-template-columns: 1fr; }
  }

/* Checkbox */
body.admin input[type="checkbox"]{
  width:auto;
  cursor:pointer;
  accent-color:#af914b;
}
body.admin label:has(input[type="checkbox"]){
  display:flex;
  align-items:center;
  gap:.5rem;
  cursor:pointer;
  color:#af914b;
  font-weight:600;
}

/* HR */
body.admin hr{
  margin:1.5rem 0;
  border:0;
  border-top:2px solid #b8956a;
}

/* Responsive */
@media (max-width: 768px){
  body.admin .gal{ grid-template-columns: repeat(2, 1fr); }
  body.admin .topbar{ flex-direction:column; align-items:flex-start; }
  body.admin .grid{ grid-template-columns: 1fr; }
}
@media (max-width: 520px){
  body.admin .gal{ grid-template-columns: 1fr; }
  body.admin .row{ flex-direction: column; }
  body.admin .row > *{ width: 100%; }
}

.page-wip .wip-timeline{
  position:relative;
  display:grid;
  gap:1.6rem;
  margin-top: 1.8rem;
}

.page-wip .wip-timeline::before{
  content:"";
  position:absolute;
  left: 18px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--stroke);
  opacity: .9;
}

.page-wip .wip-post{
  position:relative;
  display:grid;
  grid-template-columns: 40px 1fr;
  gap: 1rem;
  align-items:start;
}

.page-wip .wip-dot{
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 6px rgba(184,149,106,.20);
  margin-top: 12px;
  justify-self:center;
}

.page-wip .wip-box{
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 1.1rem;
  box-shadow: var(--shadow);
}

.page-wip .wip-hero{
  margin-top: .7rem;
  border-radius: 16px;
  overflow:hidden;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
}

.page-wip .wip-hero img,
.page-wip .wip-hero video{
  width:100%;
  height: 340px;
  display:block;
  object-fit: cover;
}

.page-wip .wip-text{
  margin: .9rem 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.page-wip .wip-strip{
  display:grid;
  gap:.8rem;
  margin-top: .9rem;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
}

.page-wip .wip-mini{
  position:relative;
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,.06);
}

.page-wip .wip-mini img,
.page-wip .wip-mini video{
  width:100%;
  height: 110px;
  display:block;
  object-fit: cover;
}

.page-wip .wip-mini .badge{
  position:absolute;
  left:.5rem;
  top:.5rem;
  font-size:.72rem;
  padding:.15rem .45rem;
  border-radius: 999px;
  background: rgba(0,0,0,.55);
  color:#fff;
}
.page-wip .wip-projects{
  display:grid;
  gap: 1.2rem;
  margin-top: 1.4rem;
  grid-template-columns: 1fr;
}

@media (min-width: 900px){
  .page-wip .wip-projects{
    grid-template-columns: repeat(3, 1fr);
  }
}

.page-wip .wip-project-card{
  display:block;
  text-decoration:none;
  background: var(--panel);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 1.2rem;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease;
}

.page-wip .wip-project-card:hover{
  transform: translateY(-2px);
}

.page-wip .wip-project-title{
  font-family: "Cormorant SC", serif;
  font-size: 1.35rem;
  color: var(--accent);
  margin-bottom: .35rem;
  font-weight: 600;
  color: var(--accent);
}

.page-wip .wip-project-meta{
  color: var(--muted);
  margin-bottom: .8rem;
}

.page-wip .wip-project-cta{
  color: var(--accent);
  font-weight: 700;
}

.page-wip .wip-back a{
  color: var(--accent);
  text-decoration:none;
}
.page-wip .wip-back a:hover{ text-decoration: underline; }
