:root {
    --primary-gold: #D4AF37;
    --dark-gold: #AA8C2C;
    --light-gold: #F4E5B2;
    --navbar-bg: #1A1A1A; /* Dark Background */
    --dark-bg: #1A1A1A;
    --light-bg: #F8F9FA;
    --text-dark: #333333;
    --text-light: #FFFFFF;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-dark);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
}

.text-gold {
    color: var(--primary-gold) !important;
}

.bg-gold {
    background-color: var(--primary-gold) !important;
    color: var(--text-dark);
}

.bg-dark-custom {
    background-color: var(--dark-bg) !important;
    color: var(--text-light);
}

/* Navbar */
.navbar {
    background-color: var(--navbar-bg);
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    border-bottom: none;
}

.navbar-brand {
    color: var(--primary-gold) !important;
    font-weight: bold;
    font-size: 1.5rem;
}

.logo-glow {
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.3));
    transition: all 0.3s ease;
}

.logo-glow:hover {
    filter: drop-shadow(0 0 8px rgba(212, 175, 55, 0.6));
    transform: scale(1.05);
}

.nav-link {
    color: var(--text-light) !important;
    font-weight: normal;
    margin-left: 0;
    transition: color 0.3s;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-gold) !important;
    background-color: transparent;
}

/* Underline effect for links - Removed for classic look or kept if desired, but user said "as it was" */
.nav-link::after {
    display: none;
}

/* Hero Section */
.hero-section {
    /* Background: Dollars and Financial Signs/Charts */
    background: linear-gradient(rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.75)), url('https://images.unsplash.com/photo-1580519542036-c47de6196ba5?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 85vh;
    display: flex;
    align-items: center;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, var(--light-bg), transparent);
}

.hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--primary-gold);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.8rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

.btn-gold {
    background: linear-gradient(45deg, var(--primary-gold), var(--dark-gold));
    color: var(--dark-bg);
    border: none;
    padding: 15px 35px;
    font-weight: bold;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-gold::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: rgba(255,255,255,0.2);
    transition: width 0.3s;
    z-index: -1;
}

.btn-gold:hover::before {
    width: 100%;
}

.btn-gold:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

/* Services Cards */
.service-card {
    border: none;
    transition: all 0.4s ease;
    height: 100%;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-bottom: 3px solid var(--primary-gold);
    border-radius: 15px;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.service-icon {
    font-size: 3.5rem;
    color: var(--primary-gold);
    margin-bottom: 1.5rem;
    transition: transform 0.4s;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

/* Converter Widget */
.converter-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    overflow: hidden;
    border: 1px solid rgba(212, 175, 55, 0.2);
}

.converter-header {
    background: var(--dark-bg);
    padding: 20px;
    color: var(--primary-gold);
    text-align: center;
}

.converter-body {
    padding: 30px;
}

/* Official Links Section */
.official-link-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
    border: 1px solid #eee;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.official-link-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.08);
    border-color: var(--primary-gold);
}

.official-link-img {
    height: 60px;
    object-fit: contain;
    margin-bottom: 15px;
    filter: grayscale(100%);
    transition: filter 0.3s;
}

.official-link-card:hover .official-link-img {
    filter: grayscale(0%);
}

/* Financial Table */
.financial-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
}

