/* ═══════════════════════════════════════════════════════════════════════
   HairStyleMojo — Homepage SEO Template Styles
   Brand: #4A8FE7 (blue), #3A7BD5 (deep blue), #F5A623 (gold),
          #2D3748 (charcoal), #EDF2F7 (soft grey)
   ═══════════════════════════════════════════════════════════════════════ */

/* ── Reset & Base ──────────────────────────────────────────────────── */
.hsm-homepage {
    --hsm-blue: #4A8FE7;
    --hsm-blue-deep: #3A7BD5;
    --hsm-blue-light: #EBF4FF;
    --hsm-gold: #F5A623;
    --hsm-dark: #2D3748;
    --hsm-gray: #4A5568;
    --hsm-gray-light: #718096;
    --hsm-bg: #FFFFFF;
    --hsm-bg-alt: #F7FAFC;
    --hsm-bg-soft: #EDF2F7;
    --hsm-radius: 12px;
    --hsm-radius-sm: 8px;
    --hsm-shadow: 0 2px 8px rgba(0,0,0,0.08);
    --hsm-shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --hsm-transition: 0.2s ease;

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    color: var(--hsm-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

.hsm-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Typography ────────────────────────────────────────────────────── */
.hsm-section-title {
    font-size: 2rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 12px;
    color: var(--hsm-dark);
    line-height: 1.2;
}

.hsm-section-title--left {
    text-align: left;
}

.hsm-section-desc {
    font-size: 1.125rem;
    color: var(--hsm-gray);
    text-align: center;
    max-width: 700px;
    margin: 0 auto 48px;
    line-height: 1.7;
}

/* ── Buttons ───────────────────────────────────────────────────────── */
.hsm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 32px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    text-decoration: none;
    transition: all var(--hsm-transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.hsm-btn--primary {
    background: linear-gradient(135deg, var(--hsm-blue), var(--hsm-blue-deep));
    color: #fff;
    box-shadow: 0 4px 15px rgba(74,143,231,0.35);
}

.hsm-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(74,143,231,0.45);
    color: #fff;
    text-decoration: none;
}

.hsm-btn--secondary {
    background: #fff;
    color: var(--hsm-blue);
    border-color: var(--hsm-blue);
}

.hsm-btn--secondary:hover {
    background: var(--hsm-blue-light);
    color: var(--hsm-blue-deep);
    text-decoration: none;
}

.hsm-btn--large {
    padding: 18px 48px;
    font-size: 1.125rem;
}

.hsm-link {
    color: var(--hsm-blue);
    font-weight: 600;
    text-decoration: none;
    transition: color var(--hsm-transition);
}

.hsm-link:hover {
    color: var(--hsm-blue-deep);
    text-decoration: underline;
}

/* ── Placeholder boxes (replaced when real images are uploaded) ───── */
.hsm-placeholder-box {
    width: 100%;
    aspect-ratio: auto;
    max-width: 680px;
    background: linear-gradient(135deg, var(--hsm-bg-soft) 0%, var(--hsm-blue-light) 100%);
    border-radius: var(--hsm-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed var(--hsm-blue);
    opacity: 0.5;
}

.hsm-placeholder-box span {
    font-size: 0.9rem;
    color: var(--hsm-blue);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hsm-hero__placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
}

.hsm-hero__placeholder img,
.hsm-showcase__visual img {
    width: 100%;
    max-width: 680px;
    height: auto;
    border-radius: var(--hsm-radius);
    box-shadow: var(--hsm-shadow-lg);
}

/* ══════════════════════════════════════════════════════════════════════
   HERO
   ══════════════════════════════════════════════════════════════════════ */
.hsm-hero {
    background: linear-gradient(160deg, #F0F5FF 0%, #fff 50%, #FFF8ED 100%);
    padding: 80px 0 60px;
    position: relative;
    overflow: hidden;
}

.hsm-hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -150px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(74,143,231,0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hsm-hero .hsm-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}

.hsm-hero__title {
    font-size: 2.75rem;
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 20px;
    color: var(--hsm-dark);
}

.hsm-hero__subtitle {
    font-size: 1.2rem;
    color: var(--hsm-gray);
    margin-bottom: 32px;
    line-height: 1.7;
    max-width: 520px;
}

.hsm-hero__ctas {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hsm-hero__visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ══════════════════════════════════════════════════════════════════════
   TRUST BAR
   ══════════════════════════════════════════════════════════════════════ */
.hsm-trust {
    background: var(--hsm-bg-alt);
    border-top: 1px solid var(--hsm-bg-soft);
    border-bottom: 1px solid var(--hsm-bg-soft);
    padding: 28px 0;
}

.hsm-trust__grid {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
}

.hsm-trust__item {
    text-align: center;
    flex-shrink: 0;
}

.hsm-trust__number {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--hsm-blue);
}

.hsm-trust__label {
    font-size: 0.85rem;
    color: var(--hsm-gray-light);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hsm-trust__divider {
    width: 1px;
    height: 36px;
    background: var(--hsm-bg-soft);
    flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════════════════
   HOW IT WORKS
   ══════════════════════════════════════════════════════════════════════ */
.hsm-how {
    padding: 80px 0;
    background: var(--hsm-bg);
}

.hsm-how__steps {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
    margin-bottom: 48px;
}

.hsm-how__step {
    text-align: center;
    max-width: 280px;
    flex: 1;
}

.hsm-how__icon {
    margin-bottom: 20px;
}

.hsm-how__connector {
    display: flex;
    align-items: center;
    padding-top: 24px;
    flex-shrink: 0;
}

.hsm-how__step-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--hsm-dark);
}

.hsm-how__step-text {
    font-size: 0.95rem;
    color: var(--hsm-gray);
    line-height: 1.6;
}

.hsm-how__cta {
    text-align: center;
}

/* ══════════════════════════════════════════════════════════════════════
   CATEGORY GRID
   ══════════════════════════════════════════════════════════════════════ */
.hsm-categories {
    padding: 80px 0;
    background: var(--hsm-bg-alt);
}

.hsm-categories__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.hsm-cat-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border-radius: var(--hsm-radius);
    box-shadow: var(--hsm-shadow);
    text-decoration: none;
    color: var(--hsm-dark);
    transition: all var(--hsm-transition);
    overflow: hidden;
}

.hsm-cat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hsm-shadow-lg);
    text-decoration: none;
    color: var(--hsm-dark);
}

.hsm-cat-card__thumb {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
}

.hsm-cat-card__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hsm-cat-card:hover .hsm-cat-card__thumb img {
    transform: scale(1.05);
}

.hsm-cat-card__name {
    font-size: 1rem;
    font-weight: 700;
    margin: 12px 0 4px;
    text-align: center;
    padding: 0 12px;
}

.hsm-cat-card__count {
    font-size: 0.85rem;
    color: var(--hsm-gray-light);
    padding-bottom: 14px;
}

.hsm-categories__more {
    text-align: center;
}

/* ══════════════════════════════════════════════════════════════════════
   AI SHOWCASE
   ══════════════════════════════════════════════════════════════════════ */
.hsm-showcase {
    padding: 80px 0;
    background: var(--hsm-bg);
}

.hsm-showcase__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: center;
}

