/* ============================================================
   FurFriend Finder — Shared Stylesheet
   ============================================================ */

/* --- Design Tokens --- */
:root {
    --bg-color: #FEFBF6;
    --text-color: #5D5753;
    --heading-color: #A77B5A;
    --primary-color: #E07B3B;
    --primary-hover: #C96A2E;
    --primary-tint: rgba(224, 123, 59, 0.12);
    --card-bg-color: #FFFFFF;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --border-color: #EAE0D5;
    --success-color: #4CAF50;
    --error-color: #F44336;
    --accent-color: #A77B5A;
    --muted-color: #999;
    --muted-light: #aaa;
    --surface-warm: #f9f7f4;
    --danger-mark: #c00;
    --paw-bg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 100 100'%3E%3Cpath d='M12.9,66.3c-3.5-3.5-5.8-8.3-5.8-13.5c0-10.5,8.5-19,19-19c5.2,0,10,2.1,13.5,5.8c3.5,3.5,5.8,8.3,5.8,13.5 c0,10.5-8.5,19-19,19C21.2,72.1,16.4,69.8,12.9,66.3z M87.1,66.3c-3.5-3.5-5.8-8.3-5.8-13.5c0-10.5,8.5-19,19-19 c5.2,0,10,2.1,13.5,5.8c3.5,3.5,5.8,8.3,5.8,13.5c0,10.5-8.5,19-19,19C95.5,72.1,90.6,69.8,87.1,66.3z M50,87.1 c-3.5-3.5-5.8-8.3-5.8-13.5c0-10.5,8.5-19,19-19c5.2,0,10,2.1,13.5,5.8c3.5,3.5,5.8,8.3,5.8,13.5c0,10.5-8.5,19-19,19 C58.3,92.9,53.5,90.6,50,87.1z M26.1,26.8c-3.5-3.5-5.8-8.3-5.8-13.5C20.3,2.8,28.8-5.7,39.3-5.7c5.2,0,10,2.1,13.5,5.8 c3.5,3.5,5.8,8.3,5.8,13.5c0,10.5-8.5,19-19,19C34.4,32.6,29.6,30.3,26.1,26.8z M73.9,26.8c-3.5-3.5-5.8-8.3-5.8-13.5 c0-10.5,8.5-19,19-19c5.2,0,10,2.1,13.5,5.8c3.5,3.5,5.8,8.3,5.8,13.5c0,10.5-8.5,19-19,19C82.2,32.6,77.4,30.3,73.9,26.8z' fill='%23F4EFE8'/%3E%3C/svg%3E");
}

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    font-family: 'Nunito', 'Microsoft JhengHei', sans-serif;
    line-height: 1.8;
    margin: 0;
    padding: 20px;
    background-color: var(--bg-color);
    background-image: var(--paw-bg);
    background-repeat: repeat;
    color: var(--text-color);
}

h1, h2, h3 {
    color: var(--heading-color);
}

/* --- Header --- */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px var(--shadow-color);
    padding: 10px 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: bold;
    font-size: 1.4em;
    color: var(--heading-color);
    text-decoration: none;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
}

.main-nav a {
    margin-left: 20px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: bold;
    font-size: 1em;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary-color);
}

.main-nav a.active {
    font-weight: bold;
    position: relative;
}

.main-nav a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

@media (max-width: 600px) {
    .main-nav a.active::after { display: none; }
    .main-nav a.active { border-left: 3px solid var(--primary-color); padding-left: 12px; }
}

/* --- Focus visible (keyboard accessibility) --- */
:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 3px;
    border-radius: 4px;
}

/* --- Mobile nav toggle --- */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 28px;
    height: 20px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
}
.nav-toggle span {
    display: block;
    height: 2px;
    background-color: var(--heading-color);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

/* --- Container --- */
.container {
    max-width: 800px;
    margin: 40px auto;
}

.container--wide {
    max-width: 1200px;
    margin: 40px auto;
}

.container--card {
    max-width: 800px;
    margin: 40px auto;
    background-color: var(--card-bg-color);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
}

/* --- Card --- */
.card {
    background-color: var(--card-bg-color);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
    margin-bottom: 30px;
}

.card h2 {
    color: var(--heading-color);
    font-size: 1.6em;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    font-family: 'Nunito', 'Microsoft JhengHei', sans-serif;
    font-size: 1em;
    font-weight: bold;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(224, 123, 59, 0.4);
}

.btn-primary:disabled {
    background-color: #ccc;
    color: #888;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.btn-pill {
    border-radius: 50px;
    padding: 14px 36px;
    font-size: 1.1em;
}

.btn-block {
    display: block;
    width: 100%;
    text-align: center;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.9em;
    border-radius: 6px;
}

.btn-secondary {
    background-color: #f0ebe5;
    color: var(--text-color);
}

.btn-secondary:hover:not(:disabled) {
    background-color: #e8e0d8;
}

/* --- Forms --- */
.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-sizing: border-box;
    font-family: 'Nunito', 'Microsoft JhengHei', sans-serif;
    font-size: 1em;
    background-color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(224, 123, 59, 0.2);
}

