/* ============================================
   ฟาร์มทอฝันฟาร์ม - Custom CSS
   ============================================ */

:root {
  --primary-dark: #0d4f3d;
  --primary-green: #165d47;
  --secondary-green: #1a7355;
  --accent-gold: #d4af37;
  --light-gold: #f4e4c1;
  --dark-gold: #b8941e;
  --cream: #faf6ed;
  --dark-bg: #0a3a2b;
}

* {
  font-family: "Sarabun", "Kanit", sans-serif;
}

body {
  background: linear-gradient(135deg, var(--cream) 0%, #e8dcc4 100%);
  min-height: 100vh;
}

/* ============================================
   Navigation Bar
   ============================================ */
.navbar {
  background: linear-gradient(
    135deg,
    var(--dark-bg) 0%,
    var(--primary-dark) 50%,
    var(--primary-green) 100%
  );
  box-shadow: 0 4px 20px rgba(13, 79, 61, 0.3);
  padding: 1rem 0;
  border-bottom: 3px solid var(--accent-gold);
}

.navbar-brand {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--accent-gold) !important;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-brand .logo-img {
  height: 50px;
  width: auto;
  filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
  animation: logoGlow 2s ease-in-out infinite;
}

@keyframes logoGlow {
  0%,
  100% {
    filter: drop-shadow(0 0 10px rgba(212, 175, 55, 0.5));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(212, 175, 55, 0.8));
  }
}

.nav-link {
  color: var(--light-gold) !important;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 1rem !important;
}

.nav-link:hover {
  color: var(--accent-gold) !important;
  transform: translateY(-2px);
}

.nav-link.active {
  color: var(--accent-gold) !important;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: var(--accent-gold);
  box-shadow: 0 0 10px var(--accent-gold);
}

/* ============================================
   Hero Section
   ============================================ */
.hero-section {
  background: linear-gradient(
    135deg,
    rgba(13, 79, 61, 0.95) 0%,
    rgba(22, 93, 71, 0.95) 50%,
    rgba(26, 115, 85, 0.9) 100%
  );
  color: white;
  padding: 100px 0;
  margin-bottom: 50px;
  position: relative;
  overflow: hidden;
  border-bottom: 5px solid var(--accent-gold);
}

.hero-section::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(
    circle,
    rgba(212, 175, 55, 0.15) 0%,
    transparent 70%
  );
  animation: float 6s ease-in-out infinite;
}

.hero-section::after {
  content: "";
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 400px;
  height: 400px;
  background: radial-gradient(
    circle,
    rgba(212, 175, 55, 0.1) 0%,
    transparent 70%
  );
  animation: float 8s ease-in-out infinite reverse;
}

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

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3.8rem;
  font-weight: bold;
  background: linear-gradient(
    135deg,
    var(--accent-gold) 0%,
    #f4e4c1 50%,
    var(--accent-gold) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1.5rem;
  animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.2);
  }
}

