/* =========================================================
   CompareTravel.ie — Homepage styles
   ========================================================= */

:root {
  --color-navy: #0b2545;
  --color-navy-deep: #081a33;
  --color-blue: #1f7ae0;
  --color-blue-light: #4fa3f0;
  --color-green: #6fbf3f;
  --color-text: #0b2545;
  --color-text-muted: #4a5568;
  --color-white: #ffffff;
  --color-bg-soft: #f6f8fb;
  --color-border: #e2e8f0;

  --shadow-card: 0 10px 30px rgba(11, 37, 69, 0.08);
  --shadow-card-hover: 0 16px 40px rgba(11, 37, 69, 0.14);

  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;

  --font-base: "Segoe UI", system-ui, -apple-system, sans-serif;

  --header-height: 84px;
  --container-width: 1200px;
}

/* -------------------- Reset -------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  font-family: var(--font-base);
  color: var(--color-text);
  background: var(--color-white);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

h1, h2, h3, h4, p {
  margin: 0;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: 24px;
}

/* Prevent any accidental horizontal scroll */
html, body {
  overflow-x: hidden;
}

/* -------------------- Skip link -------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -60px;
  background: var(--color-navy);
  color: var(--color-white);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  z-index: 1000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

/* -------------------- Focus styles -------------------- */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible {
  outline: 3px solid var(--color-blue);
  outline-offset: 3px;
  border-radius: 4px;
}

/* -------------------- Header -------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-height);
}

.logo-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.logo-link .logo-image {
  height: 27px;
  width: auto;
}

.logo-image {
  height: 32px;
  width: auto;
}

.main-nav {
  display: none;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-list > li {
  position: relative;
}

.nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-navy);
  padding: 10px 2px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.nav-link:hover {
  color: var(--color-blue);
}

.nav-dropdown-toggle {
  background: none;
  border: none;
  margin: 0;
  font-family: inherit;
  cursor: pointer;
}

.has-dropdown > .nav-link .chevron {
  transition: transform 0.2s ease;
}

.has-dropdown[data-open="true"] > .nav-link .chevron {
  transform: rotate(180deg);
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 200px;
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 8px;
  margin: 0;
  display: none;
  flex-direction: column;
}

.has-dropdown[data-open="true"] .dropdown-menu {
  display: flex;
}

.dropdown-menu li a {
  display: block;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.95rem;
  color: var(--color-navy);
}

.dropdown-menu li a:hover {
  background: var(--color-bg-soft);
  color: var(--color-blue);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.help-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-navy);
  white-space: nowrap;
}

.help-link:hover {
  color: var(--color-blue);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
}

.nav-toggle .icon-bar {
  position: relative;
  width: 20px;
  height: 2px;
  background: var(--color-navy);
  display: block;
}

.nav-toggle .icon-bar::before,
.nav-toggle .icon-bar::after {
  content: "";
  position: absolute;
  left: 0;
  width: 20px;
  height: 2px;
  background: var(--color-navy);
  transition: transform 0.2s ease;
}

.nav-toggle .icon-bar::before {
  top: -6px;
}

.nav-toggle .icon-bar::after {
  top: 6px;
}

/* Mobile nav panel */
.mobile-nav {
  display: none;
  background: var(--color-white);
  border-top: 1px solid var(--color-border);
}

.site-header[data-nav-open="true"] .mobile-nav {
  display: block;
}

.mobile-nav-list {
  padding: 12px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mobile-nav-list a,
.mobile-nav-list .mobile-nav-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  padding: 10px 4px;
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-navy);
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  cursor: pointer;
}

.mobile-submenu {
  display: none;
  padding-left: 16px;
}

.mobile-submenu[data-open="true"] {
  display: block;
}

.mobile-submenu a {
  border-bottom: none;
  font-weight: 500;
  min-height: 44px;
}

