/* Online tools homepage — page-scoped styles (do not put in style.css) */
.ot-home {
  --ot-red: #E53935;
  --ot-ink: #10172f;
  --ot-muted: #5c6478;
  --ot-line: #e8ebf5;
  --ot-paper: #ffffff;
  --ot-wash: #f4f6fb;
  --ot-wash-2: #eef1f8;
}

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

/* Subnav */
.ot-subnav {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--ot-line);
}

.ot-subnav-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 4px;
  padding: 10px 15px;
}

.ot-subnav-link,
.ot-drop-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ot-ink);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.ot-subnav-link:hover,
.ot-drop-btn:hover,
.ot-drop.is-open .ot-drop-btn {
  background: #fff0ef;
  color: var(--ot-red);
}

.ot-drop {
  position: relative;
}

.ot-drop-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 260px;
  max-height: 70vh;
  overflow: auto;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--ot-line);
  border-radius: 14px;
  box-shadow: 0 18px 40px rgba(16, 23, 47, 0.12);
}

.ot-drop.is-open .ot-drop-menu {
  display: block;
}

.ot-drop-menu a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: var(--ot-ink);
  text-decoration: none !important;
  font-size: 14px;
  font-weight: 600;
}

.ot-drop-menu a:hover {
  background: var(--ot-wash);
}

.ot-drop-menu em {
  font-style: normal;
  color: var(--ot-muted);
  font-size: 12px;
  font-weight: 700;
}

/* Hero */
.ot-hero {
  padding: 56px 0 40px;
  background:
    radial-gradient(900px 320px at 50% -10%, rgba(229, 57, 53, 0.16), transparent 60%),
    linear-gradient(180deg, #fff 0%, #fff7f6 45%, #f4f6fb 100%);
}

.ot-hero-inner {
  max-width: 760px;
  margin: 0 auto;
  text-align: center;
}

.ot-kicker {
  margin: 0 0 10px;
  color: var(--ot-red);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ot-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 800;
  color: var(--ot-ink);
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.ot-hero-lead {
  margin: 0 0 18px;
  color: var(--ot-muted);
  font-size: 18px;
  line-height: 1.6;
}

.ot-hero-lead strong {
  color: var(--ot-ink);
}

.ot-hero-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.ot-hero-pills li {
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid #f0c7c6;
  color: #8a1f1c;
  font-size: 13px;
  font-weight: 700;
}

/* Search */
.ot-search-box {
  position: relative;
  max-width: 640px;
  margin: 0 auto 18px;
  text-align: left;
}

.ot-search-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  height: 58px;
  background: #fff;
  border: 1.5px solid #dde2ef;
  border-radius: 16px;
  box-shadow: 0 14px 36px rgba(17, 24, 47, 0.08);
}

.ot-search-box.is-open .ot-search-row,
.ot-search-row:focus-within {
  border-color: var(--ot-red);
  box-shadow: 0 0 0 4px rgba(229, 57, 53, 0.12), 0 14px 36px rgba(17, 24, 47, 0.08);
}

.ot-search-ico {
  flex: 0 0 auto;
  color: #9aa3b8;
}

.ot-search {
  flex: 1;
  width: 100%;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 16px;
  color: var(--ot-ink);
}

.ot-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  max-height: 360px;
  overflow: auto;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--ot-line);
  border-radius: 16px;
  box-shadow: 0 20px 44px rgba(16, 23, 47, 0.14);
}

.ot-suggest-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  text-decoration: none !important;
}

.ot-suggest-item:hover,
.ot-suggest-item.is-active {
  background: var(--ot-wash);
}

.ot-suggest-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--ot-cat-bg, #fff5f5);
  font-size: 18px;
}

.ot-suggest-text strong {
  display: block;
  font-size: 14px;
  color: var(--ot-ink);
}

.ot-suggest-text span {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  color: var(--ot-muted);
}

.ot-popular-searches {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ot-muted);
  font-size: 13px;
  font-weight: 600;
}

