:root {
  --primary: #1a5f4a;
  --primary-light: #2d8a6e;
  --primary-dark: #0f3d2f;
  --accent: #c9a227;
  --accent-light: #e6c04a;
  --bg-main: #f8f6f1;
  --bg-card: #ffffff;
  --bg-section: #ebe8e0;
  --text-primary: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #7a7a7a;
  --border: #d4d0c8;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.dark {
  --primary: #3eb489;
  --primary-light: #5fcfa6;
  --primary-dark: #2d8a6e;
  --accent: #e6c04a;
  --accent-light: #f0d06a;
  --bg-main: #0f1419;
  --bg-card: #1a2129;
  --bg-section: #151c23;
  --text-primary: #e8e6e1;
  --text-secondary: #b8b6b1;
  --text-muted: #888683;
  --border: #2d3640;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.4);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Vazirmatn", sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.8;
  min-height: 100vh;
  transition: all 0.3s ease;
}

/* Header */
.header {
  background: linear-gradient(
    135deg,
    var(--primary-dark) 0%,
    var(--primary) 50%,
    var(--primary-light) 100%
  );
  padding: 0;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}

.header-content {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
  text-align: center;
}

.logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.logo-icon {
  width: 90px;
  height: 90px;
  background: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(201, 162, 39, 0.4);
  animation: float 3s ease-in-out infinite;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  transition: all 0.3s ease;
}

.logo-icon:hover {
  transform: scale(1.05);
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-icon .edit-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
}

.edit-mode .logo-icon .edit-overlay {
  display: flex;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

.logo-icon i.default-icon {
  font-size: 2.8rem;
  color: var(--primary-dark);
}

.header-text {
  position: relative;
}

.header-edit-btn {
  position: absolute;
  top: -10px;
  left: -40px;
  width: 32px;
  height: 32px;
  background: var(--accent);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--primary-dark);
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

.edit-mode .header-edit-btn {
  display: flex;
}

.header-edit-btn:hover {
  transform: scale(1.1);
  background: var(--accent-light);
}

.site-title {
  font-size: 2.8rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
  letter-spacing: -1px;
}

.site-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 300;
  margin-top: 0.5rem;
}

/* Navigation */
.nav {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow);
}

.nav-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  padding: 1rem 0;
}

.nav-link {
  padding: 0.6rem 1.2rem;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.nav-link:hover,
.nav-link.active {
  background: var(--primary);
  color: #fff;
}

.admin-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.admin-btn {
  background: var(--accent);
  color: var(--primary-dark);
  padding: 0.6rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.admin-btn:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
}

.admin-btn.active {
  background: #e74c3c;
  color: #fff;
}

.change-password-btn {
  background: var(--primary);
  color: #fff;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  display: none;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.edit-mode .change-password-btn {
  display: flex;
}

.change-password-btn:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

/* Hero Slider */
.hero-slider {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  background: var(--bg-section);
}

.slider-container {
  display: flex;
  height: 100%;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}

.slider-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-slide .slide-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: #fff;
}

.slide-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.slide-desc {
  font-size: 1rem;
  opacity: 0.9;
}

.slider-empty {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(
    135deg,
    var(--primary-dark) 0%,
    var(--primary) 100%
  );
  color: #fff;
}

.slider-empty i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.slider-empty p {
  font-size: 1.2rem;
  opacity: 0.7;
}

.slider-controls {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.slider-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

.slider-dot.active {
  background: var(--accent);
  transform: scale(1.2);
}

.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(5px);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.slider-arrow:hover {
  background: var(--accent);
  color: var(--primary-dark);
}

.slider-arrow.prev {
  right: 20px;
}

.slider-arrow.next {
  left: 20px;
}

.slider-edit-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  background: var(--accent);
  color: var(--primary-dark);
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  display: none;
  align-items: center;
  gap: 0.5rem;
  z-index: 20;
  transition: all 0.3s ease;
}

.edit-mode .slider-edit-btn {
  display: flex;
}

.slider-edit-btn:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
}

/* Remove slide button */
.slide-remove-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  background: rgba(231, 76, 60, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  z-index: 15;
}

.edit-mode .slide-remove-btn {
  display: flex;
}

/* Main Content */
.main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Page Title */
.page-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 3px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.page-title i {
  color: var(--accent);
}

