/* Profile Page Styles */

/* Entity Profile View - Centered Tabs */
.entity-tabs-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 2rem 0;
    padding: 0 1rem;
}

.entity-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: auto;
    margin: 0 auto;
    gap: 10px;
}

.entity-tab {
    padding: 12px 32px;
    border: none;
    background: transparent;
    color: #6c757d;
    font-weight: 600;
    font-size: 1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 140px;
    text-align: center;
    white-space: nowrap;
}

.entity-tab:hover {
    background: rgba(196, 30, 50, 0.1);
    color: #C41E32;
}

.entity-tab.active {
    background: #C41E32;
    color: white;
    box-shadow: 0 2px 4px rgba(196, 30, 50, 0.3);
}

.profile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.entity-follow-button {
    all: unset;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    color: #C41E32;
    border: 2px solid #C41E32;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.3s ease, opacity 0.2s ease;
    box-shadow: 0 12px 24px rgba(196, 30, 50, 0.22);
    font-size: 14px;
}

.entity-follow-button::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    border: 2px solid transparent;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.entity-follow-button:hover {
    background: #C41E32;
    box-shadow: 0 16px 32px rgba(163, 28, 46, 0.32);
    color: #fff;
}

.entity-follow-button:hover::after {
    opacity: 1;
}

.entity-follow-button:focus-visible {
    outline: 3px solid rgba(196, 30, 50, 0.35);
    outline-offset: 4px;
}

.entity-follow-button:disabled {
    cursor: wait;
    opacity: 0.75;
    box-shadow: none;
    transform: none;
}

.entity-follow-feedback {
    font-size: 0.95rem;
    color: var(--dark-gray);
    font-weight: 500;
    min-height: 1.2em;
    margin: 0.1rem 0 1.2rem;
    text-align: right;
}

.entity-follow-feedback.success {
    color: #22a26d;
}

.entity-follow-feedback.error {
    color: #C41E32;
}
button.entity-follow-button.is-following {
    background: #C41E32;
    color: white;
}

/* Dynamic List Section */
.dynamic-list-section {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.dynamic-list-container {
    display: none;
}

.dynamic-list-container.active {
    display: block;
}

/* News Grid Layout - EXACT match from listing-pages.css */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
    margin-bottom: 50px;
}

/* Responsive Grid - EXACT match */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (min-width: 1025px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 35px;
    }
}

/* News Item Card - EXACT match from listing-pages.css */
.news-item {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.2);
    position: relative;
}

.news-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.news-item:hover::before {
    opacity: 1;
}

/* News Thumbnail - EXACT match */
.news-thumbnail {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    border-radius: 16px 16px 0 0;
}

.news-thumbnail::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(52, 152, 219, 0.1), rgba(41, 128, 185, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.news-item:hover .news-thumbnail::after {
    opacity: 1;
}

.news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.news-item:hover .news-thumbnail img {
    transform: scale(1.08);
}

.news-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
    position: relative;
    z-index: 1;
}

/* News Content - EXACT match */
.news-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.news-content h2 {
    margin: 0 0 18px 0;
    line-height: 1.2;
    color: var(--dark-gray);
}

.news-content h2 a {
    color: var(--dark-gray);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.news-content h2 a:hover {
    text-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.news-content p {
    color: #5a6c7d;
    font-size: 15px;
    line-height: 1.6;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    font-weight: 500;
    margin: 0;
}

.news_user_role {
    display: inline-block;
    background: #e9ecef;
    color: #6c757d;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.activity-date, .news-date {
    color: var(--gray-500);
    font-size: 0.85rem;
    font-weight: 700;
    margin-top: 0.5rem;
    padding-top: 0;
}

/* Read More Button - EXACT match */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    color: var(--primary-red);
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    align-self: flex-start;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
    background: #fff;
    padding: 6px 12px; 
    border-radius: 5px; 
    text-align: center;
    border:1px solid var(--primary-red);
    margin-top: 0.5rem;
}

.read-more-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.read-more-btn:hover::before {
    left: 100%;
}

.read-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(142, 143, 144, 0.4);
}

