/*
Theme Name: CalcPortalPro
Theme URI: https://calcportalpro.com/
Author: CalcPortalPro
Author URI: https://calcportalpro.com/
Description: A modern calculator portal theme for CalcPortalPro with dynamic latest articles and responsive calculator sections.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: calcportalpro
*/

:root {
  --ink: #071d42;
  --muted: #50617a;
  --blue: #0d63f3;
  --line: #dfe8f5;
  --soft: #f3f8ff;
  --panel: #ffffff;
  --shadow: 0 12px 36px rgba(26, 66, 125, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: #fff;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
svg {
  display: block;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.1;
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1110px, calc(100% - 36px));
  margin: 0 auto;
}

.narrow {
  width: min(980px, calc(100% - 36px));
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #edf2f9;
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 30px;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  color: var(--ink);
  font-weight: 900;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  background: var(--blue);
  border-radius: 8px;
}

.brand-text {
  font-size: 25px;
  letter-spacing: 0;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 31px;
  flex: 1 1 auto;
  font-size: 13px;
  font-weight: 800;
}

.main-nav li {
  list-style: none;
}

.main-nav a {
  position: relative;
  padding: 29px 0 25px;
}

.main-nav a.active,
.main-nav .current-menu-item > a {
  color: var(--blue);
}

.main-nav a.active::after,
.main-nav .current-menu-item > a::after {
  position: absolute;
  right: 0;
  bottom: 16px;
  left: 0;
  height: 3px;
  background: var(--blue);
  border-radius: 99px;
  content: "";
}

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

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  color: #071834;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.icon-button svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.6;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 24px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  background: var(--blue);
  border-radius: 7px;
  box-shadow: 0 12px 24px rgba(13, 99, 243, 0.2);
}

.button svg {
  width: 17px;
  height: 17px;
}

.all-button {
  min-width: 145px;
}

