/* ==========================================================================
   Rochester School of Fitness — Site Styles
   ========================================================================== */

:root {
  --rsf-primary: #d05000;       /* RSF orange — main brand color */
  --rsf-primary-dark: #a83e00;
  --rsf-navy: #1b3a6b;          /* navy blue */
  --rsf-navy-dark: #122952;
  --rsf-bg: #f5f7fa;
  --rsf-bg-alt: #fff3ed;        /* warm orange tint for alternating sections */
  --rsf-text: #1a2535;
  --rsf-text-light: #5a6a82;
  --rsf-white: #ffffff;
  --rsf-border: #e0d5cc;
  --rsf-shadow: 0 4px 20px rgba(232, 99, 0, 0.10);
  --rsf-radius: 10px;
  --rsf-max-width: 1180px;
  --rsf-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--rsf-font);
  color: var(--rsf-text);
  background: var(--rsf-bg);
  line-height: 1.65;
  font-size: 17px;
}

img { max-width: 100%; display: block; border-radius: var(--rsf-radius); }

a { color: var(--rsf-navy); text-decoration: none; }
a:hover, a:focus { text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--rsf-primary-dark); }

h1, h2, h3, h4 { font-family: var(--rsf-font); font-weight: 700; line-height: 1.25; color: var(--rsf-navy-dark); margin: 0 0 0.6em; }
h1 { font-size: 2.6rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1em; }
ul { padding-left: 1.3em; }
li { margin-bottom: 0.4em; }

.container {
  max-width: var(--rsf-max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--rsf-navy);
  color: #fff;
  padding: 8px 16px;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

/* ---------------------------------------------------------------------- */
/* Header / Navigation                                                     */
/* ---------------------------------------------------------------------- */

.site-header {
  background: var(--rsf-primary);
  border-bottom: 3px solid var(--rsf-primary-dark);
  position: sticky;
  top: 0;
  z-index: 500;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: var(--rsf-max-width);
  margin: 0 auto;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  color: #fff;
  font-size: 1.1rem;
}
.brand img { height: 56px; width: auto; border-radius: 0; }
.brand small { display: block; font-weight: 400; font-size: 0.75rem; color: rgba(255,255,255,0.85); }

.main-nav { display: flex; align-items: center; gap: 4px; flex: 1; justify-content: center; }
.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.main-nav li { position: relative; margin: 0; }
.main-nav > ul > li > a {
  display: block;
  padding: 12px 14px;
  font-weight: 600;
  font-size: 0.95rem;
  color: rgba(255,255,255,0.92);
  border-radius: 6px;
}
.main-nav > ul > li > a:hover,
.main-nav > ul > li.active > a { color: #fff; background: rgba(0,0,0,0.18); }

.has-dropdown .dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--rsf-white);
  box-shadow: var(--rsf-shadow);
  border-radius: var(--rsf-radius);
  padding: 8px;
  min-width: 240px;
  list-style: none;
  z-index: 600;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown { display: block; }
.dropdown li a {
  display: block;
  padding: 9px 12px;
  font-size: 0.92rem;
  border-radius: 6px;
  color: var(--rsf-text);
}
.dropdown li a:hover { background: var(--rsf-bg-alt); color: var(--rsf-primary-dark); }

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  background: none;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 1.1rem;
  cursor: pointer;
  color: #fff;
}

@media (max-width: 980px) {
  .nav-toggle { display: inline-flex; }
  .main-nav {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    order: 3;
    background: var(--rsf-primary-dark);
    border-radius: 0 0 var(--rsf-radius) var(--rsf-radius);
    padding: 8px 0;
  }
  .main-nav.open { display: flex; }
  .main-nav ul { flex-direction: column; width: 100%; }
  .has-dropdown .dropdown { position: static; display: none; box-shadow: none; background: rgba(0,0,0,0.1); }
  .has-dropdown.open .dropdown { display: block; }
  .header-inner { flex-wrap: wrap; }
}

/* ---------------------------------------------------------------------- */
/* Buttons                                                                 */
/* ---------------------------------------------------------------------- */