fieldset {
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
}

legend {
    padding: 0 15px;
    font-size: 1.4em;
    font-weight: bold;
    color: var(--heading-color);
}

/* --- Table --- */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: #f9f6f2;
    font-weight: bold;
    color: var(--heading-color);
}

tbody tr:nth-child(even) { background-color: #fdfaf7; }
tbody tr:hover           { background-color: #f5f1ec; }

/* --- Toast --- */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 14px 20px;
    border-radius: 10px;
    color: white;
    font-size: 1em;
    font-weight: bold;
    z-index: 2000;
    max-width: 320px;
    opacity: 0;
    transform: translateY(-16px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.toast.success { background-color: var(--success-color); }
.toast.error   { background-color: var(--error-color); }

/* --- Toggle Switch --- */
.switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 30px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #ccc;
    transition: background-color 0.3s ease;
}

.slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: transform 0.3s ease;
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

input:checked + .slider              { background-color: var(--primary-color); }
input:focus   + .slider              { box-shadow: 0 0 0 3px rgba(224, 123, 59, 0.25); }
input:checked + .slider:before       { transform: translateX(26px); }

.slider.round        { border-radius: 30px; }
.slider.round:before { border-radius: 50%; }

/* --- Auth Pages --- */
body.auth-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background-image: none;
}

.auth-card {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    background-color: var(--card-bg-color);
    border-radius: 20px;
    box-shadow: 0 10px 30px var(--shadow-color);
}

.auth-logo {
    text-align: center;
    margin-bottom: 8px;
    font-size: 2em;
}

.switch-link {
    text-align: center;
    margin-top: 20px;
    font-size: 0.95em;
}

.switch-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

/* --- Badge --- */
.badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: bold;
}

/* --- Utility --- */
.text-center { text-align: center; }
.mt-0  { margin-top: 0; }
.mb-0  { margin-bottom: 0; }
.divider {
    border: none;
    border-top: 1px solid var(--border-color);
    margin: 24px 0;
}

/* --- Spinner (loading indicator) --- */
.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Lightbox --- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}
.lightbox-overlay.open {
    opacity: 1;
    pointer-events: auto;
}
.lightbox-box {
    background: var(--card-bg-color);
    border-radius: 20px;
    max-width: 600px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    transform: translateY(20px);
    transition: transform 0.25s ease;
    position: relative;
}
.lightbox-overlay.open .lightbox-box {
    transform: translateY(0);
}
.lightbox-img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    display: block;
}
.lightbox-body {
    padding: 24px;
}
.lightbox-body h3 {
    color: var(--heading-color);
    margin: 0 0 16px;
    font-size: 1.4em;
}
.lightbox-body p { margin: 6px 0; font-size: 0.95em; }
.lightbox-body strong { color: var(--heading-color); }
.lightbox-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: rgba(0,0,0,0.45);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 1.1em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}
.lightbox-close:hover { background: rgba(0,0,0,0.65); }
.lightbox-shelter-info {
    margin-top: 16px;
    padding: 14px;
    background: var(--surface-warm);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}
.lightbox-shelter-info h4 {
    color: var(--heading-color);
    margin: 0 0 8px;
    font-size: 1em;
}

/* --- Utility Extensions --- */
.required-mark { color: var(--danger-mark); }
.hint { font-weight: normal; color: var(--muted-color); }
.clickable { cursor: pointer; }
.text-muted { color: var(--muted-light); }
.text-muted-italic { color: var(--muted-light); font-style: italic; }
.btn-submit { margin-top: 8px; }
.btn-success { background-color: var(--success-color); color: white; }
.btn-accent { background-color: var(--accent-color); color: white; }
.btn-accent:hover:not(:disabled) {
    background-color: #8f6a4d;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(167, 123, 90, 0.35);
}
.centered-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}
.page-title { text-align: center; font-size: 2.2em; margin-bottom: 24px; }
.page-title--large { font-size: 2.5em; margin-bottom: 10px; }
.view-more-link { text-align: right; margin-top: 10px; font-size: 0.9em; }
.view-more-link a { color: var(--primary-color); font-weight: bold; text-decoration: none; }

