/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Use this child theme to extend Bricks.
 Author:       Bricks
 Author URI:   https://bricksbuilder.io/
 Template:     bricks
 Version:      1.1
 Text Domain:  bricks
*/
@media (max-width: 767px) {
	main#brx-content {
    overflow: hidden;
}
/*post*/
.css-post-main {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important; 
    gap: 40px 24px !important; 
}

.css-post-main .repeat-item {
    display: flex !important;
    flex-direction: column !important; 
    width: 100% !important;
    height: auto !important; 
    margin: 0 !important;
    padding: 0 !important;
}

.css-post-main .repeat-item .box-image {
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 10 !important; 
    overflow: hidden !important;
    border-radius: 16px !important;
}

.css-post-main .repeat-item .box-image img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    transition: transform 0.4s ease-in-out !important;
}

.css-post-main .repeat-item .box-content {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important; 
    height: auto !important;
    padding: 16px 0 0 0 !important; 
    gap: 12px !important;
}

.css-post-main .repeat-item:first-child {
    grid-column: 1 / -1 !important; 
    flex-direction: row !important; 
    align-items: center !important;
    background: #eef5fa !important;
    border-radius: 20px 0 0 20px !important; 
}

.css-post-main .repeat-item:first-child .box-image {
    width: 50% !important; 
    flex-shrink: 0 !important;
    border-radius: 20px 0 0 20px !important;
}

.css-post-main .repeat-item:first-child .box-content {
    width: 50% !important; 
    padding: 32px !important; 
}

.css-post-main .brxe-hhfttl {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    font-size: 13px !important;
}

.css-post-main .brxe-exoqdo a {
    color: #0066cc !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

.css-post-main .brxe-eyzqzp {
    color: #8a94a6 !important;
}
.css-post-main .css-text-pt {
    margin: 0 !important;
    font-size: 16px !important;
    line-height: 1.4 !important;
}

.css-post-main .repeat-item:first-child .css-text-pt {
    font-size: 24px !important; 
}

.css-post-main .css-text-pt a {
    color: var(--color-4) !important;
    text-decoration: none !important;
    font-weight: 700 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2; 
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease !important; 
}

.css-post-main .brxe-sfjwpf p {
    margin: 0 !important;
    color: #4d5761 !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.css-post-main .repeat-item:hover .box-image img {
    transform: scale(1.05) !important;
}

.css-post-main .repeat-item:hover .css-text-pt a {
    color: var(--color-1) !important;
    text-decoration: underline !important;
}


/*MOBILE & TABLET*/
@media (max-width: 991px) {
    .css-post-main {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important; 
    }
}

@media (max-width: 767px) {
    .css-post-main {
        grid-template-columns: 1fr !important; 
        gap: 30px !important;
    }
   
    .css-post-main .repeat-item:first-child {
        flex-direction: column !important;
        gap: 16px !important;
        padding: 0 !important;
        background: transparent !important;
        border-radius: 16px !important;
    }
    
    .css-post-main .repeat-item:first-child .box-image {
        width: 100% !important;
        border-radius: 16px !important; 
    }
    
    .css-post-main .repeat-item:first-child .box-content {
        width: 100% !important;
        padding: 0px !important;
    }
    
    .css-post-main .repeat-item:first-child .css-text-pt {
        font-size: 18px !important;
    }
}
	
/* Chỉ áp dụng riêng cho màn hình điện thoại dưới 768px và duy nhất bảng này */
@media screen and (max-width: 768px) {
    
    table.quynhonport-vessel-table {
        width: 100% !important;
        table-layout: fixed !important; 
        border-collapse: collapse !important;
        background: #ffffff !important;
        border-radius: 8px !important;
        overflow: hidden !important;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important; 
        border: 1px solid #eaeaea !important;
    }

    table.quynhonport-vessel-table tr th:nth-child(1), table.quynhonport-vessel-table tr td:nth-child(1) { width: 8% !important; }   
    table.quynhonport-vessel-table tr th:nth-child(2), table.quynhonport-vessel-table tr td:nth-child(2) { width: 30% !important; }  
    table.quynhonport-vessel-table tr th:nth-child(3), table.quynhonport-vessel-table tr td:nth-child(3) { width: 18% !important; }  
    table.quynhonport-vessel-table tr th:nth-child(4), table.quynhonport-vessel-table tr td:nth-child(4) { width: 24% !important; }  
    table.quynhonport-vessel-table tr th:nth-child(5), table.quynhonport-vessel-table tr td:nth-child(5) { width: 20% !important; } 

    table.quynhonport-vessel-table td, table.quynhonport-vessel-table th {
        padding: 6px 4px !important;
        font-size: 11px !important; 
        line-height: 1.3 !important;
        word-break: break-word !important; 
        text-align: left !important;
        border-bottom: 1px solid #f0f0f0 !important;
        border-right: none !important; 
    }

    table.quynhonport-vessel-table td h4, table.quynhonport-vessel-table td strong {
        font-size: 11px !important;
        margin: 0 !important;
        font-weight: 600 !important;
        color: #333333 !important;
    }

    table.quynhonport-vessel-table tr:first-child td {
        background-color: #f8f9fa !important;
        border-bottom: 2px solid #e2e8f0 !important;
    }

    table.quynhonport-vessel-table tr td:last-child {
        white-space: nowrap !important; 
        text-align: center !important;
        color: #2b6cb0 !important;
        font-weight: 500 !important;
    }
        table.quynhonport-vessel-table tbody tr:nth-child(even) {
        background-color: #fafafa !important;
    }
}
	/**/
	/* --- KHUNG BỌC NGOÀI (CONTAINER) --- */
.port-table-wrapper {
  width: 100% !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  margin: 25px 0 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
}

/* --- CẤU TRÚC BẢNG CHÍNH --- */
table.port-schedule-table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 14px !important;
  line-height: 1.6 !important;
  color: #1e293b !important;
  background-color: #ffffff !important;
}