.btn {
  display: inline-block;
  font-weight: 700;
  text-align: center;
  padding: 13px 26px;
  border-radius: 6px;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 0.98rem;
  transition: all 0.15s ease;
}
.btn-primary { background: var(--rsf-navy); color: #fff; }
.btn-primary:hover { background: var(--rsf-navy-dark); color: #fff; }
.btn-outline { background: transparent; border-color: #fff; color: #fff; }
.btn-outline:hover { background: rgba(255,255,255,0.15); color: #fff; }
.btn-light { background: #fff; color: var(--rsf-navy); }
.btn-light:hover { background: var(--rsf-bg-alt); color: var(--rsf-navy); }
.btn-orange { background: var(--rsf-primary); color: #fff; }
.btn-orange:hover { background: var(--rsf-primary-dark); color: #fff; }

/* ---------------------------------------------------------------------- */
/* Hero                                                                    */
/* ---------------------------------------------------------------------- */

.hero {
  background: linear-gradient(135deg, var(--rsf-primary) 0%, var(--rsf-primary-dark) 100%);
  color: #fff;
  padding: 64px 0;
}
.hero .container { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero h1 { color: #fff; font-size: 2.4rem; }
.hero p { color: rgba(255,255,255,0.9); font-size: 1.1rem; }
.hero img { border-radius: var(--rsf-radius); box-shadow: var(--rsf-shadow); }
.hero .btn-primary { margin-right: 10px; }

@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.9rem; }
}

.page-hero {
  background: linear-gradient(135deg, var(--rsf-primary) 0%, var(--rsf-primary-dark) 100%);
  color: #fff;
  padding: 56px 0;
  text-align: center;
}
.page-hero h1 { color: #fff; margin-bottom: 0.3em; }
.page-hero p { color: rgba(255,255,255,0.9); font-size: 1.1rem; max-width: 760px; margin: 0 auto; }

/* ---------------------------------------------------------------------- */
/* Sections / Cards                                                        */
/* ---------------------------------------------------------------------- */

.section { padding: 60px 0; }
.section-alt { background: var(--rsf-bg-alt); }
.section-header { text-align: center; max-width: 760px; margin: 0 auto 40px; }
.section-header p { color: var(--rsf-text-light); }

.grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card {
  background: var(--rsf-white);
  border-radius: var(--rsf-radius);
  padding: 28px;
  box-shadow: var(--rsf-shadow);
  border: 1px solid var(--rsf-border);
}
.card h3 { margin-bottom: 0.4em; }
.card .tag {
  display: inline-block;
  background: var(--rsf-bg-alt);
  color: var(--rsf-primary-dark);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 860px) {
  .two-col { grid-template-columns: 1fr; }
}

.callout {
  background: var(--rsf-navy);
  color: #fff;
  border-radius: var(--rsf-radius);
  padding: 40px;
  text-align: center;
}
.callout h2 { color: #fff; }
.callout p { color: rgba(255,255,255,0.9); }

.rsf-video-wrap {
  max-width: 860px;
  margin: 0 auto;
  border-radius: var(--rsf-radius);
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(27,58,107,0.18);
}
.rsf-video-wrap video {
  width: 100%;
  height: auto;
  display: block;
  background: #000;
}

/* Photo mosaic grid — used on homepage */
.photo-mosaic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.photo-mosaic img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--rsf-radius);
  display: block;
}
@media (max-width: 860px) {
  .photo-mosaic { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .photo-mosaic { grid-template-columns: 1fr 1fr; }
  .photo-mosaic img { height: 160px; }
}

.disclaimer {
  font-size: 0.88rem;
  color: var(--rsf-text-light);
  background: var(--rsf-bg-alt);
  border-left: 4px solid var(--rsf-primary);
  padding: 14px 18px;
  border-radius: 6px;
  margin: 24px 0;
}

.faq dt { font-weight: 700; margin-top: 16px; color: var(--rsf-navy-dark); }
.faq dd { margin: 4px 0 0; color: var(--rsf-text); }

/* ---------------------------------------------------------------------- */
/* Forms                                                                   */
/* ---------------------------------------------------------------------- */

.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
label { font-weight: 600; font-size: 0.92rem; }
input, select, textarea {
  font-family: var(--rsf-font);
  font-size: 1rem;
  padding: 11px 12px;
  border: 1px solid var(--rsf-border);
  border-radius: 6px;
  background: #fff;
  color: var(--rsf-text);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--rsf-primary); outline-offset: 1px; }
.form-note { font-size: 0.85rem; color: var(--rsf-text-light); }
.form-success {
  display: none;
  background: #fff3ed;
  border: 1px solid var(--rsf-primary);
  color: var(--rsf-navy-dark);
  padding: 14px 18px;
  border-radius: 6px;
  margin-top: 16px;
}

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */

.site-footer {
  background: var(--rsf-navy);
  color: rgba(255,255,255,0.85);
  padding: 48px 0 24px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  margin-bottom: 24px;
}
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 0.8em; }
.site-footer a { color: rgba(255,255,255,0.85); }
.site-footer a:hover { color: var(--rsf-primary-dark); }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.footer-social { display: flex; gap: 12px; margin-top: 12px; }
.footer-social img { width: 28px; height: 28px; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 18px;
  font-size: 0.85rem;
  text-align: center;
  color: rgba(255,255,255,0.6);
}

/* ---------------------------------------------------------------------- */
/* Chat Widget                                                             */
/* ---------------------------------------------------------------------- */

#rsf-chat-launcher {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 9999;
  background: var(--rsf-primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 16px 22px;
  font-weight: 700;
  font-size: 0.98rem;
  box-shadow: 0 6px 24px rgba(0,0,0,0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
}
#rsf-chat-launcher:hover { background: var(--rsf-primary-dark); }

#rsf-chat-window {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 9999;
  width: 380px;
  max-width: calc(100vw - 32px);
  height: 600px;
  max-height: calc(100vh - 100px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
  display: none;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--rsf-font);
}
#rsf-chat-window.open { display: flex; }

#rsf-chat-header {
  background: var(--rsf-primary);
  color: #fff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
#rsf-chat-header .title { font-weight: 700; font-size: 1rem; }
#rsf-chat-header .subtitle { font-size: 0.78rem; color: rgba(255,255,255,0.8); }
#rsf-chat-close {
  background: none; border: none; color: #fff; font-size: 1.3rem; cursor: pointer; line-height: 1;
}

#rsf-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background: var(--rsf-bg);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.rsf-msg { max-width: 85%; padding: 10px 14px; border-radius: 12px; font-size: 0.92rem; line-height: 1.5; white-space: pre-wrap; }
.rsf-msg.bot { background: #fff; border: 1px solid var(--rsf-border); align-self: flex-start; border-bottom-left-radius: 2px; }
.rsf-msg.user { background: var(--rsf-navy); color: #fff; align-self: flex-end; border-bottom-right-radius: 2px; }
.rsf-msg.typing { font-style: italic; color: var(--rsf-text-light); background: transparent; border: none; padding: 0 4px; }

.rsf-quick-replies { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
.rsf-quick-reply {
  background: var(--rsf-bg-alt);
  border: 1px solid var(--rsf-border);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--rsf-navy-dark);
}
.rsf-quick-reply:hover { background: var(--rsf-primary); color: #fff; border-color: var(--rsf-primary-dark); }

#rsf-chat-input-row {
  display: flex;
  border-top: 1px solid var(--rsf-border);
  padding: 10px;
  gap: 8px;
  background: #fff;
}
#rsf-chat-input {
  flex: 1;
  border: 1px solid var(--rsf-border);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 0.92rem;
}
#rsf-chat-send {
  background: var(--rsf-primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
}
#rsf-chat-send:disabled { opacity: 0.5; cursor: default; }

#rsf-chat-mic {
  background: var(--rsf-navy);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
#rsf-chat-mic:hover { background: var(--rsf-navy-dark); }
#rsf-chat-mic.listening {
  background: #c0392b;
  animation: mic-pulse 1s ease-in-out infinite;
}
#rsf-chat-mic.unsupported { display: none; }

.rsf-msg.bot { display: flex; flex-direction: column; }
.rsf-msg-text { white-space: pre-wrap; }

/* Voice reply toggle — same size/shape as the mic button */
#rsf-chat-voice-toggle {
  background: var(--rsf-navy);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 42px;
  height: 42px;
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
}
#rsf-chat-voice-toggle:hover { background: var(--rsf-navy-dark); }
#rsf-chat-voice-toggle.active { background: var(--rsf-primary-dark); }
#rsf-chat-voice-toggle.speaking {
  background: #c0392b;
  animation: mic-pulse 1s ease-in-out infinite;
}
#rsf-chat-voice-toggle.unsupported { display: none; }

@keyframes mic-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(192,57,43,0.4); }
  50% { transform: scale(1.12); box-shadow: 0 0 0 8px rgba(192,57,43,0); }
}

#rsf-chat-disclaimer {
  font-size: 0.72rem;
  color: var(--rsf-text-light);
  padding: 6px 14px 10px;
  text-align: center;
  background: #fff;
}

