@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@300;400;500;600;700&display=swap');

:root {
    /* رنگ‌های جدید شبیه آوینی */
    --primary-green: #16a085;
    --light-green: #1abc9c;
    --dark-green: #0f6b5c;
    --accent-gold: #f39c12;
    --light-gold: #f1c40f;
    --cream: #f8f2e3; /* رنگ کرم به‌روز شده بر اساس عکس شما */
    --light-cream: #fefbf3;
    --soft-gray: #ecf0f1;
    --white: #ffffff;
    --text-dark: #2c3e50;
    --text-gray: #7f8c8d;
    --border-light: #bdc3c7;
    --shadow-light: rgba(22, 160, 133, 0.15);
    --shadow-gold: rgba(243, 156, 18, 0.25);
    --dark-bg: #34495e;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    /* بک‌گراند اصلی بادی */
    background-color: var(--cream); /* رنگ کرم به‌روز شده به عنوان بک‌گراند اصلی */
    /* الگو از طریق ::before اعمال می‌شود */

    min-height: 100vh;
    position: relative; /* برای موقعیت‌دهی صحیح ::before */
    direction: rtl;
    text-align: right;
    padding-top: 0 !important;
}

/* پس‌زمینه با الگوی جدید برای بادی */
body::before {
    content: '';
    position: fixed; /* برای پوشش کامل ویوپورت و ثابت ماندن در هنگام اسکرول */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("images/body_pattern.png"); /* عکس جدید به عنوان الگو */
    background-repeat: repeat; /* تکرار الگو */
    background-size: 250px 250px; /* اندازه هر تکرار الگو را تنظیم کنید (می‌توانید تغییر دهید) */
    background-attachment: fixed; /* الگو با اسکرول حرکت نکند */
    background-color: transparent; /* رنگ پایه از بادی می‌آید */
    opacity: 0.03; /* شفافیت الگو را برای وضوح بیشتر تنظیم کنید (می‌توانید تغییر دهید) */
    z-index: -1; /* اطمینان از قرار گرفتن زیر محتوای اصلی بادی */
    pointer-events: none; /* برای اینکه روی تعاملات کاربر تاثیر نگذارد */
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header جدید و آزاد (غیر ثابت) */
header {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--light-green) 50%, var(--dark-green) 100%);
    color: var(--white);
    padding: 3rem 0;
    margin-bottom: 2rem;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: auto !important;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    transform: none !important;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(22, 160, 133, 0.4);
}

/* الگوی اسلامی در هدر */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* مسیر عکس جدید */
    background-image: url("images/new_pattern.jpg"); 
    background-size: 200px 200px; /* اندازه تکرار الگو */
    background-repeat: repeat; /* الگو را تکرار کنید */
    opacity: 0.1; /* شفافیت الگو را تنظیم کنید */
    z-index: 1; /* اطمینان از قرار گرفتن زیر محتوای اصلی هدر */
    animation: none; /* انیمیشن قبلی را حذف می‌کنیم */
}

@keyframes patternMove {
    0% { background-position: 0 0; }
    100% { background-position: 200px 200px; }
}

header .container {
    position: relative;
    z-index: 2;
    display: flex; /* Make it a flex container */
    align-items: center; /* Vertically center items */
    justify-content: space-between; /* Space out items */
}

.header-image {
    width: 160px; /* Adjust size as needed */
    height: 160px; /* Adjust size as needed */
    object-fit: contain;
    margin: 0 20px; /* Adjust spacing */
    z-index: 3; /* Ensure images are above patterns */
}

.header-image-left {
    order: 1; /* Position to the left */
}

.header-image-right {
    order: 3; /* Position to the right */
}

header .header-content {
    flex-grow: 1; /* Allow main content to take available space */
    text-align: center;
    position: relative;
    order: 2; /* Keep main title in the middle */
}

header h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 700;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    color: var(--white);
    margin-left: auto;
    margin-right: auto;
    display: block; /* Ensure it takes full width within its flex item */
}

/* افکت نور در عنوان */
header h1::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: textShine 3s ease-in-out infinite;
}

@keyframes textShine {
    0% { left: -100%; }
    50% { left: 100%; }
    100% { left: 100%; }
}

header p {
    text-align: center;
    font-size: 1.4rem;
    opacity: 0.95;
    font-weight: 400;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Main Content */
main {
    background: var(--white);
    border-radius: 20px;
    padding: 2.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 15px 50px var(--shadow-light);
    position: relative;
    border: 1px solid var(--border-light);
    margin-top: 2rem;
}

main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-gold), var(--light-green));
    border-radius: 20px 20px 0 0;
}

/* Back Link */
.back-link {
    color: var(--white);
    text-decoration: none;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    transition: all 0.4s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.back-link::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: right 0.5s ease;
}

.back-link:hover::before {
    right: 100%;
}

.back-link:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: var(--accent-gold);
    transform: translateX(10px) scale(1.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--dark-green) 100%);
    color: var(--white);
    padding: 3rem 0;
    position: relative;
    overflow: hidden;
    margin-top: 3rem;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* مسیر عکس جدید */
    background-image: url("images/new_pattern.jpg");
    background-size: 150px 150px; /* اندازه تکرار الگو */
    background-repeat: repeat; /* الگو را تکرار کنید */
    opacity: 0.1; /* شفافیت الگو را تنظیم کنید */
    z-index: 1; /* اطمینان از قرار گرفتن زیر محتوای اصلی فوتر */
    animation: none; /* انیمیشن قبلی را حذف می‌کنیم */
}

