﻿
/* =========================================================
   LaborApp - Shared site stylesheet
   File: Content/site.css
   ========================================================= */

:root {
    --fh-ink: #173330;
    --fh-muted: #687b75;
    --fh-teal: #176b65;
    --fh-teal-dark: #123b3a;
    --fh-pale: #e9f4ef;
    --fh-amber: #f0b44d;
    --fh-line: #e1e8e4;
    --fh-white: #ffffff;
    --fh-background: #f6f9f7;
    --fh-radius: 12px;
    --fh-shadow: 0 8px 28px rgba(18, 59, 58, .07);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--fh-ink);
    background: var(--fh-white);
    font-family: "Public Sans", "Segoe UI", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

img {
    display: block;
    max-width: 100%;
}

button,
input,
select,
textarea {
    font: inherit;
}

    button,
    input[type="submit"] {
        cursor: pointer;
    }

a {
    color: var(--fh-teal);
    text-underline-offset: 3px;
}

    a:hover {
        color: var(--fh-teal-dark);
    }

h1,
h2,
h3,
h4 {
    margin-top: 0;
    color: var(--fh-ink);
    line-height: 1.2;
}

p {
    margin-top: 0;
}

.container,
.fh-container {
    width: min(1160px, calc(100% - 40px));
    margin-right: auto;
    margin-left: auto;
}

.section {
    padding-top: 64px;
    padding-bottom: 64px;
}

.section-muted {
    background: var(--fh-background);
}

.section-heading {
    max-width: 720px;
    margin: 0 auto 30px;
    text-align: center;
}

    .section-heading h2 {
        margin-bottom: 10px;
        font-size: clamp(1.6rem, 3vw, 2.3rem);
        letter-spacing: -.035em;
    }

    .section-heading p {
        color: var(--fh-muted);
    }

/* Buttons */

.btn,
.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: 9px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease;
}

.btn-primary,
.btn-teal {
    color: #fff;
    background: var(--fh-teal);
}

    .btn-primary:hover,
    .btn-teal:hover {
        color: #fff;
        background: var(--fh-teal-dark);
    }

.btn-amber {
    color: #27352d;
    background: var(--fh-amber);
}

    .btn-amber:hover {
        color: #27352d;
        background: #e6a32e;
    }

.btn-outline {
    color: var(--fh-teal);
    background: transparent;
    border-color: #b8d1c8;
}

    .btn-outline:hover {
        color: var(--fh-teal-dark);
        background: var(--fh-pale);
    }

.btn-block {
    display: flex;
    width: 100%;
}

/* Forms */

.form-group {
    margin-bottom: 18px;
}

.form-label,
label {
    color: var(--fh-ink);
    font-weight: 600;
}

.form-label {
    display: block;
    margin-bottom: 7px;
}

.form-control,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="search"],
input[type="url"],
select,
textarea {
    width: 100%;
    min-height: 45px;
    padding: 11px 13px;
    color: var(--fh-ink);
    background: #fff;
    border: 1px solid #cbd8d2;
    border-radius: 8px;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

    .form-control:focus,
    input:focus,
    select:focus,
    textarea:focus {
        border-color: var(--fh-teal);
        box-shadow: 0 0 0 3px rgba(23, 107, 101, .12);
    }

.form-help,
.help-text {
    display: block;
    margin-top: 5px;
    color: var(--fh-muted);
    font-size: .86rem;
}

.validation-error,
.field-validation-error {
    color: #a52626;
    font-size: .88rem;
}

.validation-summary-errors {
    margin-bottom: 18px;
    padding: 12px 15px;
    color: #8f2222;
    background: #fff0f0;
    border: 1px solid #f0c5c5;
    border-radius: 8px;
}

    .validation-summary-errors ul {
        margin: 0;
        padding-left: 20px;
    }

/* General cards and panels */

.card,
.panel {
    background: #fff;
    border: 1px solid var(--fh-line);
    border-radius: var(--fh-radius);
    box-shadow: var(--fh-shadow);
}

.card-body,
.panel-body {
    padding: 22px;
}

.card-title {
    margin-bottom: 8px;
    font-size: 1.15rem;
    font-weight: 800;
}

.card-description {
    color: var(--fh-muted);
}

.grid {
    display: grid;
    gap: 22px;
}

.grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Search areas */

.search-panel {
    padding: 22px;
    background: #fff;
    border: 1px solid var(--fh-line);
    border-radius: var(--fh-radius);
    box-shadow: var(--fh-shadow);
}

.search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(180px, .7fr) auto;
    align-items: end;
    gap: 12px;
}

