/* ===== SESAME PAGE STYLES ===== */

/* Import base styles from other pages */
.gt-sesame-page {
  font-family: 'Inter', sans-serif;
  overflow-x: hidden; /* Prevent horizontal scroll on entire page */
}

/* Hero Section */
.gt-sesame-hero {
  position: relative;
  padding: 80px 0;
  min-height: 500px;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(rgba(255,255,255,0.95), rgba(255,255,255,0.98)), 
              url('/images/banner.jpg') center/cover no-repeat;
}

.gt-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.gt-blob-1 {
  position: absolute;
  top: -100px;
  left: -100px;
  width: 300px;
  height: 300px;
  background-color: rgba(187, 247, 208, 0.2);
  border-radius: 50%;
  filter: blur(60px);
}

.gt-blob-2 {
  position: absolute;
  bottom: -100px;
  right: -100px;
  width: 350px;
  height: 350px;
  background-color: rgba(134, 239, 172, 0.2);
  border-radius: 50%;
  filter: blur(60px);
}

.gt-hero-content {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
  text-align: center;
}

/* Breadcrumbs */
.gt-breadcrumbs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 30px;
  color: #666;
  font-size: 16px;
}

.gt-breadcrumbs a {
  color: #666;
  text-decoration: none;
  transition: color 0.3s ease;
}

.gt-breadcrumbs a:hover {
  color: #16a34a;
}

.gt-breadcrumbs .separator {
  color: #999;
}

.gt-breadcrumbs .current {
  color: #16a34a;
  font-weight: 600;
}

.gt-hero-title {
  font-size: 48px;
  font-weight: 800;
  color: #1f2937;
  margin-bottom: 24px;
  line-height: 1.2;
}

