/* Site header — Castle & King */

.ck-header {
  --ck-header-brand: var(--ck-brand);
  --ck-header-primary: var(--ck-primary);
  --ck-header-ink: var(--ck-ink);
  --ck-header-muted: var(--ck-muted);
  --ck-header-border: var(--ck-border);
  position: relative;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 1px 0 var(--ck-header-border);
}

.ck-header.is-sticky {
  position: sticky;
  top: 0;
  box-shadow: 0 4px 24px rgba(26, 26, 26, 0.08);
}

.ck-header__top {
  border-bottom: 1px solid var(--ck-header-border);
}

.ck-header__top-inner {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.25rem 0;
  min-height: 0;
}

.ck-header__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-shrink: 0;
  text-decoration: none !important;
  color: var(--ck-header-ink) !important;
}

.ck-header__logo {
  width: 56px;
  height: auto;
  display: block;
  padding: 0;
  margin: 0;
}

.ck-header__brand-name {
  font-family: "Roboto Serif", Georgia, serif;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: 0.01em;
}

.ck-header__phone {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none !important;
  color: inherit;
  padding: 0.25rem 0.5rem 0.25rem 0;
  margin-right: 0.35rem;
  border-right: 1px solid var(--ck-header-border);
  border-radius: 0;
  transition: opacity 0.2s ease;
  flex-shrink: 0;
}

.ck-header__phone:hover {
  opacity: 0.88;
}

.ck-header__phone-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(122, 48, 48, 0.08);
  color: var(--ck-header-brand);
  font-size: 0.95rem;
}

.ck-header__phone-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.ck-header__phone-label {
  font-size: 0.75rem;
  color: var(--ck-header-muted);
  line-height: 1.3;
}

.ck-header__phone-number {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ck-header-brand);
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.ck-header__actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
  margin-left: auto;
}

.ck-header__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--ck-header-border);
  background: #fff;
  color: var(--ck-header-ink);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none !important;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ck-header__pill:hover {
  border-color: #d0cbc3;
  color: var(--ck-header-brand);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.ck-header__pill--whatsapp {
  color: #128c7e;
  border-color: rgba(18, 140, 126, 0.35);
}

.ck-header__pill--whatsapp:hover {
  color: #0e6b61;
  background: rgba(18, 140, 126, 0.06);
}

.ck-header__pill--primary {
  background: var(--ck-header-primary);
  border-color: var(--ck-header-primary);
  color: #fff !important;
}

.ck-header__pill--primary:hover {
  background: var(--ck-primary-hover);
  border-color: var(--ck-primary-hover);
  color: #fff !important;
}

.ck-header__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid var(--ck-header-border);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.ck-header__toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--ck-header-ink);
  border-radius: 1px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.ck-header__toggle.is-open .ck-header__toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.ck-header__toggle.is-open .ck-header__toggle-bar:nth-child(2) {
  opacity: 0;
}

.ck-header__toggle.is-open .ck-header__toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Primary nav — left-aligned bar */
.ck-header__nav.menu-wrapper {
  border-top: 1px solid var(--ck-header-border);
  background: #fff;
}

.ck-header__nav.menu-wrapper ul li {
  display: block;
}

.ck-header__nav.menu-wrapper ul li a {
  text-transform: lowercase !important;
  font-weight: 400 !important;
  font-style: normal !important;
}

.ck-header__nav .container {
  padding-left: 15px;
  padding-right: 15px;
}

.ck-header__nav-inner {
  width: 100%;
}

.ck-header__menu,
.ck-header__nav .menu {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: flex-start;
  align-content: flex-start;
  gap: 0;
  margin: 0;
  padding: 0.1rem 0 0.25rem;
  list-style: none;
  width: 100%;
}

.ck-header__menu > li,
.ck-header__nav .menu > li {
  display: block;
  margin: 0;
}

