/* ============================================
   CalcPro — Main Stylesheet
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Clash+Display:wght@400;500;600;700&family=Plus+Jakarta+Sans:wght@300;400;500;600&display=swap');

/* ---- VARIABLES ---- */
:root {
  --primary:       #00C896;
  --primary-dark:  #00A87D;
  --primary-light: #E0FBF3;
  --accent:        #FF6B6B;
  --accent2:       #6C63FF;
  --dark:          #0A1628;
  --dark2:         #111E35;
  --text:          #1A2B47;
  --text2:         #4A5D7A;
  --border:        #E2EBF5;
  --bg:            #F5F9FF;
  --white:         #FFFFFF;
  --shadow:        0 4px 24px rgba(0,200,150,0.08);
  --radius:        16px;
  --radius-sm:     10px;
  --radius-xs:     8px;
  --font-display:  'Clash Display', sans-serif;
  --font-body:     'Plus Jakarta Sans', sans-serif;
}

/* ---- RESET ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-body); color: var(--text); background: var(--bg); line-height: 1.6; }
a { text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: var(--font-body); }
input, select, textarea { font-family: var(--font-body); }

/* ---- SCROLLBAR ---- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ============================================
   NAV
   ============================================ */
.nav {
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 0 5%;
}
.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav__logo-img { width: 40px; height: 40px; flex-shrink: 0; }
.nav__logo-text {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--dark);
  letter-spacing: -0.5px;
}
.nav__logo-text span { color: var(--primary); }
.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__link {
  color: var(--text2);
  font-size: 14px;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-xs);
  transition: all 0.2s;
  display: inline-block;
}
.nav__link:hover { color: var(--primary); background: var(--primary-light); }
.nav__link--active { color: var(--primary); background: var(--primary-light); }
.nav__link--cta {
  background: var(--primary);
  color: #fff !important;
  padding: 9px 20px;
  border-radius: 99px;
}
.nav__link--cta:hover { background: var(--primary-dark) !important; }
.nav__burger { display: none; background: none; border: none; padding: 6px; }
.nav__burger span {
  display: block; width: 22px; height: 2px;
  background: var(--text); border-radius: 2px; margin: 4px 0;
  transition: all 0.3s;
}

/* ============================================
   HERO
   ============================================ */
.hero {
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark2) 60%, #0D2545 100%);
  padding: 80px 5% 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -100px; right: -100px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(0,200,150,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute; bottom: -150px; left: -50px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(108,99,255,0.1) 0%, transparent 70%);
  pointer-events: none;
}
.hero__inner {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(0,200,150,0.15);
  border: 1px solid rgba(0,200,150,0.3);
  color: var(--primary);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 99px;
  margin-bottom: 24px;
  letter-spacing: 0.5px;
}
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 62px);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -1px;
}
.hero__title span { color: var(--primary); }
.hero__subtitle {
  color: rgba(255,255,255,0.65);
  font-size: 18px;
  max-width: 540px;
  margin-bottom: 40px;
  font-weight: 300;
}
.hero__search {
  display: flex;
  gap: 10px;
  max-width: 520px;
}
.hero__search-input {
  flex: 1;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 14px 20px;
  border-radius: 12px;
  font-size: 15px;
  outline: none;
  transition: all 0.2s;
}
.hero__search-input::placeholder { color: rgba(255,255,255,0.4); }
.hero__search-input:focus { border-color: var(--primary); background: rgba(255,255,255,0.15); }
.hero__search-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 14px 26px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s;
}
.hero__search-btn:hover { background: var(--primary-dark); }
.hero__stats { display: flex; gap: 40px; margin-top: 48px; flex-wrap: wrap; }
.hero__stat-num {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
}
.hero__stat-label { font-size: 12px; color: rgba(255,255,255,0.5); margin-top: 2px; }

/* ============================================
   SECTIONS
   ============================================ */
