/**
 * Theme Name: Astra Child
 * Author: Brainstorm Force
 * Author URI: http://wpastra.com/about/
 * Description: Astra Child theme customized for MediRank 2.0 - Medical SEO Agency for Doctors, Med Spas & Clinics.
 * Version: 2.0.1
 * License: GNU General Public License v2 or later
 * License URI: http://www.gnu.org/licenses/gpl-2.0.html
 * Text Domain: astra-child
 * Template: astra
 */

/* ==========================================================================
   Astra Child Theme Integration & Resets for MediRank 2.0
   ========================================================================== */

/* 1. Global Reset & Astra Container Override */
html,
body,
body.ast-plain-container,
body.ast-page-builder-template {
  background-color: var(--ink, #03060c) !important;
  color: var(--white, #ffffff) !important;
  font-family: var(--body, "Poppins", system-ui, -apple-system, sans-serif);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

#page,
.site,
.site-content,
.ast-container,
#content,
#primary,
#main {
  background: transparent !important;
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  box-shadow: none !important;
  border: none !important;
}

/* Disable any Astra banner, featured image wrapper, or title backgrounds on pages */
.page .ast-single-post-order,
.page .ast-banner-layout-1,
.page .ast-banner-layout-2,
.page .post-thumb-img-content,
.page .ast-featured-image-top,
.home .ast-single-post-order,
.home .post-thumb-img-content {
  display: none !important;
}

/* Ensure MediRank sections and pages take full width */
[data-route],
.medirank-page,
.medirank-section {
  display: block !important;
  width: 100%;
}

/* ==========================================================================
   2. Heading Colors & Typography Resets (Overrides Astra default dark text)
   ========================================================================== */

/* All headings on dark background MUST be crisp pure white */
h1,
h2,
h3,
h4,
h5,
h6,
.d,
.d-xxl,
.d-xl,
.d-l,
.d-m,
.d-s,
.hero h1,
.hero h1 span,
.hero h1 .ln,
.hero h1 .ln>span,
.sec h2,
.sec h3,
.head h2,
.head h2 span,
.rows .row h3,
.pillars .pillar h3,
.cases .case h3,
.case--real h3,
.tl .tl__item h3,
.svc h2,
.final h2,
.final h2 span:not(.blue),
.panel h2,
.panel h3,
.contact h1,
.contact h2 {
  color: #ffffff !important;
}

/* Specific light background overrides */
.light,
.light h1,
.light h2,
.light h3,
.light h4,
.light h5,
.light h6,
.light .d,
.light .d-xxl,
.light .d-xl,
.light .d-l,
.light .d-m,
.light .d-s,
.light .head h2,
.light .head h2 span,
.light .rows .row h3,
.light .niche h3,
.light .niche h3 a,
.light .tl .tl__item h3,
.light .out h3,
.light .answer h2,
.light .card h3,
.light .feat h2,
.light .prose h1,
.light .prose h2,
.light .prose h3,
.light .notes h2,
.light .diff h3 {
  color: var(--text-dk, #0b1422) !important;
}

/* Blue branding highlights */
.blue,
.d .blue,
.hero h1 .blue,
.hero h1 .ln>span.blue,
.final h2 .blue {
  color: var(--sky, #1aa7fa) !important;
}

.light .blue,
.light .d .blue {
  color: var(--blue, #0075d3) !important;
}

/* In .art-cta (dark card inside light prose), headings must stay white */
.prose .art-cta h3,
.art-cta h3 {
  color: #ffffff !important;
}

/* Eyebrows */
.eyebrow {
  color: var(--sky, #1aa7fa) !important;
}

.light .eyebrow {
  color: var(--blue, #0075d3) !important;
}

/* Lead text and paragraphs */
.lead {
  color: var(--white, #ffffff);
}

.lead.muted,
.head .lead.muted,
.sec .lead.muted {
  color: var(--muted, #9fb0c6) !important;
}

.light .lead {
  color: var(--text-dk, #0b1422) !important;
}

.light .lead.muted,
.light .muted {
  color: var(--muted-dk, #4b5a6e) !important;
}

/* General link inheritance */
a {
  color: inherit;
  text-decoration: none;
}

.tlink {
  color: var(--sky, #1aa7fa) !important;
}

.light .tlink {
  color: var(--blue, #0075d3) !important;
}

/* 3. WordPress Admin Bar Offset */
body.admin-bar .hdr {
  top: 46px;
}

@media screen and (max-width: 782px) {
  body.admin-bar .hdr {
    top: 56px;
  }
}

/* 4. Dynamic Blog & Single Post Styling */
.medirank-single-post {
  display: block;
  width: 100%;
}

.prose img {
  max-width: 100%;
  height: auto;
  border-radius: var(--r, 22px);
  margin: 28px 0;
}

.prose blockquote {
  border-left: 3px solid var(--blue, #0075d3);
  padding: 18px 24px;
  margin: 28px 0;
  background: rgba(0, 117, 211, 0.06);
  border-radius: 0 14px 14px 0;
  font-style: italic;
  color: var(--muted-dk, #4b5a6e);
}

.prose pre,
.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background: rgba(11, 20, 34, 0.08);
  border-radius: 6px;
  font-size: 0.9em;
}

.prose pre {
  padding: 16px 20px;
  overflow-x: auto;
  margin: 20px 0;
}

.prose code {
  padding: 2px 6px;
}

/* WordPress Pagination (.pager) */
.pager {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin-top: 48px;
  flex-wrap: wrap;
}

.pager .page-numbers {
  min-width: 44px;
  min-height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(11, 20, 34, 0.18);
  background: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--text-dk, #0b1422);
  padding: 0 16px;
  transition: all 0.25s var(--ease);
}

.pager .page-numbers.current,
.pager .page-numbers:hover {
  background: var(--text-dk, #0b1422);
  color: #ffffff;
  border-color: var(--text-dk, #0b1422);
}

.pager .page-numbers.dots {
  border: none;
  background: transparent;
  cursor: default;
}

/* 5. WordPress Custom Logo & Site Branding */
.custom-logo-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.custom-logo-link img.custom-logo {
  height: 40px;
  width: auto;
  max-height: 40px;
}

@media (max-width: 480px) {
  .custom-logo-link img.custom-logo {
    height: 32px;
  }
}

/* 6. Mobile Accordion in mnav */
.mdd {
  display: flex;
  flex-direction: column;
}

/* 7. Form Feedback Messages */
.form-status {
  margin-top: 16px;
  border-radius: 14px;
  padding: 16px 20px;
  font-size: 15px;
  line-height: 1.5;
}


button:focus,
.menu-toggle:hover,
button:hover,
.ast-button:hover,
.ast-custom-button:hover .button:hover,
.ast-custom-button:hover,
input[type=reset]:hover,
input[type=reset]:focus,
input#submit:hover,
input#submit:focus,
input[type="button"]:hover,
input[type="button"]:focus,
input[type="submit"]:hover,
input[type="submit"]:focus,
form[CLASS*="wp-block-search__"].wp-block-search .wp-block-search__inside-wrapper .wp-block-search__button:hover,
form[CLASS*="wp-block-search__"].wp-block-search .wp-block-search__inside-wrapper .wp-block-search__button:focus,
body .wp-block-file .wp-block-file__button:hover,
body .wp-block-file .wp-block-file__button:focus {
  color: var(--white, #ffffff) !important;
  background-color: unset;
  border-color: unset;
}

/* ==========================================================================
   Contact Form 7 Custom Styling for MediRank
   ========================================================================== */
.wpcf7 {
  width: 100%;
}

.wpcf7-form {
  width: 100%;
}

.wpcf7-form p {
  margin: 0;
  padding: 0;
}

.wpcf7-form-control-wrap {
  display: block;
  width: 100%;
  position: relative;
}

/* Contact Form 7 input fields */
.f input.wpcf7-text,
.f input.wpcf7-email,
.f input.wpcf7-tel,
.f input.wpcf7-url,
.f select.wpcf7-select,
.f textarea.wpcf7-textarea {
  width: 100%;
  min-height: 54px;
  border-radius: 14px;
  border: 1px solid var(--line-2, rgba(255, 255, 255, 0.18));
  background: rgba(255, 255, 255, 0.04);
  color: #ffffff;
  padding: 14px 16px;
  font-size: 16px;
  transition: border-color 0.2s, background 0.2s;
  box-sizing: border-box;
}

.f select.wpcf7-select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #9fb0c6 50%), linear-gradient(135deg, #9fb0c6 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  color: #dbe6f3;
}

.f select.wpcf7-select option {
  background: #08101d;
  color: #ffffff;
}

.f textarea.wpcf7-textarea {
  min-height: 120px;
  resize: vertical;
}

.f input.wpcf7-text:focus,
.f input.wpcf7-email:focus,
.f input.wpcf7-tel:focus,
.f input.wpcf7-url:focus,
.f select.wpcf7-select:focus,
.f textarea.wpcf7-textarea:focus {
  outline: none;
  border-color: var(--sky, #1aa7fa);
  background: rgba(26, 167, 250, 0.06);
}

/* CF7 Submit Button */
.cform input[type="submit"].btn,
.wpcf7-submit.btn,
input.wpcf7-submit {
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 36px;
  border-radius: 999px;
  background: var(--blue, #0075d3) !important;
  color: #ffffff !important;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 24px rgba(0, 117, 211, 0.35) !important;
}

.cform input[type="submit"].btn:hover,
.wpcf7-submit.btn:hover,
input.wpcf7-submit:hover {
  background: var(--sky, #1aa7fa) !important;
  box-shadow: 0 10px 30px rgba(26, 167, 250, 0.45) !important;
  transform: translateY(-1px);
}

/* CF7 Validation Error Tips */
.wpcf7-not-valid-tip {
  display: block;
  color: #ff7a7a !important;
  font-size: 12.5px !important;
  font-weight: 600 !important;
  margin-top: 6px !important;
  letter-spacing: normal;
}

.wpcf7-not-valid,
.f input.wpcf7-not-valid,
.f select.wpcf7-not-valid,
.f textarea.wpcf7-not-valid {
  border-color: #ff7a7a !important;
  background: rgba(255, 122, 122, 0.06) !important;
}

/* CF7 Spinner */
.wpcf7-spinner {
  margin-left: 14px;
  vertical-align: middle;
  background-color: var(--sky, #1aa7fa) !important;
}

/* CF7 Response Output Box */
.wpcf7-response-output {
  grid-column: 1 / -1;
  border-radius: 14px !important;
  padding: 16px 20px !important;
  margin: 18px 0 0 !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  line-height: 1.5 !important;
  font-family: inherit !important;
  box-sizing: border-box !important;
}

/* CF7 Success message */
.wpcf7 form.sent .wpcf7-response-output,
.wpcf7-response-output.wpcf7-mail-sent-ok {
  background: rgba(48, 209, 140, 0.12) !important;
  border: 1px solid rgba(48, 209, 140, 0.4) !important;
  color: #a6f0cf !important;
}

/* CF7 Error / Validation message */
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7-response-output.wpcf7-validation-errors,
.wpcf7-response-output.wpcf7-mail-sent-ng {
  background: rgba(255, 122, 122, 0.1) !important;
  border: 1px solid rgba(255, 122, 122, 0.4) !important;
  color: #ffc0c0 !important;
}