/* Library-specific styles */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,200..800&family=Jost:ital,wght@0,100..900;1,100..900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined');

/* CSS Custom Properties */
:root {
  --primary-purple: rgba(61, 58, 121, 1);
  --light-purple: rgba(193, 190, 250, 1);
  --background-purple: rgba(236, 235, 253, 0.13);
  --dark-text: rgba(30, 30, 30, 1);
  --accent-red: #ef4444;
  --accent-orange: #f97316;
  --accent-green: #22c55e;
}

/* Base Typography */
body {
  font-family: "Jost", sans-serif;
}

h1, h2, h3, h4, h5, h6 {
  font-family: "Bricolage Grotesque", sans-serif;
}

/* Hero Section */
.library-hero {
  background-size: cover;
  background-position: center;
  position: relative;
}

.library-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5));
  z-index: 1;
}

.library-hero > * {
  position: relative;
  z-index: 2;
}

/* Service Cards */
.service-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(226, 232, 240, 0.8);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  border-color: rgba(124, 103, 204, 0.2);
}

.service-card .material-symbols-outlined {
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 48;
}

/* Resource Tabs */
.resource-tab {
  transition: all 0.2s ease;
  text-decoration: none;
}

.resource-tab:hover {
  text-decoration: none;
}

.resource-tab.active {
  border-color: var(--primary-purple) !important;
  color: var(--primary-purple) !important;
}

/* Resource Cards */
.resource-card {
  transition: all 0.3s ease;
  border: 1px solid rgba(243, 244, 246, 1);
}

.resource-card:hover {
  background-color: rgba(243, 244, 246, 1) !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Search Input */
.search-input {
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px rgba(61, 58, 121, 0.5);
  border-color: transparent;
}

/* Material Icons */
.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
}

/* Chat Status Indicator */
.chat-status {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: .5;
  }
}

/* News Cards */
.news-card {
  transition: all 0.3s ease;
  overflow: hidden;
}

.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.news-card img {
  transition: transform 0.3s ease;
}

.news-card:hover img {
  transform: scale(1.05);
}

/* Responsive Design */
@media (max-width: 768px) {
  .library-hero h1 {
    font-size: 2.5rem;
  }
  
  .service-card {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .resource-tab {
    font-size: 0.875rem;
    padding: 0.75rem 0.5rem;
  }
  
  .resource-card {
    flex-direction: column;
    text-align: center;
  }
  
  .resource-card img {
    width: 100%;
    height: 200px;
    margin-bottom: 1rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  .service-card,
  .resource-card,
  .news-card {
    transition: none;
  }
  
  .chat-status {
    animation: none;
  }
}

/* Focus styles for keyboard navigation */
.service-card:focus,
.resource-tab:focus,
.resource-card:focus {
  outline: 2px solid var(--primary-purple);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .service-card,
  .resource-card {
    border-width: 2px;
  }
}