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

:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #f39c12;
    --text-color: #2c3e50;
    --text-light: #7f8c8d;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --gradient-1: linear-gradient(135deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
    --gradient-2: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    --card-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --hover-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

body {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    line-height: 1.8;
    color: var(--text-color);
    direction: rtl;
    background-color: #fafafa;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.3s;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    right: 0;
    width: 0;
    height: 3px;
    background: var(--accent-color);
    transition: width 0.3s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    background: none;
    border: none;
    z-index: 1001;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: 0.3s;
    border-radius: 2px;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Hero Section */
.hero {
    background: var(--gradient-1);
    color: white;
    padding: 250px 0 150px;
    text-align: center;
    margin-top: 70px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 10%, transparent 10%);
    background-size: 50px 50px;
    animation: float 20s linear infinite;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(100px, 100px) rotate(360deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 6rem;
    font-weight: 900;
    margin-bottom: 1rem;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.english-title {
    font-size: 3rem;
    font-weight: 500;
    color: #e67e22;
    cursor: pointer;
    transition: all 0.3s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(230, 126, 34, 0.3);
    padding: 0.5rem 1.5rem;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.english-title:hover {
    color: #ffffff;
    background: rgba(230, 126, 34, 0.2);
    border-color: #e67e22;
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(230, 126, 34, 0.3);
}

.hero-subtitle {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 1rem;
    color: #f39c12;
    animation: fadeInUp 1s ease 0.2s;
    animation-fill-mode: both;
}

.hero-description {
    font-size: 1.3rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.4s;
    animation-fill-mode: both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--white);
}

.section-title {
    font-size: 3.5rem;
    text-align: center;
    margin-bottom: 4rem;
    color: var(--primary-color);
    position: relative;
    font-weight: 800;
}

.section-title::after {
    content: '';
    display: block;
    width: 120px;
    height: 5px;
    background: var(--gradient-2);
    margin: 1.5rem auto;
    border-radius: 10px;
}

.section-subtitle {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-light);
    margin-top: -2.5rem;
    margin-bottom: 3rem;
    line-height: 1.4;
    letter-spacing: 0.5px;
    text-align: center;
}

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

.info-card p strong {
    color: var(--primary-color);
    font-weight: 600;
}

.info-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: var(--gradient-2);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.info-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--hover-shadow);
}

.info-card:hover::before {
    transform: scaleY(1);
}

.info-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.6rem;
    font-weight: 700;
}

.info-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* History Section */
.history {
    padding: 100px 0;
    background: linear-gradient(to bottom, #f8f9fa 0%, #ffffff 100%);
}

.timeline {
    position: relative;
    padding: 2rem 0;
    max-width: 900px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    right: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--gradient-1);
}

.timeline-item {
    display: flex;
    justify-content: center;
    margin-bottom: 4rem;
    position: relative;
}

.timeline-item::after {
    content: '';
    position: absolute;
    right: 50%;
    top: 50%;
    width: 20px;
    height: 20px;
    background: var(--accent-color);
    border-radius: 50%;
    transform: translate(50%, -50%);
    border: 4px solid var(--white);
    box-shadow: 0 0 0 4px rgba(243, 156, 18, 0.2);
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-date {
    flex: 1;
    text-align: left;
    padding: 0 3rem;
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(odd) .timeline-date {
    text-align: right;
    justify-content: flex-end;
}

.timeline-content {
    flex: 1;
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    position: relative;
    transition: all 0.3s ease;
}

.timeline-content:hover {
    transform: scale(1.02);
    box-shadow: var(--hover-shadow);
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .timeline-item {
        -webkit-box-align: center;
        -webkit-align-items: center;
        align-items: center;
    }
    
    .timeline-content {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        will-change: transform;
    }
    
    .timeline-date {
        -webkit-box-flex: 1;
        -webkit-flex: 1;
        flex: 1;
        -webkit-box-align: center;
        -webkit-align-items: center;
        align-items: center;
        -webkit-box-pack: center;
        -webkit-justify-content: center;
        justify-content: center;
    }
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.timeline-content p {
    color: var(--text-light);
}

.timeline-content ul {
    list-style: none;
    padding-right: 0;
}

.timeline-content li {
    position: relative;
    padding-right: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.timeline-content li::before {
    content: '◈';
    position: absolute;
    right: 0;
    color: var(--accent-color);
}

.timeline-content li strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Travelers Section */
.travelers-section {
    margin-top: 5rem;
    padding: 3rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 20px;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.05);
}

.travelers-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 800;
    position: relative;
}

.travelers-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    margin: 1rem auto;
    border-radius: 5px;
}

.travelers-intro {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 2;
    padding: 0 2rem;
}

.travelers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    padding: 0 2rem;
}

.traveler-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    position: relative;
    border-right: 4px solid transparent;
}

.traveler-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
    border-right-color: var(--accent-color);
}

.traveler-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f1f1f1;
}

