/* assets/css/main.css */

/* ===== CSS RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* ===== BASE STYLES ===== */
html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    transition: color 0.2s ease;
}

/* ===== CONTAINER SYSTEM ===== */
.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.container-fluid {
    width: 100%;
    padding: 0 20px;
}

.container-wide {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== TYPOGRAPHY ===== */
h1 { font-size: clamp(1.8rem, 5vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
h3 { font-size: clamp(1.2rem, 3vw, 1.5rem); }
h4 { font-size: clamp(1rem, 2.5vw, 1.2rem); }
h5 { font-size: clamp(0.9rem, 2vw, 1rem); }
h6 { font-size: clamp(0.8rem, 1.5vw, 0.9rem); }
p { font-size: clamp(0.9rem, 2vw, 1rem); }

/* ===== FLEXBOX UTILITIES ===== */
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.flex-column { flex-direction: column; }
.flex-row { flex-direction: row; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-around { justify-content: space-around; }
.justify-start { justify-content: flex-start; }
.justify-end { justify-content: flex-end; }

.gap-5 { gap: 5px; }
.gap-10 { gap: 10px; }
.gap-15 { gap: 15px; }
.gap-20 { gap: 20px; }
.gap-25 { gap: 25px; }
.gap-30 { gap: 30px; }
.gap-40 { gap: 40px; }

.flex-grow-0 { flex-grow: 0; }
.flex-grow-1 { flex-grow: 1; }
.flex-grow-2 { flex-grow: 2; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-shrink-1 { flex-shrink: 1; }

/* ===== GRID SYSTEM ===== */
.grid {
    display: grid;
    gap: 20px;
}

.grid-1 { grid-template-columns: repeat(1, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-auto { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* ===== SPACING UTILITIES ===== */
.m-0 { margin: 0; }
.m-10 { margin: 10px; }
.m-20 { margin: 20px; }
.m-30 { margin: 30px; }
.m-40 { margin: 40px; }

.p-0 { padding: 0; }
.p-10 { padding: 10px; }
.p-15 { padding: 15px; }
.p-20 { padding: 20px; }
.p-25 { padding: 25px; }
.p-30 { padding: 30px; }
.p-40 { padding: 40px; }

.mt-0 { margin-top: 0; }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }
.mt-50 { margin-top: 50px; }

.mb-0 { margin-bottom: 0; }
.mb-10 { margin-bottom: 10px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }
.mb-50 { margin-bottom: 50px; }

.ml-0 { margin-left: 0; }
.ml-10 { margin-left: 10px; }
.ml-20 { margin-left: 20px; }
.ml-30 { margin-left: 30px; }

.mr-0 { margin-right: 0; }
.mr-10 { margin-right: 10px; }
.mr-20 { margin-right: 20px; }
.mr-30 { margin-right: 30px; }

.pt-0 { padding-top: 0; }
.pt-10 { padding-top: 10px; }
.pt-20 { padding-top: 20px; }
.pt-30 { padding-top: 30px; }
.pt-40 { padding-top: 40px; }

.pb-0 { padding-bottom: 0; }
.pb-10 { padding-bottom: 10px; }
.pb-20 { padding-bottom: 20px; }
.pb-30 { padding-bottom: 30px; }
.pb-40 { padding-bottom: 40px; }

/* ===== WIDTH UTILITIES ===== */
.w-100 { width: 100%; }
.w-75 { width: 75%; }
.w-50 { width: 50%; }
.w-25 { width: 25%; }
.w-20 { width: 20%; }
.w-30 { width: 30%; }
.w-40 { width: 40%; }
.w-60 { width: 60%; }
.w-auto { width: auto; }

/* ===== CARD STYLES ===== */
.card {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 20px;
    height: 100%;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e5e5e5;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.card-header {
    border-bottom: 2px solid #EA580C;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #15803D;
}

/* ===== BUTTON STYLES ===== */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
    font-size: 0.95rem;
    line-height: 1.5;
    text-align: center;
}

.btn-primary {
    background-color: #15803D;
    color: white;
}

.btn-primary:hover {
    background-color: #0e6c2d;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(21, 128, 61, 0.2);
}

.btn-secondary {
    background-color: #EA580C;
    color: white;
}

.btn-secondary:hover {
    background-color: #c2410c;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(234, 88, 12, 0.2);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid #15803D;
    color: #15803D;
}

.btn-outline:hover {
    background-color: #15803D;
    color: white;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.1rem;
}

/* ===== FORM ELEMENTS ===== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #EA580C;
    box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.1);
}

.form-select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    background-color: white;
    cursor: pointer;
}

.form-select:focus {
    outline: none;
    border-color: #EA580C;
    box-shadow: 0 0 0 2px rgba(234, 88, 12, 0.1);
}

.form-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

/* ===== BREADCRUMB ===== */
.breadcrumb {
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
    padding: 10px 0;
}

.breadcrumb-link {
    color: #EA580C;
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-link:hover {
    color: #c2410c;
    text-decoration: underline;
}

/* ===== PAGE HEADER ===== */
.page-header {
    margin-bottom: 30px;
}

.page-title {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 10px;
    color: #000000;
    border-bottom: 3px solid #EA580C;
    padding-bottom: 10px;
}

.page-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    color: #666;
    line-height: 1.6;
}

/* ===== ALERTS ===== */
.alert {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* ===== LOADING SPINNER ===== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #15803D;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

.spinner-sm {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

.spinner-lg {
    width: 60px;
    height: 60px;
    border-width: 5px;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    padding: 30px;
    position: relative;
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 2rem;
    cursor: pointer;
    color: #000;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== COLOR UTILITIES ===== */
.text-green { color: #15803D; }
.text-orange { color: #EA580C; }
.text-white { color: #ffffff; }
.text-black { color: #000000; }
.text-gray { color: #666; }
.text-light { color: #999; }

.bg-green { background-color: #15803D; }
.bg-orange { background-color: #EA580C; }
.bg-white { background-color: #ffffff; }
.bg-light { background-color: #f8f9fa; }
.bg-dark { background-color: #1a1a1a; }

.border-green { border-color: #15803D; }
.border-orange { border-color: #EA580C; }

/* ===== BORDER UTILITIES ===== */
.border { border: 1px solid #e5e5e5; }
.border-top { border-top: 1px solid #e5e5e5; }
.border-bottom { border-bottom: 1px solid #e5e5e5; }
.border-left { border-left: 1px solid #e5e5e5; }
.border-right { border-right: 1px solid #e5e5e5; }

.border-left-green { border-left: 4px solid #15803D; }
.border-left-orange { border-left: 4px solid #EA580C; }

/* ===== BORDER RADIUS ===== */
.rounded { border-radius: 4px; }
.rounded-lg { border-radius: 8px; }
.rounded-circle { border-radius: 50%; }

/* ===== SHADOW ===== */
.shadow { box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.shadow-lg { box-shadow: 0 4px 8px rgba(0,0,0,0.15); }
.shadow-none { box-shadow: none; }

/* ===== TEXT ALIGNMENT ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-justify { text-align: justify; }

/* ===== FONT WEIGHT ===== */
.fw-light { font-weight: 300; }
.fw-normal { font-weight: 400; }
.fw-medium { font-weight: 500; }
.fw-bold { font-weight: 600; }
.fw-bolder { font-weight: 700; }

/* ===== DISPLAY ===== */
.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* ===== POSITION ===== */
.position-relative { position: relative; }
.position-absolute { position: absolute; }
.position-fixed { position: fixed; }
.position-sticky { position: sticky; }

/* ===== TABLE TEXT TRANSFORMATION UTILITIES ===== */
/* .table-text-sm {
    font-size: 11px;
} */

.table-text-sm td,
.table-text-sm th {
    text-transform: lowercase;
}

.table-text-sm td::first-letter,
.table-text-sm th::first-letter {
    text-transform: uppercase;
}

.text-sentence-case {
    text-transform: lowercase;
}

.text-sentence-case::first-letter {
    text-transform: uppercase;
}

.text-preserve-case {
    text-transform: none !important;
}

.table-cell-with-icon {
    display: flex;
    align-items: center;
    gap: 10px;
}

.table-cell-with-icon .file-icon,
.table-cell-with-icon [class*="icon"] {
    text-transform: none;
    /* font-size: 14px; */
}

/* Table header sort indicators */
th .sortable {
    cursor: pointer;
    position: relative;
    padding-right: 20px;
}

th .sortable:after {
    content: '↕️';
    position: absolute;
    right: 0;
    opacity: 0.5;
    /* font-size: 10px; */
}

th .sortable.asc:after {
    content: '↑';
    opacity: 1;
}

th .sortable.desc:after {
    content: '↓';
    opacity: 1;
}

/* Compact table variant */
.table-compact td,
.table-compact th {
    padding: 8px 12px;
}

/* Borderless table variant */
.table-borderless td,
.table-borderless th {
    border: none;
}

.table-borderless tbody tr {
    border-bottom: 1px solid #e9ecef;
}

.table-borderless tbody tr:last-child {
    border-bottom: none;
}

/* Hidden class for tabs */
.hidden {
    display: none !important;
}

/* Tab button active state */
.tab-button-active {
    background-color: #15803D !important;
    color: #ffffff !important;
}

/* News card variants */
.news-card-green {
    border-left-color: #15803D;
}

.news-card-orange {
    border-left-color: #EA580C;
}

/* Category badge variants */
.category-badge-green {
    background-color: #15803D;
}

.category-badge-orange {
    background-color: #EA580C;
}

/* Action button variants */
.action-button-view {
    background-color: #EA580C;
}

.action-button-download {
    background-color: #15803D;
}

/* Carousel indicator active state */
.carousel-indicator-active {
    background-color: #ffffff;
}

/* Add to main.css in the appropriate section, e.g., after BUTTON STYLES */

/* ===== ACTION BUTTONS ===== */
.action-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    width: 100%;
}

.action-buttons.left {
    justify-content: flex-start;
}

.action-buttons.center {
    justify-content: center;
}

.action-buttons.right {
    justify-content: flex-end;
}

.action-buttons a,
.action-buttons button {
    display: inline-block;
    padding: 8px 16px;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 11px;
    text-decoration: none;
    text-align: center;
    transition: all 0.2s;
    min-width: 80px;
}

.action-buttons a:hover,
.action-buttons button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.action-buttons .btn-view {
    background-color: #EA580C;
}

.action-buttons .btn-view:hover {
    background-color: #c2410c;
}

.action-buttons .btn-download {
    background-color: #15803D;
}

.action-buttons .btn-download:hover {
    background-color: #0e6c2d;
}

/* Mobile adjustments for action buttons */
@media (max-width: 768px) {
    .action-buttons {
        justify-content: flex-start;
    }
    
    .action-buttons a,
    .action-buttons button {
        flex: 1;
        min-width: 0;
        padding: 12px !important;
    }
}

@media (max-width: 480px) {
    .action-buttons {
        flex-direction: column;
    }
    
    .action-buttons a,
    .action-buttons button {
        width: 100%;
    }
}