/* GOVR — UAE Activities: emirate pages and package cards.
 * Loaded after uaep-assets/css/home-redesign.css, which supplies the design
 * tokens, reset, nav, footer and .section-header. */

/* ====== EMIRATE HERO ====== */
.emirate-hero {
  padding: 64px 32px 40px;
  background: var(--bg-section);
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.emirate-hero-inner {
  max-width: 760px;
  margin: 0 auto;
}
.emirate-hero h1 {
  font-size: 34px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
  margin: 0 0 12px;
}
.emirate-hero p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-secondary);
  margin: 0;
}

/* ====== PACKAGE SECTIONS ====== */
.pkg-section {
  padding: 64px 32px;
  background: var(--bg);
}
/* Alternate the background between consecutive package sections. A sibling
   selector rather than :nth-of-type(), because .emirate-hero is also a
   <section> and would offset the count. */
.pkg-section + .pkg-section {
  background: var(--bg-off);
}
.pkg-section-inner {
  max-width: 1200px;
  margin: 0 auto;
}
.pkg-section .section-header {
  margin-bottom: 36px;
}

/* ====== PACKAGE GRID ====== */
.pkg-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

/* ====== PACKAGE CARD ====== */
.pkg-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.pkg-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-border);
  box-shadow: var(--shadow-md);
}
.pkg-card-media {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--gold-bg);
  overflow: hidden;
}
.pkg-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pkg-card-img-empty {
  background: linear-gradient(135deg, var(--gold-bg) 0%, var(--gold-bg-hover) 100%);
}
.pkg-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--gold-deep);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  line-height: 1;
}
.pkg-card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 18px 18px 20px;
}
.pkg-card-title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 8px;
}
.pkg-card-title a {
  color: var(--text);
  text-decoration: none;
}
.pkg-card-title a:hover {
  color: var(--gold-dark);
}
.pkg-card-text {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 18px;
  flex: 1;
  /* Clamp so a package with no tagline (falling back to trimmed excerpt
     copy) cannot stretch its card taller than its grid row siblings. */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pkg-card-cta {
  display: block;
  padding: 12px 16px;
  border-radius: 8px;
  background: var(--gold-deep);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: background 0.2s;
}
.pkg-card-cta:hover {
  background: #7f6225;
}
.pkg-card-cta:focus-visible {
  outline: 2px solid var(--gold-dark);
  outline-offset: 2px;
}

/* ====== SINGLE PACKAGE ====== */
.pkg-single {
  padding: 48px 32px 72px;
  background: var(--bg);
}
.pkg-single-inner {
  max-width: 1190px;
  margin: 0 auto;
}
.pkg-single-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin-bottom: 28px;
  display: block;
}
.pkg-single h1 {
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 12px;
  color: var(--text);
}
.pkg-single-tagline {
  font-size: 16px;
  line-height: 1.6;
  color: var(--text-secondary);
  margin: 0 0 24px;
}
.pkg-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}
.pkg-meta li {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--gold-bg);
  border: 1px solid var(--gold-border);
  color: var(--gold-dark);
  font-size: 13px;
  font-weight: 600;
}
.pkg-content {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-secondary);
}
.pkg-content p {
  margin: 0 0 16px;
}
/* Editor content typography. single-packages.php runs arbitrary editor HTML
   through .pkg-content via the_content(), and the base stylesheet's universal
   reset (home-redesign.css: `*, *::before, *::after { margin: 0; padding: 0 }`)
   strips every default browser margin/padding, so headings, lists, quotes,
   tables and images need their own rules here or they render illegibly. */
.pkg-content h2,
.pkg-content h3,
.pkg-content h4 {
  color: var(--text);
  font-weight: 600;
  line-height: 1.3;
  margin: 32px 0 14px;
}
.pkg-content h2 {
  font-size: 24px;
}
.pkg-content h3 {
  font-size: 20px;
}
.pkg-content h4 {
  font-size: 16px;
}
.pkg-content h2:first-child,
.pkg-content h3:first-child,
.pkg-content h4:first-child {
  margin-top: 0;
}
.pkg-content ul,
.pkg-content ol {
  margin: 0 0 16px;
  padding-inline-start: 22px;
  list-style-position: outside;
}
.pkg-content ul {
  list-style-type: disc;
}
.pkg-content ol {
  list-style-type: decimal;
}
.pkg-content li {
  margin-bottom: 8px;
}
.pkg-content li:last-child {
  margin-bottom: 0;
}
.pkg-content strong {
  color: var(--text);
  font-weight: 600;
}
.pkg-content a {
  color: var(--gold-dark);
  text-decoration: underline;
}
.pkg-content a:hover {
  color: var(--gold);
}
.pkg-content blockquote {
  margin: 0 0 16px;
  padding-block: 4px;
  padding-inline-start: 20px;
  border-inline-start: 3px solid var(--gold);
  color: var(--text);
  font-style: italic;
}
.pkg-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
  margin: 0 0 16px;
}
.pkg-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 16px;
}
.pkg-content table th,
.pkg-content table td {
  padding: 10px 14px;
  border: 1px solid var(--border);
  text-align: left;
}
.pkg-content table th {
  color: var(--text);
  font-weight: 600;
  background: var(--bg-off);
}
/* single-packages.php has no table wrapper element to hang overflow on, so
   make the table itself the scroll container: a wide table scrolls inside
   its own box instead of forcing the whole column to overflow. */
