/* =========================================================
   Tai Chi Fit for Seniors - Global Stylesheet
   Color Palette:
     - Primary (accent backgrounds):  #B6F090
     - Secondary (text/buttons):      #43BB74
     - Dark text:                     #1F2937
   ========================================================= */

/* ----- Base ----- */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ----- Scrollbar ----- */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
}
::-webkit-scrollbar-thumb {
    background: #43BB74;
    border-radius: 6px;
    border: 3px solid #f1f1f1;
}
::-webkit-scrollbar-thumb:hover {
    background: #35965c;
}
* {
    scrollbar-width: thin;
    scrollbar-color: #43BB74 #f1f1f1;
}

/* ----- Selection ----- */
::selection {
    background: #B6F090;
    color: #1F2937;
}

/* ----- Accessibility: focus ring ----- */
:focus-visible {
    outline: 3px solid #43BB74;
    outline-offset: 2px;
}

/* ----- Keyframe animations ----- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(67, 187, 116, 0.5); }
    50%      { box-shadow: 0 0 0 16px rgba(67, 187, 116, 0); }
}
@keyframes softFloat {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}

.animate-fade-in-up   { animation: fadeInUp 0.8s ease-out forwards; }
.animate-fade-in      { animation: fadeIn 0.9s ease-out forwards; }
.animate-slide-left   { animation: slideInLeft 0.8s ease-out forwards; }
.animate-slide-right  { animation: slideInRight 0.8s ease-out forwards; }
.animate-pulse-glow   { animation: pulseGlow 2.4s ease-in-out infinite; }
.animate-soft-float   { animation: softFloat 4s ease-in-out infinite; }

.animation-delay-100 { animation-delay: 0.1s; opacity: 0; }
.animation-delay-200 { animation-delay: 0.2s; opacity: 0; }
.animation-delay-300 { animation-delay: 0.3s; opacity: 0; }
.animation-delay-400 { animation-delay: 0.4s; opacity: 0; }
.animation-delay-500 { animation-delay: 0.5s; opacity: 0; }
.animation-delay-600 { animation-delay: 0.6s; opacity: 0; }

/* ----- Reveal on scroll (intersection observer applies .is-visible) ----- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.9s ease-out, transform 0.9s ease-out;
    will-change: opacity, transform;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ----- Move Gallery (horizontal scroller) ----- */
.move-scroller {
    display: flex;
    gap: 1.75rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 1.5rem 0 2.5rem;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #43BB74 #f3f4f6;
}
.move-scroller::-webkit-scrollbar {
    height: 10px;
}
.move-scroller::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 10px;
}
.move-scroller::-webkit-scrollbar-thumb {
    background: #43BB74;
    border-radius: 10px;
    border: 2px solid #f3f4f6;
}

.move-card {
    flex: 0 0 320px;
    scroll-snap-align: center;
    background: #ffffff;
    border-radius: 1.5rem;
    overflow: hidden;
    box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.15);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    border: 2px solid transparent;
}
.move-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 22px 45px -18px rgba(67, 187, 116, 0.45);
    border-color: #B6F090;
}
.move-card .img-wrap {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f3f4f6;
}
.move-card .img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}
.move-card:hover .img-wrap img {
    transform: scale(1.06);
}

/* ----- FAQ accordion ----- */
.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    font-weight: 600;
    font-size: 1.125rem;
    color: #1F2937;
    transition: background-color 0.2s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::marker { content: ''; }
.faq-item summary:hover { background: #f0fdf4; }
.faq-item summary .icon {
    flex-shrink: 0;
    width: 28px; height: 28px;
    border-radius: 9999px;
    background: #B6F090;
    color: #14532d;
    display: flex; align-items: center; justify-content: center;
    transition: transform 0.3s ease, background-color 0.3s ease;
}
.faq-item[open] summary .icon {
    transform: rotate(45deg);
    background: #43BB74;
    color: #ffffff;
}
.faq-item .answer {
    padding: 0 1.5rem 1.5rem;
    color: #4b5563;
    font-size: 1.0625rem;
    line-height: 1.7;
}

/* ----- Form controls ----- */
.form-field {
    margin-bottom: 1.5rem;
}
.form-field label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #1F2937;
    font-size: 1.0625rem;
}
.form-field .req {
    color: #dc2626;
    margin-left: 4px;
}
.form-control {
    width: 100%;
    padding: 0.875rem 1.125rem;
    border: 2px solid #d1d5db;
    border-radius: 0.75rem;
    font-size: 1.0625rem;
    background: #ffffff;
    color: #1F2937;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    font-family: inherit;
}
.form-control:hover { border-color: #9ca3af; }
.form-control:focus {
    border-color: #43BB74;
    box-shadow: 0 0 0 3px rgba(67, 187, 116, 0.2);
    outline: none;
}
.form-control.is-invalid {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}
textarea.form-control {
    resize: vertical;
    min-height: 140px;
}
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2343BB74' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 16px;
    padding-right: 2.75rem;
}
.field-error {
    color: #dc2626;
    font-size: 0.9375rem;
    margin-top: 0.4rem;
    display: none;
}
.form-field.has-error .field-error { display: block; }

/* ----- Toast notification ----- */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(150%);
    background: #1F2937;
    color: #ffffff;
    padding: 1rem 1.75rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    font-weight: 500;
    z-index: 100;
    transition: transform 0.45s cubic-bezier(.22,1,.36,1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    max-width: 92vw;
}
.toast.is-visible { transform: translateX(-50%) translateY(0); }
.toast.success { background: #43BB74; }
.toast.error   { background: #dc2626; }

/* ----- Page hero (sub pages) ----- */
.page-hero {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding-top: 8rem;
    padding-bottom: 4rem;
    text-align: center;
}
.page-hero h1 {
    font-size: 2.75rem;
    font-weight: 800;
    color: #1F2937;
    line-height: 1.15;
    margin-bottom: 1rem;
}
.page-hero p {
    font-size: 1.25rem;
    color: #4b5563;
    max-width: 720px;
    margin: 0 auto;
}
@media (min-width: 768px) {
    .page-hero h1 { font-size: 3.5rem; }
    .page-hero p { font-size: 1.375rem; }
}

/* ----- Prose (article-like legal content) ----- */
.legal-prose h2 {
    font-size: 1.625rem;
    font-weight: 700;
    color: #1F2937;
    margin-top: 2.25rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.625rem;
}
.legal-prose h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1F2937;
    margin-top: 1.5rem;
    margin-bottom: 0.625rem;
}
.legal-prose p, .legal-prose li {
    color: #4b5563;
    font-size: 1.0625rem;
    line-height: 1.75;
    margin-bottom: 0.875rem;
}
.legal-prose ul { padding-left: 1.5rem; list-style: disc; }
.legal-prose strong { color: #1F2937; }
.legal-prose a { color: #43BB74; font-weight: 600; text-decoration: underline; }
.legal-prose .callout {
    background: #fff7ed;
    border-left: 4px solid #f97316;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    color: #9a3412;
    margin: 1.25rem 0;
    font-size: 1.0625rem;
}
.legal-prose .callout.success {
    background: #f0fdf4;
    border-left-color: #43BB74;
    color: #166534;
}
