
/* FONT */
@font-face {
  font-family: 'cmono';
  src: url('./font/cmono.woff2') format('woff2');
} 

.gallery-wrapper{
    border: 1px solid #ccc;
    background-color:rgba(255, 255, 255, 0.8);
    border-radius: 0px;
    padding: 16px;
    margin: 16px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* soft shadow */
}

/* LOGO AND STYLING */
.logo {
  max-width: 300px;
  max-height: 100px;
  height: auto;
  display: flex;
  margin: 0 auto;
  justify-content: center;
  align-items: center;
}

#page-logo {
  transition: transform 0.3s ease;
  transform-origin: center;
}

@media (max-width: 600px) {
  #page-logo {
    max-width: 250px;
  }
}

:root {
  --header-height: 180px;
}

#igisza-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;

  display: flex;
  flex-direction: column;
  align-items: center;

  padding: 20px 0;

  background: transparent;
  transition: all 0.3s ease;

   gap: 8px;
}


/* Scrolled state */
#igisza-header.scrolled {
  background:white;
  padding-bottom: 0;
 
  
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

/* Logo animation */
#page-logo {
  transition: transform 0.3s ease, max-height 0.3s ease;
  transform-origin: center;
}

/* Smaller logo when scrolled */
#igisza-header.scrolled #page-logo {
  transform: scale(0.70);
}

/* ——— GENERAL ——— */
* {
    box-sizing: border-box;
}

/* ——— GRID LAYOUT ——— */
.illustration-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 40px 10px 20px 10px;  /* 40px top, 20px bottom */
    gap: 20px;                      /* spacing between columns */
}

/* Each column now has a max width so images never get huge */
.illustration-column {
    flex: 1 1 280px;
    max-width: 400px;
}

/* ——— RESPONSIVE ——— */
@media screen and (max-width: 800px) {
    .illustration-column {
        flex: 1 1 45%;
        max-width: 45%;
    }
}

@media screen and (max-width: 600px) {
    .illustration-column {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

/* ——— ILLUSTRATION + CAPTION ——— */
.illustration-container {
    position: relative;
    width: 100%;
    max-width: 320px; /* keeps illustrations from becoming huge */
    margin: 0 auto;
    font-family: 'cmono';
    margin-bottom: 20px; /* space between images */
}

.illustration-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    box-shadow: 0 6px 15px rgba(0,0,0,0.12);
    transition: 0.3s ease;
    cursor: zoom-in;
}

/* Hover caption */
.illustration-caption {
    position: absolute;
    bottom: 0;
    width: 100%;
    background: rgba(255,255,255,0.9);
    padding: 20px;
    font-size: 18px;
    color: #000;
    border-radius: 0 0 6px 6px;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.illustration-container:hover .illustration-caption {
    opacity: 1;
}

/* =========================
   ILLUSTRATION MODAL
========================= */
#illustration-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    padding: 30px;
    background: rgba(20, 20, 20, 0.82);
    align-items: center;
    justify-content: center;
}

/* =========================
   MODAL WINDOW
========================= */
#illustration-modal-content {
    position: relative;
    width: min(1050px, 92vw);
    max-height: 90vh;
    display: grid;
    grid-template-columns: 0.75fr 1.25fr;
    gap: 55px;
    padding: 55px;
    box-sizing: border-box;
    background: #f4f1e8;
    overflow: auto;
}

/* =========================
   CLOSE BUTTON
========================= */
#illustration-modal-close {
    position: absolute;
    top: 16px;
    right: 20px;
    width: 35px;
    height: 35px;
    padding: 0;
    border: none;
    background: transparent;
    font-family: 'cmono', monospace;
    font-size: 27px;
    font-weight: 400;
    line-height: 1;
    color: #222;
    cursor: pointer;
    z-index: 10;
}

#illustration-modal-close:hover {
    opacity: 0.45;
}

