/*
Theme Name: Elevate Delhi 7 Blog
Theme URI: https://www.elevatedelhi7.com/blog/
Description: Custom blog theme for elevatedelhi7.com, matched to the main site (Poppins, #8d2700 / #af5835, 1400px container).
Author: Elevate Delhi 7
Version: 1.0
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: elevate-blog
*/

/* ---------- Fonts (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 {
  --ed-primary: #8d2700;
  --ed-primary-dark: #5a1900;
  --ed-secondary: #af5835;
  --ed-cream: #fcf9ef;
  --ed-body: #212529;
  --ed-muted: #6c757d;
  --ed-border: #dcdcdc;
  --ed-line: rgba(141, 39, 0, 0.12);
  --ed-container: 1400px;
  --ed-radius: 0.5rem;
  --ed-radius-lg: 1rem;
}

/* ---------- 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(--ed-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(--ed-primary); text-decoration: none; }
a:hover { color: var(--ed-primary-dark); text-decoration: underline; }

h1, h2, h3, h4, h5, h6 { margin-top: 0; margin-bottom: 0.75rem; font-weight: 700; line-height: 1.25; }
h1 { font-size: 2.25rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.15rem; }
p { margin-top: 0; margin-bottom: 1rem; }

.ed-container {
  width: 100%;
  max-width: var(--ed-container);
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
}
.ed-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(--ed-primary); color: #fff;
  padding: 0.6rem 1rem; z-index: 9999;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Buttons ---------- */
.ed-btn {
  display: inline-block;
  padding: 0.6rem 1.4rem;
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 0.25rem;
  border: 1px solid var(--ed-primary);
  background-color: var(--ed-primary);
  color: #fff;
  cursor: pointer;
  transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
}
.ed-btn:hover { background-color: var(--ed-primary-dark); border-color: var(--ed-primary-dark); color: #fff; text-decoration: none; }
.ed-btn--outline { background-color: transparent; color: var(--ed-primary); }
.ed-btn--outline:hover { background-color: var(--ed-primary); color: #fff; }

/* ---------- Header ---------- */
.ed-header {
  position: sticky;
  top: 0;
  z-index: 1030;
  background-color: #fff;
  border-bottom: 1px solid var(--ed-line);
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.05);
}
.ed-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 68px;
}
.ed-brand { display: flex; align-items: center; }
.ed-brand img, .ed-brand svg { height: 52px; width: auto; display: block; }
.ed-brand:hover { text-decoration: none; }
.ed-brand__text { font-weight: 700; font-size: 1.15rem; color: var(--ed-primary); }

.ed-nav ul {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.ed-nav a {
  display: block;
  padding: 1.1rem 1rem;
  color: #000;
  font-size: 0.95rem;
}
.ed-nav a:hover { color: var(--ed-primary); text-decoration: none; }
.ed-nav .current-menu-item > a,
.ed-nav .current_page_item > a,
.ed-nav li.is-active > a {
  background-color: var(--ed-primary);
  color: #fff;
}

.ed-nav-toggle {
  display: none;
  background: none;
  border: 0;
  padding: 0.5rem;
  line-height: 0;
  cursor: pointer;
}
.ed-nav-toggle span {
  display: block;
  width: 26px; height: 2px;
  margin: 5px 0;
  background-color: var(--ed-primary);
}

@media (max-width: 991px) {
  .ed-brand img, .ed-brand svg { height: 45px; }
  .ed-nav-toggle { display: block; }
  .ed-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--ed-line);
    display: none;
  }
  .ed-nav.is-open { display: block; }
  .ed-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .ed-nav a { padding: 0.85rem 1rem; border-top: 1px solid var(--ed-line); }
}

/* ---------- Page head ---------- */
.ed-pagehead {
  background-color: var(--ed-cream);
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--ed-line);
}
.ed-pagehead h1 { margin-bottom: 0.35rem; }
.ed-pagehead p { color: var(--ed-muted); margin-bottom: 0; }

.ed-breadcrumb {
  font-size: 0.85rem;
  color: var(--ed-muted);
  margin-bottom: 0.75rem;
}
.ed-breadcrumb a { color: var(--ed-secondary); }
.ed-breadcrumb span + span::before { content: "›"; padding: 0 0.45rem; color: var(--ed-muted); }

/* ---------- Layout ---------- */
.ed-main { padding: 3rem 0; }
.ed-layout { display: flex; flex-wrap: wrap; gap: 2.5rem; }
.ed-content { flex: 1 1 0; min-width: 0; }
.ed-sidebar { width: 340px; flex-shrink: 0; }

@media (max-width: 991px) {
  .ed-main { padding: 2rem 0; }
  .ed-layout { gap: 2rem; }
  .ed-sidebar { width: 100%; }
}

/* ---------- Post grid ---------- */
.ed-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.75rem;
}
@media (max-width: 767px) { .ed-grid { grid-template-columns: 1fr; } }

