:root {
    --bg-color: #ffffff;
    --text-color: #000000;
    --border-color: #e5e5e5;
    --muted-text: #666666;
    --admin-bg: #f9f9f9;
    --link-hover: #e79cb1; 
    --shadow-sm: 0 4px 15px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 30px rgba(0,0,0,0.12);
    --gold-color: #d4af37;
}

body {
    font-family: "Vazirmatn", Tahoma, sans-serif;
    background-color: var(--bg-color); color: var(--text-color);
    margin: 0; padding: 0; padding-top: 150px; 
    display: flex; flex-direction: column; min-height: 100vh; scroll-behavior: smooth;
}

a { text-decoration: none; color: inherit; transition: color 0.3s ease; cursor: pointer; }
a:hover { color: var(--link-hover); }

.container { max-width: 100%; width: 85%; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }

header {
    position: fixed; top: 0; left: 0; width: 100%;
    background-color: rgba(255, 255, 255, 0.98); backdrop-filter: blur(8px); z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}
header .container { width: 100%; max-width: 100%; padding: 0 40px; position: relative; } 

.header-wrapper { display: flex; flex-direction: column; padding: 10px 0 10px 0; gap: 10px; align-items: center; }

.header-top { width: 100%; display: flex; justify-content: center; align-items: center; position: relative; }
.header-bottom { width: 100%; display: flex; justify-content: center; align-items: center; position: relative; min-height: 40px; }

.desktop-only { display: flex; }
.mobile-only { display: none !important; }

