/* ================================
   Sentinel Agro Labs — styles-v2.css (STABLE SINGLE SYSTEM)
   Goals:
   - One layout system (no conflicting height hacks)
   - Footer always at bottom
   - No horizontal scroll
   - No tiny vertical “mystery” scroll
================================ */

/* ===== Global reset ===== */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  width: 100%;
  margin: 0;
  padding: 0;
}

/* Smooth scrolling (single source) */
html { scroll-behavior: smooth; }

/* Prevent sideways scroll from any accidental width overflow */
body { overflow-x: hidden; }

/* Prevent long text/URLs from forcing width */
body, .page-wrapper, .main-blocks, .simple-section, .dept-box, .tech-card, .contact-card {
  overflow-wrap: anywhere;
}

/* Images never exceed container (prevents sideways scroll) */
img { max-width: 100%; display: block; }

/* ===== Page layout (footer pinned) ===== */
body{
  font-family: Arial, Helvetica, sans-serif;
  background: radial-gradient(circle at top, #0b1a2a, #000);
  color: #d6e6f2;
  line-height: 1.65;

  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Main grows to push footer down */
.site-main{
  flex: 1;
  display: flex;            /* key: allows inner sections to stretch */
  flex-direction: column;
}

/* Optional: if sticky header covers anchor jumps, uncomment:
:root { scroll-padding-top: 80px; }
*/

/* ===== Top nav (Sticky) ===== */
.top-nav{
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.10);
}

/* ===== Brand (Logo) — single source of truth ===== */
.top-nav .brand{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  padding: 6px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);

  flex: 0 0 auto;
  white-space: nowrap;
  text-decoration: none;
}

.top-nav .brand img{
  height: 44px;     /* desktop logo height */
  width: auto;
  display: block;
  object-fit: contain;
}

@media (max-width: 820px){
  .top-nav .brand img{
    height: 38px;   /* mobile logo height */
  }
}


/* Link pills (nav + future reuse) */
.nav-links a{
  color: #d6e6f2;
  text-decoration: none;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-links a:hover{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.18);
  transform: translateY(-1px);
}
.nav-links a.active{
  background: rgba(0, 255, 255, 0.18);
  border-color: rgba(0, 255, 255, 0.28);
  color: #ffffff;
}

/* ===== Mobile menu (details) ===== */
.nav-toggle{ position: relative; }

