/* 
   Familia, Amigos Y Comida - Cookbook Website
   Author: John Simpson
   CSS for warm, homey feel
*/

:root {
  --primary-color: #8B4513; /* SaddleBrown - warm brown */
  --secondary-color: #CD853F; /* Peru - lighter brown */
  --accent-color: #FF6347; /* Tomato - warm reddish accent */
  --background-color: #FFF8DC; /* Cornsilk - warm off-white */
  --text-color: #3E2723; /* Dark brown for text */
  --header-font: 'Playfair Display', Georgia, serif;
  --body-font: 'Source Sans Pro', 'Segoe UI', Tahoma, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--body-font);
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
header {
  background-color: var(--primary-color);
  color: white;
  padding: 20px 0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.site-title {
  font-family: var(--header-font);
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.site-title-en {
  font-family: var(--header-font);
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 10px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.site-subtitle {
  font-family: var(--header-font);
  font-size: 1.2rem;
  text-align: center;
  font-style: italic;
  margin-bottom: 20px;
}

/* Navigation */
nav.main-nav {
  background-color: var(--secondary-color);
  padding: 10px 0;
}

.nav-container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.nav-list {
  display: flex;
  list-style: none;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-list li {
  margin: 0 15px;
}

.nav-list a {
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
  padding: 5px 10px;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.nav-list a:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

/* Main Content */
main {
  padding: 40px 0;
}

.page-title {
  font-family: var(--header-font);
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 30px;
  text-align: center;
  position: relative;
}

.page-title::after {
  content: "";
  display: block;
  width: 80px;
  height: 3px;
  background-color: var(--accent-color);
  margin: 10px auto;
}

/* Recipe Cards */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.recipe-card {
  background-color: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recipe-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.recipe-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.recipe-content {
  padding: 20px;
}

.recipe-title {
  font-family: var(--header-font);
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.recipe-description {
  margin-bottom: 15px;
  color: #666;
}

.recipe-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  color: #777;
}

.recipe-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.recipe-tag {
  background-color: var(--secondary-color);
  color: white;
  padding: 3px 10px;
  border-radius: 15px;
  font-size: 0.8rem;
}

.recipe-link {
  display: inline-block;
  margin-top: 15px;
  color: var(--accent-color);
  text-decoration: none;
  font-weight: 600;
}

.recipe-link:hover {
  text-decoration: underline;
}

/* Forms */
.form-container {
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  margin: 0 auto;
}

.form-title {
  font-family: var(--header-font);
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-align: center;
}

.form-group {
  margin-bottom: 20px;
}

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

.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-family: var(--body-font);
  font-size: 1rem;
}

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

.form-button {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.form-button:hover {
  background-color: #E55336;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: white;
  padding: 30px 0;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-nav {
  margin-bottom: 20px;
}

.footer-nav ul {
  display: flex;
  list-style: none;
  justify-content: center;
  flex-wrap: wrap;
}

.footer-nav li {
  margin: 0 15px;
}

.footer-nav a {
  color: white;
  text-decoration: none;
}

.footer-nav a:hover {
  text-decoration: underline;
}

.copyright {
  font-size: 0.9rem;
  margin-top: 20px;
}

/* Newsletter Form */
.newsletter-form {
  display: flex;
  max-width: 400px;
  margin: 20px auto;
}

.newsletter-input {
  flex-grow: 1;
  padding: 10px;
  border: none;
  border-radius: 5px 0 0 5px;
}

.newsletter-button {
  background-color: var(--accent-color);
  color: white;
  border: none;
  padding: 10px 15px;
  border-radius: 0 5px 5px 0;
  cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-list {
    flex-direction: column;
    align-items: center;
  }
  
  .nav-list li {
    margin: 5px 0;
  }
  
  .recipe-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  }
}

/* Admin Styles */
.admin-panel {
  background-color: white;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

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

.admin-title {
  font-family: var(--header-font);
  color: var(--primary-color);
  font-size: 1.8rem;
}

.admin-actions {
  display: flex;
  gap: 10px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.admin-table th,
.admin-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.admin-table th {
  background-color: var(--secondary-color);
  color: white;
}

.admin-table tr:hover {
  background-color: #f5f5f5;
}

.action-buttons {
  display: flex;
  gap: 10px;
}

.btn-edit,
.btn-delete,
.btn-approve {
  padding: 5px 10px;
  border-radius: 5px;
  color: white;
  text-decoration: none;
  font-size: 0.9rem;
}

.btn-edit {
  background-color: #4CAF50;
}

.btn-delete {
  background-color: #F44336;
}

.btn-approve {
  background-color: #2196F3;
}

/* Authentication Pages */
.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 70vh;
}

.auth-form {
  background-color: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  width: 100%;
  max-width: 400px;
}

.auth-title {
  font-family: var(--header-font);
  font-size: 1.8rem;
  color: var(--primary-color);
  margin-bottom: 20px;
  text-align: center;
}

.auth-link {
  display: block;
  text-align: center;
  margin-top: 20px;
  color: var(--primary-color);
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

/* Recipe Detail Page */
.recipe-detail {
  background-color: white;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.recipe-detail-header {
  margin-bottom: 30px;
}

.recipe-detail-title {
  font-family: var(--header-font);
  font-size: 2.2rem;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.recipe-detail-meta {
  display: flex;
  justify-content: space-between;
  color: #777;
  margin-bottom: 20px;
}

.recipe-detail-image {
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 30px;
}

.recipe-detail-intro {
  font-style: italic;
  margin-bottom: 30px;
  padding: 15px;
  background-color: #f9f5eb;
  border-left: 4px solid var(--secondary-color);
}

.recipe-section-title {
  font-family: var(--header-font);
  font-size: 1.5rem;
  color: var(--primary-color);
  margin: 30px 0 15px;
}

.ingredients-list {
  list-style-type: none;
}

.ingredients-list li {
  padding: 8px 0;
  border-bottom: 1px dashed #ddd;
}

.instructions-list {
  list-style-position: inside;
  padding-left: 20px;
}

.instructions-list li {
  margin-bottom: 15px;
}

.recipe-detail-tags {
  margin-top: 30px;
}