/* ==========================================================
   UI Components CSS
   File: components.css
   Contains: Notice, Banner, Registration/Login, FAQ
   ========================================================== */

/* ================== Notice Marquee ================== */
.notice-wrapper {
    width: 100%;
}

.marquee-wrapper {
    background: #1E2939;
    padding: 11px;
    white-space: nowrap;
    overflow: hidden;
    position: relative;

    /* Perfect vertical centering */
    display: flex;
    align-items: center;
    line-height: 1; /* stabilizes vertical alignment */
}

.marquee-content {
    display: inline-block;
    padding-left: 100%;
    animation: scrollText 30s linear infinite;
    margin-right: 50px;
    font-size: 15px;
}

/* Mobile text readability */
@media (max-width: 480px) {
    .marquee-content {
        font-size: 14px;
    }
}

@keyframes scrollText {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-100%);
    }
}

/* ================== Banner Section ================== */
.banner-section .container {
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    padding: 0 12px;
    box-sizing: border-box;
}

.banner-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    padding-top: 13px;
}

.banner-swiper {
    width: 100%;
    padding: 20px 0;
}

.banner-swiper .swiper-wrapper {
    display: flex;
    align-items: center;
}

/* Base Slide – Side Slides */
.banner-swiper .swiper-slide {
    flex-shrink: 0;
    transition: all 0.4s ease;
    width: 25%;
    height: 260px;
    opacity: 0.55;
    z-index: 5;
}

/* Image Wrapper */
.img-wrap {
    overflow: hidden;
    border-radius: 0.75rem;
    height: 100%;
    background: #111;
}

.img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Overlay Hover */
.overlay {
    transition: opacity 0.3s ease-in-out;
    opacity: 0.4;
    position: absolute;
    inset: 0;
    background-color: rgba(0,0,0,0.5);
}
.swiper-slide:hover .overlay {
    opacity: 0.7;
}

/* Center Slide */
.banner-swiper .swiper-slide-active {
    width: 50%;
    opacity: 1;
    z-index: 20;
}

/* Adjacent Slides */
.banner-swiper .swiper-slide-prev,
.banner-swiper .swiper-slide-next {
    width: 30%;
    opacity: 0.75;
    z-index: 10;
}

/* Navigation Buttons */
.banner-prev-btn,
.banner-next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%) scale(0.9);
    background: #ff8a00;
    color: #fff;
    border: none;
    padding: 12px;
    border-radius: 9999px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.35);
    cursor: pointer;
    z-index: 50;
    opacity: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.banner-prev-btn { left: 30px; }
.banner-next-btn { right: 30px; }

.banner-wrapper:hover .banner-prev-btn,
.banner-wrapper:hover .banner-next-btn {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

.banner-prev-btn svg,
.banner-next-btn svg {
    width: 1.25rem;
    height: 1.25rem;
}

/* ----------------- Side Slides Hover Effect (Opacity Only) ----------------- */
.banner-swiper .swiper-slide-prev:hover .img-wrap img,
.banner-swiper .swiper-slide-next:hover .img-wrap img {
    opacity: 0.7;               /* slightly fade */
    transition: opacity 0.3s ease-in-out;
}

/* Center Slide hover unaffected */
.banner-swiper .swiper-slide-active:hover .img-wrap img {
    opacity: 1;
}

/* Overlay opacity optional for smoother effect */
.banner-swiper .swiper-slide-prev:hover .overlay,
.banner-swiper .swiper-slide-next:hover .overlay {
    opacity: 0.3;               /* lighter overlay on side slides */
    transition: opacity 0.3s ease-in-out;
}

.banner-swiper .swiper-slide-active:hover .overlay {
    opacity: 0.7;               /* normal overlay for center slide */
}

/* ----------------- Responsive ----------------- */
@media (max-width: 1024px) {
    .banner-swiper .swiper-slide,
    .banner-swiper .swiper-slide-prev,
    .banner-swiper .swiper-slide-next {
        height: 240px;
    }
}

@media (max-width: 767px) {
    .banner-swiper .swiper-slide,
    .banner-swiper .swiper-slide-active,
    .banner-swiper .swiper-slide-prev,
    .banner-swiper .swiper-slide-next {
        width: 100% !important; /* only one slide visible */
        height: auto;
        opacity: 1;
    }
    .banner-prev-btn,
    .banner-next-btn {
        display: none;
    }
}

/* ================== Registration & Login ================== */
/* Wrapper for auth forms */
.auth-sections {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 40px;
  padding: 80px 20px;
  flex-wrap: wrap;
}

/* Each form box */
.auth-box {
  background: #0b0f2d;
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.3);
  padding: 40px;
  flex: 1;
  min-width: 300px;
  max-width: 499px;
  display: flex;
  flex-direction: column;
}