.ed-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--ed-line);
  border-radius: var(--ed-radius-lg);
  overflow: hidden;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.ed-card:hover { box-shadow: 0 10px 30px rgba(141, 39, 0, 0.12); transform: translateY(-3px); }
.ed-card__media { display: block; overflow: hidden; background: var(--ed-cream); }
.ed-card__media img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; display: block; }
.ed-card__body { padding: 1.25rem 1.35rem 1.5rem; display: flex; flex-direction: column; flex: 1 1 auto; }
.ed-card__cat {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ed-secondary);
  margin-bottom: 0.5rem;
}
.ed-card__title { font-size: 1.2rem; margin-bottom: 0.5rem; }
.ed-card__title a { color: var(--ed-body); }
.ed-card__title a:hover { color: var(--ed-primary); text-decoration: none; }
.ed-card__excerpt { color: #495057; font-size: 0.95rem; margin-bottom: 1rem; }
.ed-card__meta {
  margin-top: auto;
  padding-top: 0.85rem;
  border-top: 1px dotted var(--ed-border);
  font-size: 0.82rem;
  color: var(--ed-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

/* ---------- Single ---------- */
.ed-article__header { margin-bottom: 1.5rem; }
.ed-article__header h1 { font-size: 2.1rem; }
.ed-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.88rem;
  color: var(--ed-muted);
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--ed-line);
}
.ed-meta strong { color: var(--ed-body); font-weight: 700; }

.ed-featured { margin: 1.5rem 0 2rem; }
.ed-featured img { width: 100%; border-radius: var(--ed-radius-lg); display: block; }

.ed-entry { font-size: 1.02rem; line-height: 1.75; }
.ed-entry > *:first-child { margin-top: 0; }
.ed-entry h2 {
  font-size: 1.6rem;
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--ed-line);
}
.ed-entry h3 { font-size: 1.3rem; margin-top: 1.85rem; color: var(--ed-secondary); }
.ed-entry h4 { font-size: 1.1rem; margin-top: 1.5rem; }
.ed-entry ul, .ed-entry ol { padding-left: 1.35rem; margin-bottom: 1.25rem; }
.ed-entry li { margin-bottom: 0.5rem; }
.ed-entry img { border-radius: var(--ed-radius); }
.ed-entry figcaption { font-size: 0.85rem; color: var(--ed-muted); text-align: center; padding-top: 0.5rem; }
.ed-entry blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.35rem;
  background: var(--ed-cream);
  border-left: 4px solid var(--ed-secondary);
  border-radius: 0 var(--ed-radius) var(--ed-radius) 0;
}
.ed-entry blockquote p:last-child { margin-bottom: 0; }
.ed-entry a { text-decoration: underline; }

.ed-entry table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.ed-entry table th,
.ed-entry table td {
  border: 1px solid var(--ed-line);
  padding: 0.7rem 0.85rem;
  text-align: left;
  vertical-align: top;
}
.ed-entry table thead th { background-color: var(--ed-primary); color: #fff; border-color: var(--ed-primary); }
.ed-entry table tbody tr:nth-child(even) { background-color: rgba(175, 88, 53, 0.06); }
.ed-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin-bottom: 1.5rem; }
.ed-table-scroll > table { margin-bottom: 0; }

.ed-tags { margin: 2rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--ed-line); font-size: 0.88rem; }
.ed-tags a {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  margin: 0 0.35rem 0.35rem 0;
  border: 1px solid var(--ed-line);
  border-radius: 50rem;
  color: var(--ed-secondary);
}
.ed-tags a:hover { background: var(--ed-primary); border-color: var(--ed-primary); color: #fff; text-decoration: none; }

/* ---------- Project CTA ---------- */
.ed-cta {
  margin: 2.5rem 0 0;
  padding: 2rem 1.75rem;
  background: rgba(175, 88, 53, 0.12);
  border: 1px solid rgba(175, 88, 53, 0.3);
  border-radius: var(--ed-radius-lg);
  text-align: center;
}
.ed-cta h2 { font-size: 1.45rem; margin-bottom: 0.5rem; }
.ed-cta p { color: #495057; max-width: 620px; margin: 0 auto 1.25rem; }

/* ---------- Post navigation ---------- */
.ed-postnav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
}
.ed-postnav__item {
  flex: 1 1 240px;
  border: 1px solid var(--ed-line);
  border-radius: var(--ed-radius);
  padding: 1rem 1.15rem;
}
.ed-postnav__label { display: block; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ed-muted); margin-bottom: 0.3rem; }
.ed-postnav__item a { font-weight: 700; color: var(--ed-body); }
.ed-postnav__item a:hover { color: var(--ed-primary); text-decoration: none; }
.ed-postnav__item--next { text-align: right; }

/* ---------- Related ---------- */
.ed-related { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--ed-line); }
.ed-related h2 { font-size: 1.5rem; margin-bottom: 1.25rem; }

