*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --color-primary:   #FF6B35;
    --color-secondary: #4ECDC4;
    --color-success:   #28A745;
    --color-danger:    #DC3545;
    --color-warning:   #FFC107;
    --radius:          8px;
    --font:            'Segoe UI', system-ui, sans-serif;

    /* Surfaces & text — these flip in dark mode */
    --bg-page:    #F8F9FA;
    --bg-surface: #ffffff;
    --bg-subtle:  #f3f4f6;
    --bg-hover:   #f8f9fa;
    --border:     #e5e7eb;
    --border-soft:#eeeeee;
    --text:       #2C3E50;
    --text-muted: #6C757D;
    --shadow:     0 2px 12px rgba(0,0,0,.1);

    /* Aliases kept for older rules */
    --color-dark:  var(--text);
    --color-light: var(--bg-page);
    --color-muted: var(--text-muted);
}

[data-theme="dark"] {
    color-scheme: dark;
    --bg-page:    #111827;
    --bg-surface: #1f2937;
    --bg-subtle:  #0f172a;
    --bg-hover:   #374151;
    --border:     #374151;
    --border-soft:#374151;
    --text:       #f3f4f6;
    --text-muted: #9ca3af;
    --shadow:     0 2px 12px rgba(0,0,0,.4);
}

body { font-family: var(--font); background: var(--color-light); color: var(--color-dark); min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; }

