/* ===================================
   Reusable Card Component Styles
   =================================== */

.image-card {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-radius: 15px;
  overflow: visible;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease, z-index 0.3s ease;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(225, 180, 112, 0.2);
  padding: 12px;
  margin: 0;
  position: relative;
  z-index: 1;
}

.image-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 50px rgba(225, 180, 112, 0.3);
  border-color: rgba(225, 180, 112, 0.5);
}

/* Download button - full width on next row with dynamic god name */
.card-download-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 75%;
  margin-top: 15px;
  padding: 6px 6px;
  background: linear-gradient(135deg, #e1b470 0%, #ffd99f 100%);
  border: 1px solid #e1b470;
  border-radius: 8px;
  color: #3c1703;
  font-size: 8px;
  font-family: 'URW Gothic Demi', 'URW Gothic', sans-serif;
  cursor: pointer;
  align-self: center;
  transition: all 0.3s ease;
}

.card-download-btn:hover {
  background: linear-gradient(135deg, #ffd99f 0%, #e1b470 100%);
  border-color: #ffd99f;
  box-shadow: 0 4px 12px rgba(225, 180, 112, 0.4);
  transform: translateY(-2px);
}

.card-download-btn svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}

.card-download-btn span {
  text-align: center;
  word-wrap: break-word;
  max-width: 100%;
}

.image-card.expanded {
  z-index: 10;
  position: relative !important;
  transform: scale(1.05) translateY(-5px);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9) !important;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-color: rgba(225, 180, 112, 0.6) !important;
  /* Add margin to accommodate scale transform and prevent overlap */
  margin: 10px 0 !important;
}

.image-card.expanded:hover {
  transform: scale(1.05) translateY(-5px); /* Keep popup effect on hover when expanded */
}

/* Dim other cards when one is expanded */
.cards-container:has(.image-card.expanded) .image-card:not(.expanded) {
  opacity: 0.6;
  filter: blur(1px);
  transition: opacity 0.3s ease, filter 0.3s ease;
}

/* Card image wrapper with frame effect */
.image-card-image-wrapper {
  position: relative;
  padding: 12px;
  margin: 0 0 15px 0;
  background: 
    /* Outer frame gradient */
    linear-gradient(145deg, #3d3d3d 0%, #2a2a2a 50%, #1f1f1f 100%);
  border-radius: 8px;
  border: 8px solid #3a3a3a;
  box-shadow: 
    /* Outer shadow for depth */
    0 12px 35px rgba(0, 0, 0, 0.8),
    0 4px 12px rgba(0, 0, 0, 0.6),
    /* Inner frame highlight */
    inset 0 2px 4px rgba(255, 255, 255, 0.1),
    inset 0 -2px 4px rgba(0, 0, 0, 0.9),
    /* Inner border simulation for matting */
    inset 0 0 0 2px rgba(50, 50, 50, 0.6);
  overflow: hidden;
  flex-shrink: 0;
  /* Ensure frame fits content properly */
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 3/4;
  width: 100%;
}

/* Matting layer for card images */
.image-card-image-wrapper::before {
  content: '';
  position: absolute;
  inset: 12px;
  background: 
    /* Inner matting - subtle cream/beige tone */
    linear-gradient(145deg, rgba(245, 240, 230, 0.12), rgba(235, 225, 210, 0.1)),
    /* Subtle texture pattern */
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 6px,
      rgba(225, 180, 112, 0.04) 6px,
      rgba(225, 180, 112, 0.04) 12px
    );
  border-radius: 4px;
  pointer-events: none;
  z-index: 1;
  /* Inner matting border */
  border: 3px solid rgba(220, 200, 170, 0.25);
  box-shadow: 
    inset 0 0 20px rgba(0, 0, 0, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.15),
    inset 0 -1px 2px rgba(0, 0, 0, 0.4);
}

/* Decorative corner accent for card images */
.image-card-image-wrapper::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 16px;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(225, 180, 112, 0.2);
  border-bottom: none;
  border-right: none;
  pointer-events: none;
  z-index: 2;
  opacity: 0.6;
}