.gt-gradient-text {
  background: linear-gradient(90deg, #16a34a, #10b981);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.gt-hero-description {
  font-size: 18px;
  color: #4b5563;
  max-width: 800px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

/* Hero Buttons */
.gt-hero-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}

.gt-btn-primary {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, #16a34a, #10b981);
  color: white;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px rgba(22, 163, 74, 0.2);
}

.gt-btn-primary:hover {
  background: linear-gradient(135deg, #15803d, #0d966b);
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(22, 163, 74, 0.3);
}

.gt-btn-secondary {
  display: inline-flex;
  align-items: center;
  border: 2px solid #16a34a;
  color: #16a34a;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.gt-btn-secondary:hover {
  background-color: #f0fdf4;
  transform: translateY(-3px);
}

/* Container & Layout */
.gt-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

.gt-main-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

.gt-main-content {
  width: 100%;
  overflow: hidden; /* Contain content */
}

.gt-sidebar {
  width: 100%;
}

/* Section Styles */
.gt-section-white {
  background-color: white;
  padding: 60px 0;
}

.gt-content-section {
  margin-bottom: 40px;
  width: 100%;
  overflow: hidden; /* Contain content */
}

.gt-section-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.gt-section-title {
  font-size: 32px;
  font-weight: 700;
  color: #1f2937;
}

.gt-icon-large {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.gt-bg-green {
  background: linear-gradient(135deg, #16a34a, #10b981);
}

/* Content Spacing */
.gt-content-space {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gt-text-lg {
  font-size: 18px;
  color: #4b5563;
  line-height: 1.75;
}

/* Subsection Titles */
.gt-subsection-title {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 16px;
}

/* Info Cards */
.gt-info-card {
  background: rgba(220, 252, 231, 0.3);
  border-radius: 16px;
  padding: 24px;
  border: 1px solid rgba(22, 163, 74, 0.2);
  margin: 16px 0;
}

.gt-info-title {
  font-size: 18px;
  font-weight: 600;
  color: #166534;
  margin-bottom: 12px;
}

/* Method Cards */
.gt-method-card {
  background: rgba(249, 250, 251, 0.5);
  border-radius: 12px;
  padding: 20px;
  border: 1px solid #e5e7eb;
  margin: 16px 0;
}

.gt-method-title {
  font-size: 18px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 8px;
}

/* Lists */
.gt-bullet-list {
  list-style-type: disc;
  margin-left: 24px;
  color: #4b5563;
}

.gt-bullet-list li {
  margin-bottom: 8px;
  line-height: 1.6;
}

.gt-numbered-list {
  list-style-type: decimal;
  margin-left: 24px;
  color: #4b5563;
}

.gt-numbered-list li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* Variety Names */
.gt-variety-name {
  color: #dc2626;
  font-weight: bold;
}

.gt-chemical {
  color: #dc2626;
  font-weight: bold;
}

/* Tables - FIXED FOR MOBILE SCROLLING */
.gt-table-container {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0;
  -webkit-overflow-scrolling: touch;
  border-radius: 8px;
  border: 1px solid #e5e7eb;
  position: relative;
}

.gt-table-container::-webkit-scrollbar {
  height: 6px;
}

.gt-table-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.gt-table-container::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.gt-table-container::-webkit-scrollbar-thumb:hover {
  background: #a1a1a1;
}

/* Mobile scroll indicator - IMPROVED POSITIONING */
.gt-table-container::before {
  content: '← Scroll →';
  position: absolute;
  top: -30px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 12px;
  color: #666;
  background: #f3f4f6;
  padding: 4px 12px;
  border-radius: 4px;
  display: none;
  z-index: 10;
  white-space: nowrap;
}

.gt-table {
  width: 100%;
  min-width: 800px; /* Minimum width for scrolling */
  border-collapse: collapse;
  font-size: 14px;
}

/* Large tables need more width */
.gt-table.large-table {
  min-width: 1000px;
}

/* Extra large tables */
.gt-table.extra-large-table {
  min-width: 1200px;
}

.gt-table thead {
  background: linear-gradient(135deg, #16a34a, #10b981);
}

.gt-table th {
  padding: 16px;
  text-align: left;
  color: white;
  font-weight: 600;
  font-size: 14px;
  white-space: nowrap;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.gt-table th:last-child {
  border-right: none;
}

/* FIX: Make table headers in tbody black, not white */
.gt-table tbody th {
  background-color: #f9fafb;
  color: #1f2937 !important; /* Force black text */
  font-weight: 700;
  border-bottom: 1px solid #e5e7eb;
  border-right: 1px solid #e5e7eb;
  text-align: left;
}

.gt-table tbody tr {
  border-bottom: 1px solid #e5e7eb;
}

.gt-table tbody tr:nth-child(even) {
  background-color: #f9fafb;
}

.gt-table tbody tr:hover {
  background-color: #f0fdf4;
}

.gt-table td {
  padding: 16px;
  color: #4b5563;
  font-size: 14px;
  border-right: 1px solid #e5e7eb;
}

.gt-table td:last-child {
  border-right: none;
}

/* For tables with lots of text, allow wrapping */
.gt-table td.wrap-text {
  white-space: normal;
  min-width: 200px;
}

/* Warning Notes */
.gt-warning-note {
  background: rgba(254, 226, 226, 0.3);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(239, 68, 68, 0.2);
  margin: 16px 0;
}

.gt-warning-note p {
  color: #dc2626;
  font-weight: 500;
  margin: 0;
}

/* Images */
.gt-images-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  margin: 20px 0;
}

@media (min-width: 768px) {
  .gt-images-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.gt-image-card {
  background: white;
  border-radius: 16px;
  padding: 16px;
  border: 1px solid #e5e7eb;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.gt-image-card img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  max-height: 250px;
  object-fit: cover;
}

.gt-full-width {
  grid-column: 1 / -1;
}

/* Disease/Pest Cards */
.gt-disease-card, .gt-pest-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  background: white;
  border-radius: 16px;
  padding: 24px;
  border: 1px solid #e5e7eb;
  margin-bottom: 20px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.gt-disease-title, .gt-pest-title {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 16px;
}

.gt-symptoms-title, .gt-control-title {
  font-size: 16px;
  font-weight: 600;
  color: #374151;
  margin: 16px 0 8px;
}

.gt-disease-image, .gt-pest-image {
  display: flex;
  align-items: center;
  justify-content: center;
}

.gt-disease-image img, .gt-pest-image img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  max-height: 250px;
  object-fit: cover;
}

/* Download Icon */
.gt-download-icon {
  text-align: center;
  margin: 20px 0 40px;
}

.gt-download-icon a {
  display: inline-block;
  transition: transform 0.3s ease;
}

.gt-download-icon a:hover {
  transform: translateY(-5px);
}

/* Sidebar */
.gt-sidebar-card {
  background: white;
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 168, 116, 0.1);
  position: sticky;
  top: 100px;
}

.gt-sidebar-title {
  font-size: 24px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid #dcfce7;
}

.gt-crop-link {
  margin-bottom: 12px;
}

.gt-crop-link:last-child {
  margin-bottom: 0;
}

.gt-crop-link a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px;
  text-decoration: none;
  color: #4b5563;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.gt-crop-link a:hover {
  background-color: #f0fdf4;
  color: #166534;
}

.gt-crop-link img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
}

.gt-crop-link span {
  font-weight: 600;
  font-size: 16px;
}

/* Responsive Design */
@media (min-width: 768px) {
  .gt-sesame-hero {
    padding: 100px 0;
    min-height: 600px;
  }
  
  .gt-hero-title {
    font-size: 56px;
  }
  
  .gt-main-grid {
    grid-template-columns: 2fr 1fr;
    gap: 60px;
  }
  
  .gt-disease-card, .gt-pest-card {
    grid-template-columns: 2fr 1fr;
  }
  
  /* On larger screens, tables can be full width without min-width */
  .gt-table {
    min-width: 100%;
  }
  
  .gt-table.large-table,
  .gt-table.extra-large-table {
    min-width: 100%;
  }
  
  .gt-table th, .gt-table td {
    white-space: normal;
    padding: 12px;
  }
  
  /* Hide scroll indicator on desktop */
  .gt-table-container::before {
    display: none;
  }
}

@media (min-width: 1024px) {
  .gt-hero-title {
    font-size: 64px;
  }
  
  .gt-main-grid {
    gap: 80px;
  }
  
  .gt-hero-description {
    font-size: 20px;
  }
}

/* Mobile Styles - FIXED */
@media (max-width: 767px) {
  /* Prevent horizontal scroll on entire page */
  body {
    overflow-x: hidden;
    width: 100%;
  }
  
  /* FIX: Better container padding for mobile tables */
  .gt-container {
    padding: 0 16px;
    overflow-x: visible; /* Allow table overflow to be visible */
  }
  
  .gt-sesame-hero {
    padding: 60px 0;
    min-height: 400px;
  }
  
  .gt-hero-title {
    font-size: 32px;
    padding: 0 10px;
  }
  
  .gt-hero-description {
    font-size: 16px;
    padding: 0 10px;
    margin-bottom: 30px;
  }
  
  .gt-hero-buttons {
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 0 10px;
  }
  
  .gt-btn-primary, .gt-btn-secondary {
    width: 100%;
    max-width: 300px;
    justify-content: center;
    padding: 12px 24px;
  }
  
  .gt-section-title {
    font-size: 24px;
  }
  
  .gt-subsection-title {
    font-size: 20px;
  }
  
  /* Show scroll indicator on mobile - CENTERED */
  .gt-table-container::before {
    display: block;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(243, 244, 246, 0.9);
    backdrop-filter: blur(4px);
  }
  
  /* FIX: Better table adjustments for mobile - no negative margins */
  .gt-table-container {
    margin: 24px 0;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    position: relative;
    left: 0;
    width: 100%;
  }
  
  /* Ensure table scrolls properly from left edge */
  .gt-table {
    min-width: 800px;
    font-size: 13px;
    position: relative;
    left: 0;
  }
  
  .gt-table.large-table {
    min-width: 1000px;
  }
  
  .gt-table.extra-large-table {
    min-width: 1200px;
  }
  
  .gt-table th, .gt-table td {
    padding: 12px 10px; /* Slightly more padding for better readability */
    white-space: nowrap;
    min-width: 120px; /* Ensure minimum width for cells */
  }
  
  /* FIX: Make table headers in tbody black and visible on mobile */
  .gt-table tbody th {
    color: #1f2937 !important;
    font-weight: 700;
    background-color: #f9fafb;
    position: sticky;
    left: 0;
    z-index: 1;
    border-right: 2px solid #e5e7eb;
    min-width: 140px;
  }
  
  /* Sidebar adjustments */
  .gt-sidebar-card {
    padding: 24px;
    position: static;
    margin-top: 40px;
  }
  
  /* Disease/Pest cards stack vertically on mobile */
  .gt-disease-card, .gt-pest-card {
    grid-template-columns: 1fr;
  }
  
  .gt-disease-image, .gt-pest-image {
    order: -1;
    margin-bottom: 16px;
  }
  
  .gt-disease-image img, .gt-pest-image img {
    max-height: 200px;
    object-fit: cover;
  }
  
  /* Adjust spacing for mobile */
  .gt-section-white {
    padding: 40px 0;
  }
  
  .gt-content-section {
    margin-bottom: 32px;
  }
  
  .gt-text-lg {
    font-size: 16px;
  }
  
  /* Adjust image grid for mobile */
  .gt-images-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .gt-image-card img {
    max-height: 200px;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .gt-sesame-hero {
    padding: 50px 0;
    min-height: 350px;
  }
  
  .gt-hero-title {
    font-size: 28px;
  }
  
  .gt-hero-description {
    font-size: 15px;
  }
  
  .gt-section-title {
    font-size: 22px;
  }
  
  .gt-subsection-title {
    font-size: 18px;
  }
  
  .gt-table {
    min-width: 700px;
    font-size: 12px;
  }
  
  .gt-table th, .gt-table td {
    padding: 10px 8px;
  }
  
  /* FIX: Ensure table headers are properly visible on very small screens */
  .gt-table tbody th {
    min-width: 120px;
    font-size: 12px;
    padding: 10px 8px;
  }
  
  .gt-crop-link img {
    width: 50px;
    height: 50px;
  }
  
  .gt-crop-link span {
    font-size: 14px;
  }
  
  .gt-sidebar-title {
    font-size: 20px;
  }
  
  /* Better scroll indicator for small screens */
  .gt-table-container::before {
    font-size: 11px;
    padding: 3px 10px;
    top: -28px;
  }
}

/* Print Styles */
@media print {
  .gt-sesame-hero {
    background: white !important;
    color: black !important;
    padding: 40px 0 !important;
    min-height: auto !important;
  }
  
  .gt-gradient-text {
    color: #16a34a !important;
    background: none !important;
    -webkit-text-fill-color: #16a34a !important;
  }
  
  .gt-btn-primary,
  .gt-btn-secondary {
    display: none !important;
  }
  
  .gt-sidebar-card {
    display: none !important;
  }
  
  /* Ensure tables print properly */
  .gt-table-container {
    overflow: visible !important;
    border: 1px solid #000 !important;
  }
  
  .gt-table {
    min-width: 100% !important;
    page-break-inside: avoid;
  }
  
  .gt-table th {
    background: #ddd !important;
    color: #000 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  
  /* FIX: Ensure table headers print in black */
  .gt-table tbody th {
    color: #000 !important;
    background: #eee !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}