/**
 * Public site spacing & typography tune — loaded after futuristic-theme.css
 */
:root {
    --nav-height: 68px;
    --lang-bar-height: 34px;
    --section-y: var(--corp-section-y, 3.25rem);
    --section-y-sm: 2.25rem;
    --public-container-max: 1280px;
    --public-container-px: clamp(1.15rem, 3vw, 2rem);
}

body.public-site {
    padding-top: var(--nav-height);
    font-size: 1.0625rem;
    line-height: 1.6;
}

body.public-site.lang-bar-hidden {
    padding-top: var(--nav-height);
}

body.public-site > *:not(.navbar-modern):not(.lang-helper-bar):first-of-type {
    padding-top: 0 !important;
}

/* Hero & page headers — remove double offset + excessive height */
.hero-section {
    margin-top: 0 !important;
    padding: 3.25rem 0 2.5rem !important;
    min-height: auto !important;
}

.hero-section .container,
.public-site .hero-section .container {
    max-width: var(--public-container-max);
    padding-left: var(--public-container-px);
    padding-right: var(--public-container-px);
}

.hero-content {
    padding-right: clamp(0.5rem, 2vw, 1.75rem);
}

.page-header {
    margin-top: 0 !important;
    padding: 2.25rem 0 1.75rem !important;
    min-height: auto !important;
}

.page-header .container {
    max-width: var(--public-container-max);
    padding-left: var(--public-container-px);
    padding-right: var(--public-container-px);
}

.page-title {
    font-size: clamp(1.75rem, 3.5vw, 2.25rem) !important;
    margin-bottom: 0.5rem !important;
}

.page-subtitle {
    font-size: 1.125rem !important;
    margin-bottom: 0 !important;
}

.hero-title {
    font-size: clamp(1.85rem, 4.5vw, 2.5rem) !important;
    margin-bottom: 0.85rem !important;
    line-height: 1.25 !important;
}

.hero-subtitle {
    font-size: 1.125rem !important;
    margin-bottom: 1.25rem !important;
    line-height: 1.6 !important;
}

.hero-buttons .btn {
    padding: 0.75rem 1.35rem !important;
    font-size: 1.0625rem !important;
    min-height: 2.75rem;
}

/* Section rhythm */
.public-site .py-5 {
    padding-top: var(--section-y) !important;
    padding-bottom: var(--section-y) !important;
}

.public-site .py-4 {
    padding-top: var(--section-y-sm) !important;
    padding-bottom: var(--section-y-sm) !important;
}

.section-title {
    font-size: clamp(1.55rem, 2.8vw, 2rem) !important;
    margin-bottom: 0.65rem !important;
}

.section-subtitle {
    font-size: 1.125rem !important;
    margin-bottom: 1.25rem !important;
}

.public-site .text-center.mb-5 {
    margin-bottom: 1.35rem !important;
}

.job-search-section {
    padding: var(--section-y) 0 !important;
}

.job-search-card {
    padding: 1.35rem !important;
}

.job-search-section .mb-3 {
    margin-bottom: 0.75rem !important;
}

/* Undo legacy blanket section styling (exclude themed CTA — needs corp-navy surface) */
section:not(.py-4):not(.py-5):not(.cta-section) {
    padding: var(--section-y-sm) 0 !important;
    background-color: transparent !important;
}

.about-content-section,
.page-section {
    padding-top: var(--section-y) !important;
    padding-bottom: var(--section-y) !important;
}

/* Cards & login */
.login-options .card-body,
.register-options .card-body {
    padding: 1.5rem !important;
}

.login-options .login-icon.mb-4,
.register-options .register-icon.mb-4 {
    margin-bottom: 1rem !important;
}

.login-options .card-text.mb-4,
.login-options .login-features.mb-4,
.register-options .card-text.mb-4,
.register-options .register-benefits.mb-4 {
    margin-bottom: 1rem !important;
}

.corp-card .p-4,
.stats-section .p-4 {
    padding: 1.25rem !important;
}

.stats-section .h1 {
    font-size: 1.85rem !important;
}

.stats-section .h3 {
    font-size: 1.45rem !important;
}

.stats-section .text-muted {
    font-size: 1rem;
}

/* Footer — breathing room before footer + internal padding */
footer.bg-dark,
footer.footer-modern {
    margin-top: var(--section-y) !important;
}

footer.bg-dark.py-5,
footer.footer-modern.py-5 {
    padding-top: 3rem !important;
    padding-bottom: 2.25rem !important;
}

