/* =========================================================
   BIBLIJA - NOVI REVIDIRANI PREVOD
   Modernizovani index.css
   ========================================================= */


/* =========================================================
   1. OSNOVNE VARIJABLE
   ========================================================= */

:root {

  --bg: #f5f1e8;
  --bg-soft: #fbf9f4;

  --surface: #ffffff;
  --surface-hover: #f8f4ec;

  --text: #24211d;
  --muted: #746e65;

  --accent: #7b5a2b;
  --accent-dark: #5f431d;
  --accent-soft: #eee4d2;

  --border: #ded7cb;
  --border-strong: #cfc4b3;

  --shadow:
    0 12px 35px rgba(56, 45, 29, 0.08);

  --radius-lg: 20px;
  --radius-md: 14px;
  --radius-sm: 10px;

  --content-width: 1400px;
}



/* =========================================================
   2. RESET
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}


html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}


body {

  margin: 0;

  min-width: 320px;

  background:
    linear-gradient(
      180deg,
      rgba(255,255,255,0.42),
      rgba(255,255,255,0)
    ),
    var(--bg);

  color: var(--text);

  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  font-size: 16px;

  line-height: 1.6;

  text-rendering: optimizeLegibility;
}


a {
  color: inherit;
}



/* =========================================================
   3. SKIP LINK
   ========================================================= */

.skip-link {

  position: fixed;

  top: 10px;
  left: 10px;

  z-index: 1000;

  transform: translateY(-150%);

  padding: 10px 14px;

  border-radius: 8px;

  background: var(--text);

  color: #ffffff;

  text-decoration: none;

  transition: transform 0.2s ease;
}


.skip-link:focus {
  transform: translateY(0);
}



/* =========================================================
   4. ZAGLAVLJE
   ========================================================= */

.site-header {

  border-bottom: 1px solid var(--border);

  background:

    radial-gradient(
      circle at top left,
      rgba(123,90,43,0.12),
      transparent 32%
    ),

    var(--bg-soft);
}


.header-inner {

  width:
    min(
      calc(100% - 32px),
      var(--content-width)
    );

  margin: 0 auto;

  padding:
    48px 0 36px;

  text-align: center;
}



/* =========================================================
   5. NASLOVI
   ========================================================= */

.eyebrow,
.section-kicker {

  margin: 0;

  color: var(--accent);

  font-size: 0.76rem;

  font-weight: 800;

  letter-spacing: 0.14em;

  text-transform: uppercase;
}


.site-header h1 {

  margin:
    6px 0 0;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size:
    clamp(
      2.5rem,
      6vw,
      4.5rem
    );

  font-weight: 700;

  line-height: 1;

  letter-spacing: -0.035em;
}


.subtitle {

  margin:
    12px 0 0;

  color: var(--muted);

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size:
    clamp(
      1rem,
      2.2vw,
      1.25rem
    );
}



/* =========================================================
   6. BRZA NAVIGACIJA
   ========================================================= */

.quick-nav {

  display: flex;

  flex-wrap: wrap;

  justify-content: center;

  gap: 10px;

  margin-top: 28px;
}


.quick-nav a {

  min-height: 44px;

  display: inline-flex;

  align-items: center;

  justify-content: center;

  padding:
    9px 16px;

  border:
    1px solid
    var(--border-strong);

  border-radius: 999px;

  background:
    rgba(255,255,255,0.72);

  color:
    var(--accent-dark);

  font-size: 0.93rem;

  font-weight: 700;

  text-decoration: none;

  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}


.quick-nav a:hover {

  border-color:
    var(--accent);

  background:
    var(--surface);

  transform:
    translateY(-1px);
}



/* =========================================================
   7. FOCUS STANJA
   ========================================================= */

.quick-nav a:focus-visible,
.book-link:focus-visible,
.extra-link:focus-visible,
.site-footer a:focus-visible {

  outline:
    3px solid
    rgba(123,90,43,0.28);

  outline-offset: 3px;
}



/* =========================================================
   8. GLAVNI SADRŽAJ
   ========================================================= */

.bible-home {

  width:
    min(
      calc(100% - 32px),
      var(--content-width)
    );

  margin:
    0 auto;

  padding:
    34px 0 64px;
}



/* =========================================================
   9. STARI I NOVI SAVEZ
   ========================================================= */

.testaments {

  display: grid;

  grid-template-columns:
    repeat(
      2,
      minmax(0, 1fr)
    );

  align-items: start;

  gap: 24px;
}


.testament,
.extras {

  scroll-margin-top: 20px;
}