.hero-subtitle {
  font-size: 1.4rem;
  color: var(--light-gold);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* ============================================
   Page Header
   ============================================ */
.page-header {
  background: linear-gradient(
    135deg,
    var(--primary-green) 0%,
    var(--secondary-green) 100%
  );
  color: white;
  padding: 60px 0;
  margin-bottom: 40px;
  border-bottom: 4px solid var(--accent-gold);
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: bold;
  color: var(--accent-gold);
}

/* ============================================
   Cards
   ============================================ */
.card {
  border: none;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(13, 79, 61, 0.15);
  transition: all 0.4s ease;
  overflow: hidden;
  background: white;
  border: 2px solid transparent;
}

.card:hover {
  transform: translateY(-15px);
  box-shadow: 0 20px 50px rgba(13, 79, 61, 0.25);
  border-color: var(--accent-gold);
}

.card-header {
  background: linear-gradient(
    135deg,
    var(--primary-green) 0%,
    var(--secondary-green) 100%
  );
  color: var(--accent-gold);
  font-weight: bold;
  font-size: 1.4rem;
  padding: 1.5rem;
  border: none;
  border-bottom: 3px solid var(--accent-gold);
}

.card-body {
  padding: 1.8rem;
}

.card-title {
  color: var(--primary-dark);
  font-weight: bold;
}

/* ============================================
   Buttons
   ============================================ */
.btn-primary {
  background: linear-gradient(
    135deg,
    var(--accent-gold) 0%,
    var(--dark-gold) 100%
  );
  border: none;
  border-radius: 30px;
  padding: 12px 35px;
  font-weight: bold;
  color: var(--dark-bg);
  transition: all 0.3s ease;
  box-shadow: 0 5px 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.5);
  background: linear-gradient(135deg, #f4e4c1 0%, var(--accent-gold) 100%);
  color: var(--dark-bg);
}

.btn-warning {
  background: linear-gradient(135deg, var(--accent-gold) 0%, #f4e4c1 100%);
  border: 2px solid var(--dark-gold);
  color: var(--dark-bg);
  font-weight: bold;
  box-shadow: 0 5px 20px rgba(212, 175, 55, 0.4);
  border-radius: 30px;
  padding: 12px 35px;
}

.btn-warning:hover {
  background: linear-gradient(135deg, #f4e4c1 0%, white 100%);
  transform: scale(1.05);
  color: var(--dark-bg);
}

.btn-success {
  background: linear-gradient(
    135deg,
    var(--primary-green) 0%,
    var(--secondary-green) 100%
  );
  border: none;
  border-radius: 30px;
  padding: 12px 35px;
  font-weight: bold;
}

.btn-success:hover {
  transform: scale(1.05);
  background: linear-gradient(
    135deg,
    var(--secondary-green) 0%,
    var(--primary-green) 100%
  );
}

/* ============================================
   Chicken Cards
   ============================================ */
.chicken-card {
  position: relative;
  margin-bottom: 25px;
}

.chicken-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 15px;
  transition: transform 0.4s ease;
  border: 3px solid var(--light-gold);
}

.chicken-card:hover .chicken-image {
  transform: scale(1.08);
  border-color: var(--accent-gold);
}

.badge-custom {
  background: linear-gradient(
    135deg,
    var(--accent-gold) 0%,
    var(--dark-gold) 100%
  );
  color: white;
  padding: 10px 18px;
  border-radius: 25px;
  font-weight: bold;
  font-size: 0.9rem;
  box-shadow: 0 3px 10px rgba(212, 175, 55, 0.4);
}

.chicken-info {
  display: flex;
  justify-content: space-between;
  margin: 12px 0;
  padding: 12px;
  background: linear-gradient(135deg, var(--cream) 0%, white 100%);
  border-radius: 10px;
  border-left: 4px solid var(--accent-gold);
}

.info-icon {
  font-size: 1.2rem;
  margin-right: 10px;
  color: var(--accent-gold);
  filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
}

/* ============================================
   Chicken Certificate Card Styles (สำหรับ Modal)
   ============================================ */

.chicken-certificate-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Header Section */
.certificate-header {
  background: linear-gradient(
    135deg,
    var(--primary-green) 0%,
    var(--secondary-green) 100%
  );
  padding: 20px 30px;
  border-bottom: 3px solid var(--accent-gold);
}

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

.farm-logo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  padding: 5px;
  object-fit: contain;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.farm-name-section {
  flex: 1;
}

.farm-name-thai {
  font-family: "Kanit", sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--accent-gold);
  margin: 0;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  line-height: 1.2;
}

.farm-name-eng {
  font-family: "Georgia", serif;
  font-size: 1.5rem;
  font-weight: 400;
  color: white;
  margin: 0;
  font-style: italic;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Content Section */
.certificate-content {
  padding: 30px;
}

/* Image Section */
.chicken-image-wrapper {
  position: relative;
  margin-bottom: 20px;
}

.chicken-certificate-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 15px;
  border: 5px solid var(--primary-green);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.chicken-name-label {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(22, 93, 71, 0.95);
  color: var(--accent-gold);
  padding: 8px 25px;
  border-radius: 25px;
  font-family: "Kanit", sans-serif;
  font-size: 1.3rem;
  font-weight: 600;
  border: 2px solid var(--accent-gold);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.farm-name-bottom {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: "Georgia", serif;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--primary-green);
  font-weight: 600;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

/* Info Form Section */
.chicken-info-form {
  background: white;
  border-radius: 10px;
  padding: 20px;
  border: 2px solid #e0e0e0;
}

.info-row {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  margin-bottom: 10px;
  border-bottom: 1px solid #e0e0e0;
  min-height: 50px;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  flex: 0 0 140px;
  font-family: "Kanit", sans-serif;
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary-green);
  margin: 0;
}

.label-eng {
  display: block;
  font-family: "Georgia", serif;
  font-size: 0.75rem;
  font-style: italic;
  color: #666;
  font-weight: normal;
}

.info-value {
  flex: 1;
  font-family: "Sarabun", sans-serif;
  font-size: 1rem;
  color: #333;
  border-bottom: 1px solid #ccc;
  padding: 5px 10px;
  min-height: 30px;
  display: flex;
  align-items: center;
}

.number-value {
  font-weight: 600;
  color: var(--primary-green);
  font-size: 1.1rem;
}

.accreditor-row {
  margin-top: 15px;
  padding-top: 15px;
  border-top: 2px solid var(--accent-gold);
}

.accreditor-value {
  font-style: italic;
  color: var(--primary-green);
  font-weight: 500;
  border-bottom: 2px solid var(--primary-green);
}

/* Additional Info Section */
.additional-info-section {
  margin-top: 30px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  border-left: 4px solid var(--accent-gold);
}

.section-title {
  font-family: "Kanit", sans-serif;
  font-size: 1.2rem;
  color: var(--primary-green);
  margin-bottom: 15px;
  font-weight: 600;
}

.additional-info-section p {
  margin-bottom: 10px;
  font-family: "Sarabun", sans-serif;
  font-size: 0.95rem;
  line-height: 1.6;
}

.additional-info-section strong {
  color: var(--primary-green);
  font-weight: 600;
}

.additional-info-section i {
  color: var(--accent-gold);
  margin-right: 8px;
}

.stats-row {
  display: flex;
  gap: 20px;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px solid #dee2e6;
}

.stat-item {
  flex: 1;
  padding: 10px 15px;
  border-radius: 8px;
  font-weight: 600;
  text-align: center;
}

.stat-item.win {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.stat-item.loss {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.stat-item i {
  margin-right: 5px;
}

/* ============================================
   Stats Card
   ============================================ */
.stats-card {
  background: linear-gradient(135deg, white 0%, var(--cream) 100%);
  border: 3px solid var(--accent-gold);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 20px;
  box-shadow: 0 10px 30px rgba(212, 175, 55, 0.2);
  position: relative;
  overflow: hidden;
}

.stats-card::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(212, 175, 55, 0.1) 0%,
    transparent 70%
  );
  animation: rotate 10s linear infinite;
}

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

.stats-number {
  font-size: 3rem;
  font-weight: bold;
  background: linear-gradient(
    135deg,
    var(--primary-green) 0%,
    var(--accent-gold) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  z-index: 1;
}

.stats-label {
  color: var(--primary-dark);
  font-size: 1.1rem;
  font-weight: 600;
  position: relative;
  z-index: 1;
}

/* ============================================
   Timeline (สำหรับหน้าประวัติ)
   ============================================ */
.timeline {
  position: relative;
  padding: 20px 0;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: linear-gradient(
    180deg,
    var(--accent-gold) 0%,
    var(--dark-gold) 100%
  );
  transform: translateX(-50%);
}

.timeline-item {
  margin-bottom: 50px;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 0;
  width: 20px;
  height: 20px;
  background: var(--accent-gold);
  border: 4px solid white;
  border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 0 4px var(--accent-gold);
  z-index: 1;
}

.timeline-content {
  width: 45%;
  padding: 20px;
  background: white;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(13, 79, 61, 0.15);
  border: 2px solid var(--light-gold);
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-left: auto;
}

.timeline-year {
  display: inline-block;
  padding: 5px 15px;
  background: linear-gradient(
    135deg,
    var(--accent-gold) 0%,
    var(--dark-gold) 100%
  );
  color: white;
  border-radius: 20px;
  font-weight: bold;
  margin-bottom: 10px;
}

/* ============================================
   Footer
   ============================================ */
footer {
  background: linear-gradient(
    135deg,
    var(--dark-bg) 0%,
    var(--primary-dark) 100%
  );
  color: var(--light-gold);
  padding: 60px 0 30px;
  margin-top: 80px;
  border-top: 4px solid var(--accent-gold);
}

.footer-title {
  color: var(--accent-gold);
  font-weight: bold;
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  color: var(--light-gold);
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-gold);
  padding-left: 5px;
}

.footer-contact {
  list-style: none;
  padding: 0;
}

.footer-contact li {
  margin-bottom: 10px;
  color: var(--light-gold);
}

.footer-contact i {
  color: var(--accent-gold);
  margin-right: 10px;
  width: 20px;
}

.footer-divider {
  border-color: rgba(212, 175, 55, 0.3);
  margin: 30px 0;
}

.social-links {
  display: flex;
  gap: 15px;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--accent-gold);
  color: var(--dark-bg);
  border-radius: 50%;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-link:hover {
  transform: scale(1.2);
  background: var(--light-gold);
  color: var(--dark-bg);
}

/* ============================================
   Form Styles
   ============================================ */
.form-control,
.form-select {
  border: 2px solid var(--light-gold);
  border-radius: 10px;
  padding: 12px;
  transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--accent-gold);
  box-shadow: 0 0 0 0.2rem rgba(212, 175, 55, 0.25);
}

.form-label {
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 8px;
}

textarea.form-control {
  min-height: 120px;
}

/* ============================================
   Modal Styles
   ============================================ */
.modal-content {
  border-radius: 20px;
  border: 3px solid var(--accent-gold);
  overflow: hidden;
}

.modal-header {
  background: linear-gradient(
    135deg,
    var(--primary-green) 0%,
    var(--secondary-green) 100%
  );
  color: var(--accent-gold);
  border-radius: 20px 20px 0 0;
  padding: 1.5rem;
  border-bottom: 3px solid var(--accent-gold);
}

.modal-title {
  font-weight: bold;
  font-size: 1.5rem;
}

.btn-close-white {
  filter: brightness(0) invert(1);
}

#chickenModal .modal-dialog {
  max-width: 900px;
}

