/*
Theme Name: Emaar Amaris Blog
Theme URI: https://www.amarissector62gurgaon.com/blog/
Description: Custom blog theme for amarissector62gurgaon.com, matched to the main site (Poppins, crimson #c5203b / gold #c9902b, 1400px container).
Author: Emaar Amaris Sector 62 Gurgaon
Version: 1.1
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ams-blog
*/

/* ---------- Font (served from the main site) ---------- */
@font-face {
  font-family: "Poppins";
  src: local(""), url("/fonts/poppins-v20-latin-regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --ams-red: #c5203b;
  --ams-red-dark: #9d1a2f;
  --ams-gold: #c9902b;
  --ams-gold-dark: #a8761f;
  --ams-ink: #1c1c1c;
  --ams-body: #212529;
  --ams-muted: #6c757d;
  --ams-light: #f8f9fa;
  --ams-sand: #fdf3f4;
  --ams-border: #dee2e6;
  --ams-line: rgba(28, 28, 28, 0.12);
  --ams-container: 1400px;
  --ams-radius: 0.25rem;
  --ams-radius-lg: 0.75rem;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--ams-body);
  background-color: #fff;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; vertical-align: middle; border-style: none; }
figure { margin: 0 0 1rem; }
svg { vertical-align: middle; }

a { color: var(--ams-red); text-decoration: none; }
a:hover { color: var(--ams-red-dark); }

h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--ams-ink);
}
h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.45rem; }
h4 { font-size: 1.2rem; }
p { margin-top: 0; margin-bottom: 1.25rem; }

@media (max-width: 767px) {
  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.55rem; }
  h3 { font-size: 1.3rem; }
}

.ams-container {
  width: 100%;
  max-width: var(--ams-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
}
.ams-container--narrow { max-width: 1180px; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.skip-link { position: absolute; left: -9999px; top: 0; background: var(--ams-red); color: #fff; padding: 0.6rem 1rem; z-index: 9999; }
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Eyebrow ---------- */
.ams-eyebrow {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ams-gold-dark);
  margin-bottom: 0.6rem;
}

/* ---------- Buttons ---------- */
.ams-btn {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: var(--ams-radius);
  border: 1px solid var(--ams-gold);
  background-color: var(--ams-gold);
  color: var(--ams-body);
  cursor: pointer;
  transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, color 0.15s ease-in-out;
}
.ams-btn:hover { background-color: var(--ams-gold-dark); border-color: var(--ams-gold-dark); color: #fff; }
.ams-btn--green { background-color: var(--ams-red); border-color: var(--ams-red); color: #fff; }
.ams-btn--green:hover { background-color: var(--ams-red-dark); border-color: var(--ams-red-dark); color: #fff; }

/* ---------- Header ---------- */
.ams-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background-color: var(--ams-light);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
}
.ams-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 70px;
}
.ams-brand { display: flex; align-items: center; }
.ams-brand img { height: 56px; width: auto; display: block; }
@media (max-width: 991px) { .ams-brand img { height: 46px; } }

.ams-nav ul { display: flex; align-items: center; gap: 0.1rem; list-style: none; margin: 0; padding: 0; }
.ams-nav a {
  display: block;
  padding: 1.15rem 0.85rem;
  font-size: 0.95rem;
  color: var(--ams-ink);
}
.ams-nav a:hover { color: var(--ams-red); }
.ams-nav .current-menu-item > a,
.ams-nav .current_page_item > a,
.ams-nav li.is-active > a { color: var(--ams-red); box-shadow: inset 0 -3px 0 var(--ams-gold); }

.ams-nav-toggle { display: none; background: none; border: 0; padding: 0.5rem; line-height: 0; cursor: pointer; }
.ams-nav-toggle span { display: block; width: 26px; height: 2px; margin: 5px 0; background-color: var(--ams-ink); }

@media (max-width: 991px) {
  .ams-nav-toggle { display: block; }
  .ams-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--ams-light);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.08);
    display: none;
  }
  .ams-nav.is-open { display: block; }
  .ams-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .ams-nav a { padding: 0.85rem 1rem; border-top: 1px solid var(--ams-line); }
}

/* ---------- Page head ---------- */
.ams-pagehead {
  background-color: var(--ams-sand);
  padding: 3rem 0 2.5rem;
  text-align: center;
  border-bottom: 3px solid var(--ams-gold);
}
.ams-pagehead h1 { margin-bottom: 0.5rem; }
.ams-pagehead p { color: var(--ams-muted); max-width: 700px; margin: 0 auto; }