.image-card:hover .image-card-image-wrapper {
  border-color: rgba(225, 180, 112, 0.5);
  box-shadow: 
    0 18px 50px rgba(225, 180, 112, 0.25),
    0 6px 18px rgba(0, 0, 0, 0.7),
    inset 0 2px 4px rgba(255, 255, 255, 0.15),
    inset 0 -2px 4px rgba(0, 0, 0, 1),
    inset 0 0 0 2px rgba(70, 70, 70, 0.7);
}

.image-card:hover .image-card-image-wrapper::after {
  border-color: rgba(225, 180, 112, 0.4);
  opacity: 0.8;
}

.image-card-image {
  width: 100%;
  height: 100%;
  display: block;
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  border-radius: 2px;
  /* Inner shadow for depth */
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  object-fit: cover;
}

.image-card-content {
  padding: 15px 20px;
  flex-grow: 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.image-card-header {
  font-size: 20px;
  font-weight: 500;
  color: #e1b470;
  margin-bottom: 10px;
  line-height: 1.3;
  font-family: 'Khaleefa', serif;
  text-align: center;
}

.image-card-description-wrapper {
  width: 100%;
  flex-shrink: 0;
}

.image-card-description {
  font-size: 14px;
  color: #d4bf9a;
  line-height: 22px;
  font-family: 'URW Gothic', sans-serif;
  text-align: left;
  flex-grow: 0;
  flex-shrink: 0;
  margin: 0;
  padding: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  text-overflow: ellipsis;
  white-space: pre-line;
}

.image-card-description.truncated {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 44px;
}

/* When Read More is shown: no line-clamp/ellipsis - let content flow so Read More stays visible at end of line 2 */
.image-card-description.with-read-more {
  -webkit-line-clamp: unset;
  line-clamp: unset;
  overflow: visible;
  text-overflow: clip;
  display: block;
  -webkit-box-orient: unset;
}

.image-card-description:not(.truncated) {
  display: block;
  -webkit-line-clamp: none;
  line-clamp: none;
}

.read-more-link {
  color: #e1b470;
  cursor: pointer;
  font-size: 13px;
  font-family: 'URW Gothic', sans-serif;
  margin-left: 3px;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.read-more-link:hover {
  color: #ffd99f;
}

/* Card Grid Container */
.cards-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start; /* Cards align to top, not stretch */
  gap: 30px;
  padding: 40px 0;
  position: relative; /* For absolute positioning of expanded cards */
}

.cards-container .image-card {
  flex: 0 0 calc(33.333% - 20px);
  max-width: calc(33.333% - 20px);
  min-width: 300px;
  align-self: flex-start; /* Each card aligns to top independently */
}

.page-header-top {
  margin-top: 30px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .cards-container {
    gap: 10px;
    padding: 30px 8px;
  }

  .cards-container .image-card {
    flex: 0 0 calc(50% - 5px);
    max-width: calc(50% - 5px);
    min-width: 160px;
  }

  .image-card {
    max-width: 100%;
    margin: 0;
    padding: 8px;
  }

  .image-card-image-wrapper {
    padding: 8px;
    border-width: 6px;
    aspect-ratio: 3/4;
    box-shadow: 
      0 8px 25px rgba(0, 0, 0, 0.7),
      0 3px 10px rgba(0, 0, 0, 0.5),
      inset 0 1px 3px rgba(255, 255, 255, 0.08),
      inset 0 -1px 3px rgba(0, 0, 0, 0.8),
      inset 0 0 0 1px rgba(50, 50, 50, 0.5);
  }

  .image-card-image-wrapper::before {
    inset: 8px;
    border-width: 2px;
  }

  .image-card-image-wrapper::after {
    top: 11px;
    left: 11px;
    width: 15px;
    height: 15px;
  }

  .image-card-image {
    width: 100%;
    height: 100%;
    display: block;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
    object-fit: cover;
  }

  .image-card-header {
    font-size: 14px;
    margin-bottom: 6px;
  }

  .image-card-description {
    font-size: 11px;
    line-height: 16px;
  }

  .read-more-link {
    font-size: 11px;
  }

  .image-card-content {
    padding: 10px 12px;
  }

  .card-download-btn {
    padding: 5px 5px;
    font-size: 7px;
  }

  .card-download-btn svg {
    width: 14px;
    height: 14px;
  }
}

@media (max-width: 480px) {
  .cards-container {
    gap: 8px;
    padding: 20px 6px;
  }

  .cards-container .image-card {
    flex: 0 0 calc(50% - 4px);
    max-width: calc(50% - 4px);
    min-width: 140px;
  }

  .image-card {
    max-width: 100%;
    margin: 0;
    padding: 6px;
  }

  .image-card-image-wrapper {
    padding: 6px;
    border-width: 5px;
    box-shadow: 
      0 6px 20px rgba(0, 0, 0, 0.7),
      0 2px 8px rgba(0, 0, 0, 0.5),
      inset 0 1px 2px rgba(255, 255, 255, 0.06),
      inset 0 -1px 2px rgba(0, 0, 0, 0.8),
      inset 0 0 0 1px rgba(50, 50, 50, 0.4);
  }

  .image-card-image-wrapper::before {
    top: 6px;
    left: 6px;
    right: 6px;
    bottom: 6px;
    border-width: 2px;
  }

  .image-card-image-wrapper::after {
    top: 9px;
    left: 9px;
    width: 12px;
    height: 12px;
  }

  .image-card-image {
    width: 100%;
    height: auto;
    max-height: 180px;
    display: block;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
  }

  .image-card-header {
    font-size: 12px;
    margin-bottom: 5px;
  }

  .image-card-description {
    font-size: 10px;
    line-height: 14px;
  }

  .read-more-link {
    font-size: 10px;
  }

  .image-card-content {
    padding: 8px 10px;
  }

  .card-download-btn {
    padding: 4px 4px;
    font-size: 6px;
  }

  .card-download-btn svg {
    width: 12px;
    height: 12px;
  }
}

/* Optional: Card with different layout variations */
.image-card.vertical {
  max-width: 400px;
  margin: 0 auto;
}

.image-card.horizontal {
  flex-direction: row;
  max-width: 800px;
  margin: 0 auto;
}

.image-card.horizontal .image-card-image-wrapper {
  width: 40%;
  margin-bottom: 0;
}

.image-card.horizontal .image-card-image {
  width: 100%;
  height: auto;
  border-bottom: none;
}

.image-card.horizontal .image-card-content {
  width: 60%;
}

.page-header-top {
  margin-bottom: 40px;
}

@media (max-width: 768px) {
  .image-card.horizontal {
    flex-direction: column;
  }

  .image-card.horizontal .image-card-image-wrapper {
    width: 100%;
  }

  .image-card.horizontal .image-card-image {
    width: 100%;
    max-height: 350px;
    height: auto;
    border-right: none;
    border-bottom: none;
  }

  .image-card.horizontal .image-card-content {
    width: 100%;
  }
}


@media (min-width: 992px) {
  .page-header-top {
    margin-top: 80px;
  }
}

/* ===================================
   Navbar Adjustments for Medium & Large Screens
   =================================== */

@media (min-width: 768px) and (max-width: 991px) {
  .header-section .main-menu li a {
    font-size: 10px !important;
    padding: 4px 10px !important;
    margin-right: 4px !important;
  }

  .header-section .user-panel a {
    font-size: 10px !important;
    padding: 5px 18px !important;
  }

  .header-section .community-panel a {
    font-size: 10px !important;
    padding: 18px 18px !important;
  }

  .header-section .cta-group {
    gap: 4px !important;
  }

  .header-section .main-menu {
    margin-left: 15px !important;
  }

  .header-section .top-nav-area {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
  }
}

/* Fix for breaking around 1026px */
@media (min-width: 1000px) and (max-width: 1050px) {
  .header-section .main-menu li a {
    font-size: 11px !important;
    padding: 4px 16px !important;
    margin-right: 5px !important;
  }

  .header-section .user-panel a {
    font-size: 11px !important;
    padding: 6px 22px !important;
  }

  .header-section .community-panel a {
    font-size: 11px !important;
    padding: 22px 22px !important;
  }

  .header-section .cta-group {
    gap: 6px !important;
  }
}

@media (min-width: 992px) {
  .header-section .main-menu li a {
    font-size: 13px;
    padding: 5px 22px;
    margin-right: 8px;
  }

  .header-section .user-panel a {
    font-size: 13px;
    padding: 7px 28px;
  }

  .header-section .community-panel a {
    font-size: 13px;
    padding: 26px 28px;
  }

  .header-section .cta-group {
    gap: 10px;
  }
}

/* ===================================
   Images Gallery Section Styles
   =================================== */

.images-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
  padding: 40px 0;
}

