/* ==================== Materials Page ==================== */

/* Nav overrides: white background by default (non-home pages) */
body.materials-layout .nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

body.materials-layout .nav-logo {
    color: #1a1a1a;
}

body.materials-layout .nav-links a {
    color: #1a1a1a;
}

body.materials-layout .nav-links a::after {
    background-color: #274B92;
}

body.materials-layout .nav-links a:hover {
    color: #274B92;
}

body.materials-layout .nav.scrolled .nav-logo {
    color: #1a1a1a;
}

body.materials-layout .nav-lang {
    color: #1a1a1a;
}

body.materials-layout .nav-lang:hover {
    color: #274B92;
}

body.materials-layout .nav-links::before {
    background: rgba(39, 75, 146, 0.15);
}

#materials-list {
    padding-top: 140px !important;
}

/* Tabs */
.materials-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    padding-top: 16px;
    margin-bottom: 32px;
}

.materials-tab {
    padding: 10px 22px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #444;
    background: #fff;
    border: 1px solid #e3e9f3;
    cursor: pointer;
    transition: all 0.2s ease;
}

.materials-tab:hover {
    border-color: #274B92;
    color: #274B92;
}

.materials-tab.active {
    background: #274B92;
    color: #fff;
    border-color: #274B92;
}

/* List */
.materials-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.material-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 16px;
    align-items: center;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #eaf0f8;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.material-item:hover {
    border-color: #d0dce8;
    box-shadow: 0 6px 20px rgba(20, 40, 80, 0.05);
    transform: translateY(-2px);
}

.material-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    color: #274B92;
    background: rgba(39, 75, 146, 0.08);
}

.material-body {
    min-width: 0;
}

.material-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.material-desc {
    font-size: 0.85rem;
    color: #65738e;
    margin-bottom: 4px;
}

.material-meta {
    font-size: 0.8rem;
    color: #999;
}

.material-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 18px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #274B92;
    background: #fff;
    border: 1px solid #274B92;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.material-action:hover {
    background: #274B92;
    color: #fff;
}

/* CTA override */
body.materials-layout .cta {
    padding: 88px 0;
    background: #274b92;
    color: #fff;
}

body.materials-layout .cta-title {
    font-size: 2rem;
    margin-bottom: 16px;
    font-weight: 700;
}

body.materials-layout .cta-subtitle {
    max-width: 720px;
    margin: 0 auto 24px;
    font-size: 0.98rem;
    color: rgba(255, 255, 255, 0.84);
    line-height: 1.9;
}

body.materials-layout .cta .btn-primary {
    background: #FAC10C;
    border-color: #FAC10C;
    color: #1A1A1A;
}

body.materials-layout .cta .btn-primary:hover {
    background: #e0ab00;
    border-color: #e0ab00;
    color: #1A1A1A;
}

body.materials-layout .detail-footer .btn-outline-primary {
    border: 1.5px solid #274B92;
    color: #274B92;
    background: transparent;
    border-radius: 0;
}

body.materials-layout .detail-footer .btn-outline-primary:hover {
    background: #274B92;
    color: #fff;
}

body.materials-layout .cta .btn-outline {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.4);
}

/* Detail page */
body.materials-layout .detail-header {
    text-align: center;
}

body.materials-layout .detail-title {
    text-align: center;
}

body.materials-layout .detail-meta {
    justify-content: center;
}

body.materials-layout .detail-content {
    max-width: 720px;
    margin: 0 auto;
}

@media (max-width: 1024px) {
}

@media (max-width: 768px) {
    .material-item {
        grid-template-columns: auto 1fr;
        gap: 12px;
        padding: 16px;
    }

    .material-action {
        grid-column: 1 / -1;
        justify-self: start;
    }

    body.materials-layout .cta {
        padding: 64px 0;
    }

    body.materials-layout .cta-title {
        font-size: 1.6rem;
    }
}
