/* =========================================================
   READING LIST - AIRBNB / MATERIAL UPGRADE
   ========================================================= */

   .reading-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 40px 20px;
    background-color: var(--parchment);
    box-sizing: border-box;
  }
  
  .reading-intro {
    margin-bottom: 40px;
    border-left: 5px solid var(--accent-gold);
    padding: 10px 0 10px 25px;
  }
  
  /* 1. Material Table & Row Hover Effects */
  .reading-table {
    width: 100%;
    border-collapse: separate; 
    border-spacing: 0 12px; /* Creates spacing between "cards" */
    margin-top: -12px;
  }
  
  .reading-table thead th {
    padding: 15px;
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-main);
    opacity: 0.6;
    border-bottom: 1px solid var(--border-stone);
  }
  
  .reading-table tbody tr {
    background: #ffffff;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border-radius: 12px;
  }
  
  .reading-table tbody tr:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.08);
    background: #fdfdfd;
  }
  
  .reading-table td {
    padding: 25px 20px;
    vertical-align: top;
  }
  
  /* Round the corners of the row cards */
  .reading-table td:first-child { border-radius: 12px 0 0 12px; }
  .reading-table td:last-child { border-radius: 0 12px 12px 0; }
  
  /* 2. Thumbnail Styling (Interactive) */
  .col-image { width: 120px; }
  .clickable-img {
    width: 90px;
    height: auto;
    border-radius: 8px;
    cursor: zoom-in;
    transition: transform 0.2s ease, filter 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  }
  
  .clickable-img:hover {
    transform: scale(1.05);
    filter: brightness(1.05);
  }
  
  /* 3. Typography & UI Elements */
  .book-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
  }
  
  .book-author {
    color: var(--accent-gold);
    font-style: italic;
    font-size: 15px;
  }
  
  .tag {
    display: inline-block;
    background: #f7f7f7;
    border: 1px solid #ddd;
    padding: 4px 10px;
    border-radius: 20px; /* Pill shape (Airbnb style) */
    font-size: 11px;
    font-weight: 600;
    color: var(--text-main);
  }
  
  .notes-callout {
    background: rgba(146, 197, 194, 0.08);
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    border: 1px solid rgba(146, 197, 194, 0.2);
  }
  
  /* 4. Pagination Styling */
  .pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 25px;
    padding: 40px 0;
  }
  
  .nav-arrow {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 1px solid var(--border-stone);
    background: white;
    cursor: pointer;
    transition: 0.2s;
    font-size: 18px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  }
  
  .nav-arrow:hover:not(:disabled) {
    background: var(--text-main);
    color: white;
    transform: scale(1.1);
  }
  
  .nav-arrow:disabled {
    opacity: 0.3;
    cursor: not-allowed;
  }
  
  /* 5. Modal - The Pop-out */
  .modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
  }
  
  .modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 80vh;
    border-radius: 12px;
    position: relative;
    top: 45%;
    transform: translateY(-50%);
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
  }
  
  #modal-caption {
    text-align: center;
    color: white;
    padding: 20px;
    font-size: 18px;
  }
  
  .modal-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 50px;
    font-weight: 200;
    cursor: pointer;
  }
  
  /* 6. Mobile Refinement */
 /* =========================================================
   STRICT MOBILE CONTAINMENT (Fixes Overflow/Floating)
   ========================================================= */

@media (max-width: 768px) {
  /* Prevent the entire container from leaking */
  .reading-container {
    padding: 15px 10px;
    width: 100%;
    overflow-x: hidden; /* Lock horizontal movement */
    box-sizing: border-box;
  }

  /* Force the table into a single vertical stack */
  .reading-table, 
  .reading-table tbody, 
  .reading-table tr, 
  .reading-table td {
    display: flex;
    flex-direction: column;
    width: 100% !important;
    box-sizing: border-box;
    margin: 0;
  }

  /* Hide headers on mobile */
  .reading-table thead {
    display: none;
  }

  /* Each row becomes a standalone card */
  .reading-table tr {
    margin-bottom: 25px;
    padding: 15px;
    border: 1px solid var(--border-stone);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  }

  /* Remove default cell padding that might push widths */
  .reading-table td {
    padding: 10px 0 !important;
    border: none !important;
  }

  /* Force images to stay within bounds */
  .col-image {
    align-items: center;
    justify-content: center;
  }

  .clickable-img {
    max-width: 150px;
    height: auto;
  }

  /* Typography Fixes: prevent long titles from breaking the box */
  .book-title, .book-author, .desc-text, .notes-callout p {
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    white-space: normal;
  }

  .book-title {
    font-size: 18px;
    text-align: center;
  }

  .book-author {
    text-align: center;
    margin-bottom: 10px;
  }

  /* Center the category tag */
  .col-category {
    align-items: center;
    padding-bottom: 15px !important;
    border-bottom: 1px dashed var(--ledger-dots) !important;
  }
}

/* Sortable Header Styling */
.sortable {
  cursor: pointer;
  transition: color 0.2s;
  position: relative;
}

.sortable:hover {
  color: var(--accent-gold);
  opacity: 1 !important;
}

/* Author Column Styling */
.author-name {
  color: var(--text-main);
  font-weight: 500;
  font-size: 15px;
}

.col-author {
  width: 150px;
}

/* Cleaning up content column */
.col-content {
  line-height: 1.6;
  color: var(--text-light);
  font-size: 14px;
}

/* Mobile Adjustments for 5 columns */
@media (max-width: 768px) {
  .author-name {
    text-align: center;
    margin-bottom: 10px;
    font-style: italic;
    color: var(--accent-gold);
  }
  
  .author-name::before {
    content: "by ";
    font-size: 12px;
    opacity: 0.7;
  }
}