.section { padding: 70px 5%; }
.section--white { background: var(--white); }
.section__inner { max-width: 1200px; margin: 0 auto; }
.section__header { text-align: center; margin-bottom: 50px; }
.section__title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}
.section__subtitle { color: var(--text2); font-size: 16px; }

/* ============================================
   CATEGORY CARDS
   ============================================ */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.cat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  cursor: pointer;
  transition: all 0.25s;
  text-align: center;
}
.cat-card:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}
.cat-card__icon {
  width: 52px; height: 52px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin: 0 auto 14px;
}
.cat-card__title { font-weight: 600; font-size: 14px; color: var(--text); margin-bottom: 4px; }
.cat-card__count { font-size: 12px; color: var(--text2); }

/* ============================================
   TOOL GRID
   ============================================ */
.tools-section { padding: 0 5% 70px; }
.tools-section__inner { max-width: 1200px; margin: 0 auto; }
.cat-section { margin-bottom: 50px; }
.cat-section__header {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--border);
}
.cat-section__icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.cat-section__title {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.3px;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.tool-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.tool-card:hover { border-color: var(--primary); box-shadow: 0 2px 16px rgba(0,200,150,0.12); }
.tool-card__left { display: flex; align-items: center; gap: 12px; }
.tool-card__emoji { font-size: 20px; width: 36px; text-align: center; }
.tool-card__name { font-size: 14px; font-weight: 600; color: var(--text); }
.tool-card__desc { font-size: 12px; color: var(--text2); margin-top: 2px; }
.tool-card__arrow { color: var(--primary); font-size: 18px; opacity: 0; transition: opacity 0.2s; }
.tool-card:hover .tool-card__arrow { opacity: 1; }
.tool-card.search-hide { display: none; }

/* ============================================
   TAGS / BADGES
   ============================================ */
.tag { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 99px; margin-left: 6px; letter-spacing: 0.3px; vertical-align: middle; }
.tag--hot { background: var(--accent); color: #fff; }
.tag--new { background: var(--accent2); color: #fff; }
.tag--usa { background: #3B82F6; color: #fff; }

/* ============================================
   MODAL
   ============================================ */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(10,22,40,0.7);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--white);
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: modalIn 0.25s ease;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal__header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--white); z-index: 1;
}
.modal__title { font-family: var(--font-display); font-size: 20px; font-weight: 600; letter-spacing: -0.3px; }
.modal__close {
  background: none; border: none;
  font-size: 22px; line-height: 1; padding: 4px;
  color: var(--text2); border-radius: 6px;
  transition: all 0.2s;
}
.modal__close:hover { background: var(--bg); color: var(--text); }
.modal__body { padding: 28px; }

/* ============================================
   FORM ELEMENTS
   ============================================ */
.form-group { margin-bottom: 18px; }
.form-label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; display: block; }
.form-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  background: var(--bg);
}
.form-input:focus { border-color: var(--primary); background: #fff; }
select.form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234A5D7A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
textarea.form-input { resize: vertical; min-height: 120px; }

/* ============================================
   CALCULATOR BUTTON & RESULTS
   ============================================ */
.calc-btn {
  width: 100%;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 14px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s;
  margin-top: 6px;
}
.calc-btn:hover { background: var(--primary-dark); }

.result-box {
  background: linear-gradient(135deg, var(--primary-light), #fff);
  border: 2px solid var(--primary);
  border-radius: 14px;
  padding: 20px 24px;
  margin-top: 20px;
  display: none;
}
.result-box.show { display: block; }
.result-box.auto-show { display: block; }
.result-label { font-size: 12px; font-weight: 600; color: var(--primary); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; }
.result-value { font-family: var(--font-display); font-size: 32px; font-weight: 700; color: var(--text); letter-spacing: -1px; }
.result-sub { font-size: 13px; color: var(--text2); margin-top: 6px; }
.result-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.result-item { background: #fff; border-radius: 10px; padding: 12px 14px; border: 1px solid var(--border); }
.result-item__label { font-size: 11px; color: var(--text2); margin-bottom: 3px; }
.result-item__val { font-size: 16px; font-weight: 700; color: var(--text); }

/* ============================================
   STATIC PAGES (about / privacy)
   ============================================ */
.static-page { max-width: 800px; margin: 0 auto; padding: 70px 5%; }
.static-page__title { font-family: var(--font-display); font-size: 38px; font-weight: 700; letter-spacing: -1px; margin-bottom: 12px; }
.static-page__lead { font-size: 17px; color: var(--text2); margin-bottom: 48px; line-height: 1.7; }
.static-page h2 { font-family: var(--font-display); font-size: 22px; font-weight: 600; margin: 36px 0 12px; letter-spacing: -0.3px; }
.static-page p { color: var(--text2); margin-bottom: 14px; line-height: 1.8; }
.static-page ul { color: var(--text2); padding-left: 20px; margin-bottom: 14px; line-height: 1.9; }
.static-page li { margin-bottom: 4px; }

/* ============================================
   CONTACT PAGE
   ============================================ */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact-info__title { font-family: var(--font-display); font-size: 22px; margin-bottom: 20px; }
.contact-item { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 24px; }
.contact-item__icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--primary-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.contact-item__title { display: block; font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.contact-item__sub { font-size: 14px; color: var(--text2); }
.contact-form {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}
.contact-form__title { font-family: var(--font-display); font-size: 20px; margin-bottom: 24px; }
.form-submit {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 13px 28px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s;
}
.form-submit:hover { background: var(--primary-dark); }
.form-success {
  display: none;
  background: var(--primary-light);
  border: 1px solid var(--primary);
  color: var(--primary-dark);
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  margin-top: 14px;
}
.form-success.show { display: block; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--dark);
  color: rgba(255,255,255,0.6);
  padding: 50px 5% 30px;
}
.footer__inner { max-width: 1200px; margin: 0 auto; }
.footer__grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer__brand-logo { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.footer__brand-name { font-family: var(--font-display); font-size: 18px; font-weight: 700; color: #fff; }
.footer__brand-name span { color: var(--primary); }
.footer__brand-desc { font-size: 14px; line-height: 1.8; }
.footer__col-title { font-size: 13px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 16px; }
.footer__link { display: block; font-size: 13px; color: rgba(255,255,255,0.55); margin-bottom: 9px; transition: color 0.2s; }
.footer__link:hover { color: var(--primary); }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px;
  flex-wrap: wrap; gap: 10px;
}

/* ============================================
   ADSENSE PLACEHOLDER
   ============================================ */
.ad-slot {
  background: var(--bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text2);
  font-size: 13px;
  min-height: 90px;
  margin: 20px 0;
  text-align: center;
}
.ad-slot--leaderboard { min-height: 90px; }
.ad-slot--rectangle { min-height: 250px; max-width: 300px; }
.ad-slot--responsive { min-height: 90px; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 768px) {
  .nav__link:not(.nav__link--cta) { display: none; }
  .nav__burger { display: block; }
  .hero__stats { gap: 24px; }
  .contact-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
  .hero__search { flex-direction: column; }
  .hero__search-btn { width: 100%; }
}

@media (max-width: 480px) {
  .footer__grid { grid-template-columns: 1fr; }
  .result-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .modal__body { padding: 20px; }
}

/* ============================================
   MOBILE NAV
   ============================================ */
.mobile-nav {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--white);
  z-index: 999;
  padding: 80px 5% 40px;
  flex-direction: column;
  gap: 4px;
}
.mobile-nav.open { display: flex; }
.mobile-nav__link {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-weight: 500;
  color: var(--text);
  transition: all 0.2s;
}
.mobile-nav__link:hover { background: var(--primary-light); color: var(--primary); }
