/* ============ CSS Variables ============ */
:root {
  --primary-color: #6b4c9a;
  --primary-light: #8b6bb9;
  --secondary-color: #f8b500;
  --background: #faf9f7;
  --card-bg: #ffffff;
  --text-color: #333333;
  --text-light: #666666;
  --border-color: #e0e0e0;
  --success-color: #4caf50;
  --error-color: #f44336;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --radius: 12px;
}

/* ============ Reset & Base ============ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--background);
  color: var(--text-color);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--primary-color);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
}

/* ============ Layout ============ */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ============ Header ============ */
header {
  background: var(--card-bg);
  box-shadow: var(--shadow);
  padding: 20px 0;
  margin-bottom: 30px;
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  font-size: 2.5rem;
}

.logo h1 {
  font-size: 1.8rem;
  color: var(--primary-color);
  margin: 0;
}

.logo h1 a {
  color: inherit;
  text-decoration: none;
}

nav ul {
  display: flex;
  list-style: none;
  gap: 20px;
}

nav a {
  padding: 8px 16px;
  border-radius: 20px;
  transition: all 0.3s ease;
  color: var(--text-color);
}

nav a:hover,
nav a.active {
  background: var(--primary-color);
  color: white;
  text-decoration: none;
}

nav a.lang-switch {
  background: var(--secondary-color);
  color: var(--text-color);
  font-size: 0.85rem;
}

nav a.lang-switch:hover {
  background: #e0a400;
}

/* ============ Hero Section ============ */
.hero {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  color: white;
  padding: 60px 20px;
  text-align: center;
  border-radius: var(--radius);
  margin-bottom: 40px;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
}

/* ============ Cards ============ */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 25px;
  margin-bottom: 25px;
}

.card h2,
.card h3 {
  color: var(--primary-color);
  margin-bottom: 15px;
}

/* ============ Cat Info Section ============ */
.cat-info {
  display: grid;
  gap: 20px;
}

.info-item {
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 15px;
}

.info-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.info-item h4 {
  color: var(--primary-color);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 5px;
}

.info-item p {
  color: var(--text-light);
}

/* ============ Photo Gallery ============ */
.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.photo-placeholder {
  aspect-ratio: 1;
  background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 3rem;
}

/* ============ Comments Section ============ */
.comments-section {
  margin-top: 40px;
}

.comment {
  border-bottom: 1px solid var(--border-color);
  padding: 20px 0;
}

.comment:last-child {
  border-bottom: none;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.comment-author {
  font-weight: 600;
  color: var(--primary-color);
}

.comment-date {
  font-size: 0.85rem;
  color: var(--text-light);
}

.comment-content {
  color: var(--text-color);
  margin-bottom: 10px;
}

.comment-photo {
  max-width: 300px;
  border-radius: var(--radius);
  margin-top: 10px;
}

.no-comments {
  text-align: center;
  color: var(--text-light);
  padding: 40px 20px;
}

/* ============ Forms ============ */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid var(--border-color);
  border-radius: var(--radius);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

.form-group small {
  display: block;
  margin-top: 5px;
  color: var(--text-light);
  font-size: 0.85rem;
}

/* ============ Buttons ============ */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-light);
  text-decoration: none;
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-success:hover {
  background: #43a047;
}

.btn-danger {
  background: var(--error-color);
  color: white;
}

.btn-danger:hover {
  background: #d32f2f;
}

.btn-small {
  padding: 8px 16px;
  font-size: 0.9rem;
}

/* ============ Alerts ============ */
.alert {
  padding: 15px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.alert-success {
  background: #e8f5e9;
  color: #2e7d32;
  border: 1px solid #a5d6a7;
}

.alert-error {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ef9a9a;
}

/* ============ Footer ============ */
footer {
  text-align: center;
  padding: 30px 20px;
  margin-top: 40px;
  color: var(--text-light);
  font-size: 0.9rem;
}

footer .paw {
  font-size: 1.5rem;
  margin-bottom: 10px;
}

/* ============ Admin Styles ============ */
.admin-header {
  background: linear-gradient(135deg, #333, #555);
  color: white;
  padding: 15px 0;
  margin-bottom: 30px;
}

.admin-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.admin-header h1 {
  font-size: 1.5rem;
}

.admin-nav a {
  color: white;
  margin-left: 20px;
}

.admin-section {
  margin-bottom: 40px;
}

.admin-section h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--border-color);
}

.pending-comment,
.approved-comment {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 15px;
  box-shadow: var(--shadow);
}

.pending-comment {
  border-left: 4px solid var(--secondary-color);
}

.approved-comment {
  border-left: 4px solid var(--success-color);
}

.comment-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
}

.comment-actions form {
  display: inline;
}

/* Login page */
.login-container {
  max-width: 400px;
  margin: 80px auto;
  padding: 40px;
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.login-container h1 {
  text-align: center;
  color: var(--primary-color);
  margin-bottom: 30px;
}

.login-container .cat-icon {
  text-align: center;
  font-size: 4rem;
  margin-bottom: 20px;
}

/* Collapsible sections */
.collapsible-header {
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.collapsible-header:hover {
  opacity: 0.8;
}

.collapsible-content {
  margin-top: 20px;
}

/* ============ Responsive ============ */
@media (max-width: 600px) {
  header .container {
    flex-direction: column;
    text-align: center;
  }

  nav ul {
    justify-content: center;
  }

  .hero h2 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .comment-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }

  .comment-actions {
    flex-direction: column;
  }

  .admin-header .container {
    flex-direction: column;
    gap: 10px;
  }
}
