/* Page Container */
.page-container {
    padding: 40px 0;
    background: var(--white);
    min-height: 100vh;
}

.page-header {
    text-align: center;
    margin-bottom: 50px;
    padding: 0 20px;
}

.page-title {
    color: var(--primary-color);
    font-size: 2.8rem;
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.1);
}

.page-description {
    color: var(--text-color);
    font-size: 1.3rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.content-body {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 50px;
    line-height: 1.8;
    font-size: 1.1rem;
}

/* Content with Hero Image Layout */
.content-with-hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
    margin-bottom: 40px;
}

.hero-image-section {
    position: relative;
}

.hero-image-container {
    position: sticky;
    top: 100px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: transform 0.3s ease;
}

.hero-image-container:hover {
    transform: translateY(-5px);
}

.hero-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 600px;
}

.hero-image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 30px 20px 20px;
    color: white;
}

.hero-image-caption p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    text-align: center;
}

.text-content-section {
    line-height: 1.8;
}

.text-content-section h2 {
    color: var(--primary-color);
    margin: 30px 0 20px 0;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 10px;
}

.text-content-section h3 {
    color: var(--secondary-color);
    margin: 25px 0 15px 0;
}

.text-content-section p {
    margin-bottom: 20px;
    color: var(--text-color);
}

.text-content-section ul, .text-content-section ol {
    margin: 20px 0;
    padding-left: 30px;
}

.text-content-section li {
    margin-bottom: 10px;
    color: #555;
}

/* RTL Support for Hero Layout */
[dir="rtl"] .content-with-hero {
    direction: rtl;
}

[dir="rtl"] .text-content-section ul,
[dir="rtl"] .text-content-section ol {
    padding-left: 0;
    padding-right: 30px;
}

/* Page Gallery Styles */
.page-gallery-section {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #eee;
}

.page-gallery-section .section-header {
    margin-bottom: 40px;
}

.page-gallery {
    width: 100%;
}

.gallery-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: nowrap;
}

.gallery-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}

/* Size Classes */
.gallery-item.size-1 { flex: 1; }
.gallery-item.size-1-5 { flex: 1.5; }
.gallery-item.size-2 { flex: 2; }
.gallery-item.size-3 { flex: 3; }

.image-container {
    position: relative;
    width: 100%;
    height: 300px;
    overflow: hidden;
    border-radius: 12px;
}

.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover .image-container img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.8) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.gallery-item:hover .image-overlay {
    opacity: 1;
}

.overlay-content {
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.gallery-item:hover .overlay-content {
    transform: translateY(0);
}

.image-caption {
    color: white;
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* Gallery Modal */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    z-index: 10001;
}

.modal-content img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
}

.modal-caption {
    padding: 20px;
    margin: 0;
    text-align: center;
    background: var(--white);
    color: var(--text-color);
    font-size: 1.1rem;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10002;
}

[dir="rtl"] .modal-close {
    right: auto;
    left: 15px;
}

.modal-close:hover {
    background: rgba(0,0,0,0.9);
    transform: scale(1.1);
}

/* RTL Support for Gallery */
[dir="rtl"] .gallery-row {
    flex-direction: row-reverse;
}

/* ========== CONTACT PAGE REDESIGN ========== */
.contact-page-container {
    margin-top: 30px;
}

/* Contact Form Section */
.contact-form-section {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    margin-bottom: 40px;
    border: 1px solid rgba(0,107,92,0.1);
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.section-header p {
    color: var(--text-color);
    font-size: 1.1rem;
    max-width: 400px;
    margin: 0 auto;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.form-group {
    position: relative;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
}

.form-group label i {
    color: var(--secondary-color);
    font-size: 0.9rem;
}

/* Form Inputs */
.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
    color: var(--text-color);
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0,107,92,0.1);
    background: #fff;
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
    border-color: #b3b3b3;
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
    max-height: 300px;
}

/* Custom Select */
.custom-select {
    position: relative;
}

.custom-select .form-select {
    appearance: none;
    padding-right: 50px;
}

[dir="rtl"] .custom-select .form-select {
    padding-right: 20px;
    padding-left: 50px;
}

