/**
 * PCS Yearbook Search Styles
 * Organized and maintained CSS for Putnam City Schools yearbook search functionality
 */

/* ========================================
   TABLE OF CONTENTS
   ========================================
   1. Elementor Overrides
   2. CSS Variables & Base Styles
   3. Main Container & Layout
   4. Typography
   5. Form Elements
   6. Buttons & Navigation
   7. Search Results & Grids
   8. Carousel & Flickity Integration
   9. Cascading Cards
   10. Pagination
   11. Modals & Overlays
   12. Responsive Design
   ======================================== */

/* ========================================
   1. ELEMENTOR OVERRIDES
   ======================================== */
/* .elementor-element-b14aa68 {
  position: relative !important;
} */

#pcs-yearbook-results-title {
  font-size: 40px !important;
}

/* ========================================
   2. CSS VARIABLES & BASE STYLES
   ======================================== */
:root {
  --pcs-primary-blue: #1c3564;
  --pcs-secondary-blue: #2a4683;
  --pcs-accent-orange: #f05a29;
  --pcs-light-blue: #a3b4d8;
  --pcs-white: #fff;
  --pcs-border-radius: 8px;
  --pcs-transition: all 0.3s ease;
  --pcs-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --pcs-font-family: 'Fieldwork', Arial, Helvetica, sans-serif;
}

/* ========================================
   LOADING OVERLAY
   ======================================== */
.pcs-loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(28, 53, 100, 0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  backdrop-filter: blur(3px);
}

.pcs-loading-spinner {
  text-align: center;
  color: #fff;
}

.pcs-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #f05a29;
  border-radius: 50%;
  animation: pcs-spin 1s linear infinite;
  margin: 0 auto 20px;
}

@keyframes pcs-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.pcs-loading-text {
  font-size: 1.2em;
  font-weight: 600;
  margin: 0;
  font-family: var(--pcs-font-family);
}

/* Gallery-specific loading overlay (positioned within gallery container) */
.pcs-gallery-loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  min-height: 400px;
  background: rgba(28, 53, 100, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100;
  border-radius: var(--pcs-border-radius);
}

#yearbook_gallery_outer {
  position: relative;
  min-height: 400px;
}

/* Hide carousel while loading */
#yearbook_gallery_outer.is-loading .pcs-flickity-carousel {
  visibility: hidden;
}

/* Hide overlay when loaded */
#yearbook_gallery_outer.is-loaded .pcs-gallery-loading-overlay {
  display: none;
}

/* Disable long-press popup/context menu on touch devices (kiosk mode) */
/* Apply globally to catch all elements including dynamically added content */
body.kiosk-mode,
body.kiosk-mode *,
#pcs-yearbook-search-container,
#pcs-yearbook-search-container *,
.pcs-yearbook-modal,
.pcs-yearbook-modal *,
.flickity-viewport,
.flickity-viewport * {
  -webkit-touch-callout: none !important; /* iOS Safari */
  -webkit-user-select: none !important;   /* Safari */
  -moz-user-select: none !important;      /* Firefox */
  -ms-user-select: none !important;       /* IE/Edge */
  user-select: none !important;           /* Standard */
  -webkit-tap-highlight-color: transparent !important; /* Remove tap highlight */
}

/* Remove tap/focus shadows and outlines on buttons and interactive elements (kiosk mode) */
body.kiosk-mode button,
body.kiosk-mode a,
body.kiosk-mode input,
body.kiosk-mode select,
body.kiosk-mode [role="button"],
body.kiosk-mode .flickity-button,
body.kiosk-mode .flickity-prev-next-button,
#pcs-yearbook-search-container button,
#pcs-yearbook-search-container a:not(.pcs-cascading-card),
#pcs-yearbook-search-container input,
#pcs-yearbook-search-container select,
#pcs-yearbook-search-container [role="button"] {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-focus-ring-color: transparent !important;
  outline: none !important;
  outline-style: none !important;
}

/* Remove focus styles that may appear after tap */
body.kiosk-mode button:focus,
body.kiosk-mode a:focus,
body.kiosk-mode input:focus,
body.kiosk-mode select:focus,
body.kiosk-mode [role="button"]:focus,
body.kiosk-mode .flickity-button:focus,
#pcs-yearbook-search-container button:focus,
#pcs-yearbook-search-container a:not(.pcs-cascading-card):focus,
#pcs-yearbook-search-container [role="button"]:focus {
  outline: none !important;
}

/* Remove active/pressed state shadows */
body.kiosk-mode button:active,
body.kiosk-mode a:active,
body.kiosk-mode [role="button"]:active,
body.kiosk-mode .flickity-button:active,
#pcs-yearbook-search-container button:active,
#pcs-yearbook-search-container a:not(.pcs-cascading-card):active,
#pcs-yearbook-search-container [role="button"]:active {
  outline: none !important;
}

/* Ensure touch-action allows Flickity gestures but blocks unwanted behaviors */
#pcs-yearbook-search-container {
  touch-action: pan-x pan-y; /* Allow horizontal/vertical panning for Flickity */
}

/* Allow text input in form fields only */
#pcs-yearbook-search-container input[type="text"],
#pcs-yearbook-search-container input[type="search"],
#pcs-yearbook-search-container textarea {
  -webkit-user-select: text !important;
  -moz-user-select: text !important;
  -ms-user-select: text !important;
  user-select: text !important;
}

