/* =====================================================
   CORE VARIABLES - MATCHING YOUR ABOUT PAGE
===================================================== */
:root {
  --primary: #0b2e4e;
  --secondary: #123f6b;
  --accent: #c9a14a;
  --soft-bg: #f4f7fb;
  --text-dark: #1f2933;
  --text-muted: #5f6c7b;
  --border: #e5e7eb;
}

/* =====================================================
   BASE STYLES - COMPACT
===================================================== */
body {
  font-family: "Montserrat", sans-serif;
  color: var(--text-dark);
  background-color: #ffffff;
  line-height: 1.6;
  scroll-behavior: smooth;
}

#library-root {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px 40px;
}

/* =====================================================
   COMPACT HERO SECTION - FIXED VISIBILITY
===================================================== */
.library-hero {
  position: relative;
  background: linear-gradient(
      135deg,
      rgba(11, 46, 78, 0.92),
      rgba(18, 63, 107, 0.92)
    ),
    url("../assets/images/library/hero-bg.jpg") center/cover no-repeat;
  color: #ffffff;
  padding: 3.5rem 0 2.5rem;
  margin: 1.5rem 0 2rem;
  border-radius: 12px;
  overflow: hidden;
  min-height: 400px;
  display: flex;
  align-items: center;
}

.library-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(11, 46, 78, 0.95),
    rgba(18, 63, 107, 0.9)
  );
  z-index: 1;
}

.library-hero-pattern {
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(
      90deg,
      transparent,
      transparent 39px,
      rgba(255, 255, 255, 0.03) 39px,
      rgba(255, 255, 255, 0.03) 40px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 39px,
      rgba(255, 255, 255, 0.03) 39px,
      rgba(255, 255, 255, 0.03) 40px
    );
  background-size: 40px 40px;
  opacity: 0.3;
  z-index: 2;
}

.floating-books {
  display: none; /* Hide for compact design */
}

.library-hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.library-hero-content h1 {
  font-size: 2.4rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.library-hero-content h1 i {
  color: var(--accent);
  font-size: 2.2rem;
}

.library-hero-content h2 {
  font-size: 1.3rem;
  font-weight: 500;
  color: #e5eaf0;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.library-hero-content p {
  font-size: 1.05rem;
  color: #d1dbe5;
  margin-bottom: 2rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.library-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin: 2rem auto;
  max-width: 800px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 1.25rem 1rem;
  text-align: center;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--accent);
}

.stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.25rem;
  font-family: "Montserrat", sans-serif;
}

.stat-label {
  font-size: 0.85rem;
  color: #e5eaf0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.btn-hero {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--accent), #d4b15e);
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.3s ease;
  border: none;
}

.btn-hero:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(201, 161, 74, 0.3);
  color: white;
}

.btn-hero-outline {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
}

.btn-hero-outline:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent);
}

/* =====================================================
   INTERNAL NAVIGATION - EXACTLY LIKE YOUR DESIGN
===================================================== */
.library-nav {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e5e7eb;
  z-index: 1000;
  position: sticky;
  top: 0;
  margin-bottom: 2rem;
}

.library-nav .nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.library-nav nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.75rem;
  padding: 0.85rem 0;
}

.library-nav a {
  position: relative;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  padding-bottom: 4px;
  font-size: 0.95rem;
}

.library-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s ease;
}

.library-nav a:hover::after {
  width: 100%;
}

/* =====================================================
   QUICK ACCESS BAR - REMOVE THIS OR HIDE IT
===================================================== */
.quick-access-bar {
  display: none !important;
}

/* =====================================================
   LIBRARY SECTIONS - COMPACT
===================================================== */
.library-section {
  background: white;
  border-radius: 12px;
  padding: 3rem 2.5rem;
  margin-bottom: 2.5rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border);
}

.library-section h2 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent);
}

.library-section h2 i {
  color: var(--accent);
  font-size: 1.6rem;
}

.section-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 800px;
}

.soft-bg {
  background: var(--soft-bg);
  border-color: rgba(0, 0, 0, 0.05);
}

