/* Horses for Sale Section */

.hfs-section {
    width: 100%;
    padding: 6rem 2rem;
    background-color: var(--color-bg);
    position: relative;
    z-index: 2;
}

.hfs-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* Header */
.hfs-header {
    text-align: center;
    margin-bottom: 4rem;
}

.hfs-title {
    font-family: var(--font-title);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 3px;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(-20px);
}

.hfs-title.visible {
    animation: fadeInDown 0.8s ease-out forwards;
}

.hfs-subtitle {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 300;
    color: #5a6a5a;
    letter-spacing: 1px;
    text-transform: uppercase;
    opacity: 0;
    transform: translateY(20px);
}

.hfs-subtitle.visible {
    animation: fadeInUp 0.8s ease-out 0.2s forwards;
}

/* Grid Layout */
.hfs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-bottom: 4rem;
}

/* HFS filter controls (right above the grid) */
.hfs-controls {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    align-items: center;
}
.hfs-filter-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    flex-wrap: wrap;
    background: rgba(255,255,255,0.02);
    padding: 0.35rem;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(12,42,22,0.03);
}
.hfs-filter-label {
    font-size: 0.85rem;
    color: rgba(21,48,76,0.75);
    display: inline-flex;
    gap: .5rem;
    align-items:center;
    font-family: var(--font-body);
}

