﻿/* Custom Styles for Zdravko KordiÄ‡ Website */

:root {
  --primary-color: #b8860b; /* Dark Goldenrod - elegant for literature */
  --secondary-color: #6c757d;
  --dark-bg: #212529;
}

body {
  font-family: "Montserrat", sans-serif;
  color: #333;
  line-height: 1.8;
  font-size: 1.1rem;
  overflow-x: hidden; /* Prevent horizontal scroll on mobile */
  width: 100%;
  position: relative; /* Required for ScrollSpy */
}

html {
  overflow-x: hidden;
  width: 100%;
  scroll-behavior: smooth;
}

/* Typography */
.font-playfair {
  font-family: "Crimson Text", serif;
}

.font-artistic {
  font-family: "Allura", cursive;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: #2c3e50;
}

small {
  font-size: 1rem;
}

/* Navigation - Premium Dark Theme */
.navbar {
  z-index: 1050;
  padding: 15px 0;
  transition: all 0.4s ease;
  background: rgba(15, 15, 15, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.navbar.scrolled {
  padding: 10px 0;
  background: rgba(0, 0, 0, 0.98);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
}

.navbar-brand {
  font-size: 2.2rem;
  color: var(--primary-color) !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  transition: all 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
  color: #fff !important;
}

.nav-link {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8) !important;
  text-transform: uppercase;
  font-size: 0.9rem;
  letter-spacing: 2px;
  padding: 0.5rem 1rem !important;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background-color: var(--primary-color);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color) !important;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

.navbar-toggler {
  border: none;
  outline: none;
  box-shadow: none !important;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(184, 134, 11, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* Mobile Menu Styling */
@media (max-width: 991px) {
  .navbar-collapse {
    background: rgba(10, 10, 10, 0.98);
    padding: 20px;
    border-radius: 10px;
    margin-top: 15px;
    border: 1px solid rgba(184, 134, 11, 0.2);
  }

  .nav-link {
    text-align: center;
    padding: 15px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .nav-link:last-child {
    border-bottom: none;
  }
}

/* Hero Section - Mega Dark Theme */
header#home {
  background: linear-gradient(135deg, #0f0f0f 0%, #1a1a1a 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
  padding-top: 40px;
  padding-bottom: 40px;
}

header#home::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 70% 30%,
      rgba(184, 134, 11, 0.1),
      transparent 60%
    ),
    radial-gradient(circle at 20% 80%, rgba(44, 62, 80, 0.4), transparent 60%);
  pointer-events: none;
}

header#home h1 {
  color: #ffffff;
  text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.7);
  font-size: 4.5rem;
  letter-spacing: 2px;
  margin-bottom: 1rem;
}

header#home .lead {
  color: #d1d1d1 !important;
  font-size: 1.4rem;
  font-weight: 300;
}

header#home .border-primary {
  border-color: var(--primary-color) !important;
  border-width: 3px !important;
}

header#home .text-muted {
  color: #a0a0a0 !important;
}

header#home .blockquote-footer {
  color: #888 !important;
}

header#home img {
  border: 3px solid rgba(184, 134, 11, 0.3);
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.6) !important;
  transition: all 0.5s ease;
  filter: brightness(1.1) contrast(1.1);
}

header#home img:hover {
  transform: scale(1.03) rotate(2deg);
  border-color: var(--primary-color);
  box-shadow: 0 0 60px rgba(184, 134, 11, 0.4) !important;
}

/* Dedication Section */
#dedication {
  background: linear-gradient(135deg, #2b2b2b 0%, #383838 100%);
  position: relative;
  overflow: hidden;
}

#dedication::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 30% 50%,
    rgba(255, 255, 255, 0.03),
    transparent 60%
  );
  pointer-events: none;
}

.dedication-card {
  background: rgba(30, 30, 30, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: #e0e0e0;
  transition: transform 0.3s ease;
}

.dedication-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
}

.dedication-card h4 {
  color: var(--primary-color);
  font-size: 2rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.dedication-card h6 {
  color: #aaa;
  font-style: italic;
}

.dedication-card p.fst-italic {
  font-size: 1.15rem;
  line-height: 1.4;
  color: #dcdcdc;
}

.dedication-card .blockquote-footer {
  color: #888;
  font-size: 0.9rem;
}

/* Biography Section - Classic Literature Theme */
#biography {
  background-color: #fdfbf7; /* Warm parchment color */
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23b8860b' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

#biography .section-title {
  color: #2c3e50;
  position: relative;
  display: inline-block;
}