/* ========================================
   3. MAIN CONTAINER & LAYOUT
   ======================================== */
.pcs-yearbook-search {
  font-family: 'Arial', sans-serif;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 20px;
  color: var(--pcs-white);
  background-color: var(--pcs-primary-blue);
  border-radius: var(--pcs-border-radius);
  box-shadow: var(--pcs-shadow);
  box-sizing: border-box;
}

/* ========================================
   4. TYPOGRAPHY
   ======================================== */
.pcs-yearbook-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  text-align: center;
  color: var(--pcs-white);
  background: transparent !important;
}

.pcs-yearbook-description {
  font-size: 1rem;
  text-align: center;
  margin-bottom: 2rem;
  line-height: 1.5;
}

.pcs-yearbook-results-title {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
  color: var(--pcs-white);
}

/* ========================================
   5. FORM ELEMENTS
   ======================================== */
.pcs-yearbook-form-group {
  margin-bottom: 1rem;
}

/* Side-by-side layout for filters */
.pcs-yearbook-filters-row {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.pcs-yearbook-filter-school {
  flex: 2; /* 2/3 width */
}

.pcs-yearbook-filter-year {
  flex: 1; /* 1/3 width */
}

/* Ensure dropdowns in the filters row don't have bottom margin */
.pcs-yearbook-filters-row .pcs-yearbook-form-group {
  margin-bottom: 0;
}

/* Mobile responsive - stack vertically on small screens */
@media (max-width: 768px) {
  .pcs-yearbook-filters-row {
    flex-direction: column;
    gap: 1rem;
  }
  
  .pcs-yearbook-filter-school,
  .pcs-yearbook-filter-year {
    flex: 1;
  }
}

/* Form Layout */

.pcs-yearbook-form-group.first-row {
  display: flex;
  column-gap: 20px;
  flex-direction: row;
  width: 100%;
}

/* Text Search Field */
.pcs-yearbook-text-search {
  position: relative;
  width: 100%;
}

/* Search Input Field */
#search-query {
  width: 100%;
  padding: 12px 24px;
  background-color: var(--pcs-secondary-blue);
  color: var(--pcs-white);
  border: none;
  border-radius: 74px;
  font-size: 37px;
  font-family: var(--pcs-font-family);
  font-weight: 400;
  line-height: 1.35em;
  box-sizing: border-box;
  height: 110px;
  transition: var(--pcs-transition);
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  margin-bottom: 1rem;
}

#search-query:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

#search-query::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

/* Select2 Custom Styling - Match Text Search Field */
.pcs-yearbook-search .select2-container {
  width: 100% !important;
  margin-bottom: 1rem;
}

.pcs-yearbook-search .select2-selection--single {
  background-color: #2a4683 !important;
  border: none !important;
  border-radius: 74px !important;
  height: 110px !important;
  padding: 12px 24px !important;
  color: #fff !important;
  transition: all 0.3s ease !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
}

.pcs-yearbook-search .select2-container--default .select2-selection--single:hover,
.pcs-yearbook-search .select2-container--default.select2-container--open .select2-selection--single {
  background-color: #2a4683 !important;
}

/* Select2 Dropdown Styling */
.select2-container {
  width: 100% !important;
  margin-bottom: 1rem;
}

.select2-selection {
  background-color: var(--pcs-secondary-blue) !important;
  border: none !important;
  border-radius: 25px !important;
  color: var(--pcs-white) !important;
  font-size: 37px !important;
  padding: 8px 16px !important;
  height: 85px !important;
  display: flex !important;
  align-items: center !important;
  box-sizing: border-box !important;
  transition: var(--pcs-transition) !important;
}

.select2-selection:focus {
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3) !important;
}

