/* ==========================================================================
   Meeting Report Pages (คณะกรรมการบริหาร / คณะกรรมการประจำคณะฯ)
   ========================================================================== */

/* Hero Banner */
.meeting-hero {
    background: linear-gradient(135deg, #3a491f 0%, #273115 50%, #4c5f2b 100%);
    padding: 60px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
}

.meeting-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><polygon points="0,0 100,0 100,100" fill="rgba(212,175,55,0.06)"/><polygon points="0,0 0,100 100,100" fill="rgba(255,255,255,0.03)"/></svg>');
    background-size: cover;
}

.meeting-hero h1 {
    font-family: 'Sarabun', sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    line-height: 1.5;
}

.meeting-hero .meeting-hero-sub {
    font-size: 20px;
    font-weight: 600;
    color: #d4af37;
    position: relative;
    z-index: 1;
    margin-top: 8px;
}

/* Breadcrumb */
.meeting-breadcrumb {
    margin-bottom: 25px;
}

.meeting-breadcrumb ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.meeting-breadcrumb ul li {
    font-size: 14px;
    color: var(--text-muted, #6e7671);
}

.meeting-breadcrumb ul li a {
    color: var(--primary, #3a491f);
    text-decoration: none;
    transition: color 0.2s ease;
}

.meeting-breadcrumb ul li a:hover {
    color: var(--accent, #d4af37);
}

.meeting-breadcrumb ul li+li::before {
    content: '\203A';
    margin-right: 8px;
    color: var(--text-muted, #6e7671);
}

/* ==========================================================================
   Tab Navigation (Horizontal Scroll)
   ========================================================================== */

.tab-nav-wrapper {
    position: relative;
    margin-bottom: 25px;
    border-bottom: 2px solid #e2e8f0;
}

.tab-nav-container {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}

.tab-nav-container::-webkit-scrollbar {
    height: 4px;
}

.tab-nav-container::-webkit-scrollbar-thumb {
    background: #d4af37;
    border-radius: 4px;
}

.tab-btn-custom {
    font-family: 'Sarabun', sans-serif;
    padding: 8px 22px;
    border-radius: 20px;
    border: 1px solid #3a491f;
    background: #ffffff;
    color: #3a491f;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.tab-btn-custom:hover,
.tab-btn-custom.active {
    background: #3a491f;
    color: #ffffff !important;
    box-shadow: 0 4px 10px rgba(58, 73, 31, 0.2);
}

/* ==========================================================================
   Tab Content & Cards
   ========================================================================== */

.tab-pane-custom {
    display: none;
}

.tab-pane-custom.active {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)) !important;
    gap: 20px !important;
}

/* Individual Card */
.tab-card-custom {
    background: #fff9e6 !important;
    border: 1px solid #e2e8f0 !important;
    border-top: 4px solid #3a491f !important;
    border-radius: 8px !important;
    padding: 18px !important;
    text-decoration: none !important;
    transition: all 0.25s ease !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03) !important;
    color: inherit !important;
}

.tab-card-custom:hover {
    border-top-color: #d4af37 !important;
    transform: translateY(-4px) !important;
    box-shadow: 0 8px 20px rgba(58, 73, 31, 0.12) !important;
}

/* Card Header */
.tab-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.tab-card-badge {
    font-size: 13px;
    background: #ebf5d8;
    color: #3a491f;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 700;
}

.tab-card-date {
    color: #888;
    font-size: 12px;
}

.tab-card-date i {
    margin-right: 3px;
}

/* Card Number */
.tab-card-number {
    font-family: 'Sarabun', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #3a491f;
    margin: 0 0 4px 0;
}

/* Card Committee */
.tab-card-committee {
    font-family: 'Sarabun', sans-serif;
    font-size: 13px;
    color: #666;
    margin: 0;
}

/* Card Footer */
.tab-card-footer {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dashed #eee;
    text-align: right;
    color: #b8860b;
    font-weight: 600;
    font-size: 13px;
}

.tab-card-footer i {
    margin-left: 4px;
    font-size: 11px;
}

/* Empty State */
.meeting-empty {
    text-align: center;
    padding: 60px 0;
    color: #6e7671;
}

.meeting-empty i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
    opacity: 0.3;
}

.meeting-empty p {
    font-size: 16px;
}

/* ==========================================================================
   Meeting Detail Page
   ========================================================================== */

.meeting-detail-header {
    background: linear-gradient(135deg, #3a491f 0%, #273115 100%);
    padding: 40px 0;
    margin-bottom: 30px;
}

.meeting-detail-header h1 {
    font-family: 'Sarabun', sans-serif;
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    margin: 0;
}

.meeting-detail-header .meeting-detail-meta {
    color: #d4af37;
    font-size: 15px;
    margin-top: 8px;
}

.meeting-detail-meta span {
    margin-right: 20px;
}

.meeting-detail-meta i {
    margin-right: 5px;
}

/* PDF Viewer Container */
.meeting-pdf-container {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(58, 73, 31, 0.08);
    border: 1px solid rgba(58, 73, 31, 0.06);
    overflow: hidden;
    margin-bottom: 30px;
}

.meeting-pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f9faf8, #ffffff);
    border-bottom: 1px solid rgba(58, 73, 31, 0.08);
}

.meeting-pdf-header h3 {
    font-family: 'Sarabun', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary, #3a491f);
    margin: 0;
}

.meeting-pdf-header .pdf-actions {
    display: flex;
    gap: 10px;
}

.meeting-pdf-header .pdf-actions a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-pdf-view {
    background-color: var(--primary, #3a491f);
    color: #ffffff !important;
}

.btn-pdf-view:hover {
    background-color: #4c5f2b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(58, 73, 31, 0.2);
    color: #ffffff !important;
}

.btn-pdf-download {
    background-color: var(--accent, #d4af37);
    color: #ffffff !important;
}

.btn-pdf-download:hover {
    background-color: #bfa15f;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
    color: #ffffff !important;
}

.meeting-pdf-viewer {
    width: 100%;
    height: 800px;
    border: none;
}

/* Back Button */
.meeting-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background-color: var(--primary, #3a491f);
    color: #ffffff !important;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none !important;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.meeting-back-btn:hover {
    background-color: #4c5f2b;
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(58, 73, 31, 0.2);
}

/* ==========================================================================
   Responsive - Desktop (6 cards per row)
   ========================================================================== */

@media (min-width: 1200px) {
    .tab-pane-custom.active {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

/* ==========================================================================
   Responsive - Tablet (3-4 cards per row)
   ========================================================================== */

@media (max-width: 1199px) {
    .tab-pane-custom.active {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 991px) {
    .tab-pane-custom.active {
        grid-template-columns: repeat(3, 1fr) !important;
    }
}

/* ==========================================================================
   Responsive - Mobile (2-3 cards per row)
   ========================================================================== */

@media (max-width: 767px) {

    /* Hero */
    .meeting-hero {
        padding: 40px 0;
    }

    .meeting-hero h1 {
        font-size: 24px;
    }

    .meeting-hero .meeting-hero-sub {
        font-size: 16px;
    }

    /* Tabs - ปุ่มเล็กลงบนมือถือ */
    .tab-btn-custom {
        padding: 6px 16px;
        font-size: 13px;
    }

    /* Cards - 2 คอลัมน์บนมือถือ */
    .tab-pane-custom.active {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 12px !important;
    }

    /* การ์ดเล็กลงบนมือถือ */
    .tab-card-custom {
        padding: 14px !important;
    }

    .tab-card-number {
        font-size: 15px;
    }

    .tab-card-committee {
        font-size: 12px;
    }

    .tab-card-date {
        font-size: 11px;
    }

    .tab-card-badge {
        font-size: 10px;
    }

    .tab-card-footer {
        font-size: 12px;
        margin-top: 10px;
        padding-top: 8px;
    }

    /* PDF Header - Stack on mobile */
    .meeting-pdf-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }

    .meeting-pdf-header .pdf-actions {
        flex-wrap: wrap;
        justify-content: center;
    }

    .meeting-pdf-viewer {
        height: 500px;
    }

    .meeting-detail-header h1 {
        font-size: 22px;
    }

    /* Breadcrumb */
    .meeting-breadcrumb ul {
        font-size: 13px;
    }
}

/* ==========================================================================
   Responsive - Small Mobile (2 cards per row)
   ========================================================================== */

@media (max-width: 520px) {
    .tab-pane-custom.active {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }

    .tab-card-custom {
        padding: 12px !important;
    }

    .tab-card-number {
        font-size: 14px;
    }

    .tab-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }
}

/* ==========================================================================
   Responsive - Very Small Mobile (1 card per row)
   ========================================================================== */

@media (max-width: 360px) {
    .tab-pane-custom.active {
        grid-template-columns: 1fr !important;
    }
}