/* ===================================
   TALKING POINTS BROWSER STYLES
   =================================== */

body.tp-browser-page {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background: #f8f9fa;
    margin: 0;
    padding: 0;
}

/* ===== HEADER SECTION ===== */
.tp-browser-header {
    background: linear-gradient(135deg, #1c5f73 0%, #2a7a8a 100%);
    color: white;
    padding: 40px 20px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.header-content {
    max-width: 1400px;
    margin: 0 auto;
}

.back-home {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    display: inline-block;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.back-home:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateX(-3px);
}

.tp-browser-header h1 {
    font-size: 2.5rem;
    color: white;
    margin: 0 0 20px 0;
    font-weight: 300;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tp-explanation {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    color: #FFF;
    border-radius: 8px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
}

.tp-explanation p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #FFF;
}

.tp-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.btn-join {
    background: #f59e0b;
    color: #f8f9fa;
}

.btn-join:hover {
    background: #fbbf24;
    color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.4);
}

.btn-book {
    background: white;
    color: #1c5f73;
}

.btn-book:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
}

.tp-levels-note {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.level-badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
}

.level-badge.level-a2 {
    background: #10b981;
    color: white;
}

.level-badge.level-b1b2 {
    background: #3b82f6;
    color: white;
}

.level-badge.level-c1 {
    background: #8b5cf6;
    color: white;
}

.note-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

/* ===== MAGAZINE GRID ===== */
.tp-magazine-section {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
}

.magazine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.magazine-cover {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
}

.magazine-cover:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}

.cover-link {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
}

.cover-content {
    position: relative;
}

