/**
 * NelNelSA critical layout, navigation, logo & icon fixes
 * Loaded after style.css
 */

/* ==========================================================================
   Global box model
   ========================================================================== */
html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

body {
  margin: 0;
  overflow-x: hidden;
}

img,
video,
svg {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* ==========================================================================
   Header layout
   ========================================================================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 80px;
  background: transparent;
}

body.admin-bar .site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

.header-inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 100%;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

@media (min-width: 768px) {
  .header-inner {
    padding: 0 40px;
  }
}

/* ---- Logo (text + custom image) ---- */
.site-logo,
.site-logo--image {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 1001;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  line-height: 1;
}

.site-logo--image .custom-logo-link {
  display: block;
  line-height: 0;
}

.site-logo--image .custom-logo,
.site-logo--image img,
.custom-logo-link img,
img.custom-logo {
  display: block !important;
  max-height: 40px !important;
  width: auto !important;
  height: auto !important;
  max-width: 180px !important;
}

/* ---- Primary nav (desktop) ---- */
.main-nav-wrap {
  display: none;
  flex: 1;
  justify-content: center;
}

@media (min-width: 1024px) {
  .main-nav-wrap {
    display: flex;
  }
}

ul.main-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 2rem;
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

ul.main-nav li {
  list-style: none !important;
  margin: 0;
  padding: 0;
}

ul.main-nav a {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: inherit;
  padding: 4px 0;
  position: relative;
  white-space: nowrap;
}

ul.main-nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: #C9A227;
  transition: width 0.3s ease;
}

ul.main-nav a:hover::after,
ul.main-nav .current-menu-item > a::after {
  width: 100%;
}

/* Header colour states */
.site-header--transparent {
  color: #fff;
}

.site-header--transparent .site-logo,
.site-header--transparent ul.main-nav a,
.site-header--transparent .menu-toggle {
  color: #fff;
}

.site-header--scrolled,
.site-header--solid {
  background: #fff !important;
  color: #000;
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.site-header--scrolled .site-logo,
.site-header--scrolled ul.main-nav a,
.site-header--scrolled .menu-toggle,
.site-header--solid .site-logo,
.site-header--solid ul.main-nav a,
.site-header--solid .menu-toggle {
  color: #000;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  z-index: 1001;
}

.header-actions .btn--sm {
  padding: 10px 18px;
  font-size: 0.75rem;
}

@media (max-width: 480px) {
  .header-actions .btn {
    display: none; /* hamburger only on very small screens */
  }
}

/* Hamburger */
.menu-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: inherit;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: currentColor;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

@media (min-width: 1024px) {
  .menu-toggle {
    display: none !important;
  }
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.menu-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ---- Mobile full-screen menu ---- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 100px 24px 40px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-menu nav,
.mobile-menu .mobile-nav-list {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  text-align: center;
}

ul.mobile-nav-list {
  list-style: none !important;
  margin: 0 0 2rem !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

ul.mobile-nav-list li {
  list-style: none;
  margin: 0;
  padding: 0;
}

ul.mobile-nav-list a {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  color: #000;
  text-decoration: none;
  letter-spacing: 0.04em;
}

.mobile-menu .btn {
  margin-top: 0.5rem;
}

/* ==========================================================================
   Containers & sections
   ========================================================================== */
.container {
  width: 100%;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
}

@media (min-width: 768px) {
  .container {
    padding-left: 40px;
    padding-right: 40px;
  }
}

.container--narrow {
  max-width: 800px;
}

.section {
  padding: 80px 0;
  width: 100%;
}

@media (min-width: 768px) {
  .section {
    padding: 100px 0;
  }
}

.section-header,
.section-heading {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem;
}

.section-header h2,
.section-heading h2 {
  margin: 0 0 0.75rem;
}

.section-header p,
.section-heading p {
  margin: 0;
  color: #777;
}

/* ==========================================================================
   Icons – never oversized
   ========================================================================== */
.feature-card__icon {
  width: 48px !important;
  height: 48px !important;
  max-width: 48px;
  margin: 0 auto 1.25rem;
  color: #C9A227;
}

.feature-card__icon svg {
  width: 48px !important;
  height: 48px !important;
  display: block;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.25;
}

.whatsapp-float {
  width: 56px !important;
  height: 56px !important;
  max-width: 56px;
  max-height: 56px;
  overflow: hidden;
}

.whatsapp-float svg {
  width: 28px !important;
  height: 28px !important;
  display: block;
  flex-shrink: 0;
}

/* Social footer pills */
.footer-social a {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

/* ==========================================================================
   Grids
   ========================================================================== */
.services-grid,
.nelnelsa-services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  width: 100%;
  align-items: stretch;
}

@media (min-width: 640px) {
  .services-grid,
  .nelnelsa-services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .services-grid,
  .nelnelsa-services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}

.service-card,
.nelnelsa-service-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.service-card__image,
.nelnelsa-service-card__image {
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.service-card__image img,
.nelnelsa-service-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.service-card__body,
.nelnelsa-service-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .category-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.category-card img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  display: block;
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .features-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

.feature-card {
  text-align: center;
  padding: 1.5rem 1rem;
}

/* About two-column */
.about-preview {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

@media (min-width: 900px) {
  .about-preview {
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
  }
}

.about-preview__image img {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

/* Footer */
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 640px) {
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
  }
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   Page hero / content
   ========================================================================== */
.page-hero {
  padding: 140px 0 70px !important;
  text-align: center;
}

.page-hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Booking centred */
.nelnelsa-booking-app,
#nelnelsa-booking-app,
.booking-container {
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* Hero CTA buttons */
.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

@media (max-width: 600px) {
  .hero__actions {
    flex-direction: column;
    align-items: stretch;
  }

  .hero__actions .btn {
    width: 100%;
    text-align: center;
  }
}

/* Text utilities */
.text-center {
  text-align: center;
}

.text-muted {
  color: #777;
}