/* Section Styles */
.section {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  position: relative;
  transition: all 0.3s ease;
  animation: slideUp 0.5s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section:hover {
  box-shadow: var(--shadow-hover);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--bg-section);
}

.section-title {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title i {
  font-size: 1.3rem;
  color: var(--accent);
}

.section-actions {
  display: flex;
  gap: 0.5rem;
}

.section-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 0.9rem;
}

.section-btn.edit {
  background: var(--primary);
  color: #fff;
}

.section-btn.delete {
  background: #e74c3c;
  color: #fff;
}

.section-btn:hover {
  transform: scale(1.1);
}

/* Section Content with Image Layout - تصویر در کنار متن */
.section-content-wrapper {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.section-text {
  flex: 1;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 2;
}

.section-text p {
  margin-bottom: 1rem;
}

.section-image {
  flex: 0 0 300px;
  max-width: 300px;
}

.section-image img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  box-shadow: var(--shadow);
  object-fit: cover;
}

.section-image .remove-img {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  background: rgba(231, 76, 60, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.edit-mode .section-image .remove-img {
  display: flex;
}

.section-content {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 2;
}

.section-content p {
  margin-bottom: 1rem;
}

.section-content img {
  max-width: 100%;
  border-radius: 12px;
  margin: 1rem 0;
  box-shadow: var(--shadow);
}

/* Image Gallery - for multiple images */
.image-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  background: var(--bg-section);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0;
}

.gallery-item .remove-img {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  background: rgba(231, 76, 60, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
}

.edit-mode .gallery-item .remove-img {
  display: flex;
}

/* Single Image Layout - تصویر تنها در کنار متن */
.section-with-image {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

.section-with-image .text-content {
  flex: 1;
}

.section-with-image .image-content {
  flex: 0 0 320px;
  position: relative;
}

.section-with-image .image-content img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.section-with-image .image-content .remove-img {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  background: rgba(231, 76, 60, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  z-index: 5;
}

.edit-mode .section-with-image .image-content .remove-img {
  display: flex;
}

/* Add Section Button */
.add-section-btn {
  width: 100%;
  padding: 2rem;
  background: var(--bg-section);
  border: 2px dashed var(--border);
  border-radius: 16px;
  cursor: pointer;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  transition: all 0.3s ease;
}

.add-section-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--bg-card);
}

/* Home Page Sections Preview */
.home-section-preview {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  cursor: pointer;
}

.home-section-preview:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-3px);
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.preview-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.3rem;
}

.preview-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}

.preview-content {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 1rem;
}

.preview-images {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.preview-images img {
  width: 120px;
  height: 80px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}

.preview-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-weight: 600;
  margin-top: 1rem;
}

.preview-link i {
  transition: transform 0.3s ease;
}

.home-section-preview:hover .preview-link i {
  transform: translateX(-5px);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-card);
  border-radius: 20px;
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}

.modal-close {
  width: 40px;
  height: 40px;
  background: var(--bg-section);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: #e74c3c;
  color: #fff;
}

.modal-body {
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-input {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  background: var(--bg-main);
  color: var(--text-primary);
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 95, 74, 0.1);
}

textarea.form-input {
  min-height: 200px;
  resize: vertical;
  line-height: 1.8;
}

.form-hint {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
}

.form-error {
  font-size: 0.85rem;
  color: #e74c3c;
  margin-top: 0.5rem;
  display: none;
}

.form-error.show {
  display: block;
}

.form-success {
  font-size: 0.85rem;
  color: #27ae60;
  margin-top: 0.5rem;
  display: none;
}

.form-success.show {
  display: block;
}

