/* Modern responsive layer for Shree Krishna Die Casting
   Brand palette sampled from the existing logo: cyan-blue and warm gold. */
:root {
  --brand: #079fc8;
  --brand-dark: #087b9e;
  --brand-light: #e8f7fb;
  --brand-gold: #d8ad52;
  --ink: #26343b;
  --muted: #5f6d73;
  --page: #f3f7f8;
  --surface: #ffffff;
  --line: #dce7ea;
  --radius: 10px;
  --shadow: 0 5px 22px rgba(26, 62, 75, .08);
}

* { box-sizing: border-box; }
html { background: var(--page); scroll-behavior: smooth; }
body {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 22px;
  color: var(--ink);
  background: var(--surface);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  box-shadow: 0 0 30px rgba(27, 66, 78, .05);
  overflow-wrap: break-word;
}
p { line-height: 1.75; margin: 0 0 1rem; }
h1, h2, h3, h4 {
  line-height: 1.3;
  color: var(--brand-dark);
  font-family: Arial, Helvetica, sans-serif;
}
h1 { font-size: clamp(1.35rem, 2.5vw, 1.8rem); }
h2 { font-size: clamp(1.2rem, 2.2vw, 1.5rem); }
h3 { font-size: 1.12rem; }
a { color: var(--brand-dark); transition: color .18s ease, background-color .18s ease; }
a:hover, a:focus-visible { color: #045d78; text-decoration: underline; }
img, video, iframe { max-width: 100%; }
img { height: auto; }
table { max-width: 100%; }
input, textarea, select, button { font: inherit; max-width: 100%; }
:focus-visible { outline: 3px solid var(--brand-gold); outline-offset: 2px; }

/* Header: retain the original logo and contact details, with a cleaner layout. */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 124px;
  height: auto;
  padding: 8px 0 14px;
  border-bottom: 3px solid var(--brand-gold);
}
.header > div { float: none !important; min-width: 0; }
.header > div:first-child { flex: 1 1 48%; }
.header > div:first-child img {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 112px;
  object-fit: contain;
  object-position: left center;
}
.header > div:last-child { flex: 0 1 auto; margin: 0 !important; }
.header table { border-collapse: collapse; }
.header h1 { margin: 2px 0; font-size: clamp(1rem, 2vw, 1.45rem); white-space: nowrap; }
.header a img { vertical-align: middle; }
.header a:has(img[src*="facebook"]),
.header a:has(img[src*="twitter"]),
.header a:has(img[src*="linkedin"]),
.header a:has(img[src*="flickr"]),
.header a:has(img[src*="feed"]) { display: inline-block; margin-left: 5px; }
.header img[src*="mobile"] { width: 32px; height: auto; }

/* Main navigation */
.bc { background: var(--brand-dark); }
.menu {
  display: flex;
  flex-wrap: wrap;
  float: none;
  width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--brand-dark);
}
.menu li { float: none; flex: 1 1 auto; margin: 0; }
.menu li a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 10px clamp(8px, 1.2vw, 17px);
  border-right: 1px solid rgba(255,255,255,.18);
  color: #fff;
  background: transparent;
  text-align: center;
  font-size: 14px;
  line-height: 1.35;
  font-weight: 600;
}
.menu li a:hover, .menu li.current a, .menu li a:focus-visible {
  color: #fff;
  background: var(--brand);
  text-decoration: none;
}
.cb { clear: both; }

/* Responsive image slider */
#wrapper { width: 100%; max-width: 100%; margin: 0 auto 26px; }
#slider-wrapper {
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  aspect-ratio: 1002 / 365;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
}
#slider {
  position: relative;
  width: 100% !important;
  max-width: 100%;
  height: auto !important;
  aspect-ratio: 1002 / 365;
  margin: 0;
  overflow: hidden;
}
#slider img {
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  object-fit: cover;
}
.nivo-controlNav { bottom: 4px; }
.nivo-caption { background: rgba(8, 123, 158, .92); }

/* Page content and older fixed-width utility classes */
.w1, .w2, .w3 { max-width: 100%; }
.w1 { width: 100%; }
.w2 { width: min(100%, 238px); }
.w3 { width: min(100%, 307px); }
.p10 { padding: 20px; }
.division {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin: 20px 0;
}
#sl, #sr {
  float: none;
  flex: 1 1 250px;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 0;
  padding-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}
