/* Custom Cards CSS */

/* Base Body Styles */
body {
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    text-align: right;
    background-color: #f5f5f5;
    margin: 0;
    padding: 20px;
}

/* Base Card Styles */
.insight-card {
    position: relative;
    background: linear-gradient(to top, #1e1f53 0%, #0d0c2d 60%, #0a0a23 100%);
    border-radius: 20px;
    padding: 30px;
    width: 320px;
    height: 500px; /* Fixed height for all cards */
    color: #ffffff;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.insight-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.5);
}

/* Card Header */
.card-header {
    margin-bottom: 20px;
    text-align: center;
    height: 120px; /* Fixed height for card headers */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-title {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 10px 0;
}

.card-subtitle {
    font-size: 16px;
    font-weight: 400;
    opacity: 0.8;
    margin: 0;
    line-height: 1.5;
}

/* Card Content */
.card-content {
    width: 100%;
    overflow: hidden;
    border-radius: 15px;
    position: relative;
    height: 350px; /* Fixed height for all card contents */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-img {
    width: 180%;
    height: 380px;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
    display: block;
    transition: transform 0.3s ease;
    background: transparent;
    transform: scale(1.1);
}

/* Card Image Container */
.card-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.card-image:hover {
    box-shadow: 0 0 15px rgba(67, 97, 238, 0.5);
}

.card-image img {
    width: 120%;
    height: 380px;
    object-fit: cover;
    object-position: center;
    border-radius: 12px;
    transition: transform 0.3s ease;
    background: transparent;
    transform: scale(1.1);
}

.card-image:hover img {
    transform: scale(1.05);
}

/* Statistics Card */
.stats-card .card-content {
    background-color: rgba(13, 12, 45, 0.7);
    border-radius: 15px;
    padding: 20px;
    position: relative;
    height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stats-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.stats-title {
    font-size: 18px;
    font-weight: 500;
}

.stats-time {
    font-size: 14px;
    opacity: 0.7;
}

.stats-value {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin: 20px 0;
}

.stats-chart {
    height: 200px;
    position: relative;
    margin-top: 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-bottom: 30px;
}

.chart-bar {
    width: 18%;
    background: rgba(30, 31, 83, 0.5);
    border-radius: 6px 6px 0 0;
    position: relative;
}

.chart-bar.active {
    background: linear-gradient(to top, #4361ee, #3a0ca3);
}

.chart-bar:nth-child(1) { height: 30%; }
.chart-bar:nth-child(2) { height: 60%; }
.chart-bar:nth-child(3) { height: 90%; }
.chart-bar:nth-child(4) { height: 40%; }

.chart-label {
    position: absolute;
    bottom: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    opacity: 0.7;
}

.chart-point {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: white;
    border-radius: 50%;
    z-index: 2;
}

.chart-line {
    position: absolute;
    height: 1px;
    background-color: rgba(255, 255, 255, 0.3);
    width: 100%;
    z-index: 1;
}

.chart-month {
    position: absolute;
    font-size: 12px;
    color: white;
}

/* Dashboard Card */
.dashboard-card .card-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: rgba(13, 12, 45, 0.7);
    border-radius: 15px;
    padding: 20px;
    height: 350px;
    justify-content: center;
}

.dashboard-header {
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    border-radius: 10px;
    transition: background-color 0.3s ease;
}

.menu-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu-item.active {
    background-color: rgba(67, 97, 238, 0.3);
}

.menu-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: #4361ee;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
}

.menu-icon img {
    width: 18px;
    height: 18px;
}

.menu-text {
    font-size: 16px;
    font-weight: 500;
}

.section-title {
    font-size: 14px;
    opacity: 0.7;
    margin: 15px 0 10px 0;
}

.dashboard-widgets {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.widget {
    background-color: rgba(13, 12, 45, 0.7);
    border-radius: 10px;
    padding: 15px;
    flex: 1 1 calc(50% - 5px);
}

/* Tracking Card */
.tracking-card .card-content {
    background-color: rgba(13, 12, 45, 0.7);
    border-radius: 15px;
    padding: 20px;
    height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tracking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.tracking-title {
    font-size: 20px;
    font-weight: 600;
}

.tracking-menu {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tracking-menu span {
    display: block;
    width: 4px;
    height: 4px;
    background-color: white;
    border-radius: 50%;
    position: relative;
}

.tracking-menu span::before,
.tracking-menu span::after {
    content: '';
    position: absolute;
    width: 4px;
    height: 4px;
    background-color: white;
    border-radius: 50%;
}

.tracking-menu span::before {
    top: -6px;
}

.tracking-menu span::after {
    top: 6px;
}

.tracking-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stat-box {
    background-color: rgba(13, 12, 45, 0.9);
    border-radius: 10px;
    padding: 15px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.7;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
}

.gauge-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 20px auto 0;
}

.gauge-bg {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 10px solid rgba(255, 255, 255, 0.1);
    border-top: 10px solid #9d4edd;
    transform: rotate(45deg);
}

.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.gauge-number {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
}

.gauge-label {
    font-size: 14px;
    opacity: 0.7;
    margin-top: 5px;
}

/* Container for cards */
.container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    padding: 40px 20px;
}

/* Responsive adjustments */
@media (max-width: 1100px) {
    .container {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .insight-card {
        width: 100%;
        max-width: 400px;
    }
}

@media (max-width: 480px) {
    .card-title {
        font-size: 24px;
    }
    
    .card-subtitle {
        font-size: 14px;
    }
    
    .stats-value {
        font-size: 28px;
    }
    
    .stats-chart {
        height: 150px;
    }
    
    .gauge-container {
        width: 120px;
        height: 120px;
    }
    
    .gauge-number {
        font-size: 30px;
    }
}