footer .container {
    position: relative;
    z-index: 2;
    text-align: center;
}

footer p {
    font-size: 1.2rem;
    font-weight: 500;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.footer-content {
    display: flex; /* Changed to flex for better control over sections */
    flex-direction: column; /* Stack items vertically by default */
    align-items: center; /* Center items horizontally */
    gap: 2rem;
    justify-content: center;
}

.footer-main {
    text-align: center;
    width: 100%; /* Take full width */
}

.footer-main h3 {
    color: white;
    font-size: 2.5rem; /* Larger font size */
    margin-bottom: 0.8rem;
    text-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.footer-middle-sections {
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    justify-content: center; /* Center items in this section */
    gap: 2rem;
    width: 100%; /* Take full width */
}

.footer-section {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    text-align: right;
    flex: 1; /* Allow sections to grow and shrink */
    min-width: 280px; /* Minimum width for sections */
}

.footer-section-title {
    color: var(--accent-gold); /* Use accent gold for titles */
    margin-bottom: 1.2rem;
    font-size: 1.3rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 2px;
    background: var(--light-gold);
    border-radius: 1px;
}

.footer-section p, .footer-section li {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1rem;
    line-height: 1.7;
}

/* Combined About Dehno and Logo Box */
.footer-about-dehno-box {
    display: flex;
    align-items: center; /* Vertically center items */
    justify-content: flex-end; /* Align to the right (text on left, image on right) */
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    gap: 1.5rem; /* Space between text and image */
    flex: 1;
    min-width: 280px;
}

.footer-about-text-content {
    flex-grow: 1; /* Allow text to take available space */
    text-align: right;
}

.footer-dehno-logo-wrapper {
    flex-shrink: 0; /* Prevent logo from shrinking */
}

.footer-dehno-logo-wrapper img {
    max-width: 220px; /* Reduced size for the logo */
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}


.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 2rem;
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    width: 100%; /* Take full width */
}

.footer-links a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--light-gold);
}

.footer-martyr {
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Styles for Index Page (index.php) */

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--accent-gold);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

/* Intro Section */
.intro {
    text-align: center;
    margin-bottom: 3rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, var(--light-cream) 0%, var(--white) 100%);
    border-radius: 15px;
    border: 2px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.intro h2 {
    color: var(--primary-green);
    margin-bottom: 1.5rem;
    font-size: 2.5rem;
    font-weight: 600;
    position: relative;
}

.intro h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-gold));
    border-radius: 2px;
}

.intro-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-gray);
    font-size: 1rem;
}

/* Martyrs Grid */
.martyrs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.martyr-card {
    background: linear-gradient(135deg, var(--white) 0%, var(--soft-gray) 100%);
    border-radius: 15px;
    padding: 0;
    box-shadow: 0 8px 25px var(--shadow-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 2px solid var(--border-light);
    position: relative;
    overflow: hidden;
    display: flex;
    min-height: 200px;
}

.martyr-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-gold));
    border-radius: 15px 15px 0 0;
}

.martyr-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px var(--shadow-gold);
    border-color: var(--accent-gold);
}

.martyr-photo {
    width: 160px;
    height: 200px;
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 15px 0 0 15px;
    border-left: 3px solid var(--accent-gold);
    transition: all 0.4s ease;
}

.martyr-card:hover .martyr-photo {
    transform: scale(1.05);
}

.martyr-info {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.martyr-info h3 {
    color: var(--primary-green);
    margin-bottom: 1rem;
    font-size: 1.4rem;
    font-weight: 600;
}

.martyr-details p {
    display: flex;
    justify-content: space-between;
    margin: 0.5rem 0;
    padding: 0.3rem 0;
    border-bottom: 1px solid var(--border-light);
}

.label {
    color: var(--primary-green);
    font-weight: 500;
}

.value {
    color: var(--text-dark);
}

.card-footer {
    padding-top: 1rem;
    border-top: 2px solid var(--border-light);
}

.read-more {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-green);
    font-weight: 500;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.martyr-card:hover .read-more {
    transform: translateX(-5px);
}

/* Search Section */
.search-section {
    margin-bottom: 3rem;
}

.search-container {
    background: linear-gradient(135deg, var(--white), var(--light-cream));
    padding: 4rem 2.5rem; /* Increased padding for larger height */
    min-height: 500px; /* Increased height for background image */
    border-radius: 20px;
    border: 2px solid var(--border-light);
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.search-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('images/search_bg.jpg'); /* Your background image */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.5; /* Adjust opacity as needed */
    z-index: 1;
}

.search-title {
    color: var(--primary-green);
    margin-bottom: 2.5rem; /* Increased margin-bottom */
    font-size: 2.8rem; /* Slightly larger title */
    font-weight: 700;
    position: relative;
    z-index: 2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-visual-wrapper {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-grow: 1; /* Allow it to take available height */
}

.search-box-and-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem; /* Increased gap */
    max-width: 700px; /* Allow wider search box */
    width: 100%;
    padding: 1.5rem; /* Padding for the wrapper */
    background: rgba(255, 255, 255, 0.8); /* Semi-transparent background */
    border-radius: 35px; /* Slightly larger border-radius */
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
    backdrop-filter: blur(5px);
}

.search-box-and-button input {
    flex-grow: 1;
    padding: 1.8rem 2.5rem; /* Increased padding for triple height */
    border: 2px solid var(--primary-green);
    border-radius: 30px; /* Slightly larger border-radius */
    font-size: 1.3rem; /* Larger font size */
    background: var(--white);
    transition: all 0.3s ease;
}

.search-box-and-button input:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 15px rgba(243, 156, 18, 0.3);
}