.ck-header__menu > li > a,
.ck-header__nav .menu > li > a {
  display: block;
  padding: 0.5rem 0.5rem 0.55rem;
  font-size: 15px;
  font-weight: 400;
  font-style: normal;
  letter-spacing: 0;
  text-transform: lowercase;
  color: var(--ck-ink-soft) !important;
  text-decoration: none !important;
  position: relative;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.ck-header__menu > li > a::first-letter,
.ck-header__nav .menu > li > a::first-letter {
  text-transform: uppercase;
}

.ck-header__menu > li:first-child > a,
.ck-header__nav .menu > li:first-child > a {
  padding-left: 0;
}

.ck-header__menu > li > a::after,
.ck-header__nav .menu > li > a::after {
  content: "";
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: 0.28rem;
  height: 2px;
  background: var(--ck-header-brand);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}

.ck-header__menu > li:first-child > a::after,
.ck-header__nav .menu > li:first-child > a::after {
  left: 0;
}

.ck-header__menu > li > a:hover,
.ck-header__menu > li.current-menu-item > a,
.ck-header__menu > li.current_page_parent > a,
.ck-header__nav .menu > li > a:hover,
.ck-header__nav .menu > li.current-menu-item > a {
  color: var(--ck-header-brand) !important;
}

.ck-header__menu > li > a:hover::after,
.ck-header__menu > li.current-menu-item > a::after,
.ck-header__nav .menu > li > a:hover::after,
.ck-header__nav .menu > li.current-menu-item > a::after {
  transform: scaleX(1);
}

/* Desktop: single-line nav */
@media (min-width: 992px) {
  .ck-header__menu,
  .ck-header__nav .menu {
    flex-wrap: nowrap;
  }

  .ck-header__menu > li > a,
  .ck-header__nav .menu > li > a {
    padding: 0.45rem 0.38rem 0.48rem;
    font-size: 14px;
    font-weight: 400;
  }

  .ck-header__menu > li > a::after,
  .ck-header__nav .menu > li > a::after {
    left: 0.42rem;
    right: 0.42rem;
    bottom: 0.22rem;
  }

  .ck-header__menu > li:first-child > a::after,
  .ck-header__nav .menu > li:first-child > a::after {
    left: 0;
  }
}

@media (min-width: 1200px) {
  .ck-header__menu > li > a,
  .ck-header__nav .menu > li > a {
    padding: 0.45rem 0.45rem 0.5rem;
    font-size: 15px;
  }

  .ck-header__menu > li > a::after,
  .ck-header__nav .menu > li > a::after {
    left: 0.5rem;
    right: 0.5rem;
  }
}

@media (min-width: 1400px) {
  .ck-header__menu > li > a,
  .ck-header__nav .menu > li > a {
    padding: 0.5rem 0.52rem 0.52rem;
    font-size: 16px;
  }
}

/* Legacy header blocks (removed from markup) */
.ck-header ~ .header-container,
.header-container,
.mob-c {
  display: none !important;
}

@media (max-width: 991px) {
  .ck-header__top-inner {
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.45rem 0;
  }

  .ck-header__brand {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 7.5rem);
  }

  .ck-header__brand-name {
    font-size: 1.05rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .ck-header__logo {
    width: 48px;
  }

  /* Legacy style.css sets #mob-menu { display: block } — breaks the X icon layout */
  .ck-header__toggle,
  .ck-header__toggle#mob-menu {
    display: flex !important;
    flex: 0 0 44px;
    position: relative;
    z-index: 12;
    margin-left: 0.15rem;
  }

  .ck-header__actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0;
  }

  .ck-header__phone,
  .ck-header__pill--hide-mobile {
    display: none !important;
  }

  .ck-header__pill--whatsapp {
    padding: 0.45rem 0.55rem;
  }

  .ck-header__pill--whatsapp span {
    display: none;
  }

  .ck-header__nav .ck-header__menu,
  .ck-header__nav .menu {
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 0.35rem 0 0.5rem;
    gap: 0;
  }

  .ck-header__nav .ck-header__menu.is-open,
  .ck-header__nav .menu.is-open,
  #menu-main-header-menu.is-open {
    display: flex !important;
  }

  #menu-main-header-menu:not(.is-open) {
    display: none !important;
  }

  .ck-header__menu > li > a,
  .ck-header__nav .menu > li > a {
    padding: 0.75rem 0.5rem;
    font-size: 15px;
    font-weight: 400;
    border-bottom: 1px solid #f0ece6;
  }

  .ck-header__menu > li > a::after,
  .ck-header__nav .menu > li > a::after {
    display: none;
  }

  .ck-header__mobile-contact {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.85rem 0.5rem 1rem;
    margin-top: 0.35rem;
    border-top: 1px solid var(--ck-header-border);
  }

  .ck-header__menu.is-open ~ .ck-header__mobile-contact,
  .ck-header__nav .menu.is-open ~ .ck-header__mobile-contact {
    display: flex;
  }

  .ck-header__mobile-phone,
  .ck-header__mobile-wa {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none !important;
  }

  .ck-header__mobile-phone {
    background: var(--ck-primary);
    color: #fff !important;
  }

  .ck-header__mobile-wa {
    background: rgba(18, 140, 126, 0.1);
    color: #0e6b61 !important;
    border: 1px solid rgba(18, 140, 126, 0.35);
  }
}

@media (min-width: 992px) {
  .ck-header__mobile-contact {
    display: none;
  }
}

@media (max-width: 575px) {
  .ck-header__logo {
    width: 44px;
  }

  .ck-header__brand-name {
    font-size: 0.98rem;
  }
}