/* Titles */
.auth-box h2 {
  font-size: 28px;
  font-weight: 700;
  color: #9477FF;
  margin-bottom: 15px;
}

/* Paragraph */
.auth-box p {
  color: #ccc;
  font-size: 15px;
  margin-bottom: 25px;
}

/* Form layout */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-form label {
  font-size: 14px;
  font-weight: 600;
  color: #E685FF;
  margin-bottom: 6px;
}

.auth-form input {
  width: 100%;
  padding: 12px;
  border: 1px solid #444;
  border-radius: 10px;
  background: #0B0F2D;
  color: #fff;
  outline: none;
  transition: 0.3s;
}

.auth-form input::placeholder {
  color: #888;
}

.auth-form input:focus {
  border-color: #9377FF;
  box-shadow: 0 0 0 3px rgba(147, 119, 255, 0.2);
}

/* Buttons */
.auth-btn {
  padding: 12px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s;
}

.login-btn {
  background: #9477FF;
  color: #fff;
}

.login-btn:hover {
  background: #8055e6;
}

.register-btn {
  background: #E685FF;
  color: #fff;
}

.register-btn:hover {
  background: #d470e0;
}

/* Responsive auth forms */
@media(max-width: 768px) {
  .auth-sections {
    flex-direction: column;
    align-items: center;
  }
}

/* ================== FAQ Section ================== */
.faq-section .container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  color: white;
}

.faq-title {
  text-align: center;
  font-size: 24px;
  margin-bottom: 20px;
}

.faq-item {
  border-bottom: 1px solid #ccc;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 15px;
  font-size: 18px;
  cursor: pointer;
  background: none;
  border: none;
  color: inherit;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
  padding: 0 15px;
}

.faq-answer.open {
  max-height: 500px;
  padding: 15px;
}

/* ================== Our Partner Section ================== */
.partners-section {
  padding: 50px 20px;
  background: #2B304C;
  color: #fff;
}

.partners-container {
  max-width: 1300px;
  margin: 0 auto;
  text-align: center;
  padding: 0 7px;
}

.partners-title {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 50px;
}

.partners-subtitle {
  font-size: 14px;
  color: #8f92a1;
  margin-bottom: 30px;
}

