/*
Theme Name: Pilates by Jess
Theme URI: https://pilatesbyjess.com
Author: Cutty Creative Digital
Description: Custom Pilates by Jess theme with WPBakery support, customizable colors, header logo, and widgetized/footer-layout footer.
Version: 1.1.3
Text Domain: pilates-by-jess
*/

/* =========================
   ROOT VARIABLES
   ========================= */

:root {
  /* Default colors – can be overridden by Customizer via inline CSS */
  --pbj-primary: #9bbcad;
  --pbj-accent: #4b5563;
  --pbj-background: #f5f5f7;
  --pbj-text: #111827;
}

/* =========================
   RESET & BASE
   ========================= */

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--pbj-background);
  color: var(--pbj-text);
  line-height: 1.6;
}

/* Links */
a {
  color: var(--pbj-primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout wrappers */
.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1 0 auto;
}

/* =========================
   HEADER + NAV
   ========================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
}

.site-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

/* Logo / branding */
.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Custom logo sizing */
.custom-logo-link img,
.site-logo img,
.site-branding img {
  display: block;
  height: auto;
  width: auto;
  max-height: 100px; /* adjust this to change logo height */
}

.footer-logo img {
  max-height: 70px;
  width: auto;
}


/* Site title if logo not set */
.site-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  color: var(--pbj-accent);
}

.site-title a {
  color: inherit;
}

/* NAV WRAPPER */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1;
  position: relative;
}

/* MOBILE TOGGLE BUTTON */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: #ffffff;
  cursor: pointer;
  padding: 0;
}

.nav-toggle:focus {
  outline: 2px solid var(--pbj-primary);
  outline-offset: 2px;
}

.nav-toggle-bars {
  position: relative;
  width: 18px;
  height: 2px;
  background: #0f172a;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.nav-toggle-bars::before,
.nav-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: #0f172a;
  border-radius: 999px;
  transition:
    transform 0.2s ease,
    top 0.2s ease,
    bottom 0.2s ease,
    opacity 0.2s ease;
}

.nav-toggle-bars::before {
  top: -6px;
}

.nav-toggle-bars::after {
  bottom: -6px;
}

/* When nav is open */
.nav-toggle.is-open .nav-toggle-bars {
  background: transparent;
}

.nav-toggle.is-open .nav-toggle-bars::before {
  top: 0;
  transform: rotate(45deg);
}

.nav-toggle.is-open .nav-toggle-bars::after {
  bottom: 0;
  transform: rotate(-45deg);
}

/* MENU WRAPPER */
.primary-menu-wrapper {
  display: flex;
}

/* Desktop menu styling */
.primary-menu {
  list-style: none;
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 0;
}

.primary-menu > li > a {
  font-size: 0.95rem;
  color: #374151;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}

.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a,
.primary-menu > li.current_page_item > a {
  border-bottom-color: var(--pbj-primary);
  text-decoration: none;
}

/* =========================
   HEADER / NAV – MOBILE
   ========================= */

@media (max-width: 768px) {
  .site-header-inner {
    flex-wrap: nowrap;
    justify-content: space-between;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .primary-menu-wrapper {
    display: none; /* hidden by default on mobile */
    position: absolute;
    top: 100%;
    right: 20px;
    left: 20px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.15);
    padding: 12px 16px;
    margin-top: 8px;
  }

  .primary-menu-wrapper.is-open {
    display: block;
  }

  .primary-menu {
    flex-direction: column;
    gap: 8px;
  }

  .primary-menu > li > a {
    padding: 4px 0;
    display: block;
  }
}

/* =========================
   MAIN CONTENT
   ========================= */

.site-main-inner {
  /* WPBakery rows control actual layout */
}

/* Optional general section pattern */
.pbj-section {
  padding: 80px 0;
}

.pbj-section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (max-width: 768px) {
  .pbj-section {
    padding: 48px 0;
  }

  .pbj-section-inner {
    padding: 0 24px;
  }
}

/* =========================
   FOOTER – SHARED
   ========================= */

.site-footer {
  margin-top: 40px;
  background: #020617;
  color: #e5e7eb;
  flex-shrink: 0;
}

/* Bottom bar – used by BOTH widget footer and WPBakery footer */
.footer-bottom {
  max-width: 1100px;
  margin: 24px auto 0;
  padding-top: 16px;
  padding-bottom: 24px;
  border-top: 1px solid rgba(148, 163, 184, 0.4);
  font-size: 0.75rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  color: #6b7280;
}

/* =========================
   FOOTER – WIDGET FALLBACK
   (used if no `footer-layout` page)
   ========================= */

.footer-widgets {
  padding: 40px 20px 24px;
}

.footer-widgets-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr) minmax(0, 1.5fr);
  gap: 32px;
  align-items: flex-start;
}

