/* =========================================================
   TANDARA — CONTENT FOR THE EIGHT MAIN SUBPAGES

   Shared content-only styles for the Croatian and English
   versions of the eight main subpages.

   This file contains no site shell or navigation styles.
   The left column and page layout are provided exclusively by:
   - css/site-shell.css
   - js/site-shell.js
   ========================================================= */

:root {
  --subpage-card-background: #f3dfbd;
  --subpage-text: #3b2f22;
  --subpage-heading: #4a3b2a;
  --subpage-soft-border: rgba(80, 60, 35, 0.25);
  --subpage-font: Georgia, "Times New Roman", serif;
}

.content-page,
.content-page * {
  box-sizing: border-box;
}


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

.content-page {
  display: flex;
  align-items: flex-start;
  justify-content: stretch;

  width: 100%;
  min-width: 0;

  margin: 0;
  padding: 8px 12px 30px;

  background: var(--content-background, #e7c191);
  color: var(--subpage-text);

  font-family: var(--shell-font, var(--subpage-font));
}

.content-card {
  width: 100%;
  max-width: none;
  min-width: 0;

  margin: 0;
  padding: 38px 52px;

  background: var(--subpage-card-background);
  color: var(--subpage-text);

  border: 1px solid var(--subpage-soft-border);
  border-radius: 12px;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);

  overflow-x: hidden;
}

.content-card h1 {
  margin: 0 0 34px;

  text-align: center;

  font-size: 34px;
  line-height: 1.25;

  color: var(--subpage-text);
}

.content-card h2 {
  margin: 0 0 14px;

  font-size: 23px;
  line-height: 1.3;

  color: var(--subpage-heading);
}

.content-card h3 {
  color: var(--subpage-heading);
}

.content-card section {
  margin-bottom: 34px;
  padding-bottom: 26px;

  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.content-card section:last-child {
  margin-bottom: 0;
  padding-bottom: 0;

  border-bottom: 0;
}

.content-card p {
  margin: 0 0 14px;

  font-size: 18px;
  line-height: 1.65;

  text-align: justify;
}

.content-card ul,
.content-card ol {
  margin: 8px 0 18px 28px;
  padding: 0;
}

.content-card li {
  margin-bottom: 6px;

  font-size: 18px;
  line-height: 1.55;
}

.content-card h1,
.content-card h2,
.content-card h3,
.content-card p,
.content-card li,
.content-card a,
.content-card strong,
.content-card em {
  max-width: 100%;

  white-space: normal;
  overflow-wrap: anywhere;
}

.content-card img,
.content-card video,
.content-card iframe,
.content-card table,
.content-card pre {
  max-width: 100%;
}

.content-card img,
.content-card video {
  height: auto;
}

.content-card table {
  display: block;

  overflow-x: auto;
}

.content-card pre {
  overflow-x: auto;

  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.content-card .signature {
  margin-top: 40px;
}


/* =========================================================
   STANDARD GALLERIES
   ========================================================= */

.australia-tandara-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 20px;

  width: 100%;

  margin: 22px 0 30px;
  padding: 0;

  align-items: start;
}

.australia-tandara-item {
  min-width: 0;

  margin: 0;
  padding: 0;
}

.australia-tandara-image {
  display: flex;
  align-items: center;
  justify-content: center;

  width: 100%;

  aspect-ratio: 4 / 3;

  overflow: hidden;

  background: #f5f3ef;

  border: 1px solid var(--subpage-soft-border);
  border-radius: 12px;

  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

.australia-tandara-image img {
  display: block;

  width: auto;
  height: auto;

  max-width: 100%;
  max-height: 100%;

  margin: auto;

  object-fit: contain;
  object-position: center;
}

.australia-tandara-item figcaption {
  margin-top: 8px;

  min-height: 2.7em;

  color: var(--subpage-heading);

  font-size: 16px;
  line-height: 1.35;
  text-align: center;
}

.australia-tandara-gallery
.australia-tandara-item:last-child:nth-child(odd) {
  grid-column: 1 / -1;

  width: calc(50% - 10px);

  justify-self: center;
}


/* =========================================================
   AUTHOR BOOK COVERS
   ========================================================= */

.author-books-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));

  column-gap: clamp(20px, 4vw, 56px);
  row-gap: 0;

  width: 100%;

  margin: 24px auto 32px;
  padding: 0;

  align-items: start;
}

.author-books-gallery
.australia-tandara-item {
  width: 100%;

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

.author-books-gallery
.australia-tandara-image {
  width: min(100%, 230px);

  aspect-ratio: 376 / 404;

  margin: 0 auto;
}

.author-books-gallery
.australia-tandara-image img {
  width: 100%;
  height: 100%;

  object-fit: contain;
}

.author-books-gallery
.australia-tandara-item figcaption {
  width: 100%;
  max-width: 260px;

  margin: 9px auto 0;

  min-height: 3.2em;

  text-align: center;
  line-height: 1.3;
}


/* =========================================================
   RIČICE — ORIGIN PAGE
   ========================================================= */

.ricice1-wide {
  display: block;
  width: 100%;
  margin: 22px 0 30px;
}

.ricice1-wide .australia-tandara-item {
  width: 100%;
  margin: 0;
}

.ricice1-wide .australia-tandara-image {
  width: 100%;
  aspect-ratio: auto;
}

.ricice1-wide .australia-tandara-image img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  max-height: none;
  margin: 0 auto;
  object-fit: contain;
}

