/* =========================================================================
   OrderOK - Tenant Homepage Styles
   Production CSS for SaaS booking platform tenant homepages.
   Relies on CSS custom properties set via inline <style> in the layout.
   ========================================================================= */

/* ── Keyframes ─────────────────────────────────────────────────────────── */

@keyframes subtleGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Header ────────────────────────────────────────────────────────────── */

.homepage-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: color-mix(in srgb, var(--card-bg, #FFFFFF) 85%, transparent);
    backdrop-filter: blur(14px) saturate(1.6);
    -webkit-backdrop-filter: blur(14px) saturate(1.6);
    border-bottom: 1px solid rgba(0, 0, 0, 0.07);
    transition: box-shadow 0.25s ease;
}

.homepage-header.scrolled {
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.homepage-header .btn-primary-custom {
    background-color: var(--color-primary, #D97858);
    border-color: var(--color-primary, #D97858);
    color: var(--btn-text-color, #ffffff);
    font-weight: 600;
    padding: 0.5rem 1.25rem;
    transition: background-color 0.2s ease, border-color 0.2s ease,
        transform 0.2s ease, box-shadow 0.2s ease;
}

.homepage-header .btn-primary-custom:hover {
    background-color: var(--color-primary-dark, #C67955);
    border-color: var(--color-primary-dark, #C67955);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.homepage-header .btn-primary-custom:active {
    transform: translateY(0);
    box-shadow: none;
}

/* ── Hero Section ──────────────────────────────────────────────────────── */

.homepage-hero {
    min-height: 480px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: var(--theme-hero-gradient, linear-gradient(135deg, #FFF5F0, #F5F1E8));
    background-size: 200% 200%;
    animation: subtleGradient 12s ease infinite;
}

/* Common inner wrapper structure */
.hero-inner-wrapper {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
}

.hero-text-col {
    max-width: 600px;
}

/* 1. Centered (Default) */
.homepage-hero.hero-layout-centered .hero-inner-wrapper {
    align-items: center;
    text-align: center;
}

.homepage-hero.hero-layout-centered .hero-text-col {
    margin: 0 auto;
}

/* 2. Left Aligned */
.homepage-hero.hero-layout-left .hero-inner-wrapper {
    align-items: flex-start;
    text-align: left;
}

/* 3. Split Left (Text Left, Image Right) - For background images, this pushes content left */
.homepage-hero.hero-layout-split-left .hero-inner-wrapper {
    align-items: flex-start;
    text-align: left;
    max-width: 50%;
}

@media (max-width: 768px) {
    .homepage-hero.hero-layout-split-left .hero-inner-wrapper {
        max-width: 100%;
    }
}

/* 4. Split Right (Text Right, Image Left) */
.homepage-hero.hero-layout-split-right .homepage-hero-content {
    display: flex;
    justify-content: flex-end;
}

.homepage-hero.hero-layout-split-right .hero-inner-wrapper {
    align-items: flex-start;
    text-align: left;
    max-width: 50%;
}

@media (max-width: 768px) {
    .homepage-hero.hero-layout-split-right .hero-inner-wrapper {
        max-width: 100%;
    }
}

/* 5. Card Overlay (Floating card) */
.homepage-hero.hero-layout-card .hero-inner-wrapper {
    align-items: center;
    justify-content: center;
}

.homepage-hero.hero-layout-card .hero-text-col {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 3rem;
    border-radius: var(--border-radius, 16px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    text-align: center;
    color: var(--text-color, #1a1a1a) !important;
    /* Force dark text inside card */
}

/* Ensure text inside card is visible even if hero has dark background class */
.homepage-hero.hero-layout-card .text-white .hero-text-col h1,
.homepage-hero.hero-layout-card .text-white .hero-text-col p {
    color: var(--text-color, #1a1a1a) !important;
}

/* 6. Outline Card (Stitch Minimal) */
.homepage-hero.hero-layout-card.hp-card-outline .hero-text-col {
    border: 1px solid var(--text-color);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: none;
}

/* 7. Glass Card (Stitch Tech) */
.homepage-hero.hero-layout-card.hp-card-glass .hero-text-col {
    background: rgba(11, 12, 16, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(102, 252, 241, 0.4);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6);
    color: #fff !important;
}

.homepage-hero.hero-layout-card.hp-card-glass .hero-text-col h1,
.homepage-hero.hero-layout-card.hp-card-glass .hero-text-col p {
    color: #fff !important;
}

/* 8. Paper Card (Stitch Cafe) */
.homepage-hero.hero-layout-card.hp-card-paper .hero-text-col {
    background: #fdfbf7;
    background-image: url("data:image/svg+xml,%3Csvg width='6' height='6' viewBox='0 0 6 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%239C92AC' fill-opacity='0.1' fill-rule='evenodd'%3E%3Cpath d='M5 0h1L0 6V5zM6 5v1H5z'/%3E%3C/g%3E%3C/svg%3E");
    border: 1px dashed #d4a373;
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

/* 9. Soft Shadow (Stitch Spa) */
.homepage-hero.hero-layout-card.hp-card-soft-shadow .hero-text-col {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 20px 60px -10px rgba(0, 0, 0, 0.1);
    border: none;
}

/* 10. Border Left (Stitch Classic) */
.homepage-hero.hero-layout-card.hp-card-border-left .hero-text-col {
    background: #fff;
    border-left: 4px solid var(--color-primary);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-radius: 4px;
}

/* 11. Outline Bold (Stitch Gym) */
.homepage-hero.hero-layout-card.hp-card-outline-bold .hero-text-col {
    background: rgba(0, 0, 0, 0.8);
    border: 3px solid var(--color-primary);
    box-shadow: 8px 8px 0 var(--color-primary);
    color: #fff !important;
}

.homepage-hero.hero-layout-card.hp-card-outline-bold .hero-text-col h1,
.homepage-hero.hero-layout-card.hp-card-outline-bold .hero-text-col p {
    color: #fff !important;
}

/* 12. Colorful Shadow (Stitch Kids) */
.homepage-hero.hero-layout-card.hp-card-colorful-shadow .hero-text-col {
    background: #fff;
    border: 3px solid var(--color-primary);
    box-shadow: 6px 6px 0 var(--color-accent);
}

/* ── Hero Mask Layer ───────────────────────────────────────────────────── */
.hero-mask-layer {
    position: absolute;
    bottom: -1px;
    /* Avoid sub-pixel gap */
    left: 0;
    width: 100%;
    overflow: hidden;
    line-height: 0;
    z-index: 1;
}

.hero-mask-layer svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 80px;
    /* Default height */
}

@media (min-width: 768px) {
    .hero-mask-layer svg {
        height: 120px;
    }
}

@media (min-width: 1200px) {
    .hero-mask-layer svg {
        height: 160px;
    }
}

/* Hero style: solid — no animation */
body[data-hero-style="solid"] .homepage-hero {
    background: var(--color-hero-bg, var(--color-primary-light, #FFF5F0));
    background-size: auto;
    animation: none;
}

/* Hero style: image — handled via .has-banner below */
body[data-hero-style="image"] .homepage-hero {
    animation: none;
}

/* Banner variant — static single image (not carousel) */
.homepage-hero.has-banner:not(.is-carousel) {
    background-image: var(--banner-url);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    animation: none;
}

/* Carousel mode: background handled by .hero-slide layers, disable gradient anim */
.homepage-hero.is-carousel {
    animation: none;
}

/* Dark overlay for banner readability */
.homepage-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(0, 0, 0, 0.35) 0%,
            rgba(0, 0, 0, 0.55) 100%);
    z-index: 0;
    pointer-events: none;
}

/* Hero content sits above overlay */
.homepage-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    animation: fadeInUp 0.6s ease-out both;
}

.homepage-hero-content h1 {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-color, #1a1a1a);
}

/* Sharper text shadows when a banner image is present */
.homepage-hero.has-banner .homepage-hero-content h1 {
    color: #fff;
    text-shadow:
        0 2px 8px rgba(0, 0, 0, 0.45),
        0 1px 3px rgba(0, 0, 0, 0.3);
}

.homepage-hero.has-banner .homepage-hero-content p {
    color: rgba(255, 255, 255, 0.92);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.homepage-hero-content p {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 1.1rem;
    color: var(--text-muted, #666);
    max-width: 560px;
    line-height: 1.6;
}

/* ── Card Styles ───────────────────────────────────────────────────────── */

/* 1. Shadow (default) */
.hp-card-shadow {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

/* 2. Flat */
.hp-card-flat {
    box-shadow: none !important;
    border: 1px solid rgba(0, 0, 0, 0.05);
    background-color: var(--card-bg, #FFFFFF);
}

/* 3. Outline */
.hp-card-outline {
    box-shadow: none !important;
    border: 2px solid rgba(0, 0, 0, 0.1);
    background-color: transparent;
}

/* 4. 3D */
.hp-card-3d {
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.15) !important;
    border: 2px solid rgba(0, 0, 0, 0.1);
    transform: translate(-2px, -2px);
    transition: transform 0.2s, box-shadow 0.2s;
}

.hp-card-3d:hover {
    transform: translate(0, 0);
    box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.15) !important;
}

/* ── Block Grid ────────────────────────────────────────────────────────── */

.homepage-blocks {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-auto-rows: auto;
    gap: 1.5rem;
    padding: 2.5rem 0;
}

/* Base block card */
.hp-block {
    background-color: var(--card-bg, #FFFFFF);
    border-radius: var(--border-radius, 16px);
    padding: 2rem;
    height: 100%;
    /* Default style is now handled by utility classes like .hp-card-shadow */
    /* box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06); */
    /* border: 1px solid rgba(0, 0, 0, 0.03); */
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.hp-block:hover {
    transform: translateY(-3px);
    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.06),
        0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Column span utilities */
.hp-block-full {
    grid-column: span 12;
}

.hp-block-half {
    grid-column: span 6;
}

.hp-block-third {
    grid-column: span 4;
}

/* Block heading */
.hp-block-title {
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 1rem;
    color: var(--text-color, #1a1a1a);
    line-height: 1.3;
}

/* ── Announcement Block ────────────────────────────────────────────────── */

.announcement-item {
    border-left: 4px solid var(--color-primary, #D97858);
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    background: var(--theme-accent, #FFF5F0);
    border-radius: 0 var(--border-radius, 8px) var(--border-radius, 8px) 0;
    transition: background-color 0.2s ease;
}

.announcement-item:last-child {
    margin-bottom: 0;
}

.announcement-item:hover {
    background: color-mix(in srgb, var(--theme-accent, #FFF5F0) 70%, var(--color-primary, #D97858));
}

.announcement-item .ann-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-color, #1a1a1a);
    line-height: 1.4;
}

.announcement-item .ann-content {
    color: var(--text-muted, #666);
    font-size: 0.85rem;
    margin-top: 0.3rem;
    line-height: 1.55;
}

/* ── Business Hours Block ──────────────────────────────────────────────── */

.hours-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.55rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.9rem;
    color: var(--text-color, #1a1a1a);
    transition: background-color 0.15s ease;
}

.hours-row:last-child {
    border-bottom: none;
}

.hours-row:hover {
    background-color: rgba(0, 0, 0, 0.015);
}

.hours-row .day-name {
    font-weight: 500;
    min-width: 48px;
}

.hours-row.hours-closed .hours-time {
    color: var(--text-muted, #aaa);
    font-style: italic;
}

.hours-open-badge {
    background: var(--color-primary, #D97858);
    color: #fff;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* ── Services Block ────────────────────────────────────────────────────── */

.hp-service-card {
    display: block;
    border: 1.5px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--border-radius, 12px);
    padding: 1.15rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease,
        transform 0.2s ease;
    text-decoration: none;
    color: inherit;
    background: var(--card-bg, #FFFFFF);
}

.hp-service-card:hover {
    border-color: var(--color-primary, #D97858);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
    color: inherit;
    text-decoration: none;
}

.hp-service-card:active {
    transform: translateY(-1px);
}

/* Accent bar at the top of service cards */
.hp-service-accent {
    border-top: 3px solid var(--color-primary, #D97858);
}

.hp-service-name {
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.3rem;
    color: var(--text-color, #1a1a1a);
}

.hp-service-desc {
    color: var(--text-muted, #888);
    font-size: 0.82rem;
    line-height: 1.5;
}

.hp-service-price {
    color: var(--color-primary, #D97858);
    font-weight: 700;
    font-size: 1.05rem;
}

.hp-service-duration {
    color: var(--text-muted, #999);
    font-size: 0.8rem;
    font-weight: 400;
}

/* ── Staff Block ───────────────────────────────────────────────────────── */

/* Grid: horizontal wrap, auto-fill columns (min 80px each) */
.hp-staff-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
}

.hp-staff-card {
    text-align: center;
    padding: 0.75rem 0.5rem;
    transition: transform 0.2s ease;
    flex: 0 0 auto;
    width: calc(20% - 0.8rem);
    /* default: ~5 per row */
    min-width: 80px;
    max-width: 120px;
}

.hp-staff-card:hover {
    transform: translateY(-2px);
}

.hp-staff-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg,
            var(--color-primary, #D97858),
            var(--color-primary-dark, #C67955));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 auto 0.5rem;
    overflow: hidden;
    box-shadow: 0 0 0 3px var(--card-bg, #FFFFFF),
        0 0 0 4px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.hp-staff-card:hover .hp-staff-avatar {
    box-shadow: 0 0 0 3px var(--card-bg, #FFFFFF),
        0 0 0 4px var(--color-primary-light, rgba(217, 120, 88, 0.3)),
        0 0 14px rgba(217, 120, 88, 0.2);
    transform: scale(1.04);
}

.hp-staff-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.hp-staff-name {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-color, #1a1a1a);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hp-staff-title {
    color: var(--text-muted, #999);
    font-size: 0.72rem;
    margin-top: 0.15rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ── Booking CTA Block ─────────────────────────────────────────────────── */

.hp-cta-block {
    background: var(--color-primary, #D97858) !important;
    color: #fff;
    text-align: center;
    padding: 3.5rem 2rem !important;
    border-radius: var(--border-radius, 16px);
    position: relative;
    overflow: hidden;
}

/* CSS-only subtle pattern overlay */
.hp-cta-pattern {
    position: absolute;
    inset: 0;
    opacity: 0.06;
    background-image:
        repeating-linear-gradient(45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 1) 10px,
            rgba(255, 255, 255, 1) 11px),
        repeating-linear-gradient(-45deg,
            transparent,
            transparent 10px,
            rgba(255, 255, 255, 1) 10px,
            rgba(255, 255, 255, 1) 11px);
    pointer-events: none;
    z-index: 0;
}

/* Content sits above the pattern */
.hp-cta-content {
    position: relative;
    z-index: 1;
}

.hp-cta-block h3 {
    color: #fff;
    font-family: var(--font-heading, 'Playfair Display', serif);
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 0.6rem;
}

.hp-cta-block p {
    color: rgba(255, 255, 255, 0.82);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.55;
}

.hp-cta-btn {
    background: var(--btn-text-color, #ffffff);
    color: var(--color-primary, #D97858);
    border: none;
    border-radius: 50px;
    padding: 0.8rem 2.5rem;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease,
        transform 0.2s ease, box-shadow 0.2s ease;
}

.hp-cta-btn:hover {
    background: rgba(255, 255, 255, 0.92);
    color: var(--color-primary-dark, #C67955);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    text-decoration: none;
}

.hp-cta-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* ── Button Style Variants ─────────────────────────────────────────────── */

/* Pill buttons */
body[data-btn-style="pill"] .btn-primary-custom,
body[data-btn-style="pill"] .hp-cta-btn,
body[data-btn-style="pill"] .hp-service-card {
    border-radius: 50px;
}

/* Rounded buttons */
body[data-btn-style="rounded"] .btn-primary-custom,
body[data-btn-style="rounded"] .hp-cta-btn {
    border-radius: 8px;
}

body[data-btn-style="rounded"] .hp-service-card {
    border-radius: 8px;
}

/* Square buttons */
body[data-btn-style="square"] .btn-primary-custom,
body[data-btn-style="square"] .hp-cta-btn {
    border-radius: 0;
}

body[data-btn-style="square"] .hp-service-card {
    border-radius: 0;
}

/* ── Utility: links within blocks ──────────────────────────────────────── */

.hp-block a:not(.hp-social-btn) {
    color: var(--color-primary, #D97858);
    text-decoration: none;
    transition: color 0.2s ease;
}

.hp-block a:not(.hp-social-btn):hover {
    color: var(--color-primary-dark, #C67955);
    text-decoration: underline;
}

/* ── Utility: empty state ──────────────────────────────────────────────── */

.hp-block-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted, #999);
    font-size: 0.9rem;
}

/* ── Typography helpers ────────────────────────────────────────────────── */

.homepage-hero-content h1,
.hp-cta-block h3,
.hp-block-title {
    font-family: var(--font-heading, 'Playfair Display', serif);
}

.homepage-hero-content p,
.hp-service-desc,
.ann-content,
.hp-staff-title,
.hours-row {
    font-family: var(--font-body, 'Inter', sans-serif);
}

/* ── Responsive: Tablet (max-width: 992px) ─────────────────────────────── */

@media (max-width: 992px) {
    .hp-block-third {
        grid-column: span 6;
    }

    .homepage-hero {
        min-height: 400px;
    }

    .homepage-hero-content h1 {
        font-size: clamp(1.75rem, 4.5vw, 2.5rem);
    }

    .hp-staff-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.2rem;
    }

    /* 4 per row on tablet */
    .hp-staff-card {
        width: calc(25% - 0.75rem);
    }
}

/* ── Responsive: Mobile (max-width: 768px) ─────────────────────────────── */

@media (max-width: 768px) {

    .homepage-blocks {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem;
        padding: 1.5rem 0;
    }

    .hp-block,
    .hp-block-full,
    .hp-block-half,
    .hp-block-third {
        width: 100% !important;
        margin-bottom: 0 !important;
    }

    .homepage-hero {
        min-height: 340px;
    }

    .homepage-hero-content h1 {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .homepage-hero-content p {
        font-size: 0.95rem;
    }

    .hp-block {
        padding: 1.25rem;
    }

    .hp-block:hover {
        transform: none;
        box-shadow:
            0 1px 3px rgba(0, 0, 0, 0.04),
            0 4px 14px rgba(0, 0, 0, 0.06);
    }

    .hp-cta-block {
        padding: 2.5rem 1.5rem !important;
    }

    .hp-cta-block h3 {
        font-size: 1.25rem;
    }

    .hp-cta-btn {
        padding: 0.7rem 2rem;
        font-size: 0.95rem;
    }

    .hp-staff-avatar {
        width: 56px;
        height: 56px;
        font-size: 1.1rem;
    }

    /* 3 per row on mobile */
    .hp-staff-card {
        width: calc(33.333% - 0.67rem);
    }

    .hp-service-card {
        padding: 1rem;
    }
}

/* ── Responsive: Small mobile (max-width: 480px) ──────────────────────── */

@media (max-width: 480px) {
    .homepage-hero {
        min-height: 280px;
    }

    .homepage-blocks {
        gap: 0.75rem;
        padding: 1rem 0;
    }

    .hp-block {
        padding: 1rem;
        border-radius: calc(var(--border-radius, 16px) * 0.75);
    }

    .hp-block-title {
        font-size: 1.05rem;
    }

    .hours-row {
        font-size: 0.85rem;
    }
}

/* ── Print ─────────────────────────────────────────────────────────────── */

@media print {
    .homepage-header {
        position: static;
        backdrop-filter: none;
    }

    .homepage-hero {
        min-height: auto;
        padding: 2rem 0;
        animation: none;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .hp-block {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #e0e0e0;
    }

    .hp-cta-pattern {
        display: none;
    }
}

/* ── Accessibility: Reduced Motion ─────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .homepage-hero {
        animation: none;
    }

    .homepage-hero-content {
        animation: none;
    }

    .hp-block,
    .hp-service-card,
    .hp-staff-card,
    .hp-cta-btn,
    .btn-primary-custom,
    .hp-staff-avatar {
        transition: none;
    }

    .hp-block:hover,
    .hp-service-card:hover,
    .hp-staff-card:hover {
        transform: none;
    }
}

/* ── Hero Carousel ────────────────────────────────────────────────────────── */

/* Individual slide: absolutely positioned, fade in/out */
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.8s ease;
    z-index: 0;
}

.hero-slide.is-active {
    opacity: 1;
}

/* Ensure overlay and content are above slides */
.homepage-hero.is-carousel .homepage-hero-overlay {
    z-index: 1;
}

.homepage-hero.is-carousel .homepage-hero-content {
    z-index: 2;
}

/* Prev / Next arrows */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.35);
    border: none;
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s;
}

.hero-arrow:hover {
    background: rgba(0, 0, 0, 0.6);
}

.hero-arrow--prev {
    left: 1rem;
}

.hero-arrow--next {
    right: 1rem;
}

/* Dot indicators */
.hero-dots {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.hero-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.7);
    background: transparent;
    cursor: pointer;
    padding: 0;
    transition: background 0.2s, border-color 0.2s;
}

.hero-dot.is-active {
    background: #fff;
    border-color: #fff;
}

/* ── Google Maps Block ───────────────────────────────────────── */
.hp-map-wrapper {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    /* 16:9 比例 */
    min-height: 200px;
    border-radius: var(--border-radius, 12px);
    overflow: hidden;
    transform: translateZ(0);
    /* Safari iOS: fix border-radius clipping on iframe */
}

.hp-map-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ── Social Media Block ───────────────────────── */
.hp-social-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.5rem 0;
}

.hp-social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    transition: transform 0.18s ease, opacity 0.18s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.hp-social-btn:hover {
    transform: scale(1.12);
    opacity: 0.92;
    color: #fff;
    text-decoration: none;
}

.hp-social-x {
    background: #000;
}

.hp-social-facebook {
    background: #1877F2;
}

.hp-social-instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.hp-social-threads {
    background: #000;
}