.gallery-image-wrapper {
  flex: 0 0 calc(25% - 15px);
  max-width: calc(25% - 15px);
  min-width: 200px;
  position: relative;
  padding: 12px;
  background: 
    /* Outer frame - darker gradient */
    linear-gradient(145deg, #3d3d3d 0%, #2a2a2a 50%, #1f1f1f 100%);
  border-radius: 8px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  /* Outer frame border */
  border: 8px solid #3a3a3a;
  /* Multiple shadows for depth and frame layers */
  box-shadow: 
    /* Outer shadow for depth */
    0 12px 35px rgba(0, 0, 0, 0.8),
    0 4px 12px rgba(0, 0, 0, 0.6),
    /* Inner frame highlight */
    inset 0 2px 4px rgba(255, 255, 255, 0.1),
    inset 0 -2px 4px rgba(0, 0, 0, 0.9),
    /* Inner border simulation for matting */
    inset 0 0 0 2px rgba(50, 50, 50, 0.6);
  /* Allow height to adapt to content */
  display: flex;
  flex-direction: column;
  height: fit-content;
}

/* Image container with matting */
.gallery-image-container {
  position: relative;
  width: 100%;
  height: fit-content;
  background: 
    /* Inner matting - subtle cream/beige tone */
    linear-gradient(145deg, rgba(245, 240, 230, 0.12), rgba(235, 225, 210, 0.1)),
    /* Subtle texture pattern */
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 6px,
      rgba(225, 180, 112, 0.04) 6px,
      rgba(225, 180, 112, 0.04) 12px
    );
  border-radius: 4px;
  padding: 3px;
  border: 3px solid rgba(220, 200, 170, 0.25);
  box-shadow: 
    inset 0 0 20px rgba(0, 0, 0, 0.25),
    inset 0 1px 2px rgba(255, 255, 255, 0.15),
    inset 0 -1px 2px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Decorative corner accent - positioned relative to container */
.gallery-image-container::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 4px;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(225, 180, 112, 0.2);
  border-bottom: none;
  border-right: none;
  pointer-events: none;
  z-index: 2;
  opacity: 0.6;
}

