/* ===================================
   AGRIMARKET - MAIN STYLESHEET
   Pure CSS with Bootstrap Integration
   =================================== */

/* Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #fff;
  color: #333;
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 76px;
}

/* ===================================
   NAVBAR STYLES
   =================================== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  width: 100%;
  padding: 0.75rem 0;
  background-color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.navbar-brand {
  font-size: 1.5rem;
  transition: transform 0.3s ease;
}

.navbar-brand:hover {
  transform: scale(1.05);
}

.navbar-nav {
  gap: 0.25rem;
}

.nav-link {
  color: #495057 !important;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link:hover {
  color: #198754 !important;
  background-color: #f8f9fa;
}

.nav-link.active {
  color: #198754 !important;
  background-color: #e7f5ec;
}

.navbar-toggler {
  padding: 0.5rem;
  border: none;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
  outline: none;
}

/* ===================================
   BUTTONS
   =================================== */
.btn {
  font-weight: 600;
  padding: 0.5rem 1.5rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
}

.btn-success {
  background-color: #198754;
  border-color: #198754;
  box-shadow: 0 2px 4px rgba(25, 135, 84, 0.2);
}

.btn-success:hover {
  background-color: #157347;
  border-color: #146c43;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(25, 135, 84, 0.3);
}

.rounded-pill {
  border-radius: 50rem !important;
}

/* ===================================
   HERO SECTIONS
   =================================== */