.ams-breadcrumb { font-size: 0.85rem; color: var(--ams-muted); margin-bottom: 0.85rem; }
.ams-breadcrumb a { color: var(--ams-red); }
.ams-breadcrumb span + span::before { content: "›"; padding: 0 0.45rem; color: var(--ams-muted); }

/* ---------- Layout ---------- */
.ams-main { padding: 3rem 0; }
@media (max-width: 991px) { .ams-main { padding: 2rem 0; } }

.ams-layout { display: flex; flex-wrap: wrap; gap: 2.5rem; }
.ams-content { flex: 1 1 0; min-width: 0; }
.ams-sidebar { width: 330px; flex-shrink: 0; }
@media (max-width: 991px) { .ams-layout { gap: 2rem; } .ams-sidebar { width: 100%; } }

/* ---------- Post cards ---------- */
.ams-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.75rem; }
@media (max-width: 767px) { .ams-grid { grid-template-columns: 1fr; gap: 1.5rem; } }

.ams-card {
  background: #fff;
  border: 1px solid var(--ams-line);
  border-radius: var(--ams-radius-lg);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.25s ease, transform 0.25s ease, border-color 0.25s ease;
}
.ams-card:hover { transform: translateY(-4px); border-color: var(--ams-gold); box-shadow: 0 14px 34px rgba(32, 30, 31, 0.12); }
.ams-card__media { display: block; overflow: hidden; background: var(--ams-sand); }
.ams-card__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; transition: transform 0.4s; }
.ams-card:hover .ams-card__media img { transform: scale(1.04); }
.ams-card__body { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1 1 auto; }
.ams-card__date {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  color: var(--ams-muted);
  margin-bottom: 0.6rem;
}
.ams-card__date::before { content: ""; width: 20px; height: 2px; background: var(--ams-gold); display: inline-block; }
.ams-card__title { font-size: 1.25rem; line-height: 1.35; margin-bottom: 0.6rem; }
.ams-card__title a { color: var(--ams-ink); }
.ams-card__title a:hover { color: var(--ams-red); }
.ams-card__excerpt { font-size: 0.94rem; color: #495057; margin-bottom: 1.1rem; }
.ams-card__more {
  margin-top: auto;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--ams-gold-dark);
}
.ams-card__more::after { content: " →"; }

/* ---------- Single ---------- */
.ams-article__header { margin-bottom: 1.6rem; }
.ams-article__header h1 { font-size: 2.2rem; }
@media (max-width: 767px) { .ams-article__header h1 { font-size: 1.8rem; } }

.ams-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  font-size: 0.88rem;
  color: var(--ams-muted);
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--ams-gold);
}
.ams-meta strong { color: var(--ams-body); font-weight: 700; }

.ams-featured { margin: 1.6rem 0 2rem; }
.ams-featured img { width: 100%; border-radius: var(--ams-radius-lg); display: block; }

.ams-entry { font-size: 1.02rem; line-height: 1.78; }
.ams-entry > *:first-child { margin-top: 0; }
.ams-entry h2 {
  font-size: 1.7rem;
  margin-top: 2.4rem;
  margin-bottom: 0.9rem;
  padding-left: 0.85rem;
  border-left: 4px solid var(--ams-gold);
}
.ams-entry h3 { font-size: 1.35rem; margin-top: 1.9rem; color: var(--ams-red); }
.ams-entry h4 { font-size: 1.15rem; margin-top: 1.5rem; }
.ams-entry ul, .ams-entry ol { padding-left: 1.35rem; margin-bottom: 1.35rem; }
.ams-entry ul { list-style: disc; }
.ams-entry ol { list-style: decimal; }
.ams-entry li { margin-bottom: 0.5rem; }
.ams-entry img { border-radius: var(--ams-radius-lg); }
.ams-entry figcaption { font-size: 0.85rem; color: var(--ams-muted); text-align: center; padding-top: 0.5rem; }
.ams-entry a { text-decoration: underline; }
.ams-entry blockquote {
  margin: 1.6rem 0;
  padding: 1.15rem 1.4rem;
  background: var(--ams-sand);
  border-left: 4px solid var(--ams-red);
  border-radius: 0 var(--ams-radius) var(--ams-radius) 0;
}
.ams-entry blockquote p:last-child { margin-bottom: 0; }

.ams-entry table { width: 100%; border-collapse: collapse; margin-bottom: 1.6rem; font-size: 0.95rem; }
.ams-entry table th, .ams-entry table td {
  border: 1px solid var(--ams-border);
  padding: 0.7rem 0.9rem;
  text-align: left;
  vertical-align: top;
}
.ams-entry table thead th { background-color: var(--ams-red); color: #fff; border-color: var(--ams-red); }
.ams-entry table tbody tr:nth-child(even) { background-color: var(--ams-sand); }
.ams-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1.6rem; }
.ams-table-scroll > table { margin-bottom: 0; }