.gallery-image-wrapper:hover {
  transform: translateY(-8px) scale(1.02);
  border-color: rgba(225, 180, 112, 0.5);
  box-shadow: 
    0 18px 50px rgba(225, 180, 112, 0.25),
    0 6px 18px rgba(0, 0, 0, 0.7),
    inset 0 2px 4px rgba(255, 255, 255, 0.15),
    inset 0 -2px 4px rgba(0, 0, 0, 1),
    inset 0 0 0 2px rgba(70, 70, 70, 0.7);
}

.gallery-image-wrapper:hover .gallery-image-container::before {
  border-color: rgba(225, 180, 112, 0.4);
  opacity: 0.8;
}

.gallery-image-wrapper:hover .gallery-image-container {
  border-color: rgba(220, 200, 170, 0.4);
}

.gallery-image {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  position: relative;
  z-index: 1;
  border-radius: 2px;
  /* Inner shadow for depth */
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Responsive Adjustments for Gallery */
@media (max-width: 768px) {
  .images-gallery {
    gap: 15px;
    padding: 30px 0;
  }

  .gallery-image-wrapper {
    flex: 0 0 calc(33.333% - 10px);
    max-width: calc(33.333% - 10px);
    min-width: 150px;
    padding: 8px;
    border-width: 6px;
    box-shadow: 
      0 8px 25px rgba(0, 0, 0, 0.7),
      0 3px 10px rgba(0, 0, 0, 0.5),
      inset 0 1px 3px rgba(255, 255, 255, 0.08),
      inset 0 -1px 3px rgba(0, 0, 0, 0.8),
      inset 0 0 0 1px rgba(50, 50, 50, 0.5);
  }

  .gallery-image-container {
    padding: 2px;
    border-width: 2px;
  }

  .gallery-image-container::before {
    top: 3px;
    left: 3px;
    width: 15px;
    height: 15px;
  }
}

@media (max-width: 480px) {
  .images-gallery {
    gap: 10px;
    padding: 20px 0;
  }

  .gallery-image-wrapper {
    flex: 0 0 calc(50% - 5px);
    max-width: calc(50% - 5px);
    min-width: 120px;
    padding: 6px;
    border-width: 5px;
    box-shadow: 
      0 6px 20px rgba(0, 0, 0, 0.7),
      0 2px 8px rgba(0, 0, 0, 0.5),
      inset 0 1px 2px rgba(255, 255, 255, 0.06),
      inset 0 -1px 2px rgba(0, 0, 0, 0.8),
      inset 0 0 0 1px rgba(50, 50, 50, 0.4);
  }

  .gallery-image-container {
    padding: 2px;
    border-width: 2px;
  }

  .gallery-image-container::before {
    top: 2px;
    left: 2px;
    width: 12px;
    height: 12px;
  }

  .gallery-image-wrapper:hover {
    transform: translateY(-5px) scale(1.01);
  }
}


.modal-header-wrapper {
  position: relative;
  width: 100%;
  margin-bottom: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-header-wrapper .header-image {
  display: block;
  width: 100%;
  height: auto;
}

.modal-header-wrapper .text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: normal;
  text-align: center;
  width: 100%;
  font-family: 'Khaleefa';
  font-weight: bold;
  color: #3c1703;
  padding: 10px;
  margin: 0;
  z-index: 1;
}

#userEmail::placeholder {
  color: rgba(255, 255, 255, 0.5);
  opacity: 1;
}