.read-more-btn:active {
    transform: translateY(0);
}

/* No Content Message */
.no-content {
    text-align: center;
    padding: 3rem 1rem;
    color: #6c757d;
    font-size: 1.1rem;
    grid-column: 1 / -1;
}

/* Pagination Styles - EXACT match from listing-pages.css */
.news-pagination {
    text-align: center;
    margin-top: 60px;
    padding: 30px 0;
}

.news-pagination a,
.news-pagination span {
    display: inline-block;
    margin: 0 8px;
    padding: 12px 18px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    color: #5a6c7d;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.news-pagination a:hover {
    background: var(--primary-red);
    color: #fff;
    border-color: var(--primary-red);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}

.news-pagination .current {
    background: var(--primary-red);
    color: #fff;
    border-color: var(--primary-red);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.news-pagination .prev,
.news-pagination .next {
    font-weight: 700;
    padding: 12px 20px;
}

.news-pagination .prev:hover,
.news-pagination .next:hover {
    transform: translateY(-2px) scale(1.05);
}

/* Responsive adjustments for tabs */
@media (max-width: 768px) {
    .entity-tabs-container {
        padding: 0 0.5rem;
        margin: 1.5rem 0;
    }
    
    .entity-tab {
        padding: 10px 20px;
        min-width: 120px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .entity-tabs {
        width: 100%;
        max-width: 300px;
    }
    
    .entity-tab {
        flex: 1;
        min-width: auto;
        padding: 12px 16px;
    }
}

/* Profile Page Layout */
.profile-page {
    padding: 2rem 0;
}

/* Main Content Container */
.main-content {
    max-width: 1200px;
    margin: 3rem auto;
    padding: 0 1rem;
}


/* Profile Section */
.youth-three-column-layout {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr; /* 3 columns: left, middle, right */
    gap: 2rem; /* spacing between columns */
    align-items: start;
}

.youth-column {
    display: flex;
    flex-direction: column;
}

/* Barcode Section Styles */
.barcode-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left: 1rem;
}

.barcode-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: var(--gray-50);
    position: relative;
}

