.home-editorial,
.home-student-gallery {
    padding: 40px 0;
}

.home-editorial-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.home-editorial-group {
    min-width: 0;
}

.home-editorial-group:only-child {
    grid-column: 1 / -1;
}

.home-editorial-title {
    color: #821D25;
    font-size: clamp(20px, 2.3vw, 28px);
    line-height: 1.4;
    margin: 0 0 20px;
    padding-bottom: 16px;
    border-bottom: 2px solid #EADDC4;
}

.home-editorial-list {
    display: grid;
    gap: 16px;
}

.home-editorial-card {
    display: grid;
    grid-template-columns: 160px minmax(0, 1fr);
    gap: 16px;
    padding: 14px;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    background: #FFFFFF;
}

.home-editorial-image {
    position: relative;
    width: 100%;
    min-width: 0;
    display: block;
    aspect-ratio: 16 / 9;
    align-self: start;
    overflow: hidden;
    border-radius: 8px;
    background: #FAF6EC;
}

.home-editorial-image img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.home-editorial-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #821D25;
    font-weight: 700;
}

.home-editorial-copy h3 {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.home-editorial-copy h3 a {
    color: #1E293B;
    text-decoration: none;
}

.home-editorial-copy h3 a:hover {
    color: #821D25;
    text-decoration: underline;
}

.home-editorial-copy time {
    color: #64748B;
    font-size: 12px;
}

.home-editorial-copy p {
    margin: 8px 0 0;
    color: #64748B;
    font-size: 14px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.home-media-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 48px;
    margin-top: 18px;
    padding: 10px 18px;
    border: 1px solid #D5BA7F;
    border-radius: 24px;
    color: #821D25;
    background: #FFFFFF;
    font-weight: 700;
    text-decoration: none;
}

.home-gallery-track {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    scrollbar-color: #D5BA7F #F1F5F9;
    padding-bottom: 12px;
}

.home-gallery-slide {
    flex: 0 0 calc((100% - 40px) / 3);
    min-width: 0;
    margin: 0;
    scroll-snap-align: start;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    overflow: hidden;
    background: #FFFFFF;
    box-sizing: border-box;
}

.home-gallery-slide a {
    display: block;
    aspect-ratio: 16 / 9;
    background: #FAF6EC;
}

.home-gallery-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.home-gallery-slide figcaption {
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
    overflow-wrap: anywhere;
}

.home-gallery-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-top: 16px;
}

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

.home-gallery-controls button {
    width: 48px;
    height: 48px;
    border: 1px solid #D5BA7F;
    border-radius: 50%;
    color: #821D25;
    background: #FFFFFF;
    font-size: 22px;
    cursor: pointer;
}

.home-gallery-controls button:disabled {
    opacity: 0.4;
    cursor: default;
}

.home-gallery-controls span,
.home-gallery-help {
    color: #64748B;
    font-size: 14px;
    text-align: center;
}

.home-gallery-help {
    margin: 12px 0 0;
}

.home-editorial :focus-visible,
.home-student-gallery :focus-visible {
    outline: 3px solid #B78B26;
    outline-offset: -3px;
}

.home-editorial .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

@media (max-width: 1024px) {
    .home-editorial-columns {
        grid-template-columns: minmax(0, 1fr);
    }

    .home-gallery-slide {
        flex-basis: calc((100% - 20px) / 2);
    }
}

@media (max-width: 600px) {
    .home-editorial,
    .home-student-gallery {
        padding: 28px 0;
    }

    .home-editorial-card {
        grid-template-columns: 110px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .home-editorial-copy h3 {
        font-size: 15px;
    }

    .home-editorial-copy p {
        display: none;
    }

    .home-gallery-slide {
        flex-basis: 88%;
    }
}

.home-gallery-slide:only-child {
    flex-basis: min(100%, 760px);
    margin-inline: auto;
}

.home-editorial-heading {
    margin-bottom: 24px;
}

.home-editorial-heading .corner-ornament-box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 0;
    padding: 18px 24px;
}

.home-editorial-heading .section-title-traditional {
    font-size: clamp(22px, 2.4vw, 30px);
    line-height: 1.35;
}

@media (max-width: 600px) {
    .home-editorial-heading .corner-ornament-box {
        min-height: 0;
        padding: 16px 20px;
    }
}