#userEmail::-webkit-input-placeholder {
  color: rgba(255, 255, 255, 0.5);
}

#userEmail::-moz-placeholder {
  color: rgba(255, 255, 255, 0.5);
  opacity: 1;
}

#userEmail:-ms-input-placeholder {
  color: rgba(255, 255, 255, 0.5);
}

/* Download Modal Styles */
.download-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.download-modal.active {
  opacity: 1;
  visibility: visible;
}

.download-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  z-index: 99998;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.download-modal.active .download-modal-overlay {
  opacity: 1;
}

.download-modal-content {
  position: relative;
  z-index: 100000;
  background: linear-gradient(135deg, #2a1f1a 0%, #1a1510 100%);
  border: 2px solid #e1c286;
  border-radius: 10px;
  width: 60%;
  max-width: 90%;
  max-height: 85vh;
  overflow: auto;
  display: flex;
  flex-direction: column;
  transform: scale(0.8) translateY(-20px);
  opacity: 0;
  transition: transform 0.5s ease, opacity 0.5s ease;
}

.download-modal.active .download-modal-content {
  transform: scale(1) translateY(0);
  opacity: 1;
}

.download-modal-close {
  z-index: 100001;
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(225, 180, 112, 0.5);
  color: rgb(225, 180, 112);
  font-weight: bold;
  box-shadow: rgba(0, 0, 0, 0.3) 0px 2px 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 24px;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.download-modal-close:hover {
  transform: scale(1.1) rotate(90deg);
}

/* Modal body: image left 45%, form right 55% */
.download-modal-body {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  flex: 1;
  min-height: 220px;
  max-height: 70vh;
  overflow: hidden;
}

/* Image section - left 45%, frame effect like card */
.download-modal-image-preview {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, #3d3d3d 0%, #2a2a2a 50%, #1f1f1f 100%);
  border: 6px solid #3a3a3a;
  border-right: 2px solid rgba(225, 180, 112, 0.2);
  border-radius: 8px;
  box-shadow:
    0 12px 35px rgba(0, 0, 0, 0.8),
    0 4px 12px rgba(0, 0, 0, 0.6),
    inset 0 2px 4px rgba(255, 255, 255, 0.1),
    inset 0 -2px 4px rgba(0, 0, 0, 0.9),
    inset 0 0 0 2px rgba(50, 50, 50, 0.6);
  overflow: hidden;
  flex: 0 0 42%;
  width: auto;
  padding: 10px;
  min-height: 0;
  align-self: stretch;
}

.download-modal-image-preview::before {
  content: '';
  position: absolute;
  inset: 10px;
  background: linear-gradient(145deg, rgba(245, 240, 230, 0.12), rgba(235, 225, 210, 0.1)),
    repeating-linear-gradient(0deg, transparent, transparent 6px, rgba(225, 180, 112, 0.04) 6px, rgba(225, 180, 112, 0.04) 12px);
  border-radius: 4px;
  border: 3px solid rgba(220, 200, 170, 0.25);
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.25), inset 0 1px 2px rgba(255, 255, 255, 0.15), inset 0 -1px 2px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 1;
}

.download-modal-image-preview::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 16px;
  width: 20px;
  height: 20px;
  border: 1px solid rgba(225, 180, 112, 0.2);
  border-bottom: none;
  border-right: none;
  pointer-events: none;
  z-index: 2;
  opacity: 0.6;
}