/* -------------------- Hero -------------------- */
.hero {
  position: relative;
  overflow: hidden;
  background: #eaf3fc;
  padding-block: 56px 120px;
  display: flex;
  align-items: center;
  min-height: 420px;
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: right center;
  z-index: 0;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0.97) 0%,
    rgba(255, 255, 255, 0.93) 32%,
    rgba(255, 255, 255, 0.55) 56%,
    rgba(255, 255, 255, 0.1) 78%,
    rgba(255, 255, 255, 0) 100%
  );
}

.hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-copy {
  max-width: 640px;
}

.hero-copy h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
  line-height: 1.08;
  font-weight: 800;
  color: var(--color-navy);
}

.hero-copy h1 .accent {
  color: var(--color-blue);
}

.hero-copy h1 .accent-green {
  color: var(--color-green);
}

.hero-subtext {
  margin-top: 20px;
  font-size: 1.1rem;
  color: var(--color-text-muted);
  max-width: 46ch;
}

/* -------------------- Service cards -------------------- */
.services {
  padding-block: 8px 32px;
}

.service-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin-top: -90px;
  position: relative;
  z-index: 2;
}

.service-card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover,
.service-card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.service-icon {
  width: 80px;
  height: 80px;
  color: var(--color-blue);
}

.service-icon svg,
.service-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.service-card h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--color-navy);
}

.service-card p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  flex-grow: 1;
}

.service-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--color-blue);
  color: var(--color-blue);
  align-self: flex-start;
  transition: background 0.2s ease, color 0.2s ease;
}

.service-card-link svg {
  width: 20px;
  height: 20px;
}

.service-card:hover .service-card-link,
.service-card:focus-within .service-card-link {
  background: var(--color-blue);
  color: var(--color-white);
}

.service-card-full-link {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  white-space: nowrap;
  text-indent: -9999px;
}

.service-card {
  position: relative;
}

.services-more {
  margin-top: 28px;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 20px;
  color: var(--color-text-muted);
  font-size: 0.98rem;
}

.services-more a {
  color: var(--color-blue);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.services-more a:hover {
  text-decoration: underline;
}

/* -------------------- Trust strip -------------------- */
.trust-strip {
  background: #eef5fb;
  border-block: 1px solid rgba(11, 37, 69, 0.14);
  box-shadow: 0 4px 18px rgba(11, 37, 69, 0.08);
  color: var(--color-navy);
  padding-block: 26px;
  position: relative;
  z-index: 1;
}

.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 14px;
  font-weight: 700;
  font-size: 0.98rem;
  padding-block: 4px;
}

.trust-item .trust-icon {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  color: var(--color-green);
}

.trust-item .trust-icon svg {
  width: 100%;
  height: 100%;
}

/* -------------------- Section heading -------------------- */
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.section-heading h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-navy);
}

.section-heading .view-all {
  color: var(--color-blue);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.section-heading .view-all:hover {
  text-decoration: underline;
}

/* -------------------- Introduction -------------------- */
.intro {
  padding-block: 44px;
  background: var(--color-white);
}

.intro-inner {
  max-width: 780px;
}

.intro h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 14px;
}

.intro p {
  color: var(--color-text-muted);
  font-size: 1rem;
  line-height: 1.75;
}

/* -------------------- Destinations -------------------- */
.destinations {
  padding-block: 56px;
}

.destination-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.destination-card {
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-white);
  box-shadow: var(--shadow-card);
  display: block;
}

.destination-card .thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.destination-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.destination-card .info {
  padding: 14px 16px 18px;
}

.destination-card h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-navy);
}

.destination-card p {
  margin-top: 4px;
  font-size: 0.88rem;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.destination-card p .arrow {
  color: var(--color-green);
  flex-shrink: 0;
}

/* -------------------- How it works -------------------- */
.how-it-works {
  padding-block: 56px;
  background: var(--color-bg-soft);
}

.how-it-works h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 32px;
}

.steps {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  align-items: start;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.step-badge-wrap {
  position: relative;
  width: 84px;
  height: 84px;
}

.step-number {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-blue);
  color: var(--color-white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  z-index: 1;
}

.step-icon {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #eaf1fb;
  color: var(--color-blue);
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-icon svg {
  width: 34px;
  height: 34px;
}

.step h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-navy);
}

