/*
Theme Name: StemCellMD
Theme URI: https://www.stemcellmd.com
Author: StemCellMD
Description: Custom regenerative medicine theme for StemCellMD West Palm Beach. All page content is editable via the WordPress block editor.
Version: 3.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: Private
Text Domain: stemcellmd
*/

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
    --ivory:    #F7F3EE;
    --bone:     #EDE5D8;
    --gold:     #C4A35A;
    --gold-lt:  #D4B87A;
    --deep:     #1A1410;
    --charcoal: #2C2620;
    --muted:    #7A7068;
    --crimson:  #7B1D28;
    --white:    #FFFFFF;
    --ff-head:  'Cormorant Garamond', Georgia, serif;
    --ff-body:  'DM Sans', system-ui, sans-serif;
    --max:      1200px;
    --radius:   4px;
    --shadow:   0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg:0 12px 48px rgba(0,0,0,0.14);
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: var(--ff-body);
    background: var(--ivory);
    color: var(--charcoal);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--ff-body); }

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1,h2,h3,h4,h5,h6 { font-family: var(--ff-head); line-height: 1.2; color: var(--deep); }
h1 { font-size: clamp(2.6rem, 5vw, 4.8rem); font-weight: 300; }
h2 { font-size: clamp(1.9rem, 3.5vw, 3rem); font-weight: 300; margin-bottom: 1rem; }
h3 { font-size: 1.4rem; font-weight: 400; margin-bottom: .5rem; }
h4 { font-size: 1.1rem; font-weight: 400; margin-bottom: .4rem; }
p  { margin-bottom: 1rem; font-size: .97rem; line-height: 1.8; color: var(--muted); }
strong { font-weight: 600; color: var(--charcoal); }

/* WP content area typography */
.wp-content h2 { font-family: var(--ff-head); font-size: clamp(1.6rem,3vw,2.4rem); font-weight:300; color:var(--deep); margin:2rem 0 .8rem; }
.wp-content h3 { font-family: var(--ff-head); color: var(--deep); margin:1.5rem 0 .6rem; }
.wp-content p  { color: var(--muted); line-height: 1.85; margin-bottom: 1rem; }
.wp-content ul, .wp-content ol { padding-left: 1.5rem; margin-bottom: 1.2rem; }
.wp-content ul li { list-style: disc; color: var(--muted); margin-bottom: .4rem; line-height: 1.75; }
.wp-content ol li { list-style: decimal; color: var(--muted); margin-bottom: .4rem; line-height: 1.75; }
.wp-content a { color: var(--crimson); text-decoration: underline; }
.wp-content strong { color: var(--charcoal); }
.wp-content img { border-radius: var(--radius); margin: 1.5rem 0; }
.wp-content blockquote { border-left: 3px solid var(--gold); padding: 1rem 1.5rem; margin: 1.5rem 0; background: var(--bone); border-radius: 0 var(--radius) var(--radius) 0; }
.wp-content blockquote p { color: var(--charcoal); font-style: italic; margin: 0; }
/* WP Block alignments */
.wp-content .aligncenter { margin-left: auto; margin-right: auto; text-align: center; }
.wp-content .alignwide  { max-width: 100%; }
.wp-content figure { margin: 1.5rem 0; }
.wp-content figcaption { font-size: .8rem; color: var(--muted); text-align: center; margin-top: .4rem; }

/* ============================================================
   LAYOUT UTILITIES
   ============================================================ */
.container { max-width: var(--max); margin: 0 auto; padding: 0 2rem; }
.section    { padding: 5rem 0; }
.section--dark    { background: var(--deep); }
.section--white   { background: var(--white); }
.section--bone    { background: var(--bone); }
.section--crimson { background: var(--crimson); }
.section--ivory   { background: var(--ivory); }

.scmd-label {
    display: inline-flex; align-items: center; gap: .6rem;
    font-size: .72rem; letter-spacing: .2em; text-transform: uppercase;
    color: var(--crimson); margin-bottom: .8rem; font-family: var(--ff-body);
}
.scmd-label::before { content:''; width:24px; height:1px; background:var(--crimson); }
.scmd-label--gold { color: rgba(196,163,90,.85); }
.scmd-label--gold::before { background: rgba(196,163,90,.85); }

.scmd-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.scmd-grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 2rem; }
.scmd-grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 2rem; }

/* ============================================================
   BUTTONS
   ============================================================ */
