/* ── Henistec Sales Page Generator — Frontend Styles ── */

/* ── Section headings (shared) ── */
.hspg-section-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 8px;
}

.hspg-section-sub {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
    font-size: 15px;
}

/* ── Urgency bar ── */
.hspg-urgency-bar {
    position: sticky;
    top: 0;
    z-index: 9999;
    color: #fff;
    text-align: center;
    padding: 10px 16px;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.5;
}

/* ── Countdown ── */
.hspg-cd-wrap {
    background: #1a1a1a;
    padding: 28px 16px;
    text-align: center;
    overflow: hidden;
}

.hspg-cd-label {
    color: #fff;
    font-size: 13px;
    margin: 0 0 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hspg-cd {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 100%;
}

.hspg-cd-unit {
    border-radius: 8px;
    padding: 12px 18px;
    min-width: 68px;
    text-align: center;
    box-sizing: border-box;
    flex-shrink: 0;
}

.hspg-cd-h,
.hspg-cd-m,
.hspg-cd-s {
    display: block;
    font-size: 34px;
    font-weight: 800;
    color: #fff;
    line-height: 1;
}

.hspg-cd-unit small {
    display: block;
    color: rgba( 255, 255, 255, 0.8 );
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.hspg-cd-sep {
    color: #fff;
    font-size: 26px;
    font-weight: 800;
    flex-shrink: 0;
}

/* ── Testimonials ── */
.hspg-testimonials-wrap {
    background: #fff;
    padding: 60px 20px;
}

.hspg-testimonials {
    display: grid;
    grid-template-columns: repeat( auto-fit, minmax( min( 280px, 100% ), 1fr ) );
    gap: 24px;
    max-width: 1000px;
    margin: 0 auto;
}

.hspg-testimonial {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 28px;
    box-shadow: 0 2px 12px rgba( 0, 0, 0, 0.06 );
    min-width: 0;
}

.hspg-testi-top {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.hspg-testi-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    flex-shrink: 0;
}

.hspg-testi-name {
    display: block;
    font-size: 15px;
    font-weight: 700;
}

.hspg-testi-loc {
    display: block;
    font-size: 13px;
    color: #888;
    margin-top: 2px;
}

.hspg-stars {
    color: #f0a500;
    font-size: 18px;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

.hspg-testi-text {
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    font-style: italic;
    margin-bottom: 12px;
    word-wrap: break-word;
}

.hspg-testi-date {
    font-size: 12px;
    color: #aaa;
}

/* ── Guarantee badges ── */
.hspg-guarantees {
    background: #f9f9f9;
    padding: 60px 20px;
}

.hspg-guarantee-grid {
    display: grid;
    grid-template-columns: repeat( auto-fit, minmax( min( 200px, 100% ), 1fr ) );
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.hspg-guarantee-item {
    text-align: center;
    padding: 24px 16px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba( 0, 0, 0, 0.06 );
}

.hspg-gi-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin: 0 auto 14px;
    color: #fff;
}

.hspg-guarantee-item h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
}

.hspg-guarantee-item p {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin: 0;
}

/* ── FAQ accordion ── */
.hspg-faq-wrap {
    background: #f8f8f8;
    padding: 60px 20px;
}

.hspg-faq {
    max-width: 800px;
    margin: 0 auto;
}

.hspg-faq-item {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.hspg-faq-q {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    padding: 16px 48px 16px 18px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    color: #1a1a1a;
    line-height: 1.4;
    word-wrap: break-word;
}

.hspg-faq-q::after {
    content: '+';
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY( -50% );
    font-size: 22px;
    color: var( --hspg-color, #333 );
    font-weight: 300;
}

.hspg-faq-q[aria-expanded="true"]::after {
    content: '−';
}

.hspg-faq-a {
    padding: 0 18px 16px;
    font-size: 15px;
    color: #555;
    line-height: 1.7;
    word-wrap: break-word;
}

.hspg-faq-a[hidden] { display: none; }

/* ── Stats bar ── */
.hspg-stats-bar {
    padding: 32px 20px;
}

.hspg-stats-inner {
    display: grid;
    grid-template-columns: repeat( 3, 1fr );
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.hspg-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #fff;
}

.hspg-stat-num {
    font-size: 26px;
}

.hspg-stat-label {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    line-height: 1.3;
}

/* ── WhatsApp button ── */
.hspg-whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25d366;
    color: #fff !important;
    padding: 16px 32px;
    border-radius: 50px;
    font-size: 17px;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba( 37, 211, 102, 0.4 );
    transition: opacity 0.2s, transform 0.1s;
}

.hspg-whatsapp-btn:hover {
    opacity: 0.92;
    transform: translateY( -1px );
    color: #fff !important;
}

/* ── Bundle pricing table ── */
.hspg-pricing-section {
    padding: 60px 20px;
    background: #f5f0ee;
    text-align: center;
    overflow: hidden;
}

.hspg-pricing-grid {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1020px;
    margin: 40px auto 0;
}

.hspg-pricing-card {
    background: #fff;
    border-radius: 20px;
    padding: 36px 28px;
    flex: 1;
    min-width: 240px;
    max-width: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 20px rgba( 0, 0, 0, 0.08 );
    position: relative;
    transition: transform 0.2s;
    box-sizing: border-box;
}

.hspg-pricing-card--popular {
    background: #1a2332;
    color: #fff;
    transform: scale( 1.05 );
    box-shadow: 0 8px 40px rgba( 0, 0, 0, 0.22 );
    z-index: 1;
}

.hspg-popular-badge {
    display: inline-block;
    background: #d4a017;
    color: #1a1a1a;
    font-weight: 700;
    font-size: 13px;
    padding: 6px 18px;
    border-radius: 40px;
    margin-bottom: 10px;
}

.hspg-pricing-name {
    font-size: 22px;
    font-weight: 700;
    margin: 0;
}

.hspg-pricing-card--popular .hspg-pricing-name { color: #fff; }

.hspg-pricing-subtitle {
    font-size: 14px;
    color: #888;
    margin: 0;
}

.hspg-pricing-card--popular .hspg-pricing-subtitle { color: rgba( 255, 255, 255, 0.6 ); }

.hspg-pricing-amount {
    font-size: 40px;
    font-weight: 800;
    color: #d4a017;
    margin: 14px 0 4px;
    line-height: 1;
}

.hspg-pricing-was {
    font-size: 15px;
    text-decoration: line-through;
    color: #aaa;
}

.hspg-pricing-card--popular .hspg-pricing-was { color: rgba( 255, 255, 255, 0.45 ); }

.hspg-pricing-save {
    font-size: 14px;
    font-weight: 700;
    color: #27ae60;
}

.hspg-pricing-btn {
    display: block;
    width: 100%;
    padding: 15px 20px;
    background: #d4a017;
    color: #1a1a1a !important;
    font-weight: 800;
    font-size: 16px;
    border-radius: 50px;
    text-decoration: none !important;
    margin-top: 18px;
    text-align: center;
    transition: opacity 0.2s, transform 0.1s;
}

.hspg-pricing-btn:hover {
    opacity: 0.9;
    transform: translateY( -1px );
    color: #1a1a1a !important;
}

.hspg-pricing-meta {
    font-size: 12px;
    color: #aaa;
    margin-top: 8px;
}

.hspg-pricing-card--popular .hspg-pricing-meta { color: rgba( 255, 255, 255, 0.4 ); }

/* ── Contact form ── */
.hspg-contact-form {
    max-width: 580px;
    margin: 0 auto;
    padding: 36px 40px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba( 0, 0, 0, 0.10 );
    box-sizing: border-box;
}

.hspg-field {
    margin-bottom: 20px;
}

.hspg-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 15px;
}

.hspg-field input[type="text"],
.hspg-field input[type="email"],
.hspg-field input[type="tel"],
.hspg-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.hspg-field input:focus,
.hspg-field textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba( 0, 115, 170, 0.2 );
}

.hspg-field textarea { resize: vertical; min-height: 120px; }

.hspg-submit {
    display: block;
    width: 100%;
    padding: 15px;
    color: #fff !important;
    border: none;
    border-radius: 5px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: opacity 0.2s;
}

.hspg-submit:hover { opacity: 0.88; }

.hspg-response {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 5px;
    font-size: 15px;
    display: none;
}

.hspg-response.success {
    display: block;
    background: #f0fff4;
    color: #1a6b2a;
    border: 1px solid #46b450;
}

.hspg-response.error {
    display: block;
    background: #fff5f5;
    color: #c0392b;
    border: 1px solid #e74c3c;
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — Tablet  ≤ 768px
══════════════════════════════════════════════════ */
@media ( max-width: 768px ) {
    .hspg-section-title { font-size: 24px; }

    .hspg-testimonials {
        grid-template-columns: 1fr;
    }

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

    .hspg-pricing-card--popular { transform: none; }
    .hspg-pricing-grid { gap: 16px; }

    .hspg-stats-inner {
        grid-template-columns: repeat( 3, 1fr );
        gap: 16px;
    }

    .hspg-stat-label { font-size: 13px; }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — Mobile  ≤ 540px
══════════════════════════════════════════════════ */
@media ( max-width: 540px ) {
    .hspg-section-title { font-size: 21px; }
    .hspg-section-sub   { font-size: 14px; margin-bottom: 28px; }

    /* Urgency bar — shorter text on small screens */
    .hspg-urgency-bar { font-size: 12px; padding: 9px 12px; }
    /* Hide the inline HH:MM:SS inside the urgency bar on small screens */
    #hspg-ub-t { display: none; }

    /* Countdown — scale down units */
    .hspg-cd { gap: 6px; }
    .hspg-cd-unit { padding: 10px 12px; min-width: 58px; }
    .hspg-cd-h, .hspg-cd-m, .hspg-cd-s { font-size: 26px; }
    .hspg-cd-unit small { font-size: 10px; }
    .hspg-cd-sep { font-size: 20px; }

    /* Pricing cards — stack full width */
    .hspg-pricing-grid { flex-direction: column; align-items: stretch; }
    .hspg-pricing-card { min-width: 0; max-width: 100%; width: 100%; }

    /* Stats — stack into 1 column on very narrow */
    .hspg-stats-inner { grid-template-columns: 1fr; gap: 14px; }

    /* Guarantee — keep 2 columns but allow 1 if too narrow */
    .hspg-guarantee-grid {
        grid-template-columns: repeat( auto-fit, minmax( min( 140px, 100% ), 1fr ) );
    }

    /* Contact form — tight padding */
    .hspg-contact-form { padding: 20px 16px; }

    /* WhatsApp button — full width */
    .hspg-whatsapp-btn { width: 100%; justify-content: center; padding: 14px 20px; font-size: 15px; }

    /* FAQ — tighter */
    .hspg-faq-q { font-size: 14px; padding: 14px 40px 14px 14px; }
    .hspg-faq-a { font-size: 14px; padding: 0 14px 14px; }
}

/* ══════════════════════════════════════════════════
   RESPONSIVE — Very small  ≤ 360px
══════════════════════════════════════════════════ */
@media ( max-width: 360px ) {
    .hspg-section-title { font-size: 19px; }

    .hspg-cd-unit { padding: 8px 10px; min-width: 50px; }
    .hspg-cd-h, .hspg-cd-m, .hspg-cd-s { font-size: 22px; }
    .hspg-cd-sep { font-size: 16px; }

    .hspg-pricing-amount { font-size: 32px; }
    .hspg-pricing-name   { font-size: 18px; }

    .hspg-guarantee-grid { grid-template-columns: 1fr; }
}