.logo-link { margin: 0; }
.site-title { font-size: 32px; font-weight: bold; letter-spacing: 2px; margin: 0; text-transform: uppercase; color: #000; text-align: center; }

/* استایل منوی دسکتاپ به صورت افقی */
.nav-links { display: flex; flex-direction: row; flex-wrap: wrap; gap: 35px; justify-content: center; align-items: center; font-size: 20px; font-weight: normal; width: 100%; }
.nav-links a { padding: 3px 0; position: relative; transition: color 0.3s; color: #000000; }
.nav-links a:hover { color: #000000; }
.nav-links a::after { content: ''; position: absolute; width: 0; height: 2px; bottom: -2px; right: 0; background-color: var(--gold-color); transition: width 0.3s ease; }
.active-nav { color: #000000 !important; font-weight: bold; }
.active-nav::after { width: 100% !important; background-color: var(--gold-color) !important; }

#searchContainer { display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.98); z-index: 100; }
.search-input-expanded { width: 60%; max-width: 600px; padding: 10px 20px; font-size: 15px; font-weight: normal; font-family: inherit; border: none; border-bottom: 2px solid #000; outline: none; background: transparent; text-align: center; border-radius: 0; }
.search-input-expanded::placeholder { color: #aaa; font-weight: normal; }
.search-close, .search-trigger { cursor: pointer; display: flex; align-items: center; transition: transform 0.2s; color: #333; }
.search-close:hover, .search-trigger:hover { transform: scale(1.1); color: #000; }

.btn { background-color: var(--text-color); color: var(--bg-color); border: 1px solid var(--text-color); padding: 10px 20px; border-radius: 0; font-size: 13px; cursor: pointer; text-transform: uppercase; transition: all 0.3s ease; font-family: inherit; font-weight: bold; }
.btn:hover { background-color: #333; transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-secondary { background-color: transparent; color: var(--text-color); border: 1px solid var(--border-color); }
.btn-secondary:hover { border-color: var(--text-color); background-color: #f9f9f9; }

main { flex: 1; padding-top: 10px; }

.features-section { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 50px; text-align: center; }
.feature-box { background: #fdfdfd; border: 1px solid var(--border-color); padding: 30px 15px; transition: transform 0.3s ease, box-shadow 0.3s ease; border-radius: 0; }
.feature-box:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.feature-icon { margin-bottom: 15px; color: #000; display: flex; justify-content: center; align-items: center; }
.feature-icon svg { width: 36px; height: 36px; stroke-width: 1.5; }
.feature-title { font-size: 16px; font-weight: bold; margin-bottom: 10px; color: #000; }
.feature-text { font-size: 13px; color: var(--muted-text); line-height: 1.8; }

.hero-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px; height: 500px; display: none; }
.hero-tile-left { position: relative; border-radius: 0; overflow: hidden; box-shadow: var(--shadow-sm); background: #000; display: flex; align-items: center; justify-content: center; }
.hero-tile-left video, .hero-tile-left img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; }
.hero-tile-right-col { display: flex; flex-direction: column; gap: 20px; height: 100%; }
.hero-tile-right-item { flex: 1; position: relative; border-radius: 0; overflow: hidden; box-shadow: var(--shadow-sm); background: #f5f5f5; }
.hero-tile-right-item img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; }
.admin-controls-overlay { position: absolute; top: 10px; right: 10px; z-index: 10; display: flex; gap: 5px; background: rgba(255, 255, 255, 0.9); padding: 5px; border-radius: 0; }

.admin-panel { display: none; background-color: var(--admin-bg); border: 1px solid var(--border-color); border-radius: 0; padding: 30px; margin-bottom: 40px; box-shadow: inset 0 0 10px rgba(0,0,0,0.02); }
.admin-panel.active { display: block; } 
.admin-section { border-bottom: 1px solid var(--border-color); padding-bottom: 20px; margin-bottom: 20px; }
.grid-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin-bottom: 15px; }
.form-group { display: flex; flex-direction: column; }
.form-group label { font-size: 13px; margin-bottom: 5px; color: var(--muted-text); font-weight: bold; }
.form-group input, .form-group textarea, .form-group select { padding: 10px; border: 1px solid var(--border-color); border-radius: 0; background-color: #fff; font-family: inherit; box-sizing: border-box; transition: border 0.3s ease; }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--text-color); outline: none; }
.checkbox-group { flex-direction: row; align-items: center; gap: 10px; }

.thumb-preview-container { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.thumb-preview-item { position: relative; width: 60px; height: 60px; border-radius: 0; overflow: hidden; border: 1px solid #ddd; }
.thumb-preview-item img { width: 100%; height: 100%; object-fit: cover; }
.thumb-preview-item button { position: absolute; top: 2px; right: 2px; background: rgba(255,0,0,0.8); color: white; border: none; border-radius: 0; width: 20px; height: 20px; font-size: 10px; cursor: pointer; display: flex; align-items: center; justify-content: center; }

.artist-list-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
.artist-list-table th, .artist-list-table td { border: 1px solid #ddd; padding: 8px; text-align: right; }
.artist-list-table img { width: 40px; height: 40px; border-radius: 0; object-fit: cover; }

.gallery { column-count: 4; column-gap: 25px; margin-bottom: 60px; }
.card { break-inside: avoid; margin-bottom: 25px; background-color: transparent; border-radius: 0; overflow: hidden; transition: transform 0.3s ease; position: relative; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-5px); }
.card.inactive-card { opacity: 0.5; } 

.image-container { width: 100%; background-color: transparent !important; overflow: hidden; position: relative; border-radius: 0; transition: box-shadow 0.3s; }
.card:hover .image-container { box-shadow: var(--shadow-lg); }
.image-container img.main-img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform 0.5s ease; border-radius: 0; }
.card:hover img.main-img { transform: scale(1.03); }

.action-circle { position: absolute; width: 38px; height: 38px; background: rgba(255, 255, 255, 0.9); border-radius: 0; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 20; transition: all 0.3s ease; box-shadow: 0 4px 10px rgba(0,0,0,0.1); color: #555; }
.action-circle:hover { background: #fff; transform: scale(1.1); }

.fav-overlay { top: 15px; right: 15px; width: auto; padding: 0 10px; border-radius: 0; font-weight: bold; font-size: 14px; gap: 5px; }
.fav-overlay:hover, .fav-active { color: #ff3b30; background: #fff; }
.fav-overlay svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; transition: fill 0.3s; }
.fav-active svg { fill: currentColor; }

.compare-overlay { top: 15px; left: 15px; border-radius: 0;}
.compare-overlay:hover, .compare-active { color: #007aff; background: #fff; }

.card-info { padding: 12px 5px; flex: 1; display: flex; flex-direction: column; }
.artist-link { font-size: 14px; font-weight: bold; color: #000000; margin-bottom: 4px; cursor: pointer; transition: color 0.3s; }
.card-info h3 { font-size: 18px; font-weight: bold; line-height: 1.4; margin: 0; color: #000000; transition: color 0.3s; }

.card-desc { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14px; color: #666; margin-top: 6px; line-height: 1.6; text-align: justify; text-justify: inter-word; }

.admin-action-btns { display: flex; gap: 8px; margin-top: 10px; }
.delete-btn, .edit-btn { border: none; border-radius: 0; padding: 6px 10px; cursor: pointer; font-size: 11px; font-family: inherit; flex: 1; transition: background 0.3s; color: white; }
.delete-btn { background-color: #ff3b30; } .delete-btn:hover { background-color: #d32f2f; }
.edit-btn { background-color: #007aff; } .edit-btn:hover { background-color: #005bb5; }

#emptyState { text-align: center; padding: 50px 20px; color: var(--muted-text); display: none; grid-column: 1 / -1; width: 100%; }

.compare-bar { position: fixed; bottom: -100px; left: 0; width: 100%; background: #fff; box-shadow: 0 -5px 20px rgba(0,0,0,0.1); padding: 15px 20px; display: flex; justify-content: center; align-items: center; gap: 20px; z-index: 1000; transition: bottom 0.3s ease; box-sizing: border-box; }
.compare-bar.active { bottom: 0; }
.compare-items { display: flex; gap: 15px; }
.compare-item-thumb { width: 50px; height: 50px; border-radius: 0; object-fit: cover; border: 2px solid #ddd; position: relative; cursor: pointer; }
.compare-btn-action { background: #000; color: #fff; padding: 10px 30px; border-radius: 0; font-weight: bold; cursor: pointer; font-family: inherit; border:none; }
.compare-btn-clear { background: #ff3b30; color: #fff; padding: 10px 15px; border-radius: 0; cursor: pointer; border:none; }

.compare-modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); z-index: 2000; justify-content: center; align-items: center; }
.compare-content { background: #fff; width: 90%; max-width: 900px; max-height: 90vh; overflow-y: auto; border-radius: 0; padding: 30px; position: relative; }
.compare-table { width: 100%; border-collapse: collapse; margin-top: 20px; text-align: center; }
.compare-table th, .compare-table td { border: 1px solid #ddd; padding: 15px; }
.compare-table img { width: 120px; height: 120px; object-fit: cover; border-radius: 0; }
.compare-table th { background: #f9f9f9; width: 120px; text-align: right; font-weight: bold; }

footer { background-color: #000; color: #fff; padding: 25px 0; margin-top: 60px; text-align: center; font-size: 14px; border-top: 3px solid var(--gold-color); }
.footer-line-1 { display: flex; justify-content: center; gap: 35px; margin-bottom: 25px; font-weight: bold; flex-wrap: wrap; }
.footer-line-1 a { color: #fff; transition: color 0.3s; }
.footer-line-1 a:hover { color: var(--gold-color) !important; }

.footer-line-2 { display: flex; justify-content: center; align-items: center; gap: 40px; flex-wrap: wrap; }
.footer-socials { display: flex; gap: 20px; align-items: center; }
.footer-socials a { color: #fff; transition: transform 0.3s, color 0.3s; display: flex; }
.footer-socials a:hover { color: var(--gold-color) !important; transform: translateY(-3px); }

.footer-copyright { color: #aaa; font-size: 13px; }

@media (min-width: 769px) { .mobile-menu { display: none !important; } }

@media (max-width: 1200px) { .gallery { column-count: 3; } }
@media (max-width: 992px) { .features-section { grid-template-columns: repeat(2, 1fr); } }

@media (max-width: 768px) {
    .container { width: 100%; padding: 0 15px; }
    header .container { padding: 0 15px; }
    body { padding-top: 100px; } 
    .desktop-only { display: none !important; }
    .mobile-only { display: flex !important; }
    .site-title { font-size: 26px; }
    
    .mobile-menu {
        display: none; position: absolute; top: 100%; left: 0; width: 100%; 
        background: rgba(255, 255, 255, 0.98); border-bottom: 1px solid #eee; 
        padding: 10px 0 20px 0; z-index: 99; box-shadow: 0 10px 15px rgba(0,0,0,0.05);
    }
    .mobile-nav-links { display: flex; flex-direction: column !important; gap: 15px; align-items: center; width: 100%; }
    .mobile-nav-links a { width: 100%; padding: 10px 0 !important; font-size: 18px; border-bottom: 1px solid #f5f5f5; color: #000; font-weight: normal; text-align: center;}
    
    .hero-tiles { display: grid !important; grid-template-columns: 1fr !important; height: auto !important; gap: 15px; margin-bottom: 30px; }
    .hero-tile-left { height: 280px; }
    .hero-tile-right-col { flex-direction: row !important; height: 130px; gap: 15px; }

    .search-input-expanded { width: 80%; font-size: 14px; }
    .compare-bar { flex-direction: column; gap: 10px; padding: 10px; }
}

@media (max-width: 480px) { 
    .gallery { column-count: 2; column-gap: 10px; } 
    
    .features-section { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 30px; }
    .feature-box { padding: 15px 10px; }
    .feature-icon svg { width: 28px; height: 28px; }
    .feature-title { font-size: 12px; margin-bottom: 5px; }
    .feature-text { font-size: 10px; }
    
    .card-info h3 { font-size: 13px; }
    .card-desc { font-size: 11px; margin-top: 4px; }
    .artist-link { font-size: 11px; }
}