/* ========================================
   Add custom fonts
   ======================================== */
@font-face {
    font-family: 'ArbFONTS';
    src: url('/assets/fonts/ArbFonts.com/ArbFONTS-The-Sans-Plain.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'ArbFONTS';
    src: url('/assets/fonts/ArbFonts.com/ArbFONTS-TheSans-Plain.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'ArbFONTS';
    src: url('/assets/fonts/ArbFonts.com/ArbFONTS-TheSans-Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* ========================================
   Global Styles & Variables
   ======================================== */
   
:root {
    --dark-blue: #1e5e80fc;
    --dark-red: #480f0e;
    --dark-red-hover: #470d0d;
    --primary-blue: #1e5e80fc;       /* previously dark-blue */
    --primary-blue-hover: #184b66;
    --beige: #d1c3bb;
    --light-beige: #e9e7e5;
    --brown: #885b4e;
    --text-dark: #1f2937;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {

    font-family: 'ArbFONTS', 'Tajawal', sans-serif;
    /* font-family: 'Tajawal', sans-serif; */
    background-image: url('/assets/img/background.jpeg');
    /* background-image: url('https://ext.same-assets.com/3458770651/2645181613.jpeg'); */
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: #333;
    direction: rtl;
    text-align: right;
    user-select: none;
}

.result-main-term{
    color: #333 !important;
}
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

/* ========================================
   Header Styles
   ======================================== */
.site-header {
    background-color: transparent;
    padding: 1rem 0;
}

.header-logo {
    max-height: 60px;
    width: auto;
}

/* ========================================
   Navigation Styles
   ======================================== */
.main-navigation {
    background-color: var(--primary-blue);
    border-radius: 0.5rem;
    padding: 1rem;
    margin: 0 auto 2rem;
    max-width: 95%;
}

.nav-wrapper {
    position: relative;
}

.desktop-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
}

.nav-link {
    color: white !important;
    text-decoration: none;
    font-weight: 300;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    opacity: 0.8;
}

.nav-link.active {
    font-weight: 500;
}

.dropdown-wrapper {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dropdown-arrow {
    font-size: 0.75rem;
}

.dropdown-menu-custom {
    display: none;
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    z-index: 9999;
    min-width: 220px;
    border: 1px solid #e5e7eb;
}

.dropdown-menu-custom.show {
    display: block;
}

.dropdown-item-custom {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-dark) !important;
    text-decoration: none;
    transition: background-color 0.2s;
}

.dropdown-item-custom:hover {
    background-color: #f3f4f6;
}

/* Mobile Navigation */
.mobile-menu-toggle {
    text-decoration: none;
    color: white;
    font-size: 1.1rem;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.mobile-menu.show {
    display: flex;
}

.mobile-nav-link {
    color: white !important;
    text-decoration: none;
    padding: 0.5rem;
    transition: background-color 0.2s;
}

.mobile-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
}

/* ========================================
   Home Page - Calligraphy Section
   ======================================== */
.calligraphy-section {
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.8), transparent);
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.calligraphy-title {
    max-width: 600px;
    height: auto;
    margin: 0 auto;
}

/* ========================================
   Search Section
   ======================================== */
.search-section {
    max-width: 900px;
    margin: 0 auto 3rem;
}

.search-container {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.search-input-group {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
    min-width: 250px;
}

.search-input {
    width: 100%;
    padding: 0.75rem 3rem 0.75rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(72, 15, 14, 0.1);
}

.search-icon-btn {
    position: absolute;
    left: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
}

.search-results-button {
    background-color: var(--primary-blue);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.search-results-button:hover {
    background-color: var(--primary-blue-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Alphabet Grid
   ======================================== */
.alphabet-section {
    max-width: 700px;
    margin: 0 auto;
}

.alphabet-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.alphabet-letter {
    width: 45px;
    height: 45px;
    background-color: var(--beige);
    border-radius: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
    color: black;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    user-select: none;
}

.alphabet-letter:hover {
    background-color: var(--primary-blue-hover);
    color: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transform: translateY(-2px);
}

.alphabet-letter:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

/* ========================================
   Footer Styles
   ======================================== */
.site-footer {
    margin-top: 5rem;
}

.footer-wrapper {
    background-color: var(--primary-blue);
    background-image: url('/assets/img/squars.svg');
    background-repeat: repeat;
    color: white;
    font-weight: 300;
}

.footer-content {
    padding: 2.5rem 0;
}

.footer-content p {
    margin-bottom: 0;
    line-height: 1.8;
}

.footer-link {
    color: white;
    text-decoration: underline;
    transition: opacity 0.3s;
}

.footer-link:hover {
    opacity: 0.8;
    color: white;
}

.app-store-badge {
    width: 128px;
    height: 40px;
    transition: transform 0.3s;
}

.app-store-badge:hover {
    transform: scale(1.05);
}

.social-icons {
    gap: 1rem;
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.social-icon img {
    width: 24px;
    height: 24px;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .calligraphy-title {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .search-input-group {
        flex-direction: column;
    }
    
    .search-input-wrapper {
        width: 100%;
    }
    
    .search-results-button {
        width: 100%;
    }
    
    .alphabet-letter {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
    
    .footer-content {
        text-align: center;
    }
    
    .social-icons {
        justify-content: center !important;
    }
}

@media (max-width: 576px) {
    .alphabet-letter {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .header-logo {
        max-height: 50px;
    }
    
    .nav-link {
        font-size: 1rem;
    }
}

/* ========================================
   Animations & Utilities
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

/* Print Styles */
@media print {
    .main-navigation,
    .site-footer {
        display: none;
    }
}
