/* ============================================
   KOKANDUS.CSS - CHEF'S TABLE DESIGN
   Gourmet Restaurant Elegance
   ============================================ */

/* ============================================
   VARIABLES - WARM EARTH PALETTE
   ============================================ */
:root {
  /* Warm Earth Colors */
  --gold-primary: #d4af37;
  --gold-light: #f4d03f;
  --brown-dark: #5c3d2e;
  --brown-medium: #8b6f47;
  --cream: #fefdfb;
  --cream-dark: #f5f1e8;
  --orange-accent: #ff6b35;
  --red-accent: #c44536;
  
  /* Backgrounds */
  --bg-primary: #fefdfb;
  --bg-secondary: #f8f6f3;
  --bg-card: #ffffff;
  --bg-overlay: rgba(0, 0, 0, 0.7);
  
  /* Text */
  --text-primary: #2c2c2c;
  --text-secondary: #5a5a5a;
  --text-muted: #8a8a8a;
  --text-light: #ffffff;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.20);
  
  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Serif font for headings */
h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  line-height: 1.2;
}

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

/* ============================================
   NAVIGATION - ELEGANT
   ============================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--bg-card);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  z-index: 1000;
  padding: var(--space-sm) 0;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: Georgia, serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--brown-dark);
  text-decoration: none;
  letter-spacing: 2px;
  transition: var(--transition-fast);
  position: relative;
}

.logo::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gold-primary);
  transition: var(--transition-normal);
}

.logo:hover::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: var(--space-xs);
}

.nav-toggle span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--brown-dark);
  transition: var(--transition-normal);
  border-radius: 2px;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: var(--space-md);
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
  font-size: 0.95rem;
  font-weight: 500;
  position: relative;
}

.nav-links a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gold-primary);
  transform: translateX(-50%);
  transition: var(--transition-normal);
}

.nav-links a:hover {
  color: var(--brown-dark);
}

.nav-links a:hover::before,
.nav-links a.active::before {
  width: 70%;
}

.nav-links a.active {
  color: var(--gold-primary);
}

/* ============================================
   CONTAINER
   ============================================ */
.container-elegant {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

/* ============================================
   HERO - ELEGANT
   ============================================ */
.hero-elegant {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: var(--space-2xl) var(--space-lg);
  margin-top: 60px;
  background: 
    linear-gradient(135deg, rgba(212, 175, 55, 0.05), rgba(139, 111, 71, 0.05)),
    var(--bg-secondary);
  overflow: hidden;
}

.hero-elegant::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(139, 111, 71, 0.08) 0%, transparent 50%);
  animation: heroFloat 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes heroFloat {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(20px, -20px) scale(1.05);
  }
}

.hero-content-elegant {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 800px;
}

.hero-subtitle-small {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--text-muted);
  margin-bottom: var(--space-sm);
  font-weight: 500;
}

.hero-title-elegant {
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 300;
  color: var(--brown-dark);
  margin-bottom: var(--space-md);
  letter-spacing: -1px;
}

.hero-divider {
  width: 80px;
  height: 2px;
  background: var(--gold-primary);
  margin: var(--space-lg) auto;
}

.hero-description-elegant {
  font-size: 1.3rem;
  color: var(--text-secondary);
  margin-bottom: var(--space-xl);
  font-style: italic;
}

.hero-stats-elegant {
  display: flex;
  justify-content: center;
  gap: var(--space-xl);
}

.stat-elegant {
  text-align: center;
}

.stat-value {
  font-family: Georgia, serif;
  font-size: 3rem;
  font-weight: 300;
  color: var(--gold-primary);
  display: block;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label-elegant {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ============================================
   STORY SECTION
   ============================================ */
.story-elegant {
  padding: var(--space-2xl) 0;
  background: var(--bg-card);
}

.section-title-elegant {
  font-family: Georgia, serif;
  font-size: 2.5rem;
  font-weight: 300;
  text-align: center;
  color: var(--brown-dark);
  margin-bottom: var(--space-sm);
}

.story-divider-small {
  width: 60px;
  height: 2px;
  background: var(--gold-primary);
  margin: 0 auto var(--space-xl);
}

.story-text-elegant {
  max-width: 800px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
}

.story-text-elegant p {
  margin-bottom: var(--space-md);
}

.story-highlight {
  background: rgba(212, 175, 55, 0.08);
  padding: var(--space-md);
  border-left: 4px solid var(--gold-primary);
  border-radius: var(--radius-sm);
  font-style: italic;
}

.story-link-elegant {
  color: var(--gold-primary);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--gold-primary);
  transition: var(--transition-fast);
}

.story-link-elegant:hover {
  color: var(--brown-dark);
  border-bottom-color: var(--brown-dark);
}

/* ============================================
   CATEGORIES SECTION
   ============================================ */
.categories-elegant {
  padding: var(--space-2xl) 0;
  background: var(--bg-secondary);
}

.categories-grid-elegant {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-md);
  margin-top: var(--space-xl);
}

