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

html, body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  font-family: 'Segoe UI', sans-serif;
}

/* ===============================
   HERO SECTION
================================ */
.hero {
  background: linear-gradient(rgba(0,100,0,0.6), rgba(0,100,0,0.6)),
              url('../images/farm.jpg') center/cover no-repeat;
  color: #ffffff;
  padding: 100px 20px;
  text-align: center;
}

.hero h1 {
  font-size: clamp(26px, 5vw, 42px);
  margin-bottom: 15px;
}

.hero p {
  font-size: clamp(14px, 3.5vw, 18px);
  max-width: 700px;
  margin: auto;
}

/* ===============================
   SECTION TITLES
================================ */
.section-title {
  color: #198754;
  font-weight: bold;
  margin-bottom: 20px;
  text-align: center;
}

/* ===============================
   GENERAL CONTENT
================================ */
section {
  padding: 60px 20px;
  width: 100%;
}

p {
  line-height: 1.6;
  font-size: 1rem;
}

/* ===============================
   NAVIGATION
================================ */
nav {
  width: 100%;
}

.navbar,
.navbar .container {
  max-width: 100%;
}

.navbar-collapse {
  width: 100%;
}

/* ===============================
   FOOTER (WEB)
================================ */
footer {
  background: #6f6f6f;
  color: #ffffff;
  padding: 40px 20px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.footer-container > div {
  flex: 1 1 100%;
}

@media (min-width: 768px) {
  .footer-container > div {
    flex: 1 1 25%;
  }
}

/* ===============================
   FOOTER SOCIAL ICONS
================================ */
.footer-social i {
  color: #ffffff;
  font-size: 18px;
  margin-right: 10px;
  transition: 0.3s ease;
}

.footer-social i:hover {
  color: #F2B806;
}

/* ===============================
   MOBILE RESPONSIVE
================================ */
@media (max-width: 768px) {
  .hero {
    padding: 70px 15px;
  }

  h1 { font-size: 1.8rem; }
  h2 { font-size: 1.5rem; }
  p  { font-size: 0.95rem; }

  nav ul {
    flex-direction: column;
    width: 100%;
  }

  nav ul li {
    width: 100%;
    text-align: center;
  }
}

/* ===============================
   UI ELEMENTS
================================ */
.navbar-brand img { object-fit: contain; }

.card-box{
  border-radius:10px;
  padding:25px;
  text-align:center;
  background:#fff;
  box-shadow:0 4px 12px rgba(0,0,0,.06);
}

.topbar{
  background:#1b5e20;
  color:white;
  padding:15px 25px;
}

/* ===============================
   WATERMARK
================================ */
.watermark {
    position: fixed;
    top: 40%;
    left: 10%;
    font-size: 80px;
    transform: rotate(-30deg);
    font-weight: bold;
    color: rgba(0,150,0,0.15);
}

/* ===============================
   INVOICE ELEMENTS
================================ */
body { font-family: DejaVu Sans, sans-serif; }

.logo-wrapper { text-align: center; margin-bottom: 10px; }
.logo { width: 220px; }

.company-info { text-align: center; margin-bottom: 20px; }

table {
  width:100%;
  border-collapse: collapse;
  margin-top:10px;
}

th, td {
  border:1px solid #ccc;
  padding:8px;
}

th { background:#f5f5f5; }

.stamp {
  position: fixed;
  top: 55%;
  right: 10%;
  width: 160px;
  opacity: 0.25;
}

.qr {
  position: fixed;
  bottom: 40px;
  left: 40px;
  width: 110px;
}

.signature { width: 160px; margin-top: 30px; }
.signature-box { margin-top: 40px; text-align: right; }

/* ===============================
   ✅ DOMPDF PAGE + FOOTER FIX
================================ */

/* PAGE MARGINS (SPACE FOR FOOTER) */
@page {
  margin: 40px 40px 100px 40px;
}

/* FIXED FOOTER INSIDE PAGE */
.footer {
  position: fixed;
  bottom: 20px;          /* 🔥 MUST be positive */
  left: 0;
  right: 0;
  height: 60px;
  text-align: center;
  font-size: 10px;
  color: #666;
  border-top: 1px solid #ddd;
  padding-top: 6px;
}

/* PAGE COUNTER (DOMPDF SUPPORTED) */
.footer .page-number::after {
  content: "Page " counter(page) " of " counter(pages);
}
