/*
Theme Name: App Showcase Theme
Author: Mohd Ehasan
Description: Custom app-like showcase theme for wallpapers and KLWP themes.
Version: 1.3.1
Requires PHP: 8.0
*/

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: #0b0e14;
  color: #f1f5f9;
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body.light-mode {
  background-color: #f4f7fb;
  color: #101827;
}

img,
svg {
  max-width: 100%;
}

main {
  flex: 1;
}


.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(18, 24, 38, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid #1f293d;
  padding: 12px 20px;
}

body.light-mode .site-header {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: #d9e2ef;
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.site-logo a {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
}

body.light-mode .site-logo a {
  color: #0f172a;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.category-dropdown { position: relative; }
.category-toggle {
  height: 42px;
  border: 1px solid #1f293d;
  border-radius: 12px;
  padding: 0 13px;
  background: #111827;
  color: #f8fafc;
  font: inherit;
  font-weight: 650;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.category-toggle svg { width: 18px; height: 18px; transition: transform .2s ease; }
.category-dropdown.is-open .category-toggle svg { transform: rotate(180deg); }
.category-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 150;
  width: 220px;
  max-height: min(60vh, 440px);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #26344b;
  border-radius: 14px;
  background: #111827;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .32);
}
.category-dropdown.is-open .category-menu { display: block; }
.category-menu a { display: block; padding: 10px 12px; border-radius: 8px; color: #e2e8f0; font-size: .94rem; text-decoration: none; }
.category-menu a:hover, .category-menu a:focus { background: #1d4ed8; color: #fff; outline: none; }
body.light-mode .category-toggle { border-color: #d9e2ef; background: #fff; color: #0f172a; }
body.light-mode .category-menu { border-color: #d9e2ef; background: #fff; box-shadow: 0 16px 34px rgba(15, 23, 42, .14); }
body.light-mode .category-menu a { color: #334155; }
body.light-mode .category-menu a:hover, body.light-mode .category-menu a:focus { color: #fff; }

.icon-btn {
  width: 42px;
  height: 42px;
  border: 1px solid #1f293d;
  border-radius: 12px;
  background: #111827;
  color: #f8fafc;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.icon-btn:hover {
  background: #172033;
  border-color: #334155;
  transform: translateY(-1px);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

body.light-mode .icon-btn {
  background: #ffffff;
  border-color: #d9e2ef;
  color: #0f172a;
}

body.light-mode .icon-btn:hover {
  background: #eef4ff;
}

.header-search {
  width: 0;
  opacity: 0;
  visibility: hidden;
  flex-shrink: 1;
  min-width: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  transition: width 0.25s ease, opacity 0.2s ease;
}

.header-search.is-open {
  width: min(320px, 42vw);
  opacity: 1;
  visibility: visible;
}

.header-search input {
  min-width: 0;
  font: inherit;
  font-size: 16px;
  width: 100%;
  height: 42px;
  border: 1px solid #1f293d;
  border-right: 0;
  border-radius: 12px 0 0 12px;
  background: #111827;
  color: #f8fafc;
  padding: 0 13px;
  outline: none;
}

.header-search input:focus {
  border-color: #2563eb;
}

.header-search .search-submit {
  border-radius: 0 12px 12px 0;
}

body.light-mode .header-search input {
  background: #ffffff;
  border-color: #d9e2ef;
  color: #0f172a;
}

.theme-toggle .sun-icon {
  display: none;
}

body.light-mode .theme-toggle .moon-icon {
  display: none;
}

body.light-mode .theme-toggle .sun-icon {
  display: block;
}

.screen-reader-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.app-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  padding: 16px;
  max-width: 1400px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .app-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
  }
}

@media (max-width: 640px) {
  .site-header {
    padding: 10px 14px;
  }

  .header-inner {
    gap: 10px;
  }

  .site-logo a {
    font-size: 1.05rem;
  }

  .header-actions {
    gap: 8px;
  }

  .icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
  }

  .header-search.is-open {
    width: 100%;
    flex: 1;
  }

  .header-inner.search-open .site-logo { display: none; }
  .header-inner.search-open .header-actions { width: 100%; }

  .header-search input {
    height: 42px;
  }

  .category-menu { right: -48px; width: min(220px, calc(100vw - 28px)); }
}

@media (max-width: 360px) {
  .category-toggle { width: 38px; justify-content: center; padding: 0; font-size: 0; }
  .category-toggle svg { width: 20px; height: 20px; }
}

.header-inner { min-height: 42px; }
.site-logo { min-width: 0; }
.site-logo a { display: block; overflow-wrap: anywhere; }
.header-actions { min-width: 0; flex-shrink: 0; }
.header-search:not(.is-open) { margin-right: -10px; }
.header-actions .icon-btn { flex-shrink: 0; border-radius: 8px; }
.header-search .search-submit { height: 42px; border-radius: 0 8px 8px 0; }
.header-search input { border-radius: 8px 0 0 8px; }
.header-search:focus-within { border-radius: 8px; outline: 2px solid #3b82f6; outline-offset: 2px; }
.icon-btn:focus-visible { outline: 2px solid #3b82f6; outline-offset: 2px; }
.search-toggle[aria-expanded="true"] svg { display: none; }
.search-toggle[aria-expanded="true"]::before { content: '\00d7'; font-size: 28px; line-height: 1; }
.search-results-heading { max-width: 1400px; margin: 24px auto 8px; padding: 0 16px; overflow-wrap: anywhere; }
.search-results-heading h1 { font-size: 24px; margin-bottom: 8px; }
.search-pagination { text-align: center; padding: 24px 16px; }
.search-pagination a, .search-pagination span { display: inline-block; padding: 8px 12px; color: inherit; }
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
@media (max-width: 640px) { .header-search:not(.is-open) { margin-right: -8px; } }
@media (prefers-reduced-motion: reduce) { .header-search { transition: none; } }

@media (min-width: 1024px) {
  .app-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

@media (min-width: 1280px) {
  .app-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

.showcase-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #151b28;
  aspect-ratio: 1 / 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.showcase-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.6);
}

.showcase-card a {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.showcase-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-title-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 10px 10px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.light-mode .showcase-card,
body.light-mode .theme-meta-grid div,
body.light-mode .theme-info-sections .theme-section,
body.light-mode .related-card img,
body.light-mode .related-card span,
body.light-mode .form-group input,
body.light-mode .form-group textarea,
body.light-mode .info-item .icon {
  background: #ffffff;
  border-color: #d9e2ef;
}

body.light-mode .detail-title,
body.light-mode .theme-section h2,
body.light-mode .related-themes h2,
body.light-mode .entry-title,
body.light-mode .entry-content h2,
body.light-mode .info-item h3,
body.light-mode .form-group label,
body.light-mode .related-card,
body.light-mode .theme-meta-grid strong {
  color: #0f172a;
}

body.light-mode .detail-content,
body.light-mode .theme-intro,
body.light-mode .feature-list,
body.light-mode .setup-list,
body.light-mode .entry-content,
body.light-mode .contact-info p,
body.light-mode .footer-desc,
body.light-mode .footer-links a,
body.light-mode .footer-bottom p,
body.light-mode .theme-meta-grid span {
  color: #475569 !important;
}

body.light-mode .site-footer {
  background: #ffffff;
  border-top-color: #d9e2ef;
  color: #0f172a;
}

body.light-mode .footer-heading,
body.light-mode .footer-logo,
body.light-mode .footer-bottom strong {
  color: #0f172a;
}

/* Keep single-post pages within the viewport in the site's column flex layout. */
.theme-detail-page {
  width: 100%;
  min-width: 0;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 24px 0;
}

.theme-hero {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.05fr);
  gap: 42px;
  align-items: center;
  margin-bottom: 48px;
}

.theme-preview {
  min-width: 0;
  width: 100%;
  max-width: 460px;
  justify-self: center;
}

.detail-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
  object-fit: contain;
  border-radius: 16px;
  background: #151b28;
  border: 1px solid #1f293d;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42);
  display: block;
}

.detail-img-placeholder {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748b;
  font-weight: 700;
}

.theme-summary {
  min-width: 0;
}

.theme-badge {
  display: inline-flex;
  align-items: center;
  margin-bottom: 18px;
  padding: 7px 12px;
  background: rgba(37, 99, 235, 0.16);
  border: 1px solid rgba(96, 165, 250, 0.3);
  color: #93c5fd;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.detail-title {
  margin: 0 0 18px;
  font-size: 3rem;
  line-height: 1.18;
  text-align: left;
  overflow-wrap: anywhere;
}

.theme-intro {
  color: #cbd5e1;
  font-size: 1.08rem;
  line-height: 1.7;
  margin-bottom: 24px;
}

.theme-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 28px;
}

.theme-meta-grid div {
  background: #111827;
  border: 1px solid #1f293d;
  border-radius: 12px;
  padding: 14px;
}

.theme-meta-grid span {
  display: block;
  color: #94a3b8;
  font-size: 0.78rem;
  margin-bottom: 4px;
}

.theme-meta-grid strong {
  display: block;
  color: #f8fafc;
  font-size: 0.92rem;
  line-height: 1.25;
}

.theme-section {
  margin-bottom: 42px;
}

.theme-section h2,
.related-themes h2 {
  color: #f8fafc;
  font-size: 1.55rem;
  line-height: 1.25;
  margin-bottom: 18px;
}

.detail-content {
  color: #cbd5e1;
  font-size: 1.08rem;
  line-height: 1.75;
  text-align: left;
  overflow-wrap: anywhere;
}

.detail-content p {
  margin-bottom: 20px;
}

.detail-content h2,
.detail-content h3 {
  color: #f8fafc;
  line-height: 1.25;
  margin: 36px 0 16px;
}

.detail-content ul,
.detail-content ol {
  margin: 0 0 24px 24px;
  padding-left: 18px;
}

.detail-content li {
  margin-bottom: 10px;
}

.download-action {
  margin-top: 28px;
}

.download-btn {
  display: inline-block;
  padding: 14px 36px;
  background: #2563eb;
  color: #ffffff;
  font-weight: 600;
  font-size: 1rem;
  border-radius: 50px;
  text-decoration: none;
  transition: background 0.2s;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

.download-btn:hover {
  background: #1d4ed8;
}

.theme-info-sections {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.theme-info-sections .theme-section {
  background: #111827;
  border: 1px solid #1f293d;
  border-radius: 14px;
  padding: 24px;
}

.feature-list,
.setup-list {
  color: #cbd5e1;
  padding-left: 20px;
  line-height: 1.7;
}

.feature-list li,
.setup-list li {
  margin-bottom: 10px;
}

.related-themes {
  margin-top: 10px;
}

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-heading-row h2 {
  margin-bottom: 0;
}

.section-heading-row a {
  color: #93c5fd;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

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

.related-card {
  display: block;
  color: #f8fafc;
  text-decoration: none;
}

.related-card img,
.related-card span {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111827;
  border: 1px solid #1f293d;
  border-radius: 12px;
  color: #64748b;
  margin-bottom: 10px;
}

.related-card strong {
  display: block;
  font-size: 0.95rem;
  line-height: 1.35;
}

@media (max-width: 900px) {
  .theme-hero {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .detail-title {
    font-size: 2.35rem;
  }

  .theme-info-sections,
  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .theme-detail-page {
    padding: 32px 18px 0;
  }

  .theme-hero,
  .theme-info-sections,
  .related-grid {
    grid-template-columns: 1fr;
  }

  .theme-hero {
    gap: 26px;
    margin-bottom: 34px;
  }

  .detail-title {
    font-size: 1.8rem;
  }

  .theme-preview { max-width: 320px; }

  .detail-img { aspect-ratio: 1 / 1; object-fit: contain; }

  .detail-content {
    font-size: 1rem;
    line-height: 1.7;
  }

  .theme-meta-grid {
    grid-template-columns: 1fr;
  }
}

.site-footer {
  background: #050c1a; /* गहरा नीला */
  border-top: 1px solid #1f293d;
  padding: 60px 20px 0;
  margin-top: 60px;
  color: #ffffff; /* सफेद फोंट स्पष्टता के लिए */
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

.footer-logo {
  color: #ffffff;
  font-size: 1.8rem;
  margin-bottom: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
}

.footer-desc {
  font-size: 1rem;
  line-height: 1.7;
  margin-bottom: 30px;
  max-width: 450px;
  color: #e2e8f0;
}

.footer-socials {
  display: flex;
  gap: 15px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff !important;
  border-radius: 12px;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  text-decoration: none;
}

.social-icon svg {
  width: 24px;
  height: 24px;
}

.social-icon:hover {
  background: #2563eb;
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

.footer-heading {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 30px;
  position: relative;
}

.footer-heading::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -10px;
  width: 40px;
  height: 3px;
  background: #2563eb;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 15px;
}

.footer-links a {
  color: #e2e8f0 !important;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1rem;
  display: inline-block;
  overflow-wrap: anywhere;
}

.footer-links a:hover {
  color: #ffffff !important;
  transform: translateX(8px);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 30px 20px;
  text-align: center;
}

.footer-bottom p {
  font-size: 0.95rem;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.footer-bottom strong {
  color: #ffffff;
}

@media (max-width: 992px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 34px;
  }

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

@media (max-width: 640px) {
  .site-footer {
    padding: 42px 18px 0;
    margin-top: 42px;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 28px;
    padding-bottom: 30px;
  }

  .footer-logo {
    font-size: 1.5rem;
  }

  .footer-heading {
    margin-bottom: 22px;
  }

  .footer-socials {
    flex-wrap: wrap;
  }

  .footer-bottom {
    padding: 22px 0;
  }
}

/* Editable footer palette. */
body .site-footer { background: var(--footer-background); color: var(--footer-text); }
body.light-mode .site-footer {
  --footer-background: var(--footer-light-background);
  --footer-text: var(--footer-light-text);
  --footer-heading: var(--footer-light-heading);
  --footer-accent: var(--footer-light-accent);
  background: var(--footer-background);
}
body .site-footer .footer-desc,
body .site-footer .footer-bottom p,
body .site-footer a { color: var(--footer-text) !important; }
body .site-footer .footer-heading,
body .site-footer .footer-logo,
body .site-footer .footer-bottom strong { color: var(--footer-heading); letter-spacing: 0; }
body .site-footer a:hover { color: var(--footer-accent) !important; }
body .site-footer .footer-heading::after,
body .site-footer .social-icon:hover { background: var(--footer-accent); }
body .site-footer .social-icon:hover { color: #fff !important; }
.footer-col { min-width: 0; overflow-wrap: anywhere; }
.footer-brand-image { display: block; width: auto; max-width: 100%; height: auto; max-height: 100px; margin-bottom: 20px; }
.footer-widget { margin-top: 24px; }
.footer-widget input, .footer-widget select, .footer-widget textarea { max-width: 100%; box-sizing: border-box; }
.footer-links .sub-menu { list-style: none; padding-left: 16px; margin-top: 12px; }
.footer-socials { flex-wrap: wrap; }
.footer-widget img { height: auto; }

/* Newsletter popup */
.newsletter-trigger {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: #2563eb;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.35);
}
.newsletter-popup { display: none; position: fixed; inset: 0; z-index: 1000; padding: 20px; align-items: flex-end; justify-content: center; }
.newsletter-popup.is-open { display: flex; }
.newsletter-popup__backdrop { position: absolute; inset: 0; background: rgba(2, 6, 23, 0.7); }
.newsletter-popup__panel { position: relative; width: min(100%, 480px); padding: 34px; border: 1px solid #243047; border-radius: 22px; background: #111827; color: #e2e8f0; box-shadow: 0 22px 70px rgba(0, 0, 0, 0.45); }
.newsletter-popup__close { position: absolute; top: 12px; right: 16px; border: 0; background: transparent; color: inherit; font-size: 2rem; line-height: 1; cursor: pointer; }
.newsletter-popup__eyebrow { margin-bottom: 6px; color: #60a5fa; font-size: .75rem; font-weight: 800; letter-spacing: .12em; }
.newsletter-popup h2 { margin-bottom: 8px; color: #fff; font-size: 1.7rem; }
.newsletter-popup > .newsletter-popup__panel > p { margin-bottom: 20px; }
.newsletter-popup__form { display: grid; gap: 14px; }
.newsletter-popup__form input[type="email"] { width: 100%; padding: 14px; border: 1px solid #334155; border-radius: 10px; background: #0b0e14; color: #fff; font: inherit; }
.newsletter-popup__form button[type="submit"] { border: 0; border-radius: 10px; padding: 14px; background: #2563eb; color: #fff; font: inherit; font-weight: 800; cursor: pointer; }
.newsletter-popup__consent { display: flex; gap: 9px; align-items: flex-start; font-size: .88rem; line-height: 1.45; }
.newsletter-popup__consent input { margin-top: 3px; }
.newsletter-popup__consent a { color: #93c5fd; }
.newsletter-popup__notice { padding: 10px 12px; border-radius: 8px; background: #7f1d1d; color: #fff; font-size: .92rem; }
.newsletter-popup__notice--success { background: #166534; }
body.light-mode .newsletter-popup__panel { border-color: #d9e2ef; background: #fff; color: #475569; }
body.light-mode .newsletter-popup h2 { color: #0f172a; }
body.light-mode .newsletter-popup__form input[type="email"] { border-color: #cbd5e1; background: #fff; color: #0f172a; }
body.newsletter-open { overflow: hidden; }
@media (max-width: 640px) { .newsletter-trigger { right: 14px; bottom: 14px; } .newsletter-popup__panel { padding: 30px 22px; } }

/* Page Styling */
.page-content {
  max-width: 1000px;
  margin: 56px auto;
  padding: 0 24px;
}

.entry-title {
  font-size: 2.5rem;
  margin-bottom: 30px;
  text-align: center;
}

.entry-content {
  color: #e2e8f0;
  font-size: 1.08rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.entry-content p {
  margin-bottom: 20px;
}

.entry-content h2 {
  margin: 30px 0 15px;
  color: #ffffff;
}

.entry-content ul {
  margin-bottom: 20px;
  padding-left: 20px;
}

.entry-content li {
  margin-bottom: 10px;
}

@media (max-width: 640px) {
  .page-content {
    margin: 34px auto;
    padding: 0 18px;
  }

  .entry-title {
    font-size: 1.9rem;
    line-height: 1.2;
    margin-bottom: 22px;
  }

  .entry-content {
    font-size: 1rem;
    line-height: 1.7;
  }
}

/* Professional Contact Page Styling */
.contact-page {
  padding: 80px 20px;
  background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.05), transparent);
}

.contact-container {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: center;
}

.contact-info h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--studio-text, #f1f5f9);
  background: none;
  -webkit-text-fill-color: currentColor;
}

.contact-info p {
  color: #94a3b8;
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 40px;
}

.info-items {
  display: grid;
  gap: 30px;
}

.info-item {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.info-item .icon {
  width: 50px;
  height: 50px;
  background: #151b28;
  border: 1px solid #1f293d;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 20px;
}

.info-item h3 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.info-item p {
  margin-bottom: 0;
  font-size: 1rem;
}

/* Form Styling */
.contact-form-wrapper {
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
}

.pro-contact-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.contact-info a { color: var(--studio-text, #f1f5f9); text-underline-offset: 3px; overflow-wrap: anywhere; }

.contact-notice {
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.5;
  margin-bottom: 20px;
  padding: 14px 16px;
}

.contact-notice.success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #bbf7d0;
}

.contact-notice.error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fecaca;
}

.honeypot-field {
  display: none;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: #e2e8f0;
  margin-bottom: 8px;
}

.form-group input, 
.form-group textarea {
  width: 100%;
  max-width: 100%;
  background: #151b28;
  border: 1px solid #1f293d;
  padding: 14px 18px;
  border-radius: 12px;
  color: #fff;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-group input:focus, 
.form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.submit-btn {
  width: 100%;
  background: #2563eb;
  color: #fff;
  padding: 16px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
}

.submit-btn:hover {
  background: #1d4ed8;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2);
}

@media (max-width: 900px) {
  .contact-page {
    padding: 56px 20px;
  }

  .contact-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .contact-info {
    text-align: center;
  }
  
  .info-item {
    justify-content: center;
    text-align: left;
  }
}

@media (max-width: 600px) {
  .contact-page {
    padding: 38px 18px;
  }

  .contact-info h1 {
    font-size: 2.1rem;
  }

  .contact-info p {
    font-size: 1rem;
    margin-bottom: 28px;
  }

  .info-item {
    gap: 14px;
  }

  .info-item .icon {
    width: 44px;
    height: 44px;
  }

  .pro-contact-form .form-row {
    grid-template-columns: 1fr;
    gap: 0;
    margin-bottom: 0;
  }

  .form-group input,
  .form-group textarea {
    padding: 13px 15px;
  }
}

/* Contact fields must follow the active palette, including typed/autofilled text. */
.contact-page .form-group input,
.contact-page .form-group textarea {
  color: var(--studio-text, #f1f5f9);
  -webkit-text-fill-color: var(--studio-text, #f1f5f9);
  caret-color: var(--studio-text, #f1f5f9);
  background: var(--studio-panel, #121923);
  border-color: var(--studio-line, #273244);
  font-family: inherit;
}
.contact-page .form-group input::placeholder,
.contact-page .form-group textarea::placeholder {
  color: var(--studio-muted, #a6b2c3);
  -webkit-text-fill-color: var(--studio-muted, #a6b2c3);
  opacity: 1;
}
.contact-page .form-group input:-webkit-autofill,
.contact-page .form-group textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--studio-text, #f1f5f9);
  -webkit-box-shadow: 0 0 0 1000px var(--studio-panel, #121923) inset;
}
body.light-mode .contact-notice.success { color: #166534; }
body.light-mode .contact-notice.error { color: #991b1b; }
.post-download-action{margin-top:24px}
.post-download-action .download-btn{max-width:100%;box-sizing:border-box;white-space:normal;overflow-wrap:anywhere;text-align:center}

/* Single-post mobile overflow safeguard: keep the document and its flex/grid
   children inside the device viewport instead of allowing a wide grid track. */
body.single-post{
  width:100%;
  max-width:100%;
  min-width:0;
  overflow-x:clip;
}
body.single-post .site-header,
body.single-post .theme-detail-page{
  width:100%;
  min-width:0;
  max-width:100%;
}
body.single-post .theme-detail,
body.single-post .theme-hero,
body.single-post .theme-summary,
body.single-post .theme-preview,
body.single-post .theme-info-sections,
body.single-post .related-grid,
body.single-post .related-card,
body.single-post .theme-section,
body.single-post .detail-content{
  min-width:0;
  max-width:100%;
}
body.single-post .theme-preview img{
  display:block;
  max-width:100%;
  height:auto;
}
body.single-post .klwp-breadcrumbs li{
  min-width:0;
  overflow-wrap:anywhere;
}
@media (max-width:900px){
  body.single-post .theme-hero{
    grid-template-columns:minmax(0,1fr);
  }
}
@media (max-width:640px){
  body.single-post .theme-info-sections,
  body.single-post .related-grid{
    grid-template-columns:minmax(0,1fr);
  }
}