.financial-header {
    background: linear-gradient(135deg, var(--dark-bg) 0%, #2c3e50 100%);
    color: var(--primary-gold);
    padding: 20px;
    border-bottom: 4px solid var(--primary-gold);
}

.financial-table thead th {
    background-color: #f8f9fa;
    color: var(--dark-bg);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6;
    padding: 15px;
}

.financial-table tbody tr {
    transition: all 0.2s;
}

.financial-table tbody tr:hover {
    background-color: rgba(212, 175, 55, 0.05);
    transform: scale(1.005);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    z-index: 1;
    position: relative;
}

.financial-table td {
    padding: 15px;
    vertical-align: middle;
    font-weight: 500;
    border-bottom: 1px solid #f1f1f1;
}

.currency-icon {
    width: 40px;
    height: 40px;
    background: var(--light-bg);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    color: var(--dark-bg);
    font-weight: bold;
    font-size: 0.8rem;
    border: 1px solid #eee;
}

.trend-indicator {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.trend-up {
    background-color: rgba(25, 135, 84, 0.1);
    color: #198754;
}

.trend-down {
    background-color: rgba(220, 53, 69, 0.1);
    color: #dc3545;
}

.trend-stable {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

/* Footer */
footer {
    background-color: var(--dark-bg);
    color: white;
    padding: 50px 0 20px;
    border-top: 5px solid var(--primary-gold);
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--primary-gold);
}

/* Ticker Styles */
.rates-ticker-wrapper {
    height: 50px;
    overflow: hidden;
}

.ticker-title {
    min-width: 60px;
    z-index: 10;
    box-shadow: 5px 0 15px rgba(0,0,0,0.3);
    white-space: nowrap;
}

@media (min-width: 576px) {
    .ticker-title {
        min-width: 140px;
    }
}

.ticker-content-wrapper {
    height: 100%;
    direction: ltr; /* Force LTR for consistent scrolling coordinates */
}

.ticker-track {
    direction: ltr; /* Force LTR for consistent animation direction */
    height: 100%;
    animation: ticker-scroll 60s linear infinite;
    width: max-content; 
    display: flex;
    will-change: transform; /* Optimize for mobile */
    transform: translate3d(0, 0, 0); /* Hardware acceleration hint */
}

.ticker-content-wrapper:hover .ticker-track {
    animation-play-state: paused;
}

.ticker-item {
    height: 100%;
    transition: background-color 0.3s;
    /* Ensure text direction is correct inside items */
    direction: rtl; 
    display: flex;
    align-items: center;
    padding: 0 2rem;
    border-right: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
}

.ticker-item:hover {
    background-color: rgba(255,255,255,0.05);
    cursor: pointer;
}

@keyframes ticker-scroll {
    0% { 
        transform: translate3d(0, 0, 0); 
        -webkit-transform: translate3d(0, 0, 0);
    }
    100% { 
        transform: translate3d(-50%, 0, 0); 
        -webkit-transform: translate3d(-50%, 0, 0);
    }
}

@-webkit-keyframes ticker-scroll {
    0% { 
        -webkit-transform: translate3d(0, 0, 0); 
        transform: translate3d(0, 0, 0); 
    }
    100% { 
        -webkit-transform: translate3d(-50%, 0, 0); 
        transform: translate3d(-50%, 0, 0); 
    }
}

/* Responsive */
@media (max-width: 991px) {
    .hero-section {
        height: auto;
        padding: 120px 0 60px; /* Increased top padding for fixed navbar */
    }
    .hero-title {
        font-size: 3rem;
    }
    .converter-card {
        margin-top: 3rem;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    /* Removed fixed height to allow content to flow */
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }
    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }
}

/* Features Section */
.feature-box {
    padding: 30px;
    border-radius: 15px;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s;
    height: 100%;
    border: 1px solid #eee;
    text-align: center;
}

.feature-box:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: var(--primary-gold);
}

.feature-icon-wrapper {
    width: 80px;
    height: 80px;
    background: var(--light-bg);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.3s;
}

.feature-box:hover .feature-icon-wrapper {
    background: var(--primary-gold);
    color: white;
}

.feature-icon {
    font-size: 2rem;
    color: var(--primary-gold);
    transition: all 0.3s;
}

.feature-box:hover .feature-icon {
    color: white;
}

/* Partner Links */
.partner-link {
    opacity: 0.7;
    transition: all 0.3s;
}

.partner-link:hover {
    opacity: 1;
    transform: translateY(-5px);
}

.partner-link:hover i {
    color: var(--primary-gold) !important;
}

.hover-gold {
    transition: color 0.3s;
}

.hover-gold-bg:hover {
    background-color: var(--primary-gold);
    color: white !important;
    border-color: var(--primary-gold) !important;
}

.hover-gold-bg:hover i, .hover-gold-bg:hover h6 {
    color: white !important;
}

/* Logo Animation */
.navbar-brand img {
    transition: transform 0.3s;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.partner-link-footer {
    transition: all 0.3s;
}

.partner-link-footer:hover {
    color: var(--primary-gold) !important;
    transform: translateX(-5px);
}

.partner-link-footer:hover i {
    color: white !important;
}
