/* ==========================================================================
   NASTOLAN MIESKUORO RY - KOMPONENTTITYYLIT (components.css)
   Uudelleenkäytettävät käyttöliittymäkomponentit: napit, kortit, taulukot,
   aikajanat, nuottiluettelot, lomakkeet ja ilmoitukset.
   ========================================================================== */

/* --- Napit (Buttons) --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    padding: 0.75rem 1.4rem;
    border-radius: var(--radius-sm);
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    line-height: 1.2;
}

.btn:focus-visible {
    outline: 2px solid var(--color-secondary);
    outline-offset: 2px;
}

.btn-primary {
    background-color: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background-color: var(--color-primary-light);
    color: #ffffff;
    border-color: var(--color-primary-light);
}

.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-surface-dark);
    border-color: var(--color-secondary);
}

.btn-secondary:hover {
    background-color: var(--color-secondary-hover);
    color: #000000;
}

.btn-outline {
    background-color: transparent;
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-outline:hover {
    background-color: var(--color-primary);
    color: #ffffff;
}

.btn-outline-white {
    background-color: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
}

.btn-outline-white:hover {
    background-color: #ffffff;
    color: var(--color-primary);
    border-color: #ffffff;
}

.btn-danger {
    background-color: var(--color-danger);
    color: #ffffff;
}

.btn-danger:hover {
    background-color: #7b1818;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: var(--text-xs);
}

.btn-lg {
    padding: 0.95rem 1.85rem;
    font-size: 1.15rem;
}

/* --- Kortit (Cards) --- */
.card {
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-border-hover);
}

.card-gold-top {
    border-top: 4px solid var(--color-secondary);
}

.card-body {
    padding: var(--space-lg);
    flex: 1;
}

.card-header {
    padding: var(--space-md) var(--space-lg);
    background-color: var(--color-surface-soft);
    border-bottom: 1px solid var(--color-border);
    font-weight: 600;
}

.card-footer {
    padding: var(--space-md) var(--space-lg);
    background-color: var(--color-surface-soft);
    border-top: 1px solid var(--color-border);
}

/* --- Grid-rakenteet (Grids) --- */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-md);
}

@media (max-width: 960px) {
    .grid-3, .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* --- Merkit ja tagit (Badges) --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.65rem;
    border-radius: 50px;
    font-size: var(--text-xs);
    font-weight: 600;
    line-height: 1;
}

.badge-gold {
    background-color: var(--color-secondary-light);
    color: #6a5015;
    border: 1px solid var(--color-border-gold);
}

.badge-blue {
    background-color: #e5edf5;
    color: var(--color-primary);
}

.badge-success {
    background-color: #e2f4e8;
    color: var(--color-success);
}

.badge-danger {
    background-color: #fae4e4;
    color: var(--color-danger);
}

/* --- Ilmoitusviestit (Alerts) --- */
.alert {
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-lg);
    border-left: 4px solid;
    font-size: var(--text-sm);
}

.alert-success {
    background-color: #eef8f1;
    color: #1a5730;
    border-color: var(--color-success);
}

.alert-danger {
    background-color: #fdf0f0;
    color: #8c1e1e;
    border-color: var(--color-danger);
}

.alert-info {
    background-color: #eff6fb;
    color: #154c79;
    border-color: var(--color-info);
}

.alert-warning {
    background-color: #fff9e6;
    color: #7b620b;
    border-color: var(--color-secondary);
}

/* --- Tapahtumakortit (Event Cards) --- */
.event-card {
    display: flex;
    gap: var(--space-md);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.event-card:hover {
    border-color: var(--color-secondary);
    box-shadow: var(--shadow-md);
}

.event-date-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    background-color: var(--color-primary);
    color: #ffffff;
    border-radius: var(--radius-sm);
    flex-shrink: 0;
    border-bottom: 3px solid var(--color-secondary);
}

.event-day {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
}

.event-month {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    color: var(--color-secondary);
}

.event-details {
    flex: 1;
}

.event-title {
    font-size: 1.15rem;
    margin-bottom: 0.35rem;
}