/* --- Home Page --- */
.subtitle { text-align: center; font-size: 1.1em; margin-bottom: 40px; color: var(--text-color); }
.section { margin-bottom: 40px; }
.section h2 { border-bottom: 2px solid var(--accent-color); padding-bottom: 10px; margin-bottom: 20px; font-size: 1.8em; }
ol { list-style: none; padding-left: 0; counter-reset: step-counter; }
ol li {
    counter-increment: step-counter;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-size: 1.1em;
}
ol li::before {
    content: counter(step-counter);
    margin-right: 15px;
    background-color: var(--primary-color);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}
.cta-container { text-align: center; margin-top: 30px; display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.featured-section { margin-top: 40px; }
.featured-section h2 { border-bottom: 2px solid var(--accent-color); padding-bottom: 10px; margin-bottom: 20px; font-size: 1.8em; }
.featured-card {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    background: var(--surface-warm);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.featured-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12); }
.featured-img { width: 160px; height: 160px; object-fit: cover; flex-shrink: 0; display: block; }
.featured-body { padding: 20px 20px 20px 0; flex: 1; }
.featured-body h3 { color: var(--heading-color); margin: 0 0 10px; font-size: 1.3em; }
.featured-body p { margin: 4px 0; font-size: 0.95em; }
.featured-body strong { color: var(--heading-color); }
.featured-shelter { margin-top: 10px; background-color: var(--primary-tint); color: var(--primary-color); }
.featured-loading { padding: 24px; color: var(--muted-light); font-style: italic; }
@media (max-width: 480px) {
    .featured-card { flex-direction: column; }
    .featured-img { width: 100%; height: 200px; }
    .featured-body { padding: 16px; }
}

/* --- Shelter Animals --- */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-end;
    background: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 32px;
    box-shadow: 0 2px 8px var(--shadow-color);
}
.filter-group { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 120px; }
.filter-group label { font-size: 0.85em; font-weight: bold; color: var(--text-color); margin: 0; }
.filter-group select,
.filter-group input { padding: 8px 12px; font-size: 0.95em; }
.filter-actions { display: flex; gap: 8px; align-items: flex-end; }
.result-info { font-size: 0.9em; color: var(--muted-light); margin-bottom: 16px; text-align: right; }
.animal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; }
.animal-card {
    background-color: var(--card-bg-color);
    border-radius: 16px;
    box-shadow: 0 6px 20px var(--shadow-color);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.animal-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12); }
.animal-card-img { width: 100%; height: 190px; object-fit: cover; display: block; background-color: var(--border-color); }
.animal-card-body { padding: 16px 18px 18px; }
.animal-card-title { color: var(--heading-color); font-size: 1.15em; font-weight: bold; margin: 0 0 8px; }
.animal-meta { margin: 0; font-size: 0.88em; color: var(--text-color); line-height: 1.7; }
.animal-meta strong { color: var(--heading-color); }
.shelter-tag { margin-top: 10px; background-color: var(--primary-tint); color: var(--primary-color); }
.pagination-controls { text-align: center; margin-top: 40px; display: flex; justify-content: center; gap: 16px; }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 60px 20px; color: var(--muted-light); font-size: 1.1em; }
@media (max-width: 600px) {
    .filter-bar { padding: 16px; }
    .filter-group { min-width: 100%; }
}

/* --- Quick Use --- */
.page-subtitle { text-align: center; margin-bottom: 32px; color: var(--text-color); }
.results-section { margin-top: 36px; border-top: 1px solid var(--border-color); padding-top: 24px; }
.results-section h2 { font-size: 1.4em; }
.result-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background-color: var(--surface-warm);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 14px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.result-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1); }
.result-rank {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
}
.result-img { flex-shrink: 0; width: 90px; height: 90px; object-fit: cover; border-radius: 10px; }
.result-details { flex: 1; min-width: 0; }
.result-details p { margin: 3px 0; font-size: 0.9em; line-height: 1.5; }
.result-details strong { color: var(--heading-color); }
.result-hint { font-size: 0.8em; color: var(--muted-light); margin-top: 6px; }
.distance-badge { background-color: var(--primary-tint); color: var(--primary-color); margin-top: 6px; }
.cta-section { text-align: center; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--border-color); color: var(--text-color); }
.cta-section a { color: var(--primary-color); text-decoration: none; font-weight: bold; }

