/*
Theme Name: Mehta Securities
Description: Custom theme for Mehta Securities Limited — BSE-listed financial services company. Investor-relations and SEBI LODR regulatory-disclosure site. Conservative, accessible (WCAG AA), mobile-first.
Author: Mehta Securities Limited
Version: 1.1.4
Requires PHP: 7.4
Text Domain: mehta-securities
*/

/* ---------- Design tokens ---------- */
:root {
  --navy: #0e2a47;
  --navy-dark: #081a2e;
  --navy-deep: #0a2138;
  --navy-mid: #163a5f;
  --blue: #1b6ec2;
  --blue-dark: #14578f;
  --slate: #475569;
  --slate-light: #64748b;
  --ink: #1f2b3a;
  --bg: #f6f8fa;
  --card: #ffffff;
  --line: #e3e8ee;
  --gold: #c9a227;
  --gold-light: #e3c766;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(8, 26, 46, 0.06), 0 6px 24px rgba(8, 26, 46, 0.07);
  --shadow-lift: 0 4px 10px rgba(8, 26, 46, 0.10), 0 16px 40px rgba(8, 26, 46, 0.12);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --maxw: 1140px;
}

/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; }
h1, h2, h3, h4 { font-family: var(--serif); color: var(--navy); line-height: 1.22; margin: 0 0 0.55em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4.2vw, 2.75rem); letter-spacing: -0.01em; }
h2 { font-size: clamp(1.45rem, 3vw, 1.95rem); }
h3 { font-size: 1.22rem; }
p { margin: 0 0 1.15em; }
a { color: var(--blue-dark); text-decoration-thickness: 1px; text-underline-offset: 2.5px; }
a:hover { color: var(--blue); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
  border-radius: 2px;
}
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.35rem; }

/* Eyebrow label above section headings */
.eyebrow {
  display: block; font-family: var(--font); font-size: 0.76rem; font-weight: 700;
  letter-spacing: 0.18em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 0.6rem;
}
.section-head { margin: 0 0 1.6rem; }
.section-head h2 { position: relative; padding-bottom: 0.55rem; margin-bottom: 0.5rem; }
.section-head h2::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
  border-radius: 2px;
}
.section-head p { color: var(--slate-light); max-width: 46rem; margin-bottom: 0; }

/* Skip link */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--navy); color: #fff; padding: 0.75rem 1.25rem; z-index: 999;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Top utility bar ---------- */
.topbar {
  background: var(--navy-dark); color: #b9c7d6; font-size: 0.8125rem;
  border-bottom: 1px solid rgba(201, 162, 39, 0.35);
}
.topbar .container { display: flex; justify-content: space-between; gap: 1rem; padding-top: 0.45rem; padding-bottom: 0.45rem; flex-wrap: wrap; }
.topbar a { color: #e2e8f0; }
.topbar span strong { color: #fff; font-weight: 600; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100;
  box-shadow: 0 1px 3px rgba(8, 26, 46, 0.06);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.8rem; padding-bottom: 0.8rem; }
.brand { display: flex; align-items: center; gap: 0.8rem; text-decoration: none; }
.brand-mark {
  flex: none; width: 46px; height: 46px; border-radius: 8px;
  background: linear-gradient(150deg, var(--navy) 0%, var(--navy-mid) 100%);
  border: 1px solid var(--navy-mid);
  box-shadow: inset 0 0 0 1.5px rgba(201, 162, 39, 0.55);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif); font-weight: 700; font-size: 1.15rem; color: var(--gold-light);
  letter-spacing: 0.02em;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.22; }
.brand-name { font-family: var(--serif); font-size: 1.28rem; font-weight: 700; color: var(--navy); letter-spacing: 0.01em; }
.brand-sub { font-size: 0.7rem; color: var(--slate-light); text-transform: uppercase; letter-spacing: 0.16em; }