.select2-selection__rendered {
  color: var(--pcs-white) !important;
  line-height: 1 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.select2-selection__placeholder {
  color: rgba(255, 255, 255, 0.7) !important;
}

.select2-selection__arrow {
  height: 100% !important;
  right: 16px !important;
  top: 0 !important;
  width: 20px !important;
}

.select2-selection__arrow b {
  border-color: var(--pcs-white) transparent transparent transparent !important;
  border-style: solid !important;
  border-width: 6px 6px 0 6px !important;
  height: 0 !important;
  left: 50% !important;
  margin-left: -6px !important;
  margin-top: -3px !important;
  position: absolute !important;
  top: 50% !important;
  width: 0 !important;
}

.select2-dropdown {
  background-color: var(--pcs-secondary-blue) !important;
  border: none !important;
  border-radius: var(--pcs-border-radius) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  margin-top: 4px !important;
}

.select2-results {
  background-color: var(--pcs-secondary-blue) !important;
}

.select2-results__option {
  background-color: var(--pcs-secondary-blue) !important;
  color: var(--pcs-white) !important;
  padding: 6px 10px !important;
  font-size: .7em !important;
  transition: background-color 0.2s !important;
}

.select2-results__option:hover,
.select2-results__option--highlighted {
  background-color: #3a5693 !important;
  color: var(--pcs-white) !important;
}

.select2-results__option[aria-selected="true"] {
  background-color: var(--pcs-primary-blue) !important;
  color: var(--pcs-white) !important;
}

.select2-search {
  padding: 8px !important;
}

.select2-search__field {
  background-color: var(--pcs-primary-blue) !important;
  border: none !important;
  border-radius: 4px !important;
  color: var(--pcs-white) !important;
  padding: 8px 12px !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.select2-search__field:focus {
  outline: none !important;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3) !important;
}

.select2-search__field::placeholder {
  color: rgba(255, 255, 255, 0.7) !important;
}

.pcs-yearbook-search .select2-container--default .select2-selection--single .select2-selection__clear {
  color: rgba(255, 255, 255, 0.7) !important;
  cursor: pointer !important;
  float: right !important;
  font-weight: bold !important;
  margin-right: 24px !important;
  font-size: 24px !important;
  line-height: 1 !important;
}

.pcs-yearbook-search .select2-container--default .select2-selection--single .select2-selection__clear:hover {
  color: #fff !important;
}
/* 
.pcs-icon-menu-nav {
  display: flex;
  justify-content: center;
  gap: 60px;
  margin: 0!important;
} */

/* Buttons */
.pcs-yearbook-search-button {
  width: 250px;
  margin: 0 auto;
  padding: 12px 24px;
  background-color: #fff;
  color: #333 !important;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  text-transform: none;
  transition: all 0.3s ease;
  box-shadow: none;
  display: block;
  box-sizing: border-box;
  letter-spacing: normal;
  line-height: 1em!important;
  height: 85px;
}

.pcs-yearbook-search-button:focus,
.pcs-yearbook-search-button:focus-visible {
  outline: none !important;
  box-shadow: none !important;
  background-color: #f0f0f0;
}

.pcs-yearbook-search-button:hover {
  background-color: #f0f0f0;
  transform: none;
  box-shadow: none;
}

.pcs-yearbook-search-button:active {
  transform: none;
  box-shadow: none;
  background-color: #e6e6e6;
}

.pcs-yearbook-button {
  padding: 8px 16px;
  background-color: #2a4683;
  color: #fff;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
}

.pcs-yearbook-button:hover {
  background-color: #3a5693;
}

.pcs-yearbook-button-icon {
  display: flex;
  align-items: center;
  margin-right: 8px;
}

.pcs-yearbook-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 1.5rem;
}

/* Yearbook Results Container */
.pcs-yearbook-grid {
  width: 100%;
  max-width: 1800px;
  margin: 2rem auto 0;
  box-sizing: border-box;
  width: 100%;
}

/* Yearbook Section */
.pcs-yearbook-section {
  width: 100%;
  margin-bottom: 3rem;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
}

/* Carousel Page Number */
.pcs-carousel-page-number {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px!important;
  line-height:1.6em;
  color: #fff;
  padding: 5px 0;
  margin: 0;
  z-index: 10;
}
.pcs-carousel-toggle-btn {
  display: inline-block;
  margin-left: 15px;
  margin-bottom: 0;
  margin-top: 0;
  padding: 4px 14px;
  background: #fff !important;
  border: 2px solid #f05a29 !important;
  border-radius: 5px !important;
  font-size: 0.98em;
  font-family: inherit;
  color: #f05a29 !important;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  box-shadow: none !important;
  outline: 2px solid transparent;
  appearance: none !important;
}
.pcs-carousel-toggle-btn:hover, .pcs-carousel-toggle-btn:focus, .pcs-carousel-toggle-btn:active {
  background: #f05a29 !important;
  color: #fff !important;
  border-color: #f05a29 !important;
  outline: 2px solid #f05a29;
}

/* Filter icon in toggle button */
.pcs-carousel-toggle-btn .pcs-filter-icon {
  vertical-align: middle;
  margin-right: 4px;
  margin-top: -2px;
}

/* Filtered view - hide non-matching cells */
.pcs-flickity-carousel.pcs-filtered-view .carousel-cell:not(.pcs-search-match) {
  display: none !important;
}

/* Highlight matching pages with subtle indicator */
.pcs-flickity-carousel .carousel-cell.pcs-search-match {
  position: relative;
}

