/* ====== POPUP STYLES ====== */
#popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  text-align: center;
  z-index: 2000;
  padding: 20px;
  overflow-y: auto;
}

#popup img {
  margin: auto;
  display: block;
  max-width: 95vw;
  max-height: 90vh;
  object-fit: contain;
  border: 4px solid white;
  border-radius: 10px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.7);
}

#closeBtn {
  position: fixed;
  top: 20px;
  right: 30px;
  font-size: 32px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  z-index: 2100;
  transition: color 0.3s ease;
  line-height: 1;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#closeBtn:hover {
  color: #ff4444;
  transform: scale(1.1);
}

/* ====== SECTION STYLING ====== */
#LatestNewsSection {
  margin: 25px 0 15px 0;
}

#LatestNewsSection .container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

#LatestNewsSection .row {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: space-between;
}

/* ====== CUSTOM PANEL STYLING ====== */
.custom-panel {
  background: linear-gradient(135deg, #f8eecb 0%, #f5e6b3 100%);
  border: 2px solid #8b6b3f;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  flex: 1;
  min-width: 300px;
}

.custom-panel:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
}

.custom-panel::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #d4af37, #8b6b3f, #d4af37);
}

.panel-heading {
  font-size: 1.8rem;
  color: #5d4e37;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  border-bottom: 2px solid #8b6b3f;
  padding-bottom: 10px;
}

.panel-body {
  position: relative;
}

/* ====== STAR ANIMATION ====== */
.star {
  color: #d4af37;
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.7;
    transform: scale(1.2);
  }
}

/* ====== SWIPER CONTAINER STYLES ====== */
.swiper {
  width: 100%;
  padding: 20px 0 40px 0;
  height: 400px;
  border-radius: 12px;
}

.swiper-wrapper {
  border-radius: 12px;
}

.swiper-slide {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 15px;
  overflow: hidden;
  position: relative;
  padding: 20px;
  background: rgba(255, 255, 255, 0.3);
}

.swiper-slide img {
  width: 100%;
  max-height: 280px;
  object-fit: cover;
  border-radius: 15px;
  transition: all 0.5s ease;
  filter: brightness(0.9);
  cursor: zoom-in;
}

.swiper-slide img:hover {
  transform: scale(1.03);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  filter: brightness(1);
}

.swiper-slide-active {
  transform: scale(1.05);
  z-index: 2;
}

.swiper-slide-active img {
  filter: brightness(1);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* ====== SWIPER SLIDE CONTENT ====== */
.swiper-slide p {
  color: #5d4e37;
  font-size: 1rem;
  margin: 10px 0;
  padding: 10px;
  font-weight: 600;
  text-align: center;
  line-height: 1.5;
}

.swiper-slide ul {
  list-style: none;
  padding: 10px;
  text-align: left;
  width: 100%;
}

.swiper-slide li {
  margin: 12px 0;
  padding: 8px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.swiper-slide li:hover {
  background: rgba(212, 175, 55, 0.2);
  padding-left: 15px;
}

.swiper-slide a {
  color: #1e5bad;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
  display: inline-block;
}

.swiper-slide a:hover {
  color: #0d2f5f;
  text-decoration: underline;
}

/* ====== SWIPER NAVIGATION BUTTONS ====== */
.swiper-button-next,
.swiper-button-prev {
  background: rgba(139, 107, 63, 0.9);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  margin-top: -22px;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.swiper-button-next:after,
.swiper-button-prev:after {
  font-size: 18px;
  color: white;
  font-weight: bold;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
  background: #8b6b3f;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.swiper-button-next:focus,
.swiper-button-prev:focus {
  outline: 3px solid #d4af37;
  outline-offset: 3px;
}

.swiper-button-next:disabled,
.swiper-button-prev:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ====== SWIPER PAGINATION ====== */
.swiper-pagination {
  position: relative;
  bottom: 0;
  margin-top: 15px;
}

.swiper-pagination-bullet {
  background: #8b6b3f;
  opacity: 0.5;
  width: 12px;
  height: 12px;
  margin: 0 5px;
  transition: all 0.3s ease;
}

.swiper-pagination-bullet:hover {
  opacity: 0.8;
}

.swiper-pagination-bullet-active {
  opacity: 1;
  background: #d4af37;
  transform: scale(1.2);
}

/* ====== RESPONSIVE DESIGN ====== */
@media (max-width: 992px) {
  #LatestNewsSection .row {
    gap: 15px;
  }
  
  .custom-panel {
    min-width: 280px;
  }
  
  .panel-heading {
    font-size: 1.6rem;
  }
}

@media (max-width: 768px) {
  #LatestNewsSection .row {
    flex-direction: column;
  }
  
  .custom-panel {
    width: 100%;
    min-width: 100%;
  }
  
  .swiper {
    height: 350px;
  }
  
  .swiper-slide img {
    max-height: 250px;
  }
  
  .panel-heading {
    font-size: 1.5rem;
  }
  
  .swiper-button-next,
  .swiper-button-prev {
    width: 40px;
    height: 40px;
    margin-top: -20px;
  }
  
  .swiper-button-next:after,
  .swiper-button-prev:after {
    font-size: 16px;
  }
}

@media (max-width: 576px) {
  #LatestNewsSection .container {
    padding: 10px;
  }
  
  .custom-panel {
    padding: 12px;
  }
  
  .swiper {
    height: 280px;
    padding: 15px 0 30px 0;
  }
  
  .swiper-slide {
    padding: 15px;
  }
  
  .swiper-slide img {
    max-height: 200px;
  }
  
  .swiper-slide p {
    font-size: 0.9rem;
    margin: 8px 0;
    padding: 8px;
  }
  
  .swiper-slide ul {
    padding: 8px;
  }
  
  .swiper-slide li {
    margin: 10px 0;
    padding: 6px;
    font-size: 0.9rem;
  }
  
  .panel-heading {
    font-size: 1.3rem;
    gap: 8px;
  }
  
  .swiper-button-next,
  .swiper-button-prev {
    width: 35px;
    height: 35px;
    margin-top: -18px;
  }
  
  .swiper-button-next:after,
  .swiper-button-prev:after {
    font-size: 14px;
  }
  
  #closeBtn {
    top: 10px;
    right: 15px;
    font-size: 28px;
  }
}

/* ====== ACCESSIBILITY ====== */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ====== LOADING STATE ====== */
.swiper-slide img[loading="lazy"] {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ====== RESET DEFAULT STYLES ====== */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
}