/* Base Styles */
body {
  background-color: black;
}

/* Typography */
.h1-text,
.modal-title {
  font-family: 'Libre Baskerville', serif;
  font-weight: 400;
  line-height: 100%;
  letter-spacing: 0%;
  text-transform: uppercase;
  margin-bottom: 10px;
  background: linear-gradient(345.85deg, #856220 -0.58%, #F4E683 36.42%, #BF923D 66.51%, #F1EA82 102.1%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.h1-text {
  font-size: 42px;
}

.modal-title {
  font-size: 28px;
  font-weight: 700;
  text-shadow: 0 0 8px rgba(255, 236, 179, 0.15);
}

.p-text {
  font-family: 'Libre Baskerville', serif;
  font-weight: 400;
  font-size: 14px;
  opacity: 1;
  line-height: 30px;
  letter-spacing: 0%;
  color: #A39F84;
}

.p-nav {
  font-family: 'Libre Baskerville', serif;
  font-weight: 400;
  font-size: 20px;
  line-height: 100%;
  letter-spacing: 0%;
  text-transform: uppercase;
}

/* Layout Utilities */
.vh-50 {
  min-height: 90vh;
}

.vw-50 {
  width: 50vw;
}

.w-70 {
  width: 70%;
}

/* Navigation */
.nav {
  padding: 25px 35px;
  z-index: 1000;
}

.button-nav {
  width: 200px !important;
  height: 38px !important;
  font-family: 'Libre Baskerville', serif;
  font-weight: 700;
  font-size: 11.8px !important;
  line-height: 22.13px !important;
  letter-spacing: 0% !important;
  text-transform: uppercase;
}

/* Buttons */
.button {
  width: 240px;
  height: 52px;
  border-radius: 33px;
  border: 2px solid #FFFFFF2E;
  padding: 8px;
  color: #260800CC;
  background: linear-gradient(345.85deg, #856220 7.6%, #DAA44C 48.59%, #FFFEF7 102.1%),
    radial-gradient(50% 50% at 50% 50%, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.1) 100%);
  font-family: 'Libre Baskerville', serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 30px;
  letter-spacing: 0%;
  text-transform: uppercase;
}

/* Images & Backgrounds */
.cover-image-header {
  position: relative;
  height: 763px;
  width: 40vw;
  max-width: 500px;
  min-width: 300px;
  background-image: url('./bookcoverheader.webp');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

@media (max-width: 1200px) and (min-width: 861px) {
  .cover-image-header {
    width: 35vw;
    height: 600px;
  }
}

@media (max-width: 1000px) and (min-width: 861px) {
  .cover-image-header {
    width: 30vw;
    height: 500px;
  }
}

header {
  background-image: url('./header.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  padding: 8px;
}

.section-1 {
  background-image: url('./image.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  padding: 8em;
}

.section-2 {
  background-image: url('./temple.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  padding: 8em;
}

/* Responsive Utilities */
.hide-mobile {
  display: block;
}

/* Mobile-only elements */
.mobile-only {
  display: none;
}

.mobile-text-preview {
  display: none;
}

.mobile-floating-btn {
  display: none;
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none;
  }
}

/* Modal Styles */
.modal-content {
  background-image: url('./modalbg.webp');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, 0.3);
  box-shadow: 0 0 30px rgba(255, 228, 147, 0.12);
  max-width: 450px;
  padding: 3rem 2rem;
  color: #e8e0c0;
  text-align: center;
  border-radius: 8px;
}

.modal-body p {
  color: #d3c9a4;
  font-size: 1rem;
  margin-bottom: 2rem;
}

.modal .button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 1rem;
  background: transparent;
  border: 1px solid rgba(212, 175, 55, 0.5);
  border-radius: 6px;
  font-family: 'Libre Baskerville', serif;
  font-size: 16px;
  font-weight: 700;
  text-transform: uppercase;
  color: #dcbf75;
  box-shadow: inset 0 0 0 transparent;
  transition: all 0.2s ease-in-out;
  text-decoration: none;
}

.modal .button:hover {
  background-color: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 8px rgba(255, 236, 179, 0.15);
  transform: translateY(-1px);
}

.modal .btn-outline-light {
  padding: 10px 14px;
  font-size: 14px;
  text-transform: uppercase;
  opacity: 0.6;
}

/* Story Modal Styles */
.story-modal .modal-content {
  max-width: 95vw;
  max-height: 90vh;
  background: rgba(0, 0, 0, 0.95);
  border: 1px solid rgba(212, 175, 55, 0.4);
  border-radius: 15px;
}

.story-modal .modal-body {
  max-height: 70vh;
  overflow-y: auto;
  padding: 0.5rem;
  text-align: left;
}

.story-modal .story-text {
  font-family: 'Libre Baskerville', serif;
  font-size: 16px;
  line-height: 28px;
  color: #D3C9A4;
  text-align: justify;
  margin-bottom: 1.5rem;
}

.story-modal .modal-header {
  border-bottom: 1px solid rgba(212, 175, 55, 0.3);
  padding-bottom: 1rem;
}

.story-modal .btn-close {
  filter: invert(1);
  opacity: 0.7;
}

.story-modal .btn-close:hover {
  opacity: 1;
}

.story-modal .button {
  margin: 1rem 0.5rem 0.5rem 0.5rem;
  padding: 12px 16px;
}

/* Footer Styles */
.footer {
  background: linear-gradient(to top, rgba(0,0,0,0.95), rgba(0,0,0,0.7));
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  padding: 3rem 2rem 2rem;
  width: 100%;
  z-index: 10;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand {
  font-size: 1.2rem;
  font-weight: 700;
  color: #d4af37;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

.footer-description {
  font-size: 0.95rem;
  color: #999;
  line-height: 1.5;
  margin-bottom: 2rem;
  max-width: 400px;
}

.footer-section h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #d4af37;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section li {
  margin-bottom: 0.5rem;
}

.footer-section a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: #d4af37;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 50%;
  color: #d4af37;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.social-links a:hover {
  background: rgba(212, 175, 55, 0.2);
  border-color: #d4af37;
  transform: translateY(-2px);
}

.footer-bottom {
  border-top: 1px solid rgba(212, 175, 55, 0.2);
  padding-top: 2rem;
  margin-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.copyright {
  font-size: 0.85rem;
  color: #666;
}

.footer-legal {
  display: flex;
  gap: 2rem;
}

.footer-legal a {
  font-size: 0.85rem;
  color: #999;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-legal a:hover {
  color: #d4af37;
}

/* Mobile Responsive Styles */
@media (max-width: 1080px) {
  .nav {
    display: none !important;
  }
}

@media (max-width: 860px) {
  .hide-desktop {
    display: block;
  }
  
  .hide-mobile {
    display: none;
  }

  .mobile-only {
    display: block;
  }

  .nav {
    display: none !important;
  }

  /* Mobile Background - Force stretch to cover full screen */
  header {
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-attachment: scroll !important;
    background-repeat: no-repeat !important;
  }

  .section-1 {
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-attachment: scroll !important;
    background-repeat: no-repeat !important;
  }

  .section-2 {
    background-size: 100% 100% !important;
    background-position: center center !important;
    background-attachment: scroll !important;
    background-repeat: no-repeat !important;
  }

  /* Enhanced Mobile Typography */
  .h1-text {
    font-size: 32px;
    text-align: left;
    text-shadow: 0 0 20px rgba(255, 236, 179, 0.4);
    animation: titleGlow 3s ease-in-out infinite alternate;
  }

  /* Header title stays centered */
  header .h1-text {
    text-align: center;
  }

  @keyframes titleGlow {
    from { 
      text-shadow: 0 0 20px rgba(255, 236, 179, 0.4);
    }
    to { 
      text-shadow: 0 0 30px rgba(255, 236, 179, 0.6), 0 0 40px rgba(255, 236, 179, 0.3);
    }
  }

  /* Mobile Text Preview Cards */
  .mobile-text-preview {
    display: block;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: none;
    border-top: 2px solid transparent;
    border-bottom: 2px solid transparent;
    border-image: linear-gradient(90deg, 
      transparent 0%, 
      rgba(212, 175, 55, 0.6) 20%, 
      rgba(241, 234, 130, 0.8) 50%, 
      rgba(212, 175, 55, 0.6) 80%, 
      transparent 100%
    ) 1;
    padding: 2rem 1.5rem;
    margin: 2rem 0;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
  }

  .mobile-text-preview.animate-in {
    opacity: 1;
    transform: translateY(0);
  }

  .mobile-text-preview:hover {
    background: rgba(0, 0, 0, 0.25);
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(212, 175, 55, 0.15);
  }

  .mobile-text-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.08), transparent);
    animation: shimmer 5s infinite;
  }

  .mobile-text-preview::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, 
      transparent 0%, 
      rgba(212, 175, 55, 0.4) 20%, 
      rgba(241, 234, 130, 0.6) 50%, 
      rgba(212, 175, 55, 0.4) 80%, 
      transparent 100%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .mobile-text-preview:hover::after {
    opacity: 1;
  }

  @keyframes shimmer {
    0% { left: -100%; }
    100% { left: 100%; }
  }

  .mobile-text-preview .preview-text {
    font-family: 'Libre Baskerville', serif;
    font-size: 14px;
    line-height: 24px;
    color: #B8B49A;
    position: relative;
    z-index: 2;
  }

  .mobile-text-preview .read-more {
    font-size: 12px;
    color: #d4af37;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
  }

  .mobile-text-preview .read-more i {
    transition: transform 0.3s ease;
  }

  .mobile-text-preview:hover .read-more i {
    transform: translateX(3px);
  }

  /* Mobile Floating Button */
  .mobile-floating-btn {
    display: block;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    animation: float 3s ease-in-out infinite;
  }

  @keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
  }

  .mobile-floating-btn .btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(345.85deg, #856220 7.6%, #DAA44C 48.59%, #FFFEF7 102.1%);
    border: 2px solid rgba(212, 175, 55, 0.5);
    color: #260800;
    font-size: 18px;
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
    transition: all 0.3s ease;
  }

  .mobile-floating-btn .btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.6);
  }

  /* Mobile Layout Adjustments */
  .vw-50 {
    width: 90vw;
    text-align: center;
    align-items: center !important;
  }

  .cover-image-header {
    display: none !important;
  }

  header {
    flex-direction: column;
    text-align: center;
    padding: 40px 20px;
    position: relative;
    min-height: 100vh;
  }

  header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    pointer-events: none;
  }

  /* Hide original mobile paragraph */
  header .p-text.hide-desktop {
    display: none !important;
  }

  .section-1, .section-2 {
    padding: 4em 1.5em;
    text-align: center;
    position: relative;
    min-height: 80vh;
  }

  .section-1 > div, .section-2 > div {
    width: 90vw;
    text-align: left;
    align-items: flex-start !important;
    position: relative;
    z-index: 2;
  }

  /* Hide original text paragraphs on mobile */
  .section-1 .p-text:not(.preview-text),
  .section-2 .p-text:not(.preview-text) {
    display: none !important;
  }

  .button {
    width: 220px;
    height: 50px;
    font-size: 14px;
    margin: 1rem auto;
    transition: all 0.3s ease;
  }

  .button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.3);
  }

  .w-70 {
    width: 100%;
  }

  /* Mobile Animations */
  .section-1, .section-2 {
    animation: fadeInUp 1s ease-out;
  }

  @keyframes fadeInUp {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
}

@media (max-width: 768px) {
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .footer-legal {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
}

@media (max-width: 530px) {
  .cover-image-header {
    width: 80vw;
    height: 400px;
  }

  .mobile-text-preview {
    margin: 1rem 0;
    padding: 1.2rem;
  }

  .h1-text {
    font-size: 28px;
  }
}

@media (max-width: 450px) {
  .cover-image-header {
    width: 85vw;
    height: 350px;
    background-size: contain;
  }

  .h1-text {
    font-size: 24px;
    text-align: center;
  }

  .mobile-text-preview {
    padding: 1rem;
  }

  .mobile-text-preview .preview-text {
    font-size: 13px;
    line-height: 22px;
  }
}