.barcode-container:hover {
    background: var(--white);
    border-color: var(--primary-red);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.qrcode {
    width: 120px;
    height: 120px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrcode canvas {
    width: 120px !important;
    height: 120px !important;
    border-radius: var(--border-radius);
    display: block;
}

.qrcode.qrcode-fallback {
    width: 120px;
    height: 120px;
    border-radius: var(--border-radius);
    object-fit: contain;
}

.barcode-label {
    font-family: var(--font-arabic);
    font-size: 0.75rem !important;
    font-weight: 600;
    color: var(--gray-600);
    margin: 0.25rem 0 0 0;
    text-align: center;
    line-height: 1.2;
}

.barcode-container:hover .barcode-label {
    color: var(--primary-red);
}

/* Download QR Code Button */
.download-qr-btn {
    background: var(--primary-red);
    border: none;
    border-radius: 8px;
    padding: 8px 16px;
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(220, 38, 38, 0.3);
    align-self: center;
    gap: 6px;
    color: white;
    font-size: 14px;
    font-weight: 500;
}

.download-qr-btn:hover {
    /* background: var(--red-700); */
    transform: scale(1.1);
    /* box-shadow: 0 4px 8px rgba(220, 38, 38, 0.4); */
}

.download-qr-btn:active {
    transform: scale(0.95);
}

.download-qr-btn svg {
    color: white;
    transition: color 0.3s ease;
}

.download-qr-btn:hover svg {
    color: white;
}

/* Profile Actions Layout Update */
.profile-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
    width: 100%;
    clear: both;
    text-align: left;
}

.profile-section {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.profile-info {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    margin-bottom: 1.5rem;
    display: grid;
}

.profile-image {
    flex-shrink: 0;
    text-align: center;
}

.profile-pic {
    object-fit: contain;
    border-radius: var(--border-radius);
    border: 2px solid var(--gray-200);
    box-shadow: var(--shadow-sm);
}

.profile-details {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    min-width: 0;
}

.profile-name {
    font-family: var(--font-arabic);
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
}

.profile-field {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-100);
    min-height: 2.5rem;
}

.profile-field:last-child {
    border-bottom: none;
}

.field-label {
    font-family: var(--font-arabic);
    font-weight: 600;
    color: var(--gray-700);
    min-width: 120px;
    flex-shrink: 0;
    font-size: 0.95rem;
    text-align: right;
}
[dir="ltr"] .field-label {
    text-align: left;
}

.field-value {
    font-family: var(--font-arabic);
    color: var(--gray-800);
    font-weight: 500;
    flex: 1;
    word-break: break-word;
    line-height: 1.5;
    min-height: 1.2rem;
    display: block;
    font-size: 0.95rem;
}

/* Profile Description Section */
.profile-description-section {
    margin-top: 0;
    padding: 1.5rem;
    background: var(--gray-50);
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    border-right: 4px solid var(--primary-red);
}
[dir="ltr"] .profile-description-section {
    border-left: 4px solid var(--primary-red);
    border-right: unset;
}
.profile-description {
    font-family: var(--font-arabic);
    color: var(--gray-800);
    line-height: 1.6;
    margin: 0;
    font-size: 1rem;
    text-align: right;
}

[dir="ltr"] .profile-description {
    text-align: left;
}
/* Special styling for description field (when used as a field) */
.profile-field.profile-description {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
    padding: 0.5rem;
    margin-bottom: 0.25rem;
}

.profile-field.profile-description .field-label {
    min-width: auto;
    font-size: 0.9rem;
    color: var(--primary-red);
    font-weight: 700;
}

.profile-field.profile-description .field-value {
    font-style: italic;
    color: var(--gray-700);
    background: var(--gray-50);
    padding: 0.5rem;
    line-height: 1.5;
}

.profile-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
    width: 100%;
    clear: both;
    text-align: left;
}

.edit-profile-btn {
    background: var(--white);
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
    padding: 0.75rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
}

.edit-profile-btn:hover {
    background: var(--primary-red);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.edit-profile-btn svg {
    width: 20px;
    height: 20px;
}

/* Content Area */
.content-area {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
}

/* Sidebar */
.sidebar {
    background: var(--gray-50);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    height: fit-content;
}

.sidebar-tabs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-tab {
    font-family: var(--font-arabic);
    background: transparent;
    color: var(--gray-600);
    border: none;
    padding: 1rem;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-align: right;
}

.sidebar-tab.active,
.sidebar-tab:hover {
    background: var(--primary-red);
    color: var(--white);
}

/* Content Tables */
.content-tables {
    position: relative;
}

.table-container {
    display: none;
}

.table-container.active {
    display: block;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

.table-header h3 {
    font-family: var(--font-arabic);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.add-btn {
    font-family: var(--font-arabic);
    background: var(--white);
    color: var(--primary-red);
    border: 1px solid var(--primary-red);
    padding: 0rem 1rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.add-btn:hover {
    background: var(--primary-red);
    color: var(--white);
    transform: translateY(-1px);
}

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-200);
    width: 100%;
    margin: 0;
    padding: 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    table-layout: fixed; /* Fixed table layout for consistent column widths */
    min-width: 100%; /* Ensure table takes full width */
    margin: 0;
    padding: 0;
}

.data-table th {
    font-family: var(--font-arabic);
    background: var(--gray-100);
    color: var(--gray-700);
    font-weight: 600;
    padding: 0.75rem 0.25rem;
    text-align: right;
    border-bottom: 2px solid var(--gray-200);
    white-space: nowrap;
}

.data-table td {
    font-family: var(--font-arabic);
    padding: 0.75rem 0.25rem;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-800);
    text-align: right;
}

.data-table tr:hover {
    background: var(--gray-50);
}

/* Table Column Widths */
.data-table th:nth-child(1),
.data-table td:nth-child(1) {
    width: 5%; /* ID column - minimal width */
    text-align: center;
    padding: 0.75rem 0.25rem;
}

.data-table th:nth-child(2),
.data-table td:nth-child(2) {
    width: 50%; /* Title column - reduced width */
    word-break: break-word;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 0.75rem 0.5rem;
}

.data-table th:nth-child(3),
.data-table td:nth-child(3) {
    width: 10%; /* Status column - minimal width */
    text-align: center;
    padding: 0.75rem 0.25rem;
}

.data-table th:nth-child(4),
.data-table td:nth-child(4) {
    width: 35%; /* Actions column - increased width to accommodate reduced title column */
    text-align: center;
    white-space: nowrap;
    min-width: 80px;
    padding: 0.75rem 0.25rem;
}

/* Status Badges */
.status {
    font-family: var(--font-arabic);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: capitalize;
    background: none;
    border: none;
}

.status.published {
    color: var(--primary-green);
}

.status.draft {
    color: var(--primary-red);
}

.status.active {
    color: var(--primary-red);
}

.status.completed {
    color: var(--gray-600);
}

.status.upcoming {
    color: #d97706;
}

/* Action Buttons */
.action-btn {
    font-family: var(--font-arabic);
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--primary-red);
    border-radius: var(--border-radius);
    font-size: 0.65rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin: 0 0.25rem;
    background: var(--white);
    color: var(--primary-red);
    display: inline-block;
    text-decoration: none;
    min-width: 50px;
}

