/* ==========================================================================
   CSS NÚT CHUÔNG & POPUP THÔNG BÁO (VIỀN MỎNG TỐI ĐA)
   ========================================================================== */

/* 1. KHUNG CHỨA NÚT CHUÔNG (Vị trí lề phải đúng 300px) */
.bell-container-under-header {
    width: 100%;
    max-width: 1200px;
    margin: 10px auto 0 auto;
    padding-right: 300px; /* Cách lề phải chuẩn 300px */
    display: flex;
    justify-content: flex-end;
    box-sizing: border-box;
}
/* 2. NÚT CHUÔNG VIỀN SIÊU MỎNG (Sát chữ & icon) */
.fb-bell-btn {
    position: relative;
    background: #ffffff;
    border: 1.5px solid #0052cc;
    border-radius: 20px;
    padding: 2px 12px; /* Viền trên/dưới chỉ 2px - mỏng hết mức */
    font-size: 13px;
    font-weight: bold;
    color: #0052cc;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
    transition: all 0.2s ease;
}

.fb-bell-btn:hover {
    background-color: #0052cc;
    color: #ffffff;
}

/* Icon chuông */
.fb-bell-btn .bell-icon {
    font-size: 15px;
    display: inline-block;
    animation: bell-shake 2s infinite;
}

/* Badge 99+ thu nhỏ */
.bell-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    background-color: #ff3b30;
    color: #ffffff;
    font-size: 9px;
    font-weight: bold;
    padding: 1px 4px;
    border-radius: 8px;
    border: 1.5px solid #ffffff;
}

@keyframes bell-shake {
    0%, 100% { transform: rotate(0); }
    10%, 30%, 50% { transform: rotate(12deg); }
    20%, 40% { transform: rotate(-12deg); }
    60% { transform: rotate(0); }
}

/* 3. KHUNG POPUP VIỀN TRÊN DƯỚI MỎNG TỐI ĐA */
.fb-notify-modal-overlay {
    display: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 5px; /* Giảm sát viền màn hình */
    box-sizing: border-box;
}

.fb-notify-modal-overlay.active {
    display: flex !important;
}

/* Khung bao sát khít Facebook Iframe */
.fb-notify-modal-box {
    background: #ffffff;
    width: 100%;
    max-width: 525px;
    max-height: 775px;
    border-radius: 8px;
    padding: 4px 4px 2px 4px; /* Trên 4px, Dưới 2px - Mỏng hết mức */
    position: relative;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    overflow-y: auto;
    box-sizing: border-box;
}

/* Tiêu đề mỏng sát viền */
.notify-modal-title {
    text-align: center;
    margin: 2px 0 4px ;
    color: #0f172a;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.1;
}

/* Nút X đóng */
.fb-modal-close-x {
    position: absolute;
    top: 2px;
    right: 6px;
    background: transparent;
    border: none;
    font-size: 20px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    line-height: 1;
    z-index: 2;
}

.fb-modal-close-x:hover {
    color: #000;
}

/* Khung chứa Iframe */
.facebook-iframe-container {
    width: 100%;
    margin: 0;
    padding: 0;
}

.fb-page-wrapper-deco {
    width: 100%;
    height: 720px;
    overflow: hidden;
}

.fb-page-wrapper-deco iframe {
    width: 100% !important;
    height: 720px !important;
    border: none;
    display: block;
}

/* Dòng ghi chú sát viền dưới */
.fb-label-hint {
    display: block;
    font-size: 11px;
    color: #64748b;
    text-align: center;
}
/* ==========================================================================
   📱 CHỈ TỐI ƯU CHO ĐIỆN THOẠI (DƯỚI 768PX)
   ========================================================================== */
