/*
Theme Name: Meta Life Child
Theme URI: https://metalife.org.in
Description: Professional child theme for Meta Life Research & Innovation Trust
Author: Meta Life
Template: astra
Version: 1.0.3
Text Domain: metalife-child
*/

@import url("https://fonts.googleapis.com/css2?family=Outfit:wght@400;500;600;700&family=Source+Serif+4:opsz,wght@8..60,500;8..60,600;8..60,700&display=swap");

:root {
  --ml-navy: #0f2744;
  --ml-ink: #173353;
  --ml-muted: #5b6b7f;
  --ml-amber: #e07a2f;
  --ml-amber-deep: #c4631d;
  --ml-sky: #e8eef6;
  --ml-mist: #f3f6fa;
  --ml-line: #d7e0eb;
  --ml-white: #ffffff;
  --ml-radius: 18px;
  --ml-shadow: 0 18px 40px rgba(15, 39, 68, 0.08);
}

html {
  scroll-behavior: smooth;
}

body,
button,
input,
select,
textarea,
.ast-button,
.ast-custom-button {
  font-family: "Outfit", "Segoe UI", sans-serif !important;
  color: var(--ml-ink);
}

h1, h2, h3, h4, h5, h6,
.site-title,
.entry-title {
  font-family: "Source Serif 4", Georgia, serif !important;
  color: var(--ml-navy) !important;
  letter-spacing: -0.02em;
}

a {
  color: var(--ml-amber-deep);
}

a:hover,
a:focus {
  color: var(--ml-navy);
}

/* Header */
.site-header,
.main-header-bar,
.ast-primary-header-bar {
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(215, 224, 235, 0.9);
  box-shadow: 0 1px 0 rgba(15, 39, 68, 0.03);
}

.main-header-menu .menu-link,
.ast-header-custom-item a {
  color: var(--ml-ink) !important;
  font-weight: 500 !important;
  font-size: 0.95rem !important;
}

.main-header-menu .menu-link:hover,
.main-header-menu .current-menu-item > .menu-link {
  color: var(--ml-amber-deep) !important;
}

.site-title a {
  font-family: "Source Serif 4", Georgia, serif !important;
  font-weight: 700 !important;
  color: var(--ml-navy) !important;
}

.custom-logo-link img {
  max-height: 56px !important;
  width: auto !important;
}

/* Hero */
.ml-hero {
  position: relative;
  min-height: clamp(520px, 78vh, 720px);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 0 0 28px 28px;
  background:
    linear-gradient(120deg, rgba(15, 39, 68, 0.88) 0%, rgba(23, 51, 83, 0.72) 48%, rgba(224, 122, 47, 0.35) 100%),
    radial-gradient(900px 420px at 80% 10%, rgba(224, 122, 47, 0.35), transparent 60%),
    var(--ml-hero-image, none) center/cover no-repeat,
    linear-gradient(180deg, #173353, #0f2744);
  color: #fff;
  text-align: center;
  padding: 88px 24px 72px;
}

.ml-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: 0.25;
  pointer-events: none;
}

.ml-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 860px;
  animation: ml-rise 0.9s ease both;
}

.ml-kicker {
  display: inline-block;
  font-family: "Outfit", sans-serif !important;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.82);
  margin-bottom: 18px;
}

.ml-hero h1,
.ml-hero .ml-brand {
  font-size: clamp(2.4rem, 5vw, 4rem) !important;
  line-height: 1.08 !important;
  color: #fff !important;
  margin: 0 0 18px !important;
}

.ml-hero p {
  font-size: clamp(1.05rem, 1.6vw, 1.22rem);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
  max-width: 38rem;
  margin: 0 auto 28px;
}

.ml-cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.ml-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  font-family: "Outfit", sans-serif !important;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none !important;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ml-btn:hover {
  transform: translateY(-2px);
}

.ml-btn--primary {
  background: var(--ml-amber);
  color: #fff !important;
  box-shadow: 0 12px 28px rgba(224, 122, 47, 0.35);
}

.ml-btn--primary:hover {
  background: var(--ml-amber-deep);
  color: #fff !important;
}

.ml-btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.ml-btn--ghost:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff !important;
}

.ml-btn--solid {
  background: var(--ml-navy);
  color: #fff !important;
}

