/*
Theme Name: SDI Theme
Theme URI: https://www.shreedeepakindustries.in/
Author: Rackonnect
Description: Custom theme for Shree Deepak Industries — steel and solar structure products, editable content and SEO-ready markup.
Version: 1.0.0
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 8.0
Text Domain: sdi
*/

/* Visual styling is compiled into assets/css and enqueued from functions.php.
   This file carries the theme header plus a few accessibility helpers. */


.screen-reader-text {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  width: 1px; height: 1px; overflow: hidden;
}

/* -------------------------------------------------------------------------
 * Blog post content typography (single.php).
 *
 * The compiled Tailwind bundle in assets/css ships Preflight, which resets
 * headings to `font-size:inherit;font-weight:inherit` and lists to
 * `list-style:none`. That bundle was built without @tailwindcss/typography
 * and without scanning the PHP templates, so the `prose` and `[&_p]:*`
 * classes on the content wrapper resolve to nothing and editor content
 * renders as one flat block.
 *
 * Scoped via the WordPress body class rather than a new wrapper class, so it
 * applies to already-cached post HTML (pages are served with a 7-day
 * max-age) and leaves page.php / single-product.php — which carry the same
 * dead `prose` class — untouched.
 * ---------------------------------------------------------------------- */

body.single-post .prose {
  font-family: var(--font-generalSans, "GeneralSans", system-ui, sans-serif);
  color: var(--color-sub_heading_color, #7c7e8c);
  font-size: 15px;
  line-height: 1.75;
}

@media (min-width: 640px) {
  body.single-post .prose { font-size: 16px; }
}

/* Headings ---------------------------------------------------------------- */

body.single-post .prose h2,
body.single-post .prose h3,
body.single-post .prose h4,
body.single-post .prose h5,
body.single-post .prose h6 {
  font-family: var(--font-cabinetGrotesk, "CabinetGrotesk"), system-ui, sans-serif;
  color: var(--color-heading_color, #44475b);
  font-weight: 600;
  line-height: 1.25;
  scroll-margin-top: 6rem; /* anchor links clear the fixed header */
}

body.single-post .prose h2 { font-size: 1.625rem;  margin: 2.5rem 0 1rem; }
body.single-post .prose h3 { font-size: 1.25rem;   margin: 2rem 0 .75rem; }
body.single-post .prose h4 { font-size: 1.0625rem; margin: 1.75rem 0 .5rem; }
body.single-post .prose h5,
body.single-post .prose h6 { font-size: 1rem;      margin: 1.5rem 0 .5rem; }

@media (min-width: 640px) {
  body.single-post .prose h2 { font-size: 1.875rem; }
  body.single-post .prose h3 { font-size: 1.375rem; }
}

body.single-post .prose > :first-child { margin-top: 0; }

/* Paragraphs and inline --------------------------------------------------- */

body.single-post .prose p { margin: 0 0 1.25rem; }

body.single-post .prose strong,
body.single-post .prose b { color: var(--color-heading_color, #44475b); font-weight: 600; }

body.single-post .prose em { font-style: italic; }

body.single-post .prose a {
  color: var(--color-heading_color, #44475b);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.single-post .prose a:hover { opacity: .7; }

/* Lists ------------------------------------------------------------------- */

body.single-post .prose ul,
body.single-post .prose ol {
  margin: 0 0 1.25rem;
  padding-left: 1.5rem;
}

body.single-post .prose ul { list-style: disc; }
body.single-post .prose ol { list-style: decimal; }

body.single-post .prose li { margin: 0 0 .5rem; padding-left: .25rem; }
body.single-post .prose li::marker { color: var(--color-sub_heading_color, #7c7e8c); }

body.single-post .prose li > ul,
body.single-post .prose li > ol { margin: .5rem 0 0; }

body.single-post .prose ul ul { list-style: circle; }

/* Blocks ------------------------------------------------------------------ */

body.single-post .prose blockquote {
  margin: 1.75rem 0;
  padding: .25rem 0 .25rem 1.25rem;
  border-left: 3px solid #e5e5e5;
  color: var(--color-heading_color, #44475b);
  font-style: italic;
}

body.single-post .prose blockquote p:last-child { margin-bottom: 0; }

body.single-post .prose hr { margin: 2.5rem 0; border: 0; border-top: 1px solid #e5e5e5; }

body.single-post .prose figure { margin: 1.75rem 0; }

body.single-post .prose img { height: auto; max-width: 100%; border-radius: .75rem; }

body.single-post .prose figcaption {
  margin-top: .5rem;
  font-size: .8125rem;
  color: var(--color-sub_heading_color, #7c7e8c);
  text-align: center;
}

body.single-post .prose code {
  padding: .125rem .375rem;
  border-radius: .25rem;
  background: #f5f5f5;
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: .875em;
  color: var(--color-heading_color, #44475b);
}

body.single-post .prose pre {
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  border-radius: .75rem;
  background: #f5f5f5;
}

body.single-post .prose pre code { padding: 0; background: none; }

/* Tables ------------------------------------------------------------------
 * The editor writes tables as a bare <tbody> of <td> cells — no <thead> and
 * no <th> — so the first row is treated as the header row. Real <th>/<thead>
 * markup is styled the same way in case it is used later.
 * ---------------------------------------------------------------------- */

body.single-post .prose figure.wp-block-table {
  margin: 1.75rem 0;
  overflow-x: auto;
  border: 1px solid #d4d4d4;
  border-radius: .75rem;
  background: #fff;
}

body.single-post .prose table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: .9375rem;
  line-height: 1.6;
}

body.single-post .prose th,
body.single-post .prose td {
  padding: .75rem .875rem;
  border: 1px solid #d4d4d4;
  text-align: left;
  vertical-align: top;
}

/* Outer edges come from the wrapper, so drop the duplicated cell borders. */
body.single-post .prose figure.wp-block-table tr:first-child > * { border-top: 0; }
body.single-post .prose figure.wp-block-table tr:last-child  > * { border-bottom: 0; }
body.single-post .prose figure.wp-block-table > table > * > tr > :first-child { border-left: 0; }
body.single-post .prose figure.wp-block-table > table > * > tr > :last-child  { border-right: 0; }

/* Header row: real <th>, or the first <tr> when the editor emits only <td>. */
body.single-post .prose thead th,
body.single-post .prose thead td,
body.single-post .prose table > tbody > tr:first-child > td {
  background: #f5f6f8;
  color: var(--color-heading_color, #44475b);
  font-weight: 600;
  border-bottom-color: #b8bcc6;
}

body.single-post .prose table > tbody > tr:first-child > td strong { font-weight: 600; }

body.single-post .prose tbody tr:hover > * { background: #fafbfc; }
body.single-post .prose table > tbody > tr:first-child:hover > td { background: #f5f6f8; }

/* Editor block helpers ---------------------------------------------------- */

body.single-post .prose .wp-block-image { margin: 1.75rem 0; }
body.single-post .prose .has-text-align-center { text-align: center; }
body.single-post .prose .has-text-align-right  { text-align: right; }
body.single-post .prose .aligncenter { margin-left: auto; margin-right: auto; }

/* About page stat tiles ---------------------------------------------------
 * The icon is pinned to the tile corner so the value and caption sit
 * vertically centred in the tile, rather than being pushed down by an icon
 * row above them. Written as plain CSS because the prebuilt Tailwind bundle
 * carries no pr-* or justify-end utilities to express this.
 * ---------------------------------------------------------------------- */

.sdi-stat__desktop { display: none; }

@media (min-width: 640px) {
  .sdi-stat {
    position: relative;
    display: flex;
    flex-direction: column;
  }

  .sdi-stat__desktop {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    padding-right: 2.25rem; /* keeps a long value clear of the pinned icon */
  }

  .sdi-stat__icon {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
  }
}

/* Brochure page (page-brochure.php) --------------------------------------
 * Written as plain CSS: the theme's prebuilt Tailwind bundle carries only the
 * utilities its original build scanned, so a new layout cannot be expressed in
 * utility classes here. Tokens mirror the bundle's own custom properties.
 * ---------------------------------------------------------------------- */

.sdib-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0;
  padding: .375rem 1rem;
  border: 1px solid #e5e5e5;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .05);
  font-family: var(--font-generalSans, "GeneralSans", system-ui, sans-serif);
  font-size: .75rem;
  font-weight: 500;
  color: #404040;
}

.sdib-dot { width: .375rem; height: .375rem; border-radius: 9999px; background: #171717; }

.sdib-h1 {
  margin: 1.25rem 0 0;
  font-family: var(--font-cabinetGrotesk, "CabinetGrotesk"), system-ui, sans-serif;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.02em;
  color: var(--color-heading_color, #44475b);
}

.sdib-h2 {
  margin: 0 0 1.5rem;
  font-family: var(--font-cabinetGrotesk, "CabinetGrotesk"), system-ui, sans-serif;
  font-size: clamp(1.5rem, 2.6vw, 2.125rem);
  font-weight: 600;
  letter-spacing: -.01em;
  color: var(--color-heading_color, #44475b);
}

.sdib-lede,
.sdib-sublede {
  font-family: var(--font-generalSans, "GeneralSans", system-ui, sans-serif);
  color: var(--color-sub_heading_color, #7c7e8c);
  font-weight: 500;
  line-height: 1.7;
}

.sdib-lede   { margin: 1rem 0 0; max-width: 46ch; font-size: 1rem; }
.sdib-sublede { margin: -1rem 0 1.5rem; font-size: .9375rem; }

/* Hero -------------------------------------------------------------------- */

.sdib-hero { display: grid; gap: 2rem; align-items: center; }

@media (min-width: 900px) {
  .sdib-hero { grid-template-columns: 1fr 1.1fr; gap: 3rem; }
}

.sdib-hero__media {
  margin: 0;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  border-radius: 1.5rem;
  background: #fafafa;
  box-shadow: 0 18px 60px -46px rgba(0, 0, 0, .35);
}

.sdib-hero__media img { display: block; width: 100%; height: auto; }

.sdib-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.75rem; }

.sdib-btn {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .625rem 1.25rem;
  border-radius: 9999px;
  font-family: var(--font-generalSans, "GeneralSans", system-ui, sans-serif);
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  transition: filter .2s, background-color .2s;
}

.sdib-btn--solid { background: #171717; color: #fff; border: 1px solid #171717; }
.sdib-btn--solid:hover { filter: brightness(1.15); }

.sdib-btn--ghost { background: #fff; color: var(--color-heading_color, #44475b); border: 1px solid #d4d4d4; }
.sdib-btn--ghost:hover { background: #fafafa; }

/* Sections and cards ------------------------------------------------------ */

.sdib-section { margin-top: 4rem; }

@media (min-width: 900px) { .sdib-section { margin-top: 5.5rem; } }

.sdib-prose p {
  margin: 0 0 1rem;
  max-width: 78ch;
  font-family: var(--font-generalSans, "GeneralSans", system-ui, sans-serif);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.8;
  color: var(--color-sub_heading_color, #7c7e8c);
}

.sdib-grid2, .sdib-grid3 { display: grid; gap: 1rem; }

@media (min-width: 760px) {
  .sdib-grid2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
  .sdib-grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
}

.sdib-card {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  border: 1px solid #e5e5e5;
  border-radius: 1rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
}

@media (min-width: 760px) { .sdib-card { padding: 1.75rem; } }

.sdib-card--tight { flex-direction: row; align-items: flex-start; gap: .875rem; }
.sdib-card--tight.sdib-card { display: flex; }
.sdib-grid3 .sdib-card--tight { flex-direction: column; gap: .5rem; }

.sdib-card__icon { flex: none; color: var(--color-heading_color, #44475b); }

.sdib-card__title {
  margin: 0 0 1rem;
  font-family: var(--font-cabinetGrotesk, "CabinetGrotesk"), system-ui, sans-serif;
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--color-heading_color, #44475b);
}

.sdib-card__title--sm { font-size: 1rem; margin-bottom: .75rem; font-family: var(--font-generalSans, "GeneralSans", system-ui, sans-serif); }

.sdib-card__lead,
.sdib-card__body {
  margin: 0;
  font-family: var(--font-generalSans, "GeneralSans", system-ui, sans-serif);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.65;
  color: var(--color-sub_heading_color, #7c7e8c);
}

.sdib-card__lead { color: var(--color-heading_color, #44475b); font-weight: 600; }

/* Spec tables ------------------------------------------------------------- */

.sdib-spec { width: 100%; border-collapse: collapse; font-family: var(--font-generalSans, "GeneralSans", system-ui, sans-serif); font-size: .875rem; }

.sdib-spec th,
.sdib-spec td { padding: .625rem .25rem; border-bottom: 1px solid #ededed; text-align: left; vertical-align: top; line-height: 1.5; }

.sdib-spec tr:last-child th,
.sdib-spec tr:last-child td { border-bottom: 0; }

.sdib-spec th { width: 42%; font-weight: 500; color: var(--color-sub_heading_color, #7c7e8c); }
.sdib-spec td { font-weight: 600; color: var(--color-heading_color, #44475b); }

.sdib-cardlink {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 1.25rem;
  font-family: var(--font-generalSans, "GeneralSans", system-ui, sans-serif);
  font-size: .8125rem;
  font-weight: 600;
  color: var(--color-heading_color, #44475b);
  text-decoration: none;
}

.sdib-cardlink:hover { opacity: .7; }

/* Lists ------------------------------------------------------------------- */

.sdib-checklist { display: grid; gap: .75rem; margin: 0; padding: 0; list-style: none; }

@media (min-width: 760px) { .sdib-checklist { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 2rem; } }

.sdib-checklist li,
.sdib-benefits li,
.sdib-contactlist li {
  display: flex;
  align-items: flex-start;
  gap: .625rem;
  font-family: var(--font-generalSans, "GeneralSans", system-ui, sans-serif);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.6;
  color: var(--color-sub_heading_color, #7c7e8c);
}

.sdib-checklist svg,
.sdib-benefits svg,
.sdib-contactlist svg { flex: none; margin-top: .15rem; color: #a3a3a3; }

.sdib-benefits { display: grid; gap: .625rem; margin: 1.25rem 0 0; padding: 0; list-style: none; }
.sdib-benefits li { font-size: .875rem; }

/* Coating badges ---------------------------------------------------------- */

.sdib-coat__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }

.sdib-coat__name {
  font-family: var(--font-cabinetGrotesk, "CabinetGrotesk"), system-ui, sans-serif;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--color-heading_color, #44475b);
}

.sdib-coat__name small { display: block; font-size: .75rem; font-weight: 500; color: var(--color-sub_heading_color, #7c7e8c); font-family: var(--font-generalSans, "GeneralSans", system-ui, sans-serif); }

.sdib-formula { display: inline-flex; align-items: center; gap: .375rem; }

.sdib-el {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  min-width: 2.5rem;
  padding: .375rem .5rem;
  border: 1px solid #e5e5e5;
  border-radius: .5rem;
  background: #fafafa;
  font-family: var(--font-generalSans, "GeneralSans", system-ui, sans-serif);
}

.sdib-el b { font-size: .9375rem; font-weight: 600; color: var(--color-heading_color, #44475b); }
.sdib-el i { font-style: normal; font-size: .6875rem; color: var(--color-sub_heading_color, #7c7e8c); }
.sdib-plus { color: #a3a3a3; font-size: .875rem; }

.sdib-badge {
  align-self: flex-start;
  margin: 1rem 0 0;
  padding: .25rem .75rem;
  border: 1px solid #e5e5e5;
  border-radius: 9999px;
  background: #fafafa;
  font-family: var(--font-generalSans, "GeneralSans", system-ui, sans-serif);
  font-size: .6875rem;
  font-weight: 600;
  color: #525252;
}

/* Anatomy ----------------------------------------------------------------- */

.sdib-anatomy { display: grid; gap: 1.5rem; }

@media (min-width: 900px) { .sdib-anatomy { grid-template-columns: 1.4fr 1fr; gap: 2rem; align-items: start; } }

.sdib-anatomy__media {
  margin: 0;
  overflow: hidden;
  border: 1px solid #e5e5e5;
  border-radius: 1rem;
  background: #fafafa;
}

.sdib-anatomy__media img { display: block; width: 100%; height: auto; }

.sdib-legend { display: grid; gap: .625rem; margin: 0; padding: 0; list-style: none; counter-reset: none; }

.sdib-legend li {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-family: var(--font-generalSans, "GeneralSans", system-ui, sans-serif);
  font-size: .875rem;
  font-weight: 500;
  color: var(--color-heading_color, #44475b);
}

.sdib-legend__n {
  display: grid;
  place-items: center;
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 9999px;
  background: #171717;
  color: #fff;
  font-size: .6875rem;
  font-weight: 600;
}

/* Contact ----------------------------------------------------------------- */

.sdib-contactlist { display: grid; gap: .75rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.sdib-contactlist a { color: var(--color-heading_color, #44475b); text-decoration: none; font-weight: 600; }
.sdib-contactlist a:hover { text-decoration: underline; }

.sdib-contact .sdib-btn { align-self: flex-start; margin-top: auto; }

.sdib-places { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; }

.sdib-places li { display: grid; gap: .1875rem; font-family: var(--font-generalSans, "GeneralSans", system-ui, sans-serif); }
.sdib-places strong { font-size: .8125rem; font-weight: 600; color: var(--color-heading_color, #44475b); }
.sdib-places span { font-size: .875rem; font-weight: 500; line-height: 1.55; color: var(--color-sub_heading_color, #7c7e8c); }

/* About page brochure band ------------------------------------------------ */

.sdib-band {
  display: grid;
  gap: 1.5rem;
  margin-top: 4rem;
  padding: 1.75rem;
  border: 1px solid #e5e5e5;
  border-radius: 1.5rem;
  background: #fff;
  box-shadow: 0 18px 60px -46px rgba(0, 0, 0, .35);
}

@media (min-width: 860px) {
  .sdib-band { grid-template-columns: 22rem 1fr; align-items: center; gap: 2.5rem; padding: 2.25rem; margin-top: 5rem; }
}

.sdib-band__media { margin: 0; overflow: hidden; border: 1px solid #e5e5e5; border-radius: 1rem; background: #fafafa; }
.sdib-band__media img { display: block; width: 100%; height: auto; }

.sdib-band__title {
  margin: 1rem 0 0;
  font-family: var(--font-cabinetGrotesk, "CabinetGrotesk"), system-ui, sans-serif;
  font-size: clamp(1.375rem, 2.4vw, 1.875rem);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-heading_color, #44475b);
}

.sdib-band__body {
  margin: .75rem 0 0;
  max-width: 52ch;
  font-family: var(--font-generalSans, "GeneralSans", system-ui, sans-serif);
  font-size: .9375rem;
  font-weight: 500;
  line-height: 1.7;
  color: var(--color-sub_heading_color, #7c7e8c);
}

/* Stat tile values --------------------------------------------------------
 * The row carries four tiles from lg up, so the columns are narrower than the
 * three-up layout they were sized for. Step the value down a little there so
 * longer figures ("1000 + MW", "36,000 MT") stay on one line.
 * ---------------------------------------------------------------------- */

@media (min-width: 1024px) and (max-width: 1400px) {
  .sdi-stat__value { font-size: 1.875rem; }
}