#biography .divider {
  width: 100px;
  height: 4px;
  background: var(--primary-color);
  margin-top: 15px;
  border-radius: 2px;
}

.bio-card {
  background: #fff;
  border: 1px solid rgba(184, 134, 11, 0.2);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.bio-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--primary-color);
  transform: scaleX(0);
  transition: transform 0.3s ease;
  transform-origin: left;
}

.bio-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  border-color: var(--primary-color);
}

.bio-card:hover::before {
  transform: scaleX(1);
}

.icon-wrapper {
  width: 60px;
  height: 60px;
  background: rgba(184, 134, 11, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: var(--primary-color);
  font-size: 24px;
  transition: all 0.3s ease;
}

.bio-card:hover .icon-wrapper {
  background: var(--primary-color);
  color: #fff;
  transform: rotateY(180deg);
}

.bio-list li {
  padding-left: 15px;
  border-left: 2px solid #eee;
  transition: border-color 0.3s;
}

.bio-list li:hover {
  border-left-color: var(--primary-color);
}

.highlight-year {
  color: var(--primary-color);
  font-weight: bold;
  font-family: "Crimson Text", serif;
  font-size: 1.1em;
  margin-right: 5px;
}

.bio-text-container {
  background: #fff;
  border-radius: 4px;
  position: relative;
  border: 1px solid #eee;
  font-family: "Georgia", serif; /* More book-like font for body */
  color: #444;
  line-height: 1.9;
  font-size: 1.15rem;
}

.bio-text-container::before,
.bio-text-container::after {
  content: "";
  position: absolute;
  height: 98%;
  width: 98%;
  border: 1px solid rgba(0, 0, 0, 0.05);
  pointer-events: none;
}

.bio-text-container::before {
  top: 6px;
  left: 6px;
  z-index: -1;
  background: #fff;
  box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.05);
}

.drop-cap::first-letter {
  float: left;
  font-family: "Crimson Text", serif;
  font-size: 4rem;
  line-height: 0.8;
  font-weight: bold;
  color: var(--primary-color);
  padding-right: 10px;
  padding-top: 5px;
}

.img-placeholder {
  background-color: #adb5bd;
  color: white;
  font-weight: bold;
  border: 5px solid white;
}

/* Divider */
.divider {
  height: 3px;
  width: 60px;
  margin-top: 1rem;
  background-color: var(--primary-color) !important;
}

/* Cards */
.card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: none;
}

.hover-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.card-header {
  border-bottom: 2px solid var(--primary-color);
}

/* Tabs */
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link {
  background-color: var(--primary-color);
  color: #fff !important;
}

.nav-pills .nav-link {
  color: #555;
}

/* List Groups */
.list-group-item {
  border: none;
  border-bottom: 1px solid #eee;
  transition: background-color 0.2s;
}

.list-group-item:hover {
  background-color: #f8f9fa;
}

/* Footer */
footer {
  font-size: 1rem;
  letter-spacing: 1px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .navbar-brand {
    font-size: 1.7rem;
  }

  .navbar-collapse {
    max-height: 60vh;
    overflow-y: auto;
  }

  .nav-link {
    padding: 0.5rem 0 !important;
  }
}

@media (max-width: 768px) {
  .display-3 {
    font-size: 2.5rem;
  }

  .img-placeholder {
    width: 200px !important;
    height: 200px !important;
  }
}

/* Cool Gradients */
.bg-gradient-1 {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}
.bg-gradient-2 {
  background: linear-gradient(to top, #dfe9f3 0%, #ffffff 100%);
}
.bg-gradient-3 {
  background: linear-gradient(to right, #2b2b2b 0%, #1a1a1a 100%);
  color: #fff;
}
.bg-gradient-3 h2,
.bg-gradient-3 p.text-muted {
  color: #f8f9fa !important;
}
.bg-gradient-3 .divider {
  background-color: var(--primary-color) !important;
}
.bg-gradient-4 {
  background: linear-gradient(120deg, #fdfbfb 0%, #ebedee 100%);
}
.bg-gradient-5 {
  background: linear-gradient(to top, #e6e9f0 0%, #eef1f5 100%);
}

/* Poetry Section - Mystical Library Theme */
#poetry {
  background: url("images/mislavKordicimg/mislav1-min.jpg") no-repeat center
    center;
  background-size: contain;
  background-attachment: fixed;
  color: #fff;
  position: relative;
  overflow: hidden;
}

#poetry::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6); /* Dark overlay for readability */
  z-index: 1;
}

#poetry .container {
  position: relative;
  z-index: 2;
}

@keyframes stars {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(-1000px);
  }
}