/* =========================
   INFORMATION
========================= */
#illustration-modal-info {
    display: flex;
    align-items: center;
    min-width: 0;
}
.illustration-modal-meta {
    display: flex;
    flex-direction: column;
    gap: 25px;
    width: 100%;
}
.illustration-modal-meta > div {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* LABEL */
.illustration-modal-meta span {
    font-family: 'cmono', monospace;
    font-size: 14px;
    letter-spacing: 0.12em;
    color: #888;
}

/* VALUE */
.illustration-modal-meta strong {
    font-family: 'cmono', monospace;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.5;
    color: #222;
    overflow-wrap: anywhere;
}

/* =========================
   IMAGE
   ========================= */
#illustration-modal-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 0;
}
#illustration-modal-image img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(90vh - 110px);
    object-fit: contain;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 700px) {
    #illustration-modal {
        padding: 12px;
        align-items: center;
    }
    #illustration-modal-content {
        width: 100%;
        max-height: 94vh;
        display: flex;
        flex-direction: column;
        gap: 25px;
        padding: 45px 20px 25px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* IMAGE FIRST */
    #illustration-modal-image {
        order: 1;
        width: 100%;
        flex: 0 0 auto;
    }
    #illustration-modal-image img {
        width: 100%;
        height: auto;
        max-width: 100%;
        max-height: 55vh;
        object-fit: contain;
    }

    /* TEXT SECOND */
    #illustration-modal-info {
        order: 2;
        width: 100%;
        flex: 0 0 auto;
        align-items: flex-start;
    }
    .illustration-modal-meta {
        gap: 20px;
    }
    .illustration-modal-meta > div {
        gap: 5px;
    }
    .illustration-modal-meta span {
        font-size: 9px;
    }
    .illustration-modal-meta strong {
        font-size: 12px;
        line-height: 1.5;
    }

    /* CLOSE */
    #illustration-modal-close {
        top: 10px;
        right: 12px;
    }
}

/* =========================
   ILLUSTRATION MODAL ZOOM LENS
========================= */
.illustration-zoom-lens {
    position: fixed;

    width: 160px;
    height: 160px;

    border-radius: 50%;

    border: 2px solid rgba(255,255,255,0.7);

    box-shadow:
        0 8px 20px rgba(0,0,0,0.35);

    pointer-events: none;

    display: none;

    z-index: 999999;

    background-repeat: no-repeat;
}

/* ——— FOOTER ——— */
.footer {
    width: 100%;
    background: #fffdfd;
    border-top: 1px solid #ccc;
    text-align: center;
    padding: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-family: 'cmono';
    font-size: 20px;
}

/* Scroll to Top button */
#scrollTopBtn {
    display: none;             /* hidden by default */
    position: fixed;           /* fixed position on screen */
    bottom: 30px;              /* distance from bottom */
    right: 30px;               /* distance from right */
    width: 60px;               /* button size */
    height: 60px;
    cursor: pointer;
    z-index: 1000;             /* make sure it's on top */
    transition: transform 0.3s ease;
}

#scrollTopBtn:hover {
    transform: scale(1.1);     /* small hover animation */
}

.loading {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  font-size: 20px;
  font-family: 'cmono';
  opacity: 0;
  transform: translateY(10px);
  transition: 0.6s ease;
}
.loading.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.loading.active .dots span {
  animation: blink 1.4s infinite both;
}
.dots {
  display: inline-flex;
  gap: 4px;
  margin-left: 6px;
}
/* dot base */
.dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #000;
  opacity: 0.2;
  transform: scale(0.8);
}

/* animation only when active */
.loading.active .dots span {
  animation: signalPulse 1.2s infinite ease-in-out;
}

.loading:not(.active) .dots span {
  animation-play-state: paused;
}
/* stagger effect */
.loading.active .dots span:nth-child(1) {
  animation-delay: 0s;
}
.loading.active .dots span:nth-child(2) {
  animation-delay: 0.2s;
}
.loading.active .dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes signalPulse {
  0%, 100% {
    opacity: 0.2;
    transform: scale(0.8);
  }
  50% {
    opacity: 1;
    transform: scale(1.3);
  }
}

 /* Scroll to BOTTOM button */
.scroll-bottom {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 80px;
  height: 80px;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: 1000;
  transition: transform 0.2s ease;
}

.scroll-bottom:hover {
  transform: scale(1.1);
}

.scroll-bottom img {
  width: 100%;
  height: 100%;
}

a,
button,
[role="button"],
input,
select,
textarea,
summary,
label,
.clickable,
.read-more-btn,
.prev,
.next,
.demo {
  cursor: url("pickaxe2.png"), pointer;
}

/* thumbnails → can zoom in */
.illustration-img {
  cursor: url("zoom-point.png"), zoom-in;
}

/* modal background */
#illustration-modal {
  cursor: default;
}

/* zoomed image → can zoom out */
#modal-img {
  cursor: url("zoom-point.png"), zoom-out;
}

/* entire modal keeps custom pointer */
#illustration-modal {
  cursor: url("pickaxe2.png"), pointer;
}

/* =========================================================================================================
                                         GEOLOGICAL FIELD NOTES
   ========================================================================================================*/
/* ————— FLOATING TAB ————— */
.fieldnotes-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 900;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 10px 12px 13px;
    background: rgba(255,255,255,0.95);
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 6px 0 0 6px;
    font-family: 'cmono';
    font-size: 16px;
    color: #222;
    writing-mode: vertical-rl;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    cursor: url("pickaxe2.png"), pointer;
    transition:
        background 0.2s ease,
        padding 0.2s ease;
}
.fieldnotes-tab:hover {
    background: #f2f2f2;
    padding-right: 14px;
}
.fieldnotes-icon {
    font-size: 21px;
    line-height: 1;
}