.search-box-and-button button {
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    color: white;
    border: none;
    padding: 1.8rem 3rem; /* Increased padding for triple height */
    border-radius: 30px; /* Slightly larger border-radius */
    cursor: pointer;
    font-size: 1.3rem; /* Larger font size */
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.8rem; /* Increased gap */
    box-shadow: 0 4px 15px var(--shadow-light);
}

.search-box-and-button button:hover {
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px var(--shadow-light);
}

.search-results {
    margin-top: 2rem; /* Increased margin-top */
    position: relative;
    z-index: 2;
}

/* Hide the old search box styling */
.search-box {
    display: none;
}

/* Styles for Martyr Page (martyr.php) */

.martyr-profile {
    max-width: 1100px;
    margin: 0 auto;
}

.breadcrumb {
    margin-bottom: 2rem;
}

.martyr-title {
    font-size: 3rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

.martyr-subtitle {
    font-size: 1.3rem;
    opacity: 0.9;
    text-align: center;
    margin-bottom: 0.5rem;
}

.martyr-age {
    font-size: 1.1rem;
    opacity: 0.8;
    text-align: center;
    font-style: italic;
}

/* Profile Header */
.profile-header {
    display: flex;
    gap: 2.5rem;
    margin-bottom: 2.5rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, var(--light-cream) 0%, var(--white) 100%);
    border-radius: 20px;
    align-items: center;
    border: 2px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.profile-header::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle, var(--accent-gold) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0.1;
}

.profile-image-container {
    position: relative;
    flex-shrink: 0;
}

.image-frame {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 3px solid var(--accent-gold);
    border-radius: 20px;
    opacity: 0.3;
}

.profile-photo {
    width: 180px;
    height: 220px;
    border-radius: 15px;
    object-fit: cover;
    border: 4px solid var(--accent-gold);
    flex-shrink: 0;
    box-shadow: 0 12px 30px var(--shadow-gold);
    transition: all 0.4s ease;
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 40px var(--shadow-gold);
}

.virtual-pilgrimage-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    margin-top: 1.5rem;
    background: linear-gradient(135deg, var(--accent-gold), var(--light-gold));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: not-allowed; /* Indicates it's disabled */
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
    opacity: 0.7;
}

.virtual-pilgrimage-btn:hover {
    opacity: 0.8;
}

.profile-info {
    flex: 1;
}

.profile-info h2 {
    color: var(--primary-green);
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
    position: relative;
}

.profile-info h2::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 80px;
    height: 3px;
    background: var(--accent-gold);
    border-radius: 2px;
}

.basic-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem;
    background: var(--light-cream);
    border-radius: 10px;
    border-right: 4px solid var(--primary-green);
}

.info-row.martyrdom-date {
    border-right-color: var(--accent-gold);
    background: linear-gradient(135deg, #fef7e0, var(--light-cream));
}

.info-label {
    font-weight: 600;
    color: var(--primary-green);
    min-width: 100px;
}

.info-value {
    color: var(--text-dark);
    flex: 1;
}

/* Additional Info */
.additional-info {
    background: linear-gradient(135deg, var(--soft-gray) 0%, var(--white) 100%);
    padding: 2.5rem;
    border-radius: 15px;
    margin-bottom: 2.5rem;
    border: 2px solid var(--border-light);
    position: relative;
}

.additional-info::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary-green), var(--accent-gold));
    border-radius: 0 15px 15px 0;
}

.additional-info h3 {
    color: var(--primary-green);
    margin-bottom: 2rem;
    font-size: 1.8rem;
    text-align: center;
    position: relative;
    font-weight: 600;
}

.additional-info h3::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: var(--accent-gold);
    border-radius: 2px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.info-card {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 15px;
    border: 2px solid var(--border-light);
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px var(--shadow-light);
    border-color: var(--accent-gold);
}

