/* ===== Base ===== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; }

@keyframes dbtvRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes dbtvPulse { 0%,100% { transform: scale(1); opacity: .9; } 50% { transform: scale(1.04); opacity: 1; } }

/* ===== Hero image ===== */
.dbtv-hero {
  min-height: min(780px, calc(100vh - 60px));
  display: flex;
  align-items: center;
}
.dbtv-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: url("images/irish-satellite-installer-hero-20260624.jpg") center right / cover no-repeat;
  transform: scale(1.01);
}
.dbtv-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(12,17,21,.86) 0%, rgba(12,17,21,.68) 34%, rgba(12,17,21,.22) 62%, rgba(12,17,21,.04) 100%),
    linear-gradient(180deg, rgba(12,17,21,.16) 0%, rgba(12,17,21,.08) 52%, rgba(12,17,21,.42) 100%);
}
.dbtv-hero-inner {
  width: 100%;
}

/* ===== Nav links (converted from inline + hover) ===== */
.dbtv-navlink {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 999px;
  text-decoration: none;
  color: var(--teal-dark, #157a60);
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  text-underline-offset: 4px;
  transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.dbtv-navlink:hover,
.dbtv-navlink:focus-visible {
  background: #eef5f2;
  color: #11664f;
  box-shadow: inset 0 0 0 1px #d7e8e1;
}
.dbtv-navlink:focus-visible,
.dbtv-call-pill:focus-visible,
.dbtv-logo:focus-visible,
.dbtv-cardlink:focus-visible,
.dbtv-footer-phone:focus-visible {
  outline: 3px solid rgba(28,156,122,.25);
  outline-offset: 3px;
}

/* ===== Service cards (converted from style-hover) ===== */
/* Base border lives here (not inline) so the :hover border-color can win the cascade. */
.dbtv-card { border: 1px solid #e7eae9; }
.dbtv-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -22px rgba(31,36,42,.45);
  border-color: #d3e3dd;
}
.dbtv-card:hover .dbtv-arrow { transform: translateX(4px); }
.dbtv-cardlink:hover { text-decoration: underline; }

/* ===== Area cards (converted from style-hover) ===== */
.dbtv-area { border: 1px solid #e7eae9; }
.dbtv-area:hover {
  border-color: #d3e3dd;
  box-shadow: 0 14px 34px -22px rgba(31,36,42,.4);
}

/* ===== Form inputs (converted from style-focus) ===== */
.dbtv-input,
.dbtv-submit {
  width: 100%;
  min-width: 0;
}
.dbtv-input { border: 1.5px solid #dde1e0; }
.dbtv-input:focus {
  border-color: var(--teal, #1c9c7a);
  /* keep a visible focus ring for accessibility instead of removing it outright */
  outline: 2px solid transparent;
  box-shadow: 0 0 0 3px rgba(28,156,122,.18);
}

/* ===== Submit button (converted from style-hover) ===== */
.dbtv-submit { background: var(--teal, #1c9c7a); }
.dbtv-submit:hover { background: var(--teal-dark, #157a60); }
.dbtv-submit:disabled { opacity: .65; cursor: default; }

/* ===== Mobile-only line break (hidden on desktop) ===== */
br.dbtv-mobilebreak { display: none; }

/* ===== Floating WhatsApp action ===== */
.dbtv-whatsapp-widget {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 90;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 54px;
  padding: 13px 18px;
  border-radius: 999px;
  background: var(--teal, #157a60);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 15px;
  line-height: 1;
  box-shadow: 0 18px 38px -16px rgba(18,140,126,.8);
  transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.dbtv-whatsapp-widget:hover {
  transform: translateY(-2px);
  background: var(--teal-dark, #0f604c);
  box-shadow: 0 22px 42px -16px rgba(18,140,126,.88);
}
.dbtv-whatsapp-widget:focus-visible {
  outline: 3px solid rgba(37,211,102,.32);
  outline-offset: 3px;
}
.dbtv-whatsapp-icon {
  width: 24px;
  height: 24px;
  flex: none;
  fill: currentColor;
}
.dbtv-whatsapp-text {
  white-space: nowrap;
}

/* ===== Mobile layout ===== */
/* The markup is inline-styled, so these overrides need !important to win the cascade. */
@media (max-width: 720px) {
  /* Header: keep logo + Call button on one line, drop the in-page anchor links. */
  .dbtv-navlink { display: none !important; }
  .dbtv-header-inner {
    gap: 10px !important;
    padding: 10px 14px !important;
  }
  .dbtv-logo { gap: 8px !important; min-width: 0; }
  .dbtv-logo-mark {
    width: 30px !important;
    height: 30px !important;
  }
  .dbtv-logo-text {
    font-size: 16px !important;
    white-space: nowrap;
  }
  .dbtv-nav {
    gap: 0 !important;
    flex: 0 0 auto;
  }
  .dbtv-call-pill {
    gap: 6px !important;
    padding: 8px 10px !important;
    font-size: 12px !important;
  }

  /* Hero: keep the installer visible while leaving the headline room. */
  .dbtv-hero {
    min-height: auto;
    align-items: flex-end;
  }
  .dbtv-hero::before {
    background-image: url("images/irish-satellite-installer-hero-mobile-20260624.jpg");
    background-position: 56% center;
  }
  .dbtv-hero::after {
    background:
      linear-gradient(180deg, rgba(8,12,15,.16) 0%, rgba(8,12,15,.56) 38%, rgba(8,12,15,.88) 100%),
      linear-gradient(90deg, rgba(8,12,15,.58) 0%, rgba(8,12,15,.28) 58%, rgba(8,12,15,.12) 100%),
      rgba(8,12,15,.08);
  }
  .dbtv-hero-inner {
    padding-top: clamp(48px, 7vh, 112px) !important;
    padding-bottom: 28px !important;
  }
  #hero-title { font-size: 33px !important; max-width: none !important; }

  /* Hero "We cover": label on its own row, bubbles in a 2×2 centered grid. */
  .dbtv-cover-row {
    flex-direction: column !important;
    align-items: center !important;
    margin-top: 20px !important;
  }
  .dbtv-cover-label { margin-right: 0 !important; text-align: center !important; }
  .dbtv-cover-bubbles {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    justify-items: center !important;
  }
  .dbtv-cover-bubbles > span {
    font-size: 13px !important;
    padding: 6px 12px !important;
  }

  /* Service areas: force 2-column grid on mobile. */
  .dbtv-areas-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }
  .dbtv-areas-grid .dbtv-area { padding: 20px 14px !important; }

  /* Prevent 300px inline grid minimums from overflowing narrow phones. */
  .dbtv-about-grid,
  .dbtv-contact-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .dbtv-contact-call {
    gap: 12px !important;
    padding: 16px !important;
  }
  .dbtv-contact-call span span:last-child {
    font-size: 21px !important;
  }
  #contact-form > * {
    min-width: 0;
  }

  /* Show mobile-only line breaks. */
  br.dbtv-mobilebreak { display: block; }

  /* Footer: stack the row centered with the number below the tagline. */
  .dbtv-footer-row {
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    gap: 16px !important;
  }
  .dbtv-footer-phone { margin-left: 0 !important; }

  .dbtv-whatsapp-widget {
    right: 24px;
    bottom: 24px;
    width: 54px;
    height: 54px;
    min-height: 54px;
    justify-content: center;
    padding: 0;
  }
  .dbtv-whatsapp-text { display: none; }
}

/* ===== Accessibility: respect reduced motion ===== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
