/* ---------- RESET & GLOBAL ---------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

html {
  scroll-behavior: smooth;
}

body {
  background-color: #f9fafc;
  color: #1e2b3c;
  overflow-x: hidden;
}

/* ---------- OPENING ANIMATION OVERLAY ---------- */
.opening-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: #0a1a2b;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: all;
}

.opening-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.book-wrapper {
  width: min(800px, 90vw);
  height: min(500px, 60vh);
  perspective: 1600px;
  position: relative;
}

.book {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
}

.page {
  position: absolute;
  width: 50%;
  height: 100%;
  top: 0;
  background: linear-gradient(145deg, #f5e6d3 0%, #ecdcc0 100%);
  border: 2px solid #b68a5c;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: transform 2.2s ease-in-out;
  backface-visibility: visible;
}

.left-page {
  left: 0;
  transform-origin: left center;
  transform: rotateY(0deg);
  border-right: 1px solid #9e7b4f;
}

.right-page {
  right: 0;
  transform-origin: right center;
  transform: rotateY(0deg);
  border-left: 1px solid #9e7b4f;
}
.opening-logo{
  width: 80px;
  height: auto;
  margin-bottom: 10px;
}

/* inner content (college logo + name) – hidden until pages open */
.book-inside {
  position: absolute;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 10;
  opacity: 0;
  transition: opacity 1s ease 1s;
  pointer-events: none;
  text-align: center;
  color: #1e3a5f;
}

.book-inside i {
  font-size: 5rem;
  color: #a67c4e;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 6px rgba(0,0,0,0.2));
}

.book-inside h2 {
  font-size: 2.5rem;
  font-weight: 600;
  letter-spacing: 2px;
  background: linear-gradient(135deg, #1e3a5f, #2b4a7a);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 2px 2px 4px rgba(255,255,255,0.3);
}

.book-inside p {
  font-size: 1.2rem;
  color: #3a5f7a;
  font-weight: 500;
}

/* animation trigger class */
.opening-overlay.animate .left-page {
  transform: rotateY(-130deg);
}

.opening-overlay.animate .right-page {
  transform: rotateY(130deg);
}

.opening-overlay.animate .book-inside {
  opacity: 1;
}

/* ---------- MAIN CONTENT ---------- */
.main-content {
  position: relative;
  z-index: 1;
  background: #f9fafc;
}

/* ---------- STICKY HEADER with HAMBURGER ---------- */
header {
  position: sticky;
  top: 0;
  background: #ffffffdd;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 20px rgba(0, 20, 40, 0.08);
  padding: 0.8rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  border-bottom: 2px solid #cfb797;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon img {
  width: 70px;
  height: auto;
}

.college-name {
  font-size: 1.3rem;
  font-weight: 600;
  color: #1e3a5f;
  letter-spacing: -0.02em;
}

/* Navigation styles */
.navbar {
  display: flex;
  align-items: center;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
}

.nav-menu a {
  text-decoration: none;
  font-weight: 500;
  color: #1e3a5f;
  transition: 0.2s;
  position: relative;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0%;
  height: 2px;
  background: #b68a5c;
  transition: 0.3s;
}

.nav-menu a:hover::after {
  width: 100%;
}

/* Hamburger icon (hidden on desktop) */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.bar {
  width: 25px;
  height: 3px;
  background: #1e3a5f;
  border-radius: 3px;
  transition: 0.3s;
}

/* ---------- HERO VIDEO SECTION ---------- */
.hero {
  position: relative;
  height: 85vh;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  filter: brightness(0.5) saturate(1.2);
}

.hero-overlay {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  /* Removed background, backdrop-filter, border, border-radius, and padding to eliminate the box */
  background: transparent;
  backdrop-filter: none;
  border: none;
  border-radius: 0;
  padding: 0;
}

/* Fade-in animations for hero text */
.fade-in {
  opacity: 0;
  animation: fadeInUp 1s ease forwards;
}

.delay-1 {
  animation-delay: 0.3s;
}

@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-overlay h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  text-shadow: 0 4px 20px #00000050;
}

.hero-overlay p {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 400;
  border-top: 2px solid #e0b87b;
  display: inline-block;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}

/* ---------- LIBRARIANS SECTION ---------- */
.librarians-section {
  padding: 5rem 5%;
  background: #ffffff;
}

.section-title {
  font-size: 2.5rem;
  color: #1e3a5f;
  border-left: 6px solid #b68a5c;
  padding-left: 1.5rem;
  margin-bottom: 3rem;
}

.librarians-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem 2rem;
  align-items: start;
}