.pkg-content table {
  display: block;
  overflow-x: auto;
}
.pkg-highlights {
  margin: 28px 0;
  padding: 0;
  list-style: none;
}
.pkg-highlights li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text);
}
.pkg-highlights li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 7px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
}
.pkg-single-cta {
  display: inline-block;
  margin-top: 8px;
  padding: 14px 28px;
  border-radius: 8px;
  background: var(--gold-deep);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}
.pkg-single-cta:hover {
  background: #7f6225;
}
.pkg-empty {
  text-align: center;
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 900px) {
  .pkg-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .emirate-hero h1 {
    font-size: 27px;
  }
  .pkg-section,
  .pkg-single {
    padding: 48px 20px;
  }
  .emirate-hero {
    padding: 48px 20px 32px;
  }
}

@media (max-width: 560px) {
  .pkg-grid {
    grid-template-columns: 1fr;
  }
  .pkg-single h1 {
    font-size: 24px;
  }
}

/* ====== RTL ====== */
html[dir="rtl"] .pkg-badge {
  left: auto;
  right: 12px;
}
html[dir="rtl"] .pkg-highlights li {
  padding-left: 0;
  padding-right: 28px;
}
html[dir="rtl"] .pkg-highlights li::before {
  left: auto;
  right: 0;
}

@media (prefers-reduced-motion: reduce) {
  .pkg-card,
  .pkg-card-cta,
  .pkg-single-cta {
    transition: none;
  }
  .pkg-card:hover {
    transform: none;
  }
}

/* ====== INCLUSIONS / EXCLUSIONS ====== */
/* Two panels rather than two bare columns: the lists sit at the end of a long
   editorial page, directly above the CTA, and need to read as a distinct
   at-a-glance summary rather than as more body copy. */
.pkg-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 40px 0 36px;
}
.pkg-list {
  padding: 24px 24px 26px;
  background: var(--bg-off);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
/* The included panel is the one visitors scan first — give it the gold tint
   the rest of the theme uses for affirmative surfaces. */
.pkg-list-incl {
  background: var(--gold-bg);
  border-color: var(--gold-border);
}
.pkg-list h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--text);
  margin: 0 0 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.pkg-list-incl h2 {
  border-bottom-color: var(--gold-border);
}
/* A small filled disc carries the tick/cross glyph, so each heading is
   identifiable at a glance and the two panels never read as one list. */
.pkg-list h2::before {
  content: "";
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 10px;
}
.pkg-list-incl h2::before {
  background-color: var(--green);
  /* White tick. Inlined as a data URI: the artifact CSP and the standalone
     template both rule out a separate icon request here. */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.pkg-list-excl h2::before {
  background-color: var(--text-muted);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
}
/* Scoped to .pkg-list so the editor-content rules (.pkg-content ul/li) can
   never leak default discs or margins into these lists. */
.pkg-list ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.pkg-list li {
  position: relative;
  padding-inline-start: 26px;
  margin: 0 0 11px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
  list-style: none;
}
.pkg-list li:last-child {
  margin-bottom: 0;
}
/* Tick for included, dash for not included — readable without relying on colour. */
.pkg-list-incl li::before {
  content: "";
  position: absolute;
  inset-inline-start: 3px;
  top: 5px;
  width: 11px;
  height: 6px;
  border-inline-start: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}
.pkg-list-excl li {
  color: var(--text-secondary);
}
.pkg-list-excl li::before {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: 10px;
  width: 12px;
  height: 2px;
  border-radius: 1px;
  background: var(--text-muted);
}
/* RTL: the tick is a rotated corner, so mirroring the border edges keeps it
   pointing the right way instead of flipping into a mirrored hook. */
html[dir="rtl"] .pkg-list-incl li::before {
  border-inline-start: 0;
  border-inline-end: 2px solid var(--green);
  transform: rotate(45deg);
}

@media (max-width: 640px) {
  .pkg-lists {
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 32px 0 28px;
  }
  .pkg-list {
    padding: 20px 20px 22px;
  }
}