.ot-chip-btn {
  padding: 7px 12px;
  border: 1px solid var(--ot-line);
  border-radius: 999px;
  background: #fff;
  color: var(--ot-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.ot-chip-btn:hover {
  border-color: #f0c7c6;
  color: var(--ot-red);
  background: #fff7f6;
}

/* Stats */
.ot-stats {
  padding: 8px 0 8px;
  margin-top: -8px;
}

.ot-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 8px 0 0;
}

.ot-stat {
  padding: 22px 16px;
  text-align: center;
  background: #fff;
  border: 1px solid var(--ot-line);
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(17, 24, 47, 0.04);
}

.ot-stat strong {
  display: block;
  margin-bottom: 6px;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  color: var(--ot-ink);
  letter-spacing: -0.02em;
}

.ot-stat span {
  color: var(--ot-muted);
  font-size: 13px;
  font-weight: 700;
}

/* Sections */
.ot-section {
  padding: 56px 0;
  background: var(--ot-wash);
}

.ot-section-alt {
  background: var(--ot-wash-2);
}

.ot-sec-head {
  margin-bottom: 28px;
}

.ot-sec-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ot-sec-head h2 {
  margin: 0 0 8px;
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 800;
  color: var(--ot-ink);
  letter-spacing: -0.02em;
}

.ot-sec-head p {
  margin: 0;
  color: var(--ot-muted);
  font-size: 15px;
  line-height: 1.6;
}

.ot-view-all {
  display: inline-flex;
  align-items: center;
  padding: 10px 16px;
  border: 1px solid #f0c7c6;
  border-radius: 999px;
  background: #fff;
  color: var(--ot-red);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.2s, transform 0.2s;
}

.ot-view-all:hover {
  background: #fff0ef;
  transform: translateY(-1px);
}

/* Cards */
.ot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.ot-grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ot-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  background: var(--ot-paper);
  border: 1px solid var(--ot-line);
  border-top: 3px solid var(--ot-cat, var(--ot-red));
  border-radius: 18px;
  text-decoration: none !important;
  color: inherit;
  box-shadow: 0 10px 28px rgba(17, 24, 47, 0.05);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}

.ot-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(17, 24, 47, 0.1);
  border-color: color-mix(in srgb, var(--ot-cat, var(--ot-red)) 35%, #e8ebf5);
}

.ot-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ot-card-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: var(--ot-cat-bg, #fff5f5);
  font-size: 22px;
}

.ot-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  background: var(--ot-cat, var(--ot-red));
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.ot-card-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--ot-ink);
  line-height: 1.35;
}

.ot-card-desc {
  margin: 0;
  color: var(--ot-muted);
  font-size: 13px;
  line-height: 1.55;
  flex: 1;
}

.ot-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 2px;
}

.ot-stars {
  color: #f5a623;
  font-size: 13px;
  letter-spacing: 1px;
}

.ot-chip {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--ot-wash);
  color: var(--ot-muted);
  font-size: 11px;
  font-weight: 700;
}

.ot-card-cta {
  margin-top: 4px;
  color: var(--ot-cat, var(--ot-red));
  font-size: 14px;
  font-weight: 800;
}

.ot-uses {
  position: absolute;
  right: 16px;
  bottom: 18px;
  color: var(--ot-muted);
  font-size: 11px;
  font-weight: 700;
}

.ot-card-popular {
  padding-bottom: 42px;
}

/* Category grid */
.ot-cat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.ot-cat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px 18px;
  background: #fff;
  border: 1px solid var(--ot-line);
  border-left: 4px solid var(--ot-cat, var(--ot-red));
  border-radius: 16px;
  text-decoration: none !important;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ot-cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(17, 24, 47, 0.08);
}

.ot-cat-icon {
  font-size: 28px;
  line-height: 1;
  margin-bottom: 4px;
}

.ot-cat-card strong {
  font-size: 16px;
  font-weight: 800;
  color: var(--ot-ink);
}

.ot-cat-card em {
  font-style: normal;
  color: var(--ot-muted);
  font-size: 13px;
  font-weight: 700;
}

