/* ============================================================
   COMPONENTS.CSS — Reusable UI Components
   ============================================================ */

/* =========================
   CUSTOM DROPDOWN (shared)
   ========================= */
.custom-dropdown {
  position: relative;
}

.custom-dropdown-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  cursor: pointer;
  background: none;
  border: none;
  font-family: "Poppins", sans-serif;
}

.custom-dropdown-trigger:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 8px;
}

.custom-dropdown-trigger .chevron {
  font-size: 0.75rem;
  color: var(--grey);
  transition: transform 0.3s ease;
  flex-shrink: 0;
}

.custom-dropdown.open .custom-dropdown-trigger .chevron {
  transform: rotate(-180deg);
}

.custom-dropdown-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background-color: var(--white);
  border-radius: 10px;
  box-shadow: 0 4px 16px var(--shadow);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s ease;
  z-index: 100;
}

.custom-dropdown-option {
  padding: 0.6rem 1rem;
  font-family: "Poppins", sans-serif;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--black);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.custom-dropdown-option:hover,
.custom-dropdown-option:focus {
  background-color: var(--primary-light);
}

.custom-dropdown-option:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.custom-dropdown-option.selected {
  color: var(--primary);
  font-weight: 500;
}

/* --- Lang-select variant (navbar) --- */
.custom-dropdown.lang-select .custom-dropdown-trigger {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--black);
  background-color: var(--white);
  border: 1.5px solid var(--medium-grey);
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.custom-dropdown.lang-select:hover .custom-dropdown-trigger {
  border-color: var(--primary-medium);
}

.custom-dropdown.lang-select.open .custom-dropdown-trigger {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(132, 121, 217, 0.15);
}

.custom-dropdown.lang-select .custom-dropdown-menu {
  min-width: 140px;
  right: 0;
  left: auto;
}

/* --- Form dropdown variant (contact subject) --- */
.custom-dropdown.form-dropdown .custom-dropdown-trigger {
  width: 100%;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--black);
  background-color: var(--white);
  border: 1.5px solid var(--medium-grey);
  border-radius: 10px;
  padding: 0.75rem 1.2rem;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.custom-dropdown.form-dropdown:hover .custom-dropdown-trigger {
  border-color: var(--primary-medium);
}

.custom-dropdown.form-dropdown.open .custom-dropdown-trigger {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(132, 121, 217, 0.15);
}

.custom-dropdown.form-dropdown .custom-dropdown-label.placeholder {
  color: var(--medium-grey);
}

.custom-dropdown.form-dropdown .custom-dropdown-menu {
  border-radius: 10px;
}

.custom-dropdown.form-dropdown .custom-dropdown-option {
  font-size: 0.9rem;
  padding: 0.75rem 1.2rem;
}

/* =========================
   SOCIAL ICONS
   ========================= */
.social-icons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 1.1rem;
  text-decoration: none;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.social-icons a:hover {
  background-color: var(--primary);
  color: var(--white);
  transform: translateY(-2px);
}

.social-icons a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* =========================
   LANDING — Logo
   ========================= */
.logo {
  width: 80px;
  height: 80px;
  justify-content: center;
}

/* =========================
   LANDING — Page Wrapper
   ========================= */
.page-wrapper {
  display: flex;
  gap: 1.2rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  width: 100%;
  max-width: 640px;
  animation: fadeInUp 0.8s ease-out both;
}

/* =========================
   LANDING — Title & Tagline
   ========================= */
.landing-title {
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 2.5rem;
  letter-spacing: -0.02em;
  color: var(--black);
}

.tagline {
  font-size: 1.1rem;
  font-weight: 300;
  color: var(--grey);
  text-align: center;
}

/* =========================
   LANDING — Store Buttons
   ========================= */
.store-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.5rem;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  background-color: var(--black);
  color: var(--white);
  text-decoration: none;
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  font-weight: 500;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 4px 12px var(--shadow);
}

.store-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

.store-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.store-btn i {
  font-size: 1.3rem;
}

.store-btn .store-label {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.store-btn .store-label small {
  font-size: 0.6rem;
  font-weight: 300;
  opacity: 0.8;
}

.store-btn .store-label span {
  font-size: 0.95rem;
  font-weight: 600;
  font-family: "Montserrat", sans-serif;
}

/* =========================
   LANDING — Legal Links
   ========================= */
.legal-links {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
  flex-wrap: nowrap;
  justify-content: center;
}

.legal-links a {
  font-size: 0.8rem;
  color: var(--grey);
  text-align: center;
  text-decoration: none;
  transition: color 0.2s ease;
}

.legal-links a:hover {
  color: var(--primary);
}

.legal-links a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* =========================
   HELP — FAQ Sections
   ========================= */
.faq-section {
  margin-bottom: 2rem;
}

.faq-section h2 {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-light);
}

