html, body {
  height: 100%;
  overflow-y: auto;
}

body::-webkit-scrollbar { display: none; }

body { scrollbar-width: none; -ms-overflow-style: none; }



.main-content {
 position: relative;
 z-index: 20;  
 /* 🔥 FLUID PADDING: Matches navbar div-bar padding */
 padding-top: clamp(100px, 15vw, 175px);
 padding-left: clamp(40px, 5vw, 80px);
 padding-right: clamp(40px, 5vw, 80px);
 padding-bottom: clamp(40px, 8vw, 80px); /* Make bottom padding fluid too */
 box-sizing: border-box;
 min-height: 100vh;
}

/* stacked blocks container - make gap fluid */
.content-wrapper {
 display: flex;
 flex-direction: column;
 gap: 64px; 
}

/* 12-column grid for blocks - make gap fluid */
.block {
 display: grid;
 grid-template-columns: repeat(12, minmax(0, 1fr));
 gap: clamp(6px, 1vw, 12px); /* 🔥 FLUID GAP */
 align-items: start;
 padding-top: 0px;
}

/* column helpers */
.col-1 { grid-column: 1 / span 3; }
.col-5 { grid-column: 5 / span 5; }
.slideshow-column { grid-column: 10 / span 3; }

/* paragraph / text */
.text, .block p, p {
  font-family: "Montserrat";
  font-weight: 400;
  font-size: clamp(14px, 1.2vw, 18px);
  text-transform: none;
  line-height: 1.5;
  width: 100%;
  max-width:100%;
  box-sizing: border-box;
  color: inherit;
  white-space: normal;
  margin: 0;
  /* 🔥 ADDED: Justification and Hyphenation for Desktop/Global */
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto; /* Webkit browser support */
}


.text:not(:first-child) { padding-bottom: 20px; }

/* headings */
.block h2, h2 {
  margin: 0;
  font-size: clamp(18px, 1.5vw, 22px);
  line-height: 20px;
  color:inherit;
  font-weight: 400;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-family: "Aboreto", cursive;
}

/* projects list */
.projects-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  row-gap: 10px;
  align-items: center;
}

/* project anchors visuals */
.projects-list a {
  display: inline-block;
  text-decoration: none;
  color:inherit;
  font-size: clamp(14px, 1.2vw, 18px);
  line-height: 20px;
  transition: color .18s ease, transform .18s ease;
  white-space: normal;
  font-family: "Montserrat", system-ui, sans-serif;
  font-weight: 400;
}

/* hover/focus feedback */
.projects-list a:hover,
.projects-list a:focus {
  color: rgb(40,40,40);
  transform: translateX(-4px);
  outline: none;
}


/* accessibility focus ring */
.projects-list a:focus {
  box-shadow: 0 0 0 3px rgba(30,0,255,0.12);
  border-radius: 2px;
}

/* ensure nav & block elements sit above canvas */
.navbar, .main-content, .block { position: relative; z-index: 2; }


/* ----------------------------------------------------------
   Final: Side slideshow column (Corrected)
   ---------------------------------------------------------- */

.slideshow-column {
 grid-column: 10 / span 3;
 justify-self: end;
 align-self: start;
 position: relative;
 z-index: 2;
 padding-left: 0;
}

/* container — no padding, no shadow, no background, fixed height */
.slideshow-side {
 width: 100%;
 box-sizing: border-box;
 background: transparent;
 border-radius: 0;
 overflow: visible;  /* let wide images extend left */
 display: block;
 padding: 0;
 box-shadow: none;
}

/* placeholder text (kept minimal) */
.slideshow-side .slideshow-empty {
 color: rgba(0,0,0,0.45);
 font-size: 13px;
 text-align: center;
 padding: 0;
 margin: 0;
 line-height: 1.2;
}

/* viewport holds stacked images; allow overflow */
.slideshow-viewport {
 position: relative;
 display: block;
 overflow: visible;  /* allow overflow to left */
 background: transparent;
 line-height:0; 
}