.event-meta {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

/* --- Tilastopalkki (Stats Bar) --- */
.stats-section {
    background: linear-gradient(to right, #122842, #183354);
    color: #ffffff;
    padding: var(--space-xl) 0;
    margin: var(--space-2xl) 0;
    border-top: 2px solid var(--color-secondary);
    border-bottom: 2px solid var(--color-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    text-align: center;
}

.stat-item {
    padding: 0.5rem;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2.8rem;
    font-weight: 700;
    color: var(--color-secondary);
    line-height: 1;
    margin-bottom: 0.4rem;
}

.stat-label {
    font-size: 0.95rem;
    color: #d1dbe7;
    font-weight: 500;
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* --- Aikajana (Timeline for History) --- */
.timeline {
    position: relative;
    padding: var(--space-md) 0;
    margin: var(--space-xl) 0;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 28px;
    width: 3px;
    background-color: var(--color-border-gold);
}

.timeline-item {
    position: relative;
    padding-left: 70px;
    margin-bottom: var(--space-xl);
}

.timeline-marker {
    position: absolute;
    left: 17px;
    top: 4px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background-color: var(--color-secondary);
    border: 4px solid var(--color-background);
    box-shadow: 0 0 0 2px var(--color-secondary);
}

.timeline-header {
    display: flex;
    align-items: baseline;
    gap: 0.85rem;
    margin-bottom: 0.5rem;
}

.timeline-year {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    font-weight: 700;
    color: var(--color-primary);
}

.timeline-title {
    font-size: 1.15rem;
    color: var(--color-text-muted);
}

.timeline-content {
    background-color: var(--color-surface);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

/* --- Nuotisto ja suodattimet (Sheet Music Library) --- */
.filter-bar {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    margin-bottom: var(--space-lg);
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.search-input-wrapper {
    flex: 1;
    min-width: 260px;
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-size: var(--text-sm);
    font-family: var(--font-body);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(194, 151, 56, 0.2);
}

.search-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--color-text-muted);
}

.filter-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.filter-chip {
    background-color: var(--color-surface-soft);
    color: var(--color-text);
    border: 1px solid var(--color-border);
    padding: 0.35rem 0.8rem;
    border-radius: 50px;
    font-size: var(--text-xs);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.filter-chip:hover {
    background-color: #e5edf5;
    border-color: var(--color-primary-light);
}

.filter-chip.active {
    background-color: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
}

.score-table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.score-table th {
    background-color: var(--color-surface-soft);
    color: var(--color-primary);
    font-family: var(--font-heading);
    font-weight: 600;
    text-align: left;
    padding: 0.95rem 1.15rem;
    border-bottom: 2px solid var(--color-border);
    font-size: var(--text-sm);
}

.score-table td {
    padding: 0.95rem 1.15rem;
    border-bottom: 1px solid var(--color-border);
    vertical-align: middle;
    font-size: var(--text-sm);
}

.score-table tr:hover td {
    background-color: #fbfcfe;
}

/* --- Lomake-elementit (Forms) --- */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.35rem;
    font-size: var(--text-sm);
    color: var(--color-text);
}

.form-control, .form-select {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    background-color: var(--color-surface);
    color: var(--color-text);
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(194, 151, 56, 0.2);
}

textarea.form-control {
    min-height: 120px;
    resize: vertical;
}

.form-help {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: 0.3rem;
}

/* --- Kuvagalleria (Gallery) --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-md);
}

.gallery-card {
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.gallery-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.gallery-img-wrapper {
    height: 220px;
    background-color: #e9eef3;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-card:hover img {
    transform: scale(1.03);
}

.gallery-body {
    padding: var(--space-md);
}

.gallery-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.gallery-desc {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

/* ==========================================================================
   JÄSENOSION VALIKKO, SIVUVALIKKO JA DOKUMENTTIKOMPONENTIT (Member Area)
   Suunniteltu huipputason mobiilikäytettävyydelle ja nopealle selaukselle.
   ========================================================================== */

/* Jäsenosion toissijainen valikkopalkki */
.member-subnav-bar {
    background-color: #0f2137;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 0;
    z-index: 100;
}

.member-subnav-scroll {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    overflow-x: auto;
    padding: 0.6rem 0;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none; /* Firefox */
}

.member-subnav-scroll::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Edge */
}

.member-subnav-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.88rem;
    font-weight: 500;
    color: #c7d5e6;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
    transition: var(--transition);
    flex-shrink: 0;
}

.member-subnav-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.member-subnav-item.active {
    background-color: var(--color-secondary);
    color: #0c1b2c;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(194, 151, 56, 0.3);
}

.member-subnav-item.item-reset {
    border-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}

.member-subnav-item.item-reset:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Jäsenosion dokumenttinäkymän asettelu (Sivuvalikko + sisältö) */
.doc-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: var(--space-xl);
    align-items: flex-start;
    margin-bottom: var(--space-2xl);
}

/* Työpöydän sivuvalikko (Desktop Sidebar) */
.doc-sidebar {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 70px;
}

.doc-sidebar-header {
    background-color: var(--color-surface-soft);
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--color-border);
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.doc-sidebar-menu {
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
}

.doc-sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.1rem;
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.92rem;
    font-weight: 500;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.doc-sidebar-link:hover {
    background-color: var(--color-surface-soft);
    color: var(--color-primary);
}

.doc-sidebar-link.active {
    background-color: rgba(194, 151, 56, 0.08);
    color: var(--color-primary);
    font-weight: 700;
    border-left-color: var(--color-secondary);
}

/* Mobiilivalitsin kausille / vuosille */
.doc-mobile-period-bar {
    display: none; /* Näytetään vain mobiilissa */
    margin-bottom: var(--space-md);
}

.doc-period-pills {
    display: flex;
    gap: 0.4rem;
    overflow-x: auto;
    padding-bottom: 0.4rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.doc-period-pills::-webkit-scrollbar {
    display: none;
}

.doc-period-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.5rem 0.95rem;
    border-radius: 9999px;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    transition: var(--transition);
    min-height: 42px; /* Touch target */
}

.doc-period-pill.active {
    background-color: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
}

/* Asiakirjakortit (PDF Document Cards) */
.doc-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.doc-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-md) var(--space-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.doc-card:hover {
    border-color: var(--color-border-hover);
    box-shadow: var(--shadow-md);
}

.doc-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.doc-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.doc-card-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
    line-height: 1.3;
}