.hsm-showcase__text p {
    font-size: 1.05rem;
    color: var(--hsm-gray);
    margin-bottom: 16px;
    line-height: 1.7;
}

.hsm-showcase__features {
    list-style: none;
    padding: 0;
    margin: 24px 0 32px;
}

.hsm-showcase__features li {
    position: relative;
    padding-left: 28px;
    margin-bottom: 14px;
    font-size: 1rem;
    line-height: 1.5;
}

.hsm-showcase__features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: var(--hsm-blue);
    font-weight: 700;
    font-size: 1.1rem;
}

.hsm-showcase__visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ── Phone Frame Mockup ─────────────────────────────────────────────── */
.hsm-phone-frame {
    position: relative;
    background: #1a1a1a;
    border-radius: 40px;
    padding: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25), inset 0 0 0 2px #333;
    max-width: 280px;
}

.hsm-phone-frame__notch {
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 24px;
    background: #1a1a1a;
    border-radius: 0 0 16px 16px;
    z-index: 2;
}

.hsm-phone-frame__screen {
    border-radius: 28px;
    overflow: hidden;
    background: #fff;
}

.hsm-phone-frame__screen img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0;
    box-shadow: none;
}

/* ══════════════════════════════════════════════════════════════════════
   VIRTUAL HAIR COLOR TRY-ON
   ══════════════════════════════════════════════════════════════════════ */
.hsm-color-tryon {
    padding: 80px 0;
    background: linear-gradient(160deg, #FFF8ED 0%, #fff 50%, #F0F5FF 100%);
}

.hsm-color-tryon__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin: 40px 0;
}

.hsm-color-tryon__card {
    background: #fff;
    border-radius: var(--hsm-radius);
    padding: 0 20px 24px;
    box-shadow: var(--hsm-shadow);
    text-align: center;
    transition: all var(--hsm-transition);
}