.select-arrow {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--primary-color);
    z-index: 2;
    transition: transform 0.2s ease;
}

[dir="rtl"] .select-arrow {
    right: auto;
    left: 20px;
}

.form-select:focus ~ .select-arrow {
    color: var(--secondary-color);
}

/* Textarea Footer */
.textarea-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    font-size: 0.85rem;
}

.char-counter {
    color: #666;
    font-weight: 500;
}

.char-counter.warning {
    color: #ff9800;
}

.char-counter.error {
    color: #f44336;
}

.required-hint {
    color: #f44336;
    font-weight: 500;
}

/* Error Messages */
.error-message {
    color: #f44336;
    font-size: 0.85rem;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 20px;
}

.error-message i {
    font-size: 0.8rem;
}

.form-group.error .form-input,
.form-group.error .form-textarea,
.form-group.error .form-select {
    border-color: #f44336;
    background: rgba(244,67,54,0.05);
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.submit-btn,
.reset-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.submit-btn {
    background: var(--primary-color);
    color: white;
    min-width: 180px;
}

.submit-btn:hover:not(:disabled) {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,107,92,0.3);
}

.reset-btn {
    background: #f5f5f5;
    color: #666;
    border: 2px solid #ddd;
}

.reset-btn:hover {
    background: #e0e0e0;
    color: #333;
    border-color: #ccc;
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Button Spinner */
.btn-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.btn-spinner .spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

.submitting .btn-text,
.submitting .btn-icon {
    opacity: 0;
}

.submitting .btn-spinner {
    display: block;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Contact Bottom Sections */
.contact-bottom-sections {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
}

/* Contact Info Section */
.contact-info-section {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,107,92,0.1);
}

.contact-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.contact-card {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-color: rgba(0,107,92,0.2);
    background: #fff;
}

.contact-card-inner {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.contact-card:hover .contact-icon {
    background: var(--secondary-color);
    transform: rotate(10deg) scale(1.1);
}

.contact-details h3 {
    color: var(--primary-color);
    margin: 0 0 10px 0;
    font-size: 1.2rem;
}

.contact-details p {
    color: var(--text-color);
    margin: 0;
    line-height: 1.6;
    font-size: 1rem;
}

/* Location Section */
.location-section {
    background: var(--white);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,107,92,0.1);
}

.location-container {
    margin-top: 20px;
}

.map-placeholder {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 12px;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    border: 2px dashed var(--primary-color);
    opacity: 0.8;
}

.map-content {
    text-align: center;
    color: var(--primary-color);
    padding: 20px;
}

.map-content i {
    font-size: 3rem;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.map-content h3 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
}

.map-content p {
    color: #666;
    margin: 0 0 15px 0;
}

.map-address {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: rgba(255,255,255,0.9);
    padding: 10px 20px;
    border-radius: 25px;
    margin-top: 15px;
}

.map-address i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.map-address span {
    color: var(--text-color);
    font-size: 0.95rem;
}

.location-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.location-card {
    background: var(--light-bg);
    border-radius: 12px;
    padding: 25px;
    border-left: 4px solid var(--primary-color);
}

[dir="rtl"] .location-card {
    border-left: none;
    border-right: 4px solid var(--primary-color);
}

.location-card h3 {
    color: var(--primary-color);
    margin: 0 0 20px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
}

.direction-list,
.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.direction-list li,
.info-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.direction-list li:last-child,
.info-list li:last-child {
    margin-bottom: 0;
}

.direction-list i,
.info-list i {
    color: var(--secondary-color);
    width: 20px;
    text-align: center;
}

/* Success Message */
.form-success {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    padding: 20px 30px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 10000;
    animation: slideInRight 0.3s ease;
    max-width: 400px;
    border-left: 4px solid #2E7D32;
}

[dir="rtl"] .form-success {
    right: auto;
    left: 20px;
    border-left: none;
    border-right: 4px solid #2E7D32;
}

.form-success i {
    font-size: 1.5rem;
}

.form-success span {
    flex: 1;
    font-size: 0.95rem;
    line-height: 1.4;
}

.form-success.hide {
    animation: slideOutRight 0.3s ease forwards;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Error Page Styles */
.error-page {
    text-align: center;
    padding: 80px 20px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.1);
    max-width: 600px;
    margin: 0 auto;
}

.error-page h2 {
    color: var(--secondary-color);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.error-page p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: var(--text-color);
    line-height: 1.6;
}

.error-page .btn-primary {
    position: relative;
    overflow: hidden;
    padding: 12px 30px;
    border-radius: 50px;
    font-size: 1.1rem;
    transition: all 0.4s ease;
}

.error-page .btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.error-page .btn-primary:hover::before {
    left: 100%;
}

.error-page .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,107,92,0.3);
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 1024px) {
    .page-title {
        font-size: 2.4rem;
    }
    
    .content-with-hero {
        gap: 40px;
    }
    
    .form-grid {
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .page-container {
        padding: 20px 0;
    }
    
    .page-header {
        margin-bottom: 30px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .content-body {
        padding: 30px 20px;
        margin-bottom: 30px;
    }
    
    .content-with-hero {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .hero-image-container {
        position: relative;
        top: 0;
    }
    
    .hero-image {
        max-height: 400px;
    }
    
    /* Contact Page Responsive */
    .contact-form-section,
    .contact-info-section,
    .location-section {
        padding: 30px 20px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .contact-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .location-details {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .submit-btn,
    .reset-btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Gallery Responsive */
    .gallery-row {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .gallery-item {
        flex: 1 1 100% !important;
    }
    
    .image-container {
        height: 250px;
    }
    
    .page-gallery-section {
        margin-top: 40px;
        padding-top: 30px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 1.8rem;
    }
    
    .page-description {
        font-size: 1.1rem;
    }
    
    .content-body {
        padding: 20px 15px;
        font-size: 1rem;
    }
    
    /* Contact Page Mobile */
    .contact-form-section,
    .contact-info-section,
    .location-section {
        padding: 25px 15px;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }
    
    .contact-card-inner {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .map-placeholder {
        height: 250px;
    }
    
    .form-input,
    .form-textarea,
    .form-select {
        padding: 12px 15px;
        font-size: 0.95rem;
    }
    
    .error-page {
        padding: 50px 20px;
    }
    
    .error-page h2 {
        font-size: 2rem;
    }
    
    /* Gallery Mobile */
    .image-container {
        height: 200px;
    }
    
    .image-overlay {
        padding: 15px;
    }
    
    .image-caption {
        font-size: 0.9rem;
    }
    
    .hero-image-caption {
        padding: 20px 15px 15px;
    }
    
    .hero-image-caption p {
        font-size: 1rem;
    }
}

/* RTL Support for Contact Page */
[dir="rtl"] .form-group label i {
    margin-right: 0;
    margin-left: 10px;
}

[dir="rtl"] .textarea-footer {
    flex-direction: row-reverse;
}

[dir="rtl"] .map-address {
    flex-direction: row-reverse;
}

[dir="rtl"] .direction-list li,
[dir="rtl"] .info-list li {
    flex-direction: row-reverse;
}

[dir="rtl"] .location-card {
    border-right: 4px solid var(--primary-color);
    border-left: none;
}

[dir="rtl"] .form-success {
    border-right: 4px solid #2E7D32;
    border-left: none;
}

/* points */
/* Historical Timeline Styles */
.historical-timeline {
    list-style: none;
    padding-left: 20px;
    margin: 20px 0;
}

.timeline-item {
    position: relative;
    padding: 15px 0 15px 30px;
    margin-bottom: 15px;
    border-bottom: 1px solid #f0f0f0;
}

.timeline-item:last-child {
    border-bottom: none;
}

.timeline-item::before {
    content: "•";
    position: absolute;
    left: 0;
    top: 15px;
    color: var(--secondary-color);
    font-size: 24px;
    line-height: 1;
}

/* For Arabic/RTL */
[dir="rtl"] .historical-timeline {
    padding-left: 0;
    padding-right: 20px;
}

[dir="rtl"] .timeline-item {
    padding: 15px 30px 15px 0;
}

[dir="rtl"] .timeline-item::before {
    left: auto;
    right: 0;
}

/* Spacing and typography */
.timeline-item {
    line-height: 1.6;
    font-size: 16px;
    color: #333;
}

.timeline-item strong {
    color: var(--secondary-color);;
}

/* Optional: Add hover effect */
.timeline-item:hover {
    background-color: #f8fafc;
    padding-left: 35px;
    border-radius: 5px;
    transition: all 0.3s ease;
}

[dir="rtl"] .timeline-item:hover {
    padding-left: 0;
    padding-right: 35px;
}

/* If you want different bullet color for odd/even items */
.timeline-item:nth-child(odd)::before {
    color: var(--secondary-color);; /* Blue for odd items */
}

.timeline-item:nth-child(even)::before {
    color: var(--secondary-color);; /* Green for even items */
}


section{
    margin-bottom: 15px !important;
}

/* National Anthem Page Styles */
.anthem-article {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Hero Section */
.anthem-hero {
    text-align: center;
    padding: 4px 0;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--secondary-color);
}

.anthem-title {
    color: var(--primary-color);
    font-size: 42px;
    margin-bottom: 10px;
    font-weight: 700;
}

.anthem-subtitle {
    color: var(--secondary-color);
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 600;
}

.anthem-intro {
    max-width: 800px;
    margin: 0 auto;
    font-size: 18px;
    line-height: 1.8;
    color: var(--text-color);
}

/* Section Title */
.section-title {
    text-align: center;
    color: var(--primary-color);
    font-size: 32px;
    margin: 50px 0 30px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

/* Timeline Styles */
.timeline-container {
    max-width: 900px;
    margin: 0 auto 50px;
}

.timeline {
    position: relative;
    padding-left: 40px;
}

[dir="rtl"] .timeline {
    padding-left: 0;
    padding-right: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--secondary-color), var(--primary-color));
}

[dir="rtl"] .timeline::before {
    left: auto;
    right: 20px;
}

.timeline .timeline-item {
    position: relative;
    margin-bottom: 30px;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.timeline .timeline-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    background: var(--white);
}

.timeline-year {
    position: absolute;
    left: -70px;
    top: 12px;
    background: var(--primary-color);
    color: var(--white);
    padding: 8px 15px;
    border-radius: 20px;
    font-weight: bold;
    font-size: 16px;
    min-width: 80px;
    text-align: center;
}

[dir="rtl"] .timeline-year {
    left: auto;
    right: -70px;
}

.timeline-content h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-size: 22px;
}

.timeline-content p {
    color: #555;
    line-height: 1.6;
}

/* Lyrics Section */
.anthem-lyrics {
    background: #f8fafc;
    padding: 40px;
    border-radius: 15px;
    margin-top: 40px;
}

.lyrics-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.composer-info h3 {
    display: inline-block;
    margin: 0 20px 10px;
    color: var(--secondary-color);
    font-size: 18px;
    padding: 8px 15px;
    background: var(--white);
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.lyrics-container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
}

@media (max-width: 992px) {
    .lyrics-container {
        grid-template-columns: 1fr;
    }
}

/* Poetry/Lyrics Styling - Fixed Row Format */
.lyrics-block {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

.lyrics-arabic {
    font-size: 22px;
    line-height: 2.5;
    color: var(--text-color);
    text-align: right;
    direction: rtl;
}

/* Verse styling for single-line rows */
.verse {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px dashed #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.verse:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.verse .chorus {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 24px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    margin: 0;
    flex: 1;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.verse .chorus::after {
    content: '';
    display: inline-block;
    width: 50px;
    margin: 0 15px;
    border-bottom: 1px dotted #cbd5e0;
    vertical-align: middle;
}

.verse > p:not(.chorus) {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 22px;
    margin: 0;
    flex: 1;
    text-align: left;
    direction: ltr;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Verse styling for two-line rows (couplets) */
.verse.double {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 25px;
}

.verse.double .line {
    text-align: right;
    font-size: 20px;
    color: var(--primary-color);
    line-height: 1.8;
}

.verse.double .line:first-child {
    text-align: left;
}

/* Audio Section */
.audio-section {
    margin-top: 20px;
}

.audio-player {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.audio-info h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-size: 20px;
    text-align: center;
}

.audio-info p {
    color: #718096;
    margin-bottom: 20px;
    text-align: center;
}

/* Audio Player Styles */
.audio-element {
    width: 100%;
    height: 40px;
    margin: 15px 0;
}

.audio-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.play-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.play-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
}

.time-display {
    direction: ltr;
    font-size: 16px;
    color: var(--text-color);
    font-weight: 500;
    background: var(--light-bg);
    padding: 8px 15px;
    border-radius: 20px;
    min-width: 120px;
    text-align: center;
}

.progress-container {
    direction: ltr;
    width: 100%;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    margin: 15px 0;
    cursor: pointer;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: var(--primary-color);
    border-radius: 3px;
    transition: width 0.1s linear;
}

/* RTL Adjustments */
[dir="rtl"] .lyrics-arabic {
    font-size: 22px;
    line-height: 2.8;
}

[dir="rtl"] .chorus {
    font-size: 24px;
}

[dir="rtl"] .composer-info h3 {
    margin: 0 10px 10px;
}

/* Special styling for English version */
[lang="en"] .lyrics-arabic {
    direction: ltr;
    text-align: left;
    font-family: inherit;
}

[lang="en"] .verse {
    display: block;
    text-align: center;
}

[lang="en"] .verse .chorus,
[lang="en"] .verse > p:not(.chorus) {
    text-align: center;
    width: 100%;
    margin-bottom: 10px;
}

[lang="en"] .verse .chorus::after {
    display: none;
}

[lang="en"] .verse.double {
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        width: 95%;
    }
    
    /* Reorder layout - audio first on mobile */
    .lyrics-container {
        display: flex;
        flex-direction: column;
    }
    
    .audio-section {
        order: -1; /* Move audio to top */
        margin-bottom: 20px;
    }
    
    .anthem-title {
        font-size: 32px;
    }
    
    .anthem-subtitle {
        font-size: 20px;
    }
    
    .section-title {
        font-size: 26px !important;
    }
    
    .timeline-year {
        top: 0%;
        right: -50px !important;
        position: relative;
        left: 0;
        right: 0;
        margin-bottom: 15px;
        display: inline-block;
    }
    
    .timeline::before {
        display: none;
    }
    
    .timeline {
        padding-left: 0;
    }
    
    [dir="rtl"] .timeline {
        padding-right: 0;
    }
    
    .lyrics-arabic {
        font-size: 20px;
        line-height: 2.2;
    }
    
    .verse {
        display: block;
        text-align: center;
    }
    
    .verse .chorus,
    .verse > p:not(.chorus) {
        text-align: center;
        width: 100%;
        margin-bottom: 10px;
        white-space: normal;
    }
    
    .verse .chorus::after {
        display: none;
    }
    
    .verse.double {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    
    .verse.double .line {
        text-align: center !important;
    }
    
    .verse .chorus {
        font-size: 22px;
    }
    
    .verse > p:not(.chorus) {
        font-size: 10px !important; /* Fixed font size */
    }
    
    .anthem-lyrics {
        padding: 20px;
    }
    
    .lyrics-block {
        padding: 10px;
    }
    
    .composer-info h3 {
        font-size: 13px;
        display: block;
        margin: 10px 0;
    }
}

/* Add this to your CSS */
.highlighted-word {
    color: var(--secondary-color) !important;
    font-weight: 700 !important;
    text-shadow: 0 0 10px rgba(220, 53, 69, 0.3);
    transition: all 0.3s ease;
    position: relative;
}

/* Animation for highlighting effect */
@keyframes highlightPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.highlighted-word {
    animation: highlightPulse 0.5s ease;
}

/* Ensure the line text remains properly aligned */
.verse.double .line {
    display: inline-block;
    text-align: right;
    width: 100%;
}

/* Ensure highlighted words don't break the layout */
.highlighted-word {
    display: inline-block;
    padding: 0 2px;
}
.verse.double .line {
    text-align: right;
    direction: rtl;
}
