/*
Theme Name: CalistFitness OnePage Website
Theme URI: https://example.com
Author: Ondrej Hruby
Description: Custom one-page WordPress theme for CalistFitness
Version: 1.0
Text Domain: calistfitness-onepage
*/

:root{
  --primary:#0184d6;
  --accent:#32a7ef;
  --text:#222;
  --muted:#666;
  --bg:#f3f3f3;
  --maxw:1100px;
}

/* Reset-ish */
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", sans-serif;
  color:var(--text);
  background:var(--bg);
  line-height:1.6;
  scroll-behavior:smooth;
}
h1, h2, h3, h4, h5, h6, .cta-btn, .btn {
  font-family: 
    "Roboto Condensed", 
    "Roboto", 
    -apple-system, 
    BlinkMacSystemFont, 
    "Segoe UI", 
    Helvetica, 
    Arial, 
    sans-serif;
  font-weight: 700; /* adjust as needed */
  line-height: 1.2;
}
h2 {
	color: #1f1f1f
}

/* Header / Nav */
header#main-header{
  position:fixed;left:0;top:0;width:100%;
  background:rgba(0,0,0,0.8); /* 80% opacity */
  backdrop-filter:saturate(120%) blur(6px);
  transition: background 0.25s ease, box-shadow 0.25s ease;
  z-index:9999;
}
header#main-header.transparent{
  /* becomes more transparent as you scroll (handled by JS) */
	background: rgba(0,0,0,.33) !important;
}
#main-header.transparent .nav-link { opacity: .8; }
#main-header.transparent .logo { opacity: .9; }

/* optional: mobile menu when toggled */
.primary-nav.is-open { display: flex; }

#main-header .header-inner {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}
#main-header .primary-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  margin-left: auto; /* pushes the whole nav to the right of the logo */
}

/* regular links */
#main-header .nav-link {
  text-decoration: none;
  font-weight: 600;
  color: #fff;
  opacity: .9;
}
#main-header .nav-link:hover,
#main-header .nav-link:focus-visible { opacity: 1; }

/* CTA button */
#main-header .cta-button {
  margin-left: auto;                 /* pushes CTA to the far right within the nav */
  padding: .65rem 1.25rem;
  border-radius: 9999px;
  background: linear-gradient(180deg, #22a8ff 0%, #0c74d9 100%);
  color: #fff !important;
  box-shadow: 
    0 6px 14px rgba(12,116,217,.3),   /* existing shadow */
    0 0 12px rgba(50,167,239,.5),     /* subtle glow */
    0 0 24px rgba(50,167,239,.35);    /* extended glow */
  border: 0;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}
#main-header .cta-button:hover,
#main-header .cta-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(12,116,217,.4), 
    0 0 18px rgba(50,167,239,.7), 
    0 0 32px rgba(50,167,239,.55);
  opacity: 1;
}

/* nice scrolling + fixed-header offset safety */
html { scroll-behavior: smooth; }
#main-header { --header-h: 80px; }           /* adjust to your actual header height */
#consultation { scroll-margin-top: calc(var(--header-h) + 12px); }