.hero {
  background: linear-gradient(rgba(25, 135, 84, 0.7), rgba(25, 135, 84, 0.7)),
    url('https://images.unsplash.com/photo-1599824574373-5d5a6c67a6a9?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  height: 55vh;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-hero {
  background: linear-gradient(rgba(25, 135, 84, 0.8), rgba(25, 135, 84, 0.8)),
    url('https://images.unsplash.com/photo-1600481176431-47c2b9e6578f?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  height: 45vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.market-hero {
  background: linear-gradient(rgba(25, 135, 84, 0.8), rgba(25, 135, 84, 0.8)),
    url('https://images.unsplash.com/photo-1613169250823-8c4aafbf92e3?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.farmers-hero {
  background: linear-gradient(rgba(25, 135, 84, 0.8), rgba(25, 135, 84, 0.8)),
    url('https://images.unsplash.com/photo-1534224039826-c7a0eda0e6b2?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-hero {
  background: linear-gradient(rgba(25, 135, 84, 0.8), rgba(25, 135, 84, 0.8)),
    url('https://images.unsplash.com/photo-1423666639041-f56000c27a9a?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-section,
.register-section {
  min-height: calc(100vh - 200px);
  background: linear-gradient(rgba(25, 135, 84, 0.7), rgba(25, 135, 84, 0.7)),
    url('https://images.unsplash.com/photo-1600790215884-47e6f572b4e2?auto=format&fit=crop&w=1600&q=80') center/cover no-repeat;
  padding: 40px 0;
  display: flex;
  align-items: center;
}

/* ===================================
   CARDS
   =================================== */
.card {
  border: none;
  border-radius: 0.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.card-img-top {
  height: 200px;
  object-fit: cover;
  width: 100%;
}

.step {
  transition: transform 0.3s ease;
}

.step:hover {
  transform: translateY(-5px);
}

/* ===================================
   TABLES
   =================================== */
.table {
  font-size: 0.95rem;
}

.table thead th {
  background-color: #f8f9fa;
  font-weight: 600;
  border-bottom: 2px solid #dee2e6;
}

.table-hover tbody tr:hover {
  background-color: #f8f9fa;
}

/* ===================================
   FORMS
   =================================== */
.form-control,
.form-select {
  border-radius: 0.375rem;
  border: 1px solid #ced4da;
  padding: 0.625rem 0.75rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus,
.form-select:focus {
  border-color: #198754;
  box-shadow: 0 0 0 0.25rem rgba(25, 135, 84, 0.25);
}

form label {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

/* ===================================
   CONTACT PAGE
   =================================== */
.icon-box {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-info h6 {
  color: #198754;
  margin-bottom: 0.25rem;
}

.contact-info p {
  color: #6c757d;
  font-size: 0.95rem;
}

/* Contact Cards */
.contact-info .card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contact-info .card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

.contact-info .card-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* ===================================
   ACCORDION
   =================================== */
.accordion-button:not(.collapsed) {
  background-color: #e7f5ec;
  color: #198754;
}

.accordion-button:focus {
  box-shadow: none;
  border-color: #198754;
}

/* ===================================
   FOOTER
   =================================== */
footer {
  background-color: #198754;
  font-size: 0.9rem;
  margin-top: auto;
}

/* ===================================
   RESPONSIVE DESIGN
   =================================== */

/* Mobile Devices (< 576px) */
@media (max-width: 575.98px) {
  body {
    padding-top: 70px;
  }

  .navbar-brand {
    font-size: 1.25rem;
  }

  .navbar-nav {
    padding: 1rem 0;
    text-align: center;
  }

  .nav-link {
    padding: 0.75rem 1rem !important;
    margin: 0.25rem 0;
  }

  .nav-item .btn {
    width: 100%;
    margin-top: 0.5rem;
  }

  .hero {
    height: 50vh;
  }

  .hero h1 {
    font-size: 1.75rem !important;
  }

  .hero .lead {
    font-size: 1rem;
  }

  .about-hero,
  .market-hero,
  .farmers-hero,
  .contact-hero {
    height: 35vh;
  }

  .about-hero h1,
  .market-hero h1,
  .farmers-hero h1,
  .contact-hero h1 {
    font-size: 1.5rem !important;
  }

  h1 {
    font-size: 1.75rem;
  }

  h2 {
    font-size: 1.5rem;
  }

  h3 {
    font-size: 1.25rem;
  }

  .card-img-top {
    height: 180px;
  }

  .table {
    font-size: 0.85rem;
  }

  .icon-box {
    width: 45px;
    height: 45px;
  }

  .py-5 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  /* Contact Cards on Mobile */
  .contact-info .card {
    min-height: 160px;
  }

  .contact-info .card-body {
    padding: 1rem !important;
  }

  .contact-info .card-body p {
    font-size: 0.8rem !important;
    line-height: 1.4;
  }

  .contact-info .card-body h6 {
    font-size: 0.85rem !important;
  }
}

/* Tablets (576px - 768px) */
@media (min-width: 576px) and (max-width: 767.98px) {
  .hero {
    height: 55vh;
  }

  .hero h1 {
    font-size: 2rem !important;
  }

  .navbar-nav {
    padding: 1rem 0;
  }

  .nav-item .btn {
    margin-top: 0.5rem;
  }
}

/* Medium Devices (768px - 992px) */
@media (min-width: 768px) and (max-width: 991.98px) {
  .hero h1 {
    font-size: 2.25rem !important;
  }

  .container {
    max-width: 720px;
  }
}

/* Large Devices (992px - 1200px) */
@media (min-width: 992px) and (max-width: 1199.98px) {
  .container {
    max-width: 960px;
  }
}

/* Extra Large Devices (≥ 1200px) */
@media (min-width: 1200px) {
  .container {
    max-width: 1140px;
  }

  .hero h1 {
    font-size: 3rem !important;
  }
}

/* Landscape Orientation */
@media (max-width: 768px) and (orientation: landscape) {
  .hero,
  .about-hero,
  .market-hero,
  .farmers-hero,
  .contact-hero {
    height: 80vh;
  }
}

/* ===================================
   UTILITY CLASSES
   =================================== */
.shadow-sm {
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.text-success {
  color: #198754 !important;
}

.bg-success {
  background-color: #198754 !important;
}

.bg-light {
  background-color: #f8f9fa !important;
}

/* ===================================
   ACCESSIBILITY
   =================================== */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus Styles */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #198754;
  outline-offset: 2px;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Print Styles */
@media print {
  .navbar,
  footer,
  .btn {
    display: none;
  }

  body {
    padding-top: 0;
  }
}