.scmd-btn, .wp-content .scmd-btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .9rem 2.2rem; border-radius: var(--radius);
    font-size: .82rem; font-weight: 500; letter-spacing: .1em;
    text-transform: uppercase; transition: all .25s;
    border: 2px solid transparent; font-family: var(--ff-body);
    cursor: pointer; text-decoration: none !important;
}
.scmd-btn--gold   { background: var(--gold); color: var(--deep); border-color: var(--gold); }
.scmd-btn--gold:hover { background: var(--gold-lt); border-color: var(--gold-lt); }
.scmd-btn--outline{ background: transparent; color: var(--white); border-color: rgba(255,255,255,.4); }
.scmd-btn--outline:hover { border-color:var(--gold); color:var(--gold); }
.scmd-btn--white  { background: var(--white); color: var(--crimson); border-color: var(--white); }
.scmd-btn--white:hover { background: var(--gold); border-color: var(--gold); color: var(--deep); }
.scmd-btn--crimson{ background: var(--crimson); color: var(--white); border-color: var(--crimson); }
.scmd-btn--crimson:hover { background: #9B2535; }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
    position: fixed; top:0; left:0; right:0; z-index:999;
    background: rgba(26,20,16,.97);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(196,163,90,.2);
    transition: all .3s;
}
.site-header__inner {
    display: flex; align-items: center; justify-content: space-between;
    padding: 1rem 2rem; max-width: 1300px; margin: 0 auto;
}
.site-logo {
    font-family: var(--ff-head); font-size: 1.75rem; font-weight: 600;
    color: var(--gold); letter-spacing: .02em; text-decoration: none;
    display: flex; align-items: center; gap: .8rem;
}
.site-logo span { color: var(--white); font-weight: 300; font-style: italic; }
.site-logo img  { max-height: 52px; width: auto; }

.primary-nav { display: flex; align-items: center; gap: 2rem; }
.primary-nav a {
    color: rgba(255,255,255,.75); font-size: .8rem;
    letter-spacing: .12em; text-transform: uppercase;
    transition: color .2s; padding: .3rem 0;
}
.primary-nav a:hover,
.primary-nav .current-menu-item > a,
.primary-nav .current_page_item > a { color: var(--gold); }
.nav-cta {
    background: var(--gold) !important; color: var(--deep) !important;
    padding: .55rem 1.4rem; border-radius: var(--radius); font-weight: 500 !important;
}
.nav-cta:hover { background: var(--gold-lt) !important; }

.hamburger { display:none; flex-direction:column; gap:5px; background:none; border:none; cursor:pointer; padding:4px; }
.hamburger span { width:24px; height:2px; background:var(--gold); display:block; transition:.3s; }
.mobile-nav { display:none; flex-direction:column; background:var(--deep); border-top:1px solid rgba(196,163,90,.15); }
.mobile-nav.is-open { display:flex; }
.mobile-nav a { color:rgba(255,255,255,.75); padding:1rem 2rem; font-size:.85rem; letter-spacing:.1em; text-transform:uppercase; border-bottom:1px solid rgba(255,255,255,.05); transition:color .2s; }
.mobile-nav a:hover { color:var(--gold); }

/* ============================================================
   PAGE HERO (interior pages)
   ============================================================ */
.page-hero {
    background: var(--deep); padding: 10rem 2rem 5rem;
    text-align: center; position: relative; overflow: hidden;
}
.page-hero::before {
    content:''; position:absolute; inset:0;
    background: radial-gradient(ellipse 70% 80% at 50% 50%, rgba(123,29,40,.22) 0%, transparent 70%);
    pointer-events: none;
}
.page-hero__inner { position:relative; }
.page-hero h1 { color:var(--white); }
.page-hero .page-hero__sub { color:rgba(255,255,255,.58); max-width:560px; margin:1rem auto 0; font-size:1.05rem; }

/* ============================================================
   HOMEPAGE HERO
   ============================================================ */
.scmd-hero {
    min-height: 100vh; background: var(--deep);
    display: flex; align-items: center;
    position: relative; overflow: hidden;
    padding: 8rem 2rem 5rem;
}
.scmd-hero__bg-radial {
    position:absolute; inset:0; pointer-events:none;
    background:
        radial-gradient(ellipse 80% 60% at 72% 50%, rgba(123,29,40,.25) 0%, transparent 70%),
        radial-gradient(ellipse 50% 80% at 5% 85%, rgba(196,163,90,.07) 0%, transparent 60%);
}
.scmd-hero__bg-grid {
    position:absolute; inset:0; opacity:.04; pointer-events:none;
    background-image:
        linear-gradient(rgba(196,163,90,1) 1px,transparent 1px),
        linear-gradient(90deg,rgba(196,163,90,1) 1px,transparent 1px);
    background-size: 60px 60px;
}
.scmd-hero__content { position:relative; max-width:var(--max); margin:0 auto; width:100%; }

