﻿/* Page */
body {
    font-family: Arial, Helvetica, sans-serif;
    margin: 0;
    background: #f6f7f8;
    color: #333;
}

.page-container {
    max-width: 1200px; /* controls content width */
    margin: 0 auto; /* center horizontally */
    padding: 40px 24px; /* responsive side gutters */
}

.page-header {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

/* Logo */
.site-logo {
    height: 48px; /* controls size */
    width: auto;
}

/* Large screens */
@media (min-width: 1400px) {
    .page-container {
        max-width: 1320px;
    }

    .site-logo {
        height: 96px;
    }
}

/* Small screens */
@media (max-width: 600px) {
    .page-container {
        padding: 24px 16px;
    }

    .site-logo {
        height: 36px;
    }
}

h1 {
    margin-bottom: 20px;
    font-weight: 600;
}

/* Table */
#drawingsTable {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    font-size: 0.95rem;
}

    #drawingsTable thead th {
        background: #1c355e;
        color: #fff;
        font-weight: bold;
        padding: 12px 12px;
        text-align: left;
        cursor: pointer;
        user-select: none;
        white-space: nowrap;
        position: relative;
    }

        #drawingsTable thead th:not(:last-child):hover {
            background: #e9edf2;
            color: #1c355e;
        }

        /* Sort arrows */
        #drawingsTable thead th.sortable::after {
            content: "▼▲";
            font-size: 1em;
            margin-left: 6px;
            color: #9aa0a6;
        }

        #drawingsTable thead th.asc::after {
            content: "▲";
            font-size: 1em;
            color: #fff;
        }

        #drawingsTable thead th.desc::after {
            content: "▼";
            font-size: 1em;
            color: #fff;
        }

    /* Body rows */
    #drawingsTable tbody tr {
        background: #ffffff;
    }

        #drawingsTable tbody tr:nth-child(even) {
            background: #fafbfc;
        }

        #drawingsTable tbody tr:hover {
            background: #eef3f8;
        }

    #drawingsTable td {
        padding: 12px;
        vertical-align: top;
    }

        /* Title + description */
        #drawingsTable td:first-child {
            font-weight: 500;
        }

.note {
    margin-top: 4px;
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.4;
}

/* Links */
#drawingsTable a {
    color: #005dab;
    text-decoration: none;
    font-weight: 500;
}

    #drawingsTable a:hover {
        text-decoration: underline;
    }

.note {
    font-size: 0.8em;
    color: #666;
    margin-top: 6px;
    font-style: italic;
}

/* Search box */
.search-wrapper {
    margin-bottom: 15px;
}

#tableSearch {
    width: 100%;
    max-width: 420px;
    padding: 10px 12px;
    font-size: 0.95rem;
    border: 1px solid #d1d5db;
    border-radius: 4px;
}

#tableSearch:focus {
    outline: none;
    border-color: #1c355e;
}

/* Footer */
.page-footer {
    margin-top: 40px;
    border-top: 1px solid #e5e7eb;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px 24px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Card grid for software */
.card-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 20px;
    align-items: flex-start;
}

/* Each software card */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
    flex: 0 0 400px; /* width of card */
    display: flex;
    flex-direction: column; /* stack image, title, content */
    padding: 12px;
    align-items: flex-start;
    min-height: 380px; /* minimal height for all cards */
}

    /* Thumbnail / icon on top */
    .card img {
        width: 100%;
        height: 120px;
        object-fit: contain;
        margin: 0 0 12px 0; /* space below image */
        border-bottom: 1px solid #eee;
    }

        /* Support larger drawings */
        .card img.drawing {
            width: 100%;
            height: auto;
            margin-bottom: 12px;
        }

/* Card content */
.card-content {
    display: flex;
    flex-direction: column;
    width: 100%;
}


/* Title & description */
.card h3 {
    margin: 0 0 6px 0;
    font-size: 18px;
}

.card .description {
    font-size: 14px;
    margin-bottom: 8px;
}

/* Designed for badges */
.card .badges {
    margin-bottom: 8px;
}

.badge {
    display: inline-block;
    background: #5789bf;
    color: #fff;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    margin: 2px 2px 2px 0;
}

    .badge.release-date {
        background-color: #c8b18f;
        color: #fff;
        margin-left: 20px;
    }


/* Version rows */
.version-row {
    display: flex;
    flex-direction: column; /* stack info + download vertically */
    justify-content: flex-start;
    padding: 8px 12px;
    border-top: 1px dashed #eee;
    font-size: 14px;
}

    .version-row .info {
        text-align: left;
        margin-bottom: 6px; /* space between info and button */
    }

    .version-row .download-row {
        text-align: right; /* align button right */
    }

    .version-row .download-btn {
        display: inline-block;
        width: 110px; /* fixed width */
        padding: 6px 12px;
        background-color: #1c355e;
        color: #fff;
        text-decoration: none;
        border-radius: 4px;
        text-align: center;
        font-weight: bold;
        margin-top: 4px;
    }

        .version-row .download-btn:hover {
            background-color: #005bb5;
        }

/* Older versions toggle */
details .version-row {
    margin-top: 4px;
}

details summary {
    list-style: none;
    font-weight: bold;
    font-size: 14px;
    cursor: pointer;
    border-bottom: 1px dashed #ccc;
    padding-bottom: 4px;
    margin-top: 20px;
}

details[open] summary::after {
    content: "▲";
    float: right;
}

details summary::after {
    content: "▼";
    float: right;
}

.release-notes {
    font-size: 0.85em;
    color: #666;
    margin-top: 6px;
    font-style: italic;
}

/* Notes */
.note {
    margin-top: 4px;
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.4;
}