.traveler-header h4 {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.traveler-date {
    background: var(--accent-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
}

.traveler-card p {
    color: var(--text-light);
    line-height: 1.8;
    font-style: italic;
    margin: 0;
    text-align: justify;
}

/* Narratives Section */
.narratives {
    padding: 100px 0;
    background: var(--light-bg);
}

.narratives-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.narrative-item {
    background: var(--white);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border-right: 4px solid var(--secondary-color);
    position: relative;
    transition: all 0.3s ease;
}

.narrative-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-color), var(--secondary-color));
    border-radius: 20px 20px 0 0;
}

.narrative-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.narrative-item h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.narrative-item h3::before {
    content: '📖';
    font-size: 1.4rem;
    background: linear-gradient(135deg, #2a5298, #1e3c72);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 15px rgba(42, 82, 152, 0.3);
}

.narrative-story {
    padding: 2.5rem;
    background: var(--light-bg);
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

.narrative-story::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, rgba(243, 156, 18, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.narrative-story:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.narrative-story p {
    color: var(--text-light);
    line-height: 1.9;
    font-size: 1.05rem;
    margin: 0 0 1.2rem 0;
    text-align: justify;
    transition: color 0.3s ease;
}

.narrative-story p:last-child {
    margin-bottom: 0;
}

.narrative-story strong {
    color: var(--primary-color);
    font-weight: 700;
    padding: 2px 6px;
    background: rgba(243, 156, 18, 0.1);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.narrative-story strong:hover {
    background: rgba(243, 156, 18, 0.2);
    transform: scale(1.02);
}

/* Culture Section */
.culture {
    padding: 100px 0;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 50%, #f8faff 100%);
    position: relative;
}

.culture::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-persian), var(--secondary-color));
}

.culture-content {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.culture-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2.5rem;
    margin-bottom: 4rem;
}

.culture-feature-card {
    background: linear-gradient(135deg, #fdfeff 0%, #f8faff 100%);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(79, 123, 151, 0.1);
    border-right: 5px solid var(--secondary-color);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.culture-feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(45deg, rgba(79, 123, 151, 0.05), rgba(243, 156, 18, 0.05));
    border-radius: 50%;
    transform: translate(30px, -30px);
    transition: all 0.4s ease;
}

.culture-feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-right-color: var(--accent-persian);
}

.culture-feature-card:hover::before {
    transform: translate(20px, -20px) scale(1.2);
    opacity: 0.8;
}

.culture-feature-card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    z-index: 2;
}

.culture-feature-card h3::before {
    content: '';
    width: 8px;
    height: 8px;
    background: linear-gradient(45deg, var(--secondary-color), var(--accent-persian));
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(79, 123, 151, 0.2);
    transition: all 0.3s ease;
}

.culture-feature-card:hover h3::before {
    transform: scale(1.3);
    box-shadow: 0 0 0 5px rgba(79, 123, 151, 0.3);
}

/* Enhanced list styles for culture feature cards */
.culture-feature-card ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
}

.culture-feature-card li {
    color: #4a5568;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1rem;
    padding: 0.8rem 0 0.8rem 2rem;
    position: relative;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.culture-feature-card li:hover {
    background: rgba(79, 123, 151, 0.05);
    transform: translateX(-5px);
}

.culture-feature-card li::before {
    content: '';
    position: absolute;
    right: 0.8rem;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: var(--secondary-color);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.culture-feature-card li:hover::before {
    background: var(--accent-persian);
    transform: translateY(-50%) scale(1.3);
}

.culture-feature-card p {
    color: #4a5568;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

/* New dialect features styling */
.dialect-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
}

.feature-item {
    background: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    padding: 1.5rem;
    border-left: 4px solid var(--accent-persian);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.feature-item:hover {
    background: rgba(255, 255, 255, 0.95);
    transform: translateX(-3px);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.1);
}

.feature-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.feature-title::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--accent-persian);
    border-radius: 50%;
}

.feature-description {
    color: #5a6c7d;
    font-size: 1rem;
    line-height: 1.6;
}

