/* M35 — Frontend styles (clone rút gọn từ M Tự Hào) */

.text_11{
font-size: 24px;
-webkit-text-stroke-width: 1.5px;
    -webkit-text-stroke-color: #BF4C00;
  background: -webkit-linear-gradient(#FFF9D4, #FFEF85);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.tab11{ border-radius:13px; border: 6px solid rgb(255 255 255 / 40%);  }

.tab11 p{ font-size:12px; }

.tab11 .e-n-tab-title-text{ text-transform:uppercase;font-weight: bold;
    color: #3F0000; }
.tab11 .e-n-tabs-heading button{ width:33% }
.m35_banner{ position:relative; }
@media (min-width: 769px) {
    .main11{ position:absolute!important; left:0; bottom:0; }
}
.c35gd-m35-wrap {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0 16px 16px 16px;
    font-family: inherit;
    box-sizing: border-box;
}

/* Notices */
.c35gd-m35-notice {
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
}
.c35gd-m35-notice--error   { background: #fff0f0; border-left: 4px solid #e00; color: #c00; }
.c35gd-m35-notice--success { background: #f0fff0; border-left: 4px solid #0a0; color: #060; }
.c35gd-m35-notice--info    { background: #f0f4ff; border-left: 4px solid #36f; color: #235; }

/* Form */
.c35gd-m35-form { max-width: 640px; }
.c35gd-m35-form__group { margin-bottom: 14px; }
.c35gd-m35-form__label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 14px;
}
.c35gd-m35-form__group input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color .2s;
}
.c35gd-m35-form__group input:focus {
    border-color: #e05c00;
    outline: none;
    box-shadow: 0 0 0 3px rgba(224,92,0,.12);
}
.c35gd-m35-form__group small { font-size: 12px; color: #777; }
.c35gd-m35-required { color: #e00; }

/* Avatar preview */
.c35gd-m35-image-preview {
    position: relative;
    display: inline-block;
    margin-top: 10px;
}
.c35gd-m35-image-preview img {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid #e5e5e5;
    display: block;
}
.c35gd-m35-close-btn{ background: black; }
.c35gd-m35-image-remove,#c35gd-m35-remove-image {
    position: absolute;
    top: -8px;
    padding: 0;
    right: -8px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #e00;
    color: #fff;
    border: none;
    cursor: pointer;
    line-height: 1;
    font-size: 14px;
}

/* Buttons */
.c35gd-m35-btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: background .2s, transform .1s;
}
.c35gd-m35-btn--submit {
    background: #e05c00;
    color: #fff;
    width: 100%;
    text-align: center;
    font-size: 15px;
    padding: 12px;
}
.c35gd-m35-btn--submit:hover { background: #c44d00; }
.c35gd-m35-btn--submit:disabled { background: #aaa; cursor: not-allowed; }

/* Filters */
.c35gd-m35-filters { margin-bottom: 20px; }
.c35gd-m35-filters__row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
}
.c35gd-m35-select {
    appearance: none;
    -webkit-appearance: none;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23E84C1E' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    border: none;
    border-radius: 50px;
    padding: 10px 36px 10px 18px;
    font-size: 14px;
    color: #888;
    min-width: 180px;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
.c35gd-m35-select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(232,76,30,0.3);
}
.c35gd-m35-input {
    border: none;
    outline: none;
    padding: 10px 18px;
    font-size: 14px;
    color: #333;
    border-radius: 50px;
    background: #fff;
    min-width: 180px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* Grid */
.c35gd-m35-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

/* Card */
.c35gd-m35-card {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    display: flex;
    flex-direction: column;
    cursor: pointer;
}
.c35gd-m35-card__media {
    width: 100%;
    aspect-ratio: 1 / 1;
    background: #f0f0f0;
    overflow: hidden;
}
.c35gd-m35-card__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.c35gd-m35-card__body { padding: 12px 14px; }
.c35gd-m35-card__meta { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.c35gd-m35-card__name  { font-size: 14px; }
.c35gd-m35-card__donvi { font-size: 12px; color: #777; }
.c35gd-m35-card__time  { font-size: 11px; color: #aaa; }
.c35gd-m35-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
}
.c35gd-m35-fb-link {
    display: inline-block;
    font-size: 13px;
    font-weight: 600;
    color: #1877f2;
    text-decoration: none;
}
.c35gd-m35-fb-link:hover { text-decoration: underline; }

/* Like button — mỗi user chỉ được tim 1 bài duy nhất, đã tim không thể hủy */
.c35gd-m35-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 13px;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .2s, color .2s, border-color .2s;
    color: #555;
}
.c35gd-m35-like-btn:hover:not(:disabled) {
    background: #fff0ec;
    border-color: #e05c00;
    color: #e05c00;
}
.c35gd-m35-like-btn.liked,
.c35gd-m35-like-btn:disabled {
    cursor: not-allowed;
}
.c35gd-m35-like-btn.liked {
    background: #fff0ec;
    border-color: #e05c00;
    color: #e05c00;
}
.c35gd-m35-heart-icon { font-size: 14px; }

/* Pagination */
.c35gd-m35-pagination { text-align: center; margin-top: 16px; }
.c35gd-m35-page-btn {
    margin: 3px;
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
}
.c35gd-m35-page-btn.active { background: #e05c00; color: #fff; border-color: #e05c00; }

.c35gd-m35-loading, .c35gd-m35-empty { text-align: center; color: #888; padding: 40px 0; }

/* ============================================================
   Masonry — JS-driven, dùng position absolute
   ============================================================ */
.c35gd-m35-masonry {
    position: relative !important;
    display: block !important;
    overflow: visible !important;
    margin: 0 !important;
}
.c35gd-m35-masonry > .c35gd-m35-masonry__item {
    position: absolute !important;
    box-sizing: border-box !important;
    padding: 10px;
}
.c35gd-m35-masonry .c35gd-m35-card {
    height: auto;
    width: 100%;
    margin: 0;
}
.c35gd-m35-masonry .c35gd-m35-card__media {
    aspect-ratio: unset;
    height: auto;
}
.c35gd-m35-masonry .c35gd-m35-card__image {
    width: 100%;
    height: auto;
    object-fit: unset;
    display: block;
}

/* ============================================================
   Popup chi tiết bài dự thi
   ============================================================ */
body.c35gd-m35-modal-open { overflow: hidden; }

.c35gd-m35-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.c35gd-m35-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.6);
}
.c35gd-m35-modal__content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 420px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 1;
}
.c35gd-m35-modal__close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.5);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}
.c35gd-m35-modal__media {
    width: 100%;
    background: #fff;
    padding: 10px;
}
.c35gd-m35-modal__media img {
    width: 100%;
    height: auto;
    display: block;
}
.c35gd-m35-modal__body { padding: 16px 20px 20px; }
.c35gd-m35-modal__name { display: block; font-size: 16px; }
.c35gd-m35-modal__donvi { display: block; font-size: 13px; color: #777; margin-top: 2px; }
.c35gd-m35-modal__actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}

/* Responsive */
@media (max-width: 600px) {
    .c35gd-m35-grid { grid-template-columns: 1fr; }
    .c35gd-m35-filters__row { flex-direction: column; align-items: stretch; }
    .c35gd-m35-select { width: 100%; }
    .c35gd-m35-input { width: 100%; }
    .tab11 .elementor-widget-image-box .elementor-image-box-wrapper{ display:flex; }
}