a { color: var(--color-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }


.search-dropdown {
    position: absolute; top: calc(100% + 4px); left: 0; right: 0;
    background: var(--bg-surface); border-radius: var(--radius); box-shadow: var(--shadow);
    z-index: 200; overflow: hidden;
}
.search-dropdown__item {
    display: flex; align-items: center; gap: .75rem;
    padding: .6rem 1rem; color: var(--color-dark); font-size: .9rem;
}
.search-dropdown__item:hover { background: var(--color-light); }
.search-dropdown__item img { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; }

.btn {
    display: inline-block; padding: .55rem 1.2rem; border-radius: var(--radius);
    font-size: .9rem; font-weight: 600; cursor: pointer; border: none;
    transition: opacity .15s;
}
.btn:hover { opacity: .88; text-decoration: none; }
.btn--primary   { background: var(--color-primary);   color: #fff; }
.btn--secondary { background: var(--bg-subtle);                color: var(--color-dark); }
.btn--success   { background: var(--color-success);   color: #fff; }
.btn--danger    { background: var(--color-danger);    color: #fff; }
.btn--admin     { background: #4f46e5; color: #fff; box-shadow: 0 2px 8px rgba(79,70,229,.35); }
.btn--disabled  { background: #ccc; color: #888; cursor: not-allowed; }
.btn--full      { width: 100%; text-align: center; }
.btn--lg        { padding: .75rem 1.6rem; font-size: 1rem; }
.btn--sm        { padding: .3rem .7rem; font-size: .8rem; }

.flash-messages { position: fixed; top: 70px; right: 1rem; z-index: 999; display: flex; flex-direction: column; gap: .5rem; }
.flash { padding: .75rem 1.2rem; border-radius: var(--radius); font-size: .9rem; box-shadow: var(--shadow); transition: opacity .5s; }
.flash--success { background: #d4edda; color: #155724; }
.flash--error   { background: #f8d7da; color: #721c24; }
.flash--info    { background: #d1ecf1; color: #0c5460; }

.pet-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; margin-top: 1.5rem; }
.pet-card { background: var(--bg-surface); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: transform .2s; }
.pet-card:hover { transform: translateY(-4px); }
.pet-card a { color: inherit; }
.pet-card__img { width: 100%; height: 200px; object-fit: cover; }
.pet-card__body { padding: 1rem; }
.pet-card__name { font-size: 1.1rem; font-weight: 700; margin: .3rem 0; }
.pet-card__meta { color: var(--color-muted); font-size: .85rem; }
.pet-card__location { font-size: .8rem; color: var(--color-muted); margin-top: .4rem; }

.badge { display: inline-block; padding: .2rem .6rem; border-radius: 99px; font-size: .75rem; font-weight: 600; text-transform: uppercase; }
.badge--available { background: #d4edda; color: #155724; }
.badge--pending   { background: #fff3cd; color: #856404; }
.badge--adopted   { background: #d1ecf1; color: #0c5460; }
.badge--lg        { font-size: .9rem; padding: .3rem .9rem; }

.category-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.5rem 0 .5rem; }
.tab { padding: .4rem .9rem; border-radius: 99px; background: var(--bg-subtle); color: var(--color-dark); font-size: .9rem; }
.tab--active { background: var(--color-primary); color: #fff; }

.filter-panel { margin-bottom: 1rem; }
.filter-form { display: flex; gap: .75rem; flex-wrap: wrap; padding: 1rem; background: var(--bg-surface); border-radius: var(--radius); box-shadow: var(--shadow); margin-top: .5rem; }
.filter-form input, .filter-form select { padding: .5rem .75rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: .9rem; background: var(--bg-surface); color: var(--text); }

.pet-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; margin-top: 1.5rem; }
.pet-detail__gallery img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.pet-detail__info { display: flex; flex-direction: column; gap: 1rem; }
.detail-table { width: 100%; border-collapse: collapse; }
.detail-table th, .detail-table td { padding: .5rem; text-align: left; border-bottom: 1px solid var(--border-soft); }
.detail-table th { color: var(--color-muted); font-weight: 600; width: 35%; }

.auth-page { display: flex; justify-content: center; align-items: flex-start; padding: 3rem 1rem; }
.auth-card { background: var(--bg-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2.5rem; width: 100%; max-width: 440px; }
.auth-card h1 { margin-bottom: .5rem; }
.auth-card__sub { color: var(--color-muted); margin-bottom: 1.5rem; }
.auth-card__links { margin-top: 1.5rem; text-align: center; font-size: .9rem; color: var(--color-muted); }
.auth-form { display: flex; flex-direction: column; gap: 1rem; }

.form-page { max-width: 720px; margin: 2rem auto; }
.form-card { background: var(--bg-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; display: flex; flex-direction: column; gap: 1.2rem; }
.form-group { display: flex; flex-direction: column; gap: .4rem; }
.form-group label { font-weight: 600; font-size: .9rem; }
.form-group input, .form-group select, .form-group textarea {
    padding: .55rem .9rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: .95rem;
    background: var(--bg-surface); color: var(--text);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: 2px solid var(--color-primary); border-color: transparent;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; gap: 1rem; }
.current-image-preview { max-height: 120px; border-radius: var(--radius); margin-bottom: .5rem; }

.data-table { width: 100%; border-collapse: collapse; background: var(--bg-surface); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.data-table th { background: #1e293b; color: #e2e8f0; padding: .75rem 1rem; text-align: left; font-size: .9rem; }
.data-table td { padding: .7rem 1rem; border-bottom: 1px solid var(--border-soft); font-size: .9rem; color: var(--text); }
.data-table tr:hover td { background: var(--bg-hover); }

.admin-layout { display: grid; grid-template-columns: 220px 1fr; gap: 2rem; margin-top: 1.5rem; min-height: calc(100vh - 4rem); }
.admin-sidebar { background: #1e293b; color: #e2e8f0; border-radius: var(--radius); padding: 1.5rem; height: fit-content; }
.admin-sidebar h2 { color: var(--color-primary); margin-bottom: 1rem; }
.admin-sidebar nav { display: flex; flex-direction: column; gap: .6rem; }
.admin-sidebar nav a { color: #94a3b8; padding: .4rem .6rem; border-radius: 4px; }
.admin-sidebar nav a:hover { background: rgba(255,255,255,.1); color: #fff; text-decoration: none; }
.admin-main { min-width: 0; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.stat-card { background: var(--bg-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.2rem; text-align: center; }
.stat-card__number { display: block; font-size: 2rem; font-weight: 700; color: var(--color-primary); }
.stat-card__label { font-size: .85rem; color: var(--color-muted); }
.stat-card--green .stat-card__number { color: var(--color-success); }
.stat-card--blue  .stat-card__number { color: var(--color-secondary); }
.stat-card--orange .stat-card__number { color: var(--color-warning); }

.status-card { background: var(--bg-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; margin: 1rem 0; }
.status-card__pet { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.5rem; }
.status-card__pet img { width: 80px; height: 80px; object-fit: cover; border-radius: var(--radius); }
.status-details { display: grid; grid-template-columns: 150px 1fr; gap: .5rem; margin-bottom: 1rem; }
.status-notice { padding: 1rem; border-radius: var(--radius); margin-top: 1rem; }
.status-notice--success { background: #d4edda; color: #155724; }
.status-notice--error   { background: #f8d7da; color: #721c24; }
.status-notice--info    { background: #d1ecf1; color: #0c5460; }

.footer { background: #2C3E50; color: #cbd5e1; font-size: .9rem; padding: 2.5rem 3rem 0; border-top: 3px solid var(--color-primary); }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem; max-width: 1200px; margin: 0 auto; padding-bottom: 2rem; }
.footer__col { display: flex; flex-direction: column; gap: .5rem; }
.footer__brand { font-size: 1.5rem; font-weight: 800; color: var(--color-primary); letter-spacing: .02em; }
.footer__tagline { color: #94a3b8; font-size: .9rem; line-height: 1.5; max-width: 320px; }
.footer__heading { font-size: .95rem; font-weight: 700; color: #fff; margin-bottom: .25rem; text-transform: uppercase; letter-spacing: .08em; }
.footer__links { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.footer__links a { color: #cbd5e1; font-size: .9rem; transition: color .15s; }
.footer__links a:hover { color: var(--color-primary); text-decoration: none; }
.footer__bottom { text-align: center; padding: 1.25rem 1rem; font-size: .8rem; color: #94a3b8; background: #34495e; margin: 0 -3rem; }

.centered-page { min-height: 100vh; height: 100vh; padding: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.maintenance-card { background: var(--bg-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 3rem 2.5rem; max-width: 640px; width: 100%; text-align: center; margin: 0; }
.maintenance-card__logo { font-size: 1.8rem; font-weight: 800; color: var(--color-primary); margin-bottom: 1.5rem; }
.maintenance-card__img { width: 575px; height: 350px; object-fit: contain; display: block; margin: 0 auto 1.5rem; }
.maintenance-card h1 { font-size: 1.6rem; color: var(--color-dark); margin-bottom: 0.75rem; }
.maintenance-card p { color: var(--color-muted); line-height: 1.6; font-size: 0.95rem; }
.maintenance-card__divider { border: none; border-top: 1px solid var(--border-soft); margin: 1.5rem 0; }
.maintenance-card__status { display: inline-block; background: #fff3cd; color: #856404; padding: .3rem .9rem; border-radius: 99px; font-size: .8rem; font-weight: 600; text-transform: uppercase; }

.error-card { background: var(--bg-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 3rem 2.5rem; max-width: 640px; width: 100%; text-align: center; margin: 0; }
.error-card__logo { font-size: 1.8rem; font-weight: 800; color: var(--color-primary); margin-bottom: 1.5rem; }
.error-card__img { width: 575px; height: 350px; object-fit: contain; display: block; margin: 0 auto 1.5rem; }
.error-card__status { display: inline-block; background: #f8d7da; color: #721c24; padding: .3rem .9rem; border-radius: 99px; font-size: .8rem; font-weight: 600; text-transform: uppercase; }
.error-card__divider { border: none; border-top: 1px solid var(--border-soft); margin: 1.5rem 0; }
.error-card h1 { font-size: 1.4rem; color: var(--color-dark); margin-bottom: 0.75rem; }
.error-card p { color: var(--color-muted); line-height: 1.6; font-size: 0.95rem; }

.hidden { display: none !important; }
.page-header { margin-bottom: 1.5rem; }
.page-header h1 { font-size: 2rem; }
.empty-state { text-align: center; padding: 3rem; color: var(--color-muted); }

.hero{
    width:100%;
    padding:2rem 3rem;
    margin:0;
    display:block;
}

.hero__text{
    max-width:700px;
}

.hero .btn{
    margin-top: 1.25rem;
}

.eyebrow {
    color: var(--color-primary);
    font-weight: 700;
    text-transform: uppercase;
}


.navbar {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: .9rem 2rem;
    background: var(--bg-surface);
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar__logo {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--color-primary);
    white-space: nowrap;
    transition: opacity .15s;
}
.navbar__logo:hover { text-decoration: none; opacity: .85; }
.navbar__logo-icon { font-size: 1.4rem; }

.navbar__search {
    flex: 1;
    max-width: 480px;
    position: relative;
}

.navbar__search input {
    width: 100%;
    padding: .65rem 1.2rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-size: .95rem;
    background: var(--bg-subtle);
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.navbar__search input:focus {
    outline: none;
    border-color: var(--color-primary);
    background: var(--bg-surface);
    box-shadow: 0 0 0 3px rgba(255,107,53,.12);
}

.navbar__links {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .4rem;
    list-style: none;
    margin: 0 0 0 auto;
    padding: 0;
}

.navbar__links > li > a {
    display: inline-block;
    padding: .55rem .9rem;
    border-radius: var(--radius);
    font-size: .92rem;
    font-weight: 500;
    color: var(--color-dark);
    transition: background-color .15s, color .15s;
}
.navbar__links > li > a:not(.btn):hover {
    background: var(--color-light);
    color: var(--color-primary);
    text-decoration: none;
}
.navbar__links a.is-active:not(.btn) {
    color: var(--color-primary);
    background: rgba(255,107,53,.08);
    font-weight: 600;
}

.navbar__user { display: flex; align-items: center; gap: .5rem; margin-left: .4rem; padding-left: .75rem; border-left: 1px solid var(--border-soft); }
.navbar__lang { display: flex; align-items: center; }
.navbar__lang .lang-switcher {
    padding: .25rem .5rem;
    font-size: .85rem;
    font-weight: 600;
    border: 1px solid var(--border-soft);
    border-radius: 4px;
    background: var(--color-light);
    cursor: pointer;
    transition: border-color 0.2s;
}
.navbar__lang .lang-switcher:hover {
    border-color: var(--color-primary);
}
.navbar__links > li > a.navbar__profile { display: inline-flex; flex-direction: row; align-items: center; gap: .55rem; padding: .3rem .55rem; min-width: 0; line-height: 1; }
.navbar__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    overflow: hidden;
    flex-shrink: 0;
    vertical-align: middle;
}
img.navbar__avatar { object-fit: cover; display: block; }
.navbar__avatar--img { padding: 0; }
.navbar__username { font-size: .9rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; line-height: 1.4; padding: 2px 0; }
.navbar__logout-form { margin: 0; flex-shrink: 0; display: flex; align-items: center; }

.container{
    width:100%;
    max-width:none;
    margin:0;
    padding:0 3rem 2rem 3rem;
}

#pets{
    margin-top:1rem;
}

.pet-grid{
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
    width: 100%;
}

/* Forces cards to stretch equally across the full container width */
.pet-grid--full {
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}
@media (max-width: 600px) {
    .pet-grid--full { grid-template-columns: 1fr; }
}

.pet-card{
    background: var(--bg-surface);
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,.08);
    padding: 1rem;
    min-height: 220px;
}

/* CONTACT PAGE */

.contact-header {
    text-align: center;
    padding: 2rem 1rem;
}

.contact-header h1 {
    font-size: 2.2rem;
    color: var(--color-dark);
    margin-bottom: .5rem;
}

.contact-header p {
    max-width: 760px;
    margin: 0 auto;
    font-size: 1.2rem;
    color: var(--color-muted);
    line-height: 1.6;
}

.contact-page {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem;
    padding: 2rem 3rem;
}

.contact-card,
.contact-info-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow);
    padding: 2rem;
}

.contact-card h2 {
    color: var(--text);
    margin-bottom: 1.5rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    background: var(--bg-page);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    padding: .9rem;
    font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: 2px solid var(--color-primary);
    border-color: transparent;
}

.contact-note {
    text-align: center;
    color: var(--color-muted);
    margin-top: .8rem;
}

.contact-info-card {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-info-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-icon {
    color: var(--color-primary);
    font-size: 1.6rem;
    width: 35px;
}

.contact-info-item h3 {
    color: var(--text);
    margin-bottom: .5rem;
}

.contact-info-item p {
    color: var(--text);
    margin-bottom: .3rem;
}

.contact-success {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.contact-error {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

@media (max-width: 850px) {
    .contact-page {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .contact-row {
        grid-template-columns: 1fr;
    }
}

/* ABOUT PAGE */

.about-breadcrumb {
    padding: 1.5rem 3rem;
    color: var(--text);
}

.about-breadcrumb a {
    color: var(--text);
    text-decoration: none;
}

.about-breadcrumb span {
    color: var(--color-primary);
    margin: 0 .7rem;
}

.about-hero {
    text-align: center;
    padding: 3rem 2rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    margin: 0 3rem 2rem;
}

.about-hero h1 {
    color: var(--text);
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.about-hero p {
    max-width: 820px;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 1.3rem;
    line-height: 1.6;
}

.about-two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    padding: 2.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    margin: 0 3rem 2rem;
}

.about-two-columns h2,
.about-values h2,
.about-impact h2,
.about-team h2 {
    color: var(--text);
    margin-bottom: 1.5rem;
    text-align: center;
}

.about-two-columns h2 {
    text-align: left;
}

.about-two-columns p {
    color: var(--text);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.2rem;
}

.about-values {
    padding: 2.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    margin: 0 3rem 2rem;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.value-card {
    background: var(--bg-surface);
    border: 1px solid var(--color-primary);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.value-icon {
    color: var(--color-primary);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.value-card h3 {
    color: var(--text);
    margin-bottom: 1rem;
}

.value-card p {
    color: var(--text-muted);
    line-height: 1.5;
}

.about-impact {
    background: var(--color-primary);
    color: white;
    margin: 3rem;
    padding: 3rem 2rem;
    border-radius: 14px;
    text-align: center;
}

.about-impact h2 {
    color: white;
}

.impact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.impact-grid strong {
    font-size: 3rem;
    color: white;
}

.impact-grid p {
    color: white;
    font-size: 1.1rem;
}

.about-team {
    text-align: center;
    padding: 2.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow);
    margin: 0 3rem 3rem;
}

.about-team p {
    max-width: 850px;
    margin: 1rem auto;
    color: var(--text);
    font-size: 1.1rem;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .about-two-columns,
    .values-grid,
    .impact-grid {
        grid-template-columns: 1fr;
    }

    .about-hero,
    .about-two-columns,
    .about-values,
    .about-team {
        padding: 1.75rem;
        margin: 0 1rem 1.5rem;
    }

    .about-impact {
        margin: 1.5rem 1rem;
    }
}

/* ── HOME PAGE ─────────────────────────────────────────────────────────────── */
.hero-home {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    align-items: center;
    gap: 3rem;
    padding: 4rem 2rem;
    background: linear-gradient(135deg, #fff7f2 0%, #ffeadd 100%);
    border-radius: 16px;
    margin: 1.5rem 0 3rem;
}
.hero-home__text { max-width: 560px; }
.hero-home h1 { font-size: 3.2rem; line-height: 1.1; color: var(--color-dark); margin: .5rem 0 1.25rem; font-weight: 800; }
.hero-home__accent { color: var(--color-primary); }
.hero-home__lead { font-size: 1.1rem; color: var(--color-muted); line-height: 1.6; margin-bottom: 2rem; }
.hero-home__actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-home__visual { position: relative; display: flex; align-items: center; justify-content: center; height: 320px; }
.hero-home__circle { width: 280px; height: 280px; border-radius: 50%; background: var(--color-primary); opacity: .15; position: absolute; }
.hero-home__emoji { font-size: 11rem; position: relative; z-index: 1; }
.hero-home__image { position: relative; z-index: 1; width: 280px; height: 280px; object-fit: cover; border-radius: 50%; box-shadow: 0 12px 32px rgba(0,0,0,.18); }

.stats-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 3rem; }
.stat-pill { background: var(--bg-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem 1rem; text-align: center; }
.stat-pill__num { display: block; font-size: 2.4rem; font-weight: 800; color: var(--color-primary); line-height: 1; margin-bottom: .35rem; }
.stat-pill__label { font-size: .9rem; color: var(--color-muted); font-weight: 500; }

.home-section { margin-bottom: 4rem; }
.home-section__header { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.5rem; }
.home-section h2 { font-size: 1.8rem; color: var(--color-dark); }
.home-section__link { font-size: .95rem; color: var(--color-primary); font-weight: 600; }
.text-center { text-align: center; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2rem; }
.step { background: var(--bg-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem 1.5rem; text-align: center; transition: transform .2s; }
.step:hover { transform: translateY(-4px); }
.step__icon { font-size: 2.5rem; margin-bottom: .75rem; }
.step h3 { color: var(--color-primary); margin-bottom: .5rem; font-size: 1.15rem; }
.step p { color: var(--color-muted); line-height: 1.5; font-size: .95rem; }

.cta-banner { background: linear-gradient(135deg, var(--color-primary) 0%, #ff8a5b 100%); color: #fff; padding: 3rem 2rem; border-radius: 16px; text-align: center; margin-bottom: 3rem; }
.cta-banner h2 { color: #fff; font-size: 2rem; margin-bottom: .5rem; }
.cta-banner p { color: rgba(255,255,255,.92); margin-bottom: 1.5rem; font-size: 1.05rem; }
.cta-banner .btn--primary { background: var(--bg-surface); color: var(--color-primary); }
.cta-banner .btn--primary:hover { background: rgba(255,255,255,.9); }

@media (max-width: 768px) {
    .hero-home { grid-template-columns: 1fr; padding: 2.5rem 1.5rem; gap: 1.5rem; }
    .hero-home h1 { font-size: 2.2rem; }
    .hero-home__visual { height: 200px; }
    .hero-home__circle { width: 180px; height: 180px; }
    .hero-home__emoji { font-size: 7rem; }
    .stats-row { grid-template-columns: 1fr; }
    .steps { grid-template-columns: 1fr; }
}

/* ── PROFILE SETTINGS ──────────────────────────────────────────────────────── */
.settings-page { max-width: 1100px; margin: 0 auto; padding: 1rem 0 3rem; }

.settings-header { display: flex; align-items: center; justify-content: center; gap: 1.25rem; padding: 2rem; background: linear-gradient(135deg, #fff7f2 0%, #ffeadd 100%); border-radius: var(--radius); margin-bottom: 2rem; }
.settings-header__avatar { width: 72px; height: 72px; border-radius: 50%; background: var(--color-primary); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800; flex-shrink: 0; overflow: hidden; box-shadow: 0 4px 14px rgba(0,0,0,.1); }
.settings-header__avatar--img { padding: 0; object-fit: cover; }
.settings-header__text { display: flex; flex-direction: column; justify-content: center; gap: .25rem; min-width: 0; max-width: 480px; }
.settings-header__name { font-size: 1.6rem; color: var(--color-dark); line-height: 1.2; margin: 0; word-break: break-word; }
.settings-header__sub { color: var(--color-muted); font-size: .95rem; word-break: break-word; }

.settings-layout { display: grid; grid-template-columns: 240px 1fr; gap: 2rem; align-items: start; }

.settings-nav { display: flex; flex-direction: column; gap: .25rem; background: var(--bg-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: .75rem; position: sticky; top: 5rem; }
.settings-nav__link { display: flex; align-items: center; gap: .65rem; padding: .65rem .85rem; border-radius: var(--radius); color: var(--color-dark); font-size: .92rem; font-weight: 500; text-decoration: none; transition: background .15s, color .15s; cursor: pointer; }
.settings-nav__link:hover { background: var(--color-light); text-decoration: none; }
.settings-nav__link.is-active { background: rgba(255,107,53,.12); color: var(--color-primary); font-weight: 600; }
.settings-nav__link--danger.is-active { background: #fde8ea; color: var(--color-danger); }
.settings-nav__link--danger:hover { color: var(--color-danger); }

.settings-main { background: var(--bg-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 2rem; min-height: 400px; }
.settings-section { display: none; }
.settings-section.is-active { display: block; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.settings-section__header { padding-bottom: 1rem; border-bottom: 1px solid var(--border-soft); margin-bottom: 1.5rem; }
.settings-section__header h2 { font-size: 1.3rem; color: var(--color-dark); margin-bottom: .25rem; }
.settings-section__header p { color: var(--color-muted); font-size: .9rem; }

.settings-form { display: flex; flex-direction: column; gap: 1.25rem; max-width: 520px; }

.avatar-uploader { display: flex; align-items: center; gap: 1.5rem; padding: 1rem; background: var(--bg-subtle); border-radius: var(--radius); }
.avatar-uploader__preview { width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--color-primary); color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.avatar-uploader__preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-uploader__initial { font-size: 2.4rem; font-weight: 800; }
.avatar-uploader__controls { display: flex; flex-direction: column; gap: .5rem; }
.avatar-uploader__controls label.btn { cursor: pointer; align-self: flex-start; }
.avatar-uploader__remove { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--color-danger); cursor: pointer; }
.avatar-uploader__remove input { accent-color: var(--color-danger); }
.form-hint { color: var(--color-muted); font-size: .8rem; }
.form-group input:disabled { background: #f3f4f6; color: #9ca3af; cursor: not-allowed; }

.settings-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }

.danger-card { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding: 1.25rem; background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--radius); margin-bottom: 1rem; }
.danger-card strong { display: block; color: var(--color-danger); margin-bottom: .25rem; }
.danger-card p { color: var(--color-muted); font-size: .85rem; margin: 0; }
.danger-card--severe { background: #fee2e2; border-color: #fca5a5; }
.danger-card--severe strong::before { content: "⚠️ "; }
[data-theme="dark"] .danger-card { background: rgba(220,53,69,.08); border-color: rgba(220,53,69,.3); }
[data-theme="dark"] .danger-card--severe { background: rgba(220,53,69,.15); border-color: rgba(220,53,69,.5); }

/* ── ADOPTIONS PAGE ───────────────────────────────────────────────────────── */
.adoptions-page { max-width: 1000px; margin: 0 auto; padding: 1rem 0 3rem; }
.adoptions-header { text-align: center; margin-bottom: 2.5rem; padding: 2.5rem 1rem; background: linear-gradient(135deg, #fff7f2 0%, #ffeadd 100%); border-radius: var(--radius); }
.adoptions-header h1 { font-size: 2.2rem; color: var(--text); margin-bottom: .5rem; }
.adoptions-header p { color: var(--text-muted); font-size: 1rem; }
[data-theme="dark"] .adoptions-header { background: linear-gradient(135deg, var(--bg-surface) 0%, #2d1810 100%); }

.adoptions-section { background: var(--bg-surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.75rem 2rem; margin-bottom: 1.5rem; }
.adoptions-section__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.25rem; padding-bottom: .75rem; border-bottom: 1px solid var(--border-soft); }
.adoptions-section__head h2 { font-size: 1.25rem; color: var(--text); }
.adoptions-section__count { font-size: .85rem; color: var(--text-muted); font-weight: 500; }

.adoptions-table-wrap { overflow-x: auto; }
.adoptions-table-wrap .data-table { box-shadow: none; }

.adoptions-empty { text-align: center; padding: 2.5rem 1rem; color: var(--text-muted); display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.adoptions-empty__icon { font-size: 2.5rem; }
.adoptions-empty p { margin: 0; font-size: .95rem; }

.pet-grid--centered { justify-content: center; }
.pet-card--adopted { border: 2px solid var(--color-success); }
.pet-card--adopted .pet-card__img { height: 180px; }

@media (max-width: 600px) {
    .adoptions-section { padding: 1.25rem; }
    .adoptions-header { padding: 1.75rem 1rem; }
    .adoptions-header h1 { font-size: 1.6rem; }
}

/* ── MODAL ─────────────────────────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.6); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 1rem; animation: modalFade .12s ease; }
.modal-overlay[hidden] { display: none; }
@keyframes modalFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalRise { from { opacity: 0; transform: translateY(12px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

.modal-card { background: var(--bg-surface); color: var(--text); border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,.25); padding: 2rem; max-width: 460px; width: 100%; text-align: center; animation: modalRise .2s ease; }
.modal-card__icon { font-size: 3rem; margin-bottom: 1rem; }
.modal-card h2 { font-size: 1.4rem; color: var(--text); margin-bottom: .75rem; }
.modal-card__body { color: var(--text-muted); line-height: 1.5; margin-bottom: 1.5rem; font-size: .95rem; }
.modal-card__body strong { color: var(--color-danger); font-weight: 700; }
.modal-card__field { text-align: left; margin-bottom: 1.5rem; }
.modal-card__field label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: .4rem; color: var(--text); }
.modal-card__field code { background: var(--bg-subtle); padding: .1rem .4rem; border-radius: 4px; font-size: .9rem; color: var(--color-danger); font-weight: 700; }
.modal-card__field input { width: 100%; padding: .65rem .9rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: 1rem; background: var(--bg-surface); color: var(--text); font-family: monospace; letter-spacing: .05em; }
.modal-card__field input:focus { outline: 2px solid var(--color-danger); border-color: transparent; }
.modal-card__error { display: block; margin-top: .4rem; color: var(--color-danger); font-size: .8rem; }
.modal-card__actions { display: flex; gap: .75rem; justify-content: flex-end; }
.modal-card__actions .btn { min-width: 110px; }
.modal-card__actions .btn:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 768px) {
    .settings-layout { grid-template-columns: 1fr; }
    .settings-nav { position: static; flex-direction: row; overflow-x: auto; }
    .settings-nav__link { white-space: nowrap; }
    .settings-stats { grid-template-columns: 1fr; }
    .danger-card { flex-direction: column; align-items: flex-start; }
}

/* ── PREFERENCES ───────────────────────────────────────────────────────────── */
.pref-group { padding: 1.5rem 0; border-bottom: 1px solid var(--border-soft); }
.pref-group:last-of-type { border-bottom: none; }
.pref-group__title { font-size: 1.05rem; font-weight: 700; color: var(--color-dark); margin-bottom: .25rem; }
.pref-group__hint { color: var(--color-muted); font-size: .85rem; margin-bottom: 1rem; }

.theme-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; max-width: 480px; }
.theme-option { cursor: pointer; }
.theme-option input { position: absolute; opacity: 0; pointer-events: none; }
.theme-option__card { display: flex; flex-direction: column; gap: .5rem; padding: .75rem; border: 2px solid #e5e7eb; border-radius: var(--radius); transition: border-color .15s, transform .1s; }
.theme-option__card:hover { border-color: var(--color-primary); }
.theme-option input:checked + .theme-option__card { border-color: var(--color-primary); background: rgba(255,107,53,.06); }
.theme-option__preview { display: block; height: 60px; border-radius: 4px; }
.theme-option__preview--light { background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%); border: 1px solid var(--border); }
.theme-option__preview--dark { background: linear-gradient(135deg, #1f2937 0%, #111827 100%); }
.theme-option__preview--system { background: linear-gradient(135deg, #f8f9fa 0%, #f8f9fa 50%, #1f2937 50%, #111827 100%); }
.theme-option__label { font-size: .85rem; font-weight: 600; text-align: center; }

.pref-select { padding: .55rem .9rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: .95rem; min-width: 220px; background: var(--bg-surface); color: var(--text); cursor: pointer; }

.pref-toggle { display: flex; align-items: flex-start; gap: 1rem; padding: .85rem 0; cursor: pointer; }
.pref-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.pref-toggle__slider { position: relative; flex-shrink: 0; width: 44px; height: 24px; background: #cbd5e1; border-radius: 99px; transition: background .15s; margin-top: 2px; }
.pref-toggle__slider::after { content: ''; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: var(--bg-surface); border-radius: 50%; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.pref-toggle input:checked + .pref-toggle__slider { background: var(--color-primary); }
.pref-toggle input:checked + .pref-toggle__slider::after { transform: translateX(20px); }
.pref-toggle__text strong { display: block; color: var(--color-dark); font-size: .92rem; margin-bottom: .15rem; }
.pref-toggle__text small { color: var(--color-muted); font-size: .82rem; }
.pref-saved-notice { color: var(--color-muted); font-size: .85rem; text-align: right; margin-top: 1rem; }
#pref-status { transition: color .2s; }
#pref-status:not(:empty) { color: var(--color-success); }

/* ── DARK MODE ───────────────────────────────────────────────────────────────
   The variables in [data-theme="dark"] at the top do most of the work.
   This block only handles a few rules that hardcoded specific gradients/colors. */
[data-theme="dark"] .hero-home,
[data-theme="dark"] .settings-header { background: linear-gradient(135deg, var(--bg-surface) 0%, #2d1810 100%); }
[data-theme="dark"] .footer { background: var(--bg-subtle); }
[data-theme="dark"] .data-table th { background: #111827; }

/* DONATE PAGE */

.donate-breadcrumb {
    padding: 1.5rem 3rem;
    color: black;
}

.donate-breadcrumb a {
    color: black;
    text-decoration: none;
}

.donate-breadcrumb span {
    color: #f97316;
    margin: 0 .7rem;
}

.donate-hero {
    text-align: center;
    padding: 3rem 1rem;
}

.donate-heart {
    color: #f97316;
    font-size: 5rem;
    line-height: 1;
}

.donate-hero h1 {
    color: black;
    font-size: 2.2rem;
    margin: 1rem 0;
}

.donate-hero p {
    max-width: 800px;
    margin: 0 auto;
    color: #333;
    font-size: 1.3rem;
    line-height: 1.5;
}

.donate-page {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem;
    padding: 2rem 3rem;
}

.donate-card,
.impact-card {
    background: white;
    border: 1px solid #f97316;
    border-radius: 15px;
    padding: 2rem;
}

.donate-card h2,
.impact-card h2 {
    color: black;
    margin-bottom: 1.5rem;
}

.donate-tabs {
    background: #f3f4f6;
    border-radius: 15px;
    padding: .4rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 2rem;
}

.donate-tabs input,
.amount-grid input {
    display: none;
}

.donate-tabs span {
    display: block;
    text-align: center;
    padding: .8rem;
    border-radius: 12px;
    cursor: pointer;
    color: black;
    font-weight: bold;
}

.donate-tabs input:checked + span {
    background: white;
}

.donate-card h3 {
    color: black;
    margin-bottom: 1rem;
}

.amount-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    margin-bottom: 1.2rem;
}

.amount-grid span {
    display: block;
    border: 1px solid #f97316;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    color: black;
    font-weight: bold;
    cursor: pointer;
}

.amount-grid input:checked + span {
    background: #f97316;
    color: white;
}

.custom-amount {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    padding: .8rem;
    margin-bottom: .5rem;
}

.custom-amount span {
    color: #777;
    font-size: 1.5rem;
}

.custom-amount input {
    border: none;
    background: transparent;
    width: 100%;
    font-size: 1rem;
}

.custom-amount input:focus {
    outline: none;
}

.donate-form-group {
    margin-top: 1.3rem;
}

.donate-form-group label {
    display: block;
    color: black;
    font-weight: bold;
    margin-bottom: .4rem;
}

.donate-form-group input,
.donate-row input {
    width: 100%;
    background: #f8f9fa;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: .9rem;
    font-size: 1rem;
}

.donate-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.donate-button {
    width: 100%;
    background: #f97316;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 1rem;
    margin-top: 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
}

.donate-button:hover {
    background: #ea580c;
}

.donate-note {
    text-align: center;
    color: #333;
    margin-top: 1rem;
}

.donate-side {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.impact-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.impact-item span {
    color: #f97316;
    font-size: 1.4rem;
    font-weight: bold;
}

.impact-item strong {
    color: black;
    font-size: 1.1rem;
}

.impact-item p {
    color: #333;
    margin-top: .3rem;
}

.help-card {
    background: #f97316;
    color: white;
    border-radius: 15px;
    padding: 2rem;
}

.help-card h2 {
    color: white;
    margin-bottom: 1rem;
}

.help-card p {
    color: white;
    font-size: 1.1rem;
    margin-bottom: .8rem;
}

.donate-success {
    background: #d4edda;
    color: #155724;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.donate-error {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

@media (max-width: 900px) {
    .donate-page {
        grid-template-columns: 1fr;
        padding: 1rem;
    }

    .amount-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* FAQ PAGE */

.faq-breadcrumb {
    padding: 1.5rem 3rem;
    color: black;
}

.faq-breadcrumb a {
    color: black;
    text-decoration: none;
}

.faq-breadcrumb span {
    color: #f97316;
    margin: 0 .7rem;
}

.faq-hero {
    text-align: center;
    padding: 3rem 1rem;
}

.faq-icon {
    width: 80px;
    height: 80px;
    border: 6px solid #f97316;
    color: #f97316;
    border-radius: 50%;
    margin: 0 auto 1.5rem;
    font-size: 3rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.faq-hero h1 {
    color: black;
    font-size: 2.2rem;
    margin-bottom: 1rem;
}

.faq-hero p {
    max-width: 760px;
    margin: 0 auto;
    color: #333;
    font-size: 1.3rem;
    line-height: 1.5;
}

.faq-page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.faq-card {
    background: white;
    border: 1px solid #f97316;
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2.5rem;
}

.faq-card h2 {
    color: black;
    margin-bottom: 2rem;
}

.faq-card details {
    border-bottom: 1px solid #f3c6a6;
    padding: 1.1rem 0;
}

.faq-card details:last-child {
    border-bottom: none;
}

.faq-card summary {
    color: black;
    font-weight: bold;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-card summary::-webkit-details-marker {
    display: none;
}

.faq-card summary::after {
    content: "⌄";
    color: #f97316;
    font-size: 1.3rem;
}

.faq-card details[open] summary::after {
    content: "⌃";
}

.faq-card details p {
    color: #222;
    line-height: 1.6;
    margin-top: 1rem;
    padding-right: 2rem;
}

.faq-contact-box {
    max-width: 1200px;
    margin: 2rem auto 4rem;
    background: #fff3e8;
    border-radius: 15px;
    text-align: center;
    padding: 3rem 1rem;
}

.faq-contact-box h2 {
    color: black;
    margin-bottom: 1rem;
}

.faq-contact-box p {
    color: #333;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.faq-contact-box a {
    color: #f97316;
    font-weight: bold;
    text-decoration: none;
    font-size: 1.1rem;
}

@media (max-width: 800px) {
    .faq-breadcrumb {
        padding: 1rem;
    }

    .faq-card {
        padding: 1.5rem;
    }
}

/* ── FLUID / RESPONSIVE OVERRIDES ───────────────────────────────────────────
   All layouts scale with viewport width — no hiding, no hamburgers.
   clamp() values: clamp(min, preferred, max)                               */

/* Navbar wraps gracefully on narrow viewports */
.navbar {
    flex-wrap: wrap;
    gap: .5rem .75rem;
    padding: .75rem clamp(.75rem, 3vw, 2rem);
}
.navbar__search { min-width: 140px; }
.navbar__links  { flex-wrap: wrap; gap: .25rem; }
.navbar__links > li > a { font-size: clamp(.75rem, 1.4vw, .92rem); padding: .45rem clamp(.35rem, 1vw, .9rem); }
.navbar__username { max-width: clamp(80px, 12vw, 160px); }

/* Container scales between 1rem padding on phones and 3rem on wide screens */
.container { padding: 0 clamp(1rem, 4vw, 3rem) 2rem; }

/* Pet grid: auto-fill so cards never get smushed — they wrap instead */
.pet-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: clamp(1rem, 2vw, 2rem);
}

/* Two-column detail collapses when narrow */
.pet-detail { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 2rem; }

/* Forms */
.form-row { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Admin sidebar stacks when viewport is narrow */
.admin-layout { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: start; }
.admin-sidebar { height: auto; }

/* Footer grid collapses fluidly */
.footer { padding: 2.5rem clamp(1rem, 4vw, 3rem) 0; }
.footer__grid { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.footer__bottom { margin: 0 clamp(-1rem, -4vw, -3rem); }

/* About/Donate/FAQ pages: replace fixed 3rem margins with fluid ones */
.about-breadcrumb  { padding: 1.5rem clamp(1rem, 4vw, 3rem); }
.about-hero        { margin: 0 clamp(.5rem, 3vw, 3rem) 2rem; }
.about-two-columns { margin: 0 clamp(.5rem, 3vw, 3rem) 2rem; }
.about-values      { margin: 0 clamp(.5rem, 3vw, 3rem) 2rem; }
.about-team        { margin: 0 clamp(.5rem, 3vw, 3rem) 3rem; }
.about-impact      { margin: 3rem clamp(.5rem, 3vw, 3rem); }
.donate-breadcrumb { padding: 1.5rem clamp(1rem, 4vw, 3rem); }
.donate-page       { padding: 2rem clamp(1rem, 4vw, 3rem); }
.faq-breadcrumb    { padding: 1.5rem clamp(1rem, 4vw, 3rem); }
.contact-page      { padding: 2rem clamp(1rem, 4vw, 3rem); }

/* Tables scroll horizontally when content is wider than the viewport */
.data-table-wrap,
.adoptions-table-wrap { overflow-x: auto; }

/* Status details stacks when narrow */
.status-details { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

/* Maintenance / error images fit their container */
.maintenance-card__img,
.error-card__img { width: min(575px, 100%); height: auto; }

/* Stats row: 3-up on wide, 2-up mid, 1-up narrow */
.stats-row { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

/* Hero heading scales with viewport */
.hero-home h1 { font-size: clamp(1.8rem, 5vw, 3.2rem); }
.hero-home__image  { width: clamp(180px, 30vw, 280px); height: clamp(180px, 30vw, 280px); }
.hero-home__circle { width: clamp(200px, 32vw, 280px); height: clamp(200px, 32vw, 280px); }

/* Values / impact grids */
.values-grid  { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.impact-grid  { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.amount-grid  { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
.donate-row   { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

/* Modal actions stack on very narrow viewports */
@media (max-width: 420px) {
    .modal-card__actions { flex-direction: column; }
    .modal-card__actions .btn { width: 100%; }
    .form-actions { flex-direction: column; }
    .theme-picker { grid-template-columns: 1fr 1fr; }
}