.feature-examples {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.example-pair {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem 1rem;
    background: rgba(79, 123, 151, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.example-pair:hover {
    background: rgba(79, 123, 151, 0.1);
    transform: scale(1.02);
}

.change-type {
    font-weight: 600;
    color: var(--secondary-color);
    min-width: 80px;
    text-align: center;
    background: var(--white);
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-size: 0.95rem;
}

.example {
    color: var(--primary-color);
    font-size: 1rem;
}

.shahname-words {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.word-example {
    background: linear-gradient(135deg, rgba(79, 123, 151, 0.08), rgba(243, 156, 18, 0.08));
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    color: #4a5568;
    transition: all 0.3s ease;
    border: 1px solid rgba(79, 123, 151, 0.1);
}

.word-example:hover {
    background: linear-gradient(135deg, rgba(79, 123, 151, 0.12), rgba(243, 156, 18, 0.12));
    transform: translateY(-2px);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.word-example strong {
    color: var(--primary-color);
    font-weight: 600;
}

/* Inline etymology styling */
.etymology-examples-inline {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.word-etymology-inline {
    background: rgba(255, 255, 255, 0.7);
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 3px solid var(--accent-persian);
    transition: all 0.3s ease;
}

.word-etymology-inline:hover {
    background: rgba(255, 255, 255, 0.9);
    transform: translateX(-3px);
    box-shadow: 0 3px 12px rgba(243, 156, 18, 0.1);
}

.etymology-header-inline {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1rem;
}

.etymology-header-inline strong {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
}

.poetry-verse-inline {
    background: rgba(79, 123, 151, 0.08);
    padding: 1rem;
    border-radius: 6px;
    font-style: italic;
    color: var(--primary-color);
    margin: 0.8rem 0;
    line-height: 1.7;
    font-size: 0.95rem;
}

.etymology-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.culture-left-column,
.culture-right-column {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.word-etymology {
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(243, 156, 18, 0.1);
    border-right: 4px solid var(--accent-persian);
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.word-etymology::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(243, 156, 18, 0.03), rgba(79, 123, 151, 0.03));
    transform: rotate(-45deg);
    transition: all 0.4s ease;
}

.word-etymology:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    border-right-color: #e67e22;
}

.word-etymology:hover::before {
    transform: rotate(-45deg) scale(1.1);
    opacity: 0.7;
}

.word-etymology strong {
    color: var(--primary-color);
    font-size: 1.25rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
    padding: 0.5rem 1rem;
    background: rgba(79, 123, 151, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.word-etymology strong:hover {
    background: rgba(79, 123, 151, 0.1);
    transform: scale(1.02);
}

/* Etymology card numbering and header - REMOVED */

.etymology-header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding-left: 0;
}

.etymology-header strong {
    background: none;
    padding: 0;
    margin: 0;
    font-size: 1.3rem;
    color: var(--primary-color);
}

.word-meaning {
    color: var(--accent-persian);
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
}

.etymology-details {
    list-style: none;
    padding: 0;
    margin: 0.8rem 0;
}

.etymology-details li {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
    padding-right: 1rem;
    position: relative;
}

.etymology-details li::before {
    content: '•';
    color: var(--secondary-color);
    position: absolute;
    right: 0;
    font-weight: bold;
}

.poetry-verse {
    background: linear-gradient(135deg, #f8faff 0%, #f0f4f8 100%);
    padding: 2rem;
    border-radius: 12px;
    font-style: italic;
    color: var(--primary-color);
    margin: 1.5rem 0;
    border: 1px solid rgba(79, 123, 151, 0.15);
    border-right: 4px solid var(--accent-persian);
    line-height: 2;
    font-size: 1.1rem;
    position: relative;
    transition: all 0.3s ease;
}

.poetry-verse::before {
    content: '"';
    position: absolute;
    top: 0.5rem;
    right: 1rem;
    font-size: 2rem;
    color: rgba(79, 123, 151, 0.3);
    font-family: serif;
}

.poetry-verse::after {
    content: '"';
    position: absolute;
    bottom: 0.5rem;
    left: 1rem;
    font-size: 2rem;
    color: rgba(79, 123, 151, 0.3);
    font-family: serif;
}

.poetry-verse:hover {
    background: linear-gradient(135deg, #f0f4f8 0%, #e8f0f5 100%);
    transform: scale(1.01);
}

.poetry-example {
    color: #666;
    font-size: 0.95rem;
    margin: 0.8rem 0;
}

/* Section divider styling */
.section-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4rem 0;
    gap: 1rem;
}

.divider-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
    max-width: 200px;
}

.divider-icon {
    color: var(--accent-persian);
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
    background: var(--white);
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Enhanced etymology section styling */
.etymology-section {
    margin-top: 2rem;
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
    border-radius: 25px;
    padding: 3rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(79, 123, 151, 0.08);
}

.etymology-section h4 {
    color: var(--primary-color);
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.etymology-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-persian));
    border-radius: 2px;
}

/* Culture Legends Box */
.culture-legends {
    background: var(--light-bg);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    border-right: 4px solid var(--secondary-color);
    position: relative;
}

.culture-legends::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--secondary-color), transparent);
    border-radius: 20px 20px 0 0;
}

.culture-legends h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid rgba(231, 76, 60, 0.1);
}

.culture-legends h3::before {
    content: '📖';
    font-size: 1.4rem;
    background: linear-gradient(135deg, #2a5298, #1e3c72);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(231, 76, 60, 0.3);
}

.culture-text, .culture-highlights {
    background: var(--light-bg);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.culture-text h3,
.culture-highlights h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 2rem;
    font-weight: 700;
}

.culture-text ul,
.culture-highlights ul {
    list-style: none;
    padding-right: 0;
}

.culture-text li,
.culture-highlights li {
    position: relative;
    padding-right: 2.5rem;
    margin-bottom: 1.2rem;
    color: var(--text-light);
    transition: color 0.3s ease;
}

.culture-text li:hover,
.culture-highlights li:hover {
    color: var(--text-color);
}

.culture-text li::before,
.culture-highlights li::before {
    content: '◈';
    position: absolute;
    right: 0;
    color: var(--accent-color);
    font-size: 1.5rem;
    top: -2px;
}

/* Etymology Section Styles */
.etymology-section {
    margin-top: 2.5rem;
    padding: 2rem;
    background: rgba(243, 156, 18, 0.05);
    border-radius: 15px;
    border-right: 4px solid var(--accent-color);
}

.etymology-section h4 {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(243, 156, 18, 0.2);
}

.etymology-example {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.05);
}

.etymology-example h5 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.word-etymology {
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-right: 3px solid var(--accent-color);
}

.word-etymology strong {
    color: var(--primary-color);
    font-size: 1.1rem;
    display: block;
    margin-bottom: 0.5rem;
}

.etymology-details {
    list-style: none;
    padding-right: 1rem;
    margin-top: 0.8rem;
}

.etymology-details li {
    position: relative;
    padding-right: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
    line-height: 1.6;
}

.etymology-details li::before {
    content: '▪';
    position: absolute;
    right: 0;
    color: var(--accent-color);
    font-weight: bold;
}

.etymology-details em {
    color: var(--primary-color);
    font-style: italic;
    font-weight: 500;
}

/* Etymology Section Styles */
.etymology {
    padding: 6rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 50%, #f8f9fa 100%);
    background-size: 200% 200%;
    animation: gradientShift 10s ease infinite;
    position: relative;
    overflow: hidden;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.etymology::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    transform: rotate(45deg);
}

.etymology-content {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 4rem;
    border-radius: 24px;
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(255,255,255,0.6) inset,
        0 8px 16px rgba(73, 80, 87, 0.1);
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255,255,255,0.3);
    transition: all 0.5s ease;
}