/* --- Profile Page --- */
.profile-info p { font-size: 1.1em; margin: 0 0 10px; }
.profile-info strong { color: var(--heading-color); margin-right: 10px; }
.setting-item { display: flex; justify-content: space-between; align-items: center; font-size: 1.1em; }
.setting-item.disabled { opacity: 0.5; cursor: not-allowed; }
.coming-soon { font-size: 0.8em; color: var(--muted-color); margin-left: 5px; }
.save-status { margin-top: 12px; font-style: italic; color: var(--primary-color); text-align: right; min-height: 1.2em; font-size: 0.95em; }
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.status-badge.pending  { background: rgba(255,183,77,0.2); color: #e65100; }
.status-badge.notified { background: rgba(76,175,80,0.2);  color: #2e7d32; }

/* --- Error Pages --- */
body.centered-layout { background-image: none; }
.error-card { text-align: center; max-width: 480px; width: 100%; padding: 48px 40px; background-color: var(--card-bg-color); border-radius: 20px; box-shadow: 0 10px 30px var(--shadow-color); }
.error-emoji { font-size: 4em; line-height: 1; margin-bottom: 16px; }
.error-code { font-size: 5em; font-weight: bold; color: var(--accent-color); line-height: 1; margin: 0 0 8px; opacity: 0.4; }
.link-group { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* --- Footer --- */
.main-footer {
    margin-top: 60px;
    padding: 48px 24px 36px;
    background: linear-gradient(160deg, #FFF3E8 0%, var(--bg-color) 100%);
    border-top: 1px solid var(--border-color);
    text-align: center;
}
.footer-container { max-width: 800px; margin: 0 auto; }
.footer-logo {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--heading-color);
    margin: 0 0 10px;
}
.footer-tagline {
    color: var(--muted-color);
    font-size: 0.95em;
    margin: 0 0 28px;
    line-height: 1.7;
}
.footer-nav {
    display: flex;
    gap: 28px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.footer-nav a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 600;
    transition: color 0.2s ease;
}
.footer-nav a:hover { color: var(--primary-color); }
.footer-copy {
    color: var(--muted-light);
    font-size: 0.85em;
    margin: 0;
}

/* --- Mission Section --- */
.mission-section {
    text-align: center;
    padding: 56px 24px;
    background: var(--surface-warm);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}
.mission-quote {
    font-size: clamp(1.3em, 3.5vw, 1.8em);
    color: var(--heading-color);
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1.5;
}
.mission-quote::before { content: '「'; }
.mission-quote::after  { content: '」'; }
.mission-text {
    max-width: 560px;
    margin: 0 auto;
    color: var(--text-color);
    line-height: 1.85;
    font-size: 1.05em;
}

/* --- Challenge Section --- */
.challenge-section {
    padding: 56px 24px;
    max-width: 900px;
    margin: 0 auto;
}
.challenge-title {
    text-align: center;
    font-size: 1.6em;
    color: var(--heading-color);
    margin: 0 0 32px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.stat-card {
    text-align: center;
    padding: 28px 16px;
    background: var(--card-bg-color);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-color);
}
.stat-icon { font-size: 2em; display: block; margin-bottom: 12px; }
.stat-highlight {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--primary-color);
    display: block;
    margin-bottom: 6px;
    line-height: 1.3;
}
.stat-desc { font-size: 0.9em; color: var(--text-color); line-height: 1.7; margin: 0; }
.challenge-source {
    text-align: center;
    font-size: 0.8em;
    color: var(--muted-light);
    margin-top: 20px;
}

/* --- Solutions Section --- */
.solutions-section {
    padding: 56px 24px;
    max-width: 1000px;
    margin: 0 auto;
}
.solutions-section h2 {
    text-align: center;
    font-size: 1.6em;
    margin: 0 0 32px;
    color: var(--heading-color);
    border-bottom: none;
    padding-bottom: 0;
}
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.solution-card {
    text-align: center;
    padding: 32px 20px;
    background: var(--card-bg-color);
    border-radius: 16px;
    box-shadow: 0 6px 20px var(--shadow-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.solution-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}
.solution-icon { font-size: 2.4em; display: block; margin-bottom: 16px; }
.solution-title {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--heading-color);
    margin: 0 0 12px;
}
.solution-desc {
    font-size: 0.92em;
    color: var(--text-color);
    line-height: 1.75;
    margin: 0 0 16px;
}
.solution-link {
    color: var(--primary-color);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95em;
}
.solution-link:hover { text-decoration: underline; }

/* --- Bottom CTA --- */
.bottom-cta {
    text-align: center;
    padding: 64px 24px;
    background: linear-gradient(160deg, #FFF3E8 0%, var(--bg-color) 55%, #FFF8F2 100%);
    border-top: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}
.bottom-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--paw-bg);
    background-repeat: repeat;
    opacity: 0.3;
    pointer-events: none;
}
.bottom-cta-title {
    font-size: clamp(1.2em, 3vw, 1.6em);
    color: var(--heading-color);
    font-weight: 700;
    margin: 0 0 28px;
    position: relative;
}
.bottom-cta .cta-container { position: relative; margin-top: 0; }

/* --- Home Hero --- */
.home-hero {
    text-align: center;
    padding: 80px 24px 72px;
    background: linear-gradient(160deg, #FFF3E8 0%, var(--bg-color) 55%, #FFF8F2 100%);
    position: relative;
    overflow: hidden;
}
.home-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--paw-bg);
    background-repeat: repeat;
    opacity: 0.45;
    pointer-events: none;
}
.hero-icons {
    font-size: 2.6em;
    display: block;
    margin-bottom: 20px;
    position: relative;
    letter-spacing: 10px;
    animation: hero-float 3s ease-in-out infinite alternate;
}
@keyframes hero-float {
    from { transform: translateY(0); }
    to   { transform: translateY(-10px); }
}
.hero-title {
    font-size: clamp(2em, 6vw, 3.4em);
    color: var(--heading-color);
    margin: 0 0 18px;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.2;
    position: relative;
}
.hero-subtitle {
    font-size: 1.15em;
    color: var(--text-color);
    max-width: 520px;
    margin: 0 auto 44px;
    line-height: 1.85;
    position: relative;
}
.home-hero .cta-container { margin-top: 0; position: relative; }
.hero-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 32px;
    position: relative;
}
.hero-stat {
    background: rgba(255, 255, 255, 0.75);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 8px 18px;
    font-size: 0.88em;
    color: var(--text-color);
    font-weight: 600;
    backdrop-filter: blur(4px);
}