/* Grid Layout */
.partners-grid {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

.partners-item {
  position: relative;
  flex: 0 0 300px; /* Desktop width */
  border-radius: 7px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.5s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
  z-index: 0;
}

/* Hover expand effect for desktop */
.partners-item:hover {
  flex: 0 0 360px;
  box-shadow: 0 15px 50px rgba(0,0,0,0.5);
  z-index: 1;
}

/* Image */
.partners-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.partners-item:hover img {
  transform: scale(1.05);
}

/* Overlay */
.partners-overlay {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0,0,0,0.65);
  padding: 20px;
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.partners-item:hover .partners-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* Overlay text animation */
.partners-label,
.partners-name,
.partners-desc {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.45s ease;
}

.partners-item:hover .partners-label,
.partners-item:hover .partners-name,
.partners-item:hover .partners-desc {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered animation */
.partners-label { transition-delay: 0.1s; font-weight: 600; color: #E685FF; font-size: 16px; }
.partners-name { transition-delay: 0.2s; font-size: 18px; font-weight: 700; color: #fff; margin-top: 5px; }
.partners-desc { transition-delay: 0.3s; font-size: 14px; color: #ccc; margin-top: 3px; }

/* ================== Mobile Styles (Full-width & 3 items per row) ================== */
@media(max-width: 768px){
  .partners-section {
    padding: 20px 0; 
  }

  .partners-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
  }

  .partners-grid {
    gap: 3px; 
    flex-wrap: nowrap; /* keep 3 items in a row */
    justify-content: center;
  }

  .partners-item { 
    flex: 0 0 calc((100% - 6px)/3); /* 3 items per row */
    margin: 0;
    transition: all 0.3s ease;
  }

  .partners-item img { 
    height: auto; 
    max-height: 120px;
    transition: transform 0.3s ease;
  }

  .partners-overlay { 
    padding: 10px; 
    transition: all 0.3s ease;
  }

  /* Mobile hover/tap expand effect */
  .partners-item:hover,
  .partners-item:active,
  .partners-item:focus-within {
    flex: 0 0 calc((100% - 6px)/1.5); /* expand hovered/tapped item */
    z-index: 1;
    box-shadow: 0 12px 25px rgba(0,0,0,0.3);
  }

  /* Shrink siblings */
  .partners-item:hover ~ .partners-item,
  .partners-item:active ~ .partners-item,
  .partners-item:focus-within ~ .partners-item,
  .partners-item:first-child:hover ~ .partners-item,
  .partners-item:first-child:active ~ .partners-item,
  .partners-item:first-child:focus-within ~ .partners-item {
    flex: 0 0 calc((100% - 6px)/4); /* shrink siblings */
  }

  .partners-item:hover img,
  .partners-item:active img,
  .partners-item:focus-within img {
    transform: scale(1.03);
  }

  .partners-title { font-size: 18px; }
  .partners-subtitle { font-size: 14px; }
  .partners-label { font-size: 10px; }   
  .partners-name  { font-size: 12px; }   
  .partners-desc  { font-size: 10px; }   
}

@media(max-width: 480px){
  .partners-item { 
    flex: 0 0 calc((100% - 6px)/3); /* still 3 per row */
  }
  .partners-item img { max-height: 100px; }
  .partners-title { font-size: 16px; }
  .partners-label { font-size: 9px; }
  .partners-name  { font-size: 10px; }
  .partners-desc  { font-size: 9px; }
}

/* ================== Why Choose Us Section ================== */
.why-choose-us {
  padding: 48px 0;
}

.why-choose-us .container {
  max-width: 1300px;
  margin: 0 auto;
  padding: 0 14px;
}

.why-choose-us .section-title {
  font-weight: 600;
  font-size: 18px;
  color: #ffffff;
  margin-bottom: 12px;
  text-align: center; /* optional default alignment */
}

.why-choose-us .section-description {
  margin-bottom: 24px;
  color: #8f92a1;
  text-align: center; /* optional default alignment */
}

/* Grid scoped to Why Choose Us */
.why-choose-us .grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

/* Tablet / Desktop */
@media (min-width: 768px) {
  .why-choose-us .grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Card */
.why-choose-us .feature-card {
  background-color: #2B304C;
  padding: 18px;
  border-radius: 10px;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: transform .18s ease, box-shadow .18s ease;
  box-shadow: 0 6px 18px rgba(11,14,30,0.25);
}

/* subtle hover lift */
.why-choose-us .feature-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 40px rgba(11,14,30,0.35);
}

.why-choose-us .feature-card .icon img {
  display: block;
  object-fit: cover;
  width: 48px;
  height: 48px;
  border-radius: 8px; /* JS/PHP inline radius will override if provided */
}

/* Content */
.why-choose-us .feature-card .content {
  display: flex;
  flex-direction: column;
}

.why-choose-us .feature-card .title {
  font-weight: 600;
  font-size: 17px;
  color: #ffffff;
  margin: 0;
}

.why-choose-us .feature-card .description {
  font-size: 14px;
  color: #8f92a1;
  margin-top: 8px;
  line-height: 1.5;
}