/* ══════════════════════════════════════════════════════════════
   COMPONENTS — Reusable UI Components
   ══════════════════════════════════════════════════════════════ */

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 28px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  text-decoration: none;
  border: 2px solid transparent;
  line-height: 1.4;
  white-space: nowrap;
  min-height: 44px;
}

.btn--primary {
  background: var(--teal);
  color: var(--white);
  border-color: var(--teal);
}

.btn--primary:hover {
  background: var(--teal-dark);
  border-color: var(--teal-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(17, 168, 160, 0.3);
}

.btn--outline {
  background: transparent;
  color: var(--teal);
  border-color: var(--teal);
}

.btn--outline:hover {
  background: var(--teal);
  color: var(--white);
  transform: translateY(-1px);
}

.btn--white {
  background: var(--white);
  color: var(--navy);
  border-color: var(--white);
}

.btn--white:hover {
  background: var(--ivory);
  border-color: var(--ivory);
  color: var(--navy);
  transform: translateY(-1px);
}

.btn--outline-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.4);
}

.btn--outline-white:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--white);
  color: var(--white);
}

.btn--gold {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}

.btn--gold:hover {
  background: #c4922e;
  border-color: #c4922e;
  color: var(--white);
  transform: translateY(-1px);
}

.btn--whatsapp {
  background: var(--whatsapp);
  color: var(--white);
  border-color: var(--whatsapp);
}

.btn--whatsapp:hover {
  background: var(--whatsapp-dark);
  border-color: var(--whatsapp-dark);
  color: var(--white);
  transform: translateY(-1px);
}

.btn--sm {
  padding: 8px 18px;
  font-size: var(--fs-xs);
  min-height: 36px;
}

.btn--lg {
  padding: 16px 36px;
  font-size: var(--fs-base);
}

.btn--full {
  width: 100%;
}

.btn--loading {
  pointer-events: none;
  opacity: 0.7;
}

.btn--loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: var(--radius-full);
  animation: spin 0.6s linear infinite;
}

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

/* ── Service Cards ──────────────────────────────────────────── */
.service-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  transition: all var(--duration-normal) var(--ease-out);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--teal);
}

.service-card__icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--teal-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-lg);
}

.service-card__icon i {
  font-size: var(--fs-xl);
  color: var(--teal);
}

.service-card h4 {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-sm);
}

.service-card p {
  font-size: var(--fs-sm);
  flex-grow: 1;
}

.service-card__actions {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

/* ── Tour Cards ─────────────────────────────────────────────── */
.tour-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  transition: all var(--duration-normal) var(--ease-out);
  display: flex;
  flex-direction: column;
}

.tour-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.tour-card__img-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/10;
}

.tour-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.tour-card:hover .tour-card__img {
  transform: scale(1.05);
}

.tour-card__badge {
  position: absolute;
  top: var(--space-md);
  left: var(--space-md);
  background: var(--gold);
  color: var(--white);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  padding: 4px 12px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tour-card__body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.tour-card__meta {
  display: flex;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}

.tour-card__meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: var(--fs-xs);
  color: var(--muted-text);
}

.tour-card__meta-item i {
  color: var(--teal);
}

.tour-card__title {
  font-family: var(--font-body);
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-sm);
  color: var(--navy);
  line-height: 1.35;
}

.tour-card__desc {
  font-size: var(--fs-sm);
  color: var(--muted-text);
  line-height: 1.6;
  flex-grow: 1;
  margin-bottom: var(--space-md);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tour-card__footer {
  display: flex;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

/* ── Fleet Cards ────────────────────────────────────────────── */
.fleet-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
  transition: all var(--duration-normal) var(--ease-out);
}

.fleet-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.fleet-card__img-wrap {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--soft-grey);
}

.km-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: #0f172a;
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.4);
  backdrop-filter: blur(4px);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  z-index: 2;
}

.price-km-tag {
  display: inline-block;
  background: #fef3c7;
  color: #92400e;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 4px 10px;
  border-radius: 6px;
  margin-bottom: 4px;
}

.fleet-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fleet-card__body {
  padding: var(--space-lg);
}

.fleet-card__category {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--teal);
  margin-bottom: var(--space-xs);
}

.fleet-card__name {
  font-family: var(--font-body);
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--navy);
  margin-bottom: var(--space-md);
}

.fleet-card__specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding: var(--space-md);
  background: var(--soft-grey);
  border-radius: var(--radius-md);
}

.fleet-spec {
  text-align: center;
}

.fleet-spec i {
  color: var(--teal);
  font-size: var(--fs-md);
  margin-bottom: 2px;
  display: block;
}

.fleet-spec span {
  font-size: var(--fs-xs);
  color: var(--muted-text);
}

.fleet-card__ideal {
  font-size: var(--fs-sm);
  color: var(--muted-text);
  margin-bottom: var(--space-md);
}

.fleet-card__ideal strong {
  color: var(--charcoal);
}

.fleet-card__price {
  font-size: var(--fs-sm);
  color: var(--gold);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-md);
}

.fleet-card__actions {
  display: flex;
  gap: var(--space-sm);
}