.ml-btn--solid:hover {
  background: #173353;
  color: #fff !important;
}

/* Sections */
.ml-section {
  padding: 72px 20px;
}

.ml-section--mist {
  background:
    radial-gradient(700px 280px at 10% 0%, rgba(224, 122, 47, 0.08), transparent 60%),
    var(--ml-mist);
}

.ml-section--sky {
  background: linear-gradient(180deg, var(--ml-sky), #fff 70%);
}

.ml-wrap {
  max-width: 1120px;
  margin: 0 auto;
}

.ml-section-head {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 40px;
  animation: ml-rise 0.8s ease both;
}

.ml-section-head h2 {
  font-size: clamp(1.8rem, 3vw, 2.4rem) !important;
  margin: 0 0 12px !important;
}

.ml-section-head p {
  margin: 0;
  color: var(--ml-muted);
  font-size: 1.05rem;
  line-height: 1.65;
}

.ml-grid {
  display: grid;
  gap: 18px;
}

.ml-grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

.ml-grid--4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ml-grid--4 .ml-card--media .ml-card-media {
  height: 118px;
}

.ml-grid--4 .ml-card--media .ml-card-body {
  padding: 14px 14px 16px;
}

.ml-grid--4 .ml-card h3 {
  font-size: 0.98rem !important;
}

.ml-grid--4 .ml-card p,
.ml-grid--4 .ml-more {
  font-size: 0.86rem;
}

.ml-grid--2 {
  grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 1100px) {
  .ml-grid--4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ml-grid--4 .ml-card--media .ml-card-media {
    height: 140px;
  }
}

@media (max-width: 960px) {
  .ml-grid--3 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .ml-grid--3,
  .ml-grid--4,
  .ml-grid--2 {
    grid-template-columns: 1fr;
  }
  .ml-hero {
    min-height: 88vh;
    border-radius: 0 0 20px 20px;
  }
}

.ml-card {
  background: var(--ml-white);
  border: 1px solid var(--ml-line);
  border-radius: var(--ml-radius);
  padding: 26px 24px;
  box-shadow: var(--ml-shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.ml-card:hover {
  transform: translateY(-4px);
  border-color: rgba(224, 122, 47, 0.35);
  box-shadow: 0 22px 48px rgba(15, 39, 68, 0.12);
}

.ml-card a.ml-card-link {
  text-decoration: none !important;
  color: inherit !important;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.ml-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(145deg, rgba(224, 122, 47, 0.14), rgba(15, 39, 68, 0.08));
  color: var(--ml-navy);
  font-size: 1.35rem;
  margin-bottom: 16px;
}

.ml-card h3 {
  font-size: 1.2rem !important;
  margin: 0 0 10px !important;
  line-height: 1.3 !important;
}

.ml-card--media {
  padding: 0;
  overflow: hidden;
}

.ml-card--media .ml-card-media {
  display: block;
  width: 100%;
  height: 168px;
  object-fit: cover;
  background: var(--ml-sky);
}

/* Astra submenu polish */
.main-header-menu .sub-menu {
  border-radius: 12px !important;
  border: 1px solid var(--ml-line) !important;
  box-shadow: var(--ml-shadow) !important;
  padding: 8px 0 !important;
  min-width: 240px;
}

.main-header-menu .sub-menu .menu-link {
  padding: 10px 16px !important;
  font-size: 0.92rem !important;
}

.main-header-menu .menu-item-has-children > .menu-link {
  position: relative;
}

.ml-card--media .ml-card-body {
  padding: 22px 22px 24px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.ml-card--media a.ml-card-link {
  height: 100%;
}

.ml-card--media .ml-more {
  margin-top: 14px;
}

.ml-card p {
  margin: 0;
  color: var(--ml-muted);
  line-height: 1.6;
  flex: 1;
}

.ml-card .ml-more {
  margin-top: 16px;
  color: var(--ml-amber-deep);
  font-weight: 600;
  font-size: 0.92rem;
}

.ml-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

@media (max-width: 800px) {
  .ml-stats {
    grid-template-columns: 1fr 1fr;
  }
}

.ml-stat {
  text-align: center;
  padding: 28px 16px;
  border-radius: var(--ml-radius);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(215, 224, 235, 0.9);
}

.ml-stat strong {
  display: block;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  color: var(--ml-navy);
  line-height: 1;
  margin-bottom: 8px;
}

.ml-stat span {
  color: var(--ml-muted);
  font-size: 0.95rem;
}

.ml-band {
  margin: 24px auto 0;
  max-width: 1120px;
  border-radius: 28px;
  padding: 48px 28px;
  text-align: center;
  background:
    linear-gradient(125deg, rgba(15, 39, 68, 0.96), rgba(23, 51, 83, 0.9) 55%, rgba(224, 122, 47, 0.78));
  color: #fff;
  box-shadow: var(--ml-shadow);
}

.ml-band h2 {
  color: #fff !important;
  margin: 0 0 10px !important;
}

.ml-band p {
  color: rgba(255, 255, 255, 0.86);
  margin: 0 0 22px;
}

.ml-page-hero {
  padding: 56px 20px 28px;
  background:
    radial-gradient(700px 260px at 90% 0%, rgba(224, 122, 47, 0.12), transparent 55%),
    linear-gradient(180deg, var(--ml-sky), #fff);
}

.ml-page-hero .ml-wrap h1 {
  margin: 0 0 12px !important;
  font-size: clamp(2rem, 4vw, 3rem) !important;
}

.ml-page-hero .ml-wrap p {
  margin: 0;
  max-width: 46rem;
  color: var(--ml-muted);
  font-size: 1.08rem;
  line-height: 1.65;
}

.ml-prose {
  max-width: 860px;
  margin: 0 auto;
  color: var(--ml-ink);
  line-height: 1.75;
  font-size: 1.05rem;
}

.ml-prose h2 {
  margin-top: 2rem !important;
}

.ml-bank {
  background: var(--ml-mist);
  border: 1px solid var(--ml-line);
  border-radius: var(--ml-radius);
  padding: 22px;
  margin-top: 18px;
}

.ml-bank code,
.ml-bank strong {
  color: var(--ml-navy);
}

.ml-form {
  display: grid;
  gap: 14px;
  max-width: 640px;
  margin: 28px auto 0;
}

.ml-form label {
  display: grid;
  gap: 6px;
  font-weight: 600;
  color: var(--ml-navy);
  font-size: 0.92rem;
}

.ml-form input,
.ml-form textarea,
.ml-form select {
  width: 100%;
  border: 1px solid var(--ml-line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  background: #fff;
  color: var(--ml-ink);
}

.ml-form input:focus,
.ml-form textarea:focus {
  outline: 2px solid rgba(224, 122, 47, 0.35);
  border-color: var(--ml-amber);
}

.ml-notice {
  max-width: 640px;
  margin: 16px auto;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(46, 160, 90, 0.1);
  color: #17663a;
  border: 1px solid rgba(46, 160, 90, 0.25);
}

.ml-notice--error {
  background: rgba(200, 60, 60, 0.08);
  color: #8a1f1f;
  border-color: rgba(200, 60, 60, 0.2);
}

/* Footer cleanup */
.ast-footer-copyright,
.site-below-footer-wrap {
  font-size: 0.9rem;
  color: var(--ml-muted);
}

.ast-footer-copyright a[href*="wpastra.com"] {
  display: none !important;
}

@keyframes ml-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.ml-card,
.ml-stat {
  animation: ml-rise 0.7s ease both;
}

/* Break out of Astra content width without relying on overflow clipping. */
.entry-content[data-ast-blocks-layout] > .ml-hero,
.entry-content[data-ast-blocks-layout] > .ml-section,
.entry-content[data-ast-blocks-layout] > .ml-page-hero,
.entry-content > .ml-hero,
.entry-content > .ml-section,
.entry-content > .ml-page-hero {
  max-width: none !important;
  width: auto !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  padding-left: max(20px, calc((100vw - 1120px) / 2));
  padding-right: max(20px, calc((100vw - 1120px) / 2));
}

.ml-hero,
.ml-page-hero,
.ml-section {
  box-sizing: border-box;
}

.ml-btn--primary {
  background: #e07a2f !important;
  color: #fff !important;
}

.ml-card,
.ml-stat,
.ml-form,
.ml-prose,
.ml-bank {
  color: var(--ml-ink);
  opacity: 1 !important;
  transform: none;
  animation: none;
}

.ml-section-head,
.ml-hero__inner {
  animation: ml-rise 0.8s ease both;
}
