﻿/* CSS Unified File for All Pages */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #e74c3c;
    --accent-color: #3498db;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #333;
    --background-color: #f9f9f9;
    --amazigh-yellow: #ffe200;
    --amazigh-red: #e74c3c;
    --amazigh-blue: #3498db;
    --keyboard-bg: #ffffff;
    --key-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --tifinagh-color: #8e44ad;
    --latin-color: #27ae60;
    --key-size: 70px;
    --conversion-bg: #fff9f9;
    --yellow-color: #ffe200;
    --masculine-color: #3498db;
    --feminine-color: #e74c3c;
    --exception-color: #f39c12;
    --note-color: #2ecc71;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
   
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
header {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 50px;
    margin-left: 10px;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--yellow-color);
    margin: 0;
}

/* Navigation Styles */
nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav ul li {
    margin-right: 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    padding: 5px 0;
    position: relative;
    border-radius: 4px;
}

nav ul li a:hover {
    color: var(--yellow-color);
    background-color: rgba(255, 255, 255, 0.1);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--yellow-color);
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;
}

.mobile-menu-button {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px 10px;
}

/* Keyboard Section Styles */
.keyboard-section {
    padding: 40px 0;
}

.keyboard-header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.keyboard-header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.keyboard-description {
    font-size: 1.1rem;
    opacity: 0.9;
}

.mode-switcher {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.mode-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 12px 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    border-radius: 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.mode-btn:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.mode-btn i {
    font-size: 1.2rem;
}

.active-mode {
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.3);
}

.conversion-display {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 25px;
}

.display-box {
    background-color: var(--conversion-bg);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-height: 80px;
    font-size: 1.8rem;
    text-align: center;
    overflow-wrap: break-word;
    border: 2px solid #e0e0e0;
}

.tifinagh-display {
    color: var(--tifinagh-color);
    direction: rtl;
}

.latin-display {
    color: var(--latin-color);
    direction: ltr;
}

.keyboard-wrapper {
    background-color: var(--keyboard-bg);
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.keyboard-display {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
    min-height: 120px;
    font-size: 2.2rem;
    text-align: left;
    overflow-wrap: break-word;
    border: 2px solid #e0e0e0;
}

.keyboard {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 12px;
    margin-bottom: 15px;
}

.keyboard-btn {
    background-color: var(--light-color);
    border: none;
    border-radius: 10px;
    padding: 15px 5px;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
    height: var(--key-size);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--key-shadow);
}

.tifinagh-key {
    color: var(--tifinagh-color);
    background: linear-gradient(135deg, #f3e6ff, #e6ccff);
}

.latin-key {
    color: var(--latin-color);
    background: linear-gradient(135deg, #e6f7ed, #ccffdd);
}

.keyboard-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.tifinagh-key:hover {
    background: linear-gradient(135deg, #e6ccff, #d9b3ff);
}

.latin-key:hover {
    background: linear-gradient(135deg, #ccffdd, #b3ffcc);
}

.keyboard-btn.space {
    grid-column: span 4;
    font-size: 1rem;
}

.keyboard-btn.enter {
    grid-column: span 3;
    font-size: 1rem;
}

.keyboard-btn.backspace {
    grid-column: span 3;
    font-size: 1rem;
}

.keyboard-label {
    font-size: 0.8rem;
    margin-top: 3px;
    opacity: 0.7;
}

#latin-keyboard {
    direction: ltr;
}

/* Common Section Styles */
.section-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-size: 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--accent-color);
    margin: 15px auto 0;
}

.section-description {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    color: #555;
}

/* Common Card Styles */
.card {
    background-color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #c0392b;
}

.btn-block {
    display: block;
    width: 100%;
}

.action-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.action-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 25px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    opacity: 0.9;
}

.action-btn i {
    font-size: 1.2rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--primary-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Tajawal', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent-color);
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Alert Messages */
.alert {
    padding: 15px;
    margin-bottom: 25px;
    border-radius: 6px;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(39, 174, 96, 0.2);
    color: var(--success-color);
    border: 1px solid rgba(39, 174, 96, 0.3);
}

.alert-error {
    background-color: rgba(231, 76, 60, 0.2);
    color: var(--error-color);
    border: 1px solid rgba(231, 76, 60, 0.3);
}

.custom-alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #4CAF50;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideIn 0.3s, fadeOut 0.5s 2.5s forwards;
}

.custom-alert.error {
    background-color: #f44336;
}

.custom-alert i {
    font-size: 1.2rem;
}