/* ————— MODAL ————— */
.fieldnotes-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    background: rgba(0,0,0,0.55);
    padding: 30px;
    box-sizing: border-box;
}
.fieldnotes-modal.open {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ————— WINDOW ————— */
.fieldnotes-window {
    position: relative;
    width: min(1450px, 96vw);
    height: min(900px, 92vh);
    display: flex;
    background: #eeeae2;
    border: 1px solid #aaa;
    border-radius: 6px;
    box-shadow:
        0 15px 45px rgba(0,0,0,0.3);
    overflow: hidden;
}
/* ————— TITLE ————— */
.fieldnotes-title {
    position: absolute;
    top: 18px;
    left: 155px;
    z-index: 40;
    font-family: 'cmono';
    font-size: 26px;
    color: #222;
    pointer-events: none;
}

/* ————— CLOSE ————— */
.fieldnotes-close {
    position: absolute;
    top: 12px;
    right: 15px;
    z-index: 50;
    width: 38px;
    height: 38px;
    border: none;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    font-family: Arial, sans-serif;
    font-size: 27px;
    line-height: 1;
    cursor: url("pickaxe2.png"), pointer;
    box-shadow:
        0 2px 8px rgba(0,0,0,0.12);
}
.fieldnotes-close:hover {
    background: #fff;
}

/* ————— THUMBNAILS ————— */
.fieldnotes-thumbnails {
    flex: 0 0 125px;
    padding: 55px 15px 20px;
    box-sizing: border-box;
    background: #e4e0d8;
    border-right: 1px solid #ccc;
    overflow-y: auto;
}
.fieldnotes-thumb-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.fieldnotes-thumb {
    position: relative;
    width: 95px;
    padding: 4px;
    border: 1px solid #bbb;
    background: #fff;
    cursor: url("pickaxe2.png"), pointer;
    opacity: 0.65;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        border-color 0.2s ease;
}
.fieldnotes-thumb:hover {
    opacity: 1;
    transform: translateY(-2px);
}
.fieldnotes-thumb.active {
    opacity: 1;
    border: 2px solid #222;
}
.fieldnotes-thumb img {
    display: block;
    width: 100%;
    height: 110px;
    object-fit: cover;
}
.fieldnotes-thumb-number {
    display: block;
    padding-top: 4px;
    font-family: 'cmono';
    font-size: 14px;
    text-align: center;
}

/* ————— BOOK AREA ————— */
.fieldnotes-book-area {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 55px 70px 45px;
    box-sizing: border-box;
}

/* ————— BOOK ————— */
.fieldnotes-book {
    position: relative;
    display: flex;
    width: min(1050px, 100%);
    height: min(700px, 78vh);
    background: #fdfcf8;
    box-shadow:
        0 8px 25px rgba(0,0,0,0.2),
        0 2px 5px rgba(0,0,0,0.12);
    perspective: 1800px;
}

/* ————— STATIC PAGES ————— */
.fieldnotes-page {
    position: relative;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    background: #fffef9;
    box-sizing: border-box;
    transition: opacity 0.28s ease;
}
.fieldnotes-page-left {
    border-right: 1px solid #ddd;
    box-shadow:
        inset -8px 0 12px -12px rgba(0,0,0,0.5);
}
.fieldnotes-page-right {
    box-shadow:
        inset 8px 0 12px -12px rgba(0,0,0,0.5);
}
.fieldnotes-page img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 25px;
    box-sizing: border-box;
}
.fieldnotes-book.changing-spread .fieldnotes-page {
    opacity: 0.92;
}

/* ————— PAGE NUMBERS ————— */
.fieldnotes-page-number {
    position: absolute;
    bottom: 12px;
    font-family: 'cmono';
    font-size: 14px;
    color: #777;
}
.fieldnotes-page-left .fieldnotes-page-number {
    left: 20px;
}
.fieldnotes-page-right .fieldnotes-page-number {
    right: 20px;
}

/* ————— PAGE CAPTIONS ————— */
.fieldnotes-page-caption {
    position: absolute;
    left: 20px;
    right: 20px;
    bottom: 10px;
    font-family: 'cmono';
    font-size: 15px;
    text-align: center;
    pointer-events: none;
}

/* ————— REAL PAGE TURN ————— */
.fieldnotes-flip-layer {
    position: absolute;
    top: 0;
    width: 50%;
    height: 100%;
    z-index: 30;
    pointer-events: none;
    perspective: 1800px;
}
.fieldnotes-flip-layer.flip-next {
    right: 0;
}
.fieldnotes-flip-layer.flip-prev {
    left: 0;
}
.fieldnotes-flip-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}
.fieldnotes-flip-face {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #fffef9;
    box-sizing: border-box;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.fieldnotes-flip-face img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 25px;
    box-sizing: border-box;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}