#poetry .section-title {
  color: #fff;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

#poetry .text-muted {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Mobile Carousel Styling */
#poetry .carousel .card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

#poetry .carousel .card-title {
  color: #f0e68c;
  font-family: "Crimson Text", serif;
}

#poetry .carousel .card img {
  background-color: transparent !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

/* Modern Grid for Poetry Books */
.poetry-book-item .card {
  border: none;
  border-radius: 15px;
  overflow: visible; /* Allow 3D elements to pop out */
  transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  height: 100%;
}

.poetry-book-item .card:hover {
  transform: translateY(-15px) rotateX(5deg);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5) !important;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

.card-img-wrapper {
  position: relative;
  padding: 1.5rem;
  text-align: center;
  perspective: 1000px;
}

.poetry-book-item img {
  width: 100%;
  max-width: 180px; /* Limit book width for better look */
  height: auto;
  display: inline-block;
  box-shadow: -10px 10px 20px rgba(0, 0, 0, 0.4);
  transition: all 0.5s ease;
  transform-style: preserve-3d;
  border-radius: 2px 5px 5px 2px; /* Book spine effect */
}

.poetry-book-item:hover img {
  transform: scale(1.1) rotateY(-10deg) translateZ(20px);
  box-shadow: -20px 20px 40px rgba(0, 0, 0, 0.6);
}

.poetry-book-item .card-body {
  color: #fff;
  text-align: center;
  padding: 1.5rem;
  background: transparent;
}

.poetry-book-item .card-title {
  font-family: "Crimson Text", serif;
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: #f0e68c; /* Khaki gold */
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.poetry-book-item small {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  font-family: "Montserrat", sans-serif;
  letter-spacing: 0.5px;
}

/* Collections Section - Marble & Gold Theme */
#collections {
  background-color: #f9f9f9;
  background-image: linear-gradient(
      45deg,
      #f4f4f4 25%,
      transparent 25%,
      transparent 75%,
      #f4f4f4 75%,
      #f4f4f4
    ),
    linear-gradient(
      45deg,
      #f4f4f4 25%,
      transparent 25%,
      transparent 75%,
      #f4f4f4 75%,
      #f4f4f4
    );
  background-size: 20px 20px;
  background-position: 0 0, 10px 10px;
}

#collections .section-title-dark {
  color: #333;
  text-transform: uppercase;
  letter-spacing: 3px;
}

.custom-tabs .nav-link {
  background: transparent;
  color: #777 !important;
  border: 2px solid #e0e0e0;
  border-radius: 50px;
  margin: 0 10px;
  font-weight: 600;
  letter-spacing: 1px;
  transition: all 0.3s ease;
}

.custom-tabs .nav-link.active,
.custom-tabs .nav-link:hover {
  background: var(--primary-color);
  color: #fff !important;
  border-color: var(--primary-color);
  box-shadow: 0 5px 15px rgba(184, 134, 11, 0.3);
  transform: translateY(-2px);
}

.collection-gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  transition: all 0.4s ease;
  cursor: pointer;
  background: #fff;
  height: 100%;
}

.collection-gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.collection-gallery-item img {
  width: 70%;
  margin: 0 auto;
  padding-top: 20px;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.collection-gallery-item:hover img {
  transform: scale(1.05);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
  header#home h1 {
    font-size: 2.8rem;
  }

  .custom-tabs .nav-link {
    padding: 15px 30px !important;
    margin: 5px 0;
  }
}

.collection-caption {
  padding: 20px;
  background: #fff;
  text-align: center;
  border-top: 1px solid #eee;
}

.collection-caption h5 {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 8px;
  font-weight: 600;
  font-family: "Crimson Text", serif;
}

.collection-caption small {
  font-size: 1rem;
  color: #777;
  font-style: italic;
  line-height: 1.4;
  display: block;
}

.collection-card {
  background: #fff;
  border: none;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
  border-bottom: 4px solid transparent;
}

.collection-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-bottom-color: var(--primary-color);
}

.collection-card .icon-box {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), #d4af37);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  color: #fff;
  font-family: "Crimson Text", serif;
  font-size: 1.5rem;
  font-weight: bold;
  box-shadow: 0 5px 15px rgba(184, 134, 11, 0.4);
}

.collection-card .year-badge {
  display: inline-block;
  background: #f8f9fa;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  color: #555;
  font-weight: 600;
  margin-top: 10px;
  border: 1px solid #eee;
}