.testament {

  overflow: hidden;

  border:
    1px solid
    var(--border);

  border-radius:
    var(--radius-lg);

  background:
    rgba(255,255,255,0.92);

  box-shadow:
    var(--shadow);
}



/* =========================================================
   10. NASLOV SEKCIJE
   ========================================================= */

.section-heading {

  padding:
    25px 26px 20px;

  border-bottom:
    1px solid
    var(--border);

  background:

    linear-gradient(
      135deg,
      rgba(123,90,43,0.06),
      transparent 55%
    ),

    var(--bg-soft);
}


.section-heading h2 {

  margin:
    4px 0 0;

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size:
    clamp(
      1.55rem,
      2.5vw,
      2rem
    );

  line-height: 1.2;
}


.section-heading > p:last-child {

  margin:
    7px 0 0;

  color:
    var(--muted);

  font-size:
    0.94rem;
}



/* =========================================================
   11. GRID KNJIGA
   ========================================================= */

.book-grid {

  display: grid;

  grid-template-columns: 1fr;

  gap: 9px;

  padding: 16px;
}



/* =========================================================
   12. LINK / KARTICA KNJIGE
   ========================================================= */

.book-link {

  min-height: 58px;

  display: grid;

  grid-template-columns:
    42px
    minmax(0,1fr);

  align-items: center;

  gap: 12px;

  padding:
    8px 13px 8px 9px;

  border:
    1px solid
    transparent;

  border-radius:
    var(--radius-md);

  background:
    transparent;

  text-decoration:
    none;

  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
}


.book-link:hover {

  border-color:
    var(--border);

  background:
    var(--surface-hover);

  box-shadow:
    0 5px 16px
    rgba(56,45,29,0.06);

  transform:
    translateY(-1px);
}



/* =========================================================
   13. BROJ KNJIGE
   ========================================================= */

.book-number {

  width: 38px;
  height: 38px;

  display:
    inline-flex;

  align-items:
    center;

  justify-content:
    center;

  border:
    1px solid
    #e2d7c5;

  border-radius:
    50%;

  background:
    var(--accent-soft);

  color:
    var(--accent-dark);

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size:
    0.85rem;

  font-weight:
    700;

  font-variant-numeric:
    tabular-nums;
}



/* =========================================================
   14. NAZIV KNJIGE
   ========================================================= */

.book-name {

  color:
    var(--text);

  font-size:
    1rem;

  font-weight:
    650;

  line-height:
    1.35;
}



/* =========================================================
   15. DODATAK
   ========================================================= */

.extras {

  margin-top:
    24px;

  overflow:
    hidden;

  border:
    1px solid
    var(--border);

  border-radius:
    var(--radius-lg);

  background:
    rgba(255,255,255,0.92);

  box-shadow:
    var(--shadow);
}


.extras-heading {

  border-bottom:
    1px solid
    var(--border);
}


.extras-grid {

  display:
    grid;

  grid-template-columns:
    repeat(
      3,
      minmax(0,1fr)
    );

  gap:
    12px;

  padding:
    16px;
}



/* =========================================================
   16. DODATAK - LINK
   ========================================================= */

.extra-link {

  min-height:
    74px;

  display:
    grid;

  grid-template-columns:
    42px
    minmax(0,1fr)
    24px;

  align-items:
    center;

  gap:
    12px;

  padding:
    12px;

  border:
    1px solid
    var(--border);

  border-radius:
    var(--radius-md);

  background:
    var(--surface);

  text-decoration:
    none;

  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
}


.extra-link:hover {

  border-color:
    var(--border-strong);

  background:
    var(--surface-hover);

  box-shadow:
    0 5px 16px
    rgba(56,45,29,0.06);

  transform:
    translateY(-1px);
}



/* =========================================================
   17. DODATAK - BROJ
   ========================================================= */

.extra-number {

  width:
    38px;

  height:
    38px;

  display:
    inline-flex;

  align-items:
    center;

  justify-content:
    center;

  border-radius:
    10px;

  background:
    var(--accent-soft);

  color:
    var(--accent-dark);

  font-size:
    0.8rem;

  font-weight:
    800;
}


.extra-name {

  font-weight:
    700;

  line-height:
    1.35;
}


.extra-arrow {

  color:
    var(--accent);

  font-size:
    1.25rem;

  transition:
    transform 0.16s ease;
}


.extra-link:hover .extra-arrow {

  transform:
    translateX(2px);
}



/* =========================================================
   18. FOOTER
   ========================================================= */