.category-elegant {
  background: var(--bg-card);
  border: 2px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  cursor: pointer;
  transition: var(--transition-normal);
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.category-elegant:hover {
  border-color: var(--gold-primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.category-elegant.active {
  background: linear-gradient(135deg, var(--gold-primary), var(--gold-light));
  border-color: var(--gold-primary);
  color: white;
}

.category-name-elegant {
  font-size: 1rem;
  font-weight: 600;
}

.category-count-elegant {
  font-size: 0.85rem;
  opacity: 0.8;
}

.category-elegant.active .category-name-elegant,
.category-elegant.active .category-count-elegant {
  color: white;
}

/* ============================================
   RECIPES SECTION
   ============================================ */
.recipes-elegant {
  padding: var(--space-2xl) 0;
}

.toolbar-elegant {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.search-elegant,
.select-elegant {
  flex: 1;
  min-width: 200px;
  padding: var(--space-sm) var(--space-md);
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  background: var(--bg-card);
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.search-elegant:focus,
.select-elegant:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.btn-elegant-primary {
  padding: var(--space-sm) var(--space-lg);
  background: var(--gold-primary);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
  white-space: nowrap;
}

.btn-elegant-primary:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* ============================================
   RECIPE CARDS
   ============================================ */
.recipes-grid-elegant {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.recipe-card-elegant {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.recipe-card-elegant:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.recipe-image-elegant {
  width: 100%;
  height: 250px;
  overflow: hidden;
  position: relative;
  background: var(--bg-secondary);
}

.recipe-image-elegant img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.recipe-card-elegant:hover .recipe-image-elegant img {
  transform: scale(1.05);
}

.recipe-category-badge {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  padding: 0.4rem 0.8rem;
  background: var(--gold-primary);
  color: white;
  border-radius: var(--radius-sm);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.recipe-content-elegant {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.recipe-title-elegant {
  font-family: Georgia, serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--brown-dark);
  margin-bottom: var(--space-xs);
}

.recipe-intro-elegant {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: var(--space-md);
  flex: 1;
}

.recipe-meta-elegant {
  display: flex;
  gap: var(--space-md);
  padding-top: var(--space-sm);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.recipe-meta-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.recipe-meta-icon {
  font-size: 1rem;
}

.recipe-difficulty-elegant {
  margin-top: var(--space-xs);
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: rgba(212, 175, 55, 0.1);
  color: var(--gold-primary);
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
}

/* ============================================
   LOADING STATE
   ============================================ */
.loading-elegant {
  text-align: center;
  padding: var(--space-2xl);
  color: var(--text-muted);
}

.spinner-elegant {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(212, 175, 55, 0.2);
  border-top-color: var(--gold-primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto var(--space-md);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ============================================
   MODAL (ADMIN PANEL)
   ============================================ */
.modal-elegant {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.modal-elegant[hidden] {
  display: none;
}

.modal-overlay-elegant {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-overlay);
  backdrop-filter: blur(5px);
}

.modal-box-elegant {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-close-elegant {
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  width: 40px;
  height: 40px;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close-elegant:hover {
  background: var(--red-accent);
  color: white;
  transform: rotate(90deg);
}

.modal-title-elegant {
  font-family: Georgia, serif;
  font-size: 2rem;
  font-weight: 300;
  color: var(--brown-dark);
  margin-bottom: var(--space-xl);
}

/* ============================================
   FORM STYLES
   ============================================ */
.form-elegant {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-md);
}

.form-row-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

.form-group-elegant {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group-elegant label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-group-elegant label small {
  font-weight: 400;
  color: var(--text-muted);
}

.form-group-elegant input,
.form-group-elegant select,
.form-group-elegant textarea {
  padding: var(--space-sm);
  border: 2px solid rgba(0, 0, 0, 0.08);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--bg-card);
  color: var(--text-primary);
  transition: var(--transition-fast);
}

.form-group-elegant input:focus,
.form-group-elegant select:focus,
.form-group-elegant textarea:focus {
  outline: none;
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-group-elegant textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

.form-actions-elegant {
  display: flex;
  gap: var(--space-sm);
  justify-content: flex-end;
  margin-top: var(--space-md);
}

.btn-elegant-secondary {
  padding: var(--space-sm) var(--space-lg);
  background: transparent;
  color: var(--text-secondary);
  border: 2px solid rgba(0, 0, 0, 0.1);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-normal);
}

.btn-elegant-secondary:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.15);
}

/* ============================================
   RECIPE DETAIL PAGE
   ============================================ */
.recipe-detail-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-lg);
  margin-top: 60px;
}

.recipe-detail-header {
  text-align: center;
  margin-bottom: var(--space-2xl);
}

.recipe-detail-title {
  font-family: Georgia, serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 300;
  color: var(--brown-dark);
  margin-bottom: var(--space-md);
}

.recipe-image-gallery {
  margin-bottom: var(--space-xl);
}

.main-recipe-image {
  width: 100%;
  height: 500px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-sm);
}

.main-recipe-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recipe-image-thumbnails {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--space-sm);
}

.thumbnail-image {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  border: 3px solid transparent;
  transition: var(--transition-fast);
}

.thumbnail-image:hover,
.thumbnail-image.active {
  border-color: var(--gold-primary);
  transform: scale(1.05);
}

.recipe-info-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-xl);
  margin-top: var(--space-xl);
}

.recipe-main-content {
  background: var(--bg-card);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.recipe-sidebar {
  background: var(--bg-card);
  padding: var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  height: fit-content;
  position: sticky;
  top: 80px;
}

.recipe-section-title {
  font-family: Georgia, serif;
  font-size: 1.8rem;
  font-weight: 300;
  color: var(--brown-dark);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--gold-primary);
}

.ingredients-list {
  list-style: none;
  padding: 0;
}

.ingredients-list li {
  padding: var(--space-sm) 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.ingredients-list li::before {
  content: '✓';
  color: var(--gold-primary);
  font-weight: 700;
  font-size: 1.2rem;
}

.steps-list {
  list-style: none;
  counter-reset: step-counter;
  padding: 0;
}

.steps-list li {
  counter-increment: step-counter;
  padding: var(--space-md) 0;
  padding-left: 50px;
  position: relative;
  line-height: 1.8;
}

.steps-list li::before {
  content: counter(step-counter);
  position: absolute;
  left: 0;
  top: var(--space-md);
  width: 35px;
  height: 35px;
  background: var(--gold-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
}

.recipe-tips-section {
  background: rgba(212, 175, 55, 0.05);
  border-left: 4px solid var(--gold-primary);
  padding: var(--space-md);
  border-radius: var(--radius-sm);
  margin-top: var(--space-xl);
}

.tips-content {
  line-height: 1.8;
  color: var(--text-secondary);
  white-space: pre-line;
}

/* ============================================
   FOOTER
   ============================================ */
.footer-elegant {
  background: var(--brown-dark);
  color: white;
  text-align: center;
  padding: var(--space-xl) var(--space-lg);
  margin-top: var(--space-2xl);
}

.footer-elegant p {
  opacity: 0.8;
  font-size: 0.95rem;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }
  
  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    width: 100%;
    height: calc(100vh - 60px);
    background: var(--bg-card);
    flex-direction: column;
    padding: var(--space-lg);
    transform: translateX(-100%);
    transition: var(--transition-normal);
    box-shadow: var(--shadow-lg);
  }
  
  .nav-links.active {
    transform: translateX(0);
  }
  
  .nav-links a {
    width: 100%;
    padding: var(--space-sm);
  }
  
  .hero-title-elegant {
    font-size: 2.5rem;
  }
  
  .categories-grid-elegant {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .recipes-grid-elegant {
    grid-template-columns: 1fr;
  }
  
  .recipe-info-grid {
    grid-template-columns: 1fr;
  }
  
  .toolbar-elegant {
    flex-direction: column;
  }
  
  .search-elegant,
  .select-elegant {
    width: 100%;
  }
  
  .form-row,
  .form-row-two {
    grid-template-columns: 1fr;
  }
  
  .main-recipe-image {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .hero-stats-elegant {
    flex-direction: column;
    gap: var(--space-md);
  }
  
  .categories-grid-elegant {
    grid-template-columns: 1fr;
  }
  
  .modal-box-elegant {
    padding: var(--space-md);
  }
}

/* ============================================
   UTILITIES
   ============================================ */
.hidden {
  display: none !important;
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

:focus-visible {
  outline: 2px solid var(--gold-primary);
  outline-offset: 3px;
}