/* =====================================================
   ABOUT FEATURES - COMPACT
===================================================== */
.about-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.feature {
  background: white;
  padding: 1.75rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.3s ease;
  border-left: 4px solid var(--accent);
}

.feature:hover {
  transform: translateY(-5px);
}

.feature i {
  font-size: 2rem;
  color: var(--secondary);
  margin-bottom: 1rem;
  display: block;
}

.feature h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.feature p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* =====================================================
   COLLECTIONS - COMPACT
===================================================== */
.collection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.collection-card {
  background: white;
  padding: 1.75rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border-top: 3px solid var(--accent);
}

.collection-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.collection-card i {
  font-size: 2.2rem;
  color: var(--secondary);
  margin-bottom: 1rem;
  display: block;
}

.collection-card h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.collection-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.collection-stats {
  display: flex;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.collection-stats span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--secondary);
  font-weight: 500;
  font-size: 0.85rem;
}

.collection-stats i {
  font-size: 0.9rem;
  color: var(--accent);
  margin: 0;
}

/* =====================================================
   DIGITAL PLATFORMS - COMPACT
===================================================== */
.digital-platforms {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.platform-card {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 1.75rem;
  border-radius: 10px;
  transition: all 0.3s ease;
}

.platform-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.platform-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.platform-icon i {
  font-size: 1.5rem;
  color: var(--accent);
}

.platform-card h4 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: white;
}

.platform-card p {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.platform-link {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.3s ease;
}

.platform-link:hover {
  color: white;
  gap: 8px;
}

.digital-features {
  margin-top: 2.5rem;
}

.digital-features h4 {
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
}

.digital-features h4 i {
  color: var(--accent);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
}

.feature-badge {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  color: var(--primary);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--border);
}

.feature-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  background: var(--primary);
  color: white;
}

.feature-badge i {
  font-size: 1.5rem;
  color: var(--secondary);
}

.feature-badge:hover i {
  color: var(--accent);
}

/* =====================================================
   SERVICES - COMPACT
===================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.service-card {
  background: white;
  padding: 1.75rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border-left: 4px solid var(--secondary);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.service-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  color: white;
  font-size: 1.3rem;
}

.service-card h4 {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 0.75rem;
}

.service-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.service-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.service-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-list li:last-child {
  border-bottom: none;
}

.service-list li::before {
  content: "•";
  color: var(--accent);
  font-weight: bold;
}

/* =====================================================
   RESEARCH PROCESS - COMPACT
===================================================== */
.research-process {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  align-items: center;
  gap: 1rem;
  margin: 2rem 0;
  background: var(--soft-bg);
  padding: 2rem;
  border-radius: 10px;
}