.pcs-flickity-carousel .carousel-cell.pcs-search-match::after {
  content: '';
  position: absolute;
  top: 5px;
  right: 5px;
  width: 12px;
  height: 12px;
  background: #f05a29;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* Flickity button restyle */
.pcs-flickity-carousel .flickity-button {
  background-color: transparent!Important;
  box-shadow: none !important;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  bottom: -170px;
  height: 78px!important;
  top: auto;
  content: '';
  display: block;
  width: 78px!important;

  svg {
    display: none;
  }
}

.flickity-prev-next-button.previous {
  background: url(https://pcskiosk.wpenginepowered.com/wp-content/uploads/2025/11/Arrow-Left-Circle-1.svg);
  left: calc(45vw - 78px)!important;
}


.flickity-prev-next-button.next {
  background: url(https://pcskiosk.wpenginepowered.com/wp-content/uploads/2025/11/Arrow-Left-Circle-3.svg);
  right: calc(45vw - 78px)!important;
}

.pcs-carousel-results-bar {
  margin-bottom: 16px;
  padding: 8px 12px;
  text-align: center;
  background: #e8f4fc;
  border-radius: 6px;
  font-size: 1.1em;
}
.pcs-carousel-results-label {
  font-weight: bold;
  margin-right: 8px;
}
.pcs-carousel-results-bar .pcs-carousel-result-btn {
  margin: 0 2px !important;
  padding: 2px 7px !important;
  border: none !important;
  border-radius: 4px !important;
  background: #eee !important;
  cursor: pointer !important;
  font-size: 0.85em !important;
  font-family: inherit !important;
  font-weight: normal !important;
  box-shadow: none !important;
  outline: none !important;
  color: #222 !important;
  transition: background 0.15s, color 0.15s;
  line-height: 1.2 !important;
  appearance: none !important;
}
.pcs-carousel-results-bar .pcs-carousel-result-btn.active {
  background: #f05a29 !important;
  color: #fff !important;
  font-weight: bold !important;
  box-shadow: 0 2px 8px rgba(240,90,41,0.08) !important;
}
.pcs-carousel-results-bar .pcs-carousel-result-btn:hover,
.pcs-carousel-results-bar .pcs-carousel-result-btn:focus {
  background: #f05a29 !important;
  color: #fff !important;
}
.pcs-carousel-result-btn.active {
  background: #f05a29;
  color: #fff;
  font-weight: bold;
  box-shadow: 0 2px 8px rgba(240,90,41,0.08);
}
.pcs-carousel-result-btn:hover,
.pcs-carousel-result-btn:focus {
  background: #f05a29;
  color: #fff;
}





.carousel-cell {
  display: inline-block;
  vertical-align: top;
  /* No width, shrink to fit content */
  margin: 8px 0;
}

.carousel-cell[data-highlight="1"] .pcs-carousel-page-number, .highlighted .pcs-carousel-page-number {
  background-color: rgba(240, 90, 41, 0.75)!important;
}

.pcs-flickity-carousel {
  width: 100vw!important;
  /* width: calc(100vw - 85px); */
  /* max-width: 1200px; */
  margin: 0 auto 2em auto;
}
.carousel-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  vertical-align: top;
  width: auto;
  max-width: 100%;
  margin: 0 5px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  overflow: hidden;
  position: relative;
  text-align: center;
  /* Set consistent height for all cells - this is key */
  height: auto;
}

.pcs-yearbook-carousel-img {
  width: auto;
  height: auto;
  /* Force all images to the same height regardless of aspect ratio */
  max-height: 45dvh !important;
  height: 45dvh !important;
  max-width: 100%;
  object-fit: contain;
  background: #f5f5f5;
  flex-shrink: 0;
  /* Center the image within its container */
  margin: auto;
}
.pcs-carousel-page-number {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  text-align: center;
  background: rgba(0,0,0,0.5);
  color: #fff;
  padding: 4px 0;
  border-radius: 0 0 8px 8px;
  font-size: 1.1em;
}









.pcs-yearbook-section h2 {
  color: #fff;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 10px;
}

/* Yearbook Pages Grid */
.pcs-yearbook-pages {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 2rem;
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 20px;
  box-sizing: border-box;
  width: 100%;
}

/* Yearbook Page Item */
.pcs-yearbook-page {
  background: #2a4683;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  max-width: 100%;
  margin: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.pcs-yearbook-page:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.pcs-yearbook-page-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pcs-yearbook-page-thumbnail {
  width: 100%;
  height: 280px;
  background-color: #1c3564;
  position: relative;
  overflow: hidden;
}

.pcs-yearbook-page-thumbnail img {
  width: 100%;
  height: 96%;
  object-fit: cover;
  object-position: center;
  display: block;
  margin-top: 2%;
  margin-bottom: 2%;
}

.pcs-yearbook-page-info {
  padding: 15px;
  background: #2a4683;
  color: #fff;
}

.pcs-yearbook-page-title {
  font-size: 28px!important;
  margin: 0 0 5px 0;
  color: #fff;
}

.pcs-yearbook-page-school {
  font-size: 0.85rem;
  color: #a3b4d8;
  margin: 0;
}

/* Results Grid */
.pcs-yearbook-grid {
  margin-top: 2rem;
  opacity: 1;
  transform: none;
}

.pcs-yearbook-grid-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background-color: #2a4683;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s;
  cursor: pointer;
}

.pcs-yearbook-grid-item:hover {
  transform: translateY(-5px);
}

.pcs-yearbook-grid-item-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  object-position: center;
}

.pcs-yearbook-grid-item-info {
  padding: 12px;
}

.pcs-yearbook-grid-item-title {
  font-size: 1rem;
  font-weight: bold;
  margin-bottom: 4px;
}

.pcs-yearbook-grid-item-meta {
  font-size: 0.85rem;
  color: #ccc;
}

/* School Grouping for All Yearbooks Grid */
.pcs-yearbook-school-group {
  margin-bottom: 3rem;
}

.pcs-yearbook-school-header {
  color: #fff;
  font-size: 1.8rem;
  font-weight: 600;
  margin: 0 0 1.5rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  font-family: 'Fieldwork', Arial, Helvetica, sans-serif;
}

.pcs-yearbook-school-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  align-items: stretch; /* Ensure all items stretch to the same height */
}