/* Worker cards */

.worker-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.worker-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    border: 1px solid var(--fh-line);
    border-radius: var(--fh-radius);
    box-shadow: 0 5px 20px rgba(18, 59, 58, .05);
    transition: transform .15s ease, box-shadow .15s ease;
}

    .worker-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--fh-shadow);
    }

.worker-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 10px;
    padding: 20px;
}

.worker-avatar {
    display: grid;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
    place-items: center;
    overflow: hidden;
    color: var(--fh-teal-dark);
    background: var(--fh-pale);
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: 800;
}

    .worker-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.worker-name {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 800;
}

.worker-trade,
.worker-location,
.muted-text {
    color: var(--fh-muted);
    font-size: .9rem;
}

.worker-rating {
    color: #94620b;
    font-size: .9rem;
    font-weight: 700;
}

.worker-rate {
    color: var(--fh-teal-dark);
    font-size: 1.05rem;
    font-weight: 800;
}

.worker-card .btn {
    margin-top: auto;
}

/* Category cards */

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.category-card {
    display: block;
    padding: 20px;
    color: var(--fh-ink);
    background: #fff;
    border: 1px solid var(--fh-line);
    border-radius: 12px;
    text-decoration: none;
    transition: border-color .15s ease, transform .15s ease;
}

    .category-card:hover {
        color: var(--fh-teal-dark);
        border-color: #8cbcb0;
        transform: translateY(-2px);
    }

    .category-card h3 {
        margin-bottom: 6px;
        font-size: 1rem;
    }

    .category-card p {
        margin-bottom: 0;
        color: var(--fh-muted);
        font-size: .85rem;
    }

/* Alerts and empty states */

.alert {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 9px;
}

.alert-success {
    color: #205d39;
    background: #eaf7ef;
    border-color: #bde4ca;
}

.alert-error,
.alert-danger {
    color: #8f2222;
    background: #fff0f0;
    border-color: #f0c5c5;
}

.alert-info {
    color: #20556b;
    background: #edf7fb;
    border-color: #c5e4f0;
}

.empty-state {
    padding: 38px 20px;
    color: var(--fh-muted);
    background: var(--fh-background);
    border: 1px dashed #cbd8d2;
    border-radius: var(--fh-radius);
    text-align: center;
}

    .empty-state h2,
    .empty-state h3 {
        color: var(--fh-ink);
    }

/* Tables */

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--fh-line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--fh-teal-dark);
    background: var(--fh-background);
    font-size: .86rem;
    font-weight: 800;
}

tr:hover td {
    background: #fbfdfc;
}

/* Profile pages */

.profile-layout {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    align-items: start;
    gap: 24px;
}

.profile-card {
    padding: 24px;
    background: #fff;
    border: 1px solid var(--fh-line);
    border-radius: var(--fh-radius);
    box-shadow: var(--fh-shadow);
}

.profile-avatar {
    width: 112px;
    height: 112px;
    margin: 0 auto 18px;
    overflow: hidden;
    background: var(--fh-pale);
    border-radius: 50%;
}

    .profile-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

/* Utility classes */

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--fh-muted);
}

.text-teal {
    color: var(--fh-teal);
}

.text-bold {
    font-weight: 800;
}

.bg-light {
    background: var(--fh-background);
}

.rounded {
    border-radius: var(--fh-radius);
}

.shadow {
    box-shadow: var(--fh-shadow);
}

.w-100 {
    width: 100%;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mt-3 {
    margin-top: 24px;
}

.mb-1 {
    margin-bottom: 8px;
}

.mb-2 {
    margin-bottom: 16px;
}

.mb-3 {
    margin-bottom: 24px;
}

.p-2 {
    padding: 16px;
}

.p-3 {
    padding: 24px;
}

/* Responsive layouts */

@media (max-width: 960px) {
    .grid-4,
    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-3,
    .worker-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .profile-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .container,
    .fh-container {
        width: calc(100% - 30px);
    }

    .section {
        padding-top: 42px;
        padding-bottom: 42px;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .worker-grid,
    .category-grid {
        grid-template-columns: 1fr;
    }

    .search-row {
        grid-template-columns: 1fr;
    }

    .search-panel,
    .card-body,
    .panel-body {
        padding: 17px;
    }

    th,
    td {
        padding: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