/* ── Form Group ─────────────────────────────────────────────── */
.form-group {
  display: flex;
  flex-direction: column;
}

.form-label {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--navy);
  margin-bottom: var(--space-xs);
}

.form-label .required {
  color: var(--error);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  color: var(--charcoal);
  background: var(--white);
  transition: border-color var(--duration-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(17, 168, 160, 0.1);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--error);
  background: var(--error-light);
}

.form-error {
  font-size: var(--fs-xs);
  color: var(--error);
  margin-top: var(--space-xs);
  display: none;
}

.form-input.error ~ .form-error,
.form-select.error ~ .form-error,
.form-textarea.error ~ .form-error {
  display: block;
}

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

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23667479' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* Checkbox */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
}

.form-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--teal);
  flex-shrink: 0;
}

.form-check label {
  font-size: var(--fs-sm);
  color: var(--muted-text);
  line-height: 1.5;
}

/* Honeypot */
.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge--teal {
  background: var(--teal-light);
  color: var(--teal-dark);
}

.badge--gold {
  background: var(--gold-light);
  color: #8B6914;
}

.badge--success {
  background: rgba(20, 128, 74, 0.1);
  color: var(--success);
}

/* ── Gallery ────────────────────────────────────────────────── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--space-md);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  cursor: pointer;
  aspect-ratio: 4/3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--ease-out);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 29, 40, 0);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration-normal);
}

.gallery-item:hover .gallery-item__overlay {
  background: rgba(4, 29, 40, 0.4);
}

.gallery-item__overlay i {
  color: var(--white);
  font-size: var(--fs-2xl);
  opacity: 0;
  transform: scale(0.8);
  transition: all var(--duration-normal);
}

.gallery-item:hover .gallery-item__overlay i {
  opacity: 1;
  transform: scale(1);
}

/* ── Lightbox ───────────────────────────────────────────────── */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--duration-normal);
}

.lightbox.active {
  opacity: 1;
  visibility: visible;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  color: var(--white);
  font-size: var(--fs-xl);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: background var(--duration-fast);
}

.lightbox__close { top: 20px; right: 20px; }
.lightbox__prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 20px; top: 50%; transform: translateY(-50%); }

.lightbox__close:hover,
.lightbox__prev:hover,
.lightbox__next:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ── Tour Filters ───────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin-bottom: var(--space-2xl);
  justify-content: center;
}

.filter-btn {
  padding: 8px 20px;
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--muted-text);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--white);
  background: var(--teal);
  border-color: var(--teal);
}

/* ── Tour Detail Sections ───────────────────────────────────── */
.detail-hero {
  position: relative;
  height: 50vh;
  min-height: 350px;
  overflow: hidden;
}

.detail-hero__bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.detail-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(4,29,40,0.3), rgba(4,29,40,0.7));
}

.detail-hero__content {
  position: relative;
  z-index: 2;
  color: var(--white);
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: var(--space-2xl);
}

.detail-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-2xl);
  margin-top: calc(-1 * var(--space-2xl));
  position: relative;
  z-index: 3;
}

.detail-main {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-2xl);
  box-shadow: var(--shadow-lg);
}

.detail-sidebar {
  position: sticky;
  top: calc(var(--nav-height) + var(--space-lg));
  align-self: start;
}

.sidebar-card {
  background: var(--white);
  border-radius: var(--radius-xl);
  padding: var(--space-xl);
  box-shadow: var(--shadow-lg);
  margin-bottom: var(--space-lg);
}

.sidebar-card h4 {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  margin-bottom: var(--space-md);
}

/* Itinerary */
.itinerary-list {
  position: relative;
  padding-left: var(--space-xl);
}

.itinerary-list::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.itinerary-item {
  position: relative;
  margin-bottom: var(--space-xl);
}

.itinerary-item::before {
  content: '';
  position: absolute;
  left: calc(-1 * var(--space-xl) + 4px);
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--teal);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--teal);
}

.itinerary-item h5 {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--space-xs);
}

.itinerary-item p {
  font-size: var(--fs-sm);
  margin-bottom: 0;
}

/* Inclusion Lists */
.inclusion-list {
  list-style: none;
}

.inclusion-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  padding: var(--space-sm) 0;
  font-size: var(--fs-sm);
  border-bottom: 1px solid var(--border);
}

.inclusion-list li:last-child {
  border-bottom: none;
}

.inclusion-list li i {
  margin-top: 3px;
  flex-shrink: 0;
}

.inclusion-list--included li i { color: var(--success); }
.inclusion-list--optional li i { color: var(--gold); }
.inclusion-list--excluded li i { color: var(--error); }

/* ── Alert / Form Messages ──────────────────────────────────── */
.form-message {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  display: none;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.form-message.show {
  display: flex;
}

.form-message--success {
  background: rgba(20, 128, 74, 0.08);
  color: var(--success);
  border: 1px solid rgba(20, 128, 74, 0.2);
}

.form-message--error {
  background: var(--error-light);
  color: var(--error);
  border: 1px solid rgba(200, 59, 59, 0.2);
}