.etymology-content:hover {
    box-shadow: 
        0 35px 70px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(255,255,255,0.8) inset,
        0 12px 24px rgba(73, 80, 87, 0.15);
    transform: translateY(-5px);
}

.etymology-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: var(--text-color);
    text-align: justify;
}

.etymology-content h3 {
    color: var(--primary-color);
    margin: 2.5rem 0 1.5rem;
    font-size: 1.6rem;
    font-weight: 700;
    position: relative;
    padding-right: 1.5rem;
}

.etymology-content h3::before {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 80%;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 3px;
}

.etymology-content h3:first-child {
    margin-top: 1rem;
}

/* Etymology Section Enhanced Styles */
.intro-box {
    background: linear-gradient(135deg, #495057 0%, #6c757d 50%, #495057 100%);
    background-size: 200% 200%;
    padding: 3.5rem;
    border-radius: 20px;
    margin-bottom: 3.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 15px 35px rgba(73, 80, 87, 0.3),
        0 5px 15px rgba(108, 117, 125, 0.2),
        inset 0 1px 0 rgba(255,255,255,0.3);
    animation: introGlow 8s ease-in-out infinite;
    border: 1px solid rgba(255,255,255,0.2);
}

@keyframes introGlow {
    0%, 100% { 
        background-position: 0% 50%;
        box-shadow: 
            0 15px 35px rgba(73, 80, 87, 0.3),
            0 5px 15px rgba(108, 117, 125, 0.2),
            inset 0 1px 0 rgba(255,255,255,0.3);
    }
    50% { 
        background-position: 100% 50%;
        box-shadow: 
            0 20px 45px rgba(73, 80, 87, 0.4),
            0 8px 20px rgba(108, 117, 125, 0.3),
            inset 0 1px 0 rgba(255,255,255,0.4);
    }
}

.intro-box::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 40%;
    height: 200%;
    background: rgba(255,255,255,0.1);
    transform: rotate(-45deg);
}

.lead-text {
    font-size: 1.2rem;
    line-height: 2;
    color: #ffffff;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 2;
}

.highlight {
    color: #ffffff;
    font-weight: 700;
    background: rgba(255,255,255,0.2);
    padding: 2px 8px;
    border-radius: 4px;
    backdrop-filter: blur(5px);
}

.question-text {
    font-style: italic;
    color: rgba(255,255,255,0.9);
    font-size: 1.1rem;
    margin-bottom: 0;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 2;
}

.theory-section, .history-section {
    margin-bottom: 3rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.theory-section:hover, .history-section:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    transform: translateY(-2px);
}

.language-examples {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 2.5rem;
    border-radius: 16px;
    margin: 2rem 0;
    box-shadow: 
        0 8px 25px rgba(252, 182, 159, 0.3),
        0 0 0 1px rgba(255,255,255,0.4) inset;
    border: 1px solid rgba(252, 182, 159, 0.2);
    transition: all 0.3s ease;
}

.language-examples:hover {
    box-shadow: 
        0 12px 35px rgba(252, 182, 159, 0.4),
        0 0 0 1px rgba(255,255,255,0.6) inset;
    transform: translateY(-2px);
}

.lang-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
    margin-right: 3rem;
}

