﻿/* ============================================
   LAWS INDEX PAGE - SIMPLIFIED DESIGN
   ============================================ */

/* Base Variables */
:root {
    --moif-blue-dark: #0D1B3E;
    --moif-blue: #1A2B4A;
    --moif-gold: #C9A227;
    --moif-gold-bright: #F4D03F;
    --moif-white: #FFFFFF;
    --text-primary: #0D1B3E;
    --text-secondary: #64748b;
    --border-light: rgba(13, 27, 62, 0.08);
    --shadow-sm: 0 2px 8px rgba(13, 27, 62, 0.06);
    --shadow-md: 0 4px 16px rgba(13, 27, 62, 0.08);
    --shadow-lg: 0 8px 24px rgba(13, 27, 62, 0.12);
    --transition: all 0.3s ease;
}

/* ============================================
   SEARCH SECTION
   ============================================ */

.laws-search-section {
    padding: 60px 0;
    background: linear-gradient(135deg, var(--moif-blue-dark) 0%, var(--moif-blue) 100%);
    position: relative;
}

.search-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.search-title {
    text-align: center;
    color: var(--moif-white);
    margin-bottom: 32px;
}

    .search-title h1 {
        font-size: clamp(28px, 5vw, 36px);
        font-weight: 700;
        margin-bottom: 12px;
        color: var(--moif-gold-bright) !important;
        line-height: 1.3;
    }

    .search-title p {
        color: rgba(255, 255, 255, 0.85);
        font-size: clamp(14px, 2vw, 16px);
        line-height: 1.6;
        max-width: 600px;
        margin: 0 auto;
    }

