body {
    font-family: 'Inter', system-ui, sans-serif;
}

.public-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ---- Header ---- */

.public-header {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 30;
}

.public-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: .9rem 1.25rem;
}

.public-brand {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text-primary);
}

.public-nav {
    display: flex;
    gap: 1.5rem;
}

.public-nav a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: .92rem;
}

.public-nav a:hover {
    color: var(--primary);
}

.public-nav-mobile {
    display: none;
    flex-direction: column;
    border-top: 1px solid var(--border);
    padding: .5rem 1.25rem;
}

.public-nav-mobile.open {
    display: flex;
}

.public-nav-mobile a {
    padding: .6rem 0;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.public-nav-mobile a:last-child {
    border-bottom: none;
}

/* ---- Hero ---- */

.hero {
    background: var(--theme-gradient, linear-gradient(180deg, var(--primary-light) 0%, transparent 100%));
    padding: 4.5rem 0 3.5rem;
    text-align: center;
}

.hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    letter-spacing: -.02em;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.hero h1 .accent {
    color: var(--primary);
}

.hero p.lead {
    max-width: 640px;
    margin: 0 auto 2rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.hero-actions {
    display: flex;
    gap: .9rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 576px) {
    .hero { padding: 3rem 0 2.5rem; }
    .hero h1 { font-size: 1.9rem; }
    .cta-band { padding: 2rem 1.25rem; }
}

/* ---- Sections ---- */

.public-section {
    padding: 3.5rem 0;
}

.public-section.alt {
    background: var(--surface-hover);
}

.section-heading {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 2.5rem;
}

.section-heading .eyebrow {
    color: var(--primary);
    font-weight: 700;
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.section-heading h2 {
    font-size: 1.9rem;
    font-weight: 800;
    margin: .4rem 0 .6rem;
    color: var(--text-primary);
}

.section-heading p {
    color: var(--text-secondary);
    margin-bottom: 0;
}

/* ---- Category cards ---- */

.category-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem 1.2rem;
    text-align: center;
    height: 340px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
}

.category-card p.small {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.category-card .card-cta {
    margin-top: auto;
    min-height: 70px;
}

/* Compact variant for the homepage's dense 2-per-row Buy/Sell teaser grid -
   no description text, so the full 340px card height would leave a large
   empty gap between the title and the price/button. */
.category-card-compact {
    height: auto;
    min-height: 0;
}

.category-card-compact .icon-wrap {
    width: 170px;
    height: 170px;
    font-size: 4.5rem;
}

.category-card-compact .card-cta {
    min-height: 0;
    margin-top: 1rem;
}

/* Category cards render 2-per-row (col-6) down to the smallest phone widths,
   so the icon must shrink well before desktop breakpoints or it overflows
   its own card at ~150-160px column widths. */
@media (max-width: 767px) {
    .category-card .icon-wrap {
        width: 72px;
        height: 72px;
        font-size: 1.8rem;
        margin-bottom: .5rem;
    }
    .category-card-compact .icon-wrap {
        width: 64px;
        height: 64px;
        font-size: 1.6rem;
    }
    /* These are the primary conversion buttons on the busiest mobile grids
       (2-per-row category cards) - Bootstrap's .btn-sm alone is ~31px tall,
       under the ~40-44px touch-target guideline. */
    .category-card .btn-sm {
        min-height: 42px;
        padding-top: .55rem;
        padding-bottom: .55rem;
    }
}

.category-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.category-card .icon-wrap {
    width: 144px;
    height: 144px;
    border-radius: var(--radius-md);
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.6rem;
    margin: 0 auto .5rem;
    flex-shrink: 0;
}

.category-card h6 {
    margin-bottom: .3rem;
    color: var(--text-primary);
}

.category-card .rate {
    color: var(--text-muted);
    font-size: .82rem;
}

/* ---- How it works steps ---- */

.step-card {
    text-align: center;
    padding: 1rem;
}

.step-card .step-number {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--accent-contrast);
    font-weight: 800;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.step-card h6 {
    color: var(--text-primary);
}

.step-card p {
    color: var(--text-secondary);
    font-size: .9rem;
    margin-bottom: 0;
}

/* ---- Feature / why-us cards ---- */

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    height: 100%;
}

.feature-card .icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-md);
    background: var(--secondary-light);
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: .9rem;
}

/* ---- Impact stats ---- */

.impact-stat {
    text-align: center;
    padding: 1rem;
}

.impact-stat .value {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
}

.impact-stat .label {
    color: var(--text-secondary);
    font-size: .88rem;
}

/* ---- Testimonials ---- */

.testimonial-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    height: 100%;
}

.testimonial-card .stars {
    color: var(--warning);
    font-size: .85rem;
    margin-bottom: .6rem;
}

.testimonial-card p {
    color: var(--text-secondary);
    font-size: .92rem;
}

.testimonial-card .author {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-top: 1rem;
}

.testimonial-card .author .avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .85rem;
}

/* ---- CTA band ---- */

.cta-band {
    background: linear-gradient(120deg, var(--primary-dark), var(--secondary-dark));
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    text-align: center;
    color: #fff;
}

.cta-band h2 {
    font-weight: 800;
    margin-bottom: .6rem;
}

.cta-band p {
    opacity: .9;
    margin-bottom: 1.5rem;
}

/* ---- FAQ accordion ---- */

.public-accordion .accordion-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md) !important;
    margin-bottom: .6rem;
    overflow: hidden;
}

.public-accordion .accordion-button {
    background: var(--surface);
    color: var(--text-primary);
    font-weight: 600;
}

.public-accordion .accordion-button:not(.collapsed) {
    background: var(--primary-light);
    color: var(--text-primary);
    box-shadow: none;
}

