﻿/* ============================================
   VERSION DETAILS HEADER - ENHANCED DESIGN
   ============================================ */

:root {
    --moif-blue-dark: #0D1B3E;
    --moif-blue: #1A2B4A;
    --moif-gold: #C9A227;
    --moif-gold-bright: #F4D03F;
    --moif-white: #FFFFFF;
}

/* 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 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.12) 0%, transparent 70%);
        border-radius: 50%;
        animation: float 15s ease-in-out infinite;
    }

    .detail-header-section::after {
        content: '';
        position: absolute;
        bottom: -150px;
        left: -150px;
        width: 500px;
        height: 500px;
        background: radial-gradient(circle, rgba(244, 208, 63, 0.08) 0%, transparent 70%);
        border-radius: 50%;
        animation: float 20s ease-in-out infinite reverse;
    }

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }

    50% {
        transform: translate(-20px, -20px) scale(1.1);
    }
}

.detail-header-card {
    text-align: center;
    position: relative;
    z-index: 2;
    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);
    transition: all 0.3s ease;
}

    .detail-header-card:hover {
        background: rgba(255, 255, 255, 0.08);
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    }

/* Badges Container - Enhanced */
.detail-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

/* Type Badge - Enhanced with gradients */
.type-badge {
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 700;
    font-size: clamp(13px, 2vw, 15px);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    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 20px rgba(0, 0, 0, 0.3);
    }

    /* Type-specific colors with gradients */
    .type-badge.type-original {
        background: linear-gradient(135deg, #17a2b8, #138496);
    }

    .type-badge.type-amendment {
        background: linear-gradient(135deg, #ffc107, #ff9800);
        color: var(--moif-blue-dark);
    }

    .type-badge.type-replacement {
        background: linear-gradient(135deg, #6f42c1, #5a32a3);
    }

    .type-badge.type-addition {
        background: linear-gradient(135deg, #28a745, #218838);
    }

/* Current Badge - Enhanced */
.current-badge {
    background: linear-gradient(135deg, var(--moif-gold), var(--moif-gold-bright));
    color: var(--moif-white);
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 700;
    font-size: clamp(13px, 2vw, 15px);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(201, 162, 39, 0.4);
    animation: pulse 2s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

    .current-badge::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
        transition: left 0.6s ease;
    }

    .current-badge:hover::before {
        left: 100%;
    }

    .current-badge i {
        font-size: 18px;
        animation: spin 3s linear infinite;
    }

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(201, 162, 39, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(201, 162, 39, 0.5);
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Title - Enhanced */
.detail-header-card h1 {
    color: var(--moif-white) !important;
    font-size: clamp(22px, 4vw, 32px);
    margin: 0 0 24px;
    line-height: 1.4;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Related Law Link - Enhanced */
.detail-header-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.related-law {
    color: rgba(255, 255, 255, 0.9);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: clamp(14px, 2vw, 16px);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .related-law::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.3), transparent);
        transition: left 0.5s ease;
    }

    .related-law:hover {
        color: var(--moif-white);
        background: rgba(201, 162, 39, 0.2);
        border-color: var(--moif-gold);
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(201, 162, 39, 0.3);
    }

        .related-law:hover::before {
            left: 100%;
        }

    .related-law i {
        color: var(--moif-gold-bright);
        font-size: 20px;
        transition: all 0.3s ease;
    }

    .related-law:hover i {
        color: var(--moif-gold-bright);
        transform: scale(1.2) rotate(5deg);
    }

/* RTL Support */
[dir="rtl"] .detail-header-section::before {
    right: auto;
    left: -100px;
}

[dir="rtl"] .detail-header-section::after {
    left: auto;
    right: -150px;
}

/* ============================================
   CONTENT SECTION - ENHANCED
   ============================================ */

.detail-content-section {
    padding: 60px 0;
    background: #f8f9fa;
}

/* Content Card - 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);
    }

.content-card-header {
    padding: 24px 28px;
    border-bottom: 2px solid #f1f5f9;
    background: #fafbfc;
    transition: all 0.3s ease;
}

    .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;
        }

.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-inline-start: 8px;
    box-shadow: 0 2px 8px rgba(201, 162, 39, 0.2);
}

.content-card-body {
    padding: 28px;
}

/* Info Grid - Enhanced */
.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 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: #ffffff;
        border-color: var(--moif-gold);
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    .info-item.full-width {
        grid-column: span 2;
    }

    .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);
        line-height: 1.5;
    }

.type-text {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, #e8f4f8, #d0ebf5);
    border-radius: 20px;
    font-size: 13px !important;
    color: #17a2b8;
    font-weight: 600;
    border: 1px solid rgba(23, 162, 184, 0.2);
}

/* Description Text */
.description-text {
    line-height: 1.9;
    text-align: justify;
    margin: 0;
    color: #334155;
    font-size: clamp(14px, 2vw, 16px);
}

/* Changes Content - Enhanced */
.changes-content {
    line-height: 2;
    padding: 20px;
    background: linear-gradient(135deg, #fffbeb, #fef3c7);
    border-radius: 12px;
    border-inline-end: 4px solid var(--moif-gold);
    box-shadow: 0 2px 8px rgba(201, 162, 39, 0.1);
    color: #334155;
}

/* Attachments - Enhanced */
.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);
        transform: translateX(-4px);
    }

.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: #dc3545;
    }

.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);
    }

    .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;
    text-decoration: none;
    white-space: nowrap;
}

    .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 - Enhanced */
.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-success {
    color: #28a745 !important;
}

/* 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);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    }

    .related-law-card a {
        display: block;
        text-decoration: none;
    }

    .related-law-card h5 {
        font-size: clamp(14px, 2vw, 16px);
        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: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

    .view-link:hover {
        color: var(--moif-blue-dark);
        gap: 10px;
    }

/* 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;
    }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@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: span 1;
    }
}

@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,
    .current-badge {
        width: 100%;
        text-align: center;
        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;
    }
}

@media (max-width: 480px) {
    .detail-header-section {
        padding: 32px 0;
    }

    .detail-header-card {
        padding: 24px 16px;
    }

    .detail-content-section {
        padding: 32px 0;
    }

    .content-card-header {
        padding: 16px;
    }

    .content-card-body {
        padding: 16px;
    }

    .sidebar-card {
        padding: 20px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .detail-header-section::before,
    .detail-header-section::after {
        display: none;
    }

    .detail-header-section {
        background: none;
        padding: 20px 0;
    }

    .sidebar-card,
    .action-buttons {
        display: none !important;
    }

    .content-card {
        page-break-inside: avoid;
    }
}