/* Hero content pulled from WP editor */
.scmd-hero__content h1 { color:var(--white); max-width:820px; margin-bottom:1.8rem; font-weight:300; }
.scmd-hero__content h1 em { color:var(--gold); font-style:italic; }
.scmd-hero__content p.hero-sub { font-size:1.1rem; color:rgba(255,255,255,.6); max-width:520px; margin-bottom:3rem; font-weight:300; line-height:1.85; }
.scmd-hero__content .wp-content p { color:rgba(255,255,255,.6); }

.hero-eyebrow {
    display:inline-flex; align-items:center; gap:.7rem;
    font-size:.72rem; letter-spacing:.22em; text-transform:uppercase;
    color:var(--gold); margin-bottom:1.6rem;
}
.hero-eyebrow::before { content:''; width:32px; height:1px; background:var(--gold); }

.hero-actions { display:flex; gap:1rem; flex-wrap:wrap; margin:2rem 0 3rem; }
.hero-stats   { display:flex; gap:4rem; flex-wrap:wrap; }
.hero-stat-num { font-family:var(--ff-head); font-size:2.6rem; font-weight:300; color:var(--gold); line-height:1; }
.hero-stat-label { font-size:.7rem; color:rgba(255,255,255,.4); letter-spacing:.12em; text-transform:uppercase; margin-top:.3rem; }

/* ============================================================
   SECTION WRAPPERS used in front-page.php
   ============================================================ */
.scmd-section-label-wrap { margin-bottom: 1.5rem; }

/* Card grid items */
.scmd-card {
    background:var(--white); border:1px solid var(--bone);
    border-radius:var(--radius); padding:2rem 1.8rem;
    position:relative; overflow:hidden;
    transition:transform .25s, box-shadow .25s;
}
.scmd-card:hover { transform:translateY(-5px); box-shadow:var(--shadow-lg); }
.scmd-card::before {
    content:''; position:absolute; top:0; left:0; right:0;
    height:3px; background:var(--gold);
    transform:scaleX(0); transform-origin:left; transition:transform .3s;
}
.scmd-card:hover::before { transform:scaleX(1); }
.scmd-card h3 { font-size:1.2rem; color:var(--deep); margin-bottom:.6rem; }
.scmd-card p  { font-size:.87rem; color:var(--muted); line-height:1.78; margin:0; }
.scmd-card__icon { font-size:1.6rem; margin-bottom:1rem; }

/* Study cards */
.scmd-study {
    background:var(--white); padding:2rem; border-radius:var(--radius);
    border-left:4px solid var(--crimson);
    transition:transform .2s, box-shadow .2s;
}
.scmd-study:hover { transform:translateY(-3px); box-shadow:var(--shadow); }
.scmd-study__source { font-size:.7rem; letter-spacing:.1em; text-transform:uppercase; color:var(--crimson); margin-bottom:.8rem; }
.scmd-study h3 { font-family:var(--ff-head); font-size:1.1rem; color:var(--deep); margin-bottom:.6rem; line-height:1.4; }
.scmd-study p  { font-size:.85rem; color:var(--muted); line-height:1.78; margin:0; }
.scmd-study__stat { font-family:var(--ff-head); font-size:1.8rem; color:var(--gold); margin-top:1rem; }

/* Why cards */
.scmd-why { text-align:center; padding:2rem 1rem; }
.scmd-why__icon { width:68px; height:68px; border:2px solid var(--gold); border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:1.6rem; margin:0 auto 1.2rem; }
.scmd-why h3 { font-size:1.15rem; margin-bottom:.5rem; }
.scmd-why p  { font-size:.86rem; color:var(--muted); margin:0; }

/* Science blocks */
.scmd-sci { border-top:1px solid rgba(196,163,90,.3); padding-top:2rem; }
.scmd-sci__num { font-family:var(--ff-head); font-size:3rem; font-weight:300; color:var(--gold); opacity:.55; line-height:1; margin-bottom:.6rem; }
.scmd-sci h3 { color:var(--white); font-size:1.2rem; margin-bottom:.7rem; }
.scmd-sci p  { font-size:.87rem; color:rgba(255,255,255,.45); line-height:1.8; margin:0; }