.site-footer {

  width:
    min(
      calc(100% - 32px),
      var(--content-width)
    );

  margin:
    0 auto;

  padding:
    0 0
    max(
      34px,
      env(safe-area-inset-bottom)
    );

  color:
    var(--muted);

  text-align:
    center;

  font-size:
    0.88rem;
}


.site-footer p {

  margin:
    0 0 8px;
}


.site-footer a {

  color:
    var(--accent-dark);

  font-weight:
    700;

  text-decoration:
    none;
}


.site-footer a:hover {

  text-decoration:
    underline;
}



/* =========================================================
   19. VELIKI DESKTOP
   ========================================================= */

@media (min-width: 1280px) {

  .book-grid {

    grid-template-columns:
      repeat(
        2,
        minmax(0,1fr)
      );

  }

}



/* =========================================================
   20. MANJI DESKTOP
   ========================================================= */

@media (max-width: 1100px) {

  .testaments {

    gap:
      18px;

  }


  .section-heading {

    padding:
      22px;

  }

}



/* =========================================================
   21. TABLET
   ========================================================= */

@media (max-width: 900px) {

  .testaments {

    grid-template-columns:
      1fr;

  }


  .book-grid {

    grid-template-columns:
      repeat(
        2,
        minmax(0,1fr)
      );

  }


  .extras-grid {

    grid-template-columns:
      1fr;

  }

}



/* =========================================================
   22. TELEFON
   ========================================================= */

@media (max-width: 640px) {

  body {

    font-size:
      16px;

  }


  .header-inner {

    width:
      min(
        calc(100% - 24px),
        var(--content-width)
      );

    padding:
      34px 0 26px;

  }


  .quick-nav {

    gap:
      8px;

    margin-top:
      22px;

  }


  .quick-nav a {

    flex:
      1 1 auto;

    padding-left:
      12px;

    padding-right:
      12px;

    font-size:
      0.88rem;

  }


  .bible-home {

    width:
      min(
        calc(100% - 20px),
        var(--content-width)
      );

    padding:
      20px 0 42px;

  }


  .testaments {

    gap:
      16px;

  }


  .testament,
  .extras {

    border-radius:
      16px;

  }


  .section-heading {

    padding:
      20px 18px 17px;

  }


  .book-grid {

    grid-template-columns:
      1fr;

    gap:
      6px;

    padding:
      10px;

  }


  .book-link {

    min-height:
      58px;

    grid-template-columns:
      40px
      minmax(0,1fr);

    gap:
      10px;

    padding:
      8px 10px 8px 7px;

  }


  .book-number {

    width:
      36px;

    height:
      36px;

  }


  .book-name {

    font-size:
      1rem;

  }


  .extras {

    margin-top:
      16px;

  }


  .extras-grid {

    gap:
      8px;

    padding:
      10px;

  }


  .extra-link {

    min-height:
      66px;

  }


  .site-footer {

    width:
      min(
        calc(100% - 24px),
        var(--content-width)
      );

  }

}



/* =========================================================
   23. VEOMA MALI TELEFONI
   ========================================================= */

@media (max-width: 380px) {

  .quick-nav {

    display:
      grid;

    grid-template-columns:
      1fr;

  }


  .quick-nav a {

    width:
      100%;

  }

}



/* =========================================================
   24. SMANJENA ANIMACIJA
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  html {

    scroll-behavior:
      auto;

  }


  *,
  *::before,
  *::after {

    transition-duration:
      0.01ms !important;

    animation-duration:
      0.01ms !important;

    animation-iteration-count:
      1 !important;

  }

}



/* =========================================================
   25. ŠTAMPA
   ========================================================= */

@media print {

  body {

    background:
      #ffffff;

  }


  .skip-link,
  .quick-nav,
  .site-footer {

    display:
      none !important;

  }


  .site-header {

    border-bottom:
      1px solid #bbbbbb;

    background:
      #ffffff;

  }


  .header-inner {

    padding:
      20px 0;

  }


  .bible-home {

    width:
      100%;

    padding:
      20px 0;

  }


  .testaments {

    display:
      block;

  }


  .testament,
  .extras {

    margin-bottom:
      20px;

    border:
      1px solid #bbbbbb;

    box-shadow:
      none;

    break-inside:
      avoid;

  }


  .book-link,
  .extra-link {

    border-color:
      #dddddd;

    box-shadow:
      none;

  }

}
/* =========================================================
   26. ČITAČ BIBLIJE - STRANICE POGLAVLJA
   ========================================================= */


/* ---------------------------------------------------------
   ZAGLAVLJE KNJIGE / POGLAVLJA
   --------------------------------------------------------- */