@media (max-width: 768px) {
    .bell-container-under-header {
        padding-right: 15px !important;
    }

    .fb-notify-modal-overlay {
        align-items: flex-start !important; 
        padding-top: 70px !important;       
        padding-bottom: 20px !important;
    }

    .fb-notify-modal-box {
        width: 92% !important;               
        max-width: 400px !important;         
        max-height: 80vh !important;         
        padding: 6px 6px 4px 6px !important;
        box-sizing: border-box !important;   
    }

    .fb-modal-close-x {
        top: 4px !important;
        right: 8px !important;
        font-size: 22px !important;
        background: rgba(255, 255, 255, 0.8) !important; 
        border-radius: 50% !important;
        width: 26px !important;
        height: 26px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .notify-modal-title {
        font-size: 0.9rem !important;
        margin: 2px 25px 4px 0 !important; 
    }

    /* Ép khung chứa và iframe co giãn hoàn toàn trong 100% không gian cho phép của điện thoại */
    .facebook-iframe-container {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }

    .fb-page-wrapper-deco {
        width: 100% !important;
        max-width: 100% !important;
        height: 480px !important; 
        box-sizing: border-box !important;
        overflow: hidden !important;
    }

    .fb-page-wrapper-deco iframe {
        width: 100% !important;
        max-width: 100% !important;
        height: 100% !important;
        border: none !important;
    }
}
/* 1. RESET & VARIABLES */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
}
:root {
    --primary-color: #1a73e8;
    --primary-hover: #1557b0;
    --bg-card-start: #eef4ff;
    --bg-card-end: #dbe7ff;
    --border-card: #b3cefe;
    --text-title: #1557b0;
    --success-color: #34a853;
    --success-hover: #2d8e47;
}
/* 2. CARD CONTAINER (Đã thu gọn chiều ngang vừa phải) */
.card-vertical-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    max-width: 800px; /* Thu nhỏ từ 1100px xuống 800px cho thon gọn hơn */
    margin: 0 auto;
}
.light-blue-card-row {
    background: linear-gradient(135deg, var(--bg-card-start), var(--bg-card-end));
    border: 1.5px solid var(--border-card);
    border-radius: 14px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(26, 115, 232, 0.08);
    transition: all 0.25s ease;
}

.light-blue-card-row:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(26, 115, 232, 0.15);
}

.card-title {
    color: var(--text-title);
    font-size: 15.5px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.4;
}

.card-body {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    padding: 12px;
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.5;
    color: #444;
    margin-bottom: 12px;
    flex-grow: 1;
}

.card-footer {
    text-align: right;
}

.btn-pay-trigger {
    display: inline-block;
    text-decoration: none;
    background: var(--primary-color);
    color: #ffffff;
    border: none;
    padding: 9px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    box-shadow: 0 2px 6px rgba(26, 115, 232, 0.3);
}

.btn-pay-trigger:hover {
    background: var(--primary-hover);
}

.btn-pay-trigger:active {
    transform: scale(0.98);
}

/* 3. MODAL POPUP VIETQR & MÃ QR TO */
.payment-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.payment-modal-overlay.active {
    display: flex;
}