.search-box {
    display: flex;
    background: var(--moif-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
}

    .search-box:focus-within {
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
    }

.search-input {
    flex: 1;
    border: none;
    padding: 18px 24px;
    font-size: 15px;
    outline: none;
    background: var(--moif-white);
    color: var(--text-primary);
    min-width: 0;
}

    .search-input::placeholder {
        color: #94a3b8;
    }
.btn-color {
    background: var(--moif-gold);
}
.search-btn  {
   
    color: var(--moif-white);
    border: none;
    padding: 18px 32px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    white-space: nowrap;
}

    .search-btn:hover {
        background: var(--moif-gold-bright);
        color: var(--moif-blue-dark);
    }

    .search-btn i {
        font-size: 18px;
    }

/* ============================================
   STATISTICS SECTION - SIMPLE RECTANGULAR
   ============================================ */

.laws-stats-section {
    padding: 60px 0;
    background: #f8fafc;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Simple Rectangular Card */
.stat-card {
    background: var(--moif-white);
    border-radius: 12px;
    padding: 28px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 1px 3px rgba(13, 27, 62, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    position: relative;
    overflow: hidden;
}

    /* Simple left accent */
    .stat-card::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: var(--moif-gold);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(13, 27, 62, 0.12);
        border-color: var(--moif-gold);
    }

        .stat-card:hover::before {
            opacity: 1;
        }

/* Outlined Icon - No Background */
.stat-icon {
    width: 60px;
    height: 60px;
    background: transparent;
    border: 2.5px solid var(--moif-blue-dark);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

/* Different colored borders */
.stat-card:nth-child(1) .stat-icon {
    border-color: var(--moif-blue-dark);
}

.stat-card:nth-child(2) .stat-icon {
    border-color: var(--moif-gold);
}

.stat-card:nth-child(3) .stat-icon {
    border-color: #3b82f6;
}

.stat-card:nth-child(4) .stat-icon {
    border-color: #10b981;
}

.stat-card:hover .stat-icon {
    transform: scale(1.05);
    background: rgba(201, 162, 39, 0.05);
}

.stat-icon i {
    font-size: 28px;
    transition: color 0.3s ease;
}

/* Matching icon colors with borders */
.stat-card:nth-child(1) .stat-icon i {
    color: var(--moif-blue-dark);
}

.stat-card:nth-child(2) .stat-icon i {
    color: var(--moif-gold);
}

.stat-card:nth-child(3) .stat-icon i {
    color: #3b82f6;
}

.stat-card:nth-child(4) .stat-icon i {
    color: #10b981;
}

/* Clean Typography */
.stat-info {
    flex: 1;
}

    .stat-info h3 {
        font-size: 40px;
        font-weight: 700;
        margin: 0 0 4px;
        color: var(--moif-blue-dark);
        line-height: 1;
    }

    .stat-info p {
        margin: 0;
        color: var(--text-secondary);
        font-size: 14px;
        font-weight: 500;
        line-height: 1.4;
    }

/* ============================================
   SECTION HEADER
   ============================================ */

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding: 0 20px;
    gap: 20px;
    flex-wrap: wrap;
}

    .section-header h2 {
        font-size: clamp(24px, 4vw, 32px);
        margin: 0;
        color: var(--moif-blue-dark);
        font-weight: 700;
        line-height: 1.3;
    }

    .section-header p {
        color: var(--text-secondary);
        margin: 8px 0 0;
        width: 100%;
        font-size: 15px;
        line-height: 1.6;
    }

.view-all-link {
    color: var(--moif-gold);
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: rgba(201, 162, 39, 0.1);
    border-radius: 8px;
    transition: var(--transition);
    white-space: nowrap;
}

    .view-all-link:hover {
        background: var(--moif-gold);
        color: var(--moif-white);
    }

/* ============================================
   CATEGORIES SECTION - SIMPLIFIED
   ============================================ */

.laws-categories-section {
    padding: 60px 0;
    background: var(--moif-white);
}

    .laws-categories-section .container {
        max-width: 1200px;
        margin: 0 auto;
        padding: 0 20px;
    }

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* Simple Category Card */
.category-card {
    background: var(--moif-white);
    border-radius: 12px;
    padding: 28px 24px;
    box-shadow: 0 1px 3px rgba(13, 27, 62, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
}

    .category-card::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: var(--moif-gold);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .category-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(13, 27, 62, 0.12);
        border-color: var(--moif-gold);
    }

        .category-card:hover::before {
            opacity: 1;
        }

/* Outlined Category Icon */
.category-icon {
    width: 56px;
    height: 56px;
    background: transparent;
    border: 2.5px solid var(--moif-blue-dark);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.category-card:hover .category-icon {
    border-color: var(--moif-gold);
    background: rgba(201, 162, 39, 0.05);
    transform: scale(1.05);
}

.category-icon i {
    font-size: 26px;
    color: var(--moif-blue-dark);
    display: inline-block;
    font-style: normal;
    line-height: 1;
    transition: color 0.3s ease;
}

.category-card:hover .category-icon i {
    color: var(--moif-gold);
}

/* Default icon styles */
.category-icon i[class*="ri-"],
.category-icon i.ri-scales-line,
.category-icon i {
    font-family: 'remixicon' !important;
    speak: never;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Category Content */
.category-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

    .category-content h3 {
        font-size: 20px;
        margin: 0 0 12px;
        color: var(--moif-blue-dark);
        font-weight: 700;
        line-height: 1.4;
        min-height: 56px;
        display: flex;
        align-items: center;
        transition: color 0.3s ease;
    }

.category-card:hover .category-content h3 {
    color: var(--moif-gold);
}

.category-content p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    margin: 0 0 20px;
    flex-grow: 1;
    min-height: 63px;
}

/* Category Stats */
.category-stats {
    display: flex;
    gap: 20px;
    padding: 16px 0;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 20px;
}

    .category-stats span {
        font-size: 13px;
        color: var(--text-primary);
        display: flex;
        align-items: center;
        gap: 6px;
        font-weight: 600;
    }

    .category-stats i {
        color: var(--moif-gold);
        font-size: 16px;
        flex-shrink: 0;
    }

/* Category Link */
.category-link {
    color: var(--moif-gold);
    font-weight: 700;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    padding: 8px 0;
    width: fit-content;
}

    .category-link i {
        font-size: 16px;
        transition: transform 0.3s ease;
    }

    .category-link:hover {
        color: var(--moif-blue-dark);
        gap: 12px;
    }

        .category-link:hover i {
            transform: translateX(-4px);
        }

[dir="rtl"] .category-link:hover i {
    transform: translateX(4px);
}

/* ============================================
   RECENT LAWS SECTION
   ============================================ */

.recent-laws-section {
    padding: 60px 0;
    background: #f8fafc;
}

.laws-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    padding: 0 20px;
}

.law-card {
    background: var(--moif-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(13, 27, 62, 0.08);
    transition: var(--transition);
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

    .law-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(13, 27, 62, 0.12);
    }

.law-header {
    background: var(--moif-blue-dark);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.law-number {
    color: var(--moif-white);
    font-weight: 600;
    font-size: 14px;
}

.law-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .law-status.status-active {
        background: #10b981;
        color: var(--moif-white);
    }

    .law-status.status-amended {
        background: var(--moif-gold);
        color: var(--moif-white);
    }

    .law-status.status-repealed {
        background: #ef4444;
        color: var(--moif-white);
    }

.law-body {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.law-category {
    display: inline-block;
    background: rgba(201, 162, 39, 0.1);
    color: var(--moif-gold);
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 12px;
    margin-bottom: 12px;
    font-weight: 600;
    width: fit-content;
}

.law-body h4 {
    font-size: 16px;
    line-height: 1.5;
    margin: 0 0 16px;
    font-weight: 600;
    flex-grow: 1;
}

    .law-body h4 a {
        color: var(--moif-blue-dark);
        transition: var(--transition);
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

        .law-body h4 a:hover {
            color: var(--moif-gold);
        }

.law-meta {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
    flex-wrap: wrap;
}

    .law-meta span {
        display: flex;
        align-items: center;
        gap: 4px;
    }

    .law-meta i {
        color: var(--moif-gold);
        font-size: 14px;
    }

.law-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px;
    border-top: 1px solid #e2e8f0;
    color: var(--moif-gold);
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

    .law-link:hover {
        background: var(--moif-gold);
        color: var(--moif-white);
    }

/* ============================================
   EMPTY STATE
   ============================================ */

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--moif-white);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(13, 27, 62, 0.08);
    border: 2px dashed #e2e8f0;
    margin: 0 20px;
}

    .empty-state i {
        font-size: 72px;
        color: #e2e8f0;
        margin-bottom: 20px;
        display: inline-block;
    }

    .empty-state h4 {
        color: var(--moif-blue-dark);
        margin: 0 0 12px;
        font-size: 20px;
        font-weight: 700;
    }

    .empty-state p {
        color: var(--text-secondary);
        margin: 0;
        font-size: 15px;
        line-height: 1.6;
    }

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablet */
@media (max-width: 992px) {
    .laws-search-section,
    .laws-stats-section,
    .laws-categories-section,
    .recent-laws-section {
        padding: 48px 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .categories-grid,
    .laws-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 20px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .search-box {
        flex-direction: column;
    }

    .search-btn {
        padding: 16px;
        justify-content: center;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
        gap: 16px;
    }

    .stat-icon {
        width: 56px;
        height: 56px;
    }

        .stat-icon i {
            font-size: 24px;
        }

    .stat-info h3 {
        font-size: 36px;
    }

    .stat-info p {
        font-size: 13px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .categories-grid,
    .laws-grid {
        grid-template-columns: 1fr;
    }

    .category-content h3 {
        font-size: 18px;
        min-height: auto;
    }

    .category-content p {
        min-height: auto;
    }

    .category-stats {
        flex-wrap: wrap;
        gap: 12px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .laws-search-section,
    .laws-stats-section,
    .laws-categories-section,
    .recent-laws-section {
        padding: 40px 0;
    }

    .search-wrapper,
    .stats-grid,
    .categories-grid,
    .laws-grid {
        padding: 0 16px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .stat-card {
        padding: 20px 16px;
    }

    .stat-icon {
        width: 52px;
        height: 52px;
    }

        .stat-icon i {
            font-size: 22px;
        }

    .stat-info h3 {
        font-size: 32px;
    }

    .category-stats {
        flex-direction: column;
        gap: 10px;
    }

    .law-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .law-status {
        align-self: flex-start;
    }
}

/* RTL Support */
[dir="rtl"] .search-btn i,
[dir="rtl"] .view-all-link i,
[dir="rtl"] .category-link i,
[dir="rtl"] .law-link i {
    transform: scaleX(-1);
}

[dir="rtl"] .category-link:hover,
[dir="rtl"] .law-link:hover {
    transform: translateX(-5px);
}
