/* Magadh Enterprises — Plain HTML CSS */
:root {
  --brand: #0f5e4c;
  --brand-light: #2a7a65;
  --brand-dark: #0b4537;
  --site-header-height: 64px;
  --site-footer-height: 80px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #ffffff;
  color: #1f2937;
  line-height: 1.5;
}

/* Layout: fixed header & footer, scrollable main */
body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--site-header-height);
  background: white;
  box-shadow: 0 6px 18px rgba(15,94,76,0.06);
  z-index: 50;
}

main {
  margin-top: var(--site-header-height);
  margin-bottom: var(--site-footer-height);
  flex: 1;
  overflow-y: auto;
}

footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--site-footer-height);
  background-color: #f3f4f6;
  border-top: 1px solid #e5e7eb;
  z-index: 40;
}

/* Container */
.container {
  max-width: 64rem;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header styles */
header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

header .logo {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: inherit;
}

.logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--brand);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
}

.logo-text h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 4px;
}

.logo-text h2 .brand {
  color: var(--brand);
}

.logo-text p {
  font-size: 11px;
  color: #9ca3af;
  margin: 0;
}

header nav {
  display: none;
  align-items: center;
  gap: 1.5rem;
  font-size: 14px;
}

header nav a {
  color: #374151;
  text-decoration: none;
  transition: color 0.3s;
}

header nav a:hover {
  color: var(--brand);
}

.mobile-menu-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  background-color: var(--brand);
  color: white;
  text-decoration: none;
  font-size: 14px;
  transition: background-color 0.3s;
  border: none;
  cursor: pointer;
}

.btn-brand:hover {
  background-color: var(--brand-light);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.25rem;
  border-radius: 9999px;
  border: 1px solid var(--brand);
  color: var(--brand);
  text-decoration: none;
  font-size: 14px;
  transition: all 0.3s;
}

.btn-outline:hover {
  background-color: var(--brand);
  color: white;
}

/* Media query for larger screens */
@media (min-width: 768px) {
  header nav {
    display: flex;
  }
  .mobile-menu-toggle {
    display: none;
  }
}

/* Footer styles */
footer .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 1.5rem;
}

footer .brand-info {
  flex: 1;
}

footer .brand-info h3 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

footer .brand-info h3 .brand {
  color: var(--brand);
}

footer .brand-info p {
  font-size: 14px;
  color: #6b7280;
  margin: 0;
}

footer .copyright {
  font-size: 14px;
  color: #4b5563;
}

/* Main content */
main {
  background: white;
}

section {
  padding: 1rem 0;
}

section.hero {
  padding: 1.25rem 0;
}

section.hero h1 {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--brand);
  margin-bottom: 0.5rem;
}

section.hero p {
  font-size: 16px;
  color: #4b5563;
  max-width: 700px;
  margin-bottom: 2rem;
}

section.hero .cta-buttons {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

section.hero .image-box {
  margin-top: 0;
  background: linear-gradient(135deg, rgba(15,94,76,0.09), rgba(42,122,101,0.04));
  border-radius: 14px;
  padding: 0.75rem;
}

/* Hero two-column layout: content left, CTAs right on wide screens */
.hero-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: start;
}
.hero-actions {
  display: flex;
  align-items: start;
  justify-content: flex-end;
}

@media (max-width: 768px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
  .hero-actions {
    justify-content: flex-start;
  }
}

section.hero img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Slider styles for hero image */
.image-slider {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}
.image-slider .slides {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
}
.image-slider .slides img {
  width: 100%;
  flex: 0 0 100%;
  display: block;
  height: auto;
  max-height: 520px;
  object-fit: cover;
}
.slider-prev,
.slider-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.06);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.slider-prev { left: 12px; }
.slider-next { right: 12px; }
.slider-prev:hover, .slider-next:hover { transform: translateY(-50%) scale(1.04); }

/* Product grid and boxes (170x200) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 170px);
  column-gap: 3rem;
  row-gap: 3rem;
  justify-content: center;
  align-items: start;
  grid-auto-rows: auto;
}
.product-box {
  width: 170px;
  height: 200px;
  background: #f9fafb;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 6px 16px rgba(15,94,76,0.06);
  cursor: pointer;
  display: block;
}
.product-box .product-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-info {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.6);
  color: white;
  padding: 0.5rem;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  font-size: 14px;
}
.product-box:hover .product-info,
.product-box:focus .product-info {
  opacity: 1;
  transform: translateY(0);
}

.product-info .product-desc {
  margin: 0.25rem 0 0 0;
  font-size: 13px;
  color: rgba(255,255,255,0.9);
}

/* Zoom lens for product images */
.zoom-view {
  position: absolute;
  width: 400px;
  height: 300px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
  border: 2px solid rgba(255,255,255,0.95);
  display: none;
  pointer-events: none;
  background-repeat: no-repeat;
  background-size: cover;
  z-index: 9999;
  background-color: #fff;
}

@media (max-width: 700px) {
  .zoom-view { display: none !important; }
}

