/* ----------------------------------------------------------- */
/* VKF GLOBAL STYLE - KARATE VIỆT NAM                          */
/* ----------------------------------------------------------- */

:root {
    /* 1. Bảng màu hệ thống */
    --bg-dark: #000000;
    --bg-card: #1e1e1e;
    --accent-red: rgba(238, 32, 43, 0.9);
    --accent-red-glow: rgba(238, 32, 43, 0.4);
    --gold: #d4af37;
    --gold-shadow: rgba(212, 175, 55, 0.3);
    --silver: #c0c0c0;
    --bronze: #cd7f32;

    /* 2. Màu văn bản */
    --text-main: #f5f5f5;
    --text-muted: #a0a0a0;
    --white: #ffffff;

    /* 3. Border & Shadows */
    --border-subtle: rgba(255, 255, 255, 0.05);
    --shadow-sm: 0 4px 10px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 20px rgba(0, 0, 0, 0.3);

    /* 4. Cấu trúc Layout */
    --content-width: 85%;
    /* Ép 85% để chừa khoảng trống cho quảng cáo 2 bên */
    --header-height: 90px;
}

/* --- Base Reset --- */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
    /* Chống tràn ngang tuyệt đối */
    position: relative;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: 'Roboto', sans-serif;
    margin: 0;
}

/* --- Layout Container --- */
.container {
    width: var(--content-width) !important;
    max-width: 1440px !important;
    /* Giới hạn độ rộng tối đa trên màn hình cực lớn */
    margin: 0 auto !important;
}

/* --- Responsive Layout --- */
@media (max-width: 1360px) {
    .container {
        width: 95% !important;
        /* Màn hình nhỏ hơn thì giãn nội dung ra */
    }
}

@media (max-width: 768px) {
    .container {
        width: 100% !important;
        padding: 0 15px;
    }
}

/* ========================================================= */
/* ::::: QUẢNG CÁO TRƯỢT 2 BÊN (FLOATING ADS) :::::          */
/* ========================================================= */

.floating-ad-container {
    position: fixed;
    top: var(--header-height);
    /* Nằm ngay dưới Menu chính */
    width: 7vw;
    /* Chiều rộng linh hoạt theo màn hình */
    min-width: 120px;
    z-index: 2000;
    /* Dưới Header nếu Header > 2000, hoặc trên nếu cần */
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Định vị 2 bên */
.floating-ad-container.left-ad {
    left: 10px;
}

.floating-ad-container.right-ad {
    right: 10px;
}

/* Hình ảnh quảng cáo */
.floating-ad-container img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 6px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-ad-container img:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-md);
    border-color: var(--gold);
}

/* Ẩn quảng cáo trên các thiết bị không đủ không gian (Laptop nhỏ/Tablet/Mobile) */
@media (max-width: 1400px) {
    .floating-ad-container {
        display: none !important;
    }
}

/* ========================================================= */
/* ::::: KHUNG CHỜ QUẢNG CÁO (PLACEHOLDERS) :::::            */
/* ========================================================= */

/* Placeholder chung (Dạng cột dọc bên ngoài) */
.ad-placeholder {
    width: 100%;
    background-color: rgba(255, 255, 255, 0.02);
    border: 2px dashed rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 12px;
    padding: 15px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.ad-placeholder:hover {
    background-color: rgba(238, 32, 43, 0.05);
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.ad-placeholder strong {
    font-size: 13px;
    text-transform: uppercase;
    margin-bottom: 5px;
    display: block;
}

/* Placeholder Sidebar (Dạng vuông/ngang bên trong nội dung) */
.ad-placeholder-square {
    width: 100%;
    height: 250px;
    background-color: var(--bg-card);
    border: 2px dashed var(--border-subtle);
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    margin-bottom: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.ad-placeholder-square:hover {
    border-color: var(--gold);
    color: var(--gold);
    background-color: rgba(212, 175, 55, 0.05);
}

/* ========================================================= */
/* ::::: HIỆU ỨNG & TIỆN ÍCH (UTILS) :::::                   */
/* ========================================================= */

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.spin-icon {
    display: inline-block;
    animation: spin 4s linear infinite;
    color: var(--gold);
}

/* Page Title Utility */
.page-title.container {
    margin-top: 40px;
    margin-bottom: 30px;
}

@media (max-width: 992px) {
    .page-title.container {
        margin-top: 25px;
        margin-bottom: 20px;
    }
}

@media (max-width: 768px) {
    .page-title.container {
        margin-top: 20px;
        margin-bottom: 15px;
        padding: 0 15px;
    }
}