﻿/* ============================================
   REGULATION DETAILS PAGE - ENHANCED & RESPONSIVE
   ============================================ */

/* Base Variables */
:root {
    --moif-blue-dark: #0D1B3E;
    --moif-blue: #1A2B4A;
    --moif-gold: #C9A227;
    --moif-gold-bright: #F4D03F;
    --moif-white: #FFFFFF;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #17a2b8;
    --purple: #6f42c1;
    --orange: #fd7e14;
    --teal: #20c997;
    --gray: #6c757d;
}

/* ============================================
   HEADER SECTION - ENHANCED
   ============================================ */

.detail-header-section {
    background: linear-gradient(135deg, var(--moif-blue-dark) 0%, var(--moif-blue) 100%);
    padding: 60px 0;
    margin-top: -1px;
    position: relative;
    overflow: hidden;
}

    /* Decorative background elements */
    .detail-header-section::before {
        content: '';
        position: absolute;
        top: -100px;
        right: -100px;
        width: 400px;
        height: 400px;
        background: radial-gradient(circle, rgba(201, 162, 39, 0.15) 0%, transparent 70%);
        border-radius: 50%;
    }

    .detail-header-section::after {
        content: '';
        position: absolute;
        bottom: -120px;
        left: -120px;
        width: 450px;
        height: 450px;
        background: radial-gradient(circle, rgba(244, 208, 63, 0.1) 0%, transparent 70%);
        border-radius: 50%;
    }

    .detail-header-section .container {
        position: relative;
        z-index: 2;
    }