/* Responsive adjustments for school groups */
@media (max-width: 768px) {
  .pcs-yearbook-school-header {
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .pcs-yearbook-school-group {
    margin-bottom: 2rem;
  }
  
  .pcs-yearbook-school-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 15px;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .pcs-yearbook-school-header {
    font-size: 1.3rem;
  }
  
  .pcs-yearbook-school-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    align-items: stretch;
  }
}

/* Cascading Card Layout */
.pcs-cascading-yearbooks {
  width: 100%;
  margin: 2rem 0 0 0;
  box-sizing: border-box;
}

.pcs-cascading-row {
  background: #5A6A8B;
  border-radius: 30px;
  padding: 1rem;
  margin-bottom: 2rem;
  position: relative;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.pcs-cascading-school-label {
  color: #fff;
  font-size: 1.8rem;
  font-weight: 600;
  font-family: 'Fieldwork', Arial, Helvetica, sans-serif;
  display: block;
  width:100%!important;
  margin: 0;
  padding: 0 0 0 20px;
  background: transparent;
  border-radius: 0;
  border: none;
  backdrop-filter: none;
  position: relative;
  z-index: 10;
}

.pcs-cascading-cards-container {
  overflow-x: auto;
  overflow-y: hidden;
  position: relative;
  height: auto;
  min-height: 280px; /* Minimum height to accommodate search result cards with page numbers */
  cursor: grab;
  /* Show scrollbar for easy navigation */
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
  width: 100%;
  padding: 5px 0;
  border-radius: 8px;
}

.pcs-cascading-cards-container::-webkit-scrollbar {
  height: 8px;
}

.pcs-cascading-cards-container::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.pcs-cascading-cards-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 4px;
}

.pcs-cascading-cards-container::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.5);
}

.pcs-cascading-cards-container.dragging {
  cursor: grabbing;
  user-select: none;
}

.pcs-cascading-cards {
  display: flex;
  height: 100%;
  align-items: center;
  padding: 20px 40px 20px 20px;
  position: relative;
  min-width: fit-content;
}

.pcs-cascading-card {
  position: relative;
  flex-shrink: 0;
  width: 160px;
  height: 223px; /* Fixed height for 158:220 aspect ratio consistency */
  background: transparent; /* Change to transparent */
  margin-right: -80px; /* Overlap cards by 50% */
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-origin: center center;
  z-index: 1;
  text-decoration: none;
  border-radius: 0; /* No rounded corners for realistic book look */
  overflow: hidden;
  /* Subtle book shadows for dimension - casting left */
  box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.2), -4px 4px 8px rgba(0, 0, 0, 0.15), inset 2px 0 3px rgba(0, 0, 0, 0.12) !important;
  border-left: 2px solid #333;
  /* Prevent dragging individual images */
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
}

.pcs-cascading-card:last-child {
  margin-right: 0; /* No overlap for last card */
}

.pcs-cascading-card:hover {
  transform: scale(1.15) translateY(-10px);
  z-index: 100;
  /* Enhanced book shadow on hover - casting left */
  box-shadow: 
    -6px 4px 8px rgba(0, 0, 0, 0.25),
    -12px 12px 24px rgba(0, 0, 0, 0.2),
    -20px 20px 40px rgba(0, 0, 0, 0.15),
    inset 3px 0 6px rgba(0, 0, 0, 0.15);
}

.pcs-cascading-card:hover + .pcs-cascading-card {
  transform: translateX(40px); /* Push next card away on hover */
}

.pcs-cascading-card-image {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
  background: #1c3564; /* Fallback background for small images */
  border-radius: 0; /* No rounded corners */
  display: flex; /* Make it a flex container */
  align-items: center; /* Center the image vertically */
  justify-content: center; /* Center the image horizontally */
}

.pcs-cascading-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Fill the card, may crop edges */
  object-position: top center; /* Align to top so important content isn't cut off */
  image-rendering: auto; /* Let browser choose best rendering */
  background: #1c3564; /* Background while loading */
  display: block; /* Ensure no inline spacing */
  /* Remove image scaling transition for realistic book feel */
  /* Prevent individual image dragging */
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

/* Back to Search Results Button */
.pcs-yearbook-back-to-search {
  margin-bottom: 20px;
  padding: 15px 20px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-left: 4px solid #f05a29;
}

.pcs-yearbook-back-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: #f05a29;
  color: #fff !important;
  text-decoration: none !important;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.pcs-yearbook-back-button:hover {
  background: #e04a1f;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(240, 90, 41, 0.3);
  text-decoration: none !important;
  color: #fff !important;
}

.pcs-yearbook-back-icon {
  font-size: 16px;
  font-weight: bold;
}

.pcs-yearbook-search-context {
  margin-top: 8px;
  font-size: 12px;
  color: #666;
  font-style: italic;
}

.pcs-cascading-year-overlay {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0, 0, 0, 0.8);
  color: #fff;
  padding: 4px 8px;
  font-size: 1.2rem;
  font-weight: 700;
  text-align: center;
  font-family: 'Fieldwork', Arial, Helvetica, sans-serif;
  border-radius: 11px; 
  min-width: 32px;
  backdrop-filter: blur(4px);
}