/* Nav */
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); border-radius: 6px;
  padding: 0.5rem 0.7rem; cursor: pointer; color: var(--navy); font-size: 1.1rem; line-height: 1;
}
.site-nav ul { list-style: none; display: flex; gap: 0.15rem; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 0.55rem 0.8rem; text-decoration: none; position: relative;
  color: var(--slate); font-weight: 600; font-size: 0.94rem; border-radius: 6px;
}
.site-nav a:hover { color: var(--navy); background: var(--bg); }
.site-nav .current-menu-item > a, .site-nav .current_page_item > a { color: var(--navy); }
.site-nav .current-menu-item > a::after, .site-nav .current_page_item > a::after {
  content: ""; position: absolute; left: 0.8rem; right: 0.8rem; bottom: 0.15rem; height: 2.5px;
  background: var(--gold); border-radius: 2px;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lift); }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; padding: 0.5rem 1rem 1rem; }
  .site-nav a { padding: 0.85rem 0.75rem; font-size: 1.05rem; }
  .site-nav .current-menu-item > a::after, .site-nav .current_page_item > a::after { display: none; }
  .site-nav .current-menu-item > a, .site-nav .current_page_item > a { background: #eef4fb; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 480px at 85% -10%, rgba(27, 110, 194, 0.28), transparent 60%),
    radial-gradient(800px 420px at -10% 110%, rgba(22, 58, 95, 0.55), transparent 55%),
    linear-gradient(150deg, var(--navy-dark) 0%, var(--navy-deep) 50%, var(--navy) 100%);
  color: #dbe4ee; padding: 4.2rem 0 3.2rem;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent 75%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), transparent 75%);
}
.hero .container { position: relative; }
.hero-kicker {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-light); margin-bottom: 1.1rem;
}
.hero-kicker::before { content: ""; width: 26px; height: 2px; background: var(--gold); }
.hero h1 { color: #fff; margin-bottom: 0.35em; }
.hero .lede { font-size: 1.18rem; max-width: 44rem; color: #b9c7d6; }
.hero-actions { display: flex; gap: 0.9rem; margin-top: 1.8rem; flex-wrap: wrap; }
.btn {
  display: inline-block; padding: 0.75rem 1.5rem; border-radius: 7px; font-weight: 700;
  text-decoration: none; font-size: 0.98rem; border: 2px solid transparent;
}
.btn-primary {
  background: linear-gradient(160deg, var(--gold-light), var(--gold));
  color: var(--navy-dark);
  box-shadow: 0 3px 14px rgba(201, 162, 39, 0.35);
}
.btn-primary:hover { filter: brightness(1.06); color: var(--navy-dark); }
.btn-outline { border-color: rgba(255,255,255,0.45); color: #fff; }
.btn-outline:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.08); }

/* Badges row */
.badges { border-top: 1px solid rgba(255,255,255,0.14); margin-top: 2.6rem; padding-top: 1.5rem; display: flex; gap: 0; flex-wrap: wrap; }
.badge-item {
  font-size: 0.78rem; color: #8aa0b8; text-transform: uppercase; letter-spacing: 0.1em;
  padding: 0.2rem 2.2rem 0.2rem 0; margin-right: 2.2rem;
  border-right: 1px solid rgba(255,255,255,0.12);
}
.badge-item:last-child { border-right: none; margin-right: 0; padding-right: 0; }
.badge-item strong { display: block; color: #fff; font-size: 1.02rem; letter-spacing: 0.02em; text-transform: none; margin-top: 0.15rem; }
@media (max-width: 640px) {
  .badge-item { border-right: none; padding: 0.35rem 0; margin-right: 1.6rem; }
}

/* ---------- Main content ---------- */
.site-main { padding: 3.2rem 0 4.5rem; }

/* Inner page header band */
.page-header-band {
  position: relative; overflow: hidden;
  background:
    radial-gradient(900px 300px at 90% -40%, rgba(27, 110, 194, 0.25), transparent 60%),
    linear-gradient(150deg, var(--navy-dark) 0%, var(--navy-deep) 60%, var(--navy) 100%);
  color: #fff; padding: 2.5rem 0;
  border-bottom: 3px solid var(--gold);
}
.page-header-band h1 { color: #fff; margin: 0; }
.page-header-band .crumbs { font-size: 0.84rem; color: #8aa0b8; margin: 0 0 0.45rem; }
.page-header-band .crumbs a { color: #c3d0dd; }

.content-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 2.3rem 2.5rem;
}
@media (max-width: 640px) { .content-card { padding: 1.5rem 1.2rem; } }
.content-card > h2:first-child { margin-top: 0; }

/* Prose refinements inside cards */
.content-card p { color: #33445c; }
.content-card p:last-child { margin-bottom: 0; }

/* Two-column layout with sidebar (investors section) */
.layout-sidebar { display: grid; grid-template-columns: 270px 1fr; gap: 2rem; align-items: start; }
@media (max-width: 900px) {
  /* Mobile: single column, content BEFORE the section list; no sticky and no
     inner scrollbar (iOS Safari pins sticky-in-grid over the content). */
  .layout-sidebar { display: flex; flex-direction: column; align-items: stretch; }
  .layout-sidebar .side-nav { order: 2; position: static; }
  .layout-sidebar .side-nav ul { max-height: none; overflow-y: visible; }
}
.side-nav {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.1rem 0 0.8rem; position: sticky; top: 92px; box-shadow: var(--shadow);
}
.side-nav h2 {
  font-family: var(--font); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.14em;
  color: var(--slate-light); padding: 0 1.15rem; margin-bottom: 0.5rem;
}
.side-nav ul { list-style: none; margin: 0; padding: 0; max-height: 68vh; overflow-y: auto; }
.side-nav a { display: block; padding: 0.44rem 1.15rem; font-size: 0.9rem; text-decoration: none; color: var(--slate); border-left: 3px solid transparent; }
.side-nav a:hover { color: var(--navy); background: var(--bg); }
.side-nav .active > a { color: var(--navy); font-weight: 700; border-left-color: var(--gold); background: #f4f0e2; }

/* ---------- Cards grid (quick links) ---------- */
.grid { display: grid; gap: 1.3rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.tile {
  position: relative;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.3rem; text-decoration: none; display: block; color: inherit;
  box-shadow: var(--shadow); transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
  border-top: 3px solid var(--navy);
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-top-color: var(--gold); }
.tile-icon {
  width: 44px; height: 44px; border-radius: 9px; margin-bottom: 0.9rem;
  background: #eef4fb; color: var(--navy);
  display: flex; align-items: center; justify-content: center;
}
.tile-icon svg { width: 22px; height: 22px; }
.tile h3 { margin-bottom: 0.35em; font-size: 1.08rem; }
.tile p { margin: 0; font-size: 0.9rem; color: var(--slate-light); line-height: 1.55; }
.tile .count { display: inline-block; margin-top: 0.8rem; font-size: 0.82rem; font-weight: 700; color: var(--blue-dark); }

/* ---------- Document lists ---------- */
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li { border-bottom: 1px solid var(--line); }
.doc-list li:last-child { border-bottom: none; }
.doc-list a {
  display: flex; align-items: center; gap: 0.85rem; padding: 0.85rem 0.6rem;
  text-decoration: none; color: var(--ink); font-size: 0.97rem;
}
.doc-list a:hover { background: var(--bg); color: var(--navy); }
.doc-list a::before {
  content: "PDF"; flex: none; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.06em;
  color: #b91c1c; border: 1.5px solid #f3b4b4; background: #fef2f2; border-radius: 4px; padding: 0.18rem 0.38rem;
}
.doc-meta { margin-left: auto; font-size: 0.8rem; color: var(--slate-light); flex: none; }

.year-group { margin-bottom: 2.2rem; }
.year-group > h2, .year-group > h3 {
  font-family: var(--font); font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--navy); border-bottom: 2px solid var(--gold); padding-bottom: 0.45rem;
}

/* Filter bar (investors hub) */
.filter-bar { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-bottom: 1.7rem; }
.filter-bar input[type="search"], .filter-bar select {
  font: inherit; font-size: 0.95rem; padding: 0.6rem 0.85rem; border: 1px solid var(--line);
  border-radius: 7px; background: #fff; color: var(--ink); min-width: 200px;
}
.filter-bar input[type="search"] { flex: 1; }

/* ---------- Migrated document content (original page HTML preserved) ---------- */
.doc-content { overflow-x: auto; }
.doc-content ul { list-style: none; margin: 0 0 1.2rem; padding: 0; }
.doc-content li { border-bottom: 1px solid var(--line); }
.doc-content li:last-child { border-bottom: none; }
.doc-content li a {
  display: inline-flex; align-items: center; gap: 0.7rem; padding: 0.7rem 0.5rem;
  text-decoration: none; color: var(--ink); font-size: 0.96rem; width: 100%;
}
.doc-content li a:hover { background: var(--bg); color: var(--navy); }
.doc-content li a[href$=".pdf"]::before, .doc-list a[href$=".pdf"]::before {
  content: "PDF"; flex: none; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.06em;
  color: #b91c1c; border: 1.5px solid #f3b4b4; background: #fef2f2; border-radius: 4px; padding: 0.18rem 0.38rem;
}
.doc-content li li { border-bottom: none; }
.doc-content table ul { margin: 0; }
.doc-content table th { text-align: center; }
.doc-content table td { vertical-align: top; }
.doc-content table li a { font-size: 0.9rem; padding: 0.5rem 0.4rem; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; padding: 0.7rem 0.85rem; border-bottom: 1px solid var(--line); }
th { background: var(--navy); color: #fff; font-weight: 600; font-size: 0.84rem; letter-spacing: 0.04em; }
tr:hover td { background: var(--bg); }

/* ---------- Notices ---------- */
.notice {
  border-left: 4px solid var(--gold); background: #fdf9ec; border-radius: 0 7px 7px 0;
  padding: 0.95rem 1.15rem; font-size: 0.93rem; color: #6b5416; margin: 1.3rem 0;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-dark); color: #8aa0b8; font-size: 0.9rem;
  border-top: 3px solid var(--gold);
}
.footer-cols { display: grid; gap: 2.2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding: 3.2rem 0 2.2rem; }
.site-footer h2 {
  font-family: var(--font); color: #fff; font-size: 0.8rem; text-transform: uppercase;
  letter-spacing: 0.14em; margin-bottom: 1rem; padding-bottom: 0.55rem; position: relative;
}
.site-footer h2::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 30px; height: 2px; background: var(--gold);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 0.5rem; }
.site-footer a { color: #c3d0dd; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer address { font-style: normal; line-height: 1.75; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding: 1.2rem 0; font-size: 0.8rem;
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.footer-bottom span { color: #6f8299; }

/* ---------- WP alignment / editor compat ---------- */
.aligncenter { display: block; margin: 0 auto; }
.screen-reader-text {
  border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px;
  margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal;
}