.card-content h4 {
    color: var(--primary-green);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.card-content p {
    color: var(--text-dark);
    line-height: 1.6;
}

/* Tabs */
.tabs-section {
    margin-bottom: 2.5rem;
}

.tabs {
    display: flex;
    margin-bottom: 2.5rem;
    background: var(--soft-gray);
    border-radius: 15px;
    padding: 0.6rem;
    flex-wrap: wrap;
    border: 2px solid var(--border-light);
    box-shadow: 0 4px 15px var(--shadow-light);
}

.tab-button {
    background: transparent;
    border: none;
    padding: 1.2rem 2rem;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    flex: 1;
    min-width: 140px;
    color: var(--text-gray);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.tab-button::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    width: 0;
    height: 3px;
    background: var(--accent-gold);
    transition: all 0.3s ease;
    transform: translateX(50%);
}

.tab-button:hover {
    background: rgba(22, 160, 133, 0.1);
    color: var(--primary-green);
    transform: translateY(-2px);
}

.tab-button:hover::before {
    width: 80%;
}

.tab-button.active {
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    color: var(--white);
    box-shadow: 0 6px 20px var(--shadow-light);
    transform: translateY(-2px);
}

.tab-button.active::before {
    width: 100%;
    background: var(--accent-gold);
}

.tab-icon {
    font-size: 1.2rem;
}

.tab-count {
    background: var(--accent-gold);
    color: white;
    font-size: 0.8rem;
    padding: 0.2rem 0.5rem;
    border-radius: 10px;
    font-weight: 600;
    min-width: 20px;
    text-align: center;
}

.tab-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.section-icon {
    font-size: 1.5rem;
    margin-left: 0.5rem;
}

.items-count {
    color: var(--text-gray);
    font-size: 1rem;
    font-weight: 400;
}

/* Tab Panes Content */
.tab-pane {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.tab-pane.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.tab-pane h3 {
    color: var(--primary-green);
    margin-bottom: 2rem;
    font-size: 2rem;
    text-align: center;
    position: relative;
    font-weight: 600;
}

/* Biography Tab */
.biography-content {
    background: linear-gradient(135deg, var(--light-cream) 0%, var(--white) 100%);
    padding: 2.5rem;
    border-radius: 15px;
    line-height: 1.8;
    font-size: 1.2rem;
    border: 2px solid var(--border-light);
    position: relative;
    border-right: 5px solid var(--primary-green);
}

.biography-content::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2316a085'%3E%3Cpath d='M12 2L15.09 8.26L22 9L17 14.74L18.18 21.02L12 17.77L5.82 21.02L7 14.74L2 9L8.91 8.26L12 2Z'/%3E%3C/svg%3E") no-repeat center;
    background-size: contain;
    opacity: 0.1;
}

.biography-content h4 {
    color: var(--primary-green);
    margin: 2rem 0 1.2rem;
    font-size: 1.4rem;
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 0.6rem;
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.biography-content h4::before {
    content: '●';
    color: var(--accent-gold);
    margin-left: 0.5rem;
}

.text-content {
    line-height: 1.8;
    font-size: 1.2rem;
    color: var(--text-dark);
    max-height: 400px;
    overflow-y: auto;
}

.additional-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-light);
}

.subsection-icon {
    font-size: 1.2rem;
}

.martyrdom-text {
    background: linear-gradient(135deg, #fef7e0, var(--light-cream));
    padding: 2rem;
    border-radius: 12px;
    border-right: 4px solid var(--accent-gold);
    position: relative;
}

.martyrdom-text::before {
    content: '🌹';
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 1.5rem;
    opacity: 0.3;
}

/* Testament Tab */
.testament-content {
    background: linear-gradient(135deg, var(--light-cream), var(--white));
    padding: 2.5rem;
    border-radius: 15px;
    border: 2px solid var(--border-light);
    border-right: 5px solid var(--primary-green);
}

.testament-quote {
    position: relative;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f9fa, var(--light-cream));
    border-radius: 15px;
    border: 2px solid var(--border-light);
    margin-bottom: 2rem;
}

.quote-mark {
    font-size: 4rem;
    color: var(--accent-gold);
    opacity: 0.3;
    position: absolute;
    font-family: serif;
}

.quote-mark:first-child {
    top: 10px;
    right: 20px;
}

.quote-end {
    bottom: 10px;
    left: 20px;
    transform: rotate(180deg);
}

.testament-signature {
    text-align: left;
    font-style: italic;
    color: var(--primary-green);
    font-weight: 600;
    font-size: 1.1rem;
}

/* Photos Tab */
.photo-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.photo-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow-light);
    transition: all 0.3s ease;
    text-align: center;
    background: var(--white);
    padding: 1.2rem;
    border: 2px solid var(--border-light);
}

.photo-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-gold));
    border-radius: 15px 15px 0 0;
}

.photo-item:hover {
    transform: translateY(-8px) rotate(1deg);
    box-shadow: 0 15px 35px var(--shadow-gold);
    border-color: var(--accent-gold);
}

.photo-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
}

.photo-wrapper img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--border-light);
}

.photo-wrapper img:hover {
    transform: scale(1.05);
    border-color: var(--accent-gold);
    box-shadow: 0 8px 20px var(--shadow-gold);
}

.clickable-image {
    cursor: pointer !important;
    transition: all 0.3s ease !important;
}

.clickable-image:hover {
    transform: scale(1.05) !important;
    box-shadow: 0 8px 25px rgba(0,0,0,0.3) !important;
}

/* Videos Tab */
.video-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.video-item {
    background: var(--white);
    border-radius: 15px;
    padding: 1.5rem;
    border: 2px solid var(--border-light);
    box-shadow: 0 4px 15px var(--shadow-light);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.video-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-gold));
    border-radius: 15px 15px 0 0;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px var(--shadow-light);
    border-color: var(--accent-gold);
}


.video-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-light);
}

.video-header h4 {
    color: var(--primary-green);
    font-size: 1.2rem;
}

.video-size {
    background: var(--light-cream);
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    color: var(--text-gray);
}

.video-wrapper {
    border-radius: 10px;
    overflow: hidden;
}

.video-wrapper video {
    width: 100%;
    max-height: 300px;
    border-radius: 10px;
}