/* Responsive Design for Cascading Layout */
@media (max-width: 1024px) {
  .pcs-cascading-school-label {
    font-size: 1.5rem;
    width: 100px;
    margin-right: 1.5rem;
  }

  .pcs-cascading-card {
    width: 140px;
    height: 195px; /* Maintain 158:220 aspect ratio for 140px width */
    margin-right: -70px;
    box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.2), -4px 4px 8px rgba(0, 0, 0, 0.15), inset 2px 0 3px rgba(0, 0, 0, 0.12) !important;
    border-left: 2px solid #333;
  }

  .pcs-search-result-card {
    height: 195px !important; /* Match regular card height */
  }

  .pcs-cascading-cards-container {
    min-height: 260px; /* Increased container height to give more vertical space */
  }
}

@media (max-width: 768px) {
  .pcs-cascading-row {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 2.5rem;
    min-height: auto;
  }

  .pcs-cascading-school-label {
    writing-mode: horizontal-tb;
    text-orientation: initial;
    width: 100%;
    min-width: auto;
    margin-right: 0;
    margin-bottom: 0!important;
    text-align: left;
    font-size: 1.4rem;
    padding: 0 1rem 0;
  }

  .pcs-cascading-cards-container {
    width: 100%;
    min-height: 220px; /* Increased minimum height for search results */
  }

  .pcs-cascading-card {
    width: 120px;
    height: 167px; /* Maintain 158:220 aspect ratio for 120px width */
    margin-right: -60px;
    box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.2), -4px 4px 8px rgba(0, 0, 0, 0.15), inset 2px 0 3px rgba(0, 0, 0, 0.12) !important;
    border-left: 2px solid #333;
  }

  .pcs-search-result-card {
    height: 167px !important; /* Match regular card height */
  }

  .pcs-cascading-card:hover {
    transform: scale(1.1) translateY(-8px);
  }

  .pcs-cascading-card:hover + .pcs-cascading-card {
    transform: translateX(30px);
  }
}

@media (max-width: 480px) {
  .pcs-cascading-school-label {
    font-size: 1.2rem;
    padding: 0.6rem 0.8rem;
  }

  .pcs-cascading-card {
    width: 100px;
    height: 150px;
    margin-right: -50px;
    box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.15), -4px 4px 8px rgba(0, 0, 0, 0.1), inset 2px 0 3px rgba(0, 0, 0, 0.08) !important;
  }

  .pcs-search-result-card {
    height: 150px !important; /* Match regular card height */
  }

  .pcs-cascading-cards-container {
    min-height: 210px; /* Increased container height to give more vertical space */
  }

  .pcs-cascading-year-overlay {
    font-size: 0.85rem;
    padding: 6px 8px;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .pcs-cascading-card:hover {
    transform: none;
    z-index: 1;
  }
  
  .pcs-cascading-card:hover + .pcs-cascading-card {
    transform: none;
  }
  
  .pcs-cascading-card:active {
    transform: scale(1.05);
    z-index: 100;
  }
}

/* Accessibility improvements */
.pcs-cascading-card:focus,
.pcs-cascading-card:focus-visible {
  outline: none !important;
}

/* Keep the active/press animation for visual feedback */
.pcs-cascading-card:active {
  outline: none !important;
  transform: scale(1.05) translateY(-5px);
  z-index: 100;
}

/* Prevent touch highlight and selection on touch devices */
.pcs-cascading-card,
.pcs-cascading-card *,
.pcs-cascading-cards-container {
  -webkit-tap-highlight-color: transparent !important;
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .pcs-cascading-card {
    transition: none;
  }
  
  .pcs-cascading-card:hover {
    transform: none;
  }
  
  .pcs-cascading-card-image img {
    transition: none;
  }
}

/* Modal */
.pcs-yearbook-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s;
}

.pcs-yearbook-modal.show {
  display: flex;
  opacity: 1;
}

.pcs-yearbook-modal-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.8);
}

.pcs-yearbook-modal-content {
  position: relative;
  width: 90%;
  max-width: 800px;
  max-height: 90dvh;
  margin: auto;
  background-color: #1c3564;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.3s, transform 0.3s;
}

.pcs-yearbook-modal.show .pcs-yearbook-modal-content {
  opacity: 1;
  transform: scale(1);
}

.pcs-yearbook-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid #2a4683;
}

.pcs-yearbook-modal-title {
  font-size: 1.5rem;
  margin: 0;
  color: #fff;
}

.pcs-yearbook-modal-close {
  display: flex;
  align-items: center;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 6px 12px;
  border-radius: 20px;
  transition: background-color 0.3s;
}

.pcs-yearbook-modal-close:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.pcs-yearbook-modal-close-icon {
  display: flex;
  align-items: center;
  margin-right: 4px;
}

.pcs-yearbook-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.pcs-yearbook-modal-image-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.pcs-yearbook-modal-image {
  max-width: 100%;
  max-height: 65dvh;
  object-fit: contain;
}

.pcs-yearbook-modal-footer {
  padding: 16px;
  border-top: 1px solid #2a4683;
  display: flex;
  justify-content: flex-end;
}

.pcs-yearbook-button-send {
  background-color: #fff;
  color: #1c3564;
}

.pcs-yearbook-button-send:hover {
  background-color: #f0f0f0;
}

/* Error Message */
.pcs-yearbook-error {
  background-color: #f8d7da;
  color: #721c24;
  padding: 15px;
  margin: 20px 0;
  border-radius: 8px;
  border-left: 4px solid #f5c6cb;
}