.selected-product {
  /* Place preview into the empty cells on the second row (columns 3-4)
     so it appears beside the second-row product boxes instead of below. */
  grid-column: 3 / span 2;
  grid-row: 2;
  width: 100%;
  margin: 0;
  border-radius: 8px;
  padding: 1rem;
  background: #ffffff;
  box-shadow: 0 8px 30px rgba(15,94,76,0.06);
  align-self: start;
}
.selected-inner {
  display: flex;
  gap: 1rem;
  align-items: center;
}
.selected-image {
  width: 170px;
  height: 200px;
  background: #f3f4f6;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.selected-meta h3 { margin: 0 0 0.25rem 0; }

@media (max-width: 900px) {
  .product-grid { grid-template-columns: repeat(2, 170px); column-gap: 2rem; row-gap: 2rem; }
}

@media (max-width: 600px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); column-gap: 1rem; row-gap: 1rem; }
  .product-box { width: 100%; height: auto; aspect-ratio: 17 / 20; }
  .selected-inner { flex-direction: column; align-items: center; }
  .selected-image { width: 140px; height: 164px; }
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

h3 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

/* Grid layouts */
.grid {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

@media (min-width: 768px) {
  .grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* Cards */
.card {
  background: white;
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid #e5e7eb;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 30px rgba(15,94,76,0.12);
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 14px;
  color: #6b7280;
  margin: 0.5rem 0 0 0;
}

/* Forms */
form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

input, textarea {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 0.75rem;
  font-family: inherit;
  font-size: 14px;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

/* Animations */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.section-bg-gray {
  background-color: #f3f4f6;
}

/* Utility classes */
.mt-4 {
  margin-top: 1rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mt-8 {
  margin-top: 2rem;
}

.mt-12 {
  margin-top: 3rem;
}

.text-center {
  text-align: center;
}

.text-sm {
  font-size: 14px;
}

.text-gray-600 {
  color: #4b5563;
}

/* Maps iframe */
.map-container {
  width: 100%;
  height: 256px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  margin-top: 1rem;
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Responsive */
@media (max-width: 768px) {
  section.hero h1 {
    font-size: 1.875rem;
  }
  
  footer .container {
    flex-direction: column;
    gap: 1rem;
  }
  
  footer .copyright {
    text-align: center;
    width: 100%;
  }

  /* Hide desktop nav on mobile; show when `.show` is added */
  header nav {
    display: none;
  }

  header nav.show {
    display: block;
    position: fixed;
    top: var(--site-header-height);
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid #e5e7eb;
    box-shadow: 0 8px 20px rgba(0,0,0,0.06);
    z-index: 45;
    padding: 0.25rem 1rem;
    transform: translateY(0);
  }

  header nav.show a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
  }

  header nav.show a:hover {
    background-color: #f9fafb;
    color: var(--brand);
  }

  /* Ensure the CTA outline button looks fine in the dropdown */
  header nav.show a.btn-outline {
    display: inline-block;
    width: auto;
    margin: 0.5rem 0 0 0;
    padding: 0.5rem 1rem;
  }
}

/* Home product strip: horizontal scroll */
.home-strip { padding: 1.25rem 0; }
.product-strip {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.5rem 0 0.5rem 0;
  -webkit-overflow-scrolling: touch;
}
.product-strip::-webkit-scrollbar { height: 8px; }
.product-strip::-webkit-scrollbar-thumb { background: rgba(15,94,76,0.12); border-radius: 999px; }
.prod-item {
  flex: 0 0 160px;
  height: 220px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 6px 18px rgba(15,94,76,0.06);
  cursor: pointer;
}
.prod-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.prod-hover {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.56);
  color: #fff;
  padding: 0.5rem;
  font-weight: 600;
  text-align: center;
  transform: translateY(8px);
  opacity: 0;
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.prod-play {
  position: absolute;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%) scale(1);
  transition: transform 0.18s ease, opacity 0.18s;
  opacity: 0.95;
}
.prod-play::before {
  content: "";
  display: block;
  width: 0;
  height: 0;
  border-left: 16px solid white;
  border-top: 10px solid transparent;
  border-bottom: 10px solid transparent;
  margin-left: 4px;
}
.prod-item:hover .prod-play { transform: translate(-50%,-50%) scale(1.06); }
.prod-item:hover .prod-hover,
.prod-item:focus .prod-hover { transform: translateY(0); opacity: 1; }

/* Modal overlay for clicked image */
.img-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 220ms ease;
}
.img-modal.open { display: flex; opacity: 1; }
.img-modal-content {
  width: 320px;
  height: 550px;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 50px rgba(2,6,23,0.4);
  display: flex;
  flex-direction: column;
  transform: scale(0.98);
  opacity: 0;
  transition: transform 260ms cubic-bezier(.2,.8,.2,1), opacity 200ms ease;
}
.img-modal-content img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.modal-body { display:flex; flex-direction:column; width:100%; height:100%; }
.modal-image { flex: 1 1 auto; display:flex; align-items:center; justify-content:center; background:#fff; }
.modal-image img { max-width:100%; max-height:100%; display:block; }
.img-close {
  position: absolute;
  right: 8px;
  top: 8px;
  background: rgba(255,255,255,0.9);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.img-modal.open .img-modal-content { transform: scale(1); opacity: 1; }

@media (max-width: 600px) {
  .prod-item { flex: 0 0 46%; height: 180px; }
  .img-modal-content { width: min(88vw, 320px); height: min(88vh, 550px); }
}