/* Process steps */
.scmd-process { margin-top:3rem; background:rgba(255,255,255,.04); border:1px solid rgba(196,163,90,.15); padding:2.5rem; border-radius:var(--radius); }
.scmd-process h3 { font-family:var(--ff-head); color:var(--gold); font-size:1.4rem; margin-bottom:2rem; }
.scmd-steps { display:grid; grid-template-columns:repeat(4,1fr); gap:1.5rem; }
.scmd-step  { text-align:center; position:relative; }
.scmd-step::after { content:'→'; position:absolute; right:-.8rem; top:.7rem; color:rgba(196,163,90,.35); font-size:1.2rem; }
.scmd-step:last-child::after { display:none; }
.scmd-step__num { width:42px; height:42px; background:var(--gold); color:var(--deep); border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:.9rem; margin:0 auto .8rem; }
.scmd-step h4 { font-size:.85rem; color:var(--white); margin-bottom:.3rem; }
.scmd-step p  { font-size:.75rem; color:rgba(255,255,255,.35); line-height:1.65; margin:0; }

/* Conditions list */
.scmd-cond-list li { display:flex; align-items:flex-start; gap:.8rem; padding:.85rem 0; border-bottom:1px solid var(--bone); font-size:.92rem; color:var(--charcoal); }
.scmd-cond-list li::before { content:'◆'; color:var(--gold); font-size:.5rem; margin-top:.45rem; flex-shrink:0; }

/* Tabs */
.scmd-tabs { }
.scmd-tab-nav { display:flex; border-bottom:2px solid var(--bone); margin-bottom:1.5rem; flex-wrap:wrap; }
.scmd-tab-btn { padding:.75rem 1.3rem; font-size:.8rem; letter-spacing:.08em; text-transform:uppercase; cursor:pointer; color:var(--muted); border:none; border-bottom:2px solid transparent; background:none; margin-bottom:-2px; transition:color .2s; font-family:var(--ff-body); }
.scmd-tab-btn.active { color:var(--crimson); border-bottom-color:var(--crimson); }
.scmd-tab-panel { display:none; }
.scmd-tab-panel.active { display:block; }
.scmd-tab-panel p  { color:var(--muted); line-height:1.85; margin-bottom:1rem; font-size:.93rem; }
.scmd-tab-panel ul { margin-top:1rem; }
.scmd-tab-panel li { padding:.5rem 0 .5rem 1rem; font-size:.9rem; color:var(--charcoal); border-left:2px solid var(--gold); margin-bottom:.4rem; }

/* CTA Band */
.scmd-cta-band { background:var(--crimson); padding:5rem 2rem; text-align:center; }
.scmd-cta-band h2 { color:var(--white); margin-bottom:1rem; }
.scmd-cta-band p  { color:rgba(255,255,255,.72); max-width:500px; margin:0 auto 2rem; }

/* Contact */
.scmd-contact-item { display:flex; gap:1rem; margin-bottom:1.8rem; align-items:flex-start; }
.scmd-contact-item__icon { width:42px; height:42px; background:var(--bone); border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:1.1rem; flex-shrink:0; }
.scmd-contact-item h4 { font-size:.72rem; letter-spacing:.12em; text-transform:uppercase; color:var(--gold); margin-bottom:.2rem; font-family:var(--ff-body); font-weight:500; }
.scmd-contact-item p { font-size:.92rem; color:var(--charcoal); margin:0; }