.hero {
  overflow: hidden;
  background: linear-gradient(180deg, #edf6ff 0%, #f8fbff 78%, #fff 100%);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.96fr) minmax(410px, 1.04fr);
  align-items: center;
  min-height: 326px;
  padding: 24px 0 28px;
}

.hero-copy {
  padding-bottom: 10px;
}

.hero h1 {
  max-width: 620px;
  margin: 0 0 17px;
  font-size: clamp(36px, 4vw, 50px);
  line-height: 1.12;
  letter-spacing: 0;
}

.hero h1 span {
  display: block;
  color: var(--blue);
  white-space: nowrap;
}

.hero p {
  max-width: 540px;
  margin: 0 0 23px;
  color: #43536d;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.72;
}

.search-strip {
  display: grid;
  grid-template-columns: minmax(210px, 310px) 0 minmax(172px, auto);
  align-items: center;
  gap: 16px;
  max-width: 548px;
  margin-bottom: 22px;
}

.search-strip input {
  width: 100%;
  height: 46px;
  padding: 0 52px 0 19px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #dfe7f2;
  border-radius: 6px;
  box-shadow: 0 8px 22px rgba(38, 78, 128, 0.06);
  outline: 0;
}

.search-strip input::placeholder {
  color: #96a4b8;
}

.search-submit {
  z-index: 1;
  justify-self: end;
  width: 46px;
  height: 46px;
  margin-left: -62px;
  color: #071834;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.search-submit svg {
  width: 21px;
  height: 21px;
  stroke-width: 2.5;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 19px 37px;
  color: #142849;
  font-size: 14px;
  font-weight: 800;
}

.hero-badges span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.hero-badges svg {
  width: 18px;
  height: 18px;
  color: var(--blue);
}

.hero-art {
  position: relative;
  min-height: 300px;
}

.hero-art img {
  position: relative;
  z-index: 2;
  width: min(560px, 100%);
  margin-left: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.soft-shape {
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  background: rgba(13, 99, 243, 0.1);
}

.shape-one {
  right: 95px;
  bottom: 18px;
  width: 310px;
  height: 210px;
  transform: rotate(-25deg);
}

.shape-two {
  right: 210px;
  bottom: 92px;
  width: 80px;
  height: 80px;
  background: rgba(13, 99, 243, 0.18);
}

.section {
  padding: 28px 0;
}

.section.tight {
  padding-top: 20px;
}

.center-title {
  margin: 0 0 19px;
  text-align: center;
  font-size: 24px;
  line-height: 1.2;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.category-card,
.tool-card,
.article-card,
.why-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(26, 66, 125, 0.05);
}

.category-card,
.tool-card,
.article-card {
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.category-card:hover,
.tool-card:hover,
.article-card:hover {
  border-color: #b9d2f5;
  box-shadow: 0 16px 36px rgba(26, 66, 125, 0.12);
  transform: translateY(-5px);
}

.category-card:hover .bubble,
.tool-card:hover .bubble,
.article-card:hover .article-icon {
  transform: scale(1.06);
}

.category-card {
  display: grid;
  grid-template-columns: 56px 1fr;
  min-height: 128px;
  padding: 20px 17px 15px;
  column-gap: 14px;
}

.bubble,
.outline-bubble,
.article-icon,
.step-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
}

.bubble {
  width: 50px;
  height: 50px;
  color: #fff;
  transition: transform 180ms ease;
}

.bubble svg {
  width: 25px;
  height: 25px;
}

.green { background: #20b75b; }
.red { background: #fb4747; }
.blue { background: #1e82e6; }
.purple { background: #6649dd; }
.teal { background: #18a7ad; }
.sky { background: #2d9ee7; }
.orange { background: #f87837; }

.category-card h3,
.tool-card h3,
.article-card h3,
.why-card h3,
.trust-item h3,
.steps h3 {
  margin: 0;
  color: #102143;
  font-size: 14px;
  line-height: 1.32;
}

.category-card p,
.tool-card p,
.article-card p,
.why-card p,
.trust-item p,
.steps p {
  margin: 9px 0 0;
  color: #334663;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.category-card a {
  grid-column: 2;
  align-self: end;
  margin-top: 12px;
  color: #0b53bd;
  font-size: 13px;
  font-weight: 800;
}

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

.section-row h2 {
  margin: 0;
  font-size: 24px;
}

.section-row a {
  color: #0b53bd;
  font-size: 13px;
  font-weight: 800;
}

.popular-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.tool-card {
  display: grid;
  grid-template-columns: 44px 1fr;
  min-height: 102px;
  padding: 18px 14px;
  column-gap: 14px;
}

.tool-card .bubble {
  width: 42px;
  height: 42px;
}

.tool-card .bubble svg {
  width: 22px;
  height: 22px;
}

.tool-card h3 {
  font-size: 13px;
}

.tool-card p {
  grid-column: 2;
  margin-top: 5px;
}

.slider-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 17px;
}

.slider-dots span {
  width: 8px;
  height: 8px;
  background: #e0e7f1;
  border-radius: 50%;
}

.slider-dots .on {
  background: var(--blue);
}

.trust-strip {
  padding: 24px 0;
  background: #f1f6ff;
  border-top: 1px solid #e8f1fb;
  border-bottom: 1px solid #e8f1fb;
}

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

.trust-item {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 17px;
  align-items: center;
}

.outline-bubble {
  width: 58px;
  height: 58px;
  background: #f8fbff;
  border: 1px solid currentColor;
}

.outline-bubble svg {
  width: 28px;
  height: 28px;
}

.outline-bubble.blue { color: #0d63f3; background: #edf6ff; }
.outline-bubble.green { color: #20b75b; background: #ecfff5; }
.outline-bubble.purple { color: #6649dd; background: #f4f1ff; }
.outline-bubble.orange { color: #f87837; background: #fff6ef; }
.outline-bubble.teal { color: #18a7ad; background: #effeff; }

.articles-section {
  padding-top: 28px;
  padding-bottom: 34px;
}

.articles-row {
  position: relative;
  justify-content: center;
}

.articles-row a {
  position: absolute;
  right: 0;
}

.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.article-card {
  display: grid;
  grid-template-columns: 45px 1fr;
  min-height: 126px;
  padding: 24px 25px 18px;
  gap: 12px;
}

.article-icon {
  width: 32px;
  height: 32px;
  color: #fff;
  transition: transform 180ms ease;
}

.article-icon svg {
  width: 21px;
  height: 21px;
}

.article-icon.cpm { background: #97862d; }
.article-icon.fuel { background: #536b96; }
.article-icon.salary { background: #bc549d; }

.article-card h3 {
  font-size: 15px;
  max-width: 210px;
}

.article-card a {
  display: inline-flex;
  margin-top: 14px;
  color: #0b63df;
  font-size: 12px;
  font-weight: 900;
}

.why-section {
  padding-top: 16px;
}

.why-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

.why-card {
  min-height: 174px;
  padding: 22px 18px;
  text-align: center;
}

.why-card .outline-bubble {
  margin: 0 auto 14px;
}

.bottom-panel {
  padding-top: 12px;
  padding-bottom: 24px;
}

.stats-panel {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 auto 29px;
  max-width: 940px;
  min-height: 113px;
  background: #f5f9ff;
  border: 1px solid #d8e5f5;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(26, 66, 125, 0.04) inset;
}

.stats-panel div {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 113px;
  color: #0a459e;
  border-right: 1px solid #d1def0;
}

.stats-panel div:last-child {
  border-right: 0;
}

.stats-panel strong {
  display: block;
  color: #0b63df;
  font-size: 30px;
  line-height: 1;
}

.stats-panel span {
  display: block;
  margin-top: 5px;
  color: #102143;
  font-size: 13px;
  font-weight: 700;
}

.stats-panel svg {
  width: 28px;
  height: 28px;
  margin-top: 11px;
}

.steps {
  display: grid;
  grid-template-columns: 1fr 45px 1fr 45px 1fr;
  align-items: center;
  gap: 10px;
  margin: 15px auto 24px;
  max-width: 990px;
}

.steps article {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  gap: 14px;
}

.step-icon {
  position: relative;
  width: 78px;
  height: 78px;
  color: #0b63df;
  background: #edf5ff;
}

.step-icon svg {
  width: 34px;
  height: 34px;
}

.step-icon b {
  position: absolute;
  top: 3px;
  right: -6px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #fff;
  font-size: 12px;
  background: #0b63df;
  border-radius: 50%;
}

.arrow {
  color: #31527c;
  font-size: 38px;
  text-align: center;
}

.faq-card {
  max-width: 940px;
  margin: 38px auto 34px;
  padding: 18px;
  background: #fff;
  border: 1px solid #dce7f5;
  border-radius: 8px;
  box-shadow: 0 8px 28px rgba(26, 66, 125, 0.04);
}

.faq-card h2 {
  margin: 0 0 13px;
  text-align: center;
  font-size: 22px;
}

.faq-card details {
  padding: 13px 28px;
  border: 1px solid #dce7f5;
  border-bottom: 0;
}

.faq-card details:first-of-type {
  border-radius: 7px 7px 0 0;
}

.faq-card details:last-of-type {
  border-bottom: 1px solid #dce7f5;
  border-radius: 0 0 7px 7px;
}

.faq-card summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #102143;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}

.faq-card summary::-webkit-details-marker {
  display: none;
}

.faq-card summary::after {
  color: #071d42;
  content: "⌄";
  font-size: 18px;
}

.faq-card details[open] summary::after {
  transform: rotate(180deg);
}

.faq-card p {
  margin: 7px 0 0;
  color: #40516c;
  font-size: 13px;
  font-weight: 600;
}

.site-footer {
  color: #fff;
  background: #001a3a;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 66px;
  gap: 18px;
}

.footer-inner nav {
  display: flex;
  flex-wrap: wrap;
  gap: 29px;
  font-size: 13px;
}

.footer-inner nav li {
  list-style: none;
}

.footer-inner p {
  margin: 0;
  font-size: 13px;
}

@media (max-width: 1060px) {
  .header-inner {
    gap: 18px;
  }

  .brand-text {
    font-size: 22px;
  }

  .main-nav {
    gap: 18px;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    padding-top: 30px;
  }

  .hero-art img {
    margin: 8px auto 0;
  }

  .category-grid,
  .why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .popular-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }

  .trust-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 800px) {
  .site-header {
    position: static;
  }

  .header-inner {
    flex-wrap: wrap;
    justify-content: center;
    padding: 14px 0;
  }

  .main-nav {
    order: 3;
    flex-basis: 100%;
    flex-wrap: wrap;
  }

  .main-nav a {
    padding: 7px 0;
  }

  .main-nav a.active::after {
    bottom: 0;
  }

  .header-actions {
    margin-left: auto;
  }

  .hero-grid {
    min-height: auto;
  }

  .search-strip {
    grid-template-columns: 1fr 0;
  }

  .search-strip .primary {
    grid-column: 1 / -1;
  }

  .hero-art {
    min-height: auto;
  }

  .category-grid,
  .popular-grid,
  .article-grid,
  .why-grid,
  .trust-grid,
  .stats-panel,
  .steps {
    grid-template-columns: 1fr;
  }

  .steps {
    gap: 18px;
  }

  .articles-row {
    justify-content: space-between;
  }

  .articles-row a {
    position: static;
  }

  .arrow {
    display: none;
  }

  .stats-panel div {
    border-right: 0;
    border-bottom: 1px solid #d1def0;
  }

  .stats-panel div:last-child {
    border-bottom: 0;
  }

  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 0;
  }
}

@media (max-width: 540px) {
  .shell,
  .narrow {
    width: min(100% - 24px, 1110px);
  }

  .brand {
    justify-content: center;
    width: 100%;
  }

  .header-actions {
    width: 100%;
    justify-content: center;
    margin-left: 0;
  }

  .all-button {
    flex: 1;
  }

  .hero h1 {
    font-size: 36px;
  }

  .hero h1 span {
    white-space: normal;
  }

  .hero p {
    font-size: 15px;
  }

  .hero-badges {
    gap: 14px 20px;
  }

  .category-card,
  .tool-card,
  .article-card,
  .trust-item,
  .steps article {
    grid-template-columns: 54px 1fr;
  }

  .faq-card {
    padding: 10px;
  }

  .faq-card details {
    padding: 13px 14px;
  }
}