/* Writings Tab */
.writings-content {
    background: linear-gradient(135deg, var(--light-cream), var(--white));
    padding: 2.5rem;
    border-radius: 15px;
    border: 2px solid var(--border-light);
    border-right: 5px solid var(--primary-green);
}

/* Empty Content Message */
.empty-content {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-gray);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Error Report Section */
.error-report-section {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    border: 2px solid #f39c12;
    border-radius: 15px;
    padding: 2.5rem;
    margin-top: 2rem;
    text-align: center;
}

.error-report-content h3 {
    color: var(--primary-green);
    margin-bottom: 1.5rem;
    font-size: 1.6rem;
    font-weight: 600;
}

.error-report-content p {
    color: var(--text-dark);
    line-height: 1.8;
    margin-bottom: 1.5rem;
}

.contact-info {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--white);
    padding: 1rem 1.5rem;
    border-radius: 25px;
    border: 2px solid var(--accent-gold);
    font-weight: 500;
}

.contact-icon {
    font-size: 1.2rem;
}

.note {
    font-style: italic;
    color: var(--text-gray);
    font-size: 0.95rem;
}

/* Share Section */
.share-section {
    background: linear-gradient(135deg, var(--soft-gray), var(--white));
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    border: 2px solid var(--border-light);
    margin-top: 3rem;
}

.share-content h3 {
    color: var(--primary-green);
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.share-content p {
    color: var(--text-gray);
    margin-bottom: 2rem;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    color: white;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 500;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--shadow-light);
}

.share-icon {
    font-size: 1.2rem;
}

/* Martyrs Navigation */
.martyrs-navigation {
    background: linear-gradient(135deg, var(--light-cream), var(--white));
    padding: 2.5rem;
    border-radius: 15px;
    border: 2px solid var(--border-light);
    margin-top: 3rem;
}

.nav-content h3 {
    text-align: center;
    color: var(--primary-green);
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.martyrs-navigation .nav-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.5rem;
    background: var(--white);
    border: 2px solid var(--border-light);
    border-radius: 15px;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    flex: 1;
    min-width: 200px;
    position: relative;
    z-index: 1;
}

.martyrs-navigation .nav-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px var(--shadow-light);
    border-color: var(--primary-green);
}

.martyrs-navigation .prev-btn {
    justify-content: flex-start;
}

.martyrs-navigation .next-btn {
    justify-content: flex-end;
}

.martyrs-navigation .home-btn {
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    color: white;
    border-color: var(--primary-green);
}

.martyrs-navigation .nav-arrow {
    font-size: 1.5rem;
    color: var(--primary-green);
}

.martyrs-navigation .nav-icon {
    font-size: 1.5rem;
}

.martyrs-navigation .nav-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.martyrs-navigation .nav-label {
    font-size: 0.9rem;
    color: var(--text-gray);
}

.martyrs-navigation .nav-name {
    font-weight: 600;
    color: var(--primary-green);
}

/* Styles for Admin Page (persian_admin.php) */

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Admin Login Form */
.login-container {
    background: var(--white);
    border-radius: 20px;
    padding: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    width: 100%;
    max-width: 450px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-gold));
    border-radius: 20px 20px 0 0;
}

.login-header {
    margin-bottom: 2.5rem;
}

.login-header h1 {
    color: var(--primary-green);
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.login-header p {
    color: var(--text-gray);
    font-size: 1.1rem;
}

.login-icon {
    font-size: 4rem;
    color: var(--accent-gold);
    margin-bottom: 1.5rem;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.form-group {
    margin-bottom: 1.5rem;
    text-align: right;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-green);
    font-weight: 600;
    font-size: 1.1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1.2rem;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--white);
    position: relative;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-green);
    outline: none;
    box-shadow: 0 0 15px rgba(22, 160, 133, 0.2);
    background: var(--light-cream);
    transform: translateY(-2px);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    color: var(--white);
    padding: 1.5rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: right 0.6s ease;
}

.login-btn:hover::before {
    right: 100%;
}

.login-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px var(--shadow-light);
}

.error-message {
    background: linear-gradient(135deg, #fef2f2, #fecaca);
    color: #991b1b;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    border: 2px solid #ef4444;
    font-weight: 500;
}

.security-note {
    background: linear-gradient(135deg, #e6f7ff, #bae7ff);
    padding: 1.5rem;
    border-radius: 10px;
    margin-top: 2rem;
    border: 2px solid var(--primary-green);
    font-size: 0.9rem;
    color: var(--text-dark);
}

.security-note h4 {
    color: var(--primary-green);
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

/* Admin Tabs */
.admin-tabs {
    display: flex;
    background: linear-gradient(135deg, var(--soft-gray) 0%, var(--white) 100%);
    border-radius: 20px;
    margin-bottom: 3rem;
    overflow: hidden;
    border: 2px solid var(--border-light);
    box-shadow: 0 8px 25px var(--shadow-light);
    position: relative;
}

.admin-tabs::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-gold), var(--light-green));
    border-radius: 20px 20px 0 0;
}

.admin-tab {
    flex: 1;
    padding: 1.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-gray);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.admin-tab::before {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    width: 0;
    height: 3px;
    background: var(--accent-gold);
    transition: all 0.3s ease;
    transform: translateX(50%);
}

.admin-tab:hover::before {
    width: 80%;
}