/* mobile menu basics (if you collapse to a vertical nav) */
@media (max-width: 768px) {
  #main-header .primary-nav {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  #main-header .cta-button {
    margin-left: 0;
    width: 100%;
    text-align: center;
  }
}
.header-inner{
  max-width:var(--maxw);
  margin:auto;
  display:flex;align-items:center;justify-content:space-between;
  padding:14px 18px;
}
.logo{
  display:flex;align-items:center;gap:10px;color:#fff;text-decoration:none;font-weight:800;letter-spacing:.5px}
.logo-img{ height:28px; width:auto; display:block; }
  .logo span{font-size:18px}
nav.primary-nav a{
  color:#fff;text-decoration:none;font-weight:700;margin:0 12px;position:relative}
nav.primary-nav a:hover,nav.primary-nav a:focus{color:var(--accent)}
nav.primary-nav a.active::after{
  content:"";position:absolute;left:0;right:0;bottom:-6px;height:2px;background:var(--accent);border-radius:2px
}
.mobile-toggle{display:none;background:transparent;border:0;color:#fff;font-size:28px}

/* Keyframes for the reveal */
@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(2px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

/* Hero */
.hero{
  position: relative;              /* create stacking context for overlay */
  isolation: isolate;              /* keeps overlay behind the text */
  min-height:100vh;
  background-color:#0b1d2a;
  background-position:center;
  background-size:cover;
  background-repeat:no-repeat;
  display:flex;align-items:center;justify-content:center;flex-direction:column;
  color:#fff;text-align:center;padding:0 20px;
}
.hero::after{
  content:"";
  position:absolute; inset:0;
  background: linear-gradient(180deg, rgba(0,0,0,.45), rgba(0,0,0,.55)); /* tweak strength */
  z-index:-1;                       /* sits between bg image and text */
}
.hero h1{font-size: clamp(62px, 6vw, 114px);margin:0 0 8px;font-weight:900;letter-spacing:.5px}
.hero h2{font-size: clamp(26px, 3vw, 36px);font-weight:500;margin:0 0 16px;color:#fff}
.hero h3{font-size: 22px}

a.cta-btn, .cta-btn{
  display:inline-block;
  margin-top:14px;
  padding:14px 22px;
  border-radius:10px;
  border:0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  box-shadow: 0 6px 14px rgba(12,116,217,.3),   /* existing shadow */
    0 0 12px rgba(50,167,239,.5),     /* subtle glow */
    0 0 24px rgba(50,167,239,.35);    /* extended glow */
  color:#fff !important;
  font-size:18px;
  font-weight:800;
  text-decoration:none;
  cursor:pointer;
}
a.cta-btn:hover, .cta-btn:hover{ transform: translateY(-1px); box-shadow: 
    0 8px 18px rgba(12,116,217,.4), 
    0 0 18px rgba(50,167,239,.7), 
    0 0 32px rgba(50,167,239,.55);
  opacity: 1;}

/* Sections */
.section{padding:90px 20px}
.container{max-width:var(--maxw);margin:0 auto}
.section h2{
  font-size: clamp(26px, 4vw, 40px);
  margin:0 0 22px;color: #1f1f1f;font-weight:900;letter-spacing:.4px;text-align:center
}
.section p.lead{max-width:800px;margin:0 auto 24px;color:var(--muted);text-align:center}

/* Why Choose Us */
.features{
  display: grid;
  gap: 24px;
  justify-content: center;                    /* center the whole grid */
  grid-template-columns: repeat(1, minmax(280px, 340px));  /* 1 column on mobile */
}

/* Exactly 2 columns on tablet/desktop */
@media (min-width: 820px){
  .features{
    grid-template-columns: repeat(2, minmax(300px, 360px)); /* 2 columns */
  }
  /* reset any earlier stagger overrides */
  .features .feature{ grid-column: auto; }
  .features .feature:nth-last-child(2),
  .features .feature:last-child{ grid-column-start: auto; }
}

/* Card look + hover micro-interaction */
.feature{
  width: 100%;
  max-width: 360px;                           /* keeps tiles compact */
  text-align: center;
  border: 2px solid rgba(1,132,214,.12);      /* subtle brand-colored border */
  border-radius: 16px;
  padding: 22px 20px;
  background: #f9fcff;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  will-change: transform;
}
.feature:hover{
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 14px 30px rgba(1,132,214,.18);
  border-color: rgba(50,167,239,.35);         /* accent on hover */
}

.feature h3{
  margin: 12px 0 6px;
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);                      /* #0184d6 */
}

.feature p{margin:0;color:#333;font-size:14px}
.feature .icon{
  width:56px;
  height:56px;
  display:block;
  margin:0 auto 12px;
  flex:0 0 56px;               /* keeps layout steady */
}

/* <img> version (SVG/PNG/WebP). Size only, no color change. */
.feature img{
  object-fit:contain;
}

/* Inline <svg> version — inherits color for easy theming */
.feature svg.icon{
  color:#111;                  /* base color */
}

/* .feature:hover svg.icon{  
color:#0184d6;            
} */

svg.icon [fill]:not([fill="none"]){ fill: currentColor; }
svg.icon [stroke]:not([stroke="none"]){ stroke: currentColor; }

/* Optional: ensure smoother rendering for thin strokes */
svg.icon{ shape-rendering: geometricPrecision; }

.lead {
  margin-bottom: 40px;
  font-size: 18px;
  color: #444;
}
.subtitle {
  margin-bottom: 40px;
  font-size: 21px;
  color: #444;
}
/* Transformations & Testimonials */
.cards{
  display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:24px
}
.client-card{
  border:1px solid #e8eef5;border-radius:14px;padding:16px;background:#fff;box-shadow:0 10px 24px rgba(0,0,0,.04)
}
.slider{
  position:relative;border-radius:12px;overflow:hidden;background:#000
}
.slider img{display:block;width:100%;height:auto}
.slider button{
  position:absolute;top:50%;transform:translateY(-50%);
  background:rgba(255,255,255,.85);border:0;width:36px;height:36px;border-radius:999px;cursor:pointer;font-weight:900
}
.slider button.prev{left:8px}
.slider button.next{right:8px}
.testimonial{margin-top:12px;font-style:italic;color:#333}
.client-name{font-weight:800;color:var(--primary);margin-top:4px}

/* Calendly */
.calendly-wrapper{max-width:900px;margin:0 auto;border:1px solid #e8eef5;border-radius:14px;overflow:hidden;box-shadow:0 10px 24px rgba(0,0,0,.04)}

/* About Me */

.about-grid.about-three{
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(320px, 1.3fr) minmax(240px, 1fr);
  gap: 28px;
  align-items: center;
}
/* Photos */
.about-media { display: flex; justify-content: center; }
.about-photo{
  width: 100%;
  max-width: 520px;
  height: auto;
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,.12);
  display: block;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-photo:hover {
  transform: scale(1.07); /* slight zoom */
  box-shadow: 0 16px 36px rgba(0,0,0,.18); /* stronger shadow on hover */
}

/* Center copy with decorative arrow behind it */
.with-arrow {
  position: relative;
  padding: clamp(16px, 3vw, 24px);
  z-index: 0;
}

.with-arrow .arrow-bg {
  position: absolute;
  top: 50%;                /* center vertically */
  left: 50%;
  transform: translate(-50%, -50%); /* perfect centering */
  width: 115%;             /* a bit wider than the text box */
  height: auto;            /* keep SVG aspect ratio */
  max-height: 70%;         /* don’t overwhelm text */
  color: var(--primary);
  opacity: .45;
  z-index: -1;
  pointer-events: none;
  filter: drop-shadow(0 6px 12px rgba(0,0,0,.08));
}

.with-arrow .arrow-bg path {
  fill: currentColor;
}

/* Typography tweaks inside center column */
.with-arrow h2{
  margin-top: 0;
  margin-bottom: 8px;
  text-align: left;              /* keep heading aligned with paragraphs */
}
.with-arrow .subtitle{
  margin-top: 0;
  margin-bottom: 16px;
  text-align: left;
}

/* Responsive stacking */
@media (max-width: 900px){
  .about-grid.about-three{
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .about-left { order: 1; }
  .with-arrow { order: 2; }
  .about-right { order: 3; }
  .with-arrow .arrow-bg{
    inset: -12px -12px -14px -12px;  /* tighter on phones */
  }
  .with-arrow h2, .with-arrow .subtitle{ text-align: center; }
  .with-arrow p{ text-align: left; }
}

@media (max-width: 520px){
  .about-photo{ max-width: 440px; }
}

@media (max-width: 900px){
  .with-arrow .arrow-bg{
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(90deg); /* keep center after rotation */
    width: 100%;       /* span text width */
    height: auto;      /* let aspect ratio scale */
    max-height: none;
    opacity: .45;
  }
}

/* Hybrid Trainings */
#hybrid .cta-btn{ margin-top:18px; }

blockquote {
  font-family: "Roboto", sans-serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(22px, 2vw, 35px);
  text-align: center;
  color: var(--text-secondary, #555);
  margin: 1rem auto;
  line-height: 1.4;
  max-width: none; /* remove width restriction */
   white-space: nowrap; /* force one line */ 
}

/* Contact */
.contact-grid{
  display:grid;grid-template-columns:1.2fr 1fr;gap:26px
}
@media (max-width:900px){.contact-grid{grid-template-columns:1fr}}
.contact-card{
  border:1px solid #e8eef5;border-radius:14px;padding:18px;background:#fff;box-shadow:0 10px 24px rgba(0,0,0,.04)
}
input[type=text],input[type=email],textarea{
  width:100%;padding:12px;border:1px solid #d7e7f6;border-radius:10px;font-size:16px
}
textarea{min-height:120px;resize:vertical}
.contact-card input[type="submit"],
.wpcf7 form input[type="submit"] {
  -webkit-appearance: none;
  appearance: none;
  display: inline-block;
  padding: 12px 18px;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  line-height: 1;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
  box-shadow: 0 6px 14px rgba(1,132,214,.25); /* subtle, not a glow */
}

/* Hover/focus state */
.contact-card input[type="submit"]:hover,
.contact-card input[type="submit"]:focus-visible,
.wpcf7 form input[type="submit"]:hover,
.wpcf7 form input[type="submit"]:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(1,132,214,.35);
  opacity: 1;
}

/* Disabled state while sending */
.wpcf7 form input[type="submit"]:disabled,
.contact-card input[type="submit"]:disabled {
  opacity: .6;
  cursor: not-allowed;
}
.social-icons {
  margin-top: 14px;
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

.social-icons a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f3f3f3;
  color: #444;
  transition: all 0.2s ease;
}

.social-icons a:hover {
  background: var(--primary);
  color: #fff;
}

.social-icons .icon {
  width: 20px;
  height: 20px;
}

/* Footer */
footer.site-footer{
  background:#292929;color:#fff;padding:28px 18px;text-align:center;margin-top:40px
}

/* Spacer for fixed header */
.spacer{height:72px}

/* Utility */
.hidden{display:none}

/* ========= Mobile/Tablet Optimizations ========= */

/* Fluid sizing helpers */
:root{
  --header-h: 80px;                /* desktop header height */
  --pad-section: clamp(56px, 7vw, 90px);
  --container-pad: clamp(14px, 3.6vw, 24px);
  --h1: clamp(32px, 7vw, 64px);
  --h2: clamp(22px, 4.6vw, 40px);
  --h3: clamp(18px, 3.8vw, 24px);
  --lead: clamp(16px, 2.6vw, 18px);
}

/* Use fluid paddings everywhere */
.section{ padding: var(--pad-section) var(--container-pad); }
.container{ padding: 0 var(--container-pad); }

/* Headings scale */
.hero h1{ font-size: var(--h1); }
.hero h2{ font-size: clamp(18px, 3.6vw, 28px); }
.hero h3{ font-size: var(--h3); }
.section h2{ font-size: var(--h2); }
.lead, .section p.lead{ font-size: var(--lead); }

/* Fixed-header offset that respects mobile chrome toolbars */
#consultation, section[id]{ scroll-margin-top: calc(var(--header-h) + 16px); }

/* Make header account for iOS notches and shrink on small screens */
header#main-header{
  padding-top: max(0px, env(safe-area-inset-top));
}
.header-inner{ padding: 12px var(--container-pad); }

/* Desktop nav stays inline */
@media (min-width: 901px){
  .mobile-toggle{ display:none; }
  #main-header .primary-nav{
    display:flex;
    position: static;
    height:auto; width:auto;
    background: transparent;
    box-shadow: none;
  }
}

/* Tablet/phone: show burger, convert nav to slide-down panel */
@media (max-width: 900px){
  :root{ --header-h: 64px; } /* smaller header on mobile */

  .mobile-toggle{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px; height: 42px;
    border-radius: 8px;
    background: rgba(255,255,255,.08);
    backdrop-filter: saturate(120%) blur(6px);
    cursor: pointer;
  }

  #main-header .primary-nav{
    position: absolute;
    top: 100%;
    right: 0; left: 0;
    display: none;                 /* hidden by default */
    flex-direction: column;
    gap: 0;
    background: rgba(15,15,15,.96);
    backdrop-filter: saturate(120%) blur(8px);
    padding: 10px var(--container-pad) max( env(safe-area-inset-bottom), 12px);
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  #main-header .primary-nav.is-open{ display: flex; }

  /* Larger tap targets */
  #main-header .nav-link, #main-header .cta-button{
    width: 100%;
    display: block;
    padding: 12px 4px;
    font-size: 16px;
  }
  #main-header .cta-button{
    margin-left: 0;
    text-align: center;
    margin-top: 4px;
  }
}

/* Spacer should match header height */
.spacer{ height: var(--header-h); }

/* Contain background and maintain contrast */
.hero{
  min-height: 100svh; /* handles mobile browser UI bars */
  padding-top: calc(var(--header-h) + 10px);
}

/* Mildly tighten spacing on very small phones */
@media (max-width: 420px){
  .hero h2{ margin-bottom: 10px; }
  .cta-btn{ width: 100%; }
}

/* Features: keep single column on phones, two on tablets (you already had this) */
.features{
  grid-template-columns: repeat(1, minmax(260px, 1fr));
}
@media (min-width: 768px){
  .features{
    grid-template-columns: repeat(2, minmax(300px, 1fr));
  }
}

/* Feature card: allow slightly wider on tablet/desktop */
.feature{
  max-width: 520px;
  margin-inline: auto;
}

/* Testimonials/cards grid already fluid; add small-gaps for phones */
@media (max-width: 540px){
  .cards{ gap: 16px; }
}

/* About section: image full width on mobile */
/* .about-photo{
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
} */
/* Input sizing for touch */
input[type=text], input[type=email], textarea{
  font-size: 16px;        /* prevents iOS zoom */
  padding: 14px 12px;
}

/* Buttons full-width on very small screens */
@media (max-width: 420px){
  button.btn, input[type=submit].btn{
    width: 100%;
  }
}

@media (max-width: 768px) {
  blockquote {
    white-space: normal; /* allow wrapping again */
    max-width: 28ch;     /* restore wrapping */
  }
}
/* Respect reduced motion */
@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
  html{ scroll-behavior: auto; }
}

/* Images are responsive by default */
img{ max-width: 100%; height: auto; }

/* Tighter hover effects on touch (optional) */
@media (hover: none){
  .feature:hover{ transform: none; box-shadow: none; }
}

/* ===== Scroll-driven section animations (CSS only) ===== */

/* Core keyframes */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(18px); filter: blur(2px); }
  to   { opacity: 1; transform: none;               filter: blur(0); }
}
@keyframes reveal-left {
  from { opacity: 0; transform: translateX(-24px); filter: blur(2px); }
  to   { opacity: 1; transform: none;              filter: blur(0); }
}
@keyframes reveal-right {
  from { opacity: 0; transform: translateX(24px); filter: blur(2px); }
  to   { opacity: 1; transform: none;             filter: blur(0); }
}

/* Base reveal utility – tie animation to viewport visibility */
.reveal {
  view-timeline-name: --reveal;
  view-timeline-axis: block;           /* vertical scroll */
  animation-timeline: --reveal;
  animation-fill-mode: both;
  will-change: transform, opacity, filter;
}

/* Variants */
.reveal-up    { animation-name: reveal-up;    animation-range: entry 0% cover 35%; }
.reveal-left  { animation-name: reveal-left;  animation-range: entry 0% cover 35%; }
.reveal-right { animation-name: reveal-right; animation-range: entry 0% cover 35%; }

/* Stagger utility for children inside a container */
.reveal-stagger > * { animation: reveal-up 1s both; }
.reveal-stagger > *:nth-child(1){ animation-delay: .02s; }
.reveal-stagger > *:nth-child(2){ animation-delay: .08s; }
.reveal-stagger > *:nth-child(3){ animation-delay: .14s; }
.reveal-stagger > *:nth-child(4){ animation-delay: .20s; }
.reveal-stagger > *:nth-child(5){ animation-delay: .26s; }
.reveal-stagger > *:nth-child(6){ animation-delay: .32s; }

/* Prefer-reduced-motion safety */
@media (prefers-reduced-motion: reduce){
  .reveal, .reveal-stagger > * {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
  }
}
