/* ==================================================
   Homepage News & Recent Developments — simple, uniform cards.
   Horizontal scroll on every screen size (arrows on desktop, swipe on
   mobile), matching the heading scale used in the stats section above it.
   Same isolated-rebuild approach as the other home-* sections.
   ================================================== */
:root {
    --hn-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, sans-serif;
    --hn-orange: #ff5e14;
    --hn-ink: #14161a;
    --hn-muted: #6b7280;
    --hn-line: #e9eaee;
}

.amzy-news,
.amzy-news * {
    all: revert;
    box-sizing: border-box;
}

.amzy-news {
    display: block;
    background: #fff;
    padding: 90px 0 100px;
    font-family: var(--hn-font);
}

.amzy-news .container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Same scale/weight as the stats section heading right above this one. */
.amzy-news .amzy-news-title {
    display: block;
    text-align: center;
    font-family: var(--hn-font);
    font-weight: 500;
    font-size: clamp(28px, 3.4vw, 40px);
    line-height: 1.25;
    letter-spacing: -0.015em;
    color: var(--hn-ink);
    margin: 0 0 44px;
}

.amzy-news-viewport { overflow: hidden; }

.amzy-news-grid {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 4px 2px 8px;
}

.amzy-news-grid::-webkit-scrollbar { display: none; }

.amzy-news .news-card {
    display: block;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

.amzy-news-card {
    flex: 0 0 calc(25% - 18px);
    min-width: 260px;
    scroll-snap-align: start;
}

.amzy-news-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.amzy-news-card-link:hover { text-decoration: none; color: inherit; }

.amzy-news-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    background: var(--hn-line);
    margin-bottom: 16px;
}

.amzy-news-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.amzy-news-card-link:hover .amzy-news-image img {
    transform: scale(1.03);
}

.amzy-news-card-title {
    display: block;
    font-family: var(--hn-font);
    font-weight: 600;
    font-size: 17px;
    line-height: 1.35;
    letter-spacing: -0.005em;
    color: var(--hn-ink);
    margin: 0 0 8px;
    transition: color 0.2s ease;
}

.amzy-news-card-link:hover .amzy-news-card-title {
    color: var(--hn-orange);
}

.amzy-news-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-family: var(--hn-font);
    font-size: 14px;
    line-height: 1.6;
    color: var(--hn-muted);
    margin: 0 0 14px;
}

.amzy-news-readmore {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: var(--hn-font);
    font-size: 13.5px;
    font-weight: 600;
    color: var(--hn-orange);
}

/* Explicit Font Awesome declaration -- the all:revert boundary above
   strips the icon font/content the "fas" class would otherwise supply
   from a separate stylesheet, so it's restated here directly. */
.amzy-news-readmore i,
.amzy-news-arrow i {
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-style: normal;
}

.amzy-news-readmore i { font-size: 10px; }

/* --- Prev/next arrows, centered below the row --- */
.amzy-news-nav {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 34px;
}

.amzy-news-arrow {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--hn-line);
    background: #fff;
    color: var(--hn-ink);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.amzy-news-arrow:hover {
    background: var(--hn-orange);
    border-color: var(--hn-orange);
    color: #fff;
}

.amzy-news-arrow:disabled {
    opacity: 0.35;
    cursor: default;
    background: #fff;
    border-color: var(--hn-line);
    color: var(--hn-ink);
}

/* --- Tablet --- */
@media (max-width: 992px) {
    .amzy-news-card { flex: 0 0 calc(50% - 12px); }
}

/* --- Mobile: same horizontal swipe, just full-bleed and touch-first.
   Arrows hidden -- swipe is the primary interaction on touch. --- */
@media (max-width: 768px) {
    .amzy-news { padding: 52px 0 56px; }
    .amzy-news .container { padding: 0; }
    .amzy-news .amzy-news-title { font-size: 22px; padding: 0 24px; margin-bottom: 26px; }
    .amzy-news-grid { padding: 4px 20px 8px; gap: 14px; }
    .amzy-news-card { flex: 0 0 82%; min-width: 0; }
    .amzy-news-nav { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .amzy-news-image img, .amzy-news-card-title { transition: none; }
}
