/*
 * Mobile-only refinements for the existing DPA design.
 * Desktop layout and visual language intentionally remain untouched.
 */

/* Official Meta mark: menu icon and homepage platform banner. */
header a[href="/hizmetler/meta-ads/"] > div:first-child > svg:first-child {
  display: none;
}

header a[href="/hizmetler/meta-ads/"] > div:first-child::before {
  content: "";
  display: block;
  width: 1.75rem;
  height: 1.25rem;
  background: url("/meta-symbol.png?v=20260901") center / contain no-repeat;
}

@media (max-width: 639px) {
  html {
    max-width: 100%;
    overflow-x: clip;
    scroll-padding-top: 4.5rem;
    -webkit-text-size-adjust: 100%;
  }

  body {
    max-width: 100%;
    overflow-x: clip;
  }

  main,
  main > *,
  main .container,
  main .grid,
  main .flex {
    min-width: 0;
  }

  img,
  video,
  canvas {
    max-width: 100%;
  }

  section {
    scroll-margin-top: 4.5rem;
  }

  /* Keep the existing header, but give it a tighter and safer phone layout. */
  header.fixed {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
  }

  header nav > a img {
    width: auto !important;
    height: 2.5rem !important;
    max-width: 9rem;
  }

  header [class~="xl:hidden"][class~="fixed"][class~="inset-x-0"] {
    top: 3.5rem !important;
    max-height: calc(100dvh - 3.5rem) !important;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  header [class~="xl:hidden"] a,
  header [class~="xl:hidden"] button {
    min-height: 2.75rem;
  }

  /* First view and long headings fit without changing their visual identity. */
  main > section:first-child {
    min-height: auto !important;
    padding-top: 6.25rem !important;
    padding-bottom: 4rem !important;
  }

  main h1,
  main h2,
  main h3,
  main p,
  main li,
  footer a,
  footer p {
    overflow-wrap: anywhere;
  }

  main h1,
  main h2 {
    text-wrap: balance;
  }

  main p {
    text-wrap: pretty;
  }

  main [class~="py-32"] {
    padding-top: 4.5rem !important;
    padding-bottom: 4.5rem !important;
  }

  main [class~="py-20"] {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }

  main [class~="py-16"] {
    padding-top: 3.5rem !important;
    padding-bottom: 3.5rem !important;
  }

  main [class~="mb-16"] {
    margin-bottom: 3rem !important;
  }

  main [class~="mb-12"] {
    margin-bottom: 2.25rem !important;
  }

  main [class~="p-10"],
  main [class~="p-8"] {
    padding: 1.5rem !important;
  }

  main [class~="px-8"] {
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  main .grid[class~="grid-cols-2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.875rem;
  }

  main .grid[class~="grid-cols-3"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  main .grid > *,
  main .flex > * {
    min-width: 0;
  }

  /* Buttons remain familiar while becoming easier to tap and read. */
  main a[data-slot="button"],
  main button[data-slot="button"],
  footer a[data-slot="button"],
  footer button[data-slot="button"] {
    min-height: 3rem;
    max-width: 100%;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    white-space: normal;
    line-height: 1.25;
    text-align: center;
  }

  input,
  select,
  textarea {
    max-width: 100%;
    font-size: 16px !important;
  }

  textarea {
    resize: vertical;
  }

  /* Wide comparison tables stay usable instead of widening the whole page. */
  main table {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }

  main th,
  main td {
    min-width: 8rem;
  }

  /* Footer links wrap cleanly on narrow screens. */
  footer .flex[class~="gap-6"] {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.75rem;
  }

  footer [class~="grid-cols-2"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.25rem;
  }

  /* The cookie notice is readable at 320–430px and clears the home indicator. */
  body > .fixed.bottom-3.left-3.right-3.z-50 {
    bottom: calc(0.75rem + env(safe-area-inset-bottom));
  }

  body > .fixed.bottom-3.left-3.right-3.z-50 > div {
    align-items: stretch;
    flex-direction: column;
    gap: 0.625rem;
    border-radius: 1rem;
    padding: 0.875rem 1rem;
  }

  body > .fixed.bottom-3.left-3.right-3.z-50 .truncate {
    overflow: visible;
    white-space: normal;
    text-overflow: clip;
    line-height: 1.45;
    text-align: center;
  }

  body > .fixed.bottom-3.left-3.right-3.z-50 [class~="whitespace-nowrap"] {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.375rem;
    white-space: normal;
  }

  body > .fixed.bottom-3.left-3.right-3.z-50 button {
    width: 100%;
    min-width: 0;
    min-height: 2.5rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  /* Existing floating contact controls respect device safe areas. */
  body > .fixed.bottom-4.right-4.z-40 {
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
  }

  body > .fixed.bottom-4.right-4.z-40 > a {
    width: 3rem;
    height: 3rem;
  }
}

@media (max-width: 374px) {
  main > section:first-child {
    padding-top: 5.75rem !important;
  }

  main .container,
  header .container,
  footer .container {
    padding-left: 0.875rem !important;
    padding-right: 0.875rem !important;
  }

  main [class~="text-4xl"] {
    font-size: 2rem !important;
  }

  main [class~="text-3xl"] {
    font-size: 1.75rem !important;
  }
}

@media (hover: none) and (pointer: coarse) {
  .hover-scale:hover,
  [class*="hover:scale-"]:hover {
    transform: none !important;
  }
}

/* Simple platform logo strip. */
.dpa-platforms {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.75rem;
  margin: 2.5rem auto 0;
  padding-top: 1.75rem;
  border-top: 1px solid #e9edf3;
  max-width: 840px;
  scroll-margin-top: 6rem;
}
.dpa-logo-meta {
  display: block;
  width: 106px;
  height: auto;
  flex: 0 0 auto;
}
.dpa-logo-lockup {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  white-space: nowrap;
  color: #5f6368;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
}
.dpa-logo-lockup img { width: 30px; height: 30px; flex: 0 0 auto; }
@media (max-width: 639px) {
  .dpa-platforms {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: center;
    gap: 1.5rem 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    scroll-margin-top: 5rem;
  }
  .dpa-logo-meta { width: 95px; }
  .dpa-logo-lockup { gap: 0.4rem; font-size: 0.8125rem; }
  .dpa-logo-lockup img { width: 26px; height: 26px; }
}


/* Official badge uses Google's supplied image and agency profile URL. */
.dpa-partner-badge {
  display: block;
  width: 144px;
  max-width: 100%;
  margin: 1.25rem 0;
}
.dpa-partner-badge img {
  display: block;
  width: 100%;
  height: auto;
}
.dpa-partner-badge:focus-visible {
  outline: 2px solid #8ab4f8;
  outline-offset: 5px;
}


/* Google Ads introduction uses the official badge above its heading. */
.dpa-partner-badge-hero {
  margin: 0 auto 1.5rem;
}

/* Present the supplied square PNG through a wide viewport; keep its pixels intact. */
header nav > a img[src^="/dpa-logo.png"] {
  display: block;
  width: 164px !important;
  height: 64px !important;
  max-width: none;
  object-fit: cover;
  object-position: 50% 50%;
}
footer img[src^="/dpa-logo.png"] {
  display: block;
  width: 152px;
  height: 60px;
  object-fit: cover;
  object-position: 50% 50%;
}
@media (max-width: 639px) {
  header nav > a img[src^="/dpa-logo.png"] {
    width: 136px !important;
    height: 52px !important;
  }
  header [class~="xl:hidden"][class~="fixed"][class~="inset-x-0"] {
    top: 4.25rem !important;
    max-height: calc(100dvh - 4.25rem) !important;
  }
}


/* Concise, static homepage introduction. */
.dpa-home-hero {
  display: grid;
  place-items: center;
  min-height: min(740px, 100svh);
  padding: 8rem 1.5rem 4rem;
  background: radial-gradient(ellipse at 50% 68%, #eef6ff 0%, #f8fbff 35%, #fff 72%);
  text-align: center;
}
.dpa-hero-content { width: 100%; max-width: 1000px; margin: 0 auto; }
.dpa-home-hero .dpa-hero-title {
  margin: 0;
  color: #101828;
  font-size: clamp(2rem, 5.8vw, 4.25rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.12;
  text-wrap: balance;
}
.dpa-hero-title > span { display: block; }
.dpa-home-hero .dpa-hero-description {
  max-width: 650px;
  margin: 1.5rem auto 0;
  color: #556274;
  font-size: clamp(1rem, 1.8vw, 1.25rem);
  line-height: 1.65;
  text-wrap: pretty;
}
.dpa-hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.75rem;
  margin-top: 2rem;
}
.dpa-hero-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  min-height: 54px;
  padding: 0.875rem 1.75rem;
  border-radius: 999px;
  background: #2f59f5;
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 8px 22px #2f59f524;
  transition: background 160ms ease;
}
.dpa-hero-primary:hover { background: #2447d9; }
.dpa-hero-secondary {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: #354761;
  font-size: 0.9375rem;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: #b7c5d9;
  text-underline-offset: 5px;
}
.dpa-hero-secondary:hover { color: #2447d9; }
.dpa-hero-actions a:focus-visible { outline: 3px solid #2563eb; outline-offset: 5px; }
.dpa-home-hero .dpa-platforms { width: 100%; max-width: 780px; margin-top: 3rem; }
@media (max-width: 639px) {
  .dpa-home-hero .dpa-hero-title { font-size: clamp(2rem, 8.5vw, 2.75rem); }
  .dpa-home-hero .dpa-hero-description { margin-top: 1.25rem; font-size: 1rem; }
  .dpa-hero-actions { flex-direction: column; gap: 0.5rem; margin-top: 1.5rem; }
  .dpa-hero-primary { width: 100%; max-width: 330px; }
  .dpa-home-hero .dpa-platforms { margin-top: 2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .dpa-hero-primary { transition: none; }
}


/* Contact visitors choose a direct phone or WhatsApp conversation. */
.dpa-contact-direct { align-self: start; }
.dpa-contact-actions { display: grid; gap: 1rem; }
.dpa-contact-action {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 92px;
  padding: 1.25rem 1.5rem;
  border-radius: 1rem;
  color: #fff;
  text-decoration: none;
  transition: background 160ms ease;
}
.dpa-contact-action-phone { background: #2f59f5; }
.dpa-contact-action-phone:hover { background: #2447d9; }
.dpa-contact-action-whatsapp { background: #137a45; }
.dpa-contact-action-whatsapp:hover { background: #0c6136; }
.dpa-contact-action > svg { flex-shrink: 0; }
.dpa-contact-action-copy { display: grid; gap: 0.25rem; }
.dpa-contact-action-copy strong { font-size: 1.0625rem; font-weight: 600; }
.dpa-contact-action-copy > span { font-size: 0.875rem; }
.dpa-contact-action-arrow { margin-left: auto; font-size: 1.5rem; }
.dpa-contact-action:focus-visible { outline: 3px solid #2563eb; outline-offset: 5px; }
@media (max-width: 639px) {
  .dpa-contact-direct { padding: 1.5rem; }
  .dpa-contact-action { padding: 1.125rem; gap: 0.75rem; }
}

/* A closed mobile menu must not cover or intercept the page below it. */
header [class~="xl:hidden"][class~="fixed"][class~="inset-x-0"][class~="max-h-0"] {
  max-height: 0 !important;
  padding-bottom: 0 !important;
  visibility: hidden;
  pointer-events: none;
}