.lang-list li {
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lang-name {
    font-weight: 600;
    color: var(--primary-color);
    min-width: 100px;
    text-align: right;
}

.lang-highlight {
    font-style: italic;
    color: var(--accent-color);
    background: rgba(226, 120, 84, 0.1);
    padding: 0 4px;
    border-radius: 3px;
}

.highlight-box {
    background: #f0f4f8;
    border-right: 3px solid var(--primary-color);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 1rem 0;
}

.word-emphasis {
    color: var(--primary-color);
    font-weight: 600;
}

.special-note {
    background: linear-gradient(135deg, #74788d 0%, #8e9aaf 100%);
    border: none;
    border-radius: 20px;
    padding: 3rem;
    margin: 3rem 0;
    box-shadow: 0 15px 35px rgba(116, 120, 141, 0.3);
    position: relative;
    overflow: hidden;
}

.special-note::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 40%;
    height: 160%;
    background: rgba(255,255,255,0.1);
    transform: rotate(25deg);
}

.special-note h4 {
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 2;
}

.special-note p {
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    line-height: 1.8;
    position: relative;
    z-index: 2;
}

.question-highlight {
    font-style: italic;
    color: var(--text-light);
    background: rgba(84, 150, 226, 0.05);
    padding: 1rem;
    border-radius: 6px;
    margin-top: 1rem;
}

.timeline-evolution {
    margin-top: 2rem;
}

.timeline-evolution h4 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.period-item {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 1rem;
    padding: 1rem;
    margin-bottom: 0.8rem;
    background: #fff;
    border-radius: 8px;
    transition: transform 0.2s;
}

.period-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.period-name {
    font-weight: 600;
    color: var(--primary-color);
}

.period-detail {
    color: var(--text-color);
    line-height: 1.6;
}

/* Mobile Responsiveness for Etymology Section */
@media (max-width: 768px) {
    .etymology {
        padding: 3rem 0;
    }
    
    .etymology-content {
        padding: 2rem;
        border-radius: 16px;
    }
    
    .intro-box {
        padding: 2rem;
        border-radius: 12px;
        margin-bottom: 2rem;
    }
    
    .theory-section, .history-section {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .special-note {
        padding: 2rem;
        margin: 2rem 0;
        border-radius: 16px;
    }
    
    .period-item {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 1rem;
    }
    
    .etymology-content h3 {
        font-size: 1.3rem;
        padding-right: 1rem;
    }
    
    .lead-text {
        font-size: 1.1rem;
    }
}

/* Poetry Verse Styles */
.poetry-example {
    color: var(--text-light);
    font-size: 0.95rem;
    margin: 0.5rem 0;
}

.poetry-verse {
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border-right: 3px solid var(--secondary-color);
    margin: 0.8rem 0 1rem 0;
    font-style: italic;
    color: var(--primary-color);
    line-height: 1.8;
    text-align: center;
}

.word-etymology {
    margin-bottom: 1.5rem;
}

.word-etymology p {
    margin: 0.5rem 0;
}

/* Legend Story Styles */
.culture-legends .legend-story {
    padding: 2.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.1);
    position: relative;
    transition: all 0.3s ease;
}

.culture-legends .legend-story::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(231, 76, 60, 0.1), transparent);
    border-radius: 0 15px 0 60px;
}

.culture-legends .legend-story:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
}

.culture-legends .legend-story p {
    color: var(--text-light);
    line-height: 1.9;
    font-size: 1.05rem;
    margin: 0;
    text-align: justify;
    position: relative;
    z-index: 1;
}

.culture-legends .legend-story strong {
    color: var(--primary-color);
    font-weight: 700;
    padding: 2px 6px;
    background: rgba(243, 156, 18, 0.1);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.culture-legends .legend-story strong:hover {
    background: rgba(243, 156, 18, 0.2);
    transform: scale(1.02);
}

/* Glossary Section */
.glossary {
    padding: 100px 0;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 100%);
}

/* Word count display */
.word-count-display {
    display: flex;
    justify-content: center;
    margin: 2rem 0 3rem 0;
}

.count-container {
    background: linear-gradient(135deg, var(--white) 0%, #f8faff 100%);
    padding: 1.5rem 3rem;
    border-radius: 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border: 2px solid rgba(79, 123, 151, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.count-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--secondary-color), var(--accent-persian), var(--secondary-color));
}

.count-container:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.12);
    border-color: rgba(79, 123, 151, 0.2);
}

.count-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    direction: ltr;
    font-family: 'Vazirmatn', Arial, sans-serif;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.count-label {
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 500;
}

/* Search results and highlighting */
.search-results-info {
    text-align: center;
    padding: 1rem 2rem;
    margin: 1.5rem 0;
    background: linear-gradient(135deg, rgba(79, 123, 151, 0.08), rgba(243, 156, 18, 0.08));
    border-radius: 12px;
    border: 1px solid rgba(79, 123, 151, 0.15);
    color: var(--primary-color);
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.search-results-info:hover {
    background: linear-gradient(135deg, rgba(79, 123, 151, 0.12), rgba(243, 156, 18, 0.12));
    transform: scale(1.02);
}

.results-count {
    font-weight: 700;
    color: var(--accent-persian);
    font-size: 1.2rem;
}

.total-count {
    font-weight: 600;
    color: var(--secondary-color);
}

.search-highlight {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.3), rgba(243, 156, 18, 0.5));
    color: var(--primary-color);
    font-weight: 600;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.search-highlight:hover {
    background: linear-gradient(135deg, rgba(243, 156, 18, 0.4), rgba(243, 156, 18, 0.6));
    transform: scale(1.05);
}