.nav-toggle summary{
  list-style: none;
  cursor: pointer;
  width: 44px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-toggle summary::-webkit-details-marker{ display: none; }
.nav-toggle summary::before{
  content: "☰";
  font-size: 18px;
  color: #d6e6f2;
  line-height: 1;
}

/* Responsive nav rules */
@media (max-width: 820px){
  .nav-links-desktop { display: none; }
  .nav-toggle { display: block; }
  .nav-links-mobile { display: none; }

  .nav-toggle[open] .nav-links-mobile{
    display: flex;
    flex-direction: column;
    gap: 10px;

    position: absolute;
    right: 0;
    top: 54px;

    padding: 12px;
    width: min(260px, 90vw);
    border-radius: 16px;

    background: rgba(0,0,0,0.92);
    border: 1px solid rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .nav-toggle[open] .nav-links-mobile a{ text-align: center; }
}

@media (min-width: 821px){
  .nav-links-desktop { display: flex; gap: 12px; align-items: center; }
  .nav-toggle { display: none; }
}

/* ===== Home background =====
   IMPORTANT: flex:1 makes it fill the available space in .site-main,
   so you don't get a dark gap above the footer on tall screens.
*/
.home-background{
  background-image: url("images/home-hero.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  width: 100%;
  display: flex;
  flex-direction: column;

  flex: 1;
  padding-bottom: 0; /* remove vh “gap hack” */
}

/* ===== Hero ===== */
.hero{
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay{
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  background: rgba(5, 8, 15, 0.12);
  text-align: center;

  padding: 44px 20px 28px;
}

.hero-overlay h1{
  font-size: 3rem;
  color: #9fd4ff;
  margin: 0 0 12px 0;
}

.hero-overlay p{
  margin: 0;
  text-shadow: 0 6px 22px rgba(0, 0, 0, 0.55);
}

.tagline{ font-size: 1.2rem; opacity: 0.9; margin-top: 6px; }
.subtitle{ margin-top: 4px; opacity: 0.75; }

/* Buttons */
.hero-actions{
  margin-top: 16px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.hero-btn{
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: #d6e6f2;
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.15s ease;
}

.hero-btn:hover{
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.20);
  transform: translateY(-1px);
}

.hero-btn.primary{
  background: linear-gradient(135deg, #3b82f6, #22c55e);
  border-color: rgba(0, 255, 255, 0.26);
  color: #ffffff;
}

.hero-btn.ghost{
  background: transparent;
  border-color: rgba(255,255,255,0.12);
  opacity: 0.9;
}

/* ===== Main blocks (Home) ===== */
.main-blocks{
  max-width: 1200px;
  margin: 0 auto;
  padding: 10px 22px 24px;  /* small bottom breathing room */
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.main-blocks section{
  background: rgba(10, 14, 20, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 18px;
  padding: 22px 22px 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  min-width: 0;
}

.main-blocks h2{
  color: #9fd4ff;
  margin: 0 0 10px 0;
}

.main-blocks ul{
  padding-left: 18px;
  margin: 0;
}

/* Ethics link styling */
.ethics-preview a{
  color: #cfe9ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(207,233,255,0.35);
  padding-bottom: 1px;
}
.ethics-preview a:hover{
  color: #ffffff;
  border-bottom-color: rgba(255,255,255,0.75);
}

/* Mobile Layout Adjustment */
@media (max-width: 768px){
  .main-blocks{
    grid-template-columns: 1fr;
    gap: 15px;
    padding: 10px 15px 18px;
  }
  .main-blocks section{ padding: 18px; }
}

/* ===== Inner pages wrapper ===== */
.page-wrapper{
  max-width: 1200px;
  margin: 0 auto;
  padding: 56px 24px 60px;
}

.page-title{
  text-align: center;
  font-size: 2.4rem;
  color: #9fd4ff;
  margin: 0 0 50px 0;
}

/* ===== Shared card section (Technology/Ethics/Privacy/Terms) ===== */
.simple-section{
  max-width: 900px;
  margin: 0 auto 48px;
  background: linear-gradient(160deg, #0f2138, #091321);
  border-radius: 20px;
  padding: 32px 32px 28px;
  box-shadow: 0 14px 40px rgba(0,0,0,0.5);
  border: 1px solid rgba(255,255,255,0.06);
}
.simple-section h2{ color: #9fd4ff; margin: 18px 0 10px; }
.simple-section p{ margin: 0 0 10px 0; }
.simple-section ul{ margin: 0; padding-left: 18px; }

/* ===== Departments ===== */
.dept-rows{ display: flex; flex-direction: column; gap: 36px; }

.dept-row{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: stretch;
}

.dept-box{
  background: linear-gradient(160deg, #0f2138, #091321);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.45);
  min-height: 220px;
  display: flex;
  align-items: center;
  border: 1px solid rgba(255,255,255,0.06);
}

.dept-image-box img{
  width: 100%;
  height: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 14px;
}

.dept-text-box{
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.dept-text-box h2{
  margin: 0 0 12px 0;
  font-size: 1.6rem;
  color: #9fd4ff;
}

.dept-text-box p{
  margin: 0;
  font-size: 1rem;
  opacity: 0.9;
  max-width: 520px;
}

@media (max-width: 900px){
  .dept-row{ grid-template-columns: 1fr; }
}

/* ===== Technology grid ===== */
.tech-grid{
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 8px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}

.tech-card{
  background: #050915;
  border-radius: 18px;
  padding: 22px 22px 20px;
  border: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 8px 22px rgba(0,0,0,0.45);
  min-width: 0;
}

.tech-card h3{ color: #9fd4ff; margin: 0 0 8px 0; font-size: 1.2rem; }
.tech-card ul{ padding-left: 18px; font-size: 0.95rem; opacity: 0.9; margin: 0; }

/* ===== Contact page cards ===== */
.page-hero{ padding: 60px 6% 10px; text-align: center; }
.page-hero.small-hero{ padding-bottom: 0; }

.contact-section{ padding: 40px 6% 30px; }

.contact-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
  max-width: 1100px;
  margin: 0 auto;
}

.contact-card{
  background: linear-gradient(160deg, #0f2138, #091321);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.04);
  text-align: left;
}

.contact-card h3{ font-size: 1.2rem; margin: 0 0 6px 0; color: #cfe9ff; }
.contact-label{ font-size: 0.9rem; opacity: 0.7; margin: 0 0 8px 0; }
.contact-email{ font-size: 0.95rem; font-weight: 500; margin: 0; }

/* =========================
   Contact Form (SAL) — single block (no duplicates)
========================= */
.contact-form-section{
  padding: 48px 16px 64px;
  display: flex;
  justify-content: center;
  background: #050812;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.form-card{
  width: 100%;
  max-width: 760px;
  background: rgba(10, 20, 35, 0.70);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  padding: 28px 26px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.45);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.form-card h2{
  margin: 0 0 8px;
  font-size: 28px;
  letter-spacing: 0.2px;
}

.form-note{
  margin: 0 0 18px;
  opacity: 0.85;
  font-size: 14px;
  line-height: 1.4;
}

.sal-form{ display: grid; gap: 14px; }

.form-row label{
  display: block;
  margin: 0 0 6px;
  font-size: 14px;
  opacity: 0.9;
}

.sal-form input,
.sal-form textarea,
.sal-form select{
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(6, 10, 18, 0.60);
  color: #e8f0ff;
  padding: 12px 14px;
  outline: none;
  transition: border-color 120ms ease, transform 120ms ease, background 120ms ease;
}

.sal-form textarea{
  resize: vertical;
  min-height: 140px;
}

.sal-form select{
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(232,240,255,0.65) 50%),
    linear-gradient(135deg, rgba(232,240,255,0.65) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 34px;
}

.sal-form input:focus,
.sal-form textarea:focus,
.sal-form select:focus{
  border-color: rgba(0, 200, 190, 0.55);
  background: rgba(6, 10, 18, 0.70);
  outline: 2px solid rgba(159, 212, 255, 0.20);
  outline-offset: 2px;
}

.form-actions{
  display: grid;
  gap: 10px;
  margin-top: 4px;
}

.sal-btn{
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 12px 16px;
  font-weight: 600;
  cursor: pointer;
  background: rgba(0, 180, 170, 0.22);
  color: #e8f0ff;
  border: 1px solid rgba(0, 220, 210, 0.25);
  transition: transform 120ms ease, background 120ms ease, opacity 120ms ease;
}
.sal-btn:hover{
  transform: translateY(-1px);
  background: rgba(0, 180, 170, 0.30);
}
.sal-btn:disabled{
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.form-help{
  font-size: 12px;
  opacity: 0.75;
}

/* Honeypot (single definition) */
.hp-field{
  position: absolute !important;
  left: -10000px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
}
.hp-field label{ display: none !important; }

/* ===== Footer ===== */
.footer{
  width: 100%;
  background: rgba(0,0,0,0.70);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding: 10px 18px;
  font-size: 0.82rem;
  line-height: 1.35;
}

.footer-inner{
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.footer-meta{ opacity: 0.85; line-height: 1.5; text-align: left; }

.footer-email{
  color: #cfe9ff;
  text-decoration: none;
  border-bottom: 1px solid rgba(207,233,255,0.35);
  padding-bottom: 1px;
}
.footer-email:hover{
  color: #ffffff;
  border-bottom-color: rgba(255,255,255,0.75);
}

.footer-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  color: #cfe9ff;
  background: rgba(10, 14, 20, 0.45);
  border: 1px solid rgba(255,255,255,0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.footer-link:hover{
  transform: translateY(-1px);
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.22);
  color: #ffffff;
}

/* ===== “Coming Soon” block aligned with contact form ===== */
.future-links{
  max-width: 600px;
  margin: 24px auto 24px;
  padding: 0 0 24px;
  text-align: left;
  font-size: 0.9rem;
  opacity: 0.9;
}
.future-links h2{ margin-bottom: 8px; color: #cfe9ff; }
.future-links ul{ list-style: disc; padding-left: 20px; margin: 0; }
.future-links li{ margin-bottom: 4px; opacity: 0.8; }

/* ===== Mobile tuning ===== */
@media (max-width: 700px){
  .hero-overlay h1 { font-size: 2.15rem; line-height: 1.15; }
  .tagline { font-size: 1.05rem; }
  .hero-btn { width: min(320px, 100%); }
  .main-blocks { padding: 10px 16px 18px; gap: 18px; }
}

@media (max-width: 600px){
  .footer-inner{ flex-direction: column; align-items: center; text-align: center; }
  .footer-meta{ text-align: center; }
  .footer-link{ width: 100%; }
}

/* ===== Ethics page tuning (optional) ===== */
body.ethics-page .page-wrapper{
  max-width: 1100px;
  padding: 40px 20px 28px;
}

body.ethics-page .page-title{
  font-size: 2.1rem;
  margin: 0 0 28px 0;
}

body.ethics-page .simple-section,
body.ethics-page .ethics-section{
  max-width: 980px;
  margin: 0 auto 20px;
  padding: 22px 30px 20px;
  box-shadow: 0 14px 30px rgba(0,0,0,0.5);
}

body.ethics-page .simple-section h2,
body.ethics-page .ethics-section h2{
  margin: 18px 0 10px;
  font-size: 1.4rem;
}

body.ethics-page .simple-section p,
body.ethics-page .ethics-section p{
  margin: 0 0 10px 0;
  font-size: 0.96rem;
}

body.ethics-page .simple-section ul,
body.ethics-page .ethics-section ul{
  margin: 0 0 6px 20px;
}
/* DEBUG FORCE: navbar logo size */
.top-nav a.brand img{
  height: 44px !important;
  width: auto !important;
  max-width: 280px !important;
}
/* ===== NAV LOGO OVERRIDE (put at bottom) ===== */
.top-nav .brand{
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
}

.top-nav .brand img,
.top-nav .brand-logo{
  height: 56px !important;       /* try 56; if still small, go 64 */
  width: auto !important;
  max-width: 240px !important;   /* prevents stretching too wide */
  display: block !important;
}
@media (max-width: 820px){
  .top-nav .brand img,
  .top-nav .brand-logo{
    height: 46px !important;
    max-width: 200px !important;
  }
}
/* === Tech page: force mobile stacking on phones (even if layout viewport is “desktop”) === */
@media (max-width: 820px), (hover: none) and (pointer: coarse){
  .page-wrapper{
    padding: 32px 16px 40px;
  }

  .simple-section{
    padding: 22px 18px 18px;
  }

  .tech-grid{
    grid-template-columns: 1fr;  /* force 1 column */
    padding: 0;
  }
}
