/* css/style.css */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, sans-serif;
  opacity: 0;
  transition: opacity 0.5s ease;
  background-color: #FEFBE7;
  color: #7D615B;
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  height: 10vh;
  background: #FDF6E1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1rem;
  z-index: 1000;
  border-bottom: 1px solid #ccc;
}

header .branding {
  display: flex;
  align-items: center;
}

header .branding img {
  height: 40px;
  margin-right: 10px;
}

nav {
  position: fixed;
  top: 10vh;
  width: 100%;
  height: 5vh;
  background: #F8EDD9;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.nav-item {
  margin: 0 1rem;
  text-decoration: none;
  color: #7D615B;
  position: relative;
  transition: color 0.3s ease;
  font-weight: bold;
}

.nav-item:hover {
  color: #A0522D;
}

main {
  padding: 15vh 1rem 2rem;
}

section.hero {
  text-align: center;
  padding: 2rem 0;
}

.book-grid, .gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
}

.book-grid img, .gallery-grid img {
  width: 100%;
  display: block;
  transition: transform 0.3s ease;
  border: 3px solid #F7ECD7;
  background: #FDF6E1;
  border-radius: 5px;
}

.book-grid img:hover, .gallery-grid img:hover {
  transform: scale(1.05);
}

.toggle-switch {
  position: relative;
  width: 60px;
  height: 30px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #ccc;
  transition: 0.4s;
  border-radius: 30px;
}

.toggle-slider:before {
  position: absolute;
  content: "En";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: #fff;
  border-radius: 50%;
  top: 0;
  left: 0;
  transition: 0.4s;
  color: #7D615B;
  font-weight: bold;
}

input:checked + .toggle-slider {
  background: #A0522D;
}

input:checked + .toggle-slider:before {
  transform: translateX(30px);
  content: "ગુ";
}

body.fade-out {
  opacity: 0;
}

/* Media Queries */
@media (max-width: 768px) {
  header h1 {
    font-size: 1.2rem;
  }

  .nav-item {
    margin: 0 0.5rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  nav {
    flex-wrap: wrap;
    height: auto;
    padding: 0.5rem;
  }

  .nav-item {
    margin: 0.5rem;
  }
}


.about-author {
  margin: 2rem auto;
  max-width: 900px;
}

.about-author .card {
  display: flex;
  justify-content: space-between;
  background-color: #fff;
  padding: 1.5rem;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease;
}

.about-author .card:hover {
  transform: translateY(-4px);
}

.author-info {
  flex: 3;
  padding-right: 1rem;
}

.author-photo img {
  border-radius: 10px;
  max-width: 120px;
  height: auto;
}

.recommended-books {
  margin: 2rem auto;
  max-width: 1100px;
}

.recommended-books h2 {
  margin-bottom: 1rem;
}

.book-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  list-style: none;
  padding: 0;
}

.book-list li {
  flex: 1 1 calc(33.333% - 1rem);
  background: #fff;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  text-align: center;
}

.book-list img {
  width: 80%;
  max-width: 150px;
  height: auto;
  margin-bottom: 0.5rem;
  border-radius: 5px;
}


.book-list h3 {
  color: #7D615B;
  margin-bottom: 0.5rem;
}

.book-list li {
  flex: 1 1 calc(33.333% - 1rem);
  background: #fff;
  border-radius: 10px;
  padding: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-list li:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 20px rgba(0,0,0,0.2);
}


.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  padding: 1rem 0;
}

.gallery-grid img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.gallery-grid img:hover {
  transform: scale(1.05);
}


.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
}

.book-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1rem;
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.book-card:hover {
  transform: translateY(-5px);
}

.book-card img {
  max-width: 100%;
  height: 200px;
  object-fit: cover;
  margin-bottom: 0.5rem;
}

.book-card a {
  margin-top: 0.5rem;
  text-decoration: none;
  color: #A0522D;
  font-weight: bold;
}

