/*
 * ============================================================
 *  CUSTOMER EXPERIENCE v1.0
 *  Customer-facing shared components: skeletons, placeholders,
 *  loading states, empty states, error states, newsletter,
 *  partners section, image handling.
 *
 *  DEPENDENCIES: design-tokens.css, design-system.css
 *  ============================================================
 */

/* ════════════════════════════════════════════════════════════
   SKELETON LOADERS — content placeholders
   ════════════════════════════════════════════════════════════ */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--color-border-light, rgba(15,46,53,0.04)) 25%,
    rgba(200,164,92,0.08) 50%,
    var(--color-border-light, rgba(15,46,53,0.04)) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--radius-md, 8px);
  color: transparent !important;
  user-select: none;
  pointer-events: none;
}

@keyframes skeleton-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.skeleton--text {
  height: 1em;
  width: 100%;
  margin-bottom: 0.5em;
}

.skeleton--text-sm {
  height: 0.75em;
  width: 60%;
}

.skeleton--heading {
  height: 1.5em;
  width: 70%;
  margin-bottom: 0.75em;
}

.skeleton--avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton--image {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg, 12px);
}

.skeleton--image-card {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-lg, 12px) var(--radius-lg, 12px) 0 0;
}

.skeleton--button {
  width: 120px;
  height: 48px;
  border-radius: var(--radius-md, 8px);
}

.skeleton--badge {
  width: 80px;
  height: 24px;
  border-radius: 999px;
}

.skeleton--card {
  padding: 0;
  overflow: hidden;
}

.skeleton--card .skeleton--image-card {
  border-radius: var(--radius-lg, 12px) var(--radius-lg, 12px) 0 0;
}

.skeleton--card-body {
  padding: var(--space-5, 20px);
  display: flex;
  flex-direction: column;
  gap: var(--space-2, 8px);
}

/* Skeleton tour cards grid */
.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-6, 24px);
}

@media (max-width: 960px) {
  .skeleton-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .skeleton-grid {
    grid-template-columns: 1fr;
  }
}

/* ════════════════════════════════════════════════════════════
   IMAGE PLACEHOLDER & ERROR HANDLING
   ════════════════════════════════════════════════════════════ */
.img-placeholder {
  position: relative;
  background: var(--color-border-light, rgba(15,46,53,0.04));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted, #8B8B9E);
}

.img-placeholder::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(200,164,92,0.06) 50%,
    transparent 100%
  );
}

.img-placeholder__icon {
  width: 48px;
  height: 48px;
  opacity: 0.3;
  z-index: 1;
}

.img-placeholder__icon svg {
  width: 100%;
  height: 100%;
}

.img--error {
  position: relative;
  background: var(--color-bg, #F8F6F1);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}

.img--error::after {
  content: '⚠️ Image unavailable';
  font-size: var(--text-xs, 12px);
  color: var(--color-text-muted, #8B8B9E);
}

/* Lazy loading fade-in */
img[loading="lazy"] {
  opacity: 0;
  transition: opacity var(--duration-normal, 250ms) var(--ease-smooth, cubic-bezier(0.4,0,0.2,1));
}

img[loading="lazy"].img--loaded,
img[loading="lazy"][src]:not([src=""]) {
  opacity: 1;
}

/* ════════════════════════════════════════════════════════════
   EMPTY STATE
   ════════════════════════════════════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-12, 48px) var(--space-6, 24px);
  gap: var(--space-4, 16px);
}

.empty-state__icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-border-light, rgba(15,46,53,0.04));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl, 32px);
  color: var(--color-text-muted, #8B8B9E);
}

.empty-state__title {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: var(--text-lg, 20px);
  font-weight: 600;
  color: var(--color-text, #1E1E2A);
}

.empty-state__desc {
  font-size: var(--text-sm, 13px);
  color: var(--color-text-muted, #8B8B9E);
  max-width: 320px;
  line-height: var(--lh-relaxed, 1.65);
}

/* ════════════════════════════════════════════════════════════
   ERROR STATE
   ════════════════════════════════════════════════════════════ */
.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-10, 40px) var(--space-6, 24px);
  gap: var(--space-4, 16px);
  background: var(--color-danger-bg, #FDEBED);
  border: 1px solid rgba(196,58,74,0.15);
  border-radius: var(--radius-xl, 16px);
}

.error-state__icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-danger-bg, #FDEBED);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl, 24px);
}

.error-state__title {
  font-size: var(--text-base, 16px);
  font-weight: 600;
  color: var(--color-danger, #C43A4A);
}

.error-state__desc {
  font-size: var(--text-sm, 13px);
  color: var(--color-text-secondary, #5B5B6B);
  max-width: 360px;
}

.error-state__retry {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2, 8px);
  padding: var(--space-2, 8px) var(--space-4, 16px);
  border-radius: var(--radius-md, 8px);
  font-size: var(--text-sm, 13px);
  font-weight: 600;
  color: var(--color-white, #FFFFFF);
  background: var(--color-danger, #C43A4A);
  border: none;
  cursor: pointer;
  transition: background var(--transition-fast, 150ms);
}

.error-state__retry:hover {
  background: var(--color-danger-dark, #DC2626);
}

/* ════════════════════════════════════════════════════════════
   LOADING STATE
   ════════════════════════════════════════════════════════════ */
.loading-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: var(--space-6, 24px) 0;
}

.loading-dots__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent, #C8A45C);
  animation: loading-dot-bounce 1.4s ease-in-out infinite;
}

.loading-dots__dot:nth-child(1) { animation-delay: 0s; }
.loading-dots__dot:nth-child(2) { animation-delay: 0.2s; }
.loading-dots__dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes loading-dot-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--color-border-light, rgba(15,46,53,0.04));
  border-top-color: var(--color-accent, #C8A45C);
  border-radius: 50%;
  animation: loading-spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes loading-spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  font-size: var(--text-sm, 13px);
  color: var(--color-text-muted, #8B8B9E);
  text-align: center;
  padding: var(--space-6, 24px) 0;
}

/* ════════════════════════════════════════════════════════════
   NEWSLETTER SECTION
   ════════════════════════════════════════════════════════════ */
.newsletter {
  position: relative;
  padding: var(--space-14, 56px) 0;
  background: var(--color-primary, #0A2342);
  overflow: hidden;
}

.newsletter::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 30% 50%, rgba(200,164,92,0.06) 0%, transparent 70%),
    radial-gradient(ellipse 40% 60% at 70% 50%, rgba(200,164,92,0.04) 0%, transparent 60%);
}

.newsletter::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(200,164,92,0.3), transparent);
}

