/* Admin Dashboard Styles */
.admin-dashboard {
  background: #f7f7f7;
  min-height: 80vh;
  padding: 6rem 1rem 2rem 1rem;
}

.admin-container {
  max-width: 1200px;
  margin: 0 auto;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--primary-color);
}

.admin-header h1 {
  color: var(--primary-color);
  font-family: 'Georgia', serif;
  font-size: 2.5rem;
  margin: 0;
}

.admin-section {
  margin-bottom: 2rem;
}

.admin-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 16px rgba(var(--primary-rgb), 0.2);
  padding: 2rem;
  margin-bottom: 2rem;
}

.admin-card h2 {
  color: var(--primary-color);
  font-family: 'Georgia', serif;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.admin-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.admin-input {
  padding: 0.75rem;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  background: #fff;
  transition: border-color 0.2s;
}

.admin-input:focus {
  outline: none;
  border-color: var(--primary-color);
}

.checkbox-group {
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

.checkbox-group input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.admin-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  font-weight: 500;
}

.primary-btn {
  background: var(--primary-color);
  color: #FFFFF0;
}

.primary-btn:hover {
  background: #d63a00;
  transform: translateY(-1px);
}

.secondary-btn {
  background: #6c757d;
  color: #FFFFF0;
}

.secondary-btn:hover {
  background: #5a6268;
  transform: translateY(-1px);
}

.logout-btn {
  background: #dc3545;
  color: #FFFFF0;
}

.logout-btn:hover {
  background: #c82333;
  transform: translateY(-1px);
}

/* Tabs */
.admin-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0;
  border-bottom: 1px solid #eee;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.8rem 1.2rem;
  font-size: 0.95rem;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
  color: #666;
  font-family: 'Georgia', serif;
  font-weight: 500;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.tab-btn:hover {
  color: var(--primary-color);
}

.tab-btn.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.portfolio-item {
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s;
}

.portfolio-item:hover {
  transform: translateY(-2px);
}

.portfolio-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.portfolio-item-info {
  padding: 1rem;
}

.portfolio-item-title {
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.portfolio-item-description {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.portfolio-item-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.portfolio-item-actions button {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* Portfolio Pagination */
.portfolio-paging {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5em;
  margin: 1.5em 0 0.5em 0;
  width: 100%;
  grid-column: 1 / -1;
}

.portfolio-paging button {
  background: #fff;
  color: var(--primary-color);
  border: 1.5px solid #eee;
  border-radius: 6px;
  padding: 0.3em 0.9em;
  font-size: 0.95em;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Segoe UI', 'Liberation Sans', Arial, sans-serif;
  font-weight: 500;
}

.portfolio-paging button:hover {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
  transform: translateY(-1px);
}

.portfolio-paging button.active {
  background: var(--primary-color);
  color: #fff;
  border-color: var(--primary-color);
}

/* Blog List */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.blog-item {
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-left: 4px solid var(--primary-color);
}

.blog-item-text {
  color: #333;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.blog-item-meta {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.blog-item-actions {
  display: flex;
  gap: 0.5rem;
}

.blog-item-actions button {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* Modal */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: #fff;
  border-radius: 10px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #ddd;
}

.modal-header h3 {
  color: var(--primary-color);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--primary-color);
}

.modal-content .admin-form {
  padding: 1.5rem;
}

.modal-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  .admin-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  .admin-header h1 {
    font-size: 2rem;
  }
  .form-row {
    grid-template-columns: 1fr;
  }
  .admin-tabs {
    justify-content: space-around;
  }
  .tab-btn {
    padding: 0.8rem 0.5rem;
    font-size: 0.85rem;
    gap: 0.3rem;
  }
  .portfolio-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
  .modal-content {
    width: 95%;
    margin: 1rem;
  }
  .modal-actions {
    flex-direction: column;
  }
}

/* Collapsible Card */
.collapsible .collapsible-header {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.25rem;
  border-radius: 6px;
  transition: background-color 0.2s ease;
}
.collapsible .collapsible-header:hover {
  background-color: #f7f7f7;
}
.collapsible .collapsible-header .toggle-icon {
  transition: transform 0.3s ease;
  padding: 0.5rem;
  border-radius: 50%;
  line-height: 1;
}
.collapsible:not(.collapsed) .collapsible-header .toggle-icon {
  transform: rotate(180deg);
}
.collapsible .collapsible-content {
  max-height: 2000px; /* Large enough for content */
  overflow: hidden;
  transition: max-height 0.5s ease, padding 0.5s ease;
  padding-top: 1.5rem;
  margin-top: 1.5rem;
  border-top: 1px solid #eee;
}
.collapsible.collapsed .collapsible-content {
  max-height: 0;
  padding-top: 0;
  margin-top: 0;
  border-top: none;
  overflow: hidden;
} 