.public-site .container {
    max-width: var(--public-container-max);
    padding-left: var(--public-container-px);
    padding-right: var(--public-container-px);
}

footer .mb-4 {
    margin-bottom: 1.25rem !important;
}

footer p,
footer li {
    font-size: 1rem;
}

/* Category / feature cards */
.categories-section .card-body,
.ai-feature-card,
.benefit-card {
    padding: 1.25rem !important;
}

.partner-logo,
.ngo-card {
    padding: 1.15rem !important;
}

.cta-section .cta-title {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.cta-section .cta-subtitle {
    font-size: 1.125rem;
}

/* Tighter container on very wide screens */
@media (min-width: 1200px) {
    .hero-section .container,
    .job-search-section .container,
    .stats-section .container,
    .page-header .container,
    .find-workers-page .container,
    .worker-profile-public-page .container,
    .job-detail-public-page .container {
        max-width: var(--public-container-max);
    }
}

@media (max-width: 767.98px) {
    .hero-section {
        padding: 1.75rem 0 1.35rem !important;
    }

    .page-header {
        padding: 1.35rem 0 1.1rem !important;
    }

    .public-site .py-5 {
        padding-top: 1.75rem !important;
        padding-bottom: 1.75rem !important;
    }

    .login-options .card-body,
    .register-options .card-body {
        padding: 1.25rem !important;
    }

    .hero-image img {
        max-height: 220px;
        width: auto;
    }

    .mosaic-grid {
        grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
        gap: 0.65rem;
    }
}

/* Find workers & public job listings */
.public-site .job-card-compact .card-title,
.public-site .profile-card-compact .card-title {
    font-size: 0.95rem;
}

.find-workers-page .worker-discovery-card__name {
    font-size: 1rem;
}

.public-site section.bg-light .section-title,
.public-site section.bg-light .section-subtitle {
    color: var(--corp-navy, #1e3a5f);
}

.public-site section.bg-light .section-subtitle {
    color: var(--corp-text-muted, #6b7280) !important;
}

/* Footer column rhythm on small screens */
@media (max-width: 767.98px) {
    .site-footer-modern .row > [class*="col-"] {
        margin-bottom: 1.5rem;
    }

    .site-footer-modern .text-md-end {
        text-align: left !important;
    }
}

/* Prevent horizontal scroll from wide tables/forms */
.public-site .table-responsive,
.public-site .contact-form,
.public-site .job-search-form {
    max-width: 100%;
    overflow-x: auto;
}

/* ── Homepage hero with integrated search ── */
.hero-section--home {
    padding: 2.5rem 0 2rem !important;
    background: linear-gradient(165deg, var(--corp-white, #fff) 0%, var(--corp-primary-light, #e6f4f7) 55%, var(--corp-bg, #f5f7fa) 100%) !important;
}

.hero-section--home .hero-content {
    padding-right: clamp(0, 2vw, 1.25rem);
}

.hero-search-card {
    margin-top: 2rem;
    padding: 1.35rem 1.5rem !important;
    border: 1px solid var(--corp-border, #e5e7eb);
    border-radius: var(--corp-radius-lg, 12px);
    box-shadow: var(--corp-shadow-md, 0 4px 12px rgba(0, 0, 0, 0.08));
    background: var(--corp-white, #fff);
}

.hero-search-card .hero-search-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--corp-navy, #1e3a5f);
    margin-bottom: 0.25rem;
}

.hero-search-card .hero-search-subtitle {
    font-size: 0.9375rem;
    color: var(--corp-text-muted, #6b7280);
    margin-bottom: 1rem;
}

.hero-search-form .form-control,
.hero-search-form .form-select {
    min-height: 2.85rem;
    padding-left: 2.5rem !important;
    font-size: 1rem;
}

.hero-search-form .search-field-wrap {
    position: relative;
}

.hero-search-form .search-field-wrap > i {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--corp-text-muted, #6b7280);
    pointer-events: none;
    z-index: 2;
}

.hero-search-form .btn-primary {
    min-height: 2.85rem;
    font-weight: 600;
}

@media (max-width: 991.98px) {
    .hero-section--home .hero-image {
        margin-top: 1.5rem;
    }

    .hero-search-card {
        margin-top: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .hero-section--home {
        padding: 1.5rem 0 1.25rem !important;
    }

    .hero-search-card {
        padding: 1.1rem !important;
    }
}