.newsletter__inner {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: 0 var(--content-padding, clamp(1rem, 4vw, 2.5rem));
}

.newsletter__title {
  font-family: var(--font-display, 'Playfair Display', serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 600;
  color: var(--color-white, #FFFFFF);
  margin-bottom: var(--space-3, 12px);
  line-height: 1.15;
}

.newsletter__subtitle {
  font-size: var(--text-sm, 13px);
  color: rgba(255,255,255,0.5);
  line-height: var(--lh-relaxed, 1.65);
  margin-bottom: var(--space-6, 24px);
}

.newsletter__form {
  display: flex;
  gap: var(--space-3, 12px);
  max-width: 460px;
  margin: 0 auto;
}

.newsletter__input {
  flex: 1;
  height: 52px;
  padding: 0 var(--space-4, 16px);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md, 8px);
  background: rgba(255,255,255,0.06);
  color: var(--color-white, #FFFFFF);
  font-size: var(--text-sm, 13px);
  font-family: var(--font-body, 'DM Sans', sans-serif);
  transition: all var(--transition-fast, 150ms);
  outline: none;
}

.newsletter__input::placeholder {
  color: rgba(255,255,255,0.3);
}

.newsletter__input:focus {
  border-color: var(--color-accent, #C8A45C);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 0 0 3px rgba(200,164,92,0.15);
}

.newsletter__btn {
  height: 52px;
  padding: 0 var(--space-6, 24px);
  border: none;
  border-radius: var(--radius-md, 8px);
  background: var(--color-accent, #C8A45C);
  color: var(--color-primary-dark, #091E23);
  font-size: var(--text-sm, 13px);
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition-fast, 150ms);
  flex-shrink: 0;
}

.newsletter__btn:hover {
  background: var(--color-accent-light, #DCC28A);
  transform: translateY(-1px);
}

.newsletter__btn:active {
  transform: translateY(0);
}

.newsletter__disclaimer {
  font-size: var(--text-xs, 11px);
  color: rgba(255,255,255,0.25);
  margin-top: var(--space-4, 16px);
  line-height: var(--lh-relaxed, 1.65);
}

.newsletter__disclaimer a {
  color: rgba(255,255,255,0.4);
  text-decoration: underline;
  transition: color var(--transition-fast, 150ms);
}

.newsletter__disclaimer a:hover {
  color: var(--color-accent-light, #DCC28A);
}

/* Newsletter success state */
.newsletter__success {
  display: none;
}

.newsletter__success--visible {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3, 12px);
}

.newsletter__success-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(15,123,90,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-2xl, 32px);
  margin-bottom: var(--space-2, 8px);
}

.newsletter__success-text {
  font-size: var(--text-base, 16px);
  color: var(--color-white, #FFFFFF);
  font-weight: 500;
}

.newsletter__success-sub {
  font-size: var(--text-sm, 13px);
  color: rgba(255,255,255,0.5);
}

@media (max-width: 480px) {
  .newsletter__form {
    flex-direction: column;
    gap: var(--space-3, 12px);
  }

  .newsletter__btn {
    width: 100%;
  }
}

/* ════════════════════════════════════════════════════════════
   PARTNERS / TRUST BADGES SECTION
   ════════════════════════════════════════════════════════════ */
.partners {
  padding: var(--space-10, 40px) 0;
  background: var(--color-white, #FFFFFF);
  border-top: 1px solid var(--color-border-light, rgba(15,46,53,0.04));
  border-bottom: 1px solid var(--color-border-light, rgba(15,46,53,0.04));
}

.partners__inner {
  max-width: var(--container-max, 1280px);
  margin: 0 auto;
  padding: 0 var(--content-padding, clamp(1rem, 4vw, 2.5rem));
}

.partners__label {
  text-align: center;
  font-size: var(--text-xs, 11px);
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted, #8B8B9E);
  margin-bottom: var(--space-6, 24px);
}

.partners__grid {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-8, 32px) var(--space-10, 40px);
}

.partners__item {
  display: flex;
  align-items: center;
  gap: var(--space-3, 12px);
  opacity: 0.6;
  transition: opacity var(--transition-fast, 150ms);
  filter: grayscale(100%);
}

.partners__item:hover {
  opacity: 1;
  filter: grayscale(0%);
}

.partners__item-logo {
  width: auto;
  height: 32px;
  max-width: 100px;
  object-fit: contain;
}

.partners__item-name {
  font-size: var(--text-sm, 13px);
  font-weight: 600;
  color: var(--color-text, #1E1E2A);
  white-space: nowrap;
}

@media (max-width: 640px) {
  .partners__grid {
    gap: var(--space-5, 20px) var(--space-6, 24px);
  }

  .partners__item-logo {
    height: 26px;
  }
}

/* ════════════════════════════════════════════════════════════
   TRUST BADGE — shared reusable component
   ════════════════════════════════════════════════════════════ */
.trust-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2, 8px);
  padding: var(--space-2, 8px) var(--space-4, 16px);
  border-radius: var(--radius-full, 999px);
  font-size: var(--text-xs, 11px);
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: all var(--transition-fast, 150ms);
}

.trust-badge--secure {
  background: rgba(15,123,90,0.1);
  color: var(--color-success, #0F7B5A);
  border: 1px solid rgba(15,123,90,0.15);
}

.trust-badge--guaranteed {
  background: rgba(200,164,92,0.1);
  color: var(--color-accent-dark, #A8873A);
  border: 1px solid rgba(200,164,92,0.15);
}

.trust-badge--verified {
  background: rgba(43,108,176,0.1);
  color: var(--color-info, #2B6CB0);
  border: 1px solid rgba(43,108,176,0.15);
}

.trust-badge--local {
  background: rgba(15,46,53,0.06);
  color: var(--color-primary, #0F2E35);
  border: 1px solid rgba(15,46,53,0.1);
}

/* ════════════════════════════════════════════════════════════
   FAQ PREVIEW — compact for homepage
   ════════════════════════════════════════════════════════════ */
.faq-preview {
  padding: var(--section-gap, clamp(4rem, 8vw, 8rem)) 0;
  background: var(--color-bg-warm, #F5F2EB);
}

.faq-preview__list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-preview__item {
  border-bottom: 1px solid var(--color-border, rgba(0,0,0,0.08));
  overflow: hidden;
}

.faq-preview__question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4, 16px) 0;
  font-size: var(--text-sm, 13px);
  font-weight: 600;
  color: var(--color-text, #1E1E2A);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  transition: color var(--transition-fast, 150ms);
  gap: var(--space-4, 16px);
}

.faq-preview__question:hover {
  color: var(--color-accent-dark, #A8873A);
}

.faq-preview__icon {
  font-size: var(--text-lg, 20px);
  color: var(--color-accent, #C8A45C);
  flex-shrink: 0;
  transition: transform var(--transition-normal, 250ms);
}

.faq-preview__item--open .faq-preview__icon {
  transform: rotate(45deg);
}

.faq-preview__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--duration-normal, 250ms) var(--ease-smooth, cubic-bezier(0.4,0,0.2,1));
}

.faq-preview__item--open .faq-preview__answer {
  max-height: 320px;
}

.faq-preview__answer-inner {
  padding: 0 0 var(--space-4, 16px);
  font-size: var(--text-sm, 13px);
  color: var(--color-text-secondary, #5B5B6B);
  line-height: var(--lh-relaxed, 1.65);
}

.faq-preview__cta {
  text-align: center;
  margin-top: var(--space-6, 24px);
}

/* ════════════════════════════════════════════════════════════
   IMAGE ASPECT RATIO STANDARDS
   ════════════════════════════════════════════════════════════ */
.img-ratio-hero {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.img-ratio-card {
  aspect-ratio: 3 / 2;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.img-ratio-square {
  aspect-ratio: 1;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.img-ratio-portrait {
  aspect-ratio: 3 / 4;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.img-ratio-ultrawide {
  aspect-ratio: 21 / 9;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.img-ratio-gallery {
  aspect-ratio: 4 / 3;
  width: 100%;
  height: auto;
  object-fit: cover;
}

/* ════════════════════════════════════════════════════════════
   ACCESSIBILITY — reduced motion overrides
   ════════════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .skeleton {
    animation: none;
    background: var(--color-border-light, rgba(15,46,53,0.04));
  }

  .loading-dots__dot {
    animation: none;
    opacity: 0.4;
  }

  .loading-spinner {
    animation: none;
    opacity: 0.4;
  }

  img[loading="lazy"] {
    opacity: 1;
    transition: none;
  }

  .faq-preview__icon {
    transition: none;
  }

  .faq-preview__answer {
    transition: none;
  }
}