/* Footer widgets */
.footer-widget {
  font-size: 0.85rem;
  color: #9ca3af;
}

.footer-widget h2,
.footer-widget h3,
.footer-widget h4 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 0.9rem;
  color: #e5e7eb;
}

.footer-widget p {
  margin: 0 0 8px;
}

.footer-widget a {
  color: #e5e7eb;
  text-decoration: underline;
}

.footer-widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-widget ul li {
  margin-bottom: 4px;
}

/* =========================
   FOOTER – WPBAKERY TEMPLATE
   (used when `footer-layout` page exists)
   ========================= */

.footer-wpb {
  background: #020617;
  color: #e5e7eb;
  padding: 40px 20px 24px;
}

/* Top row container for WPBakery footer HTML */
.footer-row {
  max-width: 1100px;
  margin: 0 auto;
}

/* Make the top footer row a clean 3-column grid on desktop */
.footer-row--top {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr) minmax(0, 1.5fr);
  gap: 32px;
  align-items: flex-start;
}

/* Columns */
.footer-col {
  font-size: 0.85rem;
  color: #9ca3af;
}

.footer-col h4 {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: #e5e7eb;
}

.footer-col p {
  margin: 0 0 8px;
}

.footer-col a {
  color: #e5e7eb;
  text-decoration: underline;
}

/* Quick links list */
.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 4px;
}

/* =========================
   FOOTER – MOBILE
   ========================= */

@media (max-width: 768px) {
  .footer-widgets-inner {
    grid-template-columns: 1fr;
  }

  .footer-row--top {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================
   INTERIOR HERO & CONTENT
   ========================= */

.interior-hero-row {
  height: 360px;
  background-size: cover !important;
  background-position: center center !important;
  display: flex;
  align-items: center;
}

@media (max-width: 768px) {
  .interior-hero-row {
    height: 220px;
    background-position: center top !important;
  }
}

/* Content container styling */
.interior-content {
  max-width: 1100px !important;
  margin: 0 auto !important;
  padding: 80px 20px;
}

@media (max-width: 768px) {
  .interior-content {
    padding: 40px 24px; /* slightly more padding on mobile */
  }
}

/* Typography scaling */
.interior-content h1,
.interior-content h2 {
  line-height: 1.2;
  margin-bottom: 20px;
}

@media (max-width: 768px) {
  .interior-content h1 {
    font-size: 28px;
  }

  .interior-content h2 {
    font-size: 22px;
  }

  .interior-content p {
    font-size: 15px;
    line-height: 1.55;
  }
}

/* =========================
   WPBAKERY ROW ADJUSTMENTS
   ========================= */

/* Keep rows centered */
.vc_row {
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Default mobile padding for all columns – prevents content from
   hitting the screen edge on phones */
@media (max-width: 768px) {
  .vc_row .vc_column_container {
    padding-left: 12px !important;
    padding-right: 12px !important;
  }
}

/* Utility: use this on rows that should be true edge-to-edge (hero images, etc.)
   Add "pbj-edge-to-edge" as an extra class on the WPBakery row */
.vc_row.pbj-edge-to-edge .vc_column_container {
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Optional utility: extra safe padding only on mobile
   Add "pbj-mobile-pad" as an extra class where needed */
@media (max-width: 768px) {
  .pbj-mobile-pad {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
}

/* =========================
   WHY CLIENTS LOVE PBJ
   ========================= */

.why-clients-row .why-card {
  border-radius: 18px;
}

/* Add safe side padding to the "Why Clients Love" row on mobile
   so the pink cards don't touch the screen edges */
@media (max-width: 768px) {
  .why-clients-row {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}

/* Mobile: make the cards "squeeze" and feel lighter */
@media (max-width: 768px) {
  /* Center the whole block and stop it from stretching full width */
  .why-clients-row .wpb_column {
    max-width: 240px;
    margin-left: auto;
    margin-right: auto;
  }

  /* Card padding + text sizing */
  .why-clients-row .why-card {
    padding: 14px 16px !important;
    max-width: 100%;
  }

  .why-clients-row .why-card h4 {
    font-size: 15px !important;
    margin-bottom: 6px;
  }

  .why-clients-row .why-card p {
    font-size: 13px !important;
    line-height: 1.45;
  }

  /* Reduce vertical spacing between cards */
  .why-clients-row .wpb_column + .wpb_column {
    margin-top: 16px;
  }
}

/* =========================
   UTILITIES
   ========================= */

.text-center {
  text-align: center;
}

/* Reusable safe-padding utility for any row/section on mobile
   Add class "pbj-safe" in WPBakery extra class field */
@media (max-width: 768px) {
  .pbj-safe {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }
}