/* =========================
   HELP — Accordion
   ========================= */
.accordion {
  border-radius: 12px;
  background-color: var(--white);
  box-shadow: 0 2px 8px var(--shadow);
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  background: none;
  border: none;
  padding: 1rem 1.25rem;
  font-family: "Poppins", sans-serif;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--black);
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease;
}

.accordion-header:hover {
  background-color: var(--primary-light);
}

.accordion-header:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: -2px;
}

.accordion-header .chevron {
  font-size: 0.75rem;
  color: var(--grey);
  transition: transform 0.3s ease;
}

.accordion.open .accordion-header .chevron {
  transform: rotate(-180deg);
}

.accordion-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.accordion-body p {
  padding: 0 1.25rem 1rem;
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--grey);
  line-height: 1.7;
}

.accordion-body ul {
  padding: 0 1.25rem 1rem 2.5rem;
  list-style: disc;
}

.accordion-body ul li {
  font-size: 0.9rem;
  font-weight: 300;
  color: var(--grey);
  line-height: 1.7;
  margin-bottom: 0.2rem;
}

.accordion-body ul + p {
  padding-top: 0;
}

/* =========================
   CONTACT — Form
   ========================= */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--black);
}

.form-group input,
.form-group textarea {
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  padding: 0.75rem 1.2rem;
  border: 1.5px solid var(--medium-grey);
  border-radius: 10px;
  background-color: var(--white);
  color: var(--black);
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(132, 121, 217, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--medium-grey);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

/* =========================
   CONTACT — Submit Button
   ========================= */
.submit-btn {
  padding: 0.85rem 2rem;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-medium));
  color: var(--white);
  font-family: "Montserrat", sans-serif;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(132, 121, 217, 0.3);
  align-self: stretch;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(132, 121, 217, 0.4);
}

.submit-btn:active {
  transform: translateY(0);
}

.submit-btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* =========================
   CONTACT — Form status
   ========================= */
.form-status {
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  text-align: center;
}

.form-status.success {
  background-color: #c9f8cd;
  color: #48864f;
  border: 1px solid #48864f;
}

.form-status.error {
  background-color: #f5e6e5;
  color: #b35d50;
  border: 1px solid #b35d50;
}

.submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* =========================
   PDF — Viewer & Fallback
   ========================= */
.pdf-container {
  flex: 1;
  min-height: 70vh;
  background-color: var(--light-grey);
  animation: fadeInUp 0.8s ease-out 0.15s both;
}

.pdf-container embed,
.pdf-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.pdf-fallback {
  display: none;
  flex: 1;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2rem;
}

.pdf-fallback p {
  font-size: 0.95rem;
  color: var(--grey);
  margin-bottom: 1rem;
}

.pdf-fallback a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--primary), var(--primary-medium));
  color: var(--white);
  text-decoration: none;
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(132, 121, 217, 0.3);
}

.pdf-fallback a:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(132, 121, 217, 0.4);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 480px) {
  /* Landing */
  .landing-title {
    font-size: 2rem;
  }

  .tagline {
    font-size: 0.95rem;
  }

  .store-btn {
    padding: 0.65rem 1.2rem;
  }

  .legal-links {
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
  }

  .social-icons {
    gap: 0.6rem;
  }

  .social-icons a {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 0.95rem;
  }

  /* Help */
  .accordion-header {
    font-size: 0.9rem;
    padding: 0.85rem 1rem;
  }

  /* Contact */
  .submit-btn {
    width: 100%;
    text-align: center;
  }
}

@media (max-height: 700px) {
  .landing-title {
    font-size: 1.8rem;
    margin-bottom: 0.25rem;
  }

  .tagline {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }

  .store-buttons {
    margin-top: 0rem;
  }

  .social-icons {
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .social-icons a {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 0.9rem;
    text-decoration: none;
  }
}

/* Mobile/tablet: hide iframe, show fallback (iOS Safari only renders page 1) */
@media (max-width: 768px), (pointer: coarse) {
  .pdf-container {
    display: none;
  }

  .pdf-fallback {
    display: flex;
  }
}
