:root {
    /*COLORS*/
    --clr-background    :   #4f202b;
    --clr-flat-text     :   #2b2b2b;
    --clr-accent        :   #4f202b;
    --clr-border        :   #b15973;
    --clr-container     :   #cccccc;
    --clr-outside-text  :   #cccccc;
    /*BOOKS COLOR CODING*/
    --clr-books-finished:   #367efa;
    --clr-books-reading :   #009451;
    --clr-books-tbr     :   #d40000;
    --clr-books-mine    :   #ff9318;

    /*SPACING*/
    --space-xxs :   2px;
    --space-xs  :   4px;
    --space-s   :   8px;
    --space-m   :   16px;
    --space-l   :   32px;
    --space-xl  :   64px;

    /*FONT*/
    --font-base         :   "Courier New", monospace;
    --font-heading      :   "Fredericka the Great", "Verdana", sans-serif;
    --font-size-xxs     :   0.5rem;
    --font-size-xs      :   0.8rem;
    --font-size-s       :   0.9rem;
    --font-size-base    :   1rem;
    --font-size-l       :   1.5rem;
    --font-size-xl      :   2rem;
    --font-size-xxl     :   5rem;
}

/*TEXT STYLES*/
h1 {
    font-family :   var(--font-heading);
    font-size   :   var(--font-size-xxl);
    color       :   var(--clr-outside-text);
    text-align  :   center;
}

h2 {
    font-family :   var(--font-heading);
    font-size   :   var(--font-size-xl);
    color       :   var(--clr-accent);
    text-align  :   center;
}
h3 {
    font-family :   var(--font-heading);
    font-size   :   var(--font-size-l);
    color       :   var(--clr-accent);
    text-align  :   left;
}

hr {
    display     :   block;
    width       :   100%;
    border      :   0;
    border-top  :   2px solid var(--clr-accent);;
}

html, body {
    margin                  :   0;
    background-image        :   url("Background_Pics/worded-paper-texture.jpg");
    background-size         :   cover;
    background-position     :   center;
    background-blend-mode   :   multiply;
    background-repeat       :   repeat-x;
    background-color        :   var(--clr-background);
    padding-top             :   var(--space-xl);
    font-family             :   var(--font-base);
    font-size               :   var(--font-size-base);
    color                   :   var(--clr-flat-text);
    text-align              :   left;
}

.container-header {
    margin              :   0px var(--space-l) var(--space-l) var(--space-l);
    padding             :   var(--space-xl);
    /*background-image    :   url(Title_Ani.gif);*/
    background-image    :   url(Web_Pics/Bigger/Forest_Floor_Day_h.PNG);
    background-size     :   cover;
    background-position :   center;
    background-color    :   var(--clr-container);
    border-radius       :   3px;                       /*rounds corners*/
    box-shadow          :   8px 8px var(--clr-border);
}

/*NAVIGATION BAR*/
.navbar {
    font-family         :   var(--font-heading);
    background-color    :   var(--clr-container);
    display             :   flex;
    justify-content     :   center;
    margin              :   0px var(--space-l) 0px var(--space-l);
    /*border              :   4px solid var(--clr-border);*/
    border-radius       :   3px;
    box-shadow          :   5px 5px var(--clr-border);
}

.navbar a {
    color           :   var(--clr-accent);
    text-decoration :   none;
    padding         :   var(--space-s) var(--space-m);
    font-family     :   var(--font-heading);
    font-size       :   var(--font-size-base);
}

.navbar a:hover {
    background-color:   var(--clr-border);
}

/*dropedown container*/
.dropdown {
    position    :   relative;
    display     :   inline-block;
}

.dropbutton {
    background-color:   var(--clr-container);
    color           :   var(--clr-accent);
    padding         :   var(--space-s) var(--space-m);
    font-family     :   var(--font-heading);
    font-size       :   var(--font-size-base);
    border          :   none;
    cursor          :   pointer;
}

.dropbutton:hover {
    background-color:   var(--clr-border);
}

/*hidden dropdown content*/
.dropdown-content {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    position        :   absolute;
    background-color:   var(--clr-border);
    min-width       :   160px;
    border-radius   :   2px;
    z-index         :   10;                /*keeps it on top other content*/
}

.dropdown-content a {
    color           :   var(--clr-outside-text);
    padding         :   var(--space-s) var(--space-s);
    text-decoration :   none;
    display         :   block;
    font-size       :   var(--font-size-s);
}

.dropdown-content a:hover {
    background-color:   var(--clr-accent);
}

.dropdown:hover .dropdown-content {
    opacity: 1;
    pointer-events: auto;
}

/*MAIN GRID LAYOUT*/
.content-2columns-even {
    display                 :   grid;
    grid-template-columns   :   minmax(0, 1fr) minmax(0, 2fr);
    gap                     :   var(--space-l);
    padding                 :   var(--space-l);
    box-sizing              :   border-box;
    min-width               :   0;
}

.content-2columns {
    display                 :   grid;
    grid-template-columns   :   minmax(0, 1fr) minmax(0, 4fr);
    gap                     :   var(--space-l);
    padding                 :   var(--space-l);
    box-sizing              :   border-box;
    min-width               :   0;
}