.download-modal-image-preview img {
  position: relative;
  z-index: 2;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: 2px;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.3);
}

/* Form section - right 55%, dark brown background */
.download-modal-form {
  flex: 1 1 58%;
  display: flex;
  flex-direction: column;
  padding: 40px 40px 20px 24px;
  background: linear-gradient(180deg, #2a1f1a 0%, #1a1510 100%);
  overflow-y: auto;
  position: relative;
}

.download-modal-form .download-form {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.download-modal-form .modal-header-wrapper {
  margin-bottom: 14px;
}

.download-modal-form .modal-header-wrapper .header-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 58px;
  object-fit: contain;
  object-position: center;
}

.download-modal-form .modal-header-wrapper .text-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  white-space: normal;
  text-align: center;
  width: 100%;
  font-family: 'Khaleefa';
  font-weight: bold;
  font-size: 16px;
  color: #3c1703;
  padding: 8px;
  margin: 0;
  z-index: 1;
}

.download-modal-form .modal-body-text {
  margin-bottom: 16px;
}

.download-modal-form .modal-body-text .modal-bold-text {
  font-size: 13px;
  color: rgb(255, 252, 217);
  line-height: 1.4;
  margin-bottom: 6px;
  font-family: 'URW Gothic', sans-serif;
}

.download-modal-form .modal-body-text .modal-italic-text {
  font-size: 12px;
  color: rgb(255, 252, 217);
  font-style: italic;
  line-height: 1.4;
  font-family: 'URW Gothic', sans-serif;
}

.download-modal-form .download-form .form-group {
  margin-bottom: 16px;
}

.download-modal-form .download-form .form-group input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 13px;
  padding: 8px 0;
  outline: none;
  transition: border-color 0.2s ease;
}

.download-modal-form .download-form .form-group input:focus {
  border-bottom-color: #e1b470;
}

.download-modal-form .download-form .form-group input::placeholder {
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.download-modal-form .form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: 18px;
}

.download-modal-form .form-actions .btn-secondary {
  flex: 1;
  min-width: 110px;
  padding: 6px 12px !important;
  font-size: 13px;
}

.download-modal-form .form-actions .btn-primary {
  flex: 1;
  min-width: 120px;
  padding: 6px 12px !important;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(225, 180, 112, 0.3);
}