.payment-modal-box {
    background: #ffffff;
    width: 100%;
    max-width: 380px; 
    border-radius: 16px;
    padding: 20px;
    position: relative;
    text-align: center;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.25s ease-out;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

.payment-close-x {
    position: absolute;
    top: 12px;
    right: 14px;
    border: none;
    background: #f0f2f5;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 18px;
    color: #666;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.payment-close-x:hover {
    background: #e4e6eb;
    color: #000;
}

.pay-title {
    font-size: 18px;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.pay-doc-name {
    font-size: 13.5px;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 12px;
    padding: 0 10px;
    line-height: 1.3;
}

/* Ảnh QR to rõ nét */
.qr-container img {
    width: 250px;
    height: 250px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 6px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pay-instruction {
    text-align: left;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 12.5px;
    color: #475569;
    margin: 12px 0;
    line-height: 1.6;
}

.pay-instruction p {
    margin-bottom: 2px;
}

.pay-instruction p:last-child {
    margin-bottom: 0;
}

.btn-confirm-pay {
    width: 100%;
    background: var(--success-color);
    color: #ffffff;
    border: none;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 3px 8px rgba(52, 168, 83, 0.3);
}

.btn-confirm-pay:hover {
    background: var(--success-hover);
}

.btn-confirm-pay:active {
    transform: scale(0.99);
}

/* 4. RESPONSIVE MOBILE */
@media (max-width: 640px) {
    .card-vertical-container {
        grid-template-columns: 1fr;
    }
    
    .qr-container img {
        width: 220px;
        height: 220px;
    }
}
/* ==========================================
   CSS RIÊNG KHỐI AZOTA - PHIÊN BẢN NHỎ GỌN
   ========================================== */
.az-subjects-section {
    width: 100%;
    max-width: 1050px; /* Thu hẹp chiều rộng khung */
    margin: 25px auto;
    padding: 0 12px;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

.az-section-header {
    text-align: center;
    margin-bottom: 20px;
}

/* --- GIAO DIỆN MẶC ĐỊNH CHO ĐIỆN THOẠI (Giữ nguyên màu tối mặc định) --- */
.az-section-header h2 {
    font-size: 22px; 
    color: #1a252f; /* Giữ nguyên màu mặc định trên điện thoại */
    margin-bottom: 6px;
    font-weight: 700;
}

.az-section-header p {
    font-size: 13.5px;
    color: #81de10;
    margin: 0;
}

/* --- GIAO DIỆN DÀNH RIÊNG CHO MÁY TÍNH (Màn hình lớn từ 1024px trở lên) --- */
@media (min-width: 1024px) {
    .az-section-header h2 {
        color: #adff2f; /* Đổi thành màu vàng xanh lá (GreenYellow) cho máy tính */
    }
}
/* Khối Lưới Card */
.az-subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* Card hẹp lại */
    gap: 15px; /* Giảm khoảng cách giữa các card */
}

/* Thẻ Môn Học */
.az-subject-card {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 16px 14px; /* Giảm padding bên trong thẻ */
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.07);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-top: 3.5px solid #0052cc;
    box-sizing: border-box;
}

.az-subject-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

/* Màu viền trên */
.az-card-red { border-top-color: #e74c3c; }
.az-card-purple { border-top-color: #9b59b6; }
.az-card-orange { border-top-color: #e67e22; }
.az-card-green { border-top-color: #2ecc71; }
.az-card-teal { border-top-color: #1abc9c; }
.az-card-blue { border-top-color: #3498db; }

.az-card-icon {
    font-size: 28px; /* Thu nhỏ icon */
    margin-bottom: 8px;
}

.az-subject-card h3 {
    font-size: 15px; /* Thu nhỏ tên môn học */
    color: #2c3e50;
    margin: 0 0 6px 0;
    font-weight: 600;
    line-height: 1.3;
}

.az-subject-card p {
    font-size: 12.5px; /* Thu nhỏ mô tả */
    color: #666;
    line-height: 1.45;
    margin: 0 0 14px 0;
    flex-grow: 1;
}

/* Khối Chứa 2 Nút */
.az-card-buttons {
    display: flex;
    flex-direction: column;
    gap: 7px; /* Giảm khoảng cách giữa 2 nút */
    width: 100%;
}

/* Style Chung Cho Nút */
.az-btn {
    display: block;
    width: 100%;
    padding: 7px 0; /* Thu nhỏ độ dày nút */
    text-align: center;
    text-decoration: none;
    font-size: 12.5px; /* Thu nhỏ chữ trên nút */
    font-weight: 600;
    border-radius: 5px;
    box-sizing: border-box;
    transition: background-color 0.2s ease;
}

/* Nút 1: Truy cập tài liệu */
.az-btn-main {
    background-color: #0052cc;
    color: #ffffff !important;
}

.az-btn-main:hover {
    background-color: #003e99;
}

/* Nút 2: Trọn bộ link Azota (Sale 50%) */
.az-btn-sale {
    background-color: #ff9800;
    color: #ffffff !important;
}

.az-btn-sale:hover {
    background-color: #e68a00;
}