.detail-header-card {
    text-align: center;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Badges Container */
.detail-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

/* Type Badges - Enhanced */
.type-badge {
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 700;
    color: var(--moif-white);
    font-size: clamp(13px, 2vw, 15px);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .type-badge::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
        transition: left 0.5s ease;
    }

    .type-badge:hover::before {
        left: 100%;
    }

    .type-badge:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    }

    /* Type Badge Colors */
    .type-badge.type-executiveregulation {
        background: linear-gradient(135deg, var(--info), #1cb5d0);
    }

    .type-badge.type-ministerialdecision {
        background: linear-gradient(135deg, var(--moif-gold), var(--moif-gold-bright));
    }

    .type-badge.type-presidentialdecree {
        background: linear-gradient(135deg, var(--purple), #8563d1);
    }

    .type-badge.type-primeministerdecision {
        background: linear-gradient(135deg, var(--orange), #ff8c3a);
    }

    .type-badge.type-circular {
        background: linear-gradient(135deg, var(--teal), #2ddab1);
    }

    .type-badge.type-instruction {
        background: linear-gradient(135deg, var(--gray), #858d96);
    }

/* Status Badge */
.status-badge {
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 700;
    font-size: clamp(13px, 2vw, 15px);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

    .status-badge.status-active {
        background: var(--success);
        color: var(--moif-white);
    }

    .status-badge.status-amended {
        background: var(--warning);
        color: var(--moif-blue-dark);
    }

    .status-badge.status-repealed {
        background: var(--danger);
        color: var(--moif-white);
    }

    .status-badge:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    }

/* Title */
.detail-header-card h1 {
    color: var(--moif-white) !important;
    font-size: clamp(22px, 4vw, 30px);
    margin: 0 0 24px;
    line-height: 1.4;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Header Info */
.detail-header-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 32px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

    .detail-header-info span {
        color: rgba(255, 255, 255, 0.9);
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: clamp(14px, 2vw, 16px);
        font-weight: 500;
        padding: 10px 16px;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        backdrop-filter: blur(5px);
        transition: all 0.3s ease;
    }

        .detail-header-info span:hover {
            background: rgba(255, 255, 255, 0.15);
            transform: translateY(-2px);
        }

    .detail-header-info i {
        color: var(--moif-gold-bright);
        font-size: 20px;
        flex-shrink: 0;
    }

/* Header Meta */
.detail-header-meta {
    margin-top: 8px;
}

.related-law {
    color: rgba(255, 255, 255, 0.85);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(14px, 2vw, 16px);
    font-weight: 600;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

    .related-law:hover {
        color: var(--moif-gold-bright);
        background: rgba(255, 255, 255, 0.12);
        transform: translateY(-2px);
    }

    .related-law i {
        color: var(--moif-gold-bright);
        font-size: 20px;
    }

/* ============================================
   CONTENT SECTION
   ============================================ */

.detail-content-section {
    padding: 60px 0;
    background: #f8f9fa;
}

/* ============================================
   CONTENT CARDS - ENHANCED
   ============================================ */

.content-card {
    background: var(--moif-white);
    border-radius: 16px;
    margin-bottom: 28px;
    box-shadow: 0 2px 8px rgba(13, 27, 62, 0.06);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

    .content-card:hover {
        box-shadow: 0 8px 24px rgba(13, 27, 62, 0.12);
        transform: translateY(-2px);
    }

/* Card Header */
.content-card-header {
    padding: 24px 28px;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fafbfc;
    transition: all 0.3s ease;
}

    .content-card-header.collapsible {
        cursor: pointer;
    }

        .content-card-header.collapsible:hover {
            background: #f1f5f9;
        }

    .content-card-header h3 {
        font-size: clamp(17px, 2.5vw, 20px);
        margin: 0;
        display: flex;
        align-items: center;
        gap: 12px;
        color: var(--moif-blue-dark);
        font-weight: 700;
    }

        .content-card-header h3 i {
            color: var(--moif-gold);
            font-size: 24px;
            flex-shrink: 0;
        }

/* Count Badge */
.count-badge {
    background: linear-gradient(135deg, var(--moif-gold), var(--moif-gold-bright));
    color: var(--moif-white);
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    margin-left: 8px;
    box-shadow: 0 2px 8px rgba(201, 162, 39, 0.2);
}

/* Toggle Icon */
.toggle-icon {
    font-size: 24px;
    color: var(--moif-blue-dark);
    transition: transform 0.3s ease;
}

    .toggle-icon.rotated {
        transform: rotate(180deg);
    }

/* Card Body */
.content-card-body {
    padding: 28px;
}

/* ============================================
   INFO GRID
   ============================================ */

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
}

.info-item {
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

    .info-item:hover {
        background: var(--moif-white);
        border-color: var(--moif-gold);
        transform: translateY(-2px);
    }

    .info-item.full-width {
        grid-column: 1 / -1;
    }

    .info-item label {
        display: block;
        font-size: 13px;
        color: #64748b;
        margin-bottom: 8px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.5px;
    }

    .info-item span {
        font-weight: 600;
        color: var(--moif-blue-dark);
        font-size: clamp(14px, 2vw, 16px);
        display: block;
        line-height: 1.5;
    }

/* Type & Status Text Badges */
.type-text {
    display: inline-block;
    padding: 6px 16px;
    background: #dbeafe;
    color: #1e40af;
    border-radius: 20px;
    font-size: 14px !important;
    font-weight: 700;
}

.status-text {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px !important;
    font-weight: 700;
}

    .status-text.status-active {
        background: #d1fae5;
        color: var(--success);
    }

    .status-text.status-amended {
        background: #fef3c7;
        color: #92400e;
    }

    .status-text.status-repealed {
        background: #fee2e2;
        color: var(--danger);
    }

/* ============================================
   TEXT CONTENT
   ============================================ */

/* Summary */
.summary-text {
    line-height: 1.9;
    text-align: justify;
    color: #334155;
    font-size: clamp(14px, 2vw, 16px);
    margin: 0;
}

/* Full Text */
.full-text-content {
    line-height: 2;
    text-align: justify;
    max-height: 600px;
    overflow-y: auto;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    color: #334155;
    font-size: clamp(14px, 2vw, 15px);
    border: 1px solid #e2e8f0;
}

    .full-text-content::-webkit-scrollbar {
        width: 8px;
    }

    .full-text-content::-webkit-scrollbar-track {
        background: #e2e8f0;
        border-radius: 4px;
    }

    .full-text-content::-webkit-scrollbar-thumb {
        background: var(--moif-gold);
        border-radius: 4px;
    }

        .full-text-content::-webkit-scrollbar-thumb:hover {
            background: var(--moif-gold-bright);
        }

/* ============================================
   ATTACHMENTS
   ============================================ */

.attachments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.attachment-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

    .attachment-item:hover {
        background: var(--moif-white);
        box-shadow: 0 4px 12px rgba(13, 27, 62, 0.08);
    }

.attachment-icon {
    width: 56px;
    height: 56px;
    background: var(--moif-white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
    border: 2px solid #fecaca;
}

    .attachment-icon i {
        font-size: 28px;
        color: var(--danger);
    }

.attachment-info {
    flex: 1;
    min-width: 0;
}

    .attachment-info h5 {
        margin: 0 0 6px;
        font-size: clamp(14px, 2vw, 16px);
        font-weight: 700;
        color: var(--moif-blue-dark);
        line-height: 1.4;
    }

    .attachment-info span {
        font-size: clamp(12px, 2vw, 13px);
        color: #64748b;
        font-weight: 500;
    }

.attachment-download {
    background: var(--moif-gold);
    color: var(--moif-white);
    padding: 12px 24px;
    border-radius: 10px;
    font-size: clamp(13px, 2vw, 14px);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    border: none;
    text-decoration: none;
}

    .attachment-download:hover {
        background: var(--moif-blue-dark);
        color: var(--moif-white);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(13, 27, 62, 0.2);
    }

    .attachment-download i {
        font-size: 18px;
    }

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar-card {
    background: var(--moif-white);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(13, 27, 62, 0.06);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

    .sidebar-card:hover {
        box-shadow: 0 8px 24px rgba(13, 27, 62, 0.12);
    }

    .sidebar-card h4 {
        font-size: clamp(16px, 2.5vw, 18px);
        margin: 0 0 20px;
        padding-bottom: 16px;
        border-bottom: 3px solid var(--moif-gold);
        display: flex;
        align-items: center;
        gap: 10px;
        color: var(--moif-blue-dark);
        font-weight: 700;
    }

        .sidebar-card h4 i {
            color: var(--moif-gold);
            font-size: 22px;
        }

/* Quick Info List */
.quick-info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .quick-info-list li {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 14px 0;
        border-bottom: 1px dashed #e2e8f0;
        gap: 12px;
    }

        .quick-info-list li:last-child {
            border-bottom: none;
        }

    .quick-info-list .label {
        color: #64748b;
        font-size: clamp(13px, 2vw, 14px);
        font-weight: 500;
    }

    .quick-info-list .value {
        font-weight: 700;
        font-size: clamp(14px, 2vw, 15px);
        color: var(--moif-blue-dark);
        text-align: right;
    }

        .quick-info-list .value.status-active {
            color: var(--success);
        }

        .quick-info-list .value.status-amended {
            color: var(--warning);
        }

        .quick-info-list .value.status-repealed {
            color: var(--danger);
        }

/* Related Law Card */
.related-law-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

    .related-law-card:hover {
        background: var(--moif-white);
        border-color: var(--moif-gold);
    }

    .related-law-card a {
        display: block;
        text-decoration: none;
    }

    .related-law-card h5 {
        font-size: clamp(15px, 2.5vw, 17px);
        margin: 0 0 12px;
        color: var(--moif-blue-dark);
        line-height: 1.5;
        font-weight: 700;
    }

    .related-law-card a:hover h5 {
        color: var(--moif-gold);
    }

.view-link {
    color: var(--moif-gold);
    font-size: clamp(13px, 2vw, 14px);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

    .view-link:hover {
        color: var(--moif-blue-dark);
        gap: 12px;
    }

    .view-link i {
        font-size: 16px;
    }

/* Issuer */
.issuer-name {
    margin: 0;
    color: var(--moif-blue-dark);
    font-weight: 600;
    font-size: clamp(14px, 2vw, 16px);
    line-height: 1.6;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn {
    width: 100%;
    padding: 14px;
    background: var(--moif-blue-dark);
    color: var(--moif-white);
    border: none;
    border-radius: 10px;
    font-size: clamp(13px, 2vw, 14px);
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

    .action-btn:hover {
        background: var(--moif-gold);
        color: var(--moif-white);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(201, 162, 39, 0.3);
    }

    .action-btn i {
        font-size: 18px;
    }

/* Share Buttons */
.share-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.share-btn {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--moif-white);
    font-size: 20px;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 48px;
}

    .share-btn:hover {
        transform: translateY(-4px);
        color: var(--moif-white);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    }

    .share-btn.facebook {
        background: #1877f2;
    }

    .share-btn.twitter {
        background: #1da1f2;
    }

    .share-btn.whatsapp {
        background: #25d366;
    }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet (992px and below) */
@media (max-width: 992px) {
    .detail-header-section {
        padding: 50px 0;
    }

    .detail-header-card {
        padding: 32px 24px;
    }

    .detail-content-section {
        padding: 50px 0;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .info-item.full-width {
        grid-column: 1;
    }

    .sidebar-card {
        margin-bottom: 20px;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    .detail-header-section {
        padding: 40px 0;
    }

        .detail-header-section::before,
        .detail-header-section::after {
            display: none;
        }

    .detail-header-card {
        padding: 28px 20px;
    }

    .detail-badges {
        flex-direction: column;
        gap: 12px;
    }

    .type-badge,
    .status-badge {
        width: 100%;
        text-align: center;
        padding: 12px 20px;
    }

    .detail-header-info {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }

        .detail-header-info span {
            width: 100%;
            justify-content: center;
        }

    .detail-content-section {
        padding: 40px 0;
    }

    .content-card-header {
        padding: 20px;
    }

    .content-card-body {
        padding: 20px;
    }

    .attachment-item {
        flex-direction: column;
        text-align: center;
    }

    .attachment-download {
        width: 100%;
        justify-content: center;
    }

    .share-buttons {
        justify-content: center;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    .detail-header-section {
        padding: 32px 0;
    }

    .detail-header-card {
        padding: 24px 16px;
    }

    .detail-content-section {
        padding: 32px 0;
    }

    .content-card {
        margin-bottom: 20px;
    }

    .content-card-header {
        padding: 16px;
    }

    .content-card-body {
        padding: 16px;
    }

    .attachment-item {
        padding: 16px;
    }

    .sidebar-card {
        padding: 20px;
    }
}

/* ============================================
   RTL SUPPORT
   ============================================ */

[dir="rtl"] .count-badge {
    margin-left: 0;
    margin-right: 8px;
}

[dir="rtl"] .view-link i,
[dir="rtl"] .related-law i {
    transform: scaleX(-1);
}

[dir="rtl"] .quick-info-list .value {
    text-align: left;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .detail-header-section::before,
    .detail-header-section::after {
        display: none;
    }

    .detail-header-section {
        background: none;
        padding: 20px 0;
    }

    .detail-header-card {
        background: none;
        border: 1px solid #ddd;
    }

    .sidebar-card,
    .page-title-area,
    .action-buttons,
    .share-buttons {
        display: none !important;
    }

    .col-lg-8 {
        width: 100% !important;
        max-width: 100% !important;
    }

    .content-card {
        page-break-inside: avoid;
    }
}



/* ============================================
   REGULATION HEADER SECTION - COMPACT HALF HEIGHT
   Professional Design with Reduced Spacing
   ============================================ */

/* ============================================
   HEADER SECTION - COMPACT VERSION
   ============================================ */

.detail-header-section {
    background: #0D1B3E; /* Solid dark blue */
    padding: 30px 0; /* Half of 60px */
    margin-top: -1px;
    position: relative;
    overflow: hidden;
}

    /* Subtle decorative pattern */
    .detail-header-section::before {
        content: '';
        position: absolute;
        inset: 0;
        background-image: radial-gradient(circle at 15% 85%, rgba(201, 162, 39, 0.04) 0%, transparent 40%), radial-gradient(circle at 85% 15%, rgba(244, 208, 63, 0.03) 0%, transparent 40%);
        pointer-events: none;
    }

    .detail-header-section .container {
        position: relative;
        z-index: 10;
    }

/* ============================================
   COMPACT CARD - REDUCED HEIGHT
   ============================================ */

.detail-header-card {
    /* Full width - no max-width */
    text-align: center;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 25px 35px; /* Half of 50px 45px */
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
    position: relative;
}

    /* Compact top accent */
    .detail-header-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 120px; /* Smaller */
        height: 2px; /* Thinner */
        background: linear-gradient(90deg, transparent, #C9A227, transparent);
        border-radius: 0 0 1px 1px;
    }

    .detail-header-card:hover {
        background: rgba(255, 255, 255, 0.08);
        border-color: rgba(201, 162, 39, 0.2);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.12);
    }

/* ============================================
   COMPACT BADGES
   ============================================ */

.detail-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px; /* Reduced gap */
    margin-bottom: 14px; /* Half of 28px */
    flex-wrap: wrap;
}

/* Compact Type Badge */
.type-badge {
    padding: 7px 20px; /* Reduced padding */
    border-radius: 6px;
    font-weight: 700;
    color: #FFFFFF;
    font-size: clamp(12px, 1.5vw, 14px); /* Smaller */
    text-transform: uppercase;
    letter-spacing: 0.6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    /* Subtle shine effect */
    .type-badge::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 50%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        transition: left 0.4s ease;
    }

    .type-badge:hover::before {
        left: 100%;
    }

    .type-badge:hover {
        transform: translateY(-2px);
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    /* Type Badge Colors */
    .type-badge.type-executiveregulation {
        background: linear-gradient(135deg, #17a2b8 0%, #1ab0c7 100%);
    }

    .type-badge.type-ministerialdecision {
        background: linear-gradient(135deg, #C9A227 0%, #d4ad30 100%);
    }

    .type-badge.type-presidentialdecree {
        background: linear-gradient(135deg, #6f42c1 0%, #7d4fd3 100%);
    }

    .type-badge.type-primeministerdecision {
        background: linear-gradient(135deg, #fd7e14 0%, #ff8a2a 100%);
    }

    .type-badge.type-circular {
        background: linear-gradient(135deg, #20c997 0%, #2dd4a4 100%);
    }

    .type-badge.type-instruction {
        background: linear-gradient(135deg, #6c757d 0%, #78818a 100%);
    }

/* Compact Status Badge */
.status-badge {
    padding: 7px 20px; /* Reduced padding */
    border-radius: 6px;
    font-weight: 700;
    font-size: clamp(12px, 1.5vw, 14px); /* Smaller */
    text-transform: uppercase;
    letter-spacing: 0.6px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.15);
    transition: all 0.3s ease;
}

    .status-badge.status-active {
        background: linear-gradient(135deg, #10b981 0%, #15c98e 100%);
        color: #FFFFFF;
    }

    .status-badge.status-amended {
        background: linear-gradient(135deg, #f59e0b 0%, #f7a720 100%);
        color: #0D1B3E;
    }

    .status-badge.status-repealed {
        background: linear-gradient(135deg, #ef4444 0%, #f15757 100%);
        color: #FFFFFF;
    }

    .status-badge:hover {
        transform: translateY(-2px);
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

/* ============================================
   COMPACT TITLE
   ============================================ */

.detail-header-card h1 {
    color: #FFFFFF !important;
    font-size: clamp(20px, 3.5vw, 26px); /* Smaller */
    /*margin: 0 0 12px;*/ /* Half of 26px */
    line-height: 1.3;
    font-weight: 700;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 3px 10px rgba(0, 0, 0, 0.15);
    letter-spacing: -0.3px;
    position: relative;
    padding-bottom: 10px; /* Half of 20px */
}

    /* Compact decorative underline */
    .detail-header-card h1::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 60px; /* Smaller */
        height: 3px;
        background: linear-gradient(90deg, transparent, #C9A227, #F4D03F, #C9A227, transparent);
        border-radius: 2px;
        box-shadow: 0 1px 4px rgba(201, 162, 39, 0.3);
    }

/* ============================================
   COMPACT INFO BADGES
   ============================================ */

.detail-header-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px; /* Reduced gap */
    margin-bottom: 10px; /* Half of 24px */
    flex-wrap: wrap;
}

    .detail-header-info span {
        color: rgba(255, 255, 255, 0.95);
        display: flex;
        align-items: center;
        gap: 8px;
        font-size: clamp(13px, 1.5vw, 15px); /* Smaller */
        font-weight: 600;
        padding: 8px 16px; /* Reduced padding */
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(6px);
        border-radius: 8px;
        border: 1px solid rgba(255, 255, 255, 0.12);
        transition: all 0.3s ease;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }

        .detail-header-info span:hover {
            background: rgba(255, 255, 255, 0.12);
            border-color: rgba(201, 162, 39, 0.25);
            transform: translateY(-2px);
            box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
        }

    .detail-header-info i {
        color: #F4D03F;
        font-size: 17px; /* Smaller */
        filter: drop-shadow(0 1px 3px rgba(244, 208, 63, 0.3));
    }

/* ============================================
   COMPACT RELATED LAW LINK
   ============================================ */

.detail-header-meta {
    margin-top: 4px; /* Half of 10px */
}

.related-law {
    color: rgba(255, 255, 255, 0.9);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: clamp(13px, 1.5vw, 15px); /* Smaller */
    font-weight: 600;
    padding: 8px 18px; /* Reduced padding */
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(6px);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

    /* Subtle background shift */
    .related-law::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(120deg, transparent, rgba(201, 162, 39, 0.08), transparent);
        transform: translateX(-100%);
        transition: transform 0.4s ease;
    }

    .related-law:hover::before {
        transform: translateX(100%);
    }

    .related-law:hover {
        color: #F4D03F;
        background: rgba(201, 162, 39, 0.12);
        border-color: rgba(244, 208, 63, 0.3);
        transform: translateY(-2px);
        box-shadow: 0 3px 10px rgba(201, 162, 39, 0.15);
    }

    .related-law i {
        color: #F4D03F;
        font-size: 17px; /* Smaller */
        filter: drop-shadow(0 1px 3px rgba(244, 208, 63, 0.3));
        transition: transform 0.3s ease;
    }

    .related-law:hover i {
        transform: scale(1.08);
    }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Large Desktop */
@media (min-width: 1400px) {
    .detail-header-card {
        padding: 28px 45px;
    }
}

/* Desktop */
@media (min-width: 1200px) and (max-width: 1399px) {
    .detail-header-card {
        padding: 25px 40px;
    }
}

/* Tablet */
@media (max-width: 992px) {
    .detail-header-section {
        padding: 25px 0;
    }

    .detail-header-card {
        padding: 22px 30px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .detail-header-section {
        padding: 22px 0;
    }

    .detail-header-card {
        padding: 20px 20px;
        border-radius: 10px;
    }

        .detail-header-card::before {
            width: 80px;
        }

    .detail-badges {
        flex-direction: column;
        gap: 8px;
        max-width: 280px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 12px;
    }

    .type-badge,
    .status-badge {
        width: 100%;
        text-align: center;
        padding: 7px 18px;
        font-size: 12px;
    }

    .detail-header-card h1 {
        margin-bottom: 10px;
        padding-bottom: 8px;
        font-size: 19px;
    }

        .detail-header-card h1::after {
            width: 50px;
        }

    .detail-header-info {
        flex-direction: column;
        gap: 8px;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 8px;
    }

        .detail-header-info span {
            width: 100%;
            justify-content: center;
            padding: 8px 14px;
            font-size: 13px;
        }

        .detail-header-info i {
            font-size: 16px;
        }

    .related-law {
        padding: 7px 16px;
        font-size: 13px;
    }

        .related-law i {
            font-size: 16px;
        }
}

/* Small Mobile */
@media (max-width: 480px) {
    .detail-header-section {
        padding: 20px 0;
    }

    .detail-header-card {
        padding: 18px 16px;
    }

    .detail-badges {
        max-width: 260px;
        gap: 7px;
        margin-bottom: 10px;
    }

    .type-badge,
    .status-badge {
        padding: 6px 16px;
        font-size: 11px;
    }

    .detail-header-card h1 {
        font-size: 18px;
        margin-bottom: 8px;
        padding-bottom: 7px;
    }

        .detail-header-card h1::after {
            width: 45px;
            height: 2px;
        }

    .detail-header-info {
        max-width: 280px;
        gap: 7px;
        margin-bottom: 7px;
    }

        .detail-header-info span {
            padding: 7px 12px;
            font-size: 12px;
        }

        .detail-header-info i {
            font-size: 15px;
        }

    .related-law {
        padding: 6px 14px;
        font-size: 12px;
    }

        .related-law i {
            font-size: 15px;
        }
}

/* ============================================
   RTL SUPPORT
   ============================================ */

[dir="rtl"] .detail-header-card h1::after {
    right: 50%;
    left: auto;
    transform: translateX(50%);
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .detail-header-section {
        background: #0D1B3E !important;
        padding: 15px 0;
    }

        .detail-header-section::before {
            display: none !important;
        }

    .detail-header-card {
        background: white;
        border: 1px solid #ddd;
        box-shadow: none;
        padding: 15px 20px;
    }

        .detail-header-card::before {
            display: none;
        }

        .detail-header-card h1 {
            color: #000 !important;
            text-shadow: none !important;
        }

            .detail-header-card h1::after {
                background: #C9A227;
                box-shadow: none;
            }

    .type-badge,
    .status-badge,
    .detail-header-info span,
    .related-law {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.type-badge:focus-visible,
.status-badge:focus-visible,
.related-law:focus-visible {
    outline: 2px solid #F4D03F;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

@media (prefers-contrast: high) {
    .detail-header-card {
        border: 2px solid rgba(255, 255, 255, 0.25);
    }

    .type-badge,
    .status-badge,
    .detail-header-info span,
    .related-law {
        border-width: 2px;
    }
}