/* ========================================
   Quran Waqf - Main Styles
   ======================================== */

:root {
    --primary: #1a7f5a;
    --primary-dark: #145a40;
    --secondary: #f5a623;
    --dark: #2c3e50;
    --light: #ecf0f1;
    --white: #ffffff;
    --gray: #95a5a6;
    --success: #27ae60;
    --danger: #e74c3c;
    
    --font-arabic: 'Noto Sans Arabic', sans-serif;
    --font-latin: 'Roboto', sans-serif;
    
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.15);
    --transition: all 0.3s ease;
}

/* ========================================
   Reset & Base
   ======================================== */

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

body {
    font-family: var(--font-latin);
    line-height: 1.6;
    color: var(--dark);
    background: var(--white);
}

body[dir="rtl"] {
    font-family: var(--font-arabic);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Header & Navigation
   ======================================== */

.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--primary);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--primary);
}

/* Language Switcher */
.lang-switcher {
    position: relative;
}

.lang-btn {
    background: var(--light);
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: 5px;
    margin-top: 0.5rem;
    min-width: 150px;
    display: none;
}

.lang-switcher:hover .lang-dropdown {
    display: block;
}

.lang-dropdown a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--dark);
    text-decoration: none;
    transition: var(--transition);
}

.lang-dropdown a:hover,
.lang-dropdown a.active {
    background: var(--primary);
    color: var(--white);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* ========================================
   Hero Section
   ======================================== */

.hero {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 8rem 0 6rem;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,160C384,160,480,128,576,122.7C672,117,768,139,864,149.3C960,160,1056,160,1152,138.7C1248,117,1344,75,1392,53.3L1440,32L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    animation: wave 10s linear infinite;
}

@keyframes wave {
    0% { background-position: 0 0; }
    100% { background-position: 1440px 0; }
}

/* ========================================
   Buttons
   ======================================== */

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-primary {
    background: var(--secondary);
    color: var(--white);
}

.btn-primary:hover {
    background: #e09416;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    border-color: var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--primary);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* ========================================
   Statistics Section
   ======================================== */

.stats-section {
    padding: 4rem 0;
    background: var(--light);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    color: var(--gray);
}

/* ========================================
   How It Works Section
   ======================================== */

.how-section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.step-card {
    text-align: center;
    padding: 2rem;
    position: relative;
}

.step-number {
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.step-icon {
    font-size: 3rem;
    margin: 2rem 0 1rem;
}

.step-card h3 {
    margin-bottom: 1rem;
    color: var(--dark);
}

.step-card p {
    color: var(--gray);
}

/* ========================================
   Recent Registrations
   ======================================== */

.recent-section {
    padding: 5rem 0;
    background: var(--light);
}

.recent-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.recent-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.recent-card:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.recent-flag {
    font-size: 2rem;
}

.recent-info {
    flex: 1;
}

.recent-name {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.recent-meta {
    font-size: 0.9rem;
    color: var(--gray);
}

.recent-link {
    font-size: 1.5rem;
    text-decoration: none;
}

/* ========================================
   Top Visited Section
   ======================================== */

.top-section {
    padding: 5rem 0;
}

.top-list {
    max-width: 800px;
    margin: 0 auto;
}

.top-item {
    background: var(--white);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.top-rank {
    background: var(--primary);
    color: var(--white);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.top-flag {
    font-size: 1.5rem;
}

.top-name {
    flex: 1;
    font-weight: 600;
}

.top-visits {
    color: var(--gray);
    margin-right: 1rem;
}

/* ========================================
   CTA Section
   ======================================== */

.cta-section {
    background: var(--primary);
    color: var(--white);
    padding: 5rem 0;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* ========================================
   Footer
   ======================================== */

.footer {
    background: var(--dark);
    color: var(--white);
    padding: 3rem 0 1rem;
}

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: var(--secondary);
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: var(--light);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--secondary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: var(--gray);
}

/* ========================================
   Responsive
   ======================================== */

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .stats-grid,
    .steps-grid {
        grid-template-columns: 1fr;
    }
}