#chickenModal .modal-content {
  border: none;
  border-radius: 15px;
  overflow: hidden;
}

#chickenModal .modal-body {
  padding: 0;
}

/* ============================================
   Loading Spinner
   ============================================ */
.loading {
  display: none;
  text-align: center;
  padding: 20px;
}

.loading.active {
  display: block;
}

.spinner {
  border: 4px solid var(--light-gold);
  border-top: 4px solid var(--accent-gold);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ============================================
   Filter Buttons
   ============================================ */
.filter-btn {
  margin: 8px;
  border-radius: 30px;
  border: 2px solid var(--primary-green);
  color: var(--primary-green);
  font-weight: 600;
  padding: 10px 25px;
  transition: all 0.3s ease;
  background: white;
}

.filter-btn:hover {
  background: var(--light-gold);
  border-color: var(--accent-gold);
  transform: translateY(-3px);
  color: var(--primary-dark);
}

.filter-btn.active {
  background: linear-gradient(
    135deg,
    var(--primary-green) 0%,
    var(--secondary-green) 100%
  );
  color: var(--accent-gold);
  border-color: var(--accent-gold);
  box-shadow: 0 5px 20px rgba(13, 79, 61, 0.3);
}

/* ============================================
   Price Tag
   ============================================ */
.price-tag {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(
    135deg,
    var(--accent-gold) 0%,
    var(--dark-gold) 100%
  );
  color: white;
  border-radius: 25px;
  font-size: 1.2rem;
  font-weight: bold;
  box-shadow: 0 3px 10px rgba(212, 175, 55, 0.4);
}

/* ============================================
   Status Badge
   ============================================ */
.status-badge {
  display: inline-block;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: bold;
}

.status-available {
  background: #28a745;
  color: white;
}

.status-sold {
  background: #dc3545;
  color: white;
}

.status-reserved {
  background: #ffc107;
  color: #000;
}

/* ============================================
   Section Headings
   ============================================ */
section h2 {
  position: relative;
  display: inline-block;
  padding-bottom: 15px;
  color: var(--primary-dark);
  font-weight: bold;
}

section h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, var(--accent-gold) 0%, transparent 100%);
  border-radius: 2px;
}