.hsm-color-tryon__card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hsm-shadow-lg);
}

.hsm-color-tryon__swatch {
    width: 100%;
    height: 80px;
    border-radius: var(--hsm-radius) var(--hsm-radius) 0 0;
    margin: 0 -20px 20px;
    width: calc(100% + 40px);
}

.hsm-color-tryon__card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--hsm-dark);
}

.hsm-color-tryon__card p {
    font-size: 0.9rem;
    color: var(--hsm-gray);
    line-height: 1.5;
    margin: 0;
}

.hsm-color-tryon__cta {
    text-align: center;
    margin-top: 10px;
}

/* ══════════════════════════════════════════════════════════════════════
   EDITOR PICKS
   ══════════════════════════════════════════════════════════════════════ */
.hsm-picks {
    padding: 80px 0;
    background: var(--hsm-bg-alt);
}

.hsm-picks__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
}

.hsm-post-card {
    background: #fff;
    border-radius: var(--hsm-radius);
    overflow: hidden;
    box-shadow: var(--hsm-shadow);
    text-decoration: none;
    color: var(--hsm-dark);
    transition: all var(--hsm-transition);
}

.hsm-post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--hsm-shadow-lg);
    text-decoration: none;
    color: var(--hsm-dark);
}

.hsm-post-card__img {
    aspect-ratio: 4/3;
    overflow: hidden;
}

.hsm-post-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hsm-post-card:hover .hsm-post-card__img img {
    transform: scale(1.05);
}

.hsm-post-card__body {
    padding: 16px;
}

.hsm-post-card__title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hsm-post-card__meta {
    font-size: 0.8rem;
    color: var(--hsm-gray-light);
}

/* ══════════════════════════════════════════════════════════════════════
   POPULAR STYLES
   ══════════════════════════════════════════════════════════════════════ */
.hsm-popular {
    padding: 80px 0;
    background: var(--hsm-bg);
}

.hsm-popular__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.hsm-thumb-card {
    text-decoration: none;
    color: var(--hsm-dark);
    transition: all var(--hsm-transition);
}

.hsm-thumb-card:hover {
    text-decoration: none;
    color: var(--hsm-dark);
}

.hsm-thumb-card__img {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--hsm-radius);
    margin-bottom: 12px;
    box-shadow: var(--hsm-shadow);
}

.hsm-thumb-card__img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hsm-thumb-card:hover .hsm-thumb-card__img img {
    transform: scale(1.05);
}

.hsm-thumb-card__title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hsm-popular__more {
    text-align: center;
}

/* ══════════════════════════════════════════════════════════════════════
   FAQ SECTION
   ══════════════════════════════════════════════════════════════════════ */
.hsm-faq {
    padding: 80px 0;
    background: var(--hsm-bg-alt);
}

.hsm-faq__list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.hsm-faq__item {
    background: #fff;
    border-radius: var(--hsm-radius);
    box-shadow: var(--hsm-shadow);
    overflow: hidden;
    transition: box-shadow var(--hsm-transition);
}

.hsm-faq__item:hover {
    box-shadow: var(--hsm-shadow-lg);
}

.hsm-faq__item[open] {
    box-shadow: 0 4px 20px rgba(74, 143, 231, 0.15);
}

.hsm-faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--hsm-dark);
    cursor: pointer;
    list-style: none;
    user-select: none;
    transition: color var(--hsm-transition);
}

.hsm-faq__question::-webkit-details-marker {
    display: none;
}

.hsm-faq__question::after {
    content: '+';
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--hsm-blue-light);
    color: var(--hsm-blue);
    border-radius: 50%;
    font-size: 1.25rem;
    font-weight: 700;
    margin-left: 16px;
    transition: all var(--hsm-transition);
}

.hsm-faq__item[open] .hsm-faq__question {
    color: var(--hsm-blue);
}

.hsm-faq__item[open] .hsm-faq__question::after {
    content: '−';
    background: var(--hsm-blue);
    color: #fff;
    transform: rotate(180deg);
}

.hsm-faq__answer {
    padding: 0 24px 24px;
}

.hsm-faq__answer p {
    font-size: 1rem;
    color: var(--hsm-gray);
    line-height: 1.75;
    margin: 0;
}

.hsm-faq__answer a {
    color: var(--hsm-blue);
    font-weight: 600;
    text-decoration: none;
}

.hsm-faq__answer a:hover {
    text-decoration: underline;
    color: var(--hsm-blue-deep);
}