/* --- Steps Grid (How it works) --- */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 12px;
}
.step-card {
    text-align: center;
    padding: 28px 16px 20px;
    background: var(--surface-warm);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    position: relative;
}
.step-num {
    position: absolute;
    top: -13px;
    left: 50%;
    transform: translateX(-50%);
    width: 28px;
    height: 28px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85em;
}
.step-icon { font-size: 2em; margin: 4px 0 12px; display: block; }
.step-text { font-size: 0.88em; color: var(--text-color); line-height: 1.7; margin: 0; }
@media (max-width: 480px) {
    .hero-icons { font-size: 1.8em; letter-spacing: 4px; }
    .hero-title { font-size: 2em; }
    .hero-subtitle { font-size: 1em; }
    .steps-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
}
@media (max-width: 600px) {
    .stats-grid { grid-template-columns: 1fr; gap: 16px; }
    .solutions-grid { grid-template-columns: 1fr; gap: 16px; }
    .challenge-section,
    .solutions-section { padding: 40px 16px; }
}

/* --- Responsive --- */
@media (max-width: 600px) {
    body { padding: 10px; }
    .header-container { padding: 0 12px; }
    .container--card { padding: 24px 16px; }
    .btn-pill { padding: 12px 24px; font-size: 1em; }

    /* Show hamburger, hide desktop nav */
    .nav-toggle { display: flex; }
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 12px 20px 20px;
        gap: 0;
        box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    }
    .main-nav.open { display: flex; }
    .main-nav a {
        margin-left: 0;
        padding: 12px 0;
        font-size: 1em;
        border-bottom: 1px solid var(--border-color);
    }
    .main-nav a:last-child { border-bottom: none; }

    /* Make main-header position:relative so nav dropdown positions correctly */
    .main-header { position: relative; }
}