#sl img, #sr img { display: block; max-width: calc(100% - 20px); height: auto; margin: 10px auto; }
.hed {
  height: auto;
  min-height: 46px;
  padding: 9px 12px;
  line-height: 1.5;
  background: var(--brand-dark);
}
.hed h3 { color: #fff !important; margin: 0; }
.f1 { font-size: 1.05rem; }
.c2, .c4 { color: var(--brand-dark); }
.bg4 {
  min-height: 0;
  height: auto;
  padding: 16px 18px;
  background: var(--brand-dark);
  color: #fff;
  border-top: 3px solid var(--brand-gold);
}
.bg4 a, .ho2 a { color: #fff; }
.ho1 { padding: 14px 8px !important; background: #f0f7f9; }
.ho1 a { display: inline-block; padding: 4px 7px; }
.myimg { border: 1px solid var(--line); border-radius: 8px; }
input, textarea, select {
  border: 1px solid #b9cbd1;
  border-radius: 5px;
  padding: 9px 10px;
}
input:focus, textarea:focus, select:focus { border-color: var(--brand); }
.submit {
  width: auto;
  min-width: 170px;
  height: auto;
  padding: 10px 18px;
  border: 0;
  border-radius: 6px;
  color: #fff;
  background: var(--brand-dark);
  cursor: pointer;
}
.submit:hover { background: var(--brand); }

/* Contact page uses legacy nested tables; keep them inside the viewport. */
body > table { width: 100% !important; table-layout: fixed; }
body > table td { overflow-wrap: anywhere; }
body > table table { width: 100% !important; }
body > table input, body > table textarea { width: 100% !important; }
body > table textarea { min-height: 130px; margin: 0 !important; }
.codtn { width: 100%; }
.codtn td { padding: 8px; }
.codtn .txtfn { width: 100% !important; }
.division img, .division iframe { max-width: 100%; }
marquee { display: block; max-width: 100%; }
footer, .footer { max-width: 100%; }

/* Tablet */
@media (max-width: 800px) {
  body { padding: 0 16px; }
  .header { gap: 12px; }
  .menu li { flex: 1 1 30%; }
  .menu li a { min-height: 44px; }
  #sl, #sr { flex-basis: 220px; }
  .division { gap: 14px; }
}

/* Mobile */
@media (max-width: 560px) {
  body { padding: 0 12px; font-size: 15px; line-height: 1.6; }
  .header {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px 0;
  }
  .header > div:first-child { flex: none; }
  .header > div:first-child img { max-height: 90px; margin: 0 auto; object-position: center; }
  .header > div:last-child { flex: none; align-self: center; }
  .header table { margin: 0 auto; }
  .header table td { padding: 2px; }
  .header h1 { white-space: normal; font-size: 1.15rem; }
  .header td[colspan="2"] { text-align: center; }
  .menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu li { min-width: 0; }
  .menu li a { min-height: 46px; height: 100%; padding: 9px 6px; font-size: 13px; border-bottom: 1px solid rgba(255,255,255,.16); }
  #wrapper { margin-bottom: 18px; }
  /* Preserve the complete original 1002×365 banner on narrow screens. */
  #slider-wrapper, #slider { aspect-ratio: 1002 / 365 !important; }
  .nivo-controlNav { display: none; }
  .division { display: flex; flex-direction: column; gap: 14px; margin: 16px 0; }
  #sl, #sr { flex: auto; width: 100%; }
  .p10 { padding: 14px 8px; }
  .w3 { float: none !important; width: 100% !important; margin: 0 !important; }
  .bg4 { padding: 14px 12px; }
  .ho1 a { padding: 4px; }
  /* Tables used for page layout stack instead of forcing horizontal scrolling. */
  body > table > tbody > tr { display: block; }
  body > table > tbody > tr > td {
    display: block;
    width: 100% !important;
    padding: 8px 0;
  }
  body > table > tbody > tr > td > table { width: 100% !important; }
  body > table td img { max-width: 100%; height: auto; }
  .codtn td { display: block; width: 100% !important; }
  .codtn tr { display: block; }
  .codtn textarea { width: 100% !important; }
  .codtn input[type="text"], .codtn input[type="email"], .codtn input[type="tel"], .codtn input:not([type]) { width: 100% !important; }
  .ho1 { line-height: 1.8; }
}

/* Very narrow phones */
@media (max-width: 360px) {
  body { padding: 0 8px; }
  .menu { grid-template-columns: 1fr; }
  .header h1 { font-size: 1rem; }
}


/* Accessible responsive hamburger navigation (October 2026 correction). */
.bc {
  position: relative;
  z-index: 30;
  width: 100%;
  clear: both;
  background: var(--brand-dark);
}
.menu-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 10px 14px;
  border: 0;
  border-radius: 0;
  color: #fff;
  background: var(--brand-dark);
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.menu-toggle:hover,
.menu-toggle:focus-visible { background: var(--brand); color: #fff; }
.menu-toggle-icon { display: inline-flex; flex-direction: column; justify-content: space-between; width: 24px; height: 18px; }
.menu-toggle-icon span { display: block; width: 24px; height: 2px; border-radius: 2px; background: currentColor; }
.menu-toggle-label { font-size: 15px; }
#primary-menu { position: relative; z-index: 31; }

@media (max-width: 760px) {
  .bc { display: block; }
  .menu-toggle { display: flex; }
  #primary-menu {
    display: none !important;
    width: 100%;
    margin: 0;
    padding: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    background: var(--brand-dark);
    box-shadow: 0 8px 18px rgba(0,0,0,.16);
  }
  #primary-menu.is-open { display: flex !important; }
  #primary-menu li { display: block; width: 100%; flex: none; margin: 0; }
  #primary-menu li a {
    display: flex;
    justify-content: flex-start;
    width: 100%;
    min-height: 46px;
    padding: 12px 18px;
    border-right: 0;
    border-top: 1px solid rgba(255,255,255,.14);
    text-align: left;
    white-space: normal;
  }
  /* Keep the hero/slider below the navigation instead of underneath it. */
  #wrapper { position: relative; z-index: 1; clear: both; }
  #slider-wrapper { clear: both; }
}
@media (min-width: 761px) {
  .menu-toggle { display: none !important; }
  #primary-menu { display: flex !important; }
}


/* Hero banner fit correction (October 2026): preserve the full source image.
   The original slides are 1002×365; using a different ratio with object-fit:cover
   cropped the edges on phones. */
#slider-wrapper {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1002 / 365 !important;
  overflow: hidden;
}
#slider {
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1002 / 365 !important;
  overflow: hidden;
  background-size: 100% 100% !important;
}
#slider img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center;
}
.nivo-slice {
  background-size: 100% 100% !important;
}