.ricice-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 20px;

  width: 100%;

  margin: 26px 0 30px;
  padding: 0;

  align-items: start;
}

.ricice-item {
  width: 100%;
  min-width: 0;

  margin: 0;
  padding: 0;
}

.ricice-item img {
  display: block;

  width: 100%;
  height: auto;

  aspect-ratio: 4 / 3;

  margin: 0 auto;

  object-fit: contain;
  object-position: center;

  background: #f5f3ef;

  border: 1px solid var(--subpage-soft-border);
  border-radius: 12px;

  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.18);
}

.ricice-item figcaption {
  margin-top: 8px;

  color: var(--subpage-heading);

  font-size: 16px;
  line-height: 1.35;
  text-align: center;
}


/* =========================================================
   RIČICE — VIDEO
   ========================================================= */

.ricice-video {
  width: 100%;

  margin: 8px 0 36px;
}

.ricice-video a {
  position: relative;

  display: block;

  width: 100%;

  overflow: hidden;

  color: #ffffff;
  text-decoration: none;

  border-radius: 14px;

  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.24);
}

.ricice-video img {
  display: block;

  width: auto;
  height: auto;

  max-width: 100%;
  max-height: 640px;

  margin: 0 auto;

  object-fit: contain;
  object-position: center;
}

.ricice-video .play-icon {
  position: absolute;
  top: 50%;
  left: 50%;

  width: 74px;
  height: 74px;

  transform: translate(-50%, -50%);

  border-radius: 50%;

  background: rgba(0, 0, 0, 0.60);

  color: #ffffff;

  font-size: 40px;
  line-height: 74px;
  text-align: center;

  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45);

  pointer-events: none;
}

.ricice-video .video-title {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  padding: 14px 18px;

  background: rgba(0, 0, 0, 0.55);

  color: #ffffff;

  font-size: 20px;
  font-weight: 700;
  text-align: center;

  pointer-events: none;
}


/* =========================================================
   MIGRATION PAGE — RIČICE
   ========================================================= */

.migracije-ricice-media {
  width: 100%;

  margin: 30px 0 34px;
}

.migracije-ricice-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 20px;

  width: 100%;

  margin: 0;
  padding: 0;

  align-items: start;
}

.migracije-ricice-item {
  width: 100%;

  margin: 0;
  padding: 0;
}

.migracije-ricice-item img,
.migracije-ricice-item video {
  display: block;

  width: 100%;
  height: auto;

  aspect-ratio: 4 / 3;

  margin: 0 auto;

  object-fit: contain;
  object-position: center;

  background: #f5f3ef;
}

.migracije-ricice-item figcaption {
  margin: 9px 0 0;
  padding: 0 8px;

  color: var(--subpage-heading);

  font-size: 16px;
  line-height: 1.4;
  text-align: center;
}


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

@media (max-width: 900px) {

  .content-page {
    display: block;

    width: 100%;

    margin: 0;
    padding: 10px;
  }

  .content-card {
    width: 100%;

    margin: 0;
    padding: 26px 20px;

    border-radius: 10px;
  }

  .content-card h1 {
    margin-bottom: 18px;

    font-size: clamp(22px, 5vw, 32px);
  }

  .content-card h2 {
    font-size: clamp(17px, 3.7vw, 22px);
  }

  .content-card p,
  .content-card li {
    font-size: clamp(14px, 2.8vw, 17px);

    line-height: 1.55;
  }
}


@media (max-width: 700px) {

  .australia-tandara-gallery {
    grid-template-columns: 1fr;
  }

  .australia-tandara-gallery
  .australia-tandara-item:last-child:nth-child(odd) {
    grid-column: auto;

    width: 100%;
  }

  .author-books-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));

    column-gap: clamp(7px, 2vw, 16px);
  }

  .author-books-gallery
  .australia-tandara-image {
    width: min(100%, 150px);
  }

  .author-books-gallery
  .australia-tandara-item figcaption {
    font-size: 10px;
    line-height: 1.2;
  }

  .ricice-video img {
    max-height: 72vh;
  }

  .ricice-video .play-icon {
    width: 58px;
    height: 58px;

    font-size: 32px;
    line-height: 58px;
  }

  .ricice-video .video-title {
    padding: 10px 12px;

    font-size: 16px;
  }
}


@media (max-width: 540px) {

  .ricice-gallery,
  .migracije-ricice-gallery {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 480px) {

  .content-page {
    padding: 6px;
  }

  .content-card {
    padding: 22px 15px;
  }

  .content-card p,
  .content-card li {
    font-size: 14px;
  }
}


/* =========================================================
   PRINT
   ========================================================= */

@media print {

  .site-shell {
    display: none !important;
  }

  body,
  .site-layout,
  .site-content,
  .content-page,
  .content-card {
    width: 100% !important;
    max-width: none !important;

    margin: 0 !important;

    padding-left: 0 !important;
    padding-right: 0 !important;

    background: #ffffff !important;

    border: 0 !important;

    box-shadow: none !important;
  }

  .site-layout {
    display: block !important;
  }
}