.pcs-yearbook-error p {
  margin: 0;
  font-weight: 500;
}

/* Responsive Adjustments */

/* --- Yearbook Results Row Layout (Overrides & New) --- */
.pcs-yearbook-list {
  display: block;
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto 0;
  padding: 0 20px;
  box-sizing: border-box;
}
.pcs-yearbook-result-row {
  display: flex;
  align-items: flex-start;
  gap: 32px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  margin-bottom: 32px;
  padding: 24px 32px;
  transition: box-shadow 0.2s;
}
.pcs-yearbook-result-row:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.13);
}
.pcs-yearbook-cover-col {
  flex: 0 0 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 100px;
  max-width: 140px;
}
.pcs-yearbook-cover-img {
  width: 100px;
  height: 140px;
  object-fit: cover;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  background: #f5f7fa;
}

/* Yearbook Grid Items */
.pcs-yearbook-item {
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important;
  text-decoration: none;
  color: inherit;
  background: #fff !important;
  border-radius: 12px !important;
  overflow: hidden !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  position: relative;
}

.pcs-yearbook-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  color: inherit;
}

.pcs-yearbook-cover {
  position: relative;
  width: 100% !important;
  aspect-ratio: 1 / 1.4 !important; /* Book-like aspect ratio */
  overflow: hidden;
  background: #f5f7fa !important;
  flex-shrink: 0 !important;
}

.pcs-yearbook-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pcs-yearbook-year-overlay {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(28, 53, 100, 0.9);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pcs-yearbook-info {
  display: none !important; /* Hide the info strip completely */
}

.pcs-yearbook-school {
  margin: 0 0 4px;
  font-family: 'Fieldwork', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 1rem;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

/* Search Result Block - Unified Layout */
.pcs-search-result-item {
  display: block;
  height: 100%;
}

.pcs-search-result-block {
  display: flex;
  flex-direction: column;
  height: 100%;
  text-decoration: none;
  color: inherit;
  background: #2B4683;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
  position: relative;
}

.pcs-search-result-block:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  color: inherit;
}

.pcs-search-result-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1.5; /* Book-like aspect ratio */
  overflow: hidden;
  background: #f5f7fa;
}

.pcs-search-result-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pcs-search-result-year {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(28, 54, 100, 0.9);
  color: #fff;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 600;
  backdrop-filter: blur(4px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.pcs-search-result-info {
  padding: 16px;
  background: #2B4683;
  color: #fff;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.pcs-search-result-school {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 8px 0;
  line-height: 1.3;
}


.pcs-page-number-link {
  color: #fff;
  text-decoration: underline;
  transition: color 0.2s;
}

.pcs-page-number-link:hover {
  color: #a8c5ff;
  text-decoration: none;
}

/* No Results Message */
.pcs-yearbook-no-results {
  text-align: center;
  padding: 40px 20px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin: 20px 0;
}

/* Pagination Controls - Strong overrides */
.pcs-yearbook-pagination {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 20px !important;
  margin: 30px 0 !important;
  padding: 20px !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-radius: 8px !important;
}

.pcs-yearbook-pagination-button {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  padding: 12px 20px !important;
  background: #2a4683 !important;
  color: #fff !important;
  border: none !important;
  border-radius: 25px !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.3s ease !important;
  text-decoration: none !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  min-width: 120px !important;
  justify-content: center !important;
}

.pcs-yearbook-pagination-button:hover:not(:disabled) {
  background: #3a5693 !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15) !important;
}

.pcs-yearbook-pagination-button:disabled {
  background: rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.5) !important;
  cursor: not-allowed !important;
  transform: none !important;
  box-shadow: none !important;
}

.pcs-yearbook-pagination-info {
  color: #fff !important;
  font-size: 1rem !important;
  font-weight: 500 !important;
  padding: 0 15px !important;
  margin: 0 !important;
}

.pcs-yearbook-button-icon {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.pcs-yearbook-button-icon svg {
  width: 16px !important;
  height: 16px !important;
  fill: currentColor !important;
}
.pcs-yearbook-info-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.pcs-yearbook-row-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #1c3564;
}
.pcs-yearbook-row-pages {
  font-size: 1.07rem;
  color: #2a4683;
  margin-bottom: 0;
  line-height: 1.7;
}
.pcs-yearbook-row-pages a {
  color: #0073aa;
  text-decoration: underline;
  margin-right: 6px;
  transition: color 0.2s;
}
.pcs-yearbook-row-pages a:hover {
  color: #005177;
}
@media (max-width: 700px) {
  .pcs-yearbook-result-row {
    flex-direction: column;
    align-items: stretch;
    padding: 18px 10px;
    gap: 16px;
  }
  .pcs-yearbook-cover-col {
    margin-bottom: 12px;
    justify-content: flex-start;
  }
  .pcs-yearbook-cover-img {
    width: 80px;
    height: 110px;
  }
}

@media (max-width: 768px) {
  .pcs-yearbook-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .pcs-yearbook-actions {
    flex-direction: column;
    gap: 10px;
  }

  .pcs-yearbook-modal-content {
    width: 95%;
  }
}

/* Search result cards with page numbers */
/* Search result cards with page numbers */
.pcs-search-result-card {
  /* Match the regular cascading card dimensions */
  height: 223px !important;
  flex-direction: column;
  display: flex;
  align-items: flex-start; /* Top align content */
  justify-content: flex-start;
}

.pcs-search-result-card .pcs-cascading-card-image {
  /* Ensure image takes up full card height */
  height: 100%;
  margin-bottom: 0;
  position: relative; /* Ensure absolute positioning context for page numbers */
}

.pcs-search-page-numbers {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  font-size: 12px !important;
  line-height: 1.4em;
  color: #fff; /* White text color */
  padding: 8px 10px;
  text-align: left; /* Left justify the page numbers */
  margin: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.8) 60%, transparent 100%);
  backdrop-filter: blur(4px);
  width: 100%;
  box-sizing: border-box;
  z-index: 2; /* Ensure it's above the image */
  font-weight: 500;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
  min-height: 35px; /* Ensure enough space for page numbers */
}

