/* Resources Section Styling */

/* General resources grid layout */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* Override grid for books section */
#books .resources-grid {
  display: block;
  width: 100%;
}

/* Book cards and carousel */
.books-carousel {
  position: relative;
  width: 90%;
  margin: 0 auto 40px;
  overflow: visible;
  padding: 30px 0;
}

.books-carousel-inner {
  display: flex;
  transition: transform 0.5s ease;
  width: 100%;
  min-width: 100%;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.book-card {
  flex: 0 0 auto;
  padding: 30px;
  transition: transform 0.3s;
  border: none;
  display: flex;
  align-items: center;
  gap: 30px;
  background: linear-gradient(145deg, #2c2c2c, #1a1a1a);
}

.book-cover {
  flex: 0 0 200px;
  position: relative;
}

.book-cover img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
  transition: transform 0.3s ease;
}

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

.book-rating {
  position: absolute;
  bottom: 10px;
  right: 10px;
  background: rgba(10, 10, 10, 0.8);
  padding: 5px 10px;
  border-radius: 15px;
  color: #ff4081;
}

.book-info {
  flex: 1;
}

.book-info h4 {
  color: #0ff;
  margin-bottom: 10px;
  font-size: 1.5rem;
  text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

.book-author {
  color: #aaa;
  font-style: italic;
  margin-bottom: 15px;
  font-size: 1rem;
}

.book-description {
  color: #e0e0e0;
  font-size: 1rem;
  margin-bottom: 25px;
  line-height: 1.6;
}

/* Carousel controls */
.carousel-controls {
  display: flex;
  justify-content: space-between;
  position: absolute;
  top: 50%;
  left: -30px;
  right: -30px;
  transform: translateY(-50%);
  z-index: 10;
}

.carousel-control {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(15, 15, 15, 0.8);
  border: 2px solid rgba(0, 255, 255, 0.5);
  color: #0ff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
  transform: scale(1);
}

.carousel-control i {
  font-size: 1.4rem;
  text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.carousel-control:hover {
  background: rgba(0, 255, 255, 0.9);
  color: #111;
  transform: scale(1.15);
  border-color: transparent;
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.5);
}

/* Move indicators to bottom */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
  position: relative;
  z-index: 5;
}

.carousel-indicator {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 255, 255, 0.3);
}

.carousel-indicator.active {
  background: #0ff;
  transform: scale(1.2);
}

/* Resource cards (tools, websites, courses) */
.resource-card {
  background: linear-gradient(145deg, #2c2c2c, #1a1a1a);
  border-radius: 10px;
  padding: 25px;
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 255, 255, 0.1);
}

.resource-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
  border-color: rgba(0, 255, 255, 0.3);
}

.resource-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, #0ff, #ff4081);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.resource-card:hover::before {
  transform: scaleX(1);
}

.resource-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a1a1a, #2c2c2c);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  border: 1px solid rgba(0, 255, 255, 0.1);
}

.resource-card:hover .resource-icon {
  background: linear-gradient(135deg, #0ff, #00a2a2);
}

.resource-icon i {
  font-size: 28px;
  color: #0ff;
  transition: all 0.3s ease;
}

.resource-card:hover .resource-icon i {
  color: #111;
  transform: scale(1.1);
}

.resource-card h4 {
  color: #0ff;
  margin-bottom: 10px;
  font-size: 1.2rem;
}

.resource-card p {
  color: #e0e0e0;
  font-size: 0.9rem;
  flex-grow: 1;
  margin-bottom: 15px;
}

.course-provider {
  color: #aaa;
  font-style: italic;
  margin-bottom: 5px !important;
  font-size: 0.85rem !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .resources-grid {
    grid-template-columns: 1fr;
  }

  .books-carousel {
    width: 85%;
    padding: 20px 0;
  }

  .book-card {
    flex-direction: column;
    padding: 20px;
    gap: 20px;
    height: auto;
    align-items: center;
  }

  .book-cover {
    flex: 0 0 auto;
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
  }

  .book-cover img {
    height: 240px;
  }

  .book-info {
    text-align: center;
    width: 100%;
  }

  /* Adjust carousel controls for mobile */
  .carousel-controls {
    position: absolute;
    top: 50%;
    left: -20px;
    right: -20px;
    transform: translateY(-50%);
    padding: 0;
  }

  .carousel-control {
    width: 40px;
    height: 40px;
    opacity: 0.9;
  }

  .carousel-control i {
    font-size: 1.2rem;
  }
}