/**
 * SCOREMORE brand UI polish + responsive fixes
 * @package pte-naati-pro
 */

/* ── Typography polish ──────────────────────────────────────── */
body,
.ptenp-page,
.blp-wrap,
.sp-layout {
  font-family: var(--font-body);
  font-weight: var(--font-weight-regular);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.ptenp-heading,
.ptenp-hero-title,
.ptenp-bottom-title,
.ptenp-cpage-hero h1,
.ptenp-page-hero__title {
  font-family: var(--font-display);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.03em;
}

.nav-primary .menu-item > a {
  font-weight: var(--font-weight-medium);
  font-size: 0.9375rem;
}

.nav-primary .menu-item.current-menu-item > a,
.nav-primary .menu-item.current-menu-ancestor > a {
  font-weight: var(--font-weight-semibold);
}

.mobile-nav .menu-item > a {
  font-family: var(--font-display);
  font-weight: var(--font-weight-semibold);
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
}

.ptenp-hero-sub,
.ptenp-subheading,
.footer-description,
.footer-col-content {
  font-size: clamp(0.9375rem, 1.05vw, 1.0625rem);
  line-height: 1.75;
}

.ptenp-eyebrow,
.ptenp-hero-badge {
  font-weight: var(--font-weight-semibold);
  letter-spacing: 0.1em;
}

/* ── Brand token aliases (home/shortcodes legacy vars) ──────── */
:root {
  --ptenp-navy-900: var(--color-primary-dark);
  --ptenp-navy-800: var(--color-primary);
  --ptenp-navy-700: var(--color-primary-light);
  --ptenp-navy: var(--color-primary);
  --ptenp-blue: var(--color-primary-light);
  --ptenp-gold: var(--color-accent);
  --ptenp-gold-500: var(--color-accent);
  --ptenp-text-900: var(--color-body-text);
  --ptenp-text-700: #3D3D3D;
  --ptenp-text-500: var(--color-mid-gray);
  --ptenp-line: var(--color-light-gray);
  --ptenp-bg-soft: var(--color-off-white);
  --ptenp-shadow-sm: var(--shadow-sm);
  --ptenp-shadow-md: var(--shadow-md);
}

/* ── Global layout containment ──────────────────────────────── */
html {
  overflow-x: clip;
}

.site-wrapper,
.site-main,
.ptenp-page {
  overflow-x: clip;
}

.container,
.ptenp-wrap {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-padding);
}

.ptenp-wrap {
  max-width: min(1160px, 100%);
}

/* ── Header & logo ──────────────────────────────────────────── */
.site-branding .custom-logo-link,
.mobile-nav__logo .custom-logo-link,
.footer-logo .custom-logo-link {
  display: inline-flex;
  border-radius: var(--radius-sm);
  overflow: hidden;
  line-height: 0;
}

.custom-logo {
  height: clamp(40px, 5vw, var(--logo-h));
  width: auto;
  max-width: min(240px, 48vw);
  object-fit: contain;
  display: block;
}

.site-header.is-scrolled .custom-logo {
  height: clamp(36px, 4.5vw, var(--logo-h-sm));
}

.nav-primary .menu-item.current-menu-item > a,
.nav-primary .menu-item.current-menu-ancestor > a,
.nav-primary .menu-item.current-page-ancestor > a {
  color: var(--color-accent);
}

.nav-primary .menu-item > a:hover {
  color: var(--color-accent);
}

.header-cta {
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(178, 34, 34, 0.28);
}

.header-cta:hover {
  box-shadow: 0 8px 24px rgba(178, 34, 34, 0.38);
}

/* ── Buttons (homepage + pages) ─────────────────────────────── */
.ptenp-btn--primary {
  background: var(--gradient-accent);
  box-shadow: 0 10px 24px rgba(178, 34, 34, 0.28);
}

.ptenp-btn--primary:hover {
  box-shadow: 0 14px 30px rgba(178, 34, 34, 0.36);
}

.ptenp-eyebrow {
  color: var(--color-accent);
}

.ptenp-heading span,
.ptenp-heading em {
  color: var(--color-accent);
}

/* ── Hero brand gradient ──────────────────────────────────────── */
.ptenp-hero::before {
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.1), transparent 45%),
    radial-gradient(circle at 90% 84%, rgba(178, 34, 34, 0.22), transparent 38%);
}

/* ── Footer — SCOREMORE dark shell ──────────────────────────── */
.site-footer {
  background: linear-gradient(180deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
  color: rgba(255, 255, 255, 0.78);
}

.site-footer::before {
  background: radial-gradient(circle, rgba(178, 34, 34, 0.18) 0%, transparent 65%);
}

.site-footer::after {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.04) 0%, transparent 65%);
}

.footer-logo img {
  height: clamp(36px, 5vw, 44px);
  width: auto;
  filter: none;
  opacity: 1;
  object-fit: contain;
}