.glossary-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 1rem;
    font-size: 1.2rem;
    color: var(--text-light);
}

.glossary-credit {
    text-align: center;
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 3rem;
}

.glossary-search {
    max-width: 600px;
    margin: 0 auto 3rem;
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.glossary-search input {
    flex: 1;
    min-width: 300px;
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    border: 3px solid transparent;
    border-radius: 50px;
    font-family: 'Vazirmatn', sans-serif;
    background: var(--white);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.glossary-search input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 5px 30px rgba(243, 156, 18, 0.2);
}

.glossary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
    max-height: 700px;
    overflow-y: auto;
    padding: 1rem;
}

.glossary-item {
    background: var(--white);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    border-right: 5px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.glossary-item:hover {
    transform: translateX(-5px);
    box-shadow: var(--hover-shadow);
    border-right-color: var(--accent-color);
}

.glossary-term {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
}

.glossary-definition {
    color: var(--text-light);
    line-height: 1.8;
}

/* Word metadata styling */
.word-meta {
    margin-top: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(79, 123, 151, 0.1);
    font-size: 0.85rem;
    color: #6b7280;
}

.contributor-badge {
    background: var(--accent-color);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.contributor-name {
    color: var(--secondary-color);
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.date-added {
    color: #9ca3af;
    font-size: 0.75rem;
    margin-left: 0.5rem;
}

/* Add Word Button */
.add-word-btn {
    background: var(--gradient-2);
    color: white;
    border: none;
    padding: 1.2rem 2rem;
    border-radius: 50px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 5px 20px rgba(245, 87, 108, 0.3);
    transition: all 0.3s ease;
    white-space: nowrap;
}

.add-word-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 87, 108, 0.4);
}

.add-word-btn.disabled,
.add-word-btn:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}

.add-word-btn.disabled:hover,
.add-word-btn:disabled:hover {
    transform: none;
    box-shadow: none;
}

.add-icon {
    font-size: 1.5rem;
    font-weight: bold;
}

/* User Contributed Words */
.user-contributed {
    border-left: 4px solid var(--secondary-color);
    position: relative;
}

.user-badge {
    background: var(--secondary-color);
    color: white;
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    position: absolute;
    top: 10px;
    left: 10px;
    font-weight: 500;
}