.admin-tab.active {
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    color: var(--white);
    box-shadow: 0 5px 20px var(--shadow-light);
    transform: translateY(-2px);
}

.admin-tab.active::before {
    width: 100%;
    background: var(--accent-gold);
}

.admin-tab:hover {
    background: rgba(22, 160, 133, 0.1);
    color: var(--primary-green);
    transform: translateY(-2px);
}

/* Admin Forms */
.form-container {
    background: linear-gradient(135deg, var(--white) 0%, var(--soft-gray) 100%);
    padding: 3rem;
    border-radius: 20px;
    margin-bottom: 3rem;
    border: 2px solid var(--border-light);
    position: relative;
    box-shadow: 0 10px 30px var(--shadow-light);
}

.form-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-gold), var(--light-green));
    border-radius: 20px 20px 0 0;
}

.form-container h2 {
    color: var(--primary-green);
    margin-bottom: 2rem;
    font-size: 2.2rem;
    text-align: center;
    font-weight: 600;
    position: relative;
}

.form-container h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--accent-gold);
    border-radius: 2px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.form-group label::before {
    content: '●';
    color: var(--accent-gold);
    margin-left: 0.5rem;
    font-size: 0.8rem;
}

/* Persian Date Selector */
.date-selector {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.date-selector select {
    flex: 1;
    min-width: 80px;
}

.date-label {
    color: var(--primary-green);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.persian-date-input {
    background: var(--light-cream);
    border: 2px solid var(--border-light);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.persian-date-input:hover {
    border-color: var(--primary-green);
    box-shadow: 0 4px 15px var(--shadow-light);
}

.date-preview {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--white);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-gray);
    border: 1px solid var(--border-light);
    text-align: center;
    transition: all 0.3s ease;
}

.date-preview:not(:empty) {
    border-color: var(--primary-green);
    color: var(--primary-green);
    font-weight: 500;
}

/* Submit Buttons */
.submit-btn {
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    color: var(--white);
    padding: 1.5rem 3rem;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.2rem;
    margin: 1rem;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: right 0.6s ease;
}

.submit-btn:hover::before {
    right: 100%;
}

.submit-btn:hover {
    background: linear-gradient(135deg, var(--light-green), var(--dark-green));
    border-color: var(--accent-gold);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 35px var(--shadow-gold);
}

.submit-btn:active {
    transform: translateY(-1px) scale(0.98);
}

/* Upload Area */
.upload-area {
    border: 3px dashed var(--primary-green);
    border-radius: 20px;
    padding: 6rem 4rem; /* افزایش از 4rem به 6rem */
    text-align: center;
    background: linear-gradient(135deg, var(--light-cream) 0%, var(--white) 100%);
    margin: 2rem 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    cursor: pointer;
    overflow: hidden;
    min-height: 300px; /* اضافه کردن حداقل ارتفاع */
}

.upload-area::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(22, 160, 133, 0.05) 0%, transparent 70%);
    animation: uploadPulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes uploadPulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.5; }
    50% { transform: scale(1.1) rotate(180deg); opacity: 0.8; }
}

.upload-area:hover {
    border-color: var(--accent-gold);
    background: linear-gradient(135deg, var(--white) 0%, var(--light-cream) 100%);
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--shadow-light);
}

.upload-area .custom-file-upload {
    display: block;
    cursor: pointer;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    padding-top: 4rem;
}

.upload-area p {
    color: var(--primary-green);
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem;
    position: relative;
    z-index: 2;
}

.upload-area small {
    color: var(--text-gray);
    font-size: 1rem;
    position: relative;
    z-index: 2;
}

/* File List in Admin */
.file-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.file-item {
    background: linear-gradient(135deg, var(--white) 0%, var(--soft-gray) 100%);
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    border: 2px solid var(--border-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.file-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-gold));
    border-radius: 15px 15px 0 0;
}

.file-item:hover {
    transform: translateY(-8px) rotate(1deg);
    box-shadow: 0 20px 50px var(--shadow-light);
    border-color: var(--accent-gold);
}

.file-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--accent-gold);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.file-item h4 {
    color: var(--primary-green);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.file-item p {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin: 0.8rem 0;
}

.file-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid var(--border-light);
    transition: all 0.3s ease;
}

.file-item img:hover {
    border-color: var(--accent-gold);
    transform: scale(1.05);
}

.file-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    background: linear-gradient(135deg, var(--light-green), var(--primary-green));
    color: var(--white);
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 20px;
    font-size: 0.9rem;
    margin: 0.2rem;
    display: inline-block;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: right 0.4s ease;
}

.action-btn:hover::before {
    right: 100%;
}

.action-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 20px var(--shadow-light);
    border-color: var(--accent-gold);
}

.delete-btn {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.delete-btn::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: right 0.4s ease;
}

.delete-btn:hover::before {
    right: 100%;
}

.delete-btn:hover {
    background: linear-gradient(135deg, #c0392b, #a93226);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 8px 25px rgba(231, 76, 60, 0.4);
}

/* Martyrs Table */
.martyrs-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px var(--shadow-light);
    border: 2px solid var(--border-light);
    position: relative;
}

.martyrs-table::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-gold), var(--light-green));
    border-radius: 20px 20px 0 0;
}

.martyrs-table th,
.martyrs-table td {
    padding: 1.5rem 1rem;
    text-align: right;
    border-bottom: 1px solid var(--border-light);
}