.content-3columns {
    display                 :   grid;
    grid-template-columns   :   minmax(0, 1fr) minmax(0, 3fr) minmax(0, 1fr);
    gap                     :   var(--space-l);
    padding                 :   var(--space-l);
    box-sizing              :   border-box;
    min-width               :   0;
}

.sidebar {
    background-color:   var(--clr-container);
    padding         :   var(--space-l);
    border-radius   :   3px;
    /*border:   4px solid var(--clr-border)*/
    box-shadow      :   8px 8px var(--clr-border);
}

.sidebar-image {
    background-color:   var(--clr-container);
    border-radius :   3px;
}

.main-content {
    background-color:   var(--clr-container);
    padding         :   var(--space-l);
    border-radius   :   3px;
    box-shadow      :   8px 8px var(--clr-border);
}

.image-bar {
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 3px;
  box-shadow: 8px 8px var(--clr-border);
}

.image-bar img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-first {
  position: relative;
  box-shadow: 8px 8px var(--clr-border);
  border-radius: 3px;

  /* LET the height be determined by the image */
  height: auto;
  overflow: visible;
}

.image-first img {
  width: 100%;
  height: auto;        /* ← IMPORTANT */
  display: block;      /* removes inline-image whitespace */
  position: relative;  /* remove absolute */
  object-fit: cover;   /* optional, usually okay */
}

iframe {
  display: block;
  width: 100% !important;
  max-width: 100% !important;
  height: auto;
  border-radius: 10px;
}

.footer {
    /*margin          :   0px 505px 50px 505px;*/
    padding         :   var(--space-xxs);
    background-color:   var(--clr-border);
    border-radius   :   3px;                       /*rounds corners*/
    /*border          :   4px solid var(--clr-border);*/
    text-align      :   center;
    /*box-shadow      :   5px 5px var(--clr-border);*/
}

a {
    color: var(--clr-border)
}

/*GALLERY*/
.gallery {
    display         : flex;
    flex-wrap       : wrap;
    justify-content : flex-start;
    font-size       : var(--font-size-xs);
    text-align      : center;
}

.gallery-item-v,
.gallery-item-h {
  display: flex;
  flex-direction: column;
  margin: 5px;
  border-radius: 10px;
}

.gallery-item-h:hover {
  border: 2px solid var(--clr-border);
}

.gallery-item-v:hover {
  border: 2px solid var(--clr-border);
}

.gallery-item-h img {
  width: 250px;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
}

.gallery-item-v img {
  height: 250px;
  width: auto;
  object-fit: cover;
  border-radius: 10px;
}

.gallery-item-h div.desc {
  padding: 2px;
  text-align: center;
}

.gallery-item-v div.desc {
  padding: 2px;
  text-align: center;
}

/*----------------------------------
  BOOKSHELF LAYOUT
----------------------------------*/
.bookshelf {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  font-size: var(--font-size-xs);
  text-align: center;
  gap: 2px;
}

/* All book items share these */
.book {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 1px;
  position: relative;
  cursor: pointer;
}


/*----------------------------------
  SPINE (SMALL IMAGE)
----------------------------------*/
.spine-wrapper {
  width: 30px;
  border-radius: 2px;
}

img.spine {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
}


/*----------------------------------
  CATEGORY COLORS FOR HOVER BORDERS
----------------------------------*/
.spine-wrapper.finished:hover {
  border: 3px solid var(--clr-books-finished);
}

.spine-wrapper.reading:hover {
  border: 3px solid var(--clr-books-reading);
}

.spine-wrapper.tbr:hover {
  border: 3px solid var(--clr-books-tbr);
}

.spine-wrapper.mine:hover {
  border: 3px solid var(--clr-books-mine);
}


/*----------------------------------
  FULL COVER (HIDDEN UNTIL HOVER)
----------------------------------*/
.full-cover {
  position: absolute;
  top: 100%;         /* directly below the spine */
  left: 50%;
  transform: translateX(-50%);

  width: 150px;      /* full cover width */
  height: auto;
  border: 4px solid var(--clr-container);

  opacity: 0;
  pointer-events: none;
  z-index: 20;

  transition: opacity 0.2s ease;
}

/* show full cover when hovering the spine only */
.spine-wrapper:hover + .full-cover {
  opacity: 1;
}


/*RESPONSIVE ADJUSTMENTS*/
@media (max-width: 1250px) {
  .content-3columns,
  .content-2columns,
  .content-2columns-even {
    grid-template-columns: 1fr;
  }

  .image-bar {
    height: auto;       /* allow natural height */
  }

  .image-bar img {
    position: static;   /* remove the absolute positioning */
    width: 100%;
    height: auto;       /* stop stretching */
    object-fit: cover;
    display: block;
  }
}

@media (max-width: 600px) {
    h1 {
        font-size: calc(var(--font-size-xxl) * 0.6);
    }
      .navbar {
        flex-wrap: wrap;          /* allow the items to go onto 2 lines */
        margin: 0 var(--space-s); /* reduce side margin */
        padding: var(--space-s);  /* optional if your padding is large */
    }

    .navbar a {
        font-size: calc(var(--font-size-base) * 0.8); /* smaller text */
        padding: var(--space-xs) var(--space-s);      /* smaller padding */
    }

    .dropbutton {
      font-size: calc(var(--font-size-base) * 0.8); /* smaller text */
      padding: var(--space-xs) var(--space-s); 
    }
}