/* ══════════════════════════════════════════════════════════════════════
   FINAL CTA
   ══════════════════════════════════════════════════════════════════════ */
.hsm-final-cta {
    padding: 80px 0;
    background: linear-gradient(160deg, var(--hsm-blue) 0%, var(--hsm-blue-deep) 100%);
    color: #fff;
    text-align: center;
}

.hsm-final-cta__title {
    font-size: 2.25rem;
    font-weight: 800;
    margin-bottom: 16px;
    color: #fff;
}

.hsm-final-cta__text {
    font-size: 1.15rem;
    max-width: 650px;
    margin: 0 auto 36px;
    line-height: 1.7;
    opacity: 0.92;
}

.hsm-final-cta .hsm-btn--primary {
    background: #fff;
    color: var(--hsm-blue-deep);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.hsm-final-cta .hsm-btn--primary:hover {
    background: #fff;
    color: var(--hsm-dark);
    box-shadow: 0 6px 30px rgba(0,0,0,0.2);
}

/* ══════════════════════════════════════════════════════════════════════
   STICKY MOBILE CTA
   ══════════════════════════════════════════════════════════════════════ */
.hsm-sticky-cta {
    display: none;
}

@media (max-width: 768px) {
    .hsm-sticky-cta {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 999;
        padding: 12px 16px;
        background: rgba(255,255,255,0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    }

    .hsm-sticky-cta__btn {
        display: block;
        width: 100%;
        text-align: center;
        padding: 14px 24px;
        background: var(--hsm-blue);
        color: #fff !important;
        font-size: 1.05rem;
        font-weight: 700;
        border-radius: 50px;
        text-decoration: none;
        box-shadow: 0 4px 15px rgba(74,143,231,0.4);
    }

    .hsm-sticky-cta__btn:hover {
        background: var(--hsm-blue-deep);
        text-decoration: none;
        color: #fff;
    }

    /* Add bottom padding to page so content isn't hidden behind sticky CTA */
    .hsm-final-cta {
        padding-bottom: 100px;
    }
}

/* ══════════════════════════════════════════════════════════════════════
   RESPONSIVE — Tablet (≤ 1024px)
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .hsm-hero .hsm-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hsm-hero__title {
        font-size: 2.25rem;
    }

    .hsm-hero__subtitle {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .hsm-hero__ctas {
        justify-content: center;
    }

    .hsm-hero__visual {
        order: -1;
    }

    .hsm-categories__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hsm-showcase__grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hsm-showcase__text {
        order: 1;
    }

    .hsm-section-title--left {
        text-align: center;
    }

    .hsm-picks__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hsm-popular__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .hsm-color-tryon__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ══════════════════════════════════════════════════════════════════════
   RESPONSIVE — Mobile (≤ 640px)
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
    .hsm-hero {
        padding: 48px 0 40px;
    }

    .hsm-hero__title {
        font-size: 1.75rem;
    }

    .hsm-hero__subtitle {
        font-size: 1rem;
    }

    .hsm-hero__ctas {
        flex-direction: column;
        align-items: center;
    }

    .hsm-hero__ctas .hsm-btn {
        width: 100%;
        max-width: 300px;
    }

    .hsm-section-title {
        font-size: 1.5rem;
    }

    .hsm-section-desc {
        font-size: 1rem;
        margin-bottom: 32px;
    }

    .hsm-trust__grid {
        flex-wrap: wrap;
        gap: 16px;
    }

    .hsm-trust__divider {
        display: none;
    }

    .hsm-trust__item {
        width: 45%;
    }

    .hsm-how__steps {
        flex-direction: column;
        align-items: center;
    }

    .hsm-how__connector {
        transform: rotate(90deg);
        padding-top: 0;
        margin: 8px 0;
    }

    .hsm-how, .hsm-categories, .hsm-showcase, .hsm-color-tryon,
    .hsm-picks, .hsm-popular, .hsm-faq, .hsm-final-cta {
        padding: 56px 0;
    }

    .hsm-color-tryon__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hsm-categories__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .hsm-cat-card {
        padding: 0;
    }

    .hsm-picks__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .hsm-popular__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .hsm-final-cta__title {
        font-size: 1.6rem;
    }

    .hsm-final-cta__text {
        font-size: 1rem;
    }

    .hsm-btn--large {
        padding: 16px 32px;
        font-size: 1rem;
    }

    .hsm-faq__question {
        padding: 16px 18px;
        font-size: 1rem;
    }

    .hsm-faq__answer {
        padding: 0 18px 18px;
    }

    .hsm-faq__answer p {
        font-size: 0.95rem;
    }
}