.doc-card-desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.doc-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
    margin-top: 0.25rem;
}

.doc-card-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.doc-card-actions .btn {
    min-height: 44px; /* Touch target mobiilille */
    padding: 0.45rem 0.95rem;
    font-size: 0.88rem;
}

.doc-card-filesize {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

/* Jäsenosion etusivun pikaohjausruudukko (Dashboard Grid) */
.member-quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.member-quick-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    text-decoration: none;
    color: var(--color-text);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}

.member-quick-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background-color: var(--color-secondary);
    opacity: 0;
    transition: var(--transition);
}

.member-quick-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-border-hover);
}

.member-quick-card:hover::before {
    opacity: 1;
}

.member-quick-icon {
    font-size: 2rem;
    margin-bottom: 0.65rem;
}

.member-quick-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-primary);
    margin-bottom: 0.35rem;
}

.member-quick-desc {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    line-height: 1.45;
    margin-bottom: 0.75rem;
}

.member-quick-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--color-secondary-hover);
    padding-top: 0.5rem;
    border-top: 1px dashed var(--color-border);
}

/* Mobiiliresponsiivisuus jäsenalueelle */
@media (max-width: 860px) {
    .doc-layout {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .doc-sidebar {
        display: none; /* Korvataan vaakasuoralla mobiilipalkilla */
    }

    .doc-mobile-period-bar {
        display: block;
    }

    .doc-card {
        padding: var(--space-md);
    }

    .doc-card-actions {
        width: 100%;
    }

    .doc-card-actions .btn {
        flex: 1;
        text-align: center;
    }
}

/* ==========================================================================
   KIRJAUTUMISSUOJATTU SIVUSTO (Login Pages & Modals)
   ========================================================================== */
.login-container {
    width: 100%;
    max-width: 460px;
    margin: 3.5rem auto;
    padding: 0 var(--space-lg);
    box-sizing: border-box;
}

.login-card {
    background-color: var(--color-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--color-border);
    border-top: 5px solid var(--color-secondary);
    box-shadow: var(--shadow-md);
    padding: var(--space-xl) 2rem;
}

.login-header {
    text-align: center;
    margin-bottom: var(--space-lg);
}

.login-header h2 {
    font-size: 1.6rem;
    margin-bottom: 0.35rem;
}

.login-header p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

@media (max-width: 520px) {
    .login-container {
        padding: 0 1rem;
        margin: 2rem auto;
    }

    .login-card {
        padding: 1.75rem 1.25rem;
    }
}

/* ==========================================================================
   KONSERTTITALTIOINNIT, ÄÄNITOISTO JA GALLERIA-LIGHTBOX
   ========================================================================== */

.recording-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.recording-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: var(--transition);
}

.recording-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-secondary);
}

.recording-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.recording-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 0;
    line-height: 1.3;
}

.recording-meta {
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 0.75rem;
}

.recording-desc {
    font-size: 0.9rem;
    color: var(--color-text);
    line-height: 1.5;
    margin-bottom: 1rem;
    flex-grow: 1;
}

.recording-player {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--color-border);
}

.recording-player audio {
    width: 100%;
    height: 42px;
    border-radius: 24px;
    outline: none;
}

.video-responsive {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-sm);
    background-color: #000000;
    margin-top: 0.75rem;
}

.video-responsive iframe,
.video-responsive video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Lightbox-kuvankatselu */
.gallery-card {
    cursor: pointer;
}

.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.92);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 1.5rem;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.lightbox-modal.active {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: #ffffff;
    text-align: center;
    margin-top: 1rem;
    max-width: 800px;
}

.lightbox-caption h4 {
    color: #ffffff;
    margin-bottom: 0.25rem;
    font-size: 1.2rem;
}

.lightbox-caption p {
    color: #cccccc;
    font-size: 0.92rem;
    margin: 0;
}

.lightbox-close {
    position: absolute;
    top: 1.25rem;
    right: 1.5rem;
    color: #ffffff;
    font-size: 2.2rem;
    font-weight: 700;
    cursor: pointer;
    background: transparent;
    border: none;
    line-height: 1;
    padding: 0.5rem;
    transition: color 0.2s;
}

.lightbox-close:hover {
    color: var(--color-secondary);
}