body > header:not(.site-header) {

  width:
    min(
      calc(100% - 32px),
      920px
    );

  margin:
    30px auto 0;

  padding:
    30px 32px 26px;

  border:
    1px solid
    var(--border);

  border-radius:
    var(--radius-lg);

  background:
    linear-gradient(
      135deg,
      rgba(123, 90, 43, 0.07),
      transparent 45%
    ),
    rgba(255, 255, 255, 0.94);

  box-shadow:
    var(--shadow);
}


/* ---------------------------------------------------------
   NASLOV KNJIGE I POGLAVLJA
   --------------------------------------------------------- */

body > header:not(.site-header) h1 {

  margin:
    0 0 18px;

  color:
    var(--text);

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size:
    clamp(
      1.7rem,
      4vw,
      2.55rem
    );

  font-weight:
    700;

  line-height:
    1.2;

  letter-spacing:
    -0.025em;
}


/* ---------------------------------------------------------
   PODACI O KNJIZI
   Pisac / mesto pisanja / vreme
   --------------------------------------------------------- */

body > header:not(.site-header) > div {

  margin:
    0 0 22px;

  padding:
    14px 17px;

  border-left:
    4px solid
    var(--accent);

  border-radius:
    0 10px 10px 0;

  background:
    var(--accent-soft);
}


body > header:not(.site-header) > div p {

  margin:
    0;

  color:
    #655b4d;

  font-size:
    0.91rem;

  line-height:
    1.65;
}


body > header:not(.site-header) > div em {

  font-style:
    normal;
}


/* =========================================================
   27. IZBOR POGLAVLJA
   ========================================================= */

body > header:not(.site-header) nav {

  display:
    flex;

  flex-wrap:
    wrap;

  gap:
    7px;

  margin:
    0;

  padding:
    0;
}


/* Brojevi poglavlja */

body > header:not(.site-header) nav a {

  width:
    40px;

  height:
    40px;

  display:
    inline-flex;

  align-items:
    center;

  justify-content:
    center;

  flex:
    0 0 40px;

  border:
    1px solid
    var(--border);

  border-radius:
    10px;

  background:
    var(--surface);

  color:
    var(--accent-dark);

  font-size:
    0.9rem;

  font-weight:
    750;

  line-height:
    1;

  text-decoration:
    none;

  font-variant-numeric:
    tabular-nums;

  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
}


body > header:not(.site-header) nav a:hover {

  border-color:
    var(--accent);

  background:
    var(--accent);

  color:
    #ffffff;

  transform:
    translateY(-1px);

  box-shadow:
    0 4px 12px
    rgba(70, 48, 20, 0.16);
}


body > header:not(.site-header) nav a:focus-visible {

  outline:
    3px solid
    rgba(123, 90, 43, 0.28);

  outline-offset:
    2px;
}


/* =========================================================
   28. TEKST BIBLIJE
   ========================================================= */

body > ol {

  width:
    min(
      calc(100% - 32px),
      860px
    );

  margin:
    28px auto 0;

  padding:
    32px 38px 34px 68px;

  border:
    1px solid
    var(--border);

  border-radius:
    var(--radius-lg);

  background:
    rgba(255, 255, 255, 0.96);

  box-shadow:
    var(--shadow);

  color:
    var(--text);

  font-family:
    Georgia,
    "Times New Roman",
    serif;

  font-size:
    1.13rem;

  line-height:
    1.82;
}


/* ---------------------------------------------------------
   POJEDINAČNI STIH
   --------------------------------------------------------- */

body > ol > li {

  position:
    relative;

  margin:
    0 0 0.88em;

  padding:
    2px 5px 2px 3px;

  border-radius:
    7px;

  scroll-margin-top:
    20px;
}


body > ol > li:last-child {

  margin-bottom:
    0;
}


/* ---------------------------------------------------------
   BROJ STIHA
   --------------------------------------------------------- */

body > ol > li::marker {

  color:
    var(--accent);

  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  font-size:
    0.74em;

  font-weight:
    800;
}


/* ---------------------------------------------------------
   KADA SE OTVORI DIREKTAN LINK DO STIHA
   npr. 1.html#12
   --------------------------------------------------------- */

body > ol > li:target {

  padding:
    8px 10px;

  background:
    var(--accent-soft);

  box-shadow:
    0 0 0 1px
    rgba(123, 90, 43, 0.12);
}


/* =========================================================
   29. LINKOVI UNUTAR TEKSTA / FUSNOTE
   ========================================================= */