/* Medium screens (tablet) */
@media (max-width: 991px) {
  .download-modal-content {
    width: 85%;
    max-height: 88vh;
  }

  .download-modal-body {
    min-height: 240px;
    max-height: 78vh;
  }

  .download-modal-image-preview {
    flex: 0 0 42%;
    padding: 10px;
  }

  .download-modal-image-preview::before {
    inset: 10px;
  }

  .download-modal-image-preview::after {
    top: 14px;
    left: 14px;
    width: 16px;
    height: 16px;
  }

  .download-modal-form {
    padding: 40px 32px 20px 24px;
  }

  .download-modal-form .modal-header-wrapper .header-image {
    max-height: 60px;
  }

  .download-modal-form .modal-body-text .modal-bold-text {
    font-size: 14px;
  }

  .download-modal-form .modal-body-text .modal-italic-text {
    font-size: 12px;
  }

  .download-modal-form .form-actions .btn-secondary,
  .download-modal-form .form-actions .btn-primary {
    padding: 8px 12px !important;
    min-width: 100px;
  }
}

/* Small screens (mobile) */
@media (max-width: 768px) {
  .download-modal-content {
    width: 90%;
    max-height: 90vh;
  }

  .download-modal-body {
    flex-direction: column;
    min-height: auto;
    max-height: 88vh;
  }

  .download-modal-image-preview {
    flex: 0 0 auto;
    width: fit-content;
    max-width: min(55%, 240px);
    max-height: 40vh;
    margin: 0 auto;
    padding: 6px;
    border: 5px solid #3a3a3a;
    border-right: 5px solid #3a3a3a;
    border-bottom: 2px solid rgba(225, 180, 112, 0.2);
  }

  .download-modal-image-preview::before {
    inset: 6px;
  }

  .download-modal-image-preview::after {
    top: 10px;
    left: 10px;
    width: 10px;
    height: 10px;
  }

  .download-modal-form {
    flex: 1 1 auto;
    padding: 16px 12px 14px;
  }

  .download-modal-form .modal-header-wrapper .header-image {
    max-height: 38px;
  }

  .download-modal-form .modal-body-text .modal-bold-text {
    font-size: 11px;
  }

  .download-modal-form .modal-body-text .modal-italic-text {
    font-size: 9px;
  }

  .download-modal-form .download-form .form-group input {
    font-size: 12px;
  }

  .download-modal-form .download-form .form-group input::placeholder {
    font-size: 9px;
  }

  .download-modal-form .form-actions {
    flex-direction: row;
    justify-content: space-between;
    padding-top: 14px;
  }

  .download-modal-form .form-actions .btn-secondary,
  .download-modal-form .form-actions .btn-primary {
    flex: 0 0 45%;
    min-width: 0;
    padding: 8px 10px !important;
    font-size: 11px;
  }

  .download-modal-form .modal-header-wrapper .text-overlay {
    font-size: 12px;
    padding: 6px;
  }

  .download-modal-close {
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    font-size: 18px;
  }
}

/* Extra small screens */
@media (max-width: 480px) {
  .download-modal-content {
    width: 92%;
    max-height: 92vh;
  }

  .download-modal-image-preview {
    max-width: min(50%, 200px);
    max-height: 36vh;
    padding: 5px;
    border-width: 4px;
  }

  .download-modal-image-preview::before {
    inset: 5px;
  }

  .download-modal-image-preview::after {
    top: 8px;
    left: 8px;
    width: 8px;
    height: 8px;
  }

  .download-modal-form {
    padding: 12px 8px 12px;
  }

  .download-modal-form .modal-header-wrapper .header-image {
    max-height: 32px;
  }

  .download-modal-form .modal-body-text .modal-bold-text {
    font-size: 10px;
  }

  .download-modal-form .modal-body-text .modal-italic-text {
    font-size: 9px;
  }

  .download-modal-form .download-form .form-group input {
    font-size: 11px;
  }

  .download-modal-form .download-form .form-group input::placeholder {
    font-size: 8px;
  }

  .download-modal-form .form-actions {
    justify-content: space-between;
  }

  .download-modal-form .form-actions .btn-secondary,
  .download-modal-form .form-actions .btn-primary {
    flex: 0 0 45%;
    min-width: 0;
    padding: 6px 8px !important;
    font-size: 10px;
  }

  .download-modal-form .modal-header-wrapper .text-overlay {
    font-size: 10px;
    padding: 5px;
  }

  .download-modal-close {
    top: 5px;
    right: 5px;
    width: 26px;
    height: 26px;
    font-size: 16px;
  }
}
