/* =========================================================
   Boards page — FPGA Boards & SOM Modules
   Every rule is scoped to .boards-page so nothing leaks into
   other SPA pages after navigation.
   ========================================================= */

.boards-page {
    --bg: #101113;
    --panel: #17181b;
    --panel-raised: #1e2023;
    --line: #2c2e33;
    --text: #ecebe7;
    --muted: #a4a6ab;
    --gold: #ffcc00;
    --gold-soft: rgba(255, 204, 0, 0.14);

    font-family: 'Poppins', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: transparent; /* blend with the site shell instead of a boxed panel */
    color: var(--text);
    line-height: 1.6;
    padding: 24px 20px 64px;
}

.boards-page *,
.boards-page *::before,
.boards-page *::after {
    box-sizing: border-box;
}

.boards-page a {
    color: var(--gold);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.boards-page a:hover {
    text-decoration-thickness: 2px;
}

.boards-page a:focus-visible,
.boards-page button:focus-visible,
.boards-page summary:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ---------- Breadcrumb ---------- */

.boards-page .breadcrumb-nav {
    max-width: 1200px;
    margin: 0 auto 28px;
    font-size: 0.875rem;
    color: var(--muted);
}

.boards-page .breadcrumb-nav ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
}

.boards-page .breadcrumb-nav li + li::before {
    content: "/";
    margin-right: 8px;
    color: var(--line);
}

.boards-page .breadcrumb-nav a {
    color: var(--muted);
    text-decoration: none;
}

.boards-page .breadcrumb-nav a:hover {
    color: var(--text);
}

.boards-page .breadcrumb-nav [aria-current="page"] {
    color: var(--text);
}

/* ---------- Intro ---------- */

.boards-page .boards-intro {
    max-width: 1200px;
    margin: 0 auto 40px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--line);
}

.boards-page .boards-intro h1 {
    margin: 0 0 16px;
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    font-weight: 600;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text);
    text-align: left;
}

.boards-page .boards-intro p {
    max-width: none;
    margin: 0;
    font-size: 1.0625rem;
    color: var(--muted);
}

/* ---------- Product grid ---------- */

.boards-page #boards-products {
    max-width: 1200px;
    margin: 0 auto;
}

.boards-page .product-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 20px;
}

.boards-page .product-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
    border-radius: 10px;
}

.boards-page .product-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

/* Photo fills the top of the card edge to edge, so the different
   photo backgrounds (white, lavender) read as one consistent band. */
.boards-page .product-card img {
    display: block;
    width: 100% !important;
    max-width: none !important;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    margin: 0 !important;
    padding: 0;
    border-radius: 0 !important;
    background-color: var(--panel-raised);
    border-bottom: 1px solid var(--line);
    transition: transform 0.3s ease;
}

.boards-page .product-card h2 {
    margin: 18px 20px 6px;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text);
    text-align: left;
}

.boards-page .product-card p {
    margin: 0 20px 22px;
    font-size: 0.9375rem;
    color: var(--muted);
    text-align: left;
}

.boards-page .product-card-link:hover .product-card,
.boards-page .product-card-link:focus-visible .product-card {
    border-color: var(--gold);
    background: var(--panel-raised);
}

.boards-page .product-card-link:hover .product-card img {
    transform: none;
}

.boards-page .product-card-link:hover .product-card h2 {
    color: var(--gold);
}

/* ---------- Text sections ---------- */

.boards-page .boards-section {
    max-width: 1200px;
    margin: 64px auto 0;
}

.boards-page .boards-section h2 {
    margin: 0 0 16px;
    font-size: clamp(1.375rem, 2.5vw, 1.75rem);
    font-weight: 600;
    line-height: 1.25;
    color: var(--text);
    text-align: left;
}

.boards-page .boards-section p {
    max-width: none;
    margin: 0 0 14px;
    color: var(--muted);
}

/* Custom design section reads as a callout next to the catalogue */
.boards-page .boards-section:not(.boards-faq) {
    padding: 32px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-left: 3px solid var(--gold);
    border-radius: 10px;
}

.boards-page .boards-section:not(.boards-faq) p:last-child {
    margin-bottom: 0;
}

/* ---------- FAQ ---------- */

.boards-page .boards-faq details {
    max-width: none;
    border-top: 1px solid var(--line);
}

.boards-page .boards-faq details:last-of-type {
    border-bottom: 1px solid var(--line);
}

.boards-page .boards-faq summary {
    position: relative;
    list-style: none;
    padding: 18px 40px 18px 0;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
}

.boards-page .boards-faq summary::-webkit-details-marker {
    display: none;
}

.boards-page .boards-faq summary::after {
    content: "+";
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--gold);
}

.boards-page .boards-faq details[open] summary::after {
    content: "\2212";
}

.boards-page .boards-faq details p {
    margin: 0 0 20px;
}

/* ---------- Request for info ---------- */

.boards-page .request-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* line up with the left-aligned content */
    width: 100% !important;
    max-width: 1200px !important; /* override the 350px limit from store.css */
    margin: 64px auto 0 !important;
    padding: 0 !important;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
}

.boards-page .request-button {
    padding: 14px 36px;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: #111;
    background: var(--gold);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    width: auto !important;
    text-transform: none;
    box-shadow: none;
    transition: background-color 0.2s ease;
}

.boards-page .request-button:hover {
    background: #ffd84d;
}

/* ---------- Contact modal (unchanged behaviour, scoped) ---------- */

.boards-page .modal {
    display: none;
    position: fixed;
    z-index: 1000;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.boards-page .modal.show {
    display: block;
    opacity: 1;
}

.boards-page .modal-content {
    margin: 8% auto;
    padding: 28px;
    width: 90%;
    max-width: 600px;
    background-color: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--text);
    transform: translateY(-30px);
    transition: transform 0.4s ease;
}

.boards-page .modal.show .modal-content {
    transform: translateY(0);
}

.boards-page .modal-content h2 {
    margin: 0 0 16px;
    padding-bottom: 14px;
    font-size: 1.5rem;
    text-align: center;
    color: var(--text);
    border-bottom: 1px solid var(--line);
}

.boards-page .close {
    float: right;
    font-size: 28px;
    line-height: 1;
    color: var(--muted);
    cursor: pointer;
}

.boards-page .close:hover,
.boards-page .close:focus {
    color: var(--gold);
}

.boards-page .text-center {
    text-align: center;
}

.boards-page .form-control {
    width: 100%;
    padding: 12px;
    font-size: 1rem;
    color: var(--text);
    background-color: var(--panel-raised);
    border: 1px solid var(--line);
    border-radius: 6px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.boards-page .form-control:focus {
    border-color: var(--gold);
    outline: none;
    box-shadow: 0 0 0 3px var(--gold-soft);
}

.boards-page textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

.boards-page ::placeholder {
    color: var(--muted);
    opacity: 1;
}

/* ---------- Responsive & motion ---------- */

@media (max-width: 600px) {
    .boards-page {
        padding: 16px 14px 48px;
    }

    .boards-page .boards-section:not(.boards-faq) {
        padding: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .boards-page *,
    .boards-page *::before,
    .boards-page *::after {
        transition: none !important;
    }
}