.martyrs-table th {
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    color: var(--white);
    font-weight: 600;
    font-size: 1.1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.martyrs-table tbody tr {
    transition: all 0.3s ease;
}

.martyrs-table tbody tr:hover {
    background: linear-gradient(135deg, var(--light-cream) 0%, var(--white) 100%);
    transform: scale(1.01);
    box-shadow: 0 4px 15px var(--shadow-light);
}

.martyrs-table tr:last-child td {
    border-bottom: none;
}

/* Messages (Success/Error) */
.message {
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    font-weight: 500;
    border: 2px solid;
    position: relative;
    animation: messageSlideIn 0.5s ease;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.message::before {
    content: '';
    position: absolute;
    top: 20px;
    right: 20px;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: white;
}

.success {
    background: linear-gradient(135deg, #d5f4e6, #a7f3d0);
    color: #065f46;
    border-color: var(--primary-green);
}

.success::before {
    background: var(--primary-green);
    content: '✓';
}

.error {
    background: linear-gradient(135deg, #fef2f2, #fecaca);
    color: #991b1b;
    border-color: #ef4444;
}

.error::before {
    background: #ef4444;
    content: '✗';
}

/* File Type Info */
.file-type-info {
    background: linear-gradient(135deg, #e6f7ff, #bae7ff);
    padding: 2.5rem;
    border-radius: 20px;
    border: 2px solid var(--primary-green);
    margin-bottom: 2rem;
    position: relative;
    box-shadow: 0 8px 25px var(--shadow-light);
}

.file-type-info::before {
    content: 'ℹ️';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.file-type-info h3 {
    color: var(--primary-green);
    margin-bottom: 2rem;
    font-size: 1.6rem;
    font-weight: 600;
}

.file-type-info ul {
    list-style: none;
    padding-right: 2rem;
}

.file-type-info li {
    margin: 1.5rem 0;
    padding: 1.2rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    border-right: 4px solid var(--accent-gold);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.file-type-info li::before {
    content: '●';
    color: var(--accent-gold);
    position: absolute;
    right: -12px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--white);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.file-type-info li:hover {
    background: var(--white);
    transform: translateX(-10px);
    box-shadow: 0 5px 15px var(--shadow-light);
    border-right-color: var(--primary-green);
}

.file-type-info strong {
    color: var(--primary-green);
    font-weight: 600;
}

/* General Animations & Effects */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.martyr-card {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.info-card {
    animation: fadeInScale 0.6s ease forwards;
}

.photo-item {
    animation: fadeInScale 0.8s ease forwards;
}

.video-item {
    animation: fadeInScale 1s ease forwards;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

/* Special Effects for Cards */
.martyr-card,
.photo-item,
.video-item,
.info-card {
    position: relative;
    overflow: hidden;
}

.martyr-card::after,
.photo-item::after,
.video-item::after,
.info-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(22, 160, 133, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.martyr-card:hover::after,
.photo-item:hover::after,
.video-item:hover::after,
.info-card:hover::after {
    opacity: 1;
    animation: shimmer 1.2s ease-in-out;
}

/* General Scrollbar */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--soft-gray);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-green), var(--accent-gold));
    border-radius: 10px;
    border: 2px solid var(--soft-gray);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--light-green), var(--light-gold));
}

.text-content::-webkit-scrollbar {
    width: 6px;
}

.text-content::-webkit-scrollbar-track {
    background: var(--soft-gray);
    border-radius: 3px;
}

.text-content::-webkit-scrollbar-thumb {
    background: var(--primary-green);
    border-radius: 3px;
}

.text-content::-webkit-scrollbar-thumb:hover {
    background: var(--light-green);
}

/* Styles for full_text_view.php */
.full-text-body {
    background-color: var(--light-cream);
}

.full-text-main {
    padding: 3rem 5rem;
    min-height: calc(100vh - 200px); /* Adjust based on header/footer height */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.full-text-content {
    width: 100%;
    max-width: 900px;
    background: var(--white);
    border-radius: 15px;
    padding: 3rem;
    box-shadow: 0 8px 30px var(--shadow-light);
    border: 2px solid var(--primary-green);
    position: relative;
    line-height: 2;
    font-size: 1.2rem;
}

.full-text-content::before {
    content: '📖'; /* or '📜', '✍️' */
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    opacity: 0.1;
    color: var(--primary-green);
}

.text-content-scrollable {
    max-height: calc(100vh - 350px); /* Adjust based on header/footer/padding */
    overflow-y: auto;
    padding-left: 1rem; /* for scrollbar spacing */
}

/* Read Full Text Button */
.read-full-text-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 0.8rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-green), var(--light-green));
    color: white;
    border-radius: 25px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--shadow-light);
    float: left; /* Align to the left in RTL */
}

.read-full-text-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px var(--shadow-light);
    background: linear-gradient(135deg, var(--dark-green), var(--primary-green));
}

.read-full-text-btn svg {
    transform: rotate(180deg); /* Flip arrow for RTL */
}

/* Admin Header Styles */
.admin-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.admin-header .admin-header-content { /* The new wrapper for middle content */
    flex-grow: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 20px; /* Add some margin around the middle content */
}

.admin-header .admin-header-content h1 {
    font-size: 2rem; /* Smaller font size for admin title */
    margin-bottom: 0;
    text-align: right;
}