/* Action Buttons Container */
.data-table td:last-child {
    white-space: nowrap;
}

.data-table td:last-child .action-btn {
    margin: 0 0.125rem;
    padding: 0.2rem 0.4rem;
    font-size: 0.6rem;
}

.edit-btn {
    background: var(--white);
    color: var(--primary-red);
    border: 1px solid var(--primary-red);
}

.edit-btn:hover {
    background: var(--primary-red);
    color: var(--white);
}

.delete-btn {
    background: var(--white);
    color: var(--primary-red);
    border: 1px solid var(--primary-red);
}

.delete-btn:hover {
    background: var(--primary-red);
    color: var(--white);
}

/* RTL Support for Arabic */
[dir="rtl"] .sidebar-tab {
    text-align: right;
}

[dir="rtl"] .data-table th,
[dir="rtl"] .data-table td {
    text-align: right;
}

/* LTR Support for English/French */
[dir="ltr"] .sidebar-tab {
    text-align: left;
}

[dir="ltr"] .data-table th,
[dir="ltr"] .data-table td {
    text-align: left;
}

/* Mobile Responsive for Profile Page */
@media (max-width: 768px) {
    .profile-section {
        padding: 1rem;
        margin-bottom: 1rem;
        position: relative; /* For absolute positioning of Follow button */
    }
    
    .profile-info {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .profile-pic {
        width: 100px;
        height: 100px;
    }
    
    .profile-header {
        position: static; /* Remove relative positioning */
    }
    
    .entity-follow-button {
        position: absolute;
        top: 1rem;
        right: 1rem;
        z-index: 10;
        margin: 0;
        padding: 0.40rem 0.85rem;
        font-size: 13px;
        box-shadow: 0 4px 12px rgba(196, 30, 50, 0.25);
    }
    
    /* RTL support - position on left for Arabic */
    [dir="rtl"] .entity-follow-button {
        right: auto;
        left: 1rem;
    }
    
    .profile-name {
        font-size: 1.5rem;
        text-align: center;
    }
    
    .field-label {
        text-align: center;
        min-width: auto;
    }
    
    .field-value {
        text-align: center;
    }
    
    .profile-description {
        text-align: center;
    }
    
    .content-area {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .sidebar {
        order: 1;
    }
    
    .sidebar-tabs {
        flex-direction: row;
        justify-content: center;
    }
    
    .table-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .data-table {
        font-size: 0.875rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 0.5rem 0.25rem;
    }
    
    /* Mobile table column adjustments */
    .data-table th:nth-child(1),
    .data-table td:nth-child(1) {
        width: 8%; /* Slightly larger ID column on mobile */
    }
    
    .data-table th:nth-child(2),
    .data-table td:nth-child(2) {
        width: 50%; /* Title column on mobile */
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .data-table th:nth-child(3),
    .data-table td:nth-child(3) {
        width: 15%; /* Status column on mobile */
    }
    
    .data-table th:nth-child(4),
    .data-table td:nth-child(4) {
        width: 27%; /* Actions column on mobile */
        min-width: 70px;
    }
    
    .data-table td:last-child .action-btn {
        margin: 0 0.05rem;
        padding: 0.15rem 0.3rem;
        font-size: 0.6rem;
        min-width: 45px;
    }
}

/* Tablet Responsive */
@media (max-width: 1024px) and (min-width: 769px) {
    .content-area {
        grid-template-columns: 200px 1fr;
        gap: 1.5rem;
    }
    
    .sidebar {
        padding: 1rem;
    }
    
    .sidebar-tab {
        padding: 0.75rem;
        font-size: 0.9rem;
    }
}

/* Large Desktop */
@media (min-width: 1200px) {
    .content-area {
        grid-template-columns: 300px 1fr;
        gap: 2.5rem;
    }
    
    .profile-section {
        padding: 2.5rem;
    }
    
    .sidebar {
        padding: 2rem;
    }
}

/* Edit Content Page Styles */
.edit-content-page {
    padding: 2rem 0;
    min-height: 80vh;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--gray-200);
}

.page-title {
    font-family: var(--font-arabic);
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.back-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--gray-100);
    color: var(--gray-700);
    text-decoration: none;
    border-radius: var(--border-radius);
    font-family: var(--font-arabic);
    font-weight: 500;
    transition: all 0.3s ease;
    border: 1px solid var(--gray-300);
}

.back-btn:hover {
    background: var(--primary-red);
    color: var(--white);
    border-color: var(--primary-red);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.edit-form-container {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.edit-content-form {
    max-width: 800px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-family: var(--font-arabic);
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.required {
    color: var(--primary-red);
    margin-left: 0.25rem;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-family: var(--font-arabic);
    font-size: 1rem;
    color: var(--gray-800);
    background: var(--white);
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(196, 30, 50, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.form-textarea.editor {
    min-height: 300px;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-start;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-family: var(--font-arabic);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: var(--primary-red);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--secondary-red);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-200);
    color: var(--gray-800);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Mobile Edit Page Styles */
@media (max-width: 768px) {
    .edit-content-page {
        padding: 1rem 0;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .page-title {
        font-size: 1.5rem;
    }
    
    .back-btn {
        align-self: flex-start;
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .edit-form-container {
        padding: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn {
        justify-content: center;
        width: 100%;
    }
}

/* RTL Support for Edit Page */
[dir="rtl"] .back-btn {
    flex-direction: row-reverse;
}

[dir="rtl"] .required {
    margin-left: 0;
    margin-right: 0.25rem;
}

[dir="rtl"] .form-actions {
    justify-content: flex-end;
}

/* Delete Confirmation Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--white);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-50px) scale(0.9);
    opacity: 0;
    transition: all 0.3s ease;
}

.modal-overlay.show .modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    font-family: var(--font-arabic);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: var(--gray-700);
}

.modal-body {
    padding: 2rem;
}

.modal-item-title {
    font-weight: 600;
    color: var(--gray-900);
    background: var(--gray-50);
    padding: 0.75rem;
    border-radius: var(--border-radius);
}

.modal-warning {
    color: var(--primary-red);
    font-weight: 600;
    font-size: 0.9rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border-top: 1px solid var(--gray-200);
    background: var(--gray-50);
    border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

.btn {
    font-family: var(--font-arabic);
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.btn-cancel {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-cancel:hover {
    background: var(--gray-300);
    color: var(--gray-800);
}

.btn-delete {
    background: var(--primary-red);
    color: var(--white);
}

.btn-delete:hover {
    background: var(--secondary-red);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(196, 30, 50, 0.3);
}


[dir="rtl"] .modal-footer {
    justify-content: center;
}

/* Mobile Modal Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    .modal-footer {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .btn {
        width: 100%;
        padding: 0.875rem 1rem;
    }
}

/* QR Code Styles */
.qr-code-field {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200, #e5e7eb);
}

.qr-code-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.qr-code-image {
    width: 150px;
    height: 150px;
    border: 2px solid var(--gray-200, #e5e7eb);
    border-radius: var(--border-radius, 8px);
    padding: 0.5rem;
    background: var(--white, #ffffff);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qr-code-description {
    font-size: 0.875rem;
    color: var(--gray-600, #6b7280);
    text-align: center;
    margin: 0;
}

/* Responsive QR Code */
@media (max-width: 768px) {
    .qr-code-image {
        width: 120px;
        height: 120px;
    }
    
    .qr-code-container {
        gap: 0.5rem;
    }
}
.news-content h2 {
    margin: 0 0 18px 0;
    line-height: 1.2;
    color: var(--dark-gray);
    font-size: 20px;
}
.news_user_role{
    display: inline-flex;
    align-items: center;
    color: #fff !important;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    align-self: flex-start;
    margin-top: auto;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.2);
    background: var(--primary-red);
    padding: 2px 14px;
    border-radius: 5px;
    text-align: center;
    margin: 10px 0px;
}

/* Mobile Responsive for Profile Actions */
@media (max-width: 768px) {
    .profile-actions {
        justify-content: center;
    }
}

/* Youth Three Column Layout */
.youth-three-column-layout {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 1rem;
    align-items: center;
    width: 100%;
    max-width: 100%;
}

/* Override flex layout for youth profile */
.profile-info-youth {
    display: block !important;
    width: 100%;
    max-width: 100%;
    padding: 0;
    margin: 0;
}

/* Override profile section layout for youth */
.profile-section-youth {
    display: block !important;
    justify-content: normal;
    align-items: normal;
    padding: 0.5rem;
}

.youth-column {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Youth Image Column */
.youth-image-column {
    justify-content: center;
    align-items: center;
}

/* Youth Profile Image Container */
.youth-image-column .profile-image-youth {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

/* Youth Details Column */
.youth-details-column {
    align-items: flex-start;
}

/* Youth QR Code Column */
.youth-qr-column {
    justify-content: center;
}

/* Barcode Section within Youth Profile */
.profile-info-youth .barcode-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.profile-info-youth .barcode-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    padding: 1rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: var(--gray-50);
    max-width: 150px;
    text-align: center;
}

.profile-info-youth .barcode-container:hover {
    background: var(--white);
    border-color: var(--primary-red);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.profile-info-youth .qrcode {
    width: 100px;
    height: 100px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

.profile-info-youth .qrcode canvas {
    width: 100px !important;
    height: 100px !important;
    border-radius: var(--border-radius);
    display: block;
}

.profile-info-youth .qrcode.qrcode-fallback {
    width: 100px;
    height: 100px;
    border-radius: var(--border-radius);
    object-fit: contain;
}

.profile-info-youth .barcode-label {
    font-family: var(--font-arabic);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gray-600);
    margin: 0;
    text-align: center;
    line-height: 1.2;
}

.profile-info-youth .barcode-container:hover .barcode-label {
    color: var(--primary-red);
}

/* Mobile responsive for youth three column layout */
@media (max-width: 768px) {
    .youth-three-column-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }
    
    .youth-column {
        align-items: center;
    }
    
    .youth-details-column {
        align-items: center;
    }
    
    .profile-info-youth .barcode-container {
        padding: 0.75rem;
        max-width: 150px;
    }
    
    .profile-info-youth .qrcode {
        width: 80px;
        height: 80px;
    }
    
    .profile-info-youth .qrcode canvas {
        width: 80px !important;
        height: 80px !important;
    }
}
span.field-value p {
    margin-bottom: 0px !important;
}