/* Krishikotha - Smart Agro Digital Portal */
:root {
  --upwork-green: #14a800;
  --upwork-green-dark: #0f7c00;
  --upwork-green-light: #e8f7e6;
  --text-dark: #001e00;
  --text-muted: #5e6d55;
  --bg-light: #f9fbf9;
  --bg-white: #ffffff;
  --border-color: #e4ebe4;
  --shadow-sm: 0 2px 8px rgba(20, 168, 0, 0.06);
  --shadow-md: 0 8px 24px rgba(0, 30, 0, 0.08);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --danger-red: #d9534f;
}

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

body {
  font-family: 'Hind Siliguri', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  background: var(--bg-white);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--upwork-green);
  font-weight: 700;
  font-size: 24px;
  flex-shrink: 0;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: var(--upwork-green);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  overflow: hidden;
  flex-shrink: 0;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nav-menu {
  display: flex;
  gap: 6px;
  list-style: none;
  flex-wrap: wrap;
}

.nav-link {
  padding: 6px 14px;
  text-decoration: none;
  color: var(--text-dark);
  font-size: 15px;
  font-weight: 500;
  border-radius: 20px;
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover, .nav-link.active {
  background: var(--upwork-green-light);
  color: var(--upwork-green);
}

.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.header-cta {
  background: var(--upwork-green);
  color: white;
  padding: 8px 18px;
  border-radius: 24px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  display: inline-block;
}

.header-cta:hover {
  background: var(--upwork-green-dark);
  box-shadow: 0 4px 12px rgba(20, 168, 0, 0.25);
}

.admin-btn {
  background: #000;
  color: white;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.hero {
  background: linear-gradient(135deg, var(--upwork-green-light) 0%, var(--bg-white) 100%);
  padding: 50px 24px;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.hero-container { max-width: 800px; margin: 0 auto; }

.hero-badge {
  display: inline-block;
  background: var(--bg-white);
  color: var(--upwork-green);
  border: 1px solid var(--upwork-green);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: 38px;
  line-height: 1.25;
  font-weight: 700;
  margin-bottom: 16px;
  color: var(--text-dark);
}

.hero p {
  font-size: 16px;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.filter-wrapper {
  max-width: 1200px;
  margin: -28px auto 40px;
  padding: 0 24px;
  position: relative;
  z-index: 10;
}

.filter-card {
  background: var(--bg-white);
  border-radius: 16px;
  padding: 18px 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.search-input-box {
  flex-grow: 1;
  position: relative;
  min-width: 250px;
}

.search-input-box input {
  width: 100%;
  padding: 12px 18px;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  font-size: 15px;
  outline: none;
  font-family: inherit;
  transition: var(--transition);
}

.search-input-box input:focus {
  border-color: var(--upwork-green);
  box-shadow: 0 0 0 3px rgba(20, 168, 0, 0.12);
}

.category-pills { display: flex; gap: 8px; flex-wrap: wrap; }

.pill-btn {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  color: var(--text-dark);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
  text-decoration: none;
  display: inline-block;
}

.pill-btn.active, .pill-btn:hover {
  background: var(--upwork-green);
  color: white;
  border-color: var(--upwork-green);
}

.widgets-section {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.feature-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.feature-card h3 {
  font-size: 20px;
  color: var(--upwork-green-dark);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.calc-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calc-row {
  display: flex;
  gap: 10px;
}

.calc-result {
  margin-top: 10px;
  padding: 12px;
  background: var(--upwork-green-light);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
}

.market-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.market-table td, .market-table th {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-color);
  text-align: left;
}

.price-up { color: var(--upwork-green); font-weight: 600; }
.price-down { color: var(--danger-red); font-weight: 600; }

.weather-box {
  background: linear-gradient(135deg, #e3f2fd 0%, #ffffff 100%);
  border: 1px solid #bbdefb;
  border-radius: 12px;
  padding: 16px;
}

.blog-container {
  max-width: 1200px;
  margin: 0 auto 60px;
  padding: 0 24px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.blog-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
  text-decoration: none;
  color: inherit;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--upwork-green);
}

.card-banner {
  height: 160px;
  background: var(--upwork-green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
  overflow: hidden;
}

.card-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--upwork-green);
  color: white;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 12px;
  z-index: 2;
}

.card-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 8px; }

.card-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 10px;
  line-height: 1.4;
}

.card-excerpt {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex-grow: 1;
}

.card-footer-link {
  color: var(--upwork-green);
  font-weight: 600;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.ad-section {
  max-width: 1200px;
  margin: 20px auto 60px;
  padding: 0 24px;
}

.ad-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.ad-header h2 { font-size: 26px; color: var(--text-dark); }

.ad-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.ad-card {
  background: var(--bg-white);
  border: 2px dashed var(--upwork-green);
  border-radius: 16px;
  padding: 24px;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: var(--transition);
}

.ad-card:hover {
  box-shadow: var(--shadow-md);
  background: var(--upwork-green-light);
}

.ad-tag {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 11px;
  background: var(--upwork-green-light);
  color: var(--upwork-green-dark);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.ad-img { font-size: 44px; text-align: center; margin-bottom: 12px; }
.ad-title { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.ad-price { font-size: 20px; font-weight: 700; color: var(--upwork-green); margin-bottom: 12px; }

.ad-btn {
  margin-top: auto;
  background: var(--upwork-green);
  color: white;
  border: none;
  padding: 10px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: block;
}

.video-section {
  background: var(--bg-white);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  padding: 60px 24px;
  margin-bottom: 60px;
}

.video-container-box { max-width: 1200px; margin: 0 auto; }

.video-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 32px;
  margin-top: 24px;
}

.video-player-frame {
  width: 100%;
  height: 400px;
  border-radius: 16px;
  border: none;
  box-shadow: var(--shadow-md);
}

.video-playlist { display: flex; flex-direction: column; gap: 16px; }

.playlist-item {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 14px;
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: var(--transition);
}

.playlist-item.active, .playlist-item:hover {
  border-color: var(--upwork-green);
  background: var(--upwork-green-light);
}

.playlist-icon { font-size: 24px; }
.playlist-info h4 { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.playlist-info p { font-size: 12px; color: var(--text-muted); }

.page-content-wrapper {
  max-width: 1000px;
  margin: 40px auto 80px;
  padding: 0 24px;
}

.section-header { text-align: center; margin-bottom: 40px; }
.section-header h2 { font-size: 32px; color: var(--text-dark); margin-bottom: 12px; }
.section-header p { font-size: 16px; color: var(--text-muted); max-width: 600px; margin: 0 auto; }

.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.info-card {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px;
  text-align: center;
  transition: var(--transition);
}

.info-card:hover { border-color: var(--upwork-green); box-shadow: var(--shadow-sm); }
.info-icon { font-size: 36px; margin-bottom: 14px; }
.info-card h3 { font-size: 20px; margin-bottom: 10px; }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service-box {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 28px;
  transition: var(--transition);
}

.service-box:hover { border-color: var(--upwork-green); background: var(--upwork-green-light); }
.service-box h3 { font-size: 20px; color: var(--upwork-green); margin-bottom: 12px; }

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 36px;
  box-shadow: var(--shadow-sm);
}

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }

.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.form-group input:focus, .form-group textarea:focus, .form-group select:focus {
  border-color: var(--upwork-green);
  box-shadow: 0 0 0 3px rgba(20, 168, 0, 0.12);
}

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 30, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  padding: 20px;
}

.modal-overlay.active { opacity: 1; pointer-events: all; }

.modal-content {
  background: var(--bg-white);
  width: 100%;
  max-width: 850px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 20px;
  padding: 32px;
  position: relative;
  box-shadow: var(--shadow-md);
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover { background: var(--upwork-green); color: white; }

.editor-container {
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-white);
}

.editor-toolbar {
  background: var(--bg-light);
  border-bottom: 1px solid var(--border-color);
  padding: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.editor-btn {
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.editor-btn:hover {
  background: var(--upwork-green-light);
  color: var(--upwork-green);
  border-color: var(--upwork-green);
}

.editor-content {
  min-height: 220px;
  padding: 14px;
  outline: none;
  font-family: inherit;
  font-size: 15px;
  line-height: 1.7;
}

.editor-content p { margin-bottom: 12px; }
.editor-content h3 { font-size: 18px; margin: 16px 0 8px; color: var(--upwork-green-dark); }
.editor-content ul, .editor-content ol { margin-left: 20px; margin-bottom: 12px; }

.admin-tab-nav {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.admin-tab-btn {
  padding: 8px 16px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-light);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
}

.admin-tab-btn.active {
  background: var(--upwork-green);
  color: white;
  border-color: var(--upwork-green);
}

.admin-tab-content { display: none; }
.admin-tab-content.active { display: block; }

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

.admin-list-table th, .admin-list-table td {
  border: 1px solid var(--border-color);
  padding: 10px 12px;
  text-align: left;
  font-size: 14px;
}

.admin-list-table th {
  background: var(--bg-light);
  font-weight: 600;
}

.btn-action-small {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  color: white;
  margin-right: 4px;
  text-decoration: none;
  display: inline-block;
}

.btn-edit { background: #0275d8; }
.btn-delete { background: var(--danger-red); }

.theme-preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.theme-chip {
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: var(--transition);
  background: var(--bg-light);
}

.theme-chip.active, .theme-chip:hover {
  border-color: var(--upwork-green);
  background: var(--upwork-green-light);
}

.theme-color-preview {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  margin: 0 auto 6px;
  border: 1px solid rgba(0,0,0,0.1);
}

.stats-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}

.stat-card h4 { font-size: 26px; color: var(--upwork-green); }
.stat-card p { font-size: 12px; color: var(--text-muted); font-weight: 600; }

.guide-box {
  background: #f0fdf4;
  border: 1px dashed var(--upwork-green);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--text-dark);
}

.guide-box ul {
  margin-left: 20px;
  margin-top: 6px;
}

footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border-color);
  padding: 30px 24px;
  margin-top: auto;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-text { color: var(--text-muted); font-size: 14px; }

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
  margin-bottom: 40px;
}

.pagination a, .pagination span {
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--text-dark);
  font-weight: 500;
}

.pagination a:hover, .pagination span.current {
  background: var(--upwork-green);
  color: white;
  border-color: var(--upwork-green);
}

.blog-post-single {
  max-width: 900px;
  margin: 40px auto 80px;
  padding: 0 24px;
}

.blog-post-single .post-header {
  margin-bottom: 32px;
}

.blog-post-single .post-header h1 {
  font-size: 32px;
  line-height: 1.3;
  margin-bottom: 16px;
  color: var(--text-dark);
}

.blog-post-single .post-meta {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.blog-post-single .post-thumbnail {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 32px;
}

.blog-post-single .post-content {
  line-height: 1.8;
  font-size: 16px;
}

.blog-post-single .post-content h3 {
  font-size: 22px;
  color: var(--upwork-green-dark);
  margin: 28px 0 12px;
}

.blog-post-single .post-content p {
  margin-bottom: 16px;
}

.blog-post-single .post-content ul, .blog-post-single .post-content ol {
  margin-left: 24px;
  margin-bottom: 16px;
}

.breadcrumb {
  max-width: 1200px;
  margin: 20px auto 0;
  padding: 0 24px;
  font-size: 14px;
  color: var(--text-muted);
}

.breadcrumb a {
  color: var(--upwork-green);
  text-decoration: none;
}

.alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  font-size: 14px;
}

.alert-success { background: var(--upwork-green-light); color: var(--upwork-green-dark); border: 1px solid var(--upwork-green); }
.alert-error { background: #fde8e8; color: var(--danger-red); border: 1px solid var(--danger-red); }

.admin-login-box {
  max-width: 400px;
  margin: 80px auto;
  background: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 36px;
  box-shadow: var(--shadow-md);
}

.admin-login-box h2 {
  text-align: center;
  margin-bottom: 24px;
  color: var(--text-dark);
}

@media print {
  header, footer, .no-print { display: none !important; }
  .blog-post-single { max-width: 100%; margin: 0; }
}

@media (max-width: 900px) {
  .nav-container { justify-content: center; text-align: center; }
  .hero h1 { font-size: 30px; }
  .contact-container { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; }
  .blog-post-single .post-header h1 { font-size: 24px; }
}
/* Rich Text Editor Styling */
.rte-toolbar {
  background: #f8f9fa;
  border: 1px solid #ccc;
  border-bottom: none;
  border-radius: 8px 8px 0 0;
  padding: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.rte-toolbar select, 
.rte-toolbar button, 
.rte-toolbar input[type="color"] {
  padding: 6px 10px;
  font-size: 13px;
  border: 1px solid #bbb;
  border-radius: 4px;
  background: #ffffff;
  cursor: pointer;
}
.rte-editor {
  border: 1px solid #ccc;
  border-radius: 0 0 8px 8px;
  min-height: 300px;
  padding: 15px;
  background: #ffffff;
  outline: none;
  overflow-y: auto;
}