.collection-card:hover .year-badge {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

.collection-card i.fa-feather-alt,
.collection-card i.fa-sun,
.collection-card i.fa-mountain,
.collection-card i.fa-church,
.collection-card i.fa-globe-americas {
  font-size: 2rem;
  transition: all 0.3s ease;
}

.collection-card:hover i {
  color: var(--primary-color) !important;
  opacity: 0.2 !important;
  transform: scale(1.2) rotate(15deg);
}

/* Texts Section */
#texts,
#text-ganza {
  background-color: #fff;
  border-top: 1px solid #eee;
}

.document-card {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 25px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.document-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 4px;
  background: var(--primary-color);
  opacity: 0;
  transition: all 0.3s ease;
}

.document-card:hover {
  background: #fff;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
  transform: translateY(-5px);
}

.document-card:hover::before {
  opacity: 1;
}

.doc-icon {
  font-size: 2.5rem;
  color: #e74c3c; /* PDF Red */
  width: 60px;
  height: 60px;
  background: rgba(231, 76, 60, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.document-card:hover .doc-icon {
  background: #e74c3c;
  color: #fff;
  transform: rotate(15deg);
}

.doc-content h5 {
  color: #2c3e50;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.doc-action .btn {
  border-width: 2px;
  font-weight: 600;
  padding: 8px 20px;
  transition: all 0.3s ease;
}

.doc-action .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(184, 134, 11, 0.3);
}

/* Essays Section - Dark Academia Theme */
#essays {
  background: linear-gradient(135deg, #1a1a1a 0%, #2c3e50 100%);
  color: #d2dae2;
  position: relative;
}

#essays::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
    circle at 80% 20%,
    rgba(184, 134, 11, 0.05),
    transparent 50%
  );
  pointer-events: none;
}

#essays .section-title-light {
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

#essays .divider {
  background-color: var(--primary-color) !important;
  width: 80px;
  box-shadow: 0 0 10px rgba(184, 134, 11, 0.3);
}

.essay-container {
  background: rgba(45, 52, 54, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.essay-header {
  background: linear-gradient(to right, #1a1a1a, #2c3e50);
  padding: 20px 30px;
  color: #fff;
  border-bottom: 2px solid var(--primary-color);
}

.essay-header h3 {
  color: #fff !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.essay-body {
  padding: 30px;
}

.essay-item {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 6px;
  transition: all 0.3s ease;
  border-left: 3px solid transparent;
}

.essay-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(10px);
  border-left-color: var(--primary-color);
}

.essay-number {
  font-family: "Crimson Text", serif;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-right: 20px;
  opacity: 0.7;
  min-width: 40px;
}

.essay-item:hover .essay-number {
  opacity: 1;
  color: #fff;
}

.essay-content h5 {
  margin: 0;
  font-size: 1.1rem;
  color: #f1f2f6;
  font-weight: 500;
}

.essay-content small {
  color: #a4b0be;
  font-style: italic;
}

.essay-gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.4s ease;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 20px;
}

.essay-gallery-item:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
  border-color: var(--primary-color);
}

.essay-gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s ease;
}

.essay-gallery-item:hover img {
  transform: scale(1.05);
}

.essay-caption {
  padding: 10px;
  background: rgba(0, 0, 0, 0.8);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.essay-caption h5 {
  font-size: 0.9rem;
  color: #fff;
  margin-bottom: 2px;
  font-weight: 600;
}

.essay-caption small {
  font-size: 1rem;
  color: #a4b0be;
  font-style: italic;
}

.carousel-control-icon {
  font-size: 2rem;
  color: var(--primary-color);
  background: rgba(0, 0, 0, 0.5);
  padding: 10px;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.carousel-control-prev:hover .carousel-control-icon,
.carousel-control-next:hover .carousel-control-icon {
  background: var(--primary-color);
  color: #fff;
  transform: scale(1.1);
}

.carousel-control-prev {
  left: -30px;
}

.carousel-control-next {
  right: -30px;
}

/* Works Section - Royal Library Theme */
#works {
  background: #1a1a1a; /* Dark gray instead of red */
  background: linear-gradient(180deg, #1a1a1a 0%, #000000 100%);
  color: #e0c097;
  overflow: hidden;
}

#works .section-title-gold {
  color: #e0c097;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  letter-spacing: 2px;
}

#works .text-gold-muted {
  color: #b08d55;
  font-style: italic;
}

#works .divider.bg-gold {
  background-color: #e0c097 !important;
  height: 3px;
  width: 100px;
  box-shadow: 0 0 10px rgba(224, 192, 151, 0.3);
}

#works .text-light-gold {
  color: #f3e5ab;
}

.book-item {
  perspective: 1000px;
  text-align: center;
  transition: transform 0.3s ease;
}

.book-item:hover {
  transform: translateY(-10px);
}

.book-cover {
  position: relative;
  border-radius: 5px 15px 15px 5px;
  box-shadow: -10px 10px 20px rgba(0, 0, 0, 0.5),
    inset 3px 0 5px rgba(255, 255, 255, 0.1),
    inset -3px 0 5px rgba(0, 0, 0, 0.3);
  transition: all 0.4s ease;
  transform-style: preserve-3d;
  overflow: hidden;
  border-left: 8px solid rgba(255, 255, 255, 0.1); /* Spine effect */
}

.book-item:hover .book-cover {
  box-shadow: -15px 15px 30px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(224, 192, 151, 0.2);
  transform: rotateY(-15deg) scale(1.05);
}

.book-cover img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px 12px 12px 2px;
}

.book-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0) 10%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(0, 0, 0, 0) 100%
  );
  pointer-events: none;
}

.book-info {
  margin-top: 20px;
  opacity: 0.8;
  transition: opacity 0.3s;
}

.book-item:hover .book-info {
  opacity: 1;
}

.book-info h5 {
  color: #e0c097;
  margin-bottom: 5px;
  font-size: 1.2rem;
}

.book-line {
  width: 0;
  height: 2px;
  background: #e0c097;
  margin: 5px auto;
  transition: width 0.3s ease;
}

.book-item:hover .book-line {
  width: 50px;
}

.pdf-book .book-cover {
  border: 2px solid rgba(224, 192, 151, 0.3);
}

.pdf-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #c0392b;
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

.text-gold {
  color: #e0c097 !important;
}

/* Graphics Section - Eternal Gallery Theme */
#graphics {
  background-color: #000000;
  background-image: radial-gradient(circle at 50% 0%, #2c3e50 0%, #000000 70%);
  color: #fff;
  overflow: hidden;
}

#graphics .section-title-silver {
  color: #bdc3c7;
  text-shadow: 0 0 10px rgba(189, 195, 199, 0.3);
  letter-spacing: 4px;
  text-transform: uppercase;
}

#graphics .text-silver-muted {
  color: #7f8c8d;
}

#graphics .divider.bg-silver {
  background-color: #bdc3c7 !important;
  height: 1px;
  width: 150px;
  box-shadow: 0 0 10px rgba(189, 195, 199, 0.5);
}

.gallery-frame {
  position: relative;
  padding: 20px;
  background: #1a1a1a;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.1);
  transition: all 0.5s ease;
  transform-style: preserve-3d;
}

.gallery-frame:hover {
  transform: scale(1.02);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9), 0 0 20px rgba(255, 255, 255, 0.05);
  z-index: 10;
}

.frame-matting {
  background: #fff; /* White matting */
  padding: 30px; /* Width of the matting */
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

.gallery-img {
  display: block;
  width: 100%;
  height: 400px;
  object-fit: contain; /* Keep aspect ratio */
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
  filter: grayscale(20%) contrast(110%); /* Artistic filter */
  transition: all 0.5s ease;
}

.gallery-frame:hover .gallery-img {
  filter: grayscale(0%) contrast(100%);
  transform: scale(1.01);
}

.frame-shine {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.1) 0%,
    rgba(255, 255, 255, 0) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
  z-index: 2;
}

.frame-label {
  margin-top: 15px;
  text-align: center;
  font-family: "Montserrat", sans-serif;
  font-size: 0.8rem;
  color: #7f8c8d;
  letter-spacing: 2px;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.gallery-frame:hover .frame-label {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll to Top Button */
#scrollTopBtn {
  display: none; /* Hidden by default */
  position: fixed;
  bottom: 25px;
  right: 30px; /* 30px from right */
  z-index: 1000;
  font-size: 20px;
  border: none;
  outline: none;
  background-color: var(--primary-color);
  color: white;
  cursor: pointer;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  align-items: center;
  justify-content: center;
}

#scrollTopBtn:hover {
  background-color: #8a6d3b; /* Darker shade */
  transform: translateY(-5px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.4);
}

#scrollTopBtn i {
  margin-top: 2px; /* Slight adjustment for visual centering */
}