/* Ép màu đường kẻ mảnh chuẩn hiện đại */
table.port-schedule-table th,
table.port-schedule-table td {
  border: 1px solid #cbd5e1 !important;
  padding: 12px 10px !important;
  vertical-align: middle !important;
  box-sizing: border-box !important;
  background-clip: padding-box !important;
}

table.port-schedule-table thead tr,
table.port-schedule-table thead tr th {
  background-color: #004f9e !important;
  color: #ffffff !important;
}

table.port-schedule-table th {
  font-weight: 700 !important;
  text-align: center !important;
  text-transform: uppercase !important;
  font-size: 13.5px !important;
  letter-spacing: 0.5px !important;
}

table.port-schedule-table thead .sub-th,
table.port-schedule-table thead .sub-th-group {
  border-top: 1px solid rgba(255, 255, 255, 0.25) !important;
  font-size: 12px !important;
}

table.port-schedule-table tbody td {
  color: #1e293b !important;
}

/* Các hàng tiêu đề nhóm lớn (I, II, III, IV) */
table.port-schedule-table tr.row-section,
table.port-schedule-table tr.row-section td {
  background-color: #f8fafc !important; /* Tạo nền xám nhẹ cho dòng tiêu đề nhóm tách biệt */
  color: #004f9e !important; /* Đổi chữ tiêu đề nhóm sang màu xanh cho đẹp và nổi bật */
  font-weight: 700 !important;
  font-size: 15px !important;
  text-align: center !important;
}

/* Cột Loại Hàng và số liệu cần làm đậm */
table.port-schedule-table td.text-main,
table.port-schedule-table td.font-semibold {
  font-weight: 700 !important;
  color: #0f172a !important;
}

/* Phần chữ mô tả nhỏ phụ thuộc */
table.port-schedule-table .text-desc {
  font-size: 13px !important;
  color: #64748b !important;
  font-weight: 400 !important;
  display: inline-block !important;
  margin-top: 3px !important;
}

/* --- TỐI ƯU GIAO DIỆN MÁY TÍNH (DESKTOP >= 769px) --- */
@media (min-width: 769px) {
  table.port-schedule-table {
    white-space: normal !important;
    table-layout: fixed !important; /* Khóa cứng tỷ lệ cột */
  }

  /* Phân chia tỷ lệ % full màn hình máy tính */
  .col-stt { width: 4% !important; }
  .col-type { width: 26% !important; }
  .col-operation { width: 18% !important; }
  .col-performance { width: 40% !important; }
  .sub-th-group { width: 10% !important; }
  .col-note { width: 12% !important; }

  /* Hiệu ứng hover dòng trên máy tính */
  table.port-schedule-table tbody tr:not(.row-section):hover td {
    background-color: #f1f5f9 !important;
    transition: background-color 0.15s ease !important;
  }
}

/* --- TỐI ƯU GIAO DIỆN ĐIỆN THOẠI (MOBILE <= 768px) --- */
@media (max-width: 768px) {
  table.port-schedule-table {
    white-space: nowrap !important; /* Ép cuộn ngang trên mobile */
    font-size: 12.5px !important;
  }

  table.port-schedule-table th,
  table.port-schedule-table td {
    padding: 10px 8px !important;
  }

  /* Chiều rộng tối thiểu trên mobile để kích hoạt cuộn ngang mượt mà */
  .col-stt { min-width: 45px !important; }
  .col-type { min-width: 190px !important; white-space: normal !important; } 
  .col-operation { min-width: 140px !important; white-space: normal !important; }
  .sub-th-group { min-width: 75px !important; }
  .col-note { min-width: 140px !important; white-space: normal !important; }
}

/* --- UTILITY CLASSES --- */
.text-center { text-align: center !important; }

/* Thanh cuộn ngang tinh tế */
.port-table-wrapper::-webkit-scrollbar {
  height: 6px !important;
}
.port-table-wrapper::-webkit-scrollbar-track {
  background: #f1f5f9 !important;
}
.port-table-wrapper::-webkit-scrollbar-thumb {
  background: #cbd5e1 !important;
  border-radius: 3px !important;
}
.port-table-wrapper::-webkit-scrollbar-thumb:hover {
  background: #94a3b8 !important;
}