/* Form */
.scmd-form .form-row { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
.scmd-form .form-group { margin-bottom:1.2rem; }
.scmd-form label { display:block; font-size:.73rem; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); margin-bottom:.5rem; }
.scmd-form input,
.scmd-form select,
.scmd-form textarea,
.wpcf7-text,.wpcf7-email,.wpcf7-tel,.wpcf7-select,.wpcf7-textarea {
    width:100%; padding:.85rem 1rem; border:1px solid var(--bone);
    border-radius:var(--radius); font-family:var(--ff-body); font-size:.92rem;
    color:var(--charcoal); background:var(--ivory); transition:border-color .2s; outline:none;
}
.scmd-form input:focus,
.scmd-form select:focus,
.scmd-form textarea:focus,
.wpcf7-text:focus,.wpcf7-email:focus,.wpcf7-tel:focus,.wpcf7-select:focus,.wpcf7-textarea:focus { border-color:var(--gold); background:var(--white); }
.scmd-form textarea, .wpcf7-textarea { height:130px; resize:vertical; }
.wpcf7-submit { width:100%; }
.form-note { font-size:.77rem; color:var(--muted); margin-top:.8rem; line-height:1.6; }
.wpcf7-not-valid-tip { font-size:.8rem; color:var(--crimson); }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer { background: var(--deep); }
.footer-grid { display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:3rem; padding:4rem 0 2.5rem; border-bottom:1px solid rgba(255,255,255,.07); margin-bottom:2rem; }
.footer-logo { font-family:var(--ff-head); font-size:1.5rem; color:var(--gold); margin-bottom:.8rem; }
.footer-logo span { color:var(--white); font-weight:300; font-style:italic; }
.footer-logo img { max-height:48px; }
.footer-brand p { font-size:.83rem; color:rgba(255,255,255,.38); line-height:1.8; max-width:260px; }
.footer-col h4 { font-size:.7rem; letter-spacing:.16em; text-transform:uppercase; color:var(--gold); margin-bottom:1.2rem; font-family:var(--ff-body); }
.footer-col ul li { margin-bottom:.6rem; }
.footer-col ul li a { font-size:.83rem; color:rgba(255,255,255,.42); transition:color .2s; }
.footer-col ul li a:hover { color:var(--gold); }
.footer-bottom { display:flex; justify-content:space-between; padding-bottom:2.5rem; font-size:.74rem; color:rgba(255,255,255,.25); }
.footer-disclaimer { background:rgba(255,255,255,.03); border-top:1px solid rgba(255,255,255,.05); padding:1.5rem 2rem; font-size:.71rem; color:rgba(255,255,255,.2); line-height:1.65; }
.footer-disclaimer strong { color:rgba(255,255,255,.35); }

/* ============================================================
   BLOG / POSTS
   ============================================================ */
.posts-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:2rem; }
.post-card { background:var(--white); border:1px solid var(--bone); border-radius:var(--radius); overflow:hidden; transition:transform .25s,box-shadow .25s; }
.post-card:hover { transform:translateY(-4px); box-shadow:var(--shadow-lg); }
.post-card__thumb { height:200px; overflow:hidden; background:var(--bone); display:flex; align-items:center; justify-content:center; font-size:3rem; }
.post-card__thumb img { width:100%; height:100%; object-fit:cover; }
.post-card__body { padding:1.5rem; }
.post-card__meta { font-size:.75rem; color:var(--muted); letter-spacing:.05em; text-transform:uppercase; margin-bottom:.5rem; }
.post-card h3 { font-size:1.1rem; margin-bottom:.6rem; }
.post-card h3 a { color:var(--deep); transition:color .2s; }
.post-card h3 a:hover { color:var(--crimson); }
.post-card p { font-size:.87rem; color:var(--muted); margin-bottom:1rem; }

.single-post { max-width:780px; margin:0 auto; padding:4rem 2rem; }

/* ============================================================
   ANIMATIONS
   ============================================================ */
.reveal { opacity:0; transform:translateY(20px); transition:opacity .65s ease,transform .65s ease; }
.reveal.visible { opacity:1; transform:translateY(0); }
@keyframes fadeUp { from{opacity:0;transform:translateY(28px)} to{opacity:1;transform:translateY(0)} }
.fade-up { animation:fadeUp .7s ease both; }
.delay-1 { animation-delay:.15s; }
.delay-2 { animation-delay:.3s; }
.delay-3 { animation-delay:.45s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media(max-width:1024px) {
    .scmd-grid-4,.footer-grid { grid-template-columns:1fr 1fr; }
    .posts-grid { grid-template-columns:1fr 1fr; }
}
@media(max-width:768px) {
    .section { padding:3.5rem 0; }
    .hamburger { display:flex; }
    .primary-nav { display:none; }
    .scmd-grid-2,.scmd-grid-3,.scmd-grid-4 { grid-template-columns:1fr; gap:1.5rem; }
    .scmd-steps { grid-template-columns:1fr 1fr; }
    .scmd-step::after { display:none; }
    .footer-grid { grid-template-columns:1fr; gap:2rem; }
    .footer-bottom { flex-direction:column; gap:.5rem; }
    .scmd-form .form-row { grid-template-columns:1fr; }
    .posts-grid { grid-template-columns:1fr; }
    .hero-stats { gap:2rem; }
}
@media(max-width:480px) {
    .container { padding:0 1.2rem; }
    .scmd-hero { padding:7rem 1.2rem 4rem; }
    .hero-actions { flex-direction:column; }
    .scmd-btn { justify-content:center; }
    .scmd-steps { grid-template-columns:1fr; }
    .page-hero { padding:8rem 1.2rem 4rem; }
}