/* Adjust cascading cards container for variable heights */
.pcs-cascading-cards {
  align-items: flex-start !important; /* Override to top-align cards */
}

/* Remove fixed height constraint for search result cards */
.pcs-cascading-yearbooks .pcs-search-result-card {
  /* Removed conflicting height rules to maintain consistent 223px height */
}

/* Force hide pagination for search results */
.pcs-yearbook-search .pcs-yearbook-pagination {
  display: none !important;
}

#pcs-yearbook-pagination {
  display: none !important;
}

/* Results count display */
.pcs-results-count {
  color: var(--pcs-white);
  font-size: 1.1rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
  text-align: center;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: var(--pcs-border-radius);
  backdrop-filter: blur(5px);
}

/* FORCE OVERRIDE - Remove Blue Strips and Ensure Consistent Heights */
.pcs-yearbook-item .pcs-yearbook-info,
.pcs-yearbook-item > .pcs-yearbook-info,
a.pcs-yearbook-item .pcs-yearbook-info {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.pcs-yearbook-item,
a.pcs-yearbook-item {
  background: #fff !important;
  height: auto !important;
  min-height: 200px !important;
}

.pcs-yearbook-school-grid {
  align-items: stretch !important;
}

.pcs-yearbook-cover {
  aspect-ratio: 1 / 1.4 !important;
  flex-shrink: 0 !important;
}

/* Force remove blue backgrounds from cascading cards */
.pcs-cascading-card,
.pcs-cascading-card-image,
.pcs-search-result-card {
  background: transparent !important;
}

.pcs-cascading-card-image img {
  display: block !important;
  line-height: 0 !important;
}

/* ========================================
   YEAR RANGE SLIDER STYLING
   ======================================== */

/* Year Range Slider Container */
.pcs-yearbook-filter-year {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.pcs-yearbook-filter-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--pcs-primary-blue, #1c3564);
  margin-bottom: 0.25rem;
  display: block;
}

.pcs-year-range-slider {
  margin: 1rem 0;
  height: 8px;
  width: 85%;
}

/* noUiSlider Base Customization */
.noUi-target {
  background: #e0e0e0;
  border-radius: 4px;
  border: none;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.1);
}

.noUi-connect {
  background: #fff;
}

.noUi-origin {
  top: -6px;
}

/* noUiSlider Handles - Large for Touchscreen */
.noUi-handle {
  width: 32px !important;
  height: 32px !important;
  border-radius: 50%;
  /* border: 3px solid #fff; */
  background: white;
  /* box-shadow: 0 2px 8px rgba(0,0,0,0.2); */
  cursor: grab;
  touch-action: none;
  right: -16px !important; /* Center on track */
}

.noUi-handle:active {
  cursor: grabbing;
  transform: scale(1.1);
}

.noUi-handle::before,
.noUi-handle::after {
  display: none; /* Remove default handle dots */
}

/* noUiSlider Tooltips */
.noUi-tooltip {
  background-color: var(--pcs-secondary-blue)!important;
  font-size: 30px;
  font-family: "Fieldwork", sans-serif;
  font-weight: 400;
  background: transparent;
  color: white;
  border: none;
  height: 60px;
  line-height: 60px;
  padding: 0px 0 8px;
  border-radius: 50px;
  width: 110px;
}

.pcs-yearbook-form-group.pcs-yearbook-filter-year {
  align-items: flex-end;
}

/* Year Range Display */
.pcs-year-range-display {
  text-align: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--pcs-primary-blue, #1c3564);
  margin-top: 0.5rem;
}

/* Mobile/Tablet - Make Handles Larger */
@media (max-width: 768px) {
  .noUi-handle {
    width: 40px !important;
    height: 40px !important;
    right: -20px !important;
  }

  .pcs-year-range-slider {
    margin: 1.5rem 0;
  }
}

/* Smooth Fade Animations for Filtering */
.pcs-cascading-row,
.pcs-cascading-card {
  transition: opacity 0.2s ease-in-out;
}

/* Print Styles */
@media print {
  .pcs-year-range-slider,
  .pcs-year-range-display,
  .pcs-yearbook-filter-label {
    display: none !important;
  }
}


#yearbook_gallery_outer .flickity-slider {
  margin-left: 85px;
}

.pcs-yearbook-form-group.pcs-yearbook-filter-year {
  margin-top: 30px!important;
}