
/* =========================
   BASE
========================= */

body {
  margin: 0;
  font-family: 'Instrument Serif', serif;
  background-color: #9a9386;
}

/* =========================
   HEADER
========================= */

.site-header {
  width: 5%;
  background: #fff;
  color: black;
}

.back-arrow {
  display: inline-block;
  text-decoration: none;
  color: black;
  background-color: #9a9386;
}

/* =========================
   MAIN LAYOUT
========================= */

.main-wrapper {
  display: flex;
  min-height: calc(100vh - 68px);
}

/* =========================
   SIDEBAR
========================= */

.sidebar {
  flex: 0 0 200px;
  background: #408080;
  padding: 1rem;
  text-align: center;
}

.sidebar .profile img {
  width: 100%;
  max-width: 150px;
  height: auto;
  border-radius: 8px;
}

/* =========================
   CONTENT
========================= */

.content {
  flex: 1;
  padding: 2rem;
}

/* =========================
   WRITING ITEM (FIXED GRID CORE)
========================= */

.writing-item {
  display: flex;
  align-items: center;
  background: #408080;
  border-radius: 6px;
  padding: 1rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,.08);
}

/* =========================
   WRITING THUMB (IMAGE + PDF SAFE BOX)
========================= */

.writing-item .thumb {
  flex: 0 0 120px;
  width: 120px;
  height: 120px;

  display: flex;
  justify-content: center;
  align-items: center;

  overflow: hidden;
  border-radius: 6px;
}

/* IMAGE inside writing */
.writing-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 6px;
}

/* =========================
   PDF THUMB (BULLETPROOF BOX)
========================= */

.writing-item .pdf-thumb {
  width: 120px;
  height: 120px;
  flex: 0 0 120px;

  display: grid;
  place-items: center;

  border: 2px dashed #ccc;
  border-radius: 6px;

  overflow: hidden;
  background: transparent;
}

/* PDF cover image */
.writing-item .pdf-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* fallback icon/text */
.writing-item .pdf-thumb div {
  text-align: center;
  font-size: 0.85rem;
}

/* =========================
   LINKS
========================= */

.writing-item a {
  margin-left: 0.75rem;
  color: black;
  text-decoration: none;
}

/* =========================
   GALLERY (CAD / PHOTO / DRAWINGS)
========================= */

.thumb img,
.pdf-thumb img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
  display: block;
  cursor: pointer;
  transition: 0.2s ease;
}

.thumb img:hover {
  transform: scale(1.02);
}

/* =========================
   PDF CARD (OUTSIDE WRITINGS)
========================= */

.pdf-thumb {
  padding: 20px;
  border: 2px dashed #ccc;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  transition: 0.2s;
}

.pdf-thumb:hover {
  background: #f5f5f5;
}

/* =========================
   LIGHTBOX (NO STRETCH GUARANTEE)
========================= */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);

  display: flex;
  justify-content: center;
  align-items: center;

  z-index: 9999;
  overflow: hidden;
}

.lightbox img {
  max-width: 90vw;
  max-height: 90vh;

  width: auto;
  height: auto;

  object-fit: contain;
  display: block;
  border-radius: 6px;
}

.content a {
    text-decoration: none;
    color: rgb(255, 255, 255);
    padding: 1px;
    border-radius: 5px;
    transition: background-color 0.3s; /* Áttűnés a háttérszín változásakor */
}

.content a:hover {
    background-color: #e2be20; /* Világosabb szín hover állapotban */


/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

  .main-wrapper {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    flex: 0 0 auto;
  }

  .content {
    padding: 1rem;
  }

  .writing-item {
    flex-direction: column;
    text-align: center;
  }

  .writing-item .thumb,
  .writing-item .pdf-thumb {
    flex: none;
    width: x;
    height: 160px;
    margin-bottom: 1rem;
  }

  .writing-item a {
    margin-left: 0;
    margin-top: 0.5rem;
  }
}