* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@font-face {
    font-family: 'Yajo';
    src: url('../fonts/Yajo-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}


:root {
    --primary: #239f40;
    --primary-light: #6366f1;
    --primary-dark: #4338ca;
    --accent: #7c3aed;
    --light: #fafafa;
    --dark: #1f2937;
    --gray: #6b7280;
    --gray-light: #f3f4f6;
    --border: #e5e7eb;
    --bg-soft: #fafbfc;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Yajo', sans-serif;
    background: linear-gradient(135deg, rgba(249, 250, 251, 0.97) 0%, rgba(243, 244, 246, 0.95) 100%);
    color: var(--dark);
    height: 100vh;
    height: 100dvh;
    overflow: hidden; 
    display: flex;
    flex-direction: column;
    position: relative;
}

.background-effects {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.bg-circle {
    position: absolute;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.03) 0%, rgba(124, 58, 237, 0.02) 100%);
    filter: blur(60px);
    transition: all 0.5s ease;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-grow: 1; 
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: clamp(20px, 5vw, 40px) clamp(16px, 4vw, 20px) 80px; 
    position: relative;
    z-index: 1;
    transition: opacity 0.5s ease;
}

.container.hidden {
    display: none;
}

.logo-container {
    text-align: center;
    position: relative;
    width: 100%;
}

.logo {
    font-size: clamp(3.5rem, 15vw, 6rem);
    font-weight: 700;
    color: transparent;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    margin-bottom: 5px;
    letter-spacing: -2px;
    position: relative;
    display: inline-block;
    line-height: 1.1;
}

.logo img {
    width: 3.5em;
}

.tagline {
    font-size: clamp(0.95rem, 4vw, 1.2rem);
    color: var(--gray);
    font-weight: 300;
    margin-top: 0px;
    margin-bottom: 0px;
    opacity: 0;
    animation: fadeIn 1s 0.5s forwards;
    padding: 0 10px;
    line-height: 1.2;
}

.search-container {
    width: 75%;
    position: relative;
    margin-bottom: 30px;
    opacity: 0;
    animation: fadeInUp 0.8s 0.3s forwards;
}

.search-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.search-input {
    width: 100%;
    padding: 12px 20px 14px 100px;
    font-size: 20px;
    line-height: 1.6;
    border: 1.5px solid var(--border);
    border-radius: 5px;
    outline: none;
    background-color: white;
    transition: all 0.3s ease;
    color: var(--dark);
    font-family: 'Yajo', sans-serif;
    height: 50px;
    min-height: 50px;
    display: flex;
    align-items: center;
    vertical-align: middle;
}


.search-input::placeholder {
    font-family: Helvetica, sans-serif !important;
}

.search-input::-webkit-input-placeholder {
    font-family: 'Amiri', serif;
    color: var(--gray);
    font-size: clamp(1rem, 4vw, 1.2rem);
    font-weight: 400;
    opacity: 0.8;
    border: 0 !important;
}

.search-input::-moz-placeholder {
    font-family: 'Amiri', serif;
    color: var(--gray);
    font-size: clamp(1rem, 4vw, 1.2rem);
    font-weight: 400;
    opacity: 0.8;
    border: 0 !important;
}

.search-input:-ms-input-placeholder {
    font-family: 'Amiri', serif;
    color: var(--gray);
    font-size: clamp(1rem, 4vw, 1.2rem);
    font-weight: 400;
    opacity: 0.8;
    border: 0 !important;
}

.search-buttons {
    position: absolute;
    left: clamp(12px, 3vw, 20px);
    display: flex;
    gap: clamp(6px, 2vw, 10px);
    align-items: center;
    height: 100%;
    z-index: 2;
}

.search-icon-btn {
    background: none;
    border: none;
    color: var(--gray);
    font-size: clamp(1.1rem, 4vw, 1.3rem);
    cursor: pointer;
    padding: clamp(6px, 2vw, 8px);
    transition: all 0.2s ease;
    border-radius: 5%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.search-icon-btn:hover {
    background-color: var(--gray-light);
    color: var(--primary);
}

.search-icon-btn:active {
    transform: scale(0.95);
}

.indexed-pages-info {
    text-align: center;
    margin-top: 15px;
    font-size: 0.95rem;
    color: var(--gray);
    opacity: 0;
    animation: fadeInUp 0.8s 0.6s forwards;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.indexed-pages-info i {
    color: var(--primary);
    font-size: 0.9rem;
}

.indexed-pages-info span {
    font-weight: 700;
    color: var(--dark);
    letter-spacing: 1px;
    background: var(--primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.article-container {
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    padding: 40px 20px 80px 20px;
    display: none;
    direction: rtl;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto; 
    -webkit-overflow-scrolling: touch; 
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    background-color: transparent;
}

.article-container.show {
    display: block;
}

.article-header {
    margin-bottom: 40px;
    text-align: center;
}

.article-header img {
    width: 16rem;
}

.article-header h1 {
    font-family: 'El Messiri', cursive;
    font-size: 3.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 15px;
    line-height: 1.2;
}

.article-header .subhead {
    font-size: 1.2rem;
    color: var(--gray);
    font-weight: 300;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.article-content {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--dark);
    text-align: justify;
}

.article-content p {
    margin-bottom: 25px;
    opacity: 0;
    animation: fadeInUp 0.6s forwards;
}

.article-content p:nth-child(1) {
    animation-delay: 0.1s;
}

.article-content p:nth-child(2) {
    animation-delay: 0.2s;
}

.article-content p:nth-child(3) {
    animation-delay: 0.3s;
}

.article-content p:nth-child(4) {
    animation-delay: 0.4s;
}

.article-content p:nth-child(5) {
    animation-delay: 0.5s;
}

.article-content p:nth-child(6) {
    animation-delay: 0.6s;
}

.article-content p:nth-child(7) {
    animation-delay: 0.7s;
}

.article-content p:nth-child(8) {
    animation-delay: 0.8s;
}

.article-content p:nth-child(9) {
    animation-delay: 0.9s;
}

.article-content strong {
    color: var(--primary);
    font-weight: 700;
    font-size: 1.2rem;
    display: inline-block;
    margin-top: 10px;
}

.section-break {
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
    margin: 40px auto;
    opacity: 0.2;
}

.back-button {
    position: fixed;
    top: 30px;
    left: 30px;
    color: white;
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: 11px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: rgb(136 136 136 / 95%);
    opacity: 0;
    transform: translateY(-20px);
    pointer-events: none;
    font-family: 'Yajo', sans-serif;
}

.back-button.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-button:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.footer {
    width: 100%;
    padding: clamp(12px, 3vh, 20px) clamp(16px, 4vw, 30px);
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-top: 1px solid var(--border);
    z-index: 10;
    opacity: 0;
    animation: fadeIn 1s 1s forwards;
    margin-top: auto; 
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 12px 20px;
}

.footer-links {
    display: flex;
    gap: clamp(16px, 3vw, 28px);
    flex-wrap: wrap;
    align-items: center;
}

.footer-link {
    color: var(--gray);
    font-size: clamp(0.8rem, 2.5vw, 0.95rem);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
    white-space: nowrap;
    padding: 4px 0;
    cursor: pointer;
}

@media (max-width: 700px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .article-header h1 {
        font-size: 2.4rem;
    }

    .back-button {
        top: 20px;
        left: 20px;
        padding: 8px 18px;
        font-size: 0.9rem;
    }

    .search-container {
        width: 90%;
    }
}

.footer-link:hover {
    color: var(--primary);
}

.footer-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 1px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

.footer-link:hover::after {
    width: 100%;
}

.copyright {
    color: var(--gray);
    font-size: clamp(0.8rem, 2.4vw, 0.9rem);
    white-space: nowrap;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

[dir="rtl"] .search-input {
    padding: 12px 20px 14px 100px;
}

[dir="rtl"] .search-buttons {
    left: clamp(12px, 3vw, 20px);
    right: auto;
}

[dir="rtl"] .back-button {
    left: 30px;
    right: auto;
}

[dir="rtl"] .back-button i {
    transform: rotate(180deg);
}

[dir="rtl"] .back-button:hover i {
    transform: rotate(180deg) translateX(-5px);
}
.pwa-install-container {
    margin-top: 2rem;
    text-align: center;
}

.pwa-install-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    background-color: var(--primary);
    color: #fff;
    font-family: 'Yajo';
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.16);
    transition: background-color 0.2s ease, transform 0.1s ease, box-shadow 0.2s ease;
}

.pwa-install-button i {
    font-size: 0.95rem;
}

.pwa-install-button:hover {
    background-color: #1f8a37; 
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.22);
}

.pwa-install-button:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}