.step p {
  color: var(--color-text-muted);
  font-size: 0.92rem;
  max-width: 26ch;
}

/* -------------------- Partners -------------------- */
.partners {
  padding-block: 48px;
}

.partners h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 20px;
}

.partner-note {
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.partner-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.partner-strip img {
  width: 100%;
  height: auto;
  filter: grayscale(0%);
}

/* -------------------- FAQ -------------------- */
.faq {
  padding-block: 48px 64px;
  background: var(--color-white);
}

.faq h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-navy);
  margin-bottom: 20px;
}

.faq-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  min-height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  background: var(--color-white);
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-navy);
  text-align: left;
}

.faq-question h3 {
  margin: 0;
  font: inherit;
  font-weight: inherit;
  color: inherit;
  text-align: inherit;
}

.faq-question .faq-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  transition: transform 0.2s ease;
  color: var(--color-blue);
}

.faq-question[aria-expanded="true"] .faq-icon {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 18px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease;
}

.faq-answer p {
  padding-bottom: 16px;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.faq-item[data-open="true"] .faq-answer {
  max-height: 240px;
}

/* -------------------- Footer -------------------- */
.site-footer {
  background: var(--color-navy-deep);
  color: #cbd5e1;
  padding-block: 48px 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.footer-brand .logo-image {
  height: 28px;
  width: auto;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
  color: #a9b7cc;
  max-width: 32ch;
}

.footer-socials {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}

.footer-socials a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-white);
}

.footer-socials a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.footer-socials svg {
  width: 16px;
  height: 16px;
}

.footer-col h4 {
  color: var(--color-white);
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 14px;
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  font-size: 0.9rem;
  color: #a9b7cc;
}

.footer-col a:hover {
  color: var(--color-white);
}

.newsletter-placeholder {
  border: 1px dashed rgba(255, 255, 255, 0.35);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 4px;
}

.newsletter-placeholder p {
  font-size: 0.85rem;
  color: #a9b7cc;
  margin-bottom: 10px;
}

.newsletter-fake-form {
  display: flex;
  gap: 8px;
}

.newsletter-fake-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-white);
  font-size: 0.85rem;
}

.newsletter-fake-form button {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--color-green);
  color: var(--color-navy-deep);
  font-weight: 700;
  font-size: 0.85rem;
  cursor: not-allowed;
}

.newsletter-note {
  font-size: 0.7rem;
  color: #7c8aa0;
  margin-top: 8px;
}

.footer-bottom {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.8rem;
  color: #8b98ac;
}

.footer-bottom-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

/* -------------------- Tablet (~834px) -------------------- */
@media (min-width: 768px) {
  .service-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-icon {
    width: 96px;
    height: 96px;
  }

  .logo-link .logo-image {
    height: 33px;
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .destination-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .steps {
    grid-template-columns: repeat(3, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .partner-strip {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* -------------------- Desktop (~1100px+) -------------------- */
@media (min-width: 1100px) {
  .main-nav {
    display: block;
  }

  .nav-toggle {
    display: none;
  }

  .hero {
    min-height: 560px;
    padding-block: 72px 150px;
  }

  .service-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .service-icon {
    width: 120px;
    height: 120px;
  }

  .service-card {
    padding-top: 32px;
    gap: 20px;
  }

  .logo-link .logo-image {
    height: 39px;
  }

  .faq-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, auto);
    grid-auto-flow: column;
    column-gap: 20px;
  }

  .trust-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .trust-item {
    padding-inline-start: 20px;
    border-left: 1px solid rgba(11, 37, 69, 0.16);
  }

  .trust-item:first-child {
    padding-inline-start: 0;
    border-left: none;
  }

  .destination-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr 1fr 1.2fr;
  }

  .partner-strip {
    grid-template-columns: repeat(6, 1fr);
  }
}
