/**
 * LINKS PAGES STYLES
 * Shared by: links.html, links_paleo.html, links_forums.html
 * Museum Editorial Design - matching Homepage/Postal Resources style
 */

/* ===== BASE STYLES =====
 * Section padding, h1 + yellow accent, big labels, and list styling
 * are now in css/components/section-page-base.css
 */

/* ===== TYPOGRAPHY ===== */
.links-section h2 {
    font-family: var(--font-display, 'Crimson Pro', Georgia, serif);
    font-size: clamp(1.25rem, 2.5vw, 1.625rem);
    font-weight: 600;
    color: var(--hp-black, #0a0a0a);
    line-height: 1.3;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.625rem;
    border-bottom: 3px solid var(--hp-yellow, #d4a72c);
    display: table;
}

/* Link styling now in common-style.css via .legacy-content */

/* ===== LISTS (page-specific overrides) ===== */
.links-section ul ul {
    margin-top: 0.375rem;
    margin-bottom: 0.375rem;
}

/* ===== TABLE OF CONTENTS =====
 * Base TOC styles now in css/components/toc.css
 * No page-specific overrides needed.
 */

/* Section big labels now in css/components/section-page-base.css */

/* ===== FLOAT TABLES (RIGHT SIDEBAR) ===== */
/* Base float rules (width:min-content, float, img) in common-style.css */
.links-section table[align="right"] {
    max-width: 340px;
    margin: 0 0 1.5rem 2rem;
    border: none;
}

.links-section table[align="right"] td {
    border-bottom: none;
    padding: 0.25rem 0;
    vertical-align: top;
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--hp-text-light, #4a4a4a);
}

.links-section table[align="right"] img {
    max-width: 310px;
    height: auto;
    display: inline-block;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

/* Override global img.slist card styling (300x300) for sidebar preview images */
.links-section table[align="right"] img.slist {
    width: 310px;
    height: auto;
    object-fit: initial;
}

.links-section table[align="right"] img:hover {
    transform: scale(1.02);
}

.links-section table[align="right"] td:has(> small) {
    padding-top: 0;
}

.links-section table[align="right"] small {
    display: block;
    font-size: 0.8125rem;
    color: var(--hp-text-light, #4a4a4a);
    line-height: 1.5;
    margin-top: 0;
    padding-top: var(--image-caption-gap, 14px);
}

/* Float table with flag + text (forum headers) */
.links-section table[align="left"],
.links-section table[width="100%"] {
    width: auto;
    max-width: 100%;
    border: none;
}

/* ===== FORUM TABLES ===== */
.links-section .forum-table {
    width: 100%;
    border: none;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    border-collapse: separate;
    border-spacing: 0;
}

.links-section .forum-table td {
    border-bottom: 1px solid var(--hp-gray-light, #f0efec);
    padding: 0.75rem 1rem;
    vertical-align: top;
    font-size: 0.9375rem;
    line-height: 1.6;
}

.links-section .forum-table tr:last-child td {
    border-bottom: none;
}

.links-section .forum-table td[style*="height: 20px"] {
    padding: 0;
    height: 0.5rem !important;
    border-bottom: none;
}

.links-section .forum-table td strong {
    color: var(--hp-black, #0a0a0a);
}

/* Forum section header (flag + language name) */
.links-section .forum-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 0 0.75rem;
    margin-top: 2rem;
    border-bottom: 3px solid var(--hp-yellow, #d4a72c);
    margin-bottom: 1rem;
}

.links-section .forum-header img {
    border-radius: 4px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

.links-section .forum-header strong {
    font-family: var(--font-display, 'Crimson Pro', Georgia, serif);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--hp-black, #0a0a0a);
}

/* ===== GENERIC TABLES ===== */
.links-section table {
    width: auto;
    max-width: 100%;
    border: none;
}

.links-section td {
    border-bottom: none;
    padding: 0.25rem;
}

/* ===== INLINE IMAGES ===== */
.links-section img[align="right"] {
    float: right;
    margin: 0 0 1rem 1.5rem;
    max-width: 350px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
}

/* Inside float tables, don't re-float inline images */
.links-section table[align="right"] img[align="right"] {
    float: right;
    margin: 0 0 0.5rem 0.75rem;
    max-width: 80px;
    box-shadow: none;
}

.links-section img[align="left"] {
    float: left;
    margin: 0 1.5rem 1rem 0;
    border-radius: 4px;
}

/* br collapse and float clearing now in common-style.css via .legacy-content */

/* ===== GOOGLE ADS ===== */
.links-section .adsbygoogle {
    margin: 1.5rem 0;
}

.links-section table[align="right"] .adsbygoogle {
    margin: 0;
}

/* ===== RESPONSIVE ===== */
/* Section padding + h1 responsive in css/components/section-page-base.css */
@media (max-width: 768px) {
    .links-section h2 {
        display: block;
    }

    .links-section table[align="right"] {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 1rem 0;
    }

    .links-section table[align="right"] img {
        max-width: 100%;
    }

    .links-section img[align="right"] {
        float: none;
        display: block;
        margin: 1rem auto;
        max-width: 100%;
    }
}

/* Selection styles now in common-style.css via .legacy-content */