/* Inline lead form rendered inside the chat */
.rsf-lead-form {
  background: #fff;
  border: 1px solid var(--rsf-border);
  border-radius: 10px;
  padding: 14px;
  align-self: stretch;
}
.rsf-lead-form h4 { margin: 0 0 8px; font-size: 0.95rem; }
.rsf-lead-form .form-field { margin-bottom: 10px; }
.rsf-lead-form label { font-size: 0.82rem; }
.rsf-lead-form input, .rsf-lead-form select { font-size: 0.88rem; padding: 8px 10px; }
.rsf-lead-form button { width: 100%; }

@media (max-width: 480px) {
  #rsf-chat-window { width: 100vw; height: 100vh; max-height: 100vh; right: 0; bottom: 0; border-radius: 0; }
}

/* ---------------------------------------------------------------------- */
/* 20th Anniversary Banner                                                  */
/* ---------------------------------------------------------------------- */

.anniversary-bar {
  background: linear-gradient(135deg, #b8860b 0%, #d4a843 35%, #f0c040 50%, #d4a843 65%, #b8860b 100%);
  color: #3a2000;
  text-align: center;
  padding: 12px 20px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  border-bottom: 2px solid #a07010;
}
.anniversary-bar a { color: #3a2000; text-decoration: underline; }
.anniversary-bar a:hover { color: #6a3800; }

.anniversary-section {
  background: linear-gradient(135deg, #fff9ed 0%, #fffcf5 50%, #fff9ed 100%);
  border-top: 4px solid #d4a843;
  border-bottom: 4px solid #d4a843;
}
.anniversary-callout {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  padding: 12px 0;
}
.anniversary-badge {
  display: inline-block;
  background: linear-gradient(135deg, #b8860b, #d4a843, #b8860b);
  color: #fff;
  border-radius: 50px;
  padding: 8px 32px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 20px;
  box-shadow: 0 3px 12px rgba(180, 130, 10, 0.35);
}
.anniversary-callout h2 {
  color: #7a4e00;
  font-size: 2rem;
  margin-bottom: 16px;
}
.anniversary-callout p {
  color: #5a3800;
  font-size: 1.05rem;
  line-height: 1.7;
}
.anniversary-years {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin: 28px 0;
  flex-wrap: wrap;
}
.anniversary-year-block {
  text-align: center;
}
.anniversary-year-block .year-number {
  font-size: 2.2rem;
  font-weight: 900;
  color: #b8860b;
  line-height: 1;
}
.anniversary-year-block .year-label {
  font-size: 0.8rem;
  color: #7a4e00;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 4px;
}

/* ---------------------------------------------------------------------- */
/* Before / After Transformations                                            */
/* ---------------------------------------------------------------------- */

.transformation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 36px;
  margin-top: 24px;
}
.transformation-card {
  background: #fff;
  border-radius: var(--rsf-radius);
  overflow: hidden;
  box-shadow: var(--rsf-shadow);
  border: 1px solid var(--rsf-border);
}
.transformation-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 0;
  display: block;
}
.transformation-body {
  padding: 24px;
}
.transformation-body h3 { margin-bottom: 8px; font-size: 1.2rem; }
.transformation-body p { color: var(--rsf-text-light); font-size: 0.95rem; line-height: 1.65; margin-bottom: 0; }

@media (max-width: 600px) {
  .anniversary-years { gap: 24px; }
  .anniversary-callout h2 { font-size: 1.5rem; }
}

/* ---------------------------------------------------------------------- */
/* Success Story Card                                                       */
/* ---------------------------------------------------------------------- */

.story-card {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 40px;
  background: #fff;
  border-radius: var(--rsf-radius);
  overflow: hidden;
  box-shadow: var(--rsf-shadow);
}
.story-card-img img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  border-radius: 0;
}
.story-card-body {
  padding: 36px 36px 36px 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.story-card-body h3 { font-size: 1.55rem; margin-bottom: 12px; }
.story-card-body p { color: var(--rsf-text-light); line-height: 1.7; }
@media (max-width: 760px) {
  .story-card { grid-template-columns: 1fr; }
  .story-card-img img { min-height: 220px; max-height: 280px; }
  .story-card-body { padding: 24px; }
}