.admin-header .admin-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-header .admin-info span {
    color: var(--white);
}

.admin-header .admin-info .logout-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.admin-header .admin-info .logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: var(--accent-gold);
}

/* Adjust back-link in admin header */
.admin-header .back-link {
    color: var(--white);
    text-decoration: none;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    transition: all 0.4s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
    margin-bottom: 0.5rem; /* Add some space below it */
}


/* Responsive Design */

@media (max-width: 1024px) {
    .martyrs-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
    .video-gallery {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }

    .header-image {
        width: 100px;
        height: 100px;
    }

    .search-container {
        padding: 3rem 2rem;
        min-height: 450px;
    }
    .search-title {
        font-size: 2.5rem;
    }
    .search-box-and-button {
        padding: 1rem;
        gap: 1rem;
    }
    .search-box-and-button input,
    .search-box-and-button button {
        padding: 1.5rem 2rem;
        font-size: 1.1rem;
    }

    .footer-middle-sections {
        flex-direction: column; /* Stack sections vertically */
        align-items: center;
    }
    .footer-section,
    .footer-about-dehno-box {
        width: 90%; /* Take more width on smaller screens */
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }
    header p {
        font-size: 1.2rem;
    }
    main {
        padding: 2rem;
    }
    .martyrs-grid {
        grid-template-columns: 1fr;
    }
    .martyr-card {
        flex-direction: column;
        min-height: auto;
    }
    .martyr-photo {
        width: 100%;
        height: 200px;
        border-radius: 15px 15px 0 0;
        border-left: none;
        border-bottom: 3px solid var(--accent-gold);
    }

    .profile-header {
        flex-direction: column;
        text-align: center;
        padding: 2rem;
    }
    .profile-photo {
        width: 150px;
        height: 180px;
    }
    .profile-info h2 {
        font-size: 2.2rem;
    }
    .profile-info h2::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .additional-info h3 {
        font-size: 1.6rem;
    }
    .additional-info h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .info-grid {
        grid-template-columns: 1fr;
    }

    .tabs {
        flex-direction: column;
        padding: 0.4rem;
    }
    .tab-button {
        flex: none;
        width: 100%;
        margin: 0.2rem 0;
        min-width: auto;
        justify-content: center;
    }
    .tab-pane h3 {
        font-size: 1.8rem;
    }
    .photo-gallery {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    .video-gallery {
        grid-template-columns: 1fr;
    }
    .share-buttons {
        flex-direction: column;
    }
    .nav-buttons {
        flex-direction: column;
    }
    .martyrs-navigation .nav-btn {
        min-width: auto;
        width: 100%;
    }
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    /* Admin Page Responsive */
    .admin-tabs {
        flex-direction: column;
    }
    .admin-tab {
        border-bottom: 1px solid var(--border-light);
    }
    .admin-tab:last-child {
        border-bottom: none;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
    .date-selector {
        flex-direction: column;
        gap: 0.5rem;
    }
    .date-selector select {
        width: 100%;
    }
    .upload-area {
        padding: 2.5rem 1.5rem;
    }
    .martyrs-table th,
    .martyrs-table td {
        padding: 1rem 0.5rem;
        font-size: 0.9rem;
    }

    .intro-stats {
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-info {
        grid-template-columns: 1fr;
    }

    .search-title {
        font-size: 2rem;
    }
    .search-box-and-button {
        flex-direction: column;
        gap: 0.8rem;
        padding: 1rem;
    }
    .search-box-and-button input,
    .search-box-and-button button {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .full-text-main {
        padding: 2rem;
    }
    .full-text-content {
        padding: 2rem;
        font-size: 1rem;
    }
    .text-content-scrollable {
        max-height: calc(100vh - 300px);
    }

    /* Media queries for admin header */
    .admin-header .container {
        flex-direction: column;
        text-align: center;
    }
    .admin-header .admin-header-content {
        flex-direction: column;
        margin: 1rem 0;
    }
    .admin-header .admin-header-content > div:first-child {
        margin-bottom: 1rem;
    }
    .admin-header .admin-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    .admin-header .header-image {
        margin: 10px 0;
        width: 80px; /* Smaller images on mobile */
        height: 80px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    main {
        padding: 1.5rem;
        border-radius: 15px;
    }
    header h1 {
        font-size: 2.2rem;
    }
    .intro {
        padding: 2rem;
    }
    .intro h2 {
        font-size: 2rem;
    }
    .additional-info,
    .biography-content {
        padding: 2rem;
    }
    .profile-header {
        padding: 1.5rem;
    }
    .profile-photo {
        width: 120px;
        height: 150px;
    }
    .tab-button {
        padding: 1rem;
        font-size: 1rem;
    }
    .file-list {
        grid-template-columns: 1fr;
    }
    .file-actions {
        flex-direction: column;
    }
    .action-btn,
    .delete-btn {
        width: 100%;
        margin: 0.2rem 0;
    }
    .submit-btn {
        width: 100%;
        margin: 0.5rem 0;
    }
    .form-container {
        padding: 2rem;
    }

    .footer-about-dehno-box {
        flex-direction: column-reverse; /* Stack logo above text on very small screens */
        align-items: center;
        text-align: center;
    }
    .footer-about-text-content {
        text-align: center;
    }
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes sparkle {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}