body > ol a {

  color:
    var(--accent-dark);

  text-decoration-color:
    rgba(123, 90, 43, 0.45);

  text-underline-offset:
    3px;
}


body > ol a:hover {

  color:
    var(--accent);

  text-decoration-color:
    var(--accent);
}


body > ol sup {

  font-family:
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;

  font-size:
    0.72em;
}


/* =========================================================
   30. DONJA NAVIGACIJA
   ========================================================= */

#footer {

  width:
    min(
      calc(100% - 32px),
      860px
    );

  display:
    flex;

  align-items:
    center;

  justify-content:
    center;

  flex-wrap:
    wrap;

  gap:
    9px;

  margin:
    22px auto 0;

  padding:
    18px 16px 42px;

  text-align:
    center;
}


/* Dugmad */

#footer a {

  width:
    48px;

  height:
    48px;

  display:
    inline-flex;

  align-items:
    center;

  justify-content:
    center;

  border:
    1px solid
    var(--border);

  border-radius:
    13px;

  background:
    rgba(255, 255, 255, 0.94);

  box-shadow:
    0 4px 13px
    rgba(56, 45, 29, 0.06);

  text-decoration:
    none;

  transition:
    background 0.16s ease,
    border-color 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
}


#footer a:hover {

  border-color:
    var(--border-strong);

  background:
    var(--accent-soft);

  transform:
    translateY(-2px);

  box-shadow:
    0 6px 16px
    rgba(56, 45, 29, 0.10);
}


#footer a:focus-visible {

  outline:
    3px solid
    rgba(123, 90, 43, 0.28);

  outline-offset:
    3px;
}


/* Ikonice */

#footer img {

  display:
    block;

  width:
    23px;

  height:
    23px;

  object-fit:
    contain;
}


/* =========================================================
   31. TABLET - ČITAČ
   ========================================================= */

@media (max-width: 760px) {

  body > header:not(.site-header) {

    width:
      calc(100% - 20px);

    margin-top:
      12px;

    padding:
      23px 20px 20px;

    border-radius:
      16px;
  }


  body > header:not(.site-header) h1 {

    margin-bottom:
      15px;

    font-size:
      clamp(
        1.55rem,
        7vw,
        2rem
      );
  }


  body > header:not(.site-header) > div {

    margin-bottom:
      18px;

    padding:
      12px 14px;
  }


  /* Brojevi poglavlja postaju horizontalni red */

  body > header:not(.site-header) nav {

    flex-wrap:
      nowrap;

    overflow-x:
      auto;

    overflow-y:
      hidden;

    padding:
      1px 1px 8px;

    scrollbar-width:
      thin;

    -webkit-overflow-scrolling:
      touch;
  }


  body > header:not(.site-header) nav a {

    flex:
      0 0 42px;

    width:
      42px;

    height:
      42px;
  }


  /* Tekst */

  body > ol {

    width:
      calc(100% - 20px);

    margin-top:
      14px;

    padding:
      24px 22px 27px 48px;

    border-radius:
      16px;

    font-size:
      1.08rem;

    line-height:
      1.78;
  }


  body > ol > li {

    margin-bottom:
      0.92em;
  }


  #footer {

    width:
      calc(100% - 20px);

    margin-top:
      12px;

    padding:
      14px 10px
      max(
        30px,
        env(safe-area-inset-bottom)
      );
  }


  #footer a {

    width:
      46px;

    height:
      46px;
  }

}


/* =========================================================
   32. MANJI TELEFONI
   ========================================================= */

@media (max-width: 420px) {

  body > header:not(.site-header) {

    padding:
      20px 16px 17px;
  }


  body > header:not(.site-header) > div {

    font-size:
      0.9rem;
  }


  body > ol {

    padding:
      21px 16px 24px 42px;

    font-size:
      1.04rem;

    line-height:
      1.75;
  }


  body > ol > li {

    padding-right:
      1px;
  }

}


/* =========================================================
   33. ŠTAMPA - POGLAVLJE
   ========================================================= */

@media print {

  body > header:not(.site-header) {

    width:
      100%;

    margin:
      0;

    padding:
      0 0 20px;

    border:
      0;

    border-radius:
      0;

    box-shadow:
      none;
  }


  body > header:not(.site-header) nav {

    display:
      none;
  }


  body > ol {

    width:
      100%;

    margin:
      0;

    padding:
      0 0 0 36px;

    border:
      0;

    border-radius:
      0;

    box-shadow:
      none;

    font-size:
      11pt;
  }


  #footer {

    display:
      none;
  }

}