.ams-tags { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--ams-line); font-size: 0.88rem; }
.ams-tags a {
  display: inline-block;
  padding: 0.28rem 0.8rem;
  margin: 0 0.35rem 0.4rem 0;
  border: 1px solid var(--ams-line);
  border-radius: 50rem;
  color: var(--ams-red);
}
.ams-tags a:hover { background: var(--ams-gold); border-color: var(--ams-gold); color: var(--ams-body); }

/* ---------- Project CTA ---------- */
.ams-cta {
  margin-top: 2.75rem;
  padding: 2.25rem 1.75rem;
  background-color: var(--ams-sand);
  border: 1px solid var(--ams-gold);
  border-radius: var(--ams-radius-lg);
  text-align: center;
}
.ams-cta h2 { font-size: 1.7rem; margin-bottom: 0.5rem; }
.ams-cta p { color: #495057; max-width: 640px; margin: 0 auto 1.4rem; }

/* ---------- Post navigation ---------- */
.ams-postnav { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }
.ams-postnav__item { flex: 1 1 240px; padding: 1rem 1.2rem; background: var(--ams-light); border-radius: var(--ams-radius); }
.ams-postnav__label { display: block; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--ams-gold-dark); font-weight: 700; margin-bottom: 0.35rem; }
.ams-postnav__item a { font-weight: 700; color: var(--ams-ink); }
.ams-postnav__item a:hover { color: var(--ams-red); }
.ams-postnav__item--next { text-align: right; }

/* ---------- Related ---------- */
.ams-related { margin-top: 3rem; padding-top: 2.25rem; border-top: 1px solid var(--ams-line); }
.ams-related h2 { font-size: 1.6rem; margin-bottom: 1.35rem; }

