.home-gallery-section {
    position: relative;
    min-height: 522px;
    margin-top: 12px;
    padding: 17px 22px 13px;
    overflow: hidden;
    border: 1px solid #dfe7f2;
    background:
        radial-gradient(circle at 98% 3%, rgba(255, 164, 49, .15) 0 64px, transparent 65px),
        linear-gradient(180deg, #fff 0%, #fbfdff 100%);
    box-shadow: 0 11px 25px rgba(14, 42, 80, .1);
}

.home-gallery-section::before {
    content: "";
    position: absolute;
    top: 52px;
    left: 30px;
    width: 118px;
    height: 48px;
    opacity: .58;
    background-image: radial-gradient(circle, #dce9f8 2px, transparent 2.5px);
    background-size: 15px 15px;
    pointer-events: none;
}

.home-gallery-heading {
    position: relative;
    z-index: 2;
    text-align: center;
}

.home-gallery-eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    color: #ec8612;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.home-gallery-eyebrow span {
    width: 36px;
    height: 3px;
    border-radius: 99px;
    background: #ff8e0c;
}

.home-gallery-heading h2 {
    margin: 2px 0 0;
    color: #0a356f;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 38px;
    line-height: 1.05;
}

.home-gallery-heading h2 em {
    color: #ed7d16;
    font-style: normal;
}

.home-gallery-heading p {
    margin: 4px 0 0;
    color: #556e96;
    font-size: 12px;
    font-weight: 600;
}

.home-gallery-camera {
    position: absolute;
    z-index: 1;
    top: 61px;
    left: 11.5%;
    color: #dce8f7;
    font-size: 69px;
    transform: rotate(-14deg);
}

.home-gallery-memory {
    position: absolute;
    z-index: 2;
    top: 43px;
    right: 14%;
    color: #6b85b7;
    font-family: "Segoe Script", "Brush Script MT", cursive;
    font-size: 25px;
    font-style: italic;
    line-height: .92;
    transform: rotate(-8deg);
}

.home-gallery-memory::after {
    content: "";
    display: block;
    width: 44px;
    height: 2px;
    margin: 7px 0 0 25px;
    background: #ff8c11;
    transform: rotate(-6deg);
}

.home-gallery-filters {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin: 13px 0 16px;
}

.home-gallery-filters button {
    min-width: 88px;
    min-height: 36px;
    padding: 0 18px;
    border: 1px solid #d9e4f2;
    border-radius: 7px;
    color: #284674;
    background: #fafdff;
    box-shadow: 0 4px 11px rgba(18, 60, 111, .08);
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
}

.home-gallery-filters button.active,
.home-gallery-filters button:hover {
    border-color: #07458f;
    color: #fff;
    background: linear-gradient(180deg, #0a4d9e 0%, #073b7c 100%);
}

.home-gallery-filters button.active::after {
    content: "";
    display: block;
    width: 25px;
    height: 3px;
    margin: 8px auto -11px;
    border-radius: 99px;
    background: #ff8b0b;
}

.home-gallery-grid {
    display: grid;
    grid-template-columns: repeat(24, minmax(0, 1fr));
    grid-auto-flow: dense;
    gap: 10px;
}

.home-gallery-card {
    position: relative;
    min-width: 0;
    height: 150px;
    overflow: hidden;
    border-radius: 9px;
    background: #dfe8f4;
    box-shadow: 0 4px 12px rgba(8, 36, 72, .12);
}

.home-gallery-card:nth-child(1) { grid-column: span 8; }
.home-gallery-card:nth-child(2) { grid-column: span 5; }
.home-gallery-card:nth-child(3) { grid-column: span 6; }
.home-gallery-card:nth-child(4) { grid-column: span 5; }
.home-gallery-card:nth-child(5) { grid-column: span 5; }
.home-gallery-card:nth-child(6) { grid-column: span 5; }
.home-gallery-card:nth-child(7) { grid-column: span 6; }
.home-gallery-card:nth-child(8) { grid-column: span 4; }
.home-gallery-card:nth-child(9) { grid-column: span 4; }

.home-gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.home-gallery-card::after {
    content: "";
    position: absolute;
    inset: 45% 0 0;
    background: linear-gradient(180deg, transparent 0%, rgba(1, 15, 34, .88) 100%);
    pointer-events: none;
}

.home-gallery-card > span {
    position: absolute;
    z-index: 2;
    left: 14px;
    right: 12px;
    bottom: 11px;
    overflow: hidden;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-gallery-card > span i {
    width: 19px;
    margin-right: 5px;
    text-align: center;
    font-size: 15px;
}

.home-gallery-card:hover img { transform: scale(1.055); }

.home-gallery-card[hidden] { display: none; }

.home-gallery-empty {
    min-height: 245px;
    border: 1px dashed #ccdaeb;
    border-radius: 10px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 10px;
    color: #657c9e;
    background: #f8fbff;
    font-size: 12px;
    font-weight: 700;
    text-align: center;
}

.home-gallery-empty i {
    color: #0b4a94;
    font-size: 30px;
}

.home-gallery-more {
    width: 226px;
    min-height: 41px;
    margin: 12px auto 0;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #fff;
    background: linear-gradient(180deg, #0a4691 0%, #073873 100%);
    box-shadow: 0 6px 14px rgba(5, 54, 116, .17);
    font-size: 12px;
    font-weight: 800;
}

.home-gallery-more .fa-arrow-right { margin-left: 3px; }

@media (max-width: 1000px) {
    .home-gallery-section { min-height: 0; }
    .home-gallery-memory { right: 8%; }
    .home-gallery-camera { left: 5%; }
    .home-gallery-card:nth-child(n) { grid-column: span 8; }
}

@media (max-width: 700px) {
    .home-gallery-section { padding: 22px 10px 18px; }
    .home-gallery-heading h2 { font-size: 29px; }
    .home-gallery-heading p { padding-inline: 24px; font-size: 10px; }
    .home-gallery-camera,
    .home-gallery-memory { display: none; }
    .home-gallery-filters { overflow-x: auto; justify-content: flex-start; padding: 0 3px 5px; }
    .home-gallery-filters button { min-width: 82px; flex: none; }
    .home-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .home-gallery-card:nth-child(n) { grid-column: span 1; height: 128px; }
    .home-gallery-card:first-child { grid-column: 1 / -1; height: 165px; }
    .home-gallery-card > span { left: 9px; right: 7px; bottom: 8px; font-size: 10px; }
}

@media (max-width: 420px) {
    .home-gallery-heading h2 { font-size: 26px; }
    .home-gallery-card:nth-child(n) { height: 112px; }
    .home-gallery-card:first-child { height: 150px; }
    .home-gallery-more { width: 210px; }
}