/* Clickable Glossary Items */
.glossary-item {
    position: relative;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.glossary-item:hover {
    background: var(--background-section);
}

.glossary-item:active {
    opacity: 0.8;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 2rem;
    border-bottom: 2px solid #f1f1f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--gradient-1);
    color: white;
    border-radius: 20px 20px 0 0;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.close-btn {
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.form-group {
    margin-bottom: 1.5rem;
    padding: 0 2rem;
}

.form-group:first-child {
    padding-top: 2rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1.1rem;
}

.required {
    color: var(--secondary-color);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e1e1e1;
    border-radius: 10px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(243, 156, 18, 0.1);
}

.error-message,
.success-message {
    display: none;
    padding: 1rem;
    margin: 1rem 2rem;
    border-radius: 10px;
    font-weight: 500;
}

.error-message {
    background-color: #fee;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.success-message {
    background-color: #f0fff4;
    color: #38a169;
    border: 1px solid #9ae6b4;
}

.form-actions {
    padding: 1.5rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    border-top: 2px solid #f1f1f1;
}

.cancel-btn,
.submit-btn {
    padding: 0.8rem 2rem;
    border: none;
    border-radius: 25px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn {
    background: #f1f1f1;
    color: var(--text-color);
}

.cancel-btn:hover {
    background: #e1e1e1;
}

.submit-btn {
    background: var(--gradient-2);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 87, 108, 0.3);
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245, 87, 108, 0.4);
}

.modal-footer {
    padding: 1rem 2rem 2rem;
    text-align: center;
    color: var(--text-light);
}

/* Enhanced English Modal Styles */
.english-modal {
    max-width: 900px;
    direction: ltr;
    text-align: left;
    border: none;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.25);
    backdrop-filter: blur(20px);
    border-radius: 25px;
    overflow: hidden;
    animation: modalEnhancedSlideIn 0.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

@keyframes modalEnhancedSlideIn {
    from {
        transform: translateY(-80px) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.english-modal .modal-header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 60%, #2c5364 100%);
    position: relative;
    padding: 2.5rem;
    border-radius: 25px 25px 0 0;
    box-shadow: 0 4px 20px rgba(42, 82, 152, 0.3);
}

.english-modal .modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M30 5l7 13h13l-10 8 4 13-14-10-14 10 4-13-10-8h13z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") center/40px;
    pointer-events: none;
}

.english-modal .modal-header h3 {
    position: relative;
    z-index: 1;
    font-size: 1.8rem;
    font-weight: 800;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.english-modal .modal-header h3::before {
    content: '';
    width: 40px;
    height: 3px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 2px;
    margin-right: 0.5rem;
}

.english-content {
    padding: 0;
    max-height: 65vh;
    overflow-y: auto;
    background: linear-gradient(to bottom, #ffffff 0%, #f8fbff 100%);
    position: relative;
}

.english-content::before {
    content: '';
    position: sticky;
    top: 0;
    display: block;
    height: 10px;
    background: linear-gradient(to bottom, rgba(42, 82, 152, 0.1), transparent);
    z-index: 10;
}

.english-section {
    margin: 0;
    padding: 2.5rem;
    background: transparent;
    border-radius: 0;
    border-left: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.english-section:hover {
    background: rgba(230, 126, 34, 0.02);
    transform: translateX(5px);
}

.english-section:last-child {
    border-bottom: none;
}

.english-section::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(to bottom, #2a5298, #1e3c72);
    border-radius: 0 2px 2px 0;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.english-section:hover::before {
    transform: scaleY(1);
}

.english-section h4 {
    color: var(--primary-color);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.english-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #2a5298, #1e3c72);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.english-section:hover h4::after {
    width: 80px;
}

.english-section h4::before {
    content: '';
    width: 24px;
    height: 3px;
    background: linear-gradient(135deg, #2a5298, #1e3c72);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.english-section:hover h4::before {
    width: 32px;
}

.english-section p {
    color: #4a5568;
    line-height: 1.9;
    margin-bottom: 1rem;
    font-size: 1.05rem;
    text-align: justify;
    text-justify: inter-word;
    transition: color 0.3s ease;
}

.english-section:hover p {
    color: #2d3748;
}

.english-section p:last-child {
    margin-bottom: 0;
}

.english-section strong {
    color: var(--primary-color);
    font-weight: 700;
    background: rgba(230, 126, 34, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.english-section strong:hover {
    background: rgba(230, 126, 34, 0.15);
    transform: scale(1.02);
}

/* Enhanced scrollbar for English content */
.english-content::-webkit-scrollbar {
    width: 8px;
}

.english-content::-webkit-scrollbar-track {
    background: rgba(230, 126, 34, 0.1);
    border-radius: 4px;
}

.english-content::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #2a5298, #1e3c72);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.english-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #1e3c72, #2a5298);
}

/* Enhanced close button */
.english-modal .close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: relative;
    z-index: 2;
}

.english-modal .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.4);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Enhanced modal footer */
.english-modal .modal-footer {
    background: linear-gradient(to top, #f8fbff, transparent);
    padding: 1.5rem 2.5rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    position: relative;
}

.english-modal .modal-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #2a5298, #1e3c72);
    border-radius: 2px;
}

.english-modal .modal-footer p {
    color: #6b7280;
    font-size: 0.95rem;
    margin: 0;
    font-style: italic;
}

/* Expandable Content Styles */
.expandable-content {
    position: relative;
}

.content-preview p,
.content-full p {
    margin-bottom: 1rem;
}

.expand-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    font-weight: 500;
}

.expand-btn:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* About Author Section */
.about-author {
    padding: 100px 0;
    background: #f8f9fa;
}

.author-content {
    max-width: 1000px;
    margin: 0 auto;
}

.author-intro {
    font-size: 1.15rem;
    line-height: 2;
    text-align: center;
    color: var(--text-light);
    margin-bottom: 3rem;
}

.author-details {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.author-expertise,
.author-works {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

.author-expertise h3,
.author-works h3 {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--accent-color);
}

.author-expertise p {
    color: var(--text-light);
    line-height: 1.8;
}

.author-works ul {
    list-style: none;
    padding-right: 0;
}

.author-works li {
    position: relative;
    padding-right: 2rem;
    margin-bottom: 1rem;
    color: var(--text-light);
    line-height: 1.8;
}

.author-works li::before {
    content: '📚';
    position: absolute;
    right: 0;
    top: 2px;
}

.author-works li strong {
    color: var(--primary-color);
    font-weight: 600;
}

.author-note {
    text-align: center;
    font-size: 1.1rem;
    color: var(--secondary-color);
    font-weight: 600;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border-right: 5px solid var(--accent-color);
}

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

/* Footer */
.footer {
    background: var(--gradient-1);
    color: white;
    text-align: center;
    padding: 4rem 0;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.1);
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.footer .container {
    position: relative;
    z-index: 1;
}

.footer p {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
        flex-direction: column;
        gap: 1rem;
    }
    
    .english-title {
        font-size: 2rem;
        padding: 0.3rem 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.8rem;
    }
    
    .english-modal {
        max-width: 95%;
        border-radius: 20px;
    }
    
    .english-modal .modal-header {
        padding: 2rem;
    }
    
    .english-modal .modal-header h3 {
        font-size: 1.4rem;
        flex-direction: column;
        text-align: center;
        gap: 0.8rem;
    }
    
    .english-modal .modal-header h3::before {
        width: 30px;
        height: 2px;
    }
    
    .english-content {
        max-height: 55vh;
    }
    
    .english-section {
        padding: 1.5rem;
    }
    
    .english-section h4 {
        font-size: 1.2rem;
        flex-direction: row;
        align-items: center;
        gap: 0.8rem;
        margin-bottom: 1rem;
    }
    
    .english-section h4::before {
        width: 20px;
        height: 2px;
    }
    
    .english-section p {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .english-modal .modal-footer {
        padding: 1rem 1.5rem;
    }
    
    .etymology-section {
        padding: 1.5rem;
        margin-top: 2rem;
    }
    
    .etymology-section h4 {
        font-size: 1.2rem;
    }
    
    .etymology-example {
        padding: 1rem;
    }
    
    .word-etymology {
        padding: 0.8rem;
    }
    
    
    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        right: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        gap: 2rem;
        z-index: 1000;
        transition: all 0.3s ease;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links li {
        margin: 0;
    }
    
    .nav-links a {
        font-size: 1.5rem;
        padding: 1rem 2rem;
        display: block;
        width: 100%;
        text-align: center;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .timeline::before {
        right: 30px;
    }
    
    .timeline-item {
        flex-direction: column !important;
    }
    
    .timeline-date {
        text-align: right !important;
        margin-bottom: 1rem;
    }
    
    .timeline-item::after {
        right: 30px;
        transform: translate(50%, -50%);
    }
    
    .timeline-content {
        margin-right: 60px;
        width: calc(100% - 80px);
    }
    
    .culture-content {
        gap: 2rem;
    }
    
    .culture-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .culture-feature-card {
        padding: 2rem;
        margin: 0;
    }
    
    .culture-feature-card h3 {
        font-size: 1.3rem;
    }
    
    .culture-feature-card li {
        font-size: 1rem;
        padding: 0.6rem 0 0.6rem 1.5rem;
    }
    
    .etymology-examples {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .word-etymology {
        padding: 2rem;
    }
    
    .poetry-verse {
        padding: 1.5rem;
        font-size: 1rem;
    }
    
    .etymology-section {
        padding: 2rem;
        border-radius: 20px;
    }
    
    .etymology-section h4 {
        font-size: 1.4rem;
    }
    
    .section-divider {
        margin: 3rem 0;
    }
    
    .divider-line {
        max-width: 100px;
    }
    
    .divider-icon {
        font-size: 1.2rem;
    }
    
    .etymology-examples {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .etymology-header {
        padding-left: 0;
    }
    
    .feature-item {
        padding: 1.2rem;
    }
    
    .feature-title {
        font-size: 1rem;
    }
    
    .example-pair {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.8rem;
    }
    
    .change-type {
        min-width: unset;
        align-self: flex-start;
    }
    
    .shahname-words {
        flex-direction: column;
        gap: 0.6rem;
    }
    
    .word-example {
        padding: 0.4rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .word-etymology-inline {
        padding: 1.2rem;
    }
    
    .etymology-header-inline strong {
        font-size: 1rem;
    }
    
    .poetry-verse-inline {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .count-container {
        padding: 1.2rem 2rem;
    }
    
    .count-number {
        font-size: 2rem;
    }
    
    .count-label {
        font-size: 1rem;
    }
    
    .search-results-info {
        padding: 0.8rem 1.5rem;
        margin: 1rem 0;
        font-size: 1rem;
    }
    
    .results-count {
        font-size: 1.1rem;
    }
    
    .search-highlight {
        padding: 0.05rem 0.2rem;
    }
    
    .culture-left-column,
    .culture-right-column {
        gap: 2rem;
    }
    
    .culture-legends {
        padding: 2rem;
    }
    
    .culture-legends h3 {
        font-size: 1.5rem;
        gap: 0.5rem;
    }
    
    .culture-legends h3::before {
        width: 35px;
        height: 35px;
        font-size: 1.2rem;
    }
    
    .culture-legends .legend-story {
        padding: 1.8rem;
    }
    
    .culture-legends .legend-story p {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .glossary-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .travelers-grid {
        grid-template-columns: 1fr;
        padding: 0 1rem;
    }
    
    .travelers-title {
        font-size: 2rem;
    }
    
    .travelers-intro {
        padding: 0 1rem;
    }
    
    .traveler-card {
        padding: 1.5rem;
    }
    
    .traveler-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .glossary-search {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .glossary-search input {
        min-width: unset;
    }
    
    .add-word-btn {
        align-self: stretch;
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .cancel-btn,
    .submit-btn {
        width: 100%;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-1);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-2);
}

/* Loading Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Additional Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.info-card {
    animation: slideInRight 0.6s ease;
    animation-fill-mode: both;
}

.info-card:nth-child(1) { animation-delay: 0.1s; }
.info-card:nth-child(2) { animation-delay: 0.2s; }
.info-card:nth-child(3) { animation-delay: 0.3s; }
.info-card:nth-child(4) { animation-delay: 0.4s; }