/* === About page: easygoing, consistent card === */
.bio-wrap {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.bio-card {
  background: #fff;                 /* matches existing cards */
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  padding: 1.5rem;
}

.bio-content {
  /* slightly larger only inside this card; keeps site-wide vibe intact */
  font-size: 1.0625rem; /* ~17px */
  line-height: 1.75;
  max-width: 68ch;      /* comfortable reading line length */
}

.bio-content h2,
.bio-content h3 {
  margin-bottom: 0.75rem;
  color: inherit;       /* keeps #7D615B */
}

.bio-content p {
  margin: 0 0 1rem;
}

.bio-photo-img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 3px solid #F7ECD7;        /* same framing as gallery/book images */
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Layout: stacked on mobile, two-column on wide screens */
@media (min-width: 900px) {
  .bio-card {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
  }
  .bio-media { flex: 1; max-width: 380px; }
  .bio-content { flex: 2; }
}

/* Consistent paragraph spacing for About page */
.bio p {
  margin-bottom: 1.5rem; /* space after each paragraph */
}

.bio h2,
.bio h3 {
  margin-top: 1.5rem; /* space before headings */
  margin-bottom: 0.75rem; /* space after headings */
}

.bio-list {
  list-style-type: disc;
  padding-left: 1.5rem;
  line-height: 1.75;
}

.bio-list li {
  margin-bottom: 1rem;
}
/* Active page highlight */
.nav-item.active,
.nav-item[aria-current="page"] {
  color: #A0522D;
  border-bottom: 3px solid #A0522D;
  padding-bottom: 2px;            /* keeps height steady */
}

/* Publications: 3-column list view */
.pub-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 1rem;
}

.pub-col h3 { margin-bottom: 0.5rem; }

.pub-list {
  list-style: disc inside;
  line-height: 1.7;
}

.pub-list a {
  text-decoration: none;
  color: inherit;
}

.pub-list a:hover {
  text-decoration: underline;
}

/* Stack on small screens */
@media (max-width: 900px) {
  .pub-columns { grid-template-columns: 1fr; }
}

/* --- Gallery sections --- */
.gallery-section { margin-top: 1.25rem; }
.gallery-section h3 { margin: 0.75rem 0; }

.gallery-card {
  background: #fff;
  border-radius: 12px;
  padding: 0.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform .2s ease, box-shadow .2s ease;
}
.gallery-card:hover { transform: translateY(-3px); box-shadow: 0 8px 16px rgba(0,0,0,0.15); }

.gallery-card img { width: 100%; border-radius: 8px; display: block; }
.img-caption { text-align: center; font-size: .92rem; color: #5A423D; margin-top: .5rem; }

/* Uniform gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

/* Card and image sizing */
.gallery-card {
  background:#fff; border-radius:12px; padding:.5rem;
  box-shadow:0 2px 8px rgba(0,0,0,.1);
  transition:transform .2s ease, box-shadow .2s ease;
  cursor:pointer;                     /* click hint */
}
.gallery-card:hover { transform:translateY(-3px); box-shadow:0 8px 16px rgba(0,0,0,.15); }

/* Make every thumbnail the same size */
.gallery-card img{
  width:100%;
  height:220px;            /* ← uniform height */
  aspect-ratio: 4 / 3;     /* keeps consistent box */
  object-fit:cover;        /* crop, not squish */
  border-radius:8px;
  display:block;
}

/* Caption */
.img-caption{ text-align:center; font-size:.92rem; color:#5A423D; margin-top:.5rem; }

/* Lightbox overlay */
.lightbox{
  position:fixed; inset:0; display:none; place-items:center;
  background:rgba(0,0,0,.6); z-index:9999; padding:2rem;
}
.lightbox.open{ display:grid; }
.lightbox-content{
  position:relative; margin:0; max-width:92vw; max-height:90vh;
  background:#fff; border-radius:12px; padding:1rem;
  box-shadow:0 12px 28px rgba(0,0,0,.35);
}
.lightbox-content img{
  display:block; max-width:90vw; max-height:75vh; border-radius:8px; margin:0 auto;
}
.lightbox-content figcaption{ text-align:center; margin-top:.5rem; color:#333; }
.lightbox-close{
  position:absolute; top:.5rem; right:.5rem; border:0; background:transparent;
  font-size:1.25rem; line-height:1; cursor:pointer; padding:.25rem .5rem;
}


#lightbox {
  position: fixed;
  z-index: 1001;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
}
#lightbox.active {
  display: flex;
}
#lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
}