@keyframes slideIn {
    from { top: -50px; opacity: 0; }
    to { top: 20px; opacity: 1; }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

.confirmation-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.confirmation-modal.active {
    opacity: 1;
    visibility: visible;
}

.confirmation-content {
    background-color: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.confirmation-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.confirmation-btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.confirm-btn {
    background-color: #f44336;
    color: white;
}

.confirm-btn:hover {
    background-color: #d32f2f;
}

.cancel-btn {
    background-color: #e0e0e0;
    color: #333;
}

.cancel-btn:hover {
    background-color: #bdbdbd;
}

/* Badge Styles */
.category-badge {
    display: inline-block;
    background-color: var(--accent-color);
    color: white;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    margin-top: 10px;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://via.placeholder.com/1920x1080');
    background-size: cover;
    background-position: center;
    height: 500px;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    padding: 0 20px;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* Search Box */
.search-container {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.search-box {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.search-input {
    display: flex;
    border: 2px solid #ddd;
    border-radius: 50px;
    overflow: hidden;
}

.search-input input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    outline: none;
    font-size: 1.1rem;
    font-family: 'Tajawal', sans-serif;
}

.search-input button {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    padding: 0 25px;
    cursor: pointer;
    transition: background-color 0.3s;
    font-family: 'Tajawal', sans-serif;
    font-weight: 500;
}

.search-input button:hover {
    background-color: #c0392b;
}

.search-options {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.search-option {
    display: flex;
    align-items: center;
}

.search-option input {
    margin-left: 10px;
}

/* Results Container */
.results-container {
    margin: 50px 0;
}

.result-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.result-card:hover {
    transform: translateY(-5px);
}

.result-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.result-card p {
    margin-bottom: 5px;
}

.result-card .example {
    font-style: italic;
    color: #666;
}

/* About Section */
.about-section {
    padding: 80px 0;
    background-color: var(--light-color);
}

.about-content {
    display: flex;
    gap: 40px;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
}

.about-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.article-image {
    height: 200px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-content {
    padding: 20px;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    color: #666;
    font-size: 0.9rem;
}

.article-category {
    background-color: var(--accent-color);
    color: white;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.article-title {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.article-excerpt {
    color: #555;
    margin-bottom: 15px;
}

.read-more {
    display: inline-block;
    color: var(--accent-color);
    font-weight: 500;
    text-decoration: none;
}

.read-more:hover {
    color: var(--secondary-color);
}

/* Tifinagh Letters */
.letters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.tifinagh-char {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}
.tifinagh-char.tCenter {
    text-align: center;
}
.pronunciation {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 15px;
}

.pronunciation-item {
    text-align: center;
}

.pronunciation-item h4 {
    color: var(--accent-color);
    margin-bottom: 5px;
}

.pronunciation-item p {
    font-size: 1.2rem;
    font-weight: 500;
}

.example {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #ddd;
    font-size: 0.9rem;
    color: #666;
}

/* Keyboard Styles */
.keyboard-container {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.text-display {
    width: 100%;
    min-height: 150px;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    font-size: 1.5rem;
    font-family: 'Tajawal', sans-serif;
    margin-bottom: 20px;
    resize: vertical;
    direction: rtl;
}

.keyboard-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
}

.keyboard-btn {
    background-color: var(--light-color);
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px 5px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.keyboard-btn:hover {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.keyboard-btn.space {
    grid-column: span 4;
}

.keyboard-btn.enter {
    grid-column: span 4;
    font-size: 1rem;
}

/* Transliteration Section */
.transliteration-section {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.transliteration-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.transliteration-box {
    display: flex;
    flex-direction: column;
}

.transliteration-box h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 5px;
}

.transliteration-textarea {
    width: 100%;
    min-height: 100px;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    font-size: 1rem;
    font-family: 'Tajawal', sans-serif;
    resize: vertical;
}

.transliteration-textarea.latin {
    direction: ltr;
    text-align: left;
}

.transliteration-textarea.arabic {
    direction: rtl;
    text-align: right;
}

.transliteration-textarea.tifinagh {
    direction: rtl;
    text-align: right;
    font-size: 1.2rem;
}

/* Tutorial Section */
.tutorial-section {
    background-color: white;
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.tutorial-title {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.5rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

.tutorial-content {
    line-height: 1.8;
}

.tutorial-steps {
    margin: 20px 0;
    padding-right: 20px;
}

.tutorial-steps li {
    margin-bottom: 15px;
    position: relative;
}

.tutorial-steps li::before {
    content: "•";
    color: var(--accent-color);
    font-weight: bold;
    display: inline-block;
    width: 1em;
    margin-right: -1em;
    position: absolute;
    right: -15px;
}

.shortcuts-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
}

.shortcuts-table th, 
.shortcuts-table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: right;
}

.shortcuts-table th {
    background-color: var(--primary-color);
    color: white;
}

.shortcuts-table tr:nth-child(even) {
    background-color: #f2f2f2;
}

/* Admin Panel Styles */
.admin-panel {
    padding: 40px 0;
}

.panel-title {
    text-align: center;
    margin-bottom: 30px;
    color: var(--primary-color);
    font-size: 2rem;
    position: relative;
}

.add-word-form {
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.category-option {
    display: flex;
    align-items: center;
}

.category-option input {
    margin-left: 8px;
}

/* Review Panel Styles */
.review-panel {
    padding: 40px 0;
}

.words-list {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.word-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.word-item:last-child {
    border-bottom: none;
}

.word-details {
    flex: 1;
    min-width: 250px;
}

.word-details h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.word-meta {
    display: flex;
    gap: 15px;
    margin-top: 10px;
    color: #666;
    font-size: 0.9rem;
}

.word-actions {
    display: flex;
    gap: 10px;
}

.btn-approve {
    background-color: var(--success-color);
    color: white;
}

.btn-approve:hover {
    background-color: #219653;
}

.btn-reject {
    background-color: var(--error-color);
    color: white;
}

.btn-reject:hover {
    background-color: #c0392b;
}

.empty-message {
    text-align: center;
    padding: 40px;
    color: #666;
}

.disabled-btn {
    pointer-events: none;
    opacity: 0.5;
    cursor: not-allowed;
}

/* Footer Styles */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 50px 0 20px;
    margin-top: 50px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 5px;
    background: linear-gradient(to right, var(--amazigh-yellow), var(--amazigh-red), var(--amazigh-blue));
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h3 {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.5rem;
    color: var(--yellow-color);
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(to left, var(--amazigh-yellow), var(--amazigh-red));
}

.footer-section p {
    margin-bottom: 15px;
    color: #ddd;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 12px;
    position: relative;
    padding-right: 15px;
}

.footer-section ul li::before {
    content: 'ⵣ';
    color: var(--amazigh-yellow);
    position: absolute;
    right: 0;
}

.footer-section ul li a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: var(--amazigh-yellow);
    padding-right: 5px;
}

.footer-section i {
    margin-left: 8px;
    color: var(--yellow-color);
}

.amazigh-logo {
    text-align: center;
    margin-bottom: 20px;
}

.amazigh-logo h3 {
    font-size: 2rem;
    margin-top: 10px;
    color: var(--amazigh-yellow);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.social-links a {
    color: white;
    font-size: 1.2rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, color 0.3s;
    text-decoration: none;
}

.social-links a:hover {
    transform: translateY(-5px);
    color: var(--yellow-color);
}

.contact-info p {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.contact-info i {
    color: var(--amazigh-yellow);
    margin-left: 10px;
    width: 20px;
    text-align: center;
}

.copyright {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    position: relative;
}

.copyright::before {
    content: 'ⵣⵊⵀⵣⵊⵀⵣⵊⵀ';
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    text-align: center;
    color: var(--amazigh-yellow);
    font-size: 1.2rem;
    letter-spacing: 3px;
}

.amazigh-pattern {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.amazigh-pattern span {
    font-size: 1.5rem;
    animation: float 3s ease-in-out infinite;
}

.amazigh-pattern span:nth-child(1) { color: var(--amazigh-yellow); animation-delay: 0s; }
.amazigh-pattern span:nth-child(2) { color: var(--amazigh-red); animation-delay: 0.5s; }
.amazigh-pattern span:nth-child(3) { color: var(--amazigh-blue); animation-delay: 1s; }
.amazigh-pattern span:nth-child(4) { color: var(--amazigh-yellow); animation-delay: 1.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* Responsive Styles */
@media (max-width: 900px) {
    .keyboard {
        grid-template-columns: repeat(8, 1fr);
    }
    
    :root {
        --key-size: 60px;
    }
    
    nav ul {
        gap: 15px;
    }
}

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        padding: 15px 0;
    }
    
    .logo {
        margin-bottom: 15px;
        justify-content: center;
        width: 100%;
    }
    
    .mobile-menu-button {
        display: block;
        position: absolute;
        left: 20px;
        top: 20px;
    }
    
    nav {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background-color: #2c3e50;
        padding: 20px;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease;
    }
    
    nav.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding-top: 20px;
    }
    
    nav ul li {
        margin: 0;
        width: 100%;
        text-align: center;
    }
    
    nav ul li a {
        display: block;
        padding: 10px;
        margin: 5px 0;
    }
    
    .hero {
        height: 400px;
    }
    
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .search-container {
        padding: 20px 15px;
        margin-top: -30px;
    }
    
    .search-input {
        flex-direction: column;
        border-radius: 8px;
    }
    
    .search-input input {
        padding: 12px 15px;
        width: 100%;
        border-bottom: 1px solid #ddd;
        border-radius: 8px 8px 0 0;
    }
    
    .search-input button {
        padding: 12px;
        border-radius: 0 0 8px 8px;
        width: 100%;
    }
    
    .search-options {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .search-option {
        width: 100%;
        justify-content: space-between;
    }
    
    .about-content {
        flex-direction: column;
        gap: 20px;
    }
    
    .about-text, .about-image {
        flex: none;
        width: 100%;
    }
    
    .transliteration-container {
        grid-template-columns: 1fr;
    }
    
    .keyboard-buttons {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    }
    
    .action-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .action-btn {
        width: 100%;
        justify-content: center;
    }
    
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
    
    .word-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .word-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .panel-title {
        font-size: 1.5rem;
    }
    
    .footer-section {
        min-width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 700px) {
    .keyboard {
        grid-template-columns: repeat(6, 1fr);
    }
    
    .keyboard-btn {
        font-size: 1.5rem;
        padding: 10px 2px;
    }
    
    :root {
        --key-size: 50px;
    }
    
    .display-box {
        font-size: 1.5rem;
        min-height: 70px;
    }
    
    .keyboard-display {
        font-size: 1.8rem;
    }
}

@media (max-width: 500px) {
    .keyboard {
        grid-template-columns: repeat(5, 1fr);
    }
    
    .keyboard-btn {
        font-size: 1.3rem;
    }
    
    .keyboard-display {
        font-size: 1.6rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    .description {
        font-size: 1rem;
    }
    
    :root {
        --key-size: 45px;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 350px;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .logo img {
        height: 40px;
    }
    
    .search-input button {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    body {
        font-size: 14px;
    }
    
    .keyboard-buttons {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    }
    
    .keyboard-btn {
        padding: 10px 2px;
        font-size: 1.2rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .letters-grid {
        grid-template-columns: 1fr;
    }
    
    .pronunciation {
        gap: 15px;
    }
    
    .word-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .panel-title {
        font-size: 1.3rem;
    }
    
    .keyboard {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .keyboard-btn.space,
    .keyboard-btn.enter,
    .keyboard-btn.backspace {
        grid-column: span 2;
    }
    
    .display-box {
        font-size: 1.3rem;
    }
}
/* Lesson Section */
.lesson-section {
    padding: 40px 0;
}

/* Intro Box */
.intro-box {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 40px;
    border-right: 5px solid var(--accent-color);
}

.intro-box p {
    font-size: 1.1rem;
    margin-bottom: 15px;
}

/* Rule Box */
.rule-box {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
}

.rule-box.masculine {
    border-right: 5px solid var(--masculine-color);
}

.rule-box.feminine {
    border-right: 5px solid var(--feminine-color);
}

.rule-box.special {
    border-right: 5px solid var(--exception-color);
}

/* Rule Title */
.rule-title {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.rule-title i {
    margin-left: 10px;
    font-size: 1.4rem;
}

.rule-title.masculine i {
    color: var(--masculine-color);
}

.rule-title.feminine i {
    color: var(--feminine-color);
}

.rule-title.special i {
    color: var(--exception-color);
}

/* Rule Content */
.rule-content {
    margin-bottom: 20px;
}

/* Example Container */
.example-container {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 15px 0;
}

.example-title {
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.example {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
}

.example:last-child {
    border-bottom: none;
}

.example-term {
    font-weight: 500;
}

.example-translation {
    color: #666;
    font-style: italic;
}

/* Note Box */
.note-box {
    background-color: rgba(46, 204, 113, 0.1);
    border-right: 4px solid var(--note-color);
    padding: 15px;
    border-radius: 0 8px 8px 0;
    margin: 20px 0;
}

.note-title {
    color: var(--note-color);
    font-weight: 700;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
}

.note-title i {
    margin-left: 8px;
}

/* Practice Section */
.practice-section {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-top: 40px;
}

.practice-title {
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 20px;
    text-align: center;
}

.practice-item {
    margin-bottom: 25px;
}

.practice-question {
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.practice-answer {
    display: none;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
    margin-top: 10px;
    border-right: 3px solid var(--accent-color);
}

.show-answer-btn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 15px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s;
}

.show-answer-btn:hover {
    background-color: var(--primary-color);
}
/*NOTE FOR VERBES*/
	.note-container {
    max-width: 100%;
    margin: 40px auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    border-right: 5px solid var(--accent-color);
    padding: 20px;
}

.note-header {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    color: white;
    padding: 15px 20px;
    border-radius: 10px 10px 0 0;
}

.note-icon {
    font-size: 1.8rem;
}

.note-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.note-content {
    padding: 20px;
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.8;
    background-color: var(--light-color);
    border-radius: 0 0 10px 10px;
}

@media (max-width: 768px) {
    .note-container {
        margin: 20px;
        padding: 15px;
    }

    .note-header h2 {
        font-size: 1.3rem;
    }

    .note-content {
        font-size: 1rem;
        padding: 15px;
    }
}