.icon-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.icon-option {
  width: 44px;
  height: 44px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: var(--bg-main);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.icon-option:hover,
.icon-option.selected {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.image-input-group {
  display: flex;
  gap: 0.5rem;
}

.image-input-group .form-input {
  flex: 1;
}

.add-image-btn {
  padding: 0 1.5rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  transition: all 0.3s ease;
}

.add-image-btn:hover {
  background: var(--primary-light);
}

.image-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.image-preview-item {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-section);
}

.image-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview-item button {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 22px;
  height: 22px;
  background: rgba(231, 76, 60, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.7rem;
}

.modal-footer {
  padding: 1.5rem 2rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

.btn {
  padding: 0.8rem 2rem;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background: var(--primary-light);
}

.btn-secondary {
  background: var(--bg-section);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  background: var(--border);
}

/* Slider Image List in Modal */
.slider-image-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.slider-image-item {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: 10px;
  overflow: hidden;
  background: var(--bg-section);
  border: 2px solid var(--border);
}

.slider-image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.slider-image-item button {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 28px;
  height: 28px;
  background: rgba(231, 76, 60, 0.9);
  color: #fff;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 0.8rem;
}

.slider-image-item .slide-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: #fff;
  font-size: 0.75rem;
}

/* Confirm Dialog */
.confirm-dialog {
  text-align: center;
  padding: 1rem;
}

.confirm-dialog i {
  font-size: 4rem;
  color: #e74c3c;
  margin-bottom: 1rem;
}

.confirm-dialog.login-dialog i {
  color: var(--primary);
}

.confirm-dialog p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.btn-danger {
  background: #e74c3c;
  color: #fff;
}

.btn-danger:hover {
  background: #c0392b;
}

/* Footer */
.footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.8);
  padding: 3rem 1.5rem;
  margin-top: 3rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  font-size: 1.8rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
}

.footer-text {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.social-link {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  background: var(--accent);
  color: var(--primary-dark);
  transform: translateY(-3px);
}

.copyright {
  font-size: 0.9rem;
  opacity: 0.7;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
  color: var(--border);
}

.empty-state h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-secondary);
}

/* Logo Preview */
.logo-preview {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin: 1rem auto;
  background: var(--bg-section);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--primary);
}

.logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-preview i {
  font-size: 3rem;
  color: var(--text-muted);
}

/* Login Modal Styles */
.login-form {
  margin-top: 1rem;
}

.login-form .form-group {
  margin-bottom: 1rem;
  text-align: right;
}

.login-form .form-input {
  text-align: right;
}

.password-input-wrapper {
  position: relative;
}

.password-toggle {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: 0.5rem;
  font-size: 1rem;
}

.password-toggle:hover {
  color: var(--primary);
}

.login-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(
    135deg,
    var(--primary) 0%,
    var(--primary-light) 100%
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 4px 15px rgba(26, 95, 74, 0.3);
}

.login-icon i {
  font-size: 2rem;
  color: #fff;
}

/* Loading indicator */
.loading-indicator {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-indicator.hidden {
  display: none;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid var(--bg-card);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .site-title {
    font-size: 2rem;
  }

  .logo-icon {
    width: 70px;
    height: 70px;
  }

  .logo-icon i.default-icon {
    font-size: 2rem;
  }

  .nav-content {
    flex-direction: column;
    gap: 1rem;
  }

  .nav-links {
    justify-content: center;
  }

  .admin-buttons {
    flex-wrap: wrap;
    justify-content: center;
  }

  .section {
    padding: 1.5rem;
  }

  .section-title {
    font-size: 1.3rem;
  }

  .modal-body {
    padding: 1.5rem;
  }

  .image-gallery {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .page-title {
    font-size: 1.5rem;
  }

  .header-edit-btn {
    left: auto;
    right: -40px;
  }

  .hero-slider {
    height: 250px;
  }

  .slider-arrow {
    width: 40px;
    height: 40px;
  }

  .slide-title {
    font-size: 1.2rem;
  }

  /* تصویر در موبایل زیر متن بیاید */
  .section-with-image {
    flex-direction: column;
  }

  .section-with-image .image-content {
    flex: none;
    max-width: 100%;
    width: 100%;
  }

  .section-with-image .image-content img {
    max-height: 300px;
    width: 100%;
  }
}

/* Hide admin elements by default */
.section-actions,
.add-section-btn {
  display: none;
}

.edit-mode .section-actions,
.edit-mode .add-section-btn {
  display: flex;
}

.error-popup {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.error-popup.show {
  display: flex;
}

.error-box {
  background: #c0392b;
  color: #fff;
  padding: 18px 28px;
  border-radius: 10px;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  animation: shake 0.3s ease;
}

.error-box i {
  font-size: 22px;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }

  25% {
    transform: translateX(-5px);
  }

  50% {
    transform: translateX(5px);
  }

  75% {
    transform: translateX(-5px);
  }

  100% {
    transform: translateX(0);
  }
}