.process-step {
  text-align: center;
  padding: 1.5rem 1rem;
  background: white;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.process-step:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.step-number {
  width: 35px;
  height: 35px;
  background: linear-gradient(135deg, var(--accent), #d4b15e);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1rem;
  margin: 0 auto 0.75rem;
}

.process-step h4 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.process-step p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
}

.process-arrow {
  font-size: 1.3rem;
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.research-tools {
  margin-top: 2.5rem;
}

.research-tools h4 {
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
}

.research-tools h4 i {
  color: var(--accent);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.tool-item {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.tool-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  background: var(--primary);
  color: white;
}

.tool-item i {
  font-size: 1.5rem;
  color: var(--secondary);
}

.tool-item:hover i {
  color: var(--accent);
}

.tool-item span {
  font-weight: 500;
  font-size: 0.9rem;
  text-align: center;
}

/* =====================================================
   GALLERY - COMPACT
===================================================== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
}

.gallery-item {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  height: 180px;
  display: block;
  text-decoration: none;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  color: white;
  padding: 1rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-overlay h5 {
  font-size: 1rem;
  margin-bottom: 0.25rem;
  color: white;
}

.gallery-overlay p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.8rem;
  margin: 0;
}

.gallery-controls {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.gallery-btn {
  padding: 0.5rem 1.25rem;
  background: white;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.3s ease;
}

.gallery-btn:hover,
.gallery-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* =====================================================
   POLICIES & RULES - COMPACT
===================================================== */
.policies-accordion {
  margin-top: 1.5rem;
}

.accordion-item {
  border: none;
  margin-bottom: 1rem;
  border-radius: 8px !important;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.accordion-button {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  font-weight: 500;
  padding: 1rem 1.25rem;
  border: none;
  border-radius: 8px !important;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.accordion-button:not(.collapsed) {
  background: linear-gradient(135deg, var(--accent), #d4b15e);
  color: white;
  box-shadow: none;
}

.accordion-button::after {
  filter: brightness(0) invert(1);
}

.accordion-body {
  background: white;
  padding: 1.25rem;
  font-size: 0.95rem;
  line-height: 1.6;
}

.rule-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rule-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: var(--text-muted);
}

.rule-list li:last-child {
  border-bottom: none;
}

.rule-list i {
  color: var(--accent);
  font-size: 1rem;
  margin-top: 2px;
  flex-shrink: 0;
}

.borrowing-table {
  overflow-x: auto;
  margin-top: 1rem;
}

.borrowing-table table {
  width: 100%;
  border-collapse: collapse;
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.06);
}

.borrowing-table th {
  background: var(--primary);
  color: white;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.9rem;
}

.borrowing-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}

.borrowing-table tr:last-child td {
  border-bottom: none;
}

.borrowing-table tr:hover {
  background: var(--soft-bg);
}

/* =====================================================
   TIMINGS - COMPACT
===================================================== */
.timing-calendar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.timing-card {
  background: white;
  padding: 1.75rem;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  border-top: 3px solid var(--secondary);
}

.timing-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.timing-card h4 {
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 10px;
}

.timing-card h4 i {
  color: var(--accent);
}

.timing-schedule {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.day-time {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem;
  background: var(--soft-bg);
  border-radius: 6px;
}

.day {
  font-weight: 500;
  color: var(--primary);
  font-size: 0.95rem;
}

.time {
  font-weight: 500;
  color: var(--secondary);
  font-size: 0.9rem;
}

.time.badge {
  padding: 0.25rem 0.75rem;
  font-size: 0.8rem;
}

.holidays-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.holiday {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.75rem;
  background: var(--soft-bg);
  border-radius: 6px;
}

.holiday i {
  color: var(--accent);
  font-size: 1rem;
}

.holiday span {
  font-weight: 500;
  color: var(--primary);
  font-size: 0.95rem;
}

.extended-hours {
  margin-top: 2rem;
  display: flex;
  justify-content: center;
}

.extended-badge {
  display: flex;
  align-items: center;
  gap: 15px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 1rem 1.5rem;
  border-radius: 30px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.extended-badge:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.extended-badge i {
  font-size: 1.5rem;
  color: var(--accent);
}

.extended-badge strong {
  font-size: 0.95rem;
  display: block;
  margin-bottom: 0.25rem;
}

.extended-badge small {
  opacity: 0.9;
  font-size: 0.85rem;
}

/* =====================================================
   CONTACT SECTION - COMPACT
===================================================== */
.library-contact {
  position: relative;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  border-radius: 12px;
  padding: 3rem 2.5rem;
  color: white;
  overflow: hidden;
  margin-bottom: 2.5rem;
}

.library-contact-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(11, 46, 78, 0.9),
    rgba(18, 63, 107, 0.95)
  );
  z-index: 1;
}

.library-contact-content {
  position: relative;
  z-index: 2;
}

.library-contact h2 {
  font-size: 1.8rem;
  margin-bottom: 1.25rem;
  color: white;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: none;
  padding-bottom: 0;
}

.library-contact h2 i {
  color: var(--accent);
}

.contact-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: #d1dbe5;
  margin-bottom: 2rem;
  max-width: 800px;
}

.library-contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2.5rem;
}

.library-contact-card {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 1.75rem;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
}

.library-contact-card:hover {
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--accent);
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: rgba(201, 161, 74, 0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.contact-icon i {
  font-size: 1.5rem;
  color: var(--accent);
}

.library-contact-card h4 {
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  color: white;
}

.contact-name {
  font-size: 1rem;
  color: var(--accent);
  margin-bottom: 1rem;
  font-weight: 500;
}

.contact-detail {
  color: #d1dbe5;
  line-height: 1.6;
  font-size: 0.95rem;
}

.contact-detail i {
  color: var(--accent);
  margin-right: 8px;
  width: 16px;
}

.contact-form-section {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 1.75rem;
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.contact-form-section h4 {
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  color: white;
  display: flex;
  align-items: center;
  gap: 10px;
}

.contact-form-section h4 i {
  color: var(--accent);
}

.library-contact-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.library-contact-form input,
.library-contact-form select,
.library-contact-form textarea {
  padding: 0.75rem 1rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  color: white;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.library-contact-form input:focus,
.library-contact-form select:focus,
.library-contact-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.15);
  box-shadow: 0 0 0 2px rgba(201, 161, 74, 0.2);
}

.library-contact-form input::placeholder,
.library-contact-form textarea::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

.library-contact-form select option {
  background: var(--primary);
  color: white;
}

.submit-btn {
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--accent), #d4b15e);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  align-self: flex-start;
  margin-top: 0.5rem;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(201, 161, 74, 0.3);
}

/* =====================================================
   NEWSLETTER - COMPACT
===================================================== */
.library-newsletter {
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  border-radius: 12px;
  padding: 2.5rem;
  margin-bottom: 2.5rem;
  text-align: center;
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.newsletter-content {
  max-width: 600px;
  margin: 0 auto;
}

.library-newsletter h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.library-newsletter p {
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 1.5rem;
}

.newsletter-form {
  display: flex;
  gap: 1rem;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  transition: all 0.3s ease;
}

.newsletter-form input:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

.newsletter-form input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.newsletter-form button {
  padding: 0.75rem 1.5rem;
  background: var(--accent);
  color: var(--primary);
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.newsletter-form button:hover {
  background: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* =====================================================
   RESPONSIVE DESIGN
===================================================== */
@media (max-width: 1200px) {
  #library-root {
    max-width: 100%;
    padding: 0 20px 30px;
  }
}

@media (max-width: 992px) {
  .library-hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  .research-process {
    grid-template-columns: repeat(2, 1fr);
    grid-template-areas:
      "step1 step2"
      "arrow1 arrow2"
      "step3 step4";
    gap: 1rem;
  }

  .process-arrow {
    grid-area: arrow1 / arrow1 / arrow2 / arrow2;
    transform: rotate(90deg);
  }

  .form-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .library-hero {
    padding: 2.5rem 0 2rem;
    margin: 1rem 0 1.5rem;
    min-height: 350px;
  }

  .library-hero-content h1 {
    font-size: 2rem;
  }

  .library-hero-content h2 {
    font-size: 1.1rem;
  }

  .library-section {
    padding: 2rem 1.5rem;
    margin-bottom: 2rem;
  }

  .library-section h2 {
    font-size: 1.5rem;
  }

  .library-nav nav {
    gap: 1rem;
    padding: 0.75rem 0;
  }

  .library-nav a {
    font-size: 0.85rem;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }

  .btn-hero {
    text-align: center;
    justify-content: center;
  }

  .library-contact {
    padding: 2rem 1.5rem;
  }

  .library-newsletter {
    padding: 2rem 1.5rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .timing-calendar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  #library-root {
    padding: 0 15px 20px;
  }

  .library-hero-stats {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 1rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .about-features,
  .collection-grid,
  .digital-platforms,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .library-contact-grid {
    grid-template-columns: 1fr;
  }

  .research-process {
    grid-template-columns: 1fr;
    grid-template-areas:
      "step1"
      "arrow1"
      "step2"
      "arrow2"
      "step3"
      "arrow3"
      "step4";
    padding: 1.5rem;
  }

  .process-arrow {
    transform: rotate(90deg);
    margin: 0.5rem 0;
  }

  .features-grid,
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* =====================================================
   ANIMATIONS
===================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.library-section,
.library-contact,
.library-newsletter {
  animation: fadeInUp 0.6s ease-out;
}