/* ============================================
   Contact Info Box
   ============================================ */
.contact-info-item {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.contact-info-item i {
  font-size: 2rem;
  color: var(--accent-gold);
  margin-right: 20px;
  width: 50px;
  text-align: center;
}

.contact-info-item div h5 {
  color: var(--primary-dark);
  margin-bottom: 5px;
  font-weight: bold;
}

.contact-info-item div p {
  margin: 0;
  color: #666;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .stats-number {
    font-size: 2rem;
  }

  .navbar-brand .logo-img {
    height: 40px;
  }

  .navbar-brand {
    font-size: 1.3rem;
  }

  .nav-link {
    padding: 0.5rem 0 !important;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item::before {
    left: 20px;
  }

  .timeline-content {
    width: calc(100% - 60px);
    margin-left: 60px !important;
  }

  .timeline-item:nth-child(odd) .timeline-content {
    margin-left: 60px !important;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }

  .chicken-image {
    height: 220px;
  }

  /* Certificate Card Responsive */
  .farm-name-thai {
    font-size: 1.8rem;
  }

  .farm-name-eng {
    font-size: 1.1rem;
  }

  .farm-logo {
    width: 60px;
    height: 60px;
  }

  .chicken-certificate-image {
    height: 300px;
  }

  .info-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .info-label {
    flex: none;
    margin-bottom: 5px;
  }

  .info-value {
    width: 100%;
  }

  .stats-row {
    flex-direction: column;
    gap: 10px;
  }

  .certificate-content {
    padding: 15px;
  }

  .logo-section {
    gap: 15px;
  }

  .chicken-name-label {
    font-size: 1.1rem;
    padding: 6px 20px;
  }

  .farm-name-bottom {
    font-size: 0.9rem;
  }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-gold {
  color: var(--accent-gold) !important;
}

.text-primary-dark {
  color: var(--primary-dark) !important;
}

.bg-gold {
  background: var(--accent-gold) !important;
}

.bg-cream {
  background: var(--cream) !important;
}

.shadow-gold {
  box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3) !important;
}

.border-gold {
  border-color: var(--accent-gold) !important;
}

/* ============================================
   Animation Classes
   ============================================ */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in-left {
  animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
-box {
  background: white;
  padding: 30px;
  border-radius: 20px;
  border: 3px solid var(--accent-gold);
  box-shadow: 0 10px 30px rgba(13, 79, 61, 0.15);
  margin-bottom: 20px;
}

/* ============================================
   ส่วนที่ขาดหาย - เริ่มต่อจาก .contact-info
   ============================================ */

.contact-info-item {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.contact-info-item i {
  font-size: 2rem;
  color: var(--accent-gold);
  margin-right: 20px;
  width: 50px;
  text-align: center;
}

.contact-info-item div h5 {
  color: var(--primary-dark);
  margin-bottom: 5px;
  font-weight: bold;
}

.contact-info-item div p {
  margin: 0;
  color: #666;
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .stats-number {
    font-size: 2rem;
  }

  .navbar-brand .logo-img {
    height: 40px;
  }

  .navbar-brand {
    font-size: 1.3rem;
  }

  .nav-link {
    padding: 0.5rem 0 !important;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item::before {
    left: 20px;
  }

  .timeline-content {
    width: calc(100% - 60px);
    margin-left: 60px !important;
  }

  .timeline-item:nth-child(odd) .timeline-content {
    margin-left: 60px !important;
  }

  .page-header h1 {
    font-size: 1.8rem;
  }

  .chicken-image {
    height: 220px;
  }

  /* Certificate Card Responsive */
  .farm-name-thai {
    font-size: 1.8rem;
  }

  .farm-name-eng {
    font-size: 1.1rem;
  }

  .farm-logo {
    width: 60px;
    height: 60px;
  }

  .chicken-certificate-image {
    height: 300px;
  }

  .info-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .info-label {
    flex: none;
    margin-bottom: 5px;
  }

  .info-value {
    width: 100%;
  }

  .stats-row {
    flex-direction: column;
    gap: 10px;
  }

  .certificate-content {
    padding: 15px;
  }

  .logo-section {
    gap: 15px;
  }

  .chicken-name-label {
    font-size: 1.1rem;
    padding: 6px 20px;
  }

  .farm-name-bottom {
    font-size: 0.9rem;
  }
}

/* ============================================
   Utility Classes
   ============================================ */
.text-gold {
  color: var(--accent-gold) !important;
}

.text-primary-dark {
  color: var(--primary-dark) !important;
}

.bg-gold {
  background: var(--accent-gold) !important;
}

.bg-cream {
  background: var(--cream) !important;
}

.shadow-gold {
  box-shadow: 0 5px 20px rgba(212, 175, 55, 0.3) !important;
}

.border-gold {
  border-color: var(--accent-gold) !important;
}

/* ============================================
   Animation Classes
   ============================================ */
.fade-in {
  animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in-left {
  animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.slide-in-right {
  animation: slideInRight 0.5s ease-out;
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ============================================
   ปุ่มปิด Modal สำหรับทุกขนาดหน้าจอ
   ============================================ */

.btn-close-modal {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(220, 53, 69, 0.9);
  border: 2px solid white;
  color: white;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.btn-close-modal:hover {
  background: rgba(220, 53, 69, 1);
  transform: scale(1.1);
}

.btn-close-modal i {
  pointer-events: none;
}

/* ============================================
   Responsive - Mobile First
   ============================================ */

/* สำหรับหน้าจอขนาดเล็กมาก (มือถือเล็ก) */
@media (max-width: 575px) {
  /* ปรับการ์ดไก่ให้แสดง 2 คอลัมน์ */
  .chicken-card {
    margin-bottom: 12px;
  }

  .chicken-card .card-body {
    padding: 10px;
  }

  .chicken-card .card-title {
    font-size: 0.9rem;
    margin-bottom: 8px !important;
  }

  .chicken-image {
    height: 140px;
  }

  .badge-custom {
    font-size: 0.7rem;
    padding: 5px 10px;
  }

  .chicken-info {
    font-size: 0.8rem;
    padding: 6px 8px;
    margin: 6px 0;
  }

  .chicken-info span {
    font-size: 0.75rem;
  }

  .info-icon {
    font-size: 0.85rem;
    margin-right: 4px;
  }

  /* ปุ่มในการ์ด */
  .chicken-card .btn {
    padding: 6px 12px;
    font-size: 0.8rem;
    margin-top: 8px !important;
  }

  .chicken-card .btn i {
    font-size: 0.75rem;
  }

  /* Modal สำหรับมือถือ */
  #chickenModal .modal-dialog {
    margin: 0;
    max-width: 100%;
    height: 100vh;
  }

  #chickenModal .modal-content {
    height: 100vh;
    border-radius: 0;
    border: none;
  }

  #chickenModal .modal-body {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Certificate Card บนมือถือ */
  .certificate-header {
    padding: 12px 15px;
    position: relative;
  }

  .btn-close-modal {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    top: 8px;
    right: 8px;
  }

  .farm-name-thai {
    font-size: 1.3rem;
  }

  .farm-name-eng {
    font-size: 0.9rem;
  }

  .farm-logo {
    width: 45px;
    height: 45px;
  }

  .logo-section {
    gap: 10px;
  }

  .chicken-certificate-image {
    height: 220px;
  }

  .chicken-name-label {
    font-size: 0.95rem;
    padding: 5px 15px;
    bottom: 45px;
  }

  .farm-name-bottom {
    font-size: 0.8rem;
    bottom: 12px;
  }

  .certificate-content {
    padding: 12px;
  }

  .info-row {
    flex-direction: column;
    align-items: flex-start;
    padding: 8px 10px;
    min-height: auto;
    margin-bottom: 8px;
  }

  .info-label {
    flex: none;
    margin-bottom: 4px;
    font-size: 0.85rem;
  }

  .label-eng {
    font-size: 0.65rem;
  }

  .info-value {
    width: 100%;
    font-size: 0.85rem;
    padding: 4px 8px;
  }

  .number-value {
    font-size: 0.95rem;
  }

  .additional-info-section {
    padding: 12px;
    margin-top: 15px;
  }

  .section-title {
    font-size: 0.95rem;
    margin-bottom: 10px;
  }

  .additional-info-section p {
    font-size: 0.8rem;
    margin-bottom: 8px;
  }

  .stats-row {
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
  }

  .stat-item {
    font-size: 0.85rem;
    padding: 8px 10px;
  }

  /* Stats Cards บนหน้าหลัก */
  .stats-card {
    padding: 18px;
    margin-bottom: 12px;
  }

  .stats-number {
    font-size: 1.8rem;
  }

  .stats-label {
    font-size: 0.9rem;
  }

  /* Page Header */
  .page-header {
    padding: 35px 0;
    margin-bottom: 30px;
  }

  .page-header h1 {
    font-size: 1.4rem;
  }

  .page-header p {
    font-size: 0.85rem;
  }

  /* Hero Section */
  .hero-section {
    padding: 50px 0;
    margin-bottom: 30px;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .hero-subtitle {
    font-size: 0.95rem;
  }

  /* Buttons */
  .btn-lg {
    padding: 8px 20px;
    font-size: 0.9rem;
  }
}

/* สำหรับหน้าจอขนาดกลาง (Tablet พอร์ตเทรต) */
@media (min-width: 576px) and (max-width: 768px) {
  .chicken-image {
    height: 180px;
  }

  #chickenModal .modal-dialog {
    max-width: 90%;
  }

  .chicken-certificate-image {
    height: 300px;
  }

  .btn-close-modal {
    width: 38px;
    height: 38px;
  }
}

/* สำหรับหน้าจอขนาดใหญ่ (Desktop) */
@media (min-width: 769px) {
  /* ปุ่มปิดยังแสดงบน Desktop */
  .btn-close-modal {
    width: 42px;
    height: 42px;
    top: 12px;
    right: 12px;
  }
}