/* inputs / selects styled to match site */
.hfs-filter-select,
.hfs-filter-input {
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid rgba(21,48,76,0.08);
    background: linear-gradient(180deg,#ffffff 0%, #fbfff9 100%);
    padding: 0.45rem 0.9rem;
    padding-right: 2.4rem; /* space for custom arrow */
    border-radius: 10px;
    min-width: 130px;
    font-size: 0.9rem;
    color: var(--color-primary);
    font-weight: 600;
    box-shadow: 0 6px 18px rgba(12,42,22,0.04);
    transition: box-shadow .18s ease, transform .12s ease, border-color .12s ease;
    cursor: pointer;
}

.hfs-filter-input { cursor: text; font-weight: 500; color: rgba(21,48,76,0.85); }

.hfs-filter-select:focus,
.hfs-filter-input:focus {
    outline: none;
    border-color: rgba(83,202,99,0.6);
    box-shadow: 0 10px 30px rgba(12,42,22,0.06), 0 0 0 4px rgba(83,202,99,0.05);
}

/* custom chevron for select using inline SVG */
.hfs-filter-select {
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2353CA63' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 14px 14px;
}

.hfs-filter-select:hover {
    transform: translateY(-1px);
}

/* native select visually hidden when replaced by custom UI (still accessible) */
.native-hidden-select {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Custom select (fully styleable dropdown) */
.custom-select {
    position: relative;
    display: inline-block;
    min-width: 140px;
}
.custom-select__trigger {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    width: 100%;
    padding: 0.45rem 0.9rem;
    border-radius: 10px;
    border: 1px solid rgba(21,48,76,0.08);
    background: linear-gradient(180deg,#ffffff 0%, #fbfff9 100%);
    font-size: 0.9rem;
    color: var(--color-primary);
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(12,42,22,0.04);
}
.custom-select__trigger:focus { outline: none; box-shadow: 0 14px 36px rgba(12,42,22,0.08); }
.custom-select__caret { width: 14px; height: 14px; opacity: .9; }

.custom-select__list {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 10px;
    border: 1px solid rgba(21,48,76,0.06);
    box-shadow: 0 18px 40px rgba(12,42,22,0.12);
    max-height: 280px;
    overflow: auto;
    padding: 6px 6px;
    z-index: 1200;
    display: none;
    transition: opacity .12s ease, transform .12s ease;
}
.custom-select.open .custom-select__list { display: block; opacity: 1; transform: translateY(0); }
.custom-select__option {
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    color: rgba(21,48,76,0.9);
    font-size: 0.9rem;
    display: block;
}
.custom-select__option:hover,
.custom-select__option:focus { background: rgba(83,202,99,0.06); outline: none; }
.custom-select__option.selected { background: rgba(83,202,99,0.12); font-weight: 700; color: rgb(12,42,22); }

@media (max-width: 480px) {
    .custom-select__list { max-height: 220px; }
}


/* visual state when select/menu is opened (focus-within or explicit .open class) */
.hfs-filter-label:focus-within,
.hfs-filter-label.open {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(12,42,22,0.08);
    border-radius: 12px;
}

.hfs-filter-label.open .hfs-filter-select,
.hfs-filter-label:focus-within .hfs-filter-select {
    border-color: rgba(83,202,99,0.9);
    box-shadow: 0 18px 44px rgba(12,42,22,0.08), 0 0 0 6px rgba(83,202,99,0.05);
    z-index: 40;
    position: relative;
}

/* option styling (limited by browser support) */
.hfs-filter-select option { background: #ffffff; color: rgba(21,48,76,0.9); padding: 6px 8px; }

/* clear button */
.hfs-filter-clear {
    padding: 0.45rem 0.8rem;
    border-radius: 10px;
    border: 1px solid rgba(21,48,76,0.08);
    background: linear-gradient(180deg, rgba(83,202,99,0.08), rgba(83,202,99,0.04));
    color: rgb(12,42,22);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: .4px;
    box-shadow: 0 6px 18px rgba(12,42,22,0.04);
    transition: transform .12s ease, box-shadow .12s ease;
}
.hfs-filter-clear:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(12,42,22,0.08); }

/* responsive */
@media (max-width: 900px) {
    .hfs-controls { justify-content: center; }
    .hfs-grid { grid-template-columns: repeat(2, 1fr); }
    .hfs-filter-row { width: 100%; justify-content: center; }
    .hfs-filter-label { min-width: 120px; }
}
@media (max-width: 480px) {
    .hfs-grid { grid-template-columns: 1fr; gap: 1rem; }
    .hfs-filter-row { flex-direction: column; gap: .5rem; align-items: stretch; padding: .6rem; }
    .hfs-filter-select, .hfs-filter-input { width: 100%; min-width: 0; }
}

/* Card */
.hfs-card {
    background-color: #ffffff;
    border: 1px solid rgba(189, 195, 199, 0.2);
    border-radius: 8px;
    overflow: hidden;
    transition: all var(--transition-smooth);
    opacity: 0;
    transform: translateY(30px);
}

.hfs-card.visible {
    animation: fadeInUp 0.8s ease-out forwards;
    opacity: 1;
}

.hfs-card:hover {
    border-color: rgba(83, 202, 99, 0.4);
    box-shadow: 0 12px 32px rgba(12, 42, 22, 0.12);
    transform: translateY(-8px);
}

/* Card Image */
.hfs-card-image {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
}

.horse-image {
    width: 100%;
    height: 100%;
    /* show the whole image without cropping; preserves aspect ratio */
    object-fit: contain;
    object-position: center center;
    display: block;
    /* include filter in transition so darkening is smooth */
    transition: transform var(--transition-smooth), filter var(--transition-smooth);
}

.hfs-card:hover .horse-image {
    transform: scale(1.05);
    /* darken only the image itself (no overlay color leaking outside image) */
    filter: brightness(0.55);
}

/* Card Overlay */
.hfs-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    box-sizing: border-box;
    /* allow smooth resizing when JS adjusts size/position */
    transition: opacity var(--transition-smooth), top 0.18s ease, left 0.18s ease, width 0.18s ease, height 0.18s ease;
    pointer-events: auto; /* overlay contains clickable button */
}

/* When overlay exactly matches the visible image, give it rounded corners */
.hfs-card-overlay.shrink-to-img {
    border-radius: 8px;
    overflow: hidden;
}

.hfs-card:hover .hfs-card-overlay {
    opacity: 1;
}

/* View Button */
.hfs-view-btn {
    padding: 0.6rem 2rem;
    background-color: #ffffff;
    color: var(--color-primary);
    border: none;
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.hfs-view-btn:hover {
    background-color: rgb(83, 202, 99);
    color: #ffffff;
}

/* Card Content */
.hfs-card-content {
    padding: 1.8rem;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.hfs-card-title {
    font-family: var(--font-title);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 1px;
}

.hfs-card-info {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 500;
    color: #7a8a7a;
    letter-spacing: 0.5px;
}

.hfs-card-breed {
    font-weight: 600;
    color: #333333;
}

.hfs-card-age {
    font-weight: 600;
    color: #333333;
}

.hfs-card-description {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    color: #2d3436;
    line-height: 1.6;
}

/* Feature Tags */
.hfs-card-tags {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.hfs-tag {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    background-color: rgba(12, 42, 22, 0.08);
    color: #5a6a5a;
    border: 1px solid rgba(12, 42, 22, 0.15);
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all var(--transition-smooth);
    cursor: default;
}

.hfs-tag:hover {
    background-color: rgb(83, 202, 99);
    color: #ffffff;
    border-color: rgb(83, 202, 99);
}

/* CTA Section */
.hfs-cta {
    background: linear-gradient(135deg, rgba(12, 42, 22, 0.04), rgba(189, 195, 199, 0.05));
    border: 1px solid rgba(12, 42, 22, 0.1);
    border-radius: 8px;
    padding: 3rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
}

.hfs-cta.visible {
    animation: fadeInUp 0.8s ease-out forwards;
}

.hfs-cta-title {
    font-family: var(--font-title);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 2px;
}

.hfs-cta-text {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    color: #5a6a5a;
    letter-spacing: 0.5px;
}

.hfs-cta-btn {
    display: inline-block;
    padding: 0.8rem 2.5rem;
    background-color: var(--color-primary);
    color: #ffffff;
    border: 1px solid var(--color-primary);
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    align-self: center;
}

.hfs-cta-btn:hover {
    background-color: transparent;
    color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(12, 42, 22, 0.2);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */

/* LAPTOP (1024px - 1200px) */
@media (max-width: 1024px) {
    .hfs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .hfs-title {
        font-size: 2.5rem;
    }

    .hfs-cta-title {
        font-size: 1.5rem;
    }
}

/* TABLET (768px - 1024px) */
@media (max-width: 768px) {
    .hfs-section {
        padding: 4rem 1.5rem;
    }

    .hfs-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .hfs-title {
        font-size: 2rem;
        letter-spacing: 2px;
    }

    .hfs-subtitle {
        font-size: 0.9rem;
    }

    .hfs-card-title {
        font-size: 1.2rem;
    }

    .hfs-cta {
        padding: 2rem 1.5rem;
    }

    .hfs-cta-title {
        font-size: 1.3rem;
    }
}

/* MOBILE LANDSCAPE (480px - 768px) */
@media (max-width: 480px) {
    .hfs-section {
        padding: 3rem 1rem;
    }

    .hfs-header {
        margin-bottom: 2rem;
    }

    .hfs-title {
        font-size: 1.5rem;
        letter-spacing: 1px;
        margin-bottom: 0.8rem;
    }

    .hfs-subtitle {
        font-size: 0.8rem;
    }

    .hfs-grid {
        gap: 1rem;
    }

    .hfs-card-image {
        height: 220px;
    }

    .hfs-card-content {
        padding: 1.2rem;
        gap: 0.6rem;
    }

    .hfs-card-title {
        font-size: 1rem;
    }

    .hfs-card-info {
        font-size: 0.8rem;
    }

    .hfs-card-description {
        font-size: 0.85rem;
    }

    .hfs-cta {
        padding: 1.5rem 1rem;
        gap: 1rem;
    }

    .hfs-cta-title {
        font-size: 1.1rem;
    }

    .hfs-cta-text {
        font-size: 0.9rem;
    }
}

/* MOBILE SMALL (360px - 480px) */
@media (max-width: 360px) {
    .hfs-section {
        padding: 2.5rem 0.8rem;
    }

    .hfs-header {
        margin-bottom: 1.5rem;
    }

    .hfs-title {
        font-size: 1.3rem;
        letter-spacing: 0.8px;
        margin-bottom: 0.6rem;
    }

    .hfs-subtitle {
        font-size: 0.75rem;
    }

    .hfs-card-image {
        height: 200px;
    }

    .hfs-card-content {
        padding: 1rem;
        gap: 0.5rem;
    }

    .hfs-card-title {
        font-size: 0.95rem;
    }

    .hfs-card-info {
        font-size: 0.75rem;
    }

    .hfs-card-description {
        font-size: 0.8rem;
    }

    .hfs-cta {
        padding: 1.2rem 0.8rem;
    }

    .hfs-cta-title {
        font-size: 1rem;
    }

    .hfs-cta-text {
        font-size: 0.85rem;
    }

    .hfs-cta-btn {
        padding: 0.6rem 1.5rem;
        font-size: 0.7rem;
    }
}

/* 4K (2560px+) */
@media (min-width: 2560px) {
    .hfs-section {
        padding: 8rem 4rem;
    }

    .hfs-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 3.5rem;
    }

    .hfs-title {
        font-size: 4.5rem;
        margin-bottom: 2rem;
    }

    .hfs-subtitle {
        font-size: 1.2rem;
    }

    .hfs-card-image {
        height: 350px;
    }

    .hfs-card-content {
        padding: 2.5rem;
        gap: 1.2rem;
    }

    .hfs-card-title {
        font-size: 1.8rem;
    }

    .hfs-card-info {
        font-size: 1rem;
    }

    .hfs-card-description {
        font-size: 1.1rem;
    }

    .hfs-cta {
        padding: 4rem 3rem;
        gap: 2rem;
    }

    .hfs-cta-title {
        font-size: 2.5rem;
    }

    .hfs-cta-text {
        font-size: 1.2rem;
    }

    .hfs-cta-btn {
        padding: 1rem 3rem;
        font-size: 1rem;
    }
}

/* EXPANDABLE CARD STYLES */
.hfs-card-collapsed {
    cursor: pointer;
    transition: all var(--transition-smooth);
}

.hfs-card-header {
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.hfs-card-title {
    margin: 0;
    flex: 1;
}

.hfs-card-breed {
    margin: 0.5rem 0 0 0;
}

.hfs-card-toggle {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 50%;
    background-color: rgba(83, 202, 99, 0.1);
    transition: all var(--transition-smooth);
}

.toggle-arrow {
    width: 20px;
    height: 20px;
    color: var(--color-primary);
    transition: transform var(--transition-smooth);
}

.hfs-card.expanded .toggle-arrow {
    transform: rotate(180deg);
}

.hfs-card-toggle:hover {
    background-color: rgba(83, 202, 99, 0.2);
}

/* Expanded Content */
.hfs-card-expanded {
    display: none;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding: 0 1.5rem;
    transition: all 0.3s ease-in-out;
}

.hfs-card.expanded .hfs-card-expanded {
    display: block;
    opacity: 1;
    max-height: 1000px;
    padding: 0 1.5rem 1.5rem 1.5rem;
}

.hfs-expanded-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.hfs-expanded-section {
    padding: 1rem;
    background-color: rgba(12, 42, 22, 0.04);
    border-left: 3px solid rgb(83, 202, 99);
    border-radius: 4px;
}

.hfs-expanded-section h4 {
    margin: 0 0 0.5rem 0;
    color: var(--color-primary);
    font-size: 0.95rem;
}

.hfs-expanded-section ul {
    margin: 0;
    padding-left: 1.5rem;
    list-style: disc;
}

.hfs-expanded-section li {
    margin-bottom: 0.3rem;
    color: #5a6a5a;
}

.hfs-expand-btn {
    padding: 0.6rem 1.5rem;
    background-color: var(--color-primary);
    color: #ffffff;
    border: 1px solid var(--color-primary);
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    align-self: flex-start;
}

.hfs-expand-btn:hover {
    background-color: transparent;
    color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(12, 42, 22, 0.15);
}

/* ===== HORSE MODAL STYLES ===== */

.hfs-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

.hfs-modal.active {
    opacity: 1;
    visibility: visible;
}

/* Hide navbar when modal is active */
.hfs-modal.active~nav,
nav+.hfs-modal.active+*,
body.hfs-modal-open nav {
    display: none !important;
}

.hfs-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    cursor: pointer;
    pointer-events: auto;
    z-index: 1;
}

.hfs-modal-content {
    position: relative;
    z-index: 10;
    width: 90%;
    height: 90vh;
    max-width: 1600px;
    background-color: #ffffff;
    border-radius: 12px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.hfs-modal-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    color: var(--color-primary);
    transition: all var(--transition-smooth);
    z-index: 20;
}

.hfs-modal-close:hover {
    background-color: #ffffff;
    transform: rotate(90deg);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hfs-modal-close svg {
    width: 24px;
    height: 24px;
}

/* Gallery Section */
.hfs-modal-gallery {
    position: relative;
    width: 100%;
    height: 100%;
    background-color: #000000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    border-right: 2px solid #333333;
}

.hfs-gallery-main {
    position: relative;
    width: 100%;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hfs-gallery-item {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    pointer-events: none;
    display: none;
}

.hfs-gallery-item.active {
    opacity: 1;
    pointer-events: auto;
    display: block;
}

.hfs-gallery-video,
.hfs-gallery-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: auto;
    background-color: black;
}

/* Gallery Navigation Arrows */
.hfs-gallery-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-smooth);
    z-index: 100;
}

.hfs-gallery-arrow:hover {
    background-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.hfs-gallery-arrow svg {
    width: 28px;
    height: 28px;
}

.hfs-gallery-prev {
    left: 1rem;
}

.hfs-gallery-next {
    right: 1rem;
}

/* Thumbnail Navigation */
.hfs-gallery-thumbnails {
    position: relative;
    bottom: auto;
    left: auto;
    transform: none;
    display: flex;
    gap: 0.8rem;
    z-index: 100;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
    padding: 1.5rem;
    flex-shrink: 0;
}

.hfs-thumbnail {
    width: 80px;
    height: 80px;
    border: 3px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.1);
    overflow: hidden;
    transition: all var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
}

.hfs-thumbnail:hover {
    border-color: rgba(255, 255, 255, 0.5);
    background-color: rgba(255, 255, 255, 0.2);
}

.hfs-thumbnail.active {
    border-color: rgb(83, 202, 99);
    background-color: rgba(83, 202, 99, 0.2);
}

.hfs-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hfs-thumbnail svg {
    width: 40px;
    height: 40px;
}

/* Info Section */
.hfs-modal-info {
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    /* fix: align content to top so long description doesn't vertically push the title out */
    align-items: flex-start;
    justify-content: flex-start;
    padding: 3rem;
    overflow-y: auto;
}

.hfs-modal-info-content {
    width: 100%;
    margin: 0;
    padding: 0;
}

.hfs-modal-title {
    font-family: var(--font-title);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 2px;
    /* remove top padding so title anchors correctly at the top of the info column */
    padding-top: 0;
    margin-top: 0;
    overflow-wrap: break-word;
}

.hfs-modal-meta {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    font-family: var(--font-body);
}

.hfs-modal-breed {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333333;
}

.hfs-modal-separator {
    color: #bdc3c7;
}

.hfs-modal-age {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333333;
}

.hfs-modal-description {
    font-family: var(--font-body);
    font-size: 1rem;
    color: #5a6a5a;
    line-height: 1.8;
}

/* Modal Sections */
.hfs-modal-section {
    margin-bottom: 2rem;
}

.hfs-modal-section-title {
    font-family: var(--font-title);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    letter-spacing: 1px;
    margin: 0 0 1rem 0;
}

.hfs-modal-list {
    margin: 0;
    padding-left: 1.5rem;
    list-style: disc;
}

.hfs-modal-list li {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: #5a6a5a;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.hfs-modal-tags {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.hfs-modal-tag {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background-color: rgba(83, 202, 99, 0.1);
    color: rgb(83, 202, 99);
    border: 1px solid rgba(83, 202, 99, 0.3);
    border-radius: 20px;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

/* Details Grid */
.hfs-modal-details {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.hfs-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem;
    background-color: rgba(12, 42, 22, 0.03);
    border-radius: 6px;
    border-left: 3px solid rgb(83, 202, 99);
}

.hfs-detail-label {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: #5a6a5a;
}

.hfs-detail-value {
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-primary);
}

/* CTA Button */
.hfs-modal-cta {
    width: 100%;
    padding: 1rem;
    background-color: var(--color-primary);
    color: #ffffff;
    border: 1px solid var(--color-primary);
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    cursor: pointer;
    transition: all var(--transition-smooth);
    margin-top: 2rem;
}

.hfs-modal-cta:hover {
    background-color: transparent;
    color: var(--color-primary);
    box-shadow: 0 4px 12px rgba(12, 42, 22, 0.2);
}

/* Responsive Modal */

@media (max-width: 1024px) {
    .hfs-modal-gallery {
        height: 500px;
    }

    .hfs-modal-content {
        grid-template-columns: 1fr;
        height: auto;
        max-height: 95vh;
        flex-direction: column;
    }

    .hfs-modal-info {
        padding: 2rem;
        border-top: 1px solid rgba(189, 195, 199, 0.2);
        height: auto;
    }

    .hfs-modal-info-content {
        max-height: calc(95vh - 500px - 4rem);
        padding: 0;
    }

    .hfs-modal-title {
        font-size: 2rem;
    }

    .hfs-gallery-arrow {
        width: 40px;
        height: 40px;
    }

    .hfs-gallery-arrow svg {
        width: 24px;
        height: 24px;
    }

    .hfs-thumbnail {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 768px) {
       .hfs-modal-gallery {
        height: 400px;
    }

    .hfs-modal-content {
        height: auto;
        max-height: 95vh;
        border-radius: 8px;
    }

    .hfs-modal-close {
        width: 36px;
        height: 36px;
        top: 1rem;
        right: 1rem;
    }

    .hfs-modal-close svg {
        width: 20px;
        height: 20px;
    }

    .hfs-modal-info {
        padding: 1.5rem;
    }

    .hfs-modal-info-content {
        padding-top: 0;
        max-width: 100%;
    }

    .hfs-modal-title {
        font-size: 1.8rem;
        letter-spacing: 1.5px;
        margin-bottom: 0.8rem;
    }

    .hfs-modal-meta {
        gap: 0.6rem;
        margin-bottom: 1.2rem;
    }

    .hfs-modal-breed,
    .hfs-modal-age {
        font-size: 0.85rem;
    }

    .hfs-modal-description {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }

    .hfs-modal-section {
        margin-bottom: 1.5rem;
    }

    .hfs-modal-section-title {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }

    .hfs-modal-list li {
        font-size: 0.9rem;
        margin-bottom: 0.4rem;
    }

    .hfs-gallery-thumbnails {
        bottom: 1rem;
        gap: 0.6rem;
    }

    .hfs-thumbnail {
        width: 60px;
        height: 60px;
    }

    .hfs-gallery-prev {
        left: 0.8rem;
    }

    .hfs-gallery-next {
        right: 0.8rem;
    }

    .hfs-modal-cta {
        padding: 0.8rem;
        font-size: 0.8rem;
        margin-top: 1.5rem;
    }
}

@media (max-width: 480px) {
       .hfs-modal-gallery {
        height: 400px;
    }

    .hfs-modal {
        padding: 0.5rem;
    }

    .hfs-modal-content {
        width: 100%;
        height: 85vh;
        grid-template-columns: 1fr;
        border-radius: 6px;
    }

    .hfs-modal-close {
        width: 32px;
        height: 32px;
        top: 0.8rem;
        right: 0.8rem;
    }

    .hfs-modal-info {
        padding: 1.2rem;
    }

    .hfs-modal-title {
        font-size: 1.5rem;
        letter-spacing: 1px;
        margin-bottom: 0.6rem;
    }

    .hfs-modal-meta {
        gap: 0.5rem;
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .hfs-modal-description {
        font-size: 0.9rem;
        margin-bottom: 1.2rem;
        line-height: 1.6;
    }

    .hfs-modal-section {
        margin-bottom: 1.2rem;
    }

    .hfs-modal-section-title {
        font-size: 0.95rem;
        margin-bottom: 0.6rem;
    }

    .hfs-modal-list li {
        font-size: 0.85rem;
        margin-bottom: 0.3rem;
    }

    .hfs-modal-tag {
        padding: 0.4rem 0.8rem;
        font-size: 0.7rem;
        letter-spacing: 0.5px;
    }

    .hfs-detail-row {
        padding: 0.6rem;
        font-size: 0.85rem;
    }

    .hfs-gallery-thumbnails {
        bottom: 0.8rem;
        gap: 0.5rem;
    }

    .hfs-thumbnail {
        width: 50px;
        height: 50px;
    }

    .hfs-gallery-arrow {
        width: 36px;
        height: 36px;
    }

    .hfs-gallery-arrow svg {
        width: 20px;
        height: 20px;
    }

    .hfs-modal-cta {
        padding: 0.7rem;
        font-size: 0.75rem;
        margin-top: 1.2rem;
    }
}

/* 4K Display */
@media (min-width: 2560px) {
    .hfs-modal-content {
        height: 85vh;
        grid-template-columns: 1.2fr 1fr;
    }

    .hfs-modal-info {
        padding: 4rem;
    }

    .hfs-modal-info-content {
        padding-top: 50px;
        max-width: 600px;
    }

    .hfs-modal-title {
        font-size: 3rem;
        letter-spacing: 3px;
        margin-bottom: 1.5rem;
    }

    .hfs-modal-meta {
        gap: 1.2rem;
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .hfs-modal-description {
        font-size: 1.15rem;
        margin-bottom: 2.5rem;
        line-height: 2;
    }

    .hfs-modal-section {
        margin-bottom: 2.5rem;
    }

    .hfs-modal-section-title {
        font-size: 1.3rem;
        margin-bottom: 1.2rem;
        letter-spacing: 1.2px;
    }

    .hfs-modal-list li {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }

    .hfs-gallery-arrow {
        width: 60px;
        height: 60px;
    }

    .hfs-gallery-arrow svg {
        width: 32px;
        height: 32px;
    }

    .hfs-thumbnail {
        width: 100px;
        height: 100px;
    }

    .hfs-thumbnail svg {
        width: 50px;
        height: 50px;
    }

    .hfs-modal-cta {
        padding: 1.2rem;
        font-size: 1rem;
        margin-top: 2.5rem;
    }
}