:root {
  --cgvf-action-blue: #006aa8;
  --cgvf-action-teal: #006e67;
  --cgvf-accent-text: #006e67;
  --cgvf-whatsapp: #08783e;
  --cgvf-focus: #005fcc;
}

/* Actions keep the blue-green identity while meeting small-text contrast. */
.cg-button,
.cg-header-cta {
  background: linear-gradient(115deg, var(--cgvf-action-blue), var(--cgvf-action-teal));
}

.cg-request-band {
  background:
    radial-gradient(circle at 80% 15%, rgba(73, 184, 255, .28), transparent 27%),
    linear-gradient(115deg, #006aa8, #006e67, #075b8c);
}

.cg-dock-action--whatsapp,
.cg-mobile-whatsapp {
  background: var(--cgvf-whatsapp);
}

.cg-location-kicker,
.cg-location-property-card small,
.cg-stay-type-grid span {
  color: var(--cgvf-accent-text);
}

.cg-dock-action small {
  font-size: 12px;
}

/* One focused floating action: availability starts in WhatsApp. */
.cg-contact-dock--single {
  gap: 0;
}

.cg-dock-action--combined {
  background: linear-gradient(115deg, #08783e, #006e67);
  border-color: rgba(255, 255, 255, .78);
  color: #fff;
  gap: 12px;
  min-width: 268px;
  padding: 13px 20px;
}

.cg-dock-action--combined > span {
  display: grid;
  gap: 2px;
}

.cg-dock-action--combined small {
  color: rgba(255, 255, 255, .88);
  letter-spacing: 0;
}

.cg-dock-whatsapp-icon {
  flex: 0 0 24px;
  height: 24px;
  width: 24px;
}

.cg-contact-dock {
  transition: opacity .2s ease, visibility .2s ease, transform .2s ease;
}

.cg-contact-dock.is-hero-visible {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  visibility: hidden;
}

.cg-eyebrow,
.cg-area-card__content small,
.cg-location-property-card small {
  font-size: 13px;
}

/* Clear keyboard focus without changing the visual language for pointer users. */
.screen-reader-text:focus {
  background: #fff;
  border: 2px solid #08263c;
  border-radius: 8px;
  clip: auto;
  clip-path: none;
  color: #08263c;
  height: auto;
  left: 16px;
  overflow: visible;
  padding: 12px 16px;
  position: fixed;
  top: 16px;
  width: auto;
  z-index: 1000;
}

:where(a, button, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 3px solid var(--cgvf-focus);
  outline-offset: 3px;
}

.cg-inquiry :where(input, select, textarea):focus-visible {
  border-bottom-color: var(--cgvf-focus);
  outline: 3px solid var(--cgvf-focus);
  outline-offset: 4px;
}

:where(.cg-footer, .cg-process, .cg-request-band, .cg-story--istanbul)
  :where(a, button, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
  box-shadow: 0 0 0 6px #08263c;
  outline-color: #fff;
}

main p a:not(.cg-button),
.cgvf-interim a,
.cg-consent a {
  text-decoration: underline;
  text-decoration-thickness: .08em;
  text-underline-offset: .18em;
}

.cg-language,
.cg-menu-toggle,
.cg-dock-action,
.cg-nav-stays__menu a {
  min-height: 44px;
}

.cg-nav-stays__menu a {
  align-items: center;
  display: flex;
}

.cgvf-nav-mobile-only,
.cgvf-language-short {
  display: none;
}

/* Slider dots retain their visual size while gaining a 44px touch target. */
.cg-city-slider-controls {
  gap: 0;
  padding: 2px 4px;
}

.cg-city-slider-control,
.cg-city-slider-control[aria-current="true"] {
  background: transparent;
  display: grid;
  height: 44px;
  place-items: center;
  position: relative;
  width: 44px;
}

.cg-city-slider-control::before {
  background: rgba(255, 255, 255, .68);
  border-radius: 999px;
  content: "";
  height: 10px;
  transition: width .25s ease, background-color .25s ease;
  width: 10px;
}

.cg-city-slider-control[aria-current="true"]::before {
  background: #fff;
  width: 26px;
}

.cg-city-slider-control:focus-visible {
  box-shadow: 0 0 0 5px #08263c;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* Motion is a progressive enhancement; never leave content hidden. */
.cg-js .cg-reveal {
  transition-duration: .4s;
}

/* Use the generated medium-size real photograph for the CSS background. */
.cg-story--istanbul {
  background-image:
    linear-gradient(90deg, rgba(2, 25, 44, .91) 0%, rgba(2, 40, 62, .76) 48%, rgba(8, 108, 111, .42) 100%),
    url("https://caveglobal.com.tr/wp-content/uploads/2026/09/moda-real-1536x864.jpg");
}

/* Interim legal/trust pages: readable, explicit and visually calm. */
.cgvf-interim {
  max-width: 850px;
}

.cgvf-interim-lead {
  color: var(--cg-ink);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.5;
}

.cgvf-interim h2 {
  font-family: var(--cg-serif);
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.1;
  margin: 48px 0 14px;
}

.cgvf-interim p {
  color: var(--cg-ink-soft);
  font-size: 16px;
  line-height: 1.75;
}

.cgvf-form-notice {
  background: rgba(0, 106, 168, .08);
  border-left: 3px solid var(--cgvf-action-blue);
  border-radius: 0 12px 12px 0;
  color: var(--cg-ink-soft);
  grid-column: 1 / -1;
  line-height: 1.6;
  margin: -12px 0 8px;
  padding: 14px 16px;
}

.cgvf-field-note,
.cgvf-date-help {
  color: var(--cg-ink-soft);
  display: block;
  font-size: 13px;
  line-height: 1.5;
  margin: 7px 0 0;
}

.cgvf-date-help {
  margin-top: -12px;
}

.cgvf-date-error {
  color: #9c2f2f;
  font-weight: 650;
}

/* Room references are real, stable identifiers; availability remains date-led. */
.cg-room-row.cgvf-room-option {
  border-radius: 14px;
  grid-template-columns: 88px minmax(0, 1fr) minmax(210px, .8fr) auto;
  padding-inline: 16px;
}

.cg-room-row.cgvf-room-option:hover {
  padding-inline: 16px;
}

.cgvf-room-code {
  background: rgba(0, 110, 103, .09);
  border: 1px solid rgba(0, 110, 103, .18);
  border-radius: 999px;
  color: #006e67 !important;
  font-family: var(--cg-sans) !important;
  font-size: 11px !important;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  letter-spacing: .08em;
  padding: 6px 9px;
  width: fit-content;
}

.cg-room-row .cgvf-room-status {
  color: var(--cg-ink-soft);
  font-size: 12px;
  letter-spacing: 0;
  line-height: 1.45;
  text-transform: none;
}

/* Ensure the request photograph caption stays legible on every image. */
.cg-form-photo {
  margin: 0;
}

.cg-form-photo::after {
  background: linear-gradient(180deg, rgba(2, 22, 37, .04) 42%, rgba(2, 22, 37, .8) 100%);
  content: "";
  inset: 0;
  pointer-events: none;
  position: absolute;
}

.cg-form-photo figcaption {
  gap: 20px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, .72);
  z-index: 1;
}

/* Travel-guide landing and article layout. */
.cgvf-guide-grid {
  display: grid;
  gap: 26px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cgvf-guide-card {
  background:
    radial-gradient(circle at 88% 8%, rgba(73, 184, 255, .24), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, .96), rgba(226, 249, 247, .78));
  border: 1px solid #fff;
  border-radius: 26px;
  box-shadow: 0 18px 55px rgba(8, 38, 60, .1);
  min-height: 360px;
  transition: box-shadow .35s ease, transform .35s var(--cg-ease);
}

.cgvf-guide-card:hover {
  box-shadow: var(--cg-shadow-bright);
  transform: translateY(-7px);
}

.cgvf-guide-card > a {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: clamp(28px, 4vw, 48px);
}

.cgvf-guide-card__number,
.cgvf-guide-card__meta {
  color: var(--cgvf-accent-text);
  font-size: 11px;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.cgvf-guide-card__meta {
  margin: 70px 0 12px;
}

.cgvf-guide-card h2 {
  font-family: var(--cg-serif);
  font-size: clamp(32px, 3vw, 48px);
  letter-spacing: -.04em;
  line-height: 1.03;
  margin: 0;
}

.cgvf-guide-card h2 + p {
  color: var(--cg-ink-soft);
  line-height: 1.7;
  margin: 20px 0 30px;
}

.cgvf-guide-card strong {
  font-size: 13px;
  margin-top: auto;
}

.cg-simple .entry-content.cgvf-guide,
.cg-simple .entry-content:has(> .cgvf-guide) {
  max-width: 920px;
}

.cgvf-guide-lead {
  color: var(--cg-ink) !important;
  font-size: clamp(20px, 2vw, 27px);
  line-height: 1.55 !important;
}

.cgvf-guide h2 {
  color: var(--cg-ink);
  font-family: var(--cg-serif);
  font-size: clamp(28px, 3.2vw, 42px);
  letter-spacing: -.035em;
  line-height: 1.08;
  margin: 58px 0 15px;
}

.cgvf-guide-sources,
.cgvf-guide-cta {
  border-radius: 24px;
  margin-top: 64px;
  padding: clamp(28px, 5vw, 52px);
}

.cgvf-guide-sources {
  background: rgba(0, 106, 168, .06);
  border: 1px solid rgba(0, 106, 168, .14);
}

.cgvf-guide-sources h2,
.cgvf-guide-cta h2 {
  margin-top: 0;
}

.cgvf-guide-sources ul {
  line-height: 1.8;
  margin-bottom: 0;
}

.cgvf-guide-cta {
  background: linear-gradient(125deg, #e5f7ff, #e6faf3);
}

.cgvf-guide-cta .cg-link {
  display: inline-block;
  margin: 18px 0 0 20px;
}

.cg-contact-dock.is-footer-visible {
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  visibility: hidden;
}

@media (max-width: 1180px) and (min-width: 981px) {
  .cg-nav {
    gap: 14px;
  }

  .cg-nav > a,
  .cg-nav-stays__trigger {
    font-size: 11px;
  }

  .cg-header-actions {
    gap: 14px;
  }
}

@media (max-width: 980px) {
  .cgvf-nav-mobile-only {
    display: block;
  }

  .cg-nav > a,
  .cg-nav-stays__trigger {
    min-height: 44px;
  }

  /*
   * The desktop split hero becomes one immersive composition on tablets and
   * phones. Without this, the 700px copy row and 620px media row read as two
   * unrelated heroes stacked on top of each other.
   */
  body.page-template-page-cg-home .cg-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    isolation: isolate;
    min-height: clamp(720px, 100svh, 860px);
    overflow: hidden;
    padding-top: 88px;
  }

  body.page-template-page-cg-home .cg-hero-copy,
  body.page-template-page-cg-home .cg-hero-visual {
    grid-area: 1 / 1;
    height: 100%;
    min-height: 0;
  }

  body.page-template-page-cg-home .cg-hero-visual {
    border-bottom-left-radius: 38px;
    box-shadow: none;
    z-index: 0;
  }

  body.page-template-page-cg-home .cg-hero-visual::before {
    background:
      radial-gradient(circle at 78% 16%, rgba(73, 184, 255, .12), transparent 34%),
      linear-gradient(105deg, rgba(2, 22, 37, .72) 0%, rgba(2, 31, 49, .45) 62%, rgba(4, 60, 73, .2) 100%);
    mix-blend-mode: normal;
  }

  body.page-template-page-cg-home .cg-hero-visual::after {
    background:
      linear-gradient(90deg, rgba(2, 22, 37, .78) 0%, rgba(2, 31, 49, .54) 64%, rgba(2, 31, 49, .22) 100%),
      linear-gradient(180deg, rgba(2, 22, 37, .12) 0%, rgba(2, 25, 44, .42) 52%, rgba(2, 22, 37, .9) 100%);
  }

  body.page-template-page-cg-home .cg-hero-copy {
    background: linear-gradient(90deg, rgba(2, 25, 44, .18), transparent 78%);
    color: #fff;
    justify-content: flex-end;
    max-width: 760px;
    overflow: visible;
    padding: clamp(64px, 10vh, 104px) var(--cg-gutter) clamp(64px, 8vh, 84px);
    z-index: 2;
  }

  body.page-template-page-cg-home .cg-hero-copy::before {
    display: none;
  }

  body.page-template-page-cg-home .cg-hero h1 {
    animation: none;
    background: none;
    color: #fff;
    text-shadow: 0 3px 28px rgba(2, 18, 31, .34);
    -webkit-text-fill-color: #fff;
  }

  body.page-template-page-cg-home .cg-hero .cg-eyebrow {
    color: #c8f4ef;
    text-shadow: 0 2px 16px rgba(2, 18, 31, .4);
  }

  body.page-template-page-cg-home .cg-hero .cg-intro {
    color: rgba(255, 255, 255, .92);
    text-shadow: 0 2px 18px rgba(2, 18, 31, .44);
  }

  body.page-template-page-cg-home .cg-hero .cg-link {
    border-bottom-color: rgba(255, 255, 255, .55);
    color: #fff;
  }

  body.page-template-page-cg-home .cg-hero .cg-availability,
  body.page-template-page-cg-home .cg-hero .cg-hero-caption {
    display: none;
  }
}

@media (max-width: 640px) {
  body.page-template-page-cg-home .cg-homes {
    display: grid;
    gap: 18px;
    grid-auto-columns: clamp(272px, 82vw, 340px);
    grid-auto-flow: column;
    grid-template-columns: none;
    margin-inline: -24px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    padding: 0 24px 18px;
    scroll-padding-inline: 24px;
    scroll-snap-type: inline proximity;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  body.page-template-page-cg-home .cg-home-card {
    min-width: 0;
    scroll-snap-align: start;
  }

  body.page-template-page-cg-home .cg-home-image {
    aspect-ratio: 4 / 3;
    border-radius: 20px;
  }

  body.page-template-page-cg-home .cg-home-meta {
    margin-top: 12px;
    padding-top: 12px;
  }

  body.page-template-page-cg-home .cg-home-meta h3 {
    font-size: 24px;
  }

  .cg-header {
    column-gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .cg-brand,
  .cg-brand-lockup,
  .cg-brand-lockup--image {
    max-width: 100%;
    min-width: 0;
  }

  .cg-brand {
    overflow: hidden;
  }

  .cg-brand-lockup-image,
  .cg-custom-logo {
    height: auto;
    max-width: 100%;
    width: clamp(132px, 42vw, 160px);
  }

  .cg-header-actions {
    flex: 0 0 auto;
    gap: 6px;
    min-width: 0;
  }

  .cg-language {
    flex: 0 0 auto;
    min-height: 44px;
    padding: 7px 9px;
  }

  .cg-menu-toggle {
    flex: 0 0 44px;
  }

  .cg-header.is-scrolled .cg-nav {
    height: calc(100dvh - 72px);
    top: 72px;
  }

  body.page-template-page-cg-home .cg-hero {
    min-height: clamp(720px, 100svh, 840px);
    padding-top: 72px;
  }

  body.page-template-page-cg-home .cg-hero-copy {
    min-height: 0;
    padding: 56px 24px 64px;
  }

  body.page-template-page-cg-home .cg-hero h1 {
    font-size: clamp(48px, 14vw, 58px);
  }

  body.page-template-page-cg-home .cg-hero .cg-intro {
    font-size: 15px;
    line-height: 1.62;
    margin-top: 24px;
  }

  body.page-template-page-cg-home .cg-hero .cg-actions {
    gap: 16px 22px;
    margin-top: 28px;
  }

  body.page-template-page-cg-home .cg-hero-visual {
    border-bottom-left-radius: 30px;
  }

  body.admin-bar .cg-header.is-scrolled .cg-nav {
    height: calc(100dvh - 118px);
    top: 118px;
  }

  body:not(.page-template-page-cg-request) {
    padding-bottom: calc(70px + env(safe-area-inset-bottom));
  }

  .cg-contact-dock {
    align-items: stretch;
    bottom: max(10px, env(safe-area-inset-bottom));
    display: grid;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) 52px;
    left: 16px;
    right: 16px;
    transition: opacity .18s ease, visibility .18s ease, transform .18s ease;
  }

  .cg-contact-dock--single {
    display: flex;
  }

  .cg-dock-action {
    justify-content: center;
    min-height: 52px;
  }

  .cg-dock-action--booking {
    min-width: 0;
    order: 1;
    padding: 10px 16px;
    width: 100%;
  }

  .cg-dock-action--combined {
    justify-content: flex-start;
    min-height: 54px;
    min-width: 0;
    padding: 8px 15px;
    width: 100%;
  }

  .cg-dock-whatsapp-icon {
    height: 22px;
    width: 22px;
  }

  .cg-dock-action--combined strong {
    font-size: 13px;
    line-height: 1.2;
  }

  .cg-dock-action--booking small {
    display: none;
  }

  .cg-dock-action--combined small {
    display: block;
    font-size: 10px;
    line-height: 1.25;
  }

  .cg-dock-action--whatsapp {
    order: 2;
    padding: 0;
    width: 52px;
  }

  .cg-dock-action--whatsapp span {
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    width: 1px;
  }

  .cg-dock-status {
    animation: none;
  }

  body.cg-menu-open .cg-contact-dock,
  .cg-contact-dock.is-footer-visible {
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    visibility: hidden;
  }

  .page-template-page-cg-request .cg-contact-dock {
    display: flex;
    padding: 20px 24px calc(20px + env(safe-area-inset-bottom));
    position: static;
  }

  .page-template-page-cg-request .cg-dock-action--booking {
    display: none;
  }

  .page-template-page-cg-request .cg-dock-action--combined {
    display: flex;
  }

  .cg-js .cg-reveal {
    transform: translate3d(0, 20px, 0);
    transition-delay: 0s !important;
  }

  .cg-story--istanbul {
    background-image:
      linear-gradient(90deg, rgba(2, 25, 44, .91) 0%, rgba(2, 40, 62, .76) 48%, rgba(8, 108, 111, .42) 100%),
      url("https://caveglobal.com.tr/wp-content/uploads/2026/09/moda-real-1024x576.jpg");
  }

  .cg-room-row.cgvf-room-option {
    grid-template-columns: 70px minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    min-height: 96px;
    padding: 14px 0;
  }

  .cg-room-row.cgvf-room-option:hover {
    padding: 14px 0;
  }

  .cgvf-room-code {
    align-self: center;
    grid-column: 1;
    grid-row: 1 / 3;
  }

  .cg-room-row.cgvf-room-option strong {
    grid-column: 2;
    grid-row: 1;
  }

  .cg-room-row .cgvf-room-status {
    display: block;
    grid-column: 2 / 4;
    grid-row: 2;
  }

  .cg-room-row.cgvf-room-option b {
    grid-column: 3;
    grid-row: 1;
    white-space: nowrap;
  }

  .cgvf-guide-grid {
    grid-template-columns: 1fr;
  }

  .cgvf-guide-card {
    min-height: 330px;
  }

  .cgvf-guide-card__meta {
    margin-top: 54px;
  }

  .cgvf-guide-cta .cg-link {
    margin-left: 0;
  }
}

@media (max-width: 360px) {
  .cg-dock-action--combined small {
    display: none;
  }

  .cg-room-row.cgvf-room-option b {
    font-size: 0;
  }

  .cg-room-row.cgvf-room-option b::after {
    content: "↗";
    font-size: 18px;
  }

  .cg-footer-brand .cg-brand-lockup {
    gap: 6px;
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .cg-footer-brand .cg-brand-art {
    height: 40px;
    width: auto;
  }

  .cg-footer-brand .cg-brand-wordmark {
    font-size: clamp(24px, 8vw, 28px);
    min-width: 0;
  }

  .cgvf-language-long {
    display: none;
  }

  .cgvf-language-short {
    display: inline;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cg-js .cg-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .cgvf-guide-card {
    transition: none;
  }
}