/* ---------- Sidebar ---------- */
.ams-widget { background: #fff; border: 1px solid var(--ams-line); border-radius: var(--ams-radius-lg); padding: 1.4rem 1.45rem; margin-bottom: 1.6rem; }
.ams-widget__title { font-size: 1.1rem; margin-bottom: 1rem; padding-bottom: 0.6rem; border-bottom: 2px solid var(--ams-gold); }
.ams-widget ul { list-style: none; margin: 0; padding: 0; }
.ams-widget li { padding: 0.55rem 0; border-bottom: 1px dotted var(--ams-border); font-size: 0.94rem; }
.ams-widget li:last-child { border-bottom: 0; padding-bottom: 0; }
.ams-widget a { color: var(--ams-body); }
.ams-widget a:hover { color: var(--ams-red); }

.ams-widget--project { background-color: var(--ams-red); border-color: var(--ams-red); color: #fff; }
.ams-widget--project .ams-widget__title { color: #fff; }
.ams-widget--project .ams-facts li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.92rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.85);
}
.ams-widget--project .ams-facts strong { color: #fff; font-weight: 700; text-align: right; }
.ams-widget--project .ams-btn { width: 100%; text-align: center; margin-top: 1.15rem; }

.ams-searchform { display: flex; gap: 0.5rem; }
.ams-searchform input[type="search"] {
  flex: 1 1 auto;
  min-width: 0;
  height: 2.7rem;
  padding: 0.375rem 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  color: #495057;
  border: 1px solid #dcdcdc;
  border-radius: var(--ams-radius);
}
.ams-searchform input[type="search"]:focus { outline: 0; border-color: var(--ams-gold); box-shadow: 0 0 0 0.2rem rgba(197, 32, 59, 0.25); }
.ams-searchform button { flex-shrink: 0; }

/* ---------- Sticky sidebar ---------- */
@media (min-width: 992px) {
  .ams-layout { align-items: flex-start; }

  .ams-sidebar {
    position: sticky;
    align-self: flex-start;
    top: 88px;
    max-height: calc(100vh - 108px);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 6px;
    scrollbar-width: thin;
    scrollbar-color: var(--ams-gold) transparent;
  }
  .ams-sidebar::-webkit-scrollbar { width: 6px; }
  .ams-sidebar::-webkit-scrollbar-track { background: transparent; }
  .ams-sidebar::-webkit-scrollbar-thumb { background: var(--ams-gold); border-radius: 3px; }

  /* Clear the WordPress admin bar for logged-in users. */
  body.admin-bar .ams-sidebar { top: 120px; max-height: calc(100vh - 140px); }
}

/* ---------- Pagination ---------- */
.ams-pagination { margin-top: 2.75rem; }
.ams-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; }
.ams-pagination .page-numbers {
  display: inline-block;
  min-width: 2.5rem;
  padding: 0.5rem 0.8rem;
  text-align: center;
  border: 1px solid var(--ams-line);
  border-radius: var(--ams-radius);
  color: var(--ams-body);
  font-size: 0.95rem;
}
.ams-pagination .page-numbers:hover { background: var(--ams-sand); }
.ams-pagination .page-numbers.current { background: var(--ams-gold); border-color: var(--ams-gold); color: var(--ams-body); font-weight: 700; }

/* ---------- Author ---------- */
.ams-pagehead--writer { text-align: left; }

.ams-writer {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 1.75rem;
  align-items: start;
  text-align: left;
}
@media (max-width: 599px) {
  .ams-writer { grid-template-columns: 80px minmax(0, 1fr); gap: 1.15rem; }
}
.ams-writer__face img {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}
@media (max-width: 599px) {
  .ams-writer__face img { width: 80px; height: 80px; }
}
.ams-writer__text { max-width: 62ch; }
.ams-writer__label {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--ams-gold-dark);
  margin-bottom: 0.35rem;
}
.ams-writer__text h1 { font-size: 2.1rem; margin-bottom: 0.4rem; }
.ams-writer__text h2 { font-size: 1.3rem; margin-bottom: 0.4rem; }
.ams-writer__text h2 a { color: var(--ams-ink); }
.ams-writer__text h2 a:hover { color: var(--ams-red); }
.ams-writer__text p { margin-bottom: 0.7rem; color: #495057; }
.ams-writer__count { font-size: 0.88rem; color: var(--ams-red); }
.ams-writer__link { font-size: 0.9rem; margin-bottom: 0; }
.ams-writer__link a { border-bottom: 1px solid var(--ams-gold); }

/* Foot of an article. */
.ams-writer--foot {
  margin-top: 2.5rem;
  padding-top: 2.25rem;
  border-top: 1px solid var(--ams-line);
}

/* ---------- Comments ---------- */
.ams-comments { margin-top: 3rem; padding-top: 2.25rem; border-top: 1px solid var(--ams-line); }
.ams-comments h2, .ams-comments h3 { font-size: 1.4rem; }
.ams-comments .comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.ams-comments .comment-list li { padding: 1.15rem 0; border-bottom: 1px dotted var(--ams-border); }
.ams-comments .comment-list .children { list-style: none; padding-left: 1.6rem; }
.ams-comments .comment-meta { font-size: 0.85rem; color: var(--ams-muted); margin-bottom: 0.4rem; }
.ams-comments input[type="text"],
.ams-comments input[type="email"],
.ams-comments input[type="url"],
.ams-comments textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  border: 1px solid #dcdcdc;
  border-radius: var(--ams-radius);
}
.ams-comments textarea { min-height: 140px; }
.ams-comments .comment-form p { margin-bottom: 1rem; }
.ams-comments label { display: block; font-size: 0.8rem; color: var(--ams-muted); margin-bottom: 0.25rem; }
.ams-comments .submit {
  display: inline-block;
  padding: 0.6rem 1.5rem;
  font-weight: 700;
  border: 1px solid var(--ams-gold);
  background: var(--ams-gold);
  color: var(--ams-body);
  border-radius: var(--ams-radius);
  cursor: pointer;
}

/* ---------- Footer ---------- */
.ams-footer {
  position: relative;
  z-index: 11;
  background-color: #fff;
  border-top: 1px solid var(--ams-line);
  padding: 2rem 0;
  text-align: center;
}
.ams-footer__links { margin-bottom: 0.5rem; }
.ams-footer__links ul { margin: 0; padding: 0; list-style: none; }
.ams-footer__links li { margin: 0; padding: 0; display: inline-block; border-left: 1px solid var(--ams-ink); }
.ams-footer__links li:first-child { border: none; }
.ams-footer__links a { display: block; padding: 0 0.5rem; font-size: 0.95rem; color: var(--ams-body); }
.ams-footer__links a:hover { color: var(--ams-red); }
.ams-footer__copy {
  display: inline-block;
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-top: 1px dotted #495057;
  color: var(--ams-muted);
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 900px;
}

/* ---------- WordPress core classes ---------- */
.alignleft { float: left; margin: 0 1.5rem 1rem 0; }
.alignright { float: right; margin: 0 0 1rem 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide, .alignfull { max-width: 100%; }
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 0.85rem; color: var(--ams-muted); text-align: center; }
.sticky, .gallery-caption, .bypostauthor { display: block; }
.wp-block-image { margin-bottom: 1.6rem; }