/* images anchored to right, centered vertically, full height, auto width */
.slideshow-viewport img {
 position: absolute;
 right: 0; /* anchor to right edge so it expands left */
 top:0;
 
 
 width: 100%; 
height:auto; 
 
 opacity: 0;
 transition: opacity 600ms ease;
 object-fit: contain; /* just in case; image sized by height */
 pointer-events: none;
 user-select: none;
 display: block;
 border-radius: 3px;
}

/* visible image */
.slideshow-viewport img.visible {
  position:relative; 
 opacity: 1;
}

.text.small-note {
    /* Sets the desired small size (15px) for desktop */
    font-size: 15px; 
    
    /* Ensure no unwanted spacing is added below it */
    padding-bottom: 0 !important; 
    margin-bottom: 0;
}


/* ==========================================================
   MOBILE STYLES (applies to informaije.html structure)
   ========================================================== */
@media screen and (max-width: 767px) {

    /* ----------------------------------------------------
       1. MAIN CONTENT PADDING AND SCROLL
       ---------------------------------------------------- */

    .main-content {
        /* Align with the mobile navbar's 10px padding */
        padding-left: 10px;
        padding-right: 10px;
        /* Reduce top padding from 175px (desktop) to 80px */
        padding-top: 80px;
        padding-bottom: 40px; /* Adjust bottom padding */
        
        /* Ensure vertical scrolling is allowed (from previous fix) */
        overflow-y: auto;
    }

    /* Reduce gap between the main sections (Biography, Statement, etc.) */
    .content-wrapper {
        gap: 80px; /* Reduced from 64px */
    }

    /* ----------------------------------------------------
       2. BLOCK GRID STACKING (FROM 3 COLUMNS TO 1)
       ---------------------------------------------------- */
    .block {
        /* Revert to simple vertical block flow */
        display: block; 
        gap: 0; /* No grid gap needed */
        padding-top: 0;
    }

    /* All columns now take full width and stack */
    .col {
        grid-column: 1 / span 12 !important; /* Force full width override */
    }

    /* 🔥 Slideshow column must be hidden on mobile */
    .slideshow-column {
        display: none;
    }


    /* ----------------------------------------------------
       3. TEXT STYLING (Headers & Paragraphs)
       ---------------------------------------------------- */
    
    /* Headings (BIOGRAFIJA, UMJETNIČKA IZJAVA, etc.) */
    .block h2, h2 {
        font-size: 16px; /* Reduced from 20px */
        line-height: 1.2;
        margin-bottom: 12px; /* Space under the heading */
    }

    /* Paragraph/Text Content */
    .text, .block p, p {
        font-size: 12px; /* Reduced from 18px for mobile reading */
        line-height: 1.5;
        width: auto; /* Remove fixed desktop width (802px) */
        max-width: 100%;
        padding-bottom: 0; /* Reset bottom padding before applying mobile spacing */
         text-align: justify;
        hyphens: auto;
        -webkit-hyphens: auto; 
    }

    .text.small-note {
        font-size: 10px; /* 12px - 2px = 10px */
        line-height: 1.4;
        /* Ensure minimal bottom spacing */
        padding-bottom: 0 !important; 
        margin-bottom: 0;
    }
    
    /* Paragraph Spacing for mobile */
    .block p {
        margin-bottom: 15px; /* Use consistent bottom margin for separation */
    }
    .text:not(:first-child) { 
        padding-bottom: 0; /* Remove old desktop padding logic */
    }
    .block p.cv {
        padding-bottom: 0px !important; /* Ensure separation for biography paragraphs */
    }
    

    /* ----------------------------------------------------
       4. PROJECTS/EXHIBITIONS LIST (Simplification)
       ---------------------------------------------------- */
    .projects-list {
        /* Allow the list items to stack cleanly */
        grid-auto-rows: auto; 
        row-gap: 8px; /* Tighter row spacing */
    }
    
    .projects-list a {
        font-size: 12px; /* Reduced size */
        line-height: 1.4;
        white-space: normal; /* Allow text to wrap if the exhibition name is long */
        padding-left: 0; 
    }
    
    /* Remove hover effect on mobile (less useful on touchscreens) */
    .projects-list a:hover,
    .projects-list a:focus {
        transform: none;
        color: black;
    }
    
}