/* Embed Vazir Font */
/* @font-face {
    font-family: 'Vazir';
    src: local('Vazir'),
         url('fonts/Vazir.woff2') format('woff2'),
         url('https://cdn.jsdelivr.net/gh/rastikerdar/vazir-font@v30.1.0/dist/Vazir.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
} */

body {
    font-family: 'Vazirmatn', Tahoma, Arial, sans-serif;
    background-color: #ffffff;
    text-align: center;
    margin: 0;
    padding: 30vh 0 0 0; /* Add top padding */
    box-sizing: border-box;
}

/* Title container for vertical centering */
.title-container {
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Content container for all other elements */
.content-container {
    padding: 20px;
}

.header {
    font-size: 3.5rem; /* Adjust font size as needed */
    font-weight: bold;
    color: #333; /* Adjust color for better visibility */
    margin-bottom: 30px;
    text-align: center;
    margin-top: 20px; /* Add spacing from the top */
    font-family: 'Vazir', sans-serif; /* Use the imported font */
}

.display1 {
    font-size: 3.5rem;
    color: #e74c3c;
    margin-bottom: 10px;
    font-weight: bold;
}

.display2 {
    font-size: 2.2rem;
    color: #3498db;
    margin-top: 10px;
}

.currency, .unit {
    font-size: 1.4rem;
    color: #555;
    margin-bottom: 10px;
}

/* Status Animation */
.status {
    font-size: 0.9rem;
    color: #e74c3c;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0% { opacity: 1; }
    50% { opacity: 0; }
    100% { opacity: 1; }
}

/* Layout Elements */
.spacer {
    height: 150px;
}

.date-time {
    font-size: 1.2rem;
    font-weight: bold;
    color: #000;
    margin: 0 auto;
    display: block;
}

.separator {
    width: 80%;
    height: 1px;
    background-color: #ccc;
    margin: 15px auto;
}

/* Quote Card Styles - New Design */
.quote-box {
    max-width: 800px;
    margin: 30px auto;
    padding: 25px 30px;
    background-color: #f9f9f9;
    border-radius: 10px;
    border-right: 5px solid #e74c3c;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    direction: rtl;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quote-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.quote-title {
    font-size: 1.3rem;
    font-weight: bold;
    color: #e74c3c;
    margin-bottom: 20px;
    padding-right: 0;
    position: relative;
    text-align: right !important; /* Add !important to override any other styles */
    direction: rtl !important;    /* Add !important to override any other styles */
    display: block;
    width: 100%;
    float: right;                /* Add this to force right alignment */
    clear: both;                 /* Add this to ensure proper positioning */
}

/* Remove these pseudo-elements if they're causing issues */
/*
.quote-title::before {
    content: "«";
    margin-left: 5px;
    color: #e74c3c;
}

.quote-title::after {
    content: "»";
    margin-right: 5px;
    color: #e74c3c;
}
*/

.quote-text {
    font-size: 1.1rem;
    line-height: 1.9;
    text-align: justify;
    color: #34495e;
    margin-bottom: 20px;
    padding-right: 10px;
    position: relative;
}

.quote-source {
    font-size: 0.9rem;
    color: #7f8c8d;
    text-align: left;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
    font-style: italic;
}

/* DELETE THESE DUPLICATE RULES (lines 110-130) */
/* 
.quote-text {
    font-size: 1.1rem;
    line-height: 2;
    text-align: justify;
    color: #2c3e50;
    margin-bottom: 20px;
    position: relative;
}

.quote-source {
    font-size: 0.9rem;
    color: #7f8c8d;
    text-align: left;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
}
*/

/* Disclaimer Styles */
.disclaimer {
    font-size: 0.85rem;
    text-align: justify;
    direction: rtl;
    max-width: 800px;
    margin: 0 auto;
}

.disclaimer-title {
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
}

/* Historical Data Table Styles */
.historical-table-container {
    margin: 30px auto;
    max-width: 800px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.historical-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 1rem;
    direction: rtl;
    min-width: 600px;
}

.historical-table th, 
.historical-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: center;
}

.historical-table th {
    background-color: #f8f8f8;
    font-weight: bold;
}

.historical-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.historical-table tr:hover {
    background-color: #f1f1f1;
}

.dedication {
    font-size: 0.9rem;
    color: #666;
    max-width: 800px;
    margin: 30px auto;
    text-align: center;
    font-style: italic;
    padding: 20px 0;
}

/* Responsive Styles */
@media screen and (max-width: 768px) {
    body { padding: 10px; }
    .header { font-size: 1.8rem; margin-bottom: 20px; }
    .display1, .display2 { font-size: 1.6rem; }
    .currency, .unit { font-size: 1.1rem; }
    .date-time { font-size: 1rem; }
    .historical-table-container { max-width: 100%; margin: 20px auto; }
    .historical-table { font-size: 0.9rem; }
    .historical-table th, .historical-table td { padding: 6px 4px; }
    .disclaimer { font-size: 0.8rem; padding: 0 10px; }
    .disclaimer-title { font-size: 1rem; }
    .quote-box { padding: 20px; }
    .quote-text { font-size: 1rem; }
    .quote-title { font-size: 1.1rem; }
}

@media screen and (max-width: 480px) {
    .header { font-size: 1.5rem; }
    .display1, .display2 { font-size: 1.3rem; }
    .currency, .unit { font-size: 1rem; }
    .historical-table { font-size: 0.8rem; }
    .historical-table th, .historical-table td { padding: 4px 2px; }
    .quote-text { font-size: 0.9rem; }
    .quote-title { font-size: 1rem; }
}