:root {
    --primary: #2563eb;
    --secondary: #111827;
    --accent: #f59e0b;
    --bg: #ffffff;
    --text: #1f2937;
    --font: system-ui, -apple-system, sans-serif;
    --radius: 10px;
    --btn-radius: 10px;
    --muted: #6b7280;
    --border: #e5e7eb;
    --surface: #f8fafc;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 0.5em; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1em; color: var(--text); }

.container { max-width: 1160px; margin: 0 auto; padding: 0 1.5rem; }

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.6rem;
    border-radius: var(--btn-radius);
    font-weight: 600;
    font-size: 0.95rem;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { filter: brightness(0.92); text-decoration: none; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--text); border-color: var(--border); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.btn-light { background: #fff; color: var(--secondary); }
.btn-light:hover { text-decoration: none; transform: translateY(-1px); }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-sm { padding: 0.5rem 1.1rem; font-size: 0.85rem; }

/* ---------- Header ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    border-bottom: 1px solid var(--border);
}
/*
 * The frosted-glass effect lives on a ::before layer rather than on
 * .site-header itself: backdrop-filter (like filter) makes an element
 * establish the containing block for any position:fixed descendant,
 * which would trap the fixed mobile nav panel inside the header's own
 * (short) box instead of the viewport. A sibling pseudo-element keeps
 * the visual effect without that side effect.
 */
.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(255,255,255,0.92);
    backdrop-filter: saturate(180%) blur(8px);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 2rem; }
.site-brand { display: flex; align-items: center; }
.site-logo { max-height: 44px; width: auto; }
.site-brand-text { font-size: 1.3rem; font-weight: 800; color: var(--secondary); }
.site-nav { display: flex; align-items: center; gap: 1.75rem; margin-left: auto; }
.site-nav a { color: var(--text); font-weight: 500; font-size: 0.95rem; }
.site-nav a:hover, .site-nav a.active { color: var(--primary); text-decoration: none; }
.site-nav a.nav-cta {
    background: var(--primary); color: #fff; padding: 0.55rem 1.2rem; border-radius: var(--btn-radius);
}
.site-nav a.nav-cta:hover { filter: brightness(0.92); }

.header-centered .header-inner { flex-direction: column; height: auto; padding: 1.25rem 1.5rem; gap: 0.75rem; }
.header-centered .site-nav { margin-left: 0; }

.header-transparent .site-header { position: absolute; left: 0; right: 0; border-bottom: none; }
.header-transparent .site-header::before { background: transparent; backdrop-filter: none; }
.header-transparent .site-nav a { color: #fff; }
.header-transparent .site-brand-text { color: #fff; }

.nav-toggle {
    display: none; flex-direction: column; justify-content: center; gap: 5px;
    width: 40px; height: 40px; background: none; border: none; cursor: pointer;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--text); border-radius: 2px; }

/* ---------- Hero ---------- */
.hero {
    padding: 6rem 0 5rem;
    background: linear-gradient(160deg, var(--secondary), color-mix(in srgb, var(--secondary) 70%, var(--primary)));
    color: #fff;
    text-align: center;
    background-size: cover;
    background-position: center;
    position: relative;
}
.hero.has-image::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.45); }
.hero .container { position: relative; z-index: 1; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 0.6rem; color: #fff; }
.hero p.lead { font-size: 1.2rem; color: rgba(255,255,255,0.92); max-width: 640px; margin: 0 auto 2rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Sections ---------- */
section.section { padding: 5rem 0; }
section.section.alt { background: var(--surface); }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 3rem; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.section-head p { color: var(--muted); font-size: 1.05rem; }

/* ---------- Cards / grids ---------- */
.grid { display: grid; gap: 1.75rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 1.75rem; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 24px rgba(0,0,0,0.08); }

.service-card img, .team-card img, .blog-card img { border-radius: var(--radius) var(--radius) 0 0; aspect-ratio: 4/3; object-fit: cover; }
.service-card, .team-card, .blog-card { padding: 0; overflow: hidden; }
.service-card .card-body, .team-card .card-body, .blog-card .card-body { padding: 1.5rem; }
.service-card .price { font-weight: 700; color: var(--primary); font-size: 1.15rem; }
.service-card .meta, .blog-card .meta { color: var(--muted); font-size: 0.85rem; }

.team-card { text-align: center; }
.team-card img { aspect-ratio: 1/1; border-radius: 999px; width: 140px; margin: 1.75rem auto 0; }
.team-card .role { color: var(--primary); font-weight: 600; font-size: 0.9rem; }

.testimonial-card { text-align: left; }
.testimonial-card .stars { color: var(--accent); margin-bottom: 0.75rem; letter-spacing: 2px; }
.testimonial-card .author { display: flex; align-items: center; gap: 0.75rem; margin-top: 1.25rem; }
.testimonial-card .author img { width: 44px; height: 44px; border-radius: 999px; object-fit: cover; }
.testimonial-card .author-name { font-weight: 600; }
.testimonial-card .author-role { color: var(--muted); font-size: 0.85rem; }

.feature-item { text-align: center; }
.feature-icon {
    width: 56px; height: 56px; border-radius: var(--radius); background: color-mix(in srgb, var(--primary) 12%, white);
    display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; font-size: 1.5rem;
}

.stat-item { text-align: center; }
.stat-value { font-size: 2.4rem; font-weight: 800; color: var(--primary); }
.stat-label { color: var(--muted); }

.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; }
.gallery-grid img { border-radius: var(--radius); aspect-ratio: 1/1; object-fit: cover; }

/* ---------- Account portal ---------- */
.account-header { padding: 3rem 0 2rem; border-bottom: 1px solid var(--border); }
.account-header h1 { margin-bottom: 0.3rem; }
.account-header .sub { color: var(--muted); }
.account-nav { display: flex; gap: 0.5rem; flex-wrap: wrap; padding: 1.25rem 0; border-bottom: 1px solid var(--border); margin-bottom: 2.5rem; }
.account-nav a {
    padding: 0.5rem 1rem; border-radius: 999px; font-size: 0.88rem; font-weight: 600; color: var(--muted);
    border: 1px solid transparent;
}
.account-nav a:hover { color: var(--primary); text-decoration: none; }
.account-nav a.active { background: var(--surface); color: var(--primary); border-color: var(--border); }
.account-stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; margin-bottom: 2.5rem; }
.account-stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.account-stat .n { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.account-stat .l { color: var(--muted); font-size: 0.85rem; margin-top: 0.2rem; }
.account-table-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: 2rem; }
.account-table-card .head { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.account-table-card .head h3 { margin: 0; font-size: 1.05rem; }
.account-table { width: 100%; border-collapse: collapse; }
.account-table th { text-align: left; padding: 0.7rem 1.5rem; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); background: var(--surface); }
.account-table td { padding: 0.9rem 1.5rem; border-top: 1px solid var(--border); font-size: 0.92rem; }
.account-empty { padding: 2.5rem 1.5rem; text-align: center; color: var(--muted); }
.account-badge { display: inline-block; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.72rem; font-weight: 700; text-transform: capitalize; background: var(--surface); color: var(--muted); }
.account-badge.good { background: #dcfce7; color: #166534; }
.account-badge.warn { background: #fef3c7; color: #92400e; }
.account-badge.bad { background: #fee2e2; color: #991b1b; }
.account-badge.info { background: #dbeafe; color: #1e40af; }
.auth-shell { max-width: 420px; margin: 0 auto; padding: 4rem 0 5rem; }
.auth-shell .card { padding: 2.25rem; }
.auth-shell h1 { font-size: 1.5rem; margin-bottom: 0.4rem; text-align: center; }
.auth-shell .sub { text-align: center; color: var(--muted); margin-bottom: 1.75rem; font-size: 0.92rem; }
.auth-shell .switch { text-align: center; margin-top: 1.5rem; font-size: 0.88rem; color: var(--muted); }
.table-wrap-x { overflow-x: auto; }

@media (max-width: 720px) {
    .account-stat-grid { grid-template-columns: 1fr; }
    .account-table-card .head { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
}

/* ---------- Pricing ---------- */
.pricing-card { display: flex; flex-direction: column; }
.pricing-card .price { font-size: 1.8rem; font-weight: 800; color: var(--primary); margin: 0.5rem 0 1rem; }
.pricing-card .duration { color: var(--muted); font-size: 0.85rem; margin-bottom: 1rem; }
.pricing-card .btn { margin-top: auto; }

/* ---------- FAQ accordion ---------- */
.faq-list { max-width: 760px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
    width: 100%; text-align: left; background: none; border: none; cursor: pointer;
    padding: 1.25rem 0; font-weight: 600; font-size: 1.05rem; display: flex; justify-content: space-between; align-items: center;
    color: var(--text);
}
.faq-question .icon { transition: transform 0.2s ease; color: var(--primary); font-size: 1.3rem; }
.faq-item.open .faq-question .icon { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.25s ease; color: var(--muted); }
.faq-item.open .faq-answer { max-height: 600px; padding-bottom: 1.25rem; }

/* ---------- CTA ---------- */
.cta-band {
    background: var(--primary); color: #fff; text-align: center; padding: 4rem 0; border-radius: var(--radius);
    background-size: cover; background-position: center; position: relative;
}
.cta-band.has-image::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,0.5); border-radius: var(--radius); }
.cta-band .container { position: relative; z-index: 1; }
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,0.9); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; margin-bottom: 0.4rem; font-weight: 600; font-size: 0.9rem; }
input[type=text], input[type=email], input[type=tel], input[type=date], input[type=time], select, textarea {
    width: 100%; padding: 0.75rem 0.9rem; border: 1px solid var(--border); border-radius: calc(var(--radius) / 2);
    font-family: inherit; font-size: 0.95rem; background: #fff; color: var(--text);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
textarea { resize: vertical; min-height: 120px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.honeypot-field { position: absolute; left: -9999px; top: -9999px; }

.alert { padding: 0.9rem 1.1rem; border-radius: var(--radius); margin-bottom: 1.5rem; font-size: 0.95rem; }
.alert-success { background: #dcfce7; color: #166534; }
.alert-error { background: #fee2e2; color: #991b1b; }

/* ---------- Blog ---------- */
.blog-card .meta { margin-bottom: 0.5rem; }
.blog-post-content { max-width: 760px; margin: 0 auto; font-size: 1.05rem; }
.blog-post-content img { border-radius: var(--radius); margin: 1.5rem 0; }
.blog-post-content h2, .blog-post-content h3 { margin-top: 1.75rem; }
.pagination { display: flex; justify-content: center; gap: 0.5rem; margin-top: 3rem; }
.pagination a, .pagination span {
    padding: 0.5rem 0.95rem; border: 1px solid var(--border); border-radius: calc(var(--radius) / 2); color: var(--text);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); text-decoration: none; }
.pagination .current { background: var(--primary); color: #fff; border-color: var(--primary); }

/* ---------- Page content (rich text) ---------- */
.page-content { max-width: 820px; margin: 0 auto; font-size: 1.05rem; }
.page-content img { border-radius: var(--radius); margin: 1.5rem 0; }
.page-content ul, .page-content ol { padding-left: 1.5rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--secondary); color: rgba(255,255,255,0.85); padding: 4rem 0 0; margin-top: 5rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 3rem; padding-bottom: 3rem; }
.footer-grid h4 { color: #fff; font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1rem; }
.footer-grid a { color: rgba(255,255,255,0.75); display: block; margin-bottom: 0.6rem; }
.footer-grid a:hover { color: #fff; text-decoration: none; }
.footer-grid p { color: rgba(255,255,255,0.7); }
.footer-logo { max-height: 36px; margin-bottom: 1rem; filter: brightness(0) invert(1); }
.footer-brand { color: #fff; font-weight: 800; font-size: 1.2rem; margin-bottom: 1rem; }
.social-links { display: flex; gap: 1rem; margin-top: 1rem; }
.social-links a { margin-bottom: 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 1.5rem 0; text-align: center; font-size: 0.85rem; color: rgba(255,255,255,0.55); }

.footer-minimal .site-footer { background: var(--surface); color: var(--muted); }
.footer-minimal .footer-grid h4, .footer-minimal .footer-brand { color: var(--text); }
.footer-minimal .footer-grid a { color: var(--muted); }
.footer-minimal .footer-grid a:hover { color: var(--primary); }
.footer-minimal .footer-bottom { border-top-color: var(--border); color: var(--muted); }
.footer-minimal .footer-logo { filter: none; }

.footer-standard .site-footer { background: #fff; color: var(--muted); border-top: 1px solid var(--border); }
.footer-standard .footer-grid h4, .footer-standard .footer-brand { color: var(--text); }
.footer-standard .footer-grid a { color: var(--muted); }
.footer-standard .footer-grid a:hover { color: var(--primary); }
.footer-standard .footer-bottom { border-top-color: var(--border); color: var(--muted); }
.footer-standard .footer-logo { filter: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ==================================================================
   Theme personalities — structural differences beyond color/font,
   scoped to the `.theme-{slug}` class already on <body>. Business
   data and markup stay identical; only presentation changes.
   ================================================================== */

/* ---------- Professional: formal, understated, serif-led ---------- */
.theme-professional .section-head { max-width: 620px; }
.theme-professional .section-head h2 { text-transform: none; letter-spacing: -0.01em; }
.theme-professional section.section { padding: 6rem 0; }
.theme-professional .card { box-shadow: none; border: 1px solid var(--border); transition: border-color 0.2s ease; }
.theme-professional .card:hover { transform: none; box-shadow: none; border-color: var(--primary); }
.theme-professional .hero { background: var(--secondary); text-align: left; padding: 7rem 0 6rem; }
.theme-professional .hero .container { max-width: 760px; margin: 0; }
.theme-professional .hero h1 { font-size: clamp(2rem, 4vw, 2.85rem); }
.theme-professional .hero-actions { justify-content: flex-start; }
.theme-professional .testimonial-card { background: var(--surface); border: none; box-shadow: none; }
.theme-professional .testimonial-card .stars { color: var(--primary); }
.theme-professional .feature-icon { border-radius: 4px; }
.theme-professional .site-nav a.nav-cta { border-radius: 4px; }

/* ---------- Healthcare: calm, centered, generous, reassuring ---------- */
.theme-healthcare .section-head { max-width: 560px; }
.theme-healthcare section.section { padding: 5.5rem 0; }
.theme-healthcare .card { box-shadow: 0 2px 8px rgba(13, 148, 136, 0.06); transition: box-shadow 0.2s ease, transform 0.2s ease; }
.theme-healthcare .card:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(13, 148, 136, 0.12); }
.theme-healthcare .hero { text-align: center; padding: 5.5rem 0 4.5rem; }
.theme-healthcare .hero h1 { font-size: clamp(1.9rem, 4.2vw, 2.9rem); }
.theme-healthcare .feature-icon { border-radius: 999px; width: 64px; height: 64px; }
.theme-healthcare .service-card, .theme-healthcare .team-card, .theme-healthcare .blog-card { border-radius: 18px; }
.theme-healthcare .service-card img, .theme-healthcare .team-card img, .theme-healthcare .blog-card img { border-radius: 18px 18px 0 0; }
.theme-healthcare .testimonial-card { text-align: center; }
.theme-healthcare .testimonial-card .author { justify-content: center; }
.theme-healthcare .stat-value { font-weight: 700; }

/* ---------- Services (trade/home services): bold, direct, high-contrast ---------- */
.theme-services .section-head { max-width: 100%; text-align: left; margin: 0 0 2.5rem; }
.theme-services .section-head h2 { text-transform: uppercase; letter-spacing: 0.03em; font-size: clamp(1.4rem, 2.6vw, 1.9rem); }
.theme-services section.section { padding: 4rem 0; }
.theme-services .card { border: 2px solid var(--border); box-shadow: none; border-radius: 4px; transition: border-color 0.15s ease; }
.theme-services .card:hover { transform: none; box-shadow: none; border-color: var(--primary); }
.theme-services .hero { text-align: left; padding: 4.5rem 0; }
.theme-services .hero .container { max-width: 760px; margin: 0; }
.theme-services .hero h1 { text-transform: uppercase; font-size: clamp(1.9rem, 4.4vw, 3rem); letter-spacing: -0.01em; }
.theme-services .hero-actions { justify-content: flex-start; }
.theme-services .btn { text-transform: uppercase; letter-spacing: 0.02em; font-weight: 700; }
.theme-services .service-card .price { font-weight: 800; }
.theme-services .feature-icon { border-radius: 4px; background: var(--primary); color: #fff; }

/* ---------- Beauty: elegant, editorial, image-led ---------- */
.theme-beauty .section-head { max-width: 640px; }
.theme-beauty .section-head h2 { font-weight: 400; font-style: italic; }
.theme-beauty section.section { padding: 6.5rem 0; }
.theme-beauty .card { box-shadow: none; border: none; background: transparent; }
.theme-beauty .card:hover { transform: none; box-shadow: none; }
.theme-beauty .service-card, .theme-beauty .team-card, .theme-beauty .blog-card { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,0.03); }
.theme-beauty .service-card:hover, .theme-beauty .team-card:hover, .theme-beauty .blog-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(190, 24, 93, 0.12); }
.theme-beauty .hero { text-align: center; padding: 7rem 0 6rem; }
.theme-beauty .hero h1 { font-weight: 400; font-style: italic; letter-spacing: 0; }
.theme-beauty .testimonial-card { background: transparent; border: none; box-shadow: none; text-align: center; }
.theme-beauty .testimonial-card::before { content: "\201C"; display: block; font-size: 3rem; font-family: var(--font); color: var(--accent); line-height: 1; margin-bottom: 0.25rem; }
.theme-beauty .testimonial-card .stars { justify-content: center; display: flex; }
.theme-beauty .testimonial-card .author { justify-content: center; }
.theme-beauty .feature-icon { border-radius: 999px; }

/* ---------- Modern Business: the neutral default — no overrides ---------- */

@media (max-width: 720px) {
    .site-nav {
        position: fixed; top: 76px; left: 0; right: 0; bottom: 0; z-index: 60;
        background: #fff; flex-direction: column; align-items: flex-start;
        padding: 1.5rem; gap: 0; transform: translateX(100%); transition: transform 0.25s ease;
        overflow-y: auto;
    }
    .site-nav.open { transform: translateX(0); }
    .site-nav a { width: 100%; padding: 0.9rem 0; border-bottom: 1px solid var(--border); }
    .site-nav a.nav-cta { margin-top: 1rem; text-align: center; }
    .nav-toggle { display: flex; }

    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 2rem; text-align: left; }
    .form-row { grid-template-columns: 1fr; }
    section.section { padding: 3.5rem 0; }
    .hero { padding: 4rem 0 3rem; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}
