﻿/* ===== GLOBAL RESET / BASE ===== */
body {
    background-color: #f8f9fa;
}

.card {
    margin-bottom: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.card-header,
.card-footer {
    background-color: #fff;
    border-bottom: 1px solid #eee;
}

.card-title {
    font-weight: 600;
}

/* ===== FORM STYLING ===== */
.form-group {
    margin-bottom: 1rem;
}

.form-control,
.form-control-lg,
textarea {
    border-radius: 8px;
    font-size: 0.95rem;
}

textarea {
    min-height: 100px;
}

/* Labels */
label {
    font-weight: 500;
    margin-bottom: 0.3rem;
}

/* ===== BUTTONS ===== */
.btn {
    border-radius: 8px;
}

.card-footer .btn {
    margin-right: 0.5rem;
}

/* Stack buttons on small screens */
@media (max-width: 576px) {
    .card-footer {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

        .card-footer .btn {
            width: 100%;
        }
}

/* ===== TABLE RESPONSIVENESS ===== */
.table {
    background-color: #fff;
}

.table-responsive {
    overflow-x: auto;
}

/* Force horizontal scroll on small screens */
@media (max-width: 768px) {
    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Table images */
.img-thumbnail {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

/* ===== ACTION ROW FIX ===== */
td.row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ===== NAV LINKS ===== */
.nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

    .nav-links a {
        flex: 1;
        text-align: center;
    }

/* ===== ARTICLE GROUP SECTION ===== */
.ArticleGroup {
    background-color: #fff;
    border-radius: 10px;
}

/* ===== CATEGORY SELECT ===== */
.categories,
.SubCategories {
    border-radius: 8px;
}

/* ===== IMAGE CONTAINER ===== */
.img-container {
    text-align: center;
    margin-bottom: 1rem;
}

.main-image {
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
}

/* ===== CONTENT WRAPPER (2-COLUMN LAYOUT) ===== */
.content-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Desktop layout */
@media (min-width: 992px) {
    .content-wrapper {
        flex-direction: row;
    }

    .section-1 {
        flex: 2;
    }

    .section-2 {
        flex: 1;
        position: sticky;
        top: 20px;
    }
}

/* ===== EVERYTHING BOX (DYNAMIC CONTENT) ===== */
.everythingBox {
    background: #fff;
    border-radius: 10px;
    padding: 1rem;
    min-height: 120px;
}

/* ===== SMALL SCREEN TEXT IMPROVEMENTS ===== */
@media (max-width: 576px) {
    h1, h3, h4 {
        font-size: 1.2rem;
    }

    .card-title {
        font-size: 1rem;
    }
}

/* ===== BUTTON ICON ALIGNMENT ===== */
.fa {
    margin-right: 5px;
}

/* ===== SPACING UTILITIES ===== */
.p-5 {
    padding: 1.5rem !important;
}

.m-2 {
    margin: 0.5rem !important;
}

/* ===== FIX DOUBLE ROW ACTION BUTTONS ===== */
tbody tr:nth-child(even) td.row {
    display: flex;
    flex-wrap: wrap;
}

/* ===== MODAL CONTENT (if used) ===== */
.modal-content {
    border-radius: 12px;
}

/* ===== SCROLLABLE TABLE CONTAINER (OPTIONAL WRAP) ===== */
.table-wrapper {
    width: 100%;
    overflow-x: auto;
}
