/* CSS Variables and Reset */
:root {
    --old-gold: #D0BA01;
    --molten-lava: #731302;
    --golden-earth: #A56A03;
    --coffee-bean: #100304;
    --text-white: #ffffff;
    --text-glass: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(16, 3, 4, 0.7);
    --transition: all 0.3s ease-in-out;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--coffee-bean);
    color: var(--text-white);
    direction: rtl;
    overflow-x: hidden;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* Glassmorphism Utility */
.glass-panel {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px border rgba(255, 255, 255, 0.1);
    border-radius: 15px;
}

/* Header */
header {
    background: var(--coffee-bean);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--old-gold);
}

.logo-container img {
    height: 60px;
    width: auto;
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.5));
    transition: var(--transition);
}

.logo-container img:hover {
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.8));
}

.desktop-nav ul {
    display: flex;
    gap: 30px;
}

.desktop-nav a {
    font-weight: 600;
    transition: var(--transition);
}

.desktop-nav a:hover {
    color: var(--old-gold);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--old-gold);
    font-size: 1.5rem;
    cursor: pointer;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--old-gold);
}

/* Ticker */
.ticker-wrapper {
    background: var(--golden-earth);
    color: white;
    padding: 10px 0;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    direction: ltr;
    /* Animation works better with LTR container */
}

.ticker-content {
    display: inline-block;
    padding-left: 100%;
    animation: ticker 40s linear infinite;
}

.ticker-item {
    display: inline-block;
    padding: 0 40px;
    font-weight: bold;
    direction: rtl;
    /* Text inside items remains RTL */
}

@keyframes ticker {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

/* Hero Section */
.hero {
    height: 80vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    filter: brightness(0.4);
}

.hero-content h1 {
    font-size: 3.5rem;
    background: linear-gradient(to bottom, var(--old-gold), var(--golden-earth));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
    font-weight: 900;
}

.hero-content p {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    color: var(--text-glass);
}

.cta-button {
    background: linear-gradient(45deg, var(--molten-lava), var(--golden-earth));
    color: white;
    padding: 15px 40px;
    border-radius: 30px;
    font-weight: bold;
    font-size: 1.2rem;
    transition: var(--transition);
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    margin-top: 40px;
    /* Added 40px offset as requested */
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(208, 186, 1, 0.3);
}

/* Sections General */
section {
    padding: 80px 5%;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--old-gold);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--molten-lava);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text h3 {
    color: var(--golden-earth);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.about-text p {
    color: var(--text-glass);
    margin-bottom: 1rem;
}

.values-list {
    display: flex;
    gap: 30px;
    margin-top: 30px;
}

.value-item {
    text-align: center;
}

.value-item i {
    font-size: 2rem;
    color: var(--old-gold);
    margin-bottom: 10px;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    padding: 40px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-10px);
    border-color: var(--old-gold);
}

.service-card i {
    font-size: 3rem;
    color: var(--old-gold);
    margin-bottom: 20px;
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--golden-earth);
}

/* Contact & Footer */
.footer {
    background: #080202;
    padding: 60px 5% 20px;
    border-top: 2px solid var(--molten-lava);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--old-gold);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links li {
    margin-bottom: 10px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: var(--molten-lava);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--old-gold);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    color: #666;
}

/* Converter Section */
.converter-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
}

.converter-box {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.input-group label {
    font-weight: 600;
    color: var(--old-gold);
}

.input-group input,
.input-group select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    color: white;
    font-size: 1.1rem;
    outline: none;
    transition: var(--transition);
}

.input-group option {
    background: var(--coffee-bean);
}

.input-group input:focus,
.input-group select:focus {
    border-color: var(--old-gold);
}

.converter-controls {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: flex-end;
    gap: 20px;
}

.swap-btn {
    background: var(--molten-lava);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.swap-btn:hover {
    background: var(--old-gold);
    transform: rotate(180deg);
}

.result-area {
    text-align: center;
    padding: 20px;
    background: rgba(208, 186, 1, 0.1);
    border-radius: 15px;
}

/* Official Rates Cards */
.official-rates-container {
    margin-top: 50px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(208, 186, 1, 0.2);
}

.rates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.rate-card {
    background: var(--bg-glass);
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
}

.rate-card:hover {
    border-color: var(--old-gold);
    transform: translateY(-5px);
}

.rate-card .currency-name {
    font-weight: bold;
    color: var(--old-gold);
    display: block;
    margin-bottom: 10px;
}

.rate-card .rate-value {
    font-size: 1.5rem;
    font-weight: 800;
}

.rate-card .buy-sell {
    display: flex;
    justify-content: space-around;
    margin-top: 10px;
    font-size: 0.85rem;
    color: #bbb;
}

.rate-card .buy-sell span b {
    color: var(--text-white);
}

.source-info {
    font-size: 0.85rem;
    color: #888;
    text-align: center;
}

.source-info a {
    color: var(--old-gold);
    text-decoration: underline;
}

.rate-card.loading {
    grid-column: 1 / -1;
    padding: 40px;
    color: var(--old-gold);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--coffee-bean);
    z-index: 2000;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.mobile-menu-content ul {
    text-align: center;
}

.mobile-menu-content li {
    margin: 20px 0;
}

.mobile-menu-content a {
    font-size: 2rem;
    font-weight: 700;
}

.close-menu {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--old-gold);
    font-size: 2rem;
    cursor: pointer;
}

/* Responsiveness Update */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .contact-header {
        display: none;
    }

    .desktop-nav {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .about-grid {
        grid-template-columns: 1fr;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .converter-controls {
        grid-template-columns: 1fr;
    }

    .swap-btn {
        margin: 0 auto;
        transform: rotate(90deg);
    }

    .swap-btn:hover {
        transform: rotate(270deg);
    }
}

/* WhatsApp Hub */
.whatsapp-hub {
    position: fixed;
    bottom: 24px;
    left: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.hub-btn {
    width: 60px;
    height: 60px;
    background: linear-gradient(45deg, #25D366, #128C7E);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hub-btn:hover {
    transform: scale(1.1);
}

.hub-btn.active {
    transform: rotate(45deg);
}

.online-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 12px;
    height: 12px;
    background: #00ff00;
    border: 2px solid white;
    border-radius: 50%;
}

.hub-menu {
    display: none;
    flex-direction: column;
    gap: 10px;
}

.hub-menu.show {
    display: flex;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hub-item {
    background: white;
    color: #333;
    padding: 10px 20px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    width: 200px;
    justify-content: space-between;
    transition: var(--transition);
}

.hub-item:hover {
    background: #E9FBEF;
    transform: translateX(10px);
}

.hub-item i {
    color: #25D366;
}

/* Modal Styling */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    max-width: 600px;
    width: 100%;
    padding: 40px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--bg-glass);
    border: 1px solid var(--old-gold);
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--old-gold);
    font-size: 2rem;
    cursor: pointer;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--old-gold);
    font-weight: 600;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    outline: none;
}

.form-group input:focus {
    border-color: var(--old-gold);
}

.docs-checklist,
.declaration {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.docs-checklist p {
    color: var(--old-gold);
    margin-bottom: 10px;
    font-weight: bold;
}

.docs-checklist label,
.declaration label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}