/* Extract and style image from module header */
.cover-content .ysp-lc-module-header {
    background: none !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

.cover-content .module-header-container {
    display: block !important;
    flex-direction: column !important;
}

.cover-content .module-header-image {
    flex: none !important;
    order: 1 !important;
    width: 100% !important;
}

.cover-content .module-header-image img {
    width: 100% !important;
    height: 200px !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    display: block !important;
}

.cover-content .module-header-text {
    padding: 20px !important;
    order: 2 !important;
}

.cover-content .module-header-text h1 {
    font-size: 1.2rem !important;
    line-height: 1.4 !important;
    margin: 0 0 12px 0 !important;
    color: #2c3e50 !important;
    display: block !important;
}

.cover-content .module-header-text p {
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
    color: #6c757d !important;
    margin: 0 !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
}

.cover-overlay {
    position: absolute;
    bottom: 60px;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 40px 20px 20px 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.magazine-cover:hover .cover-overlay {
    opacity: 1;
}

.read-more {
    color: white;
    font-weight: 600;
    font-size: 1.1rem;
    display: block;
    text-align: center;
}

/* Level Switcher */
.level-switcher {
    display: flex;
    gap: 8px;
    padding: 12px;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.level-switch-btn {
    flex: 1;
    padding: 8px;
    text-align: center;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
    text-decoration: none;
    transition: all 0.3s ease;
}

.level-switch-btn:hover {
    border-color: #1c5f73;
    color: #1c5f73;
}

.level-switch-btn.active {
    background: #1c5f73;
    border-color: #1c5f73;
    color: white;
}

.no-tps-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
}

.no-tps-message p {
    font-size: 1.2rem;
    color: #6c757d;
    margin: 0;
}

/* =========================================================
   Access Badges + Access Borders (Public vs Members)
   (replaces .showcase-tp + .showcase-badge)
========================================================= */

/* Base card */
.magazine-cover {
    position: relative;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

/* -------------------------
   PUBLIC ACCESS (is_showcase = Y)
-------------------------- */
.magazine-cover.access-public {
    border: 3px solid #1CF4FB;
    box-shadow: 0 4px 6px rgba(28, 244, 251, 0.35);
}

.magazine-cover.access-public:hover {
    border-color: #0A9396;
    box-shadow: 0 12px 24px rgba(28, 244, 251, 0.45);
}

/* -------------------------
   MEMBERS ONLY (is_showcase = N)
-------------------------- */
.magazine-cover.access-members {
    border: 3px solid #005f73;
    box-shadow: 0 4px 6px rgba(0, 95, 115, 0.30);
}

.magazine-cover.access-members:hover {
    border-color: #0A9396;
    box-shadow: 0 12px 24px rgba(0, 95, 115, 0.40);
}

/* -------------------------
   Badge base
-------------------------- */
.access-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    z-index: 10;
    box-shadow: 0 4px 8px rgba(0,0,0,0.18);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.access-badge span {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Badge variants */
.access-badge.badge-public {
    background: linear-gradient(135deg, #1CF4FB, #0A9396);
    color: #005f73;
}

.access-badge.badge-members {
    background: linear-gradient(135deg, #005f73, #0A9396);
    color: #F4F1DE;
}

/* Pulse animation to draw attention to PUBLIC ACCESS */
@keyframes access-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Pulse ONLY the public-access badge */
.access-badge.badge-public {
    animation: access-pulse 2s ease-in-out infinite;
}

/* ===== FOOTER SECTION ===== */
.tp-browser-footer {
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 40px 20px;
    margin-top: 60px;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-archive,
.btn-methodology {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #e9ecef;
}

.btn-archive:hover,
.btn-methodology:hover {
    background: #e9ecef;
    border-color: #1c5f73;
    color: #1c5f73;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .tp-browser-header h1 {
        font-size: 2rem;
    }
    
    .magazine-grid {
        grid-template-columns: 1fr;
    }
    
    .tp-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
}


/* ===== ARCHIVE PAGE STYLES ===== */
.archive-filters-section {
    background: white;
    padding: 30px 20px;
    margin: 0 auto 30px;
    max-width: 1400px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.filters-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.filter-group h3 {
    margin: 0 0 12px 0;
    font-size: 1.1rem;
    color: #2c3e50;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.tag-cloud-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-filter-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    color: #495057;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tag-filter-btn:hover {
    background: #e9ecef;
    border-color: #1c5f73;
    color: #1c5f73;
}

.tag-filter-btn.active {
    background: #1c5f73;
    color: white;
    border-color: #1c5f73;
}

.tag-count {
    background: rgba(0,0,0,0.1);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 600;
}

.tag-filter-btn.active .tag-count {
    background: rgba(255,255,255,0.2);
}

#archive-cefr-filter,
#archive-sort {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    min-width: 200px;
}

#archive-search {
    padding: 10px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    max-width: 400px;
}

.clear-filters-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    align-self: flex-start;
}

.clear-filters-btn:hover {
    background: #c82333;
}

.archive-results-info {
    max-width: 1400px;
    margin: 0 auto 20px;
    padding: 0 20px;
}

.results-count {
    font-size: 1.1rem;
    color: #6c757d;
    margin: 0;
}

#results-number {
    font-weight: 600;
    color: #1c5f73;
}

.tp-route-intro {
    margin: 22px 0 26px;
}

.tp-route-title {
    margin: 0 0 8px;
    font-size: 1rem;
    color: white;
}

.tp-route-subtitle {
    margin: 0 0 16px;
    font-size: 1rem;
    opacity: 0.95;
}

.tp-route-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 14px;
}

.tp-route-card {
    border-radius: 14px;
    padding: 16px 18px;
    border: 2px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.08);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.tp-route-card-listening {
    border-left: 6px solid #2fbf71;
}

.tp-route-card-classic {
    border-left: 6px solid #57a6ff;
}

.tp-route-card-head {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 6px;
}

.tp-route-card-tag {
    font-weight: 600;
    margin-bottom: 10px;
    opacity: 0.95;
}

.tp-route-card p {
    margin: 0 0 10px;
    line-height: 1.5;
}

.tp-route-bestfor {
    margin-top: 8px;
    font-size: 0.95rem;
}

.tp-route-footer {
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.07);
    font-size: 0.95rem;
}

.tp-route-footer p {
    margin: 0 0 6px;
}

.tp-route-footer p:last-child {
    margin-bottom: 0;
}
.tp-header-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 16px;
    flex-wrap: wrap; /* important for mobile */
}
@media (max-width: 768px) {
    .tp-route-grid {
        grid-template-columns: 1fr;
    }
}