/* Featured */
.ot-featured {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 24px;
  align-items: center;
  padding: 36px;
  background:
    linear-gradient(135deg, #fff 0%, color-mix(in srgb, var(--ot-cat, #E53935) 8%, #fff) 100%);
  border: 1px solid var(--ot-line);
  border-radius: 24px;
  box-shadow: 0 18px 40px rgba(17, 24, 47, 0.06);
}

.ot-featured-label {
  display: inline-block;
  margin-bottom: 10px;
  color: var(--ot-cat, var(--ot-red));
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.ot-featured h2 {
  margin: 0 0 10px;
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  color: var(--ot-ink);
  letter-spacing: -0.02em;
}

.ot-featured p {
  margin: 0 0 22px;
  max-width: 480px;
  color: var(--ot-muted);
  font-size: 16px;
  line-height: 1.65;
}

.ot-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  background: var(--ot-red);
  color: #fff !important;
  font-size: 15px;
  font-weight: 800;
  text-decoration: none !important;
  box-shadow: 0 10px 24px rgba(229, 57, 53, 0.28);
  transition: transform 0.2s, box-shadow 0.2s;
}

.ot-btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(229, 57, 53, 0.34);
}

.ot-featured-visual {
  display: grid;
  place-items: center;
  min-height: 180px;
  border-radius: 20px;
  background: color-mix(in srgb, var(--ot-cat, #E53935) 12%, #fff);
  font-size: 72px;
}

/* Recent */
.ot-recent-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.ot-recent-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 18px;
  background: #fff;
  border: 1px solid var(--ot-line);
  border-radius: 16px;
  text-decoration: none !important;
  color: inherit;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ot-recent-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(17, 24, 47, 0.08);
}

.ot-new-pill {
  position: absolute;
  top: 14px;
  right: 14px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #111827;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.ot-recent-icon {
  font-size: 24px;
}

.ot-recent-card strong {
  font-size: 16px;
  font-weight: 800;
  color: var(--ot-ink);
}

.ot-recent-card em {
  font-style: normal;
  color: var(--ot-muted);
  font-size: 12px;
  font-weight: 600;
}

/* Why */
.ot-why-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
}

.ot-why-grid li {
  padding: 18px 16px;
  background: #fff;
  border: 1px solid var(--ot-line);
  border-radius: 14px;
  color: var(--ot-ink);
  font-size: 15px;
  font-weight: 700;
}

.ot-blog-cta {
  padding: 24px;
  background: #fff;
  border: 1px dashed #d5dbeb;
  border-radius: 18px;
}

.ot-blog-cta h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 800;
  color: var(--ot-ink);
}

.ot-blog-cta p {
  margin: 0 0 12px;
  color: var(--ot-muted);
}

.ot-blog-cta a {
  color: var(--ot-red);
  font-weight: 800;
  text-decoration: none !important;
}

.ot-empty {
  text-align: center;
  padding: 48px 16px;
  color: var(--ot-muted);
  font-size: 16px;
}

.ot-cat-block.is-expanded [data-preview] {
  display: none;
}

.ot-cat-block.is-expanded [data-full] {
  display: grid !important;
}

@media (max-width: 1100px) {
  .ot-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ot-cat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .ot-grid,
  .ot-recent-grid,
  .ot-why-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ot-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .ot-featured {
    grid-template-columns: 1fr;
  }
  .ot-featured-visual {
    min-height: 120px;
    font-size: 56px;
  }
}

@media (max-width: 575px) {
  .ot-hero {
    padding: 36px 0 28px;
  }
  .ot-section {
    padding: 40px 0;
  }
  .ot-grid,
  .ot-grid-4,
  .ot-cat-grid,
  .ot-recent-grid,
  .ot-why-grid,
  .ot-stats-grid {
    grid-template-columns: 1fr;
  }
  .ot-subnav-inner {
    gap: 4px;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
  }
  .ot-subnav-link,
  .ot-drop-btn {
    white-space: nowrap;
  }
}