.fieldnotes-flip-front {
    z-index: 2;
}
.fieldnotes-flip-back {
    transform: rotateY(180deg);
}
.fieldnotes-flip-back img {
    transform: rotateY(180deg);
}

/* NEXT */
.fieldnotes-flip-layer.flip-next
.fieldnotes-flip-inner {
    transform-origin: left center;
}
.fieldnotes-flip-layer.flip-next.turning
.fieldnotes-flip-inner {
    animation:
        fieldnotesTurnNext 0.75s ease-in-out forwards;
}
@keyframes fieldnotesTurnNext {
    0% {
        transform: rotateY(0deg);
    }
    45% {
        transform: rotateY(-90deg);
    }
    100% {
        transform: rotateY(-180deg);
    }
}

/* PREVIOUS */
.fieldnotes-flip-layer.flip-prev
.fieldnotes-flip-inner {
    transform-origin: right center;
}
.fieldnotes-flip-layer.flip-prev.turning
.fieldnotes-flip-inner {
    animation:
        fieldnotesTurnPrev 0.75s ease-in-out forwards;
}
@keyframes fieldnotesTurnPrev {
    0% {
        transform: rotateY(0deg);
    }
    45% {
        transform: rotateY(90deg);
    }
    100% {
        transform: rotateY(180deg);
    }
}

/* ————— NAVIGATION ————— */
.fieldnotes-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
    width: 45px;
    height: 65px;
    border: none;
    background: rgba(255,255,255,0.85);
    font-family: Arial, sans-serif;
    font-size: 42px;
    color: #333;
    cursor: url("pickaxe2.png"), pointer;
    border-radius: 4px;
    box-shadow:
        0 2px 8px rgba(0,0,0,0.12);
    transition:
        background 0.2s ease,
        opacity 0.2s ease;
}
.fieldnotes-nav:hover {
    background: #fff;
}
.fieldnotes-prev {
    left: 18px;
}
.fieldnotes-next {
    right: 18px;
}

/* ————— COUNTER ————— */
.fieldnotes-counter {
    display: none;
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'cmono';
    font-size: 15px;
    color: #555;
}

/* =========================================================
   MOBILE
   ========================================================= */
@media (max-width: 700px) {
    .fieldnotes-modal {
        padding: 10px;
    }
    .fieldnotes-window {
        width: 100%;
        height: 96vh;
        display: flex;
        flex-direction: column;
    }
    .fieldnotes-title {
        top: 14px;
        left: 18px;
        font-size: 22px;
    }
    /* thumbnails underneath */
    .fieldnotes-thumbnails {
        order: 2;
        flex: 0 0 95px;
        width: 100%;
        height: 95px;
        padding: 8px 12px;
        border-right: none;
        border-top: 1px solid #ccc;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .fieldnotes-thumb-list {
        flex-direction: row;
        gap: 9px;
    }
    .fieldnotes-thumb {
        flex: 0 0 58px;
        width: 58px;
    }
    .fieldnotes-thumb img {
        height: 58px;
    }
    .fieldnotes-thumb-number {
        font-size: 12px;
    }
    /* book */
    .fieldnotes-book-area {
        order: 1;
        width: 100%;
        padding: 45px 35px 40px;
    }
    .fieldnotes-book {
        width: 100%;
        height: min(72vh, 650px);
        display: block;
    }
    /* one page */
    .fieldnotes-page-left {
        display: none;
    }
    .fieldnotes-page-right {
        display: block;
        width: 100%;
        height: 100%;
        border: none;
        box-shadow: none;
    }
    .fieldnotes-page img {
        padding: 15px;
    }
    /* mobile flip */
    .fieldnotes-flip-layer {
        width: 100%;
        height: 100%;
    }
    .fieldnotes-flip-layer.flip-next,
    .fieldnotes-flip-layer.flip-prev {
        left: 0;
        right: auto;
    }
    .fieldnotes-flip-face img {
        padding: 15px;
    }
    .fieldnotes-prev {
        left: 5px;
    }
    .fieldnotes-next {
        right: 5px;
    }
    .fieldnotes-counter {
        display: block;
    }
    .fieldnotes-tab {
        font-size: 14px;
        padding:
            10px 8px 10px 10px;
    }
}

 /* FORCE TOP NAV COLOURS ON ILLUSTRATIONS PAGE */
.topnav a {
    background-color: transparent !important;
    color: #000 !important;
}
.topnav a:hover {
    background-color: #9dcafe !important;
    color: #000 !important;
}
.topnav a.active,
.topnav a.active:hover {
    background-color: #62aafc !important;
    color: #000 !important;
}