.footer-widget-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.92);
  font-size: var(--fs-xs);
  letter-spacing: 0.1em;
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-widget-title::before {
  content: '';
  width: 20px;
  height: 2px;
  background: var(--color-accent);
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.footer-column .footer-menu a,
.footer-column .menu a,
.footer-column ul li a {
  min-height: var(--touch-min);
  padding-block: 6px;
  font-size: var(--fs-sm);
  color: rgba(255, 255, 255, 0.68);
  line-height: 1.4;
}

.footer-column .footer-menu a::before,
.footer-column .menu a::before,
.footer-column ul li a::before {
  background: var(--color-accent);
}

.footer-column .footer-menu a:hover,
.footer-column .menu a:hover,
.footer-column ul li a:hover {
  color: var(--color-white);
  padding-inline-start: 2px;
}

.footer-col-content {
  color: rgba(255, 255, 255, 0.72);
}

.footer-contact-item svg {
  stroke: var(--color-accent);
}

.social-link:hover {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

/* Newsletter strip */
.footer-newsletter {
  background: linear-gradient(135deg, rgba(178, 34, 34, 0.12) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.footer-newsletter-eyebrow {
  color: var(--color-accent-light);
}

.newsletter-submit {
  background: var(--color-accent);
  font-weight: 700;
}

.newsletter-submit:hover {
  background: var(--color-accent-dark);
}

/* Legal menu — pill links */
.footer-legal-links {
  width: 100%;
  justify-content: flex-end;
}

.footer-legal-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-legal-menu li {
  margin: 0;
}

.footer-legal-menu a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.55);
  font-size: var(--fs-xs);
  font-weight: 500;
  text-decoration: none;
  transition:
    color var(--dur-fast),
    border-color var(--dur-fast),
    background var(--dur-fast);
  white-space: nowrap;
}

.footer-legal-menu a:hover {
  color: var(--color-white);
  border-color: rgba(178, 34, 34, 0.6);
  background: rgba(178, 34, 34, 0.18);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-back-top:hover svg {
  border-color: var(--color-accent);
  stroke: var(--color-accent-light);
}

/* Footer grid — auto-fit for all column counts */
.footer-grid,
.footer-grid--cols-1,
.footer-grid--cols-2,
.footer-grid--cols-3,
.footer-grid--cols-4 {
  display: grid;
  gap: var(--sp-10);
  align-items: start;
}

.footer-grid--brand-only {
  grid-template-columns: 1fr;
}

/* Brand spans full row only on tablet/mobile — see footer.css */

/* ── Section rhythm ─────────────────────────────────────────── */
.ptenp-section {
  padding-block: clamp(56px, 8vw, 92px);
}

/* ── Mobile drawer polish ───────────────────────────────────── */
.mobile-nav .menu-item > a {
  min-height: var(--touch-min);
  display: flex;
  align-items: center;
}

.mobile-nav .menu-item.current-menu-item > a,
.mobile-nav .menu-item.current-menu-ancestor > a {
  color: var(--color-accent);
}

/* ── Responsive: tablet ─────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid--cols-3,
  .footer-grid--cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-column--brand {
    grid-column: 1 / -1;
  }

  .footer-legal-links {
    justify-content: flex-start;
  }
}

/* ── Responsive: mobile ─────────────────────────────────────── */
@media (max-width: 768px) {
  .footer-top {
    padding-block: var(--sp-12) var(--sp-10);
  }

  .footer-grid,
  .footer-grid--cols-1,
  .footer-grid--cols-2,
  .footer-grid--cols-3,
  .footer-grid--cols-4 {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .footer-column,
  .footer-column--brand {
    grid-column: auto;
    padding: var(--sp-6) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  }

  .footer-column:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .footer-column--brand {
    padding-top: 0;
  }

  .footer-widget-title {
    margin-bottom: var(--sp-4);
    cursor: default;
  }

  .footer-description {
    max-width: 100%;
  }

  .footer-social {
    margin-top: var(--sp-4);
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
    gap: var(--sp-5);
  }

  .footer-copyright,
  .footer-disclaimer {
    max-width: 100%;
    text-align: left;
  }

  .footer-legal-links {
    justify-content: flex-start;
    order: 2;
  }

  .footer-back-top {
    align-self: flex-start;
    order: 3;
  }

  .footer-newsletter-title {
    font-size: var(--fs-2xl);
  }
}

@media (max-width: 640px) {
  .header-phone span {
    display: none;
  }

  .footer-legal-menu {
    width: 100%;
    justify-content: flex-start;
  }

  .footer-legal-menu a {
    min-height: var(--touch-min);
    flex: 1 1 auto;
  }
}

@media (max-width: 480px) {
  .footer-legal-menu {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }

  .footer-legal-menu a {
    width: 100%;
    justify-content: center;
  }

  .social-link {
    width: 44px;
    height: 44px;
  }
}

/* ── Course / page templates ────────────────────────────────── */
@media (max-width: 768px) {
  .ptenp-cpage-hero__inner,
  .ptenp-page-hero__grid,
  .ptenp-loc-hero-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .ptenp-cpage-tabs,
  .ptenp-cpage-tab-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .ptenp-cpage-tab-nav::-webkit-scrollbar {
    display: none;
  }
}

/* ── Blog layout ────────────────────────────────────────────── */
@media (max-width: 900px) {
  .blp-hero,
  .blp-featured-grid,
  .blp-post-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Shortcode grids ────────────────────────────────────────── */
@media (max-width: 768px) {
  .ptenp-sc-courses,
  .ptenp-sc-results,
  .ptenp-sc-testimonials,
  .ptenp-sc-locations {
    grid-template-columns: 1fr !important;
  }
}

/* ── Safe areas (notched phones) ────────────────────────────── */
@supports (padding: max(0px)) {
  .site-header .header-inner,
  .container,
  .ptenp-wrap {
    padding-inline: max(var(--container-padding), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  }

  .footer-bottom,
  .footer-top,
  .footer-newsletter {
    padding-inline: max(0px, env(safe-area-inset-left, 0px)) max(0px, env(safe-area-inset-right, 0px));
  }

  .mob-bottom-bar {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}