.public-accordion .accordion-body {
    color: var(--text-secondary);
}

/* ---- Footer ---- */

.public-footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 3rem 0 1.5rem;
    margin-top: 2rem;
}

.public-footer a {
    color: var(--text-secondary);
}

.public-footer a:hover {
    color: var(--primary);
}

/* ---- CMS content pages ---- */

.cms-content {
    max-width: 800px;
    margin: 0 auto;
    color: var(--text-secondary);
    line-height: 1.7;
}

.cms-content h1, .cms-content h2, .cms-content h3 {
    color: var(--text-primary);
}

.cms-content table, .cms-content pre {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.cms-content iframe {
    max-width: 100%;
}

/* ---- WhatsApp floating action button ---- */

.whatsapp-fab {
    position: fixed;
    right: 1.25rem;
    bottom: 1.25rem;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    box-shadow: 0 6px 18px rgba(0,0,0,.25);
    z-index: 1000;
    transition: transform .15s ease;
}

.whatsapp-fab:hover {
    color: #fff;
    transform: scale(1.08);
}

/* ---- WhatsApp chat popup (homepage only) ---- */

.whatsapp-popup {
    position: fixed;
    right: 1.25rem;
    bottom: 5.5rem;
    width: 300px;
    max-width: calc(100vw - 2.5rem);
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 12px 32px rgba(0,0,0,.28);
    z-index: 999;
    overflow: hidden;
    opacity: 0;
    transform: translateY(12px) scale(.97);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}

.whatsapp-popup.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.whatsapp-popup-close {
    position: absolute;
    top: .4rem;
    right: .6rem;
    background: transparent;
    border: none;
    color: rgba(255,255,255,.85);
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    padding: .2rem;
    z-index: 1;
}

.whatsapp-popup-header {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 1rem 1.5rem 1rem 1rem;
    background: #075e54;
    color: #fff;
}

.whatsapp-popup-header strong {
    display: block;
    font-size: .95rem;
}

.whatsapp-popup-header .small {
    color: rgba(255,255,255,.8);
    font-size: .72rem;
}

.whatsapp-popup-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #fff;
    color: #075e54;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    overflow: hidden;
}

.whatsapp-popup-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.whatsapp-popup-chat {
    background: #e5ddd5;
    padding: 1rem .9rem;
}

.whatsapp-popup-bubble {
    background: #fff;
    border-radius: 8px;
    padding: .55rem .7rem .4rem;
    box-shadow: 0 1px 2px rgba(0,0,0,.15);
    position: relative;
}

.whatsapp-popup-sender {
    color: #075e54;
    font-weight: 700;
    font-size: .78rem;
    margin-bottom: .15rem;
}

.whatsapp-popup-msg {
    color: #1f2937;
    font-size: .85rem;
    line-height: 1.4;
}

.whatsapp-popup-time {
    color: #8696a0;
    font-size: .68rem;
    text-align: right;
    margin-top: .2rem;
}

.whatsapp-popup-start {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    background: #25d366;
    color: #fff;
    font-weight: 600;
    font-size: .9rem;
    padding: .75rem 1rem;
    text-decoration: none;
}

.whatsapp-popup-start:hover {
    background: #1fb959;
    color: #fff;
}

.whatsapp-popup-start i {
    font-size: 1.1rem;
}

@media (max-width: 480px) {
    .whatsapp-popup {
        right: .75rem;
        bottom: 4.75rem;
    }
}

/* ---- Blog ---- */

.blog-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-card .blog-card-img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    background: var(--hover-bg);
}

.blog-card .blog-card-body {
    padding: 1.1rem 1.25rem 1.35rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-card .blog-card-date {
    font-size: .75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .03em;
}

.blog-article {
    max-width: 760px;
    margin: 0 auto;
    color: var(--text-secondary);
    line-height: 1.75;
}

.blog-article img {
    max-width: 100%;
    border-radius: 10px;
}

.blog-article h1, .blog-article h2, .blog-article h3 {
    color: var(--text-primary);
}

.blog-article table, .blog-article pre {
    display: block;
    max-width: 100%;
    overflow-x: auto;
}

.blog-article iframe {
    max-width: 100%;
}

/* ---- Theme customizer: button styles ---- */

body.btn-style-pill .btn { border-radius: 999px; }
body.btn-style-square .btn { border-radius: 3px; }
body.btn-style-rounded .btn { border-radius: 16px; }
body.btn-style-outline .btn-primary { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
body.btn-style-outline .btn-secondary { background: transparent; color: var(--secondary); border: 2px solid var(--secondary); }
body.btn-style-glass .btn-primary,
body.btn-style-glass .btn-secondary {
    background: rgba(255,255,255,.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,.25);
    color: var(--text-primary);
}
body.btn-style-glass .btn:hover { background: rgba(255,255,255,.15); }

/* ---- Theme customizer: card styles ---- */

body.card-style-minimal .category-card,
body.card-style-minimal .blog-card {
    box-shadow: none;
    border: 1px solid var(--border);
}
body.card-style-glass .category-card,
body.card-style-glass .blog-card {
    background: rgba(255,255,255,.06);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,.15);
}
body.card-style-soft .category-card,
body.card-style-soft .blog-card {
    border-radius: 22px;
    box-shadow: 0 10px 28px rgba(0,0,0,.1);
}
body.card-style-corporate .category-card,
body.card-style-corporate .blog-card {
    border-radius: 4px;
    border-top: 3px solid var(--secondary);
}
body.card-style-industrial .category-card,
body.card-style-industrial .blog-card {
    border-radius: 2px;
    border-left: 4px solid var(--primary);
}