/* ---------- Sidebar ---------- */
.ed-widget {
  background: #fff;
  border: 1px solid var(--ed-line);
  border-radius: var(--ed-radius-lg);
  padding: 1.35rem 1.4rem;
  margin-bottom: 1.5rem;
}
.ed-widget__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 1rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--ed-primary);
}
.ed-widget ul { list-style: none; margin: 0; padding: 0; }
.ed-widget li { padding: 0.55rem 0; border-bottom: 1px dotted var(--ed-border); font-size: 0.94rem; }
.ed-widget li:last-child { border-bottom: 0; padding-bottom: 0; }
.ed-widget a { color: var(--ed-body); }
.ed-widget a:hover { color: var(--ed-primary); text-decoration: none; }

.ed-widget--project { background: var(--ed-cream); border-color: rgba(175, 88, 53, 0.3); }
.ed-widget--project .ed-facts { list-style: none; margin: 0 0 1.1rem; padding: 0; }
.ed-widget--project .ed-facts li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.9rem;
  border-bottom: 1px solid rgba(175, 88, 53, 0.2);
}
.ed-widget--project .ed-facts strong { font-weight: 700; }
.ed-widget--project .ed-btn { width: 100%; text-align: center; }

.ed-searchform { display: flex; gap: 0.5rem; }
.ed-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 var(--ed-border);
  border-radius: 0.25rem;
}
.ed-searchform input[type="search"]:focus { outline: 0; border-color: var(--ed-secondary); box-shadow: 0 0 0 0.2rem rgba(141, 39, 0, 0.15); }
.ed-searchform button { flex-shrink: 0; }

/* ---------- Pagination ---------- */
.ed-pagination { margin-top: 2.5rem; }
.ed-pagination .nav-links { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; }
.ed-pagination .page-numbers {
  display: inline-block;
  min-width: 2.5rem;
  padding: 0.5rem 0.75rem;
  text-align: center;
  border: 1px solid var(--ed-line);
  border-radius: 0.25rem;
  color: var(--ed-body);
}
.ed-pagination .page-numbers:hover { background: var(--ed-cream); text-decoration: none; }
.ed-pagination .page-numbers.current { background: var(--ed-primary); border-color: var(--ed-primary); color: #fff; }

/* ---------- Comments ---------- */
.ed-comments { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--ed-line); }
.ed-comments h2, .ed-comments h3 { font-size: 1.35rem; }
.ed-comments .comment-list { list-style: none; margin: 0 0 2rem; padding: 0; }
.ed-comments .comment-list li { padding: 1.15rem 0; border-bottom: 1px dotted var(--ed-border); }
.ed-comments .comment-list .children { list-style: none; padding-left: 1.5rem; }
.ed-comments .comment-meta { font-size: 0.85rem; color: var(--ed-muted); margin-bottom: 0.4rem; }
.ed-comments input[type="text"],
.ed-comments input[type="email"],
.ed-comments input[type="url"],
.ed-comments textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font-family: inherit;
  font-size: 0.95rem;
  border: 1px solid var(--ed-border);
  border-radius: 0.25rem;
}
.ed-comments textarea { min-height: 140px; }
.ed-comments .comment-form p { margin-bottom: 1rem; }
.ed-comments label { display: block; font-size: 0.85rem; color: var(--ed-muted); margin-bottom: 0.25rem; }
.ed-comments .submit { display: inline-block; padding: 0.6rem 1.4rem; font-weight: 700; border: 1px solid var(--ed-primary); background: var(--ed-primary); color: #fff; border-radius: 0.25rem; cursor: pointer; }

/* ---------- Footer ---------- */
.ed-footer {
  background-color: #fff;
  border-top: 1px solid var(--ed-line);
  padding: 2.5rem 0 2rem;
  text-align: center;
}
.ed-footer__links ul { list-style: none; margin: 0; padding: 0; }
.ed-footer__links li { display: inline-block; border-left: 1px solid var(--ed-primary); }
.ed-footer__links li:first-child { border-left: 0; }
.ed-footer__links a { display: block; padding: 0 0.6rem; font-size: 0.95rem; }
.ed-footer__copy {
  display: inline-block;
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-top: 1px dotted #495057;
  color: var(--ed-muted);
  font-size: 0.9rem;
}
.ed-footer__legal {
  margin: 1rem auto 0;
  max-width: 900px;
  padding-top: 0.75rem;
  border-top: 1px dotted #adb5bd;
  color: #495057;
  font-size: 0.8125rem;
  line-height: 1.6;
}
.ed-footer__legal p { margin-bottom: 0.35rem; }
.ed-footer__legal a { text-decoration: underline; }

/* ---------- 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(--ed-muted); text-align: center; }
.sticky, .gallery-caption, .bypostauthor { display: block; }
.wp-block-image { margin-bottom: 1.5rem; }