.librarian-card {
  background: #f6f3ee;
  border-radius: 28px;
  padding: 2rem 1.5rem;
  box-shadow: 0 15px 30px -10px rgba(30, 58, 95, 0.15);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

/* First librarian: left side */
.card-left {
  grid-column: 1 / 2;
  grid-row: 1 / 2;
}

/* Second librarian: right side, shifted down */
.card-right {
  grid-column: 2 / 3;
  grid-row: 1 / 2;
  align-self: end;
  margin-top: 3rem;
}

.librarian-card:hover {
  transform: scale(1.02) translateY(-8px);
  box-shadow: 0 25px 40px -12px #1e3a5f80;
  background: #ffffff;
}

.card-right:hover {
  transform: scale(1.02) translateY(-8px);
}

.librarian-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #b68a5c;
  margin-bottom: 1.2rem;
  transition: 0.3s;
}

.librarian-card:hover .librarian-photo {
  border-color: #1e3a5f;
  transform: scale(1.05) rotate(2deg);
}

.librarian-name {
  font-size: 1.8rem;
  font-weight: 600;
  color: #1e3a5f;
}

.librarian-title {
  font-size: 1rem;
  color: #7f5e3a;
  margin-bottom: 0.8rem;
  font-weight: 500;
}

.short-desc {
  font-size: 1rem;
  color: #2e3f53;
}

.extra-info {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.4s ease, margin 0.3s;
  background: #e8dfd1;
  border-radius: 16px;
  padding: 0 1rem;
  margin-top: 0;
  color: #1e2b3c;
}

.librarian-card:hover .extra-info {
  max-height: 150px;
  opacity: 1;
  padding: 1rem 1.2rem;
  margin-top: 1.5rem;
}

/* ---------- GALLERY SECTION ---------- */
.gallery-section {
  padding: 5rem 5%;
  background: #f1f4f8;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.8rem;
}

.gallery-item {
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  transition: 0.4s;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s, filter 0.4s;
}

.gallery-item:hover img {
  transform: scale(1.1);
  filter: brightness(0.8) saturate(1.3);
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 30%, transparent 40%, rgba(30,58,95,0.3));
  opacity: 0;
  transition: 0.4s;
}

.gallery-item:hover::after {
  opacity: 1;
}

/* ---------- LIBRARY DESCRIPTION ---------- */
.description-section {
  padding: 5rem 5%;
  background: #ffffff;
}

.desc-card {
  background: #faf8f5;
  padding: 3rem 3.5rem;
  border-radius: 48px 48px 48px 12px;
  box-shadow: inset 0 -2px 0 #cfb797, 0 20px 30px -20px #0a1a2b;
  font-size: 1.15rem;
  line-height: 1.7;
  color: #1f3a4c;
}

.desc-card h3 {
  font-size: 2rem;
  color: #1e3a5f;
  margin-bottom: 1.2rem;
}

.facilities-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  margin-top: 2rem;
}

.facilities-list span {
  background: #1e3a5f;
  color: #f1e4c6;
  padding: 0.5rem 1.5rem;
  border-radius: 40px;
  font-weight: 500;
}

/* ---------- FOOTER ---------- */
footer {
  background: #0b1c2c;
  color: #e0d6c0;
  padding: 3rem 5% 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2.5rem;
  border-top: 5px solid #b68a5c;
}

.footer-left, .footer-center, .footer-right {
  flex: 1 1 200px;
}

.footer-left {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

.footer-logo img {
  width: 80px;
  height: auto;
}

.footer-left h3 {
  font-size: 1.4rem;
  font-weight: 600;
}

.footer-center h4, .footer-right h4 {
  font-size: 1.3rem;
  margin-bottom: 1.2rem;
  color: #cfb797;
  border-bottom: 2px solid #3a5f7a;
  padding-bottom: 0.4rem;
}

.footer-center ul {
  list-style: none;
}

.footer-center li {
  margin-bottom: 0.7rem;
}

.footer-center a {
  color: #e0d6c0;
  text-decoration: none;
  transition: 0.2s;
}

.footer-center a:hover {
  color: #f5c98e;
  padding-left: 5px;
}

.footer-right p {
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-right i {
  color: #b68a5c;
  width: 24px;
  font-size: 1.2rem;
}

.copyright {
  flex-basis: 100%;
  text-align: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #2f4a62;
  color: #aabac9;
}

/* ---------- RESPONSIVE DESIGN ---------- */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background: #ffffffdd;
    backdrop-filter: blur(12px);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    padding: 2rem 0;
    gap: 1.5rem;
    border-radius: 0 0 20px 20px;
    z-index: 99;
  }

  .nav-menu.active {
    left: 0;
  }

  .librarians-grid {
    grid-template-columns: 1fr;
  }

  .card-left, .card-right {
    grid-column: 1 / 2;
    margin-top: 0;
  }

  .card-right {
    grid-row: 2 / 3;
    align-self: auto;
  }

  .hero {
    height: 60vh;
  }

  .desc-card {
    padding: 2rem 1.5rem;
  }
}

@media (max-width: 500px) {
  .logo-area .college-name {
    font-size: 1rem;
  }
}