/* =========================================================
   TOOLS PAGE — specific styles
   These extend style.css (which is loaded first).
   Edit content in tools.js, not here.
========================================================= */

/* ---- shared container ---- */
.tl-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
}

/* =========================================================
   HERO
========================================================= */
.tl-hero {
  position: relative;
  padding: 100px 24px 80px;
  text-align: center;
  overflow: hidden;
}

.tl-hero-content {
  position: relative;
  z-index: 1;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.tl-hero-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 700;
  line-height: 1.08;
  color: var(--white);
  margin: 0;
}

.tl-hero-sub {
  font-size: clamp(15px, 2vw, 18px);
  color: var(--muted);
  max-width: 520px;
  line-height: 1.6;
  margin: 0;
}

/* =========================================================
   FILTER TABS
========================================================= */
.tl-section {
  border-top: 1px solid var(--border);
  padding: 60px 0 100px;
}

.tl-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 44px;
}

.tl-filter-btn {
  padding: 9px 22px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.tl-filter-btn:hover {
  border-color: var(--orange);
  color: var(--white);
}

.tl-filter-btn.active {
  background: var(--orange);
  border-color: var(--orange);
  color: #15100c;
}

/* =========================================================
   TOOL CARD GRID
========================================================= */
.tl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 22px;
}

.tl-empty {
  grid-column: 1/-1;
  text-align: center;
  color: var(--muted-2);
  padding: 60px 0;
  font-size: 15px;
}

.tl-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 12px;
  outline: none;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}

/* subtle top-edge glow on hover */
.tl-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--orange), transparent);
  opacity: 0;
  transition: opacity 0.2s ease;
}

.tl-card:hover::before,
.tl-card:focus-visible::before { opacity: 1; }

.tl-card:hover,
.tl-card:focus-visible {
  border-color: var(--orange);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(255, 106, 26, 0.12);
}

/* ---- card top row: icon + badge ---- */
.tl-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tl-card-icon {
  font-size: 30px;
  line-height: 1;
  display: block;
}

.tl-card-badge {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}

/* ---- category label ---- */
.tl-card-category {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
}

/* ---- name + description ---- */
.tl-card-name {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--white);
  line-height: 1.3;
  margin: 0;
}

.tl-card-desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
}

/* ---- "Tingnan ang detalye" link at bottom ---- */
.tl-card-cta {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  color: var(--orange-light);
  margin-top: 4px;
  transition: color 0.15s ease, gap 0.15s ease;
}

.tl-card:hover .tl-card-cta { color: var(--orange); }

/* =========================================================
   SUGGEST CTA SECTION
========================================================= */
.tl-suggest {
  border-top: 1px solid var(--border);
  padding: 80px 24px 100px;
}

.tl-suggest-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 56px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  max-width: 680px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

/* decorative orange radial glow behind the CTA */
.tl-suggest-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(60% 80% at 50% 110%, rgba(255,106,26,0.1), transparent 70%);
  pointer-events: none;
}

.tl-suggest-icon {
  font-size: 40px;
  line-height: 1;
}

.tl-suggest-title {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  color: var(--white);
  margin: 0;
}

.tl-suggest-desc {
  font-size: 15px;
  color: var(--muted);
  max-width: 440px;
  line-height: 1.6;
}

/* =========================================================
   MODAL
========================================================= */
.tl-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.tl-modal[hidden] { display: none; }

.tl-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.82);
  backdrop-filter: blur(6px);
}

.tl-modal-box {
  position: relative;
  z-index: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 560px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 36px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.7);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tl-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  border: 1px solid var(--border);
  color: var(--white);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, border-color 0.15s ease;
  flex-shrink: 0;
}

.tl-modal-close:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: #15100c;
}

.tl-modal-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-right: 40px; /* avoid close button overlap */
}

.tl-modal-icon {
  font-size: 36px;
  line-height: 1;
  flex-shrink: 0;
}

.tl-modal-name {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 26px);
  font-weight: 700;
  color: var(--white);
  margin: 0;
  line-height: 1.25;
}

.tl-modal-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tl-modal-cat {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted-2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 999px;
}

.tl-modal-desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  margin: 0;
}

.tl-modal-features {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.tl-modal-feat-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14.5px;
  color: var(--white);
  line-height: 1.5;
}

.tl-modal-feat-item::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  margin-top: 8px;
  flex-shrink: 0;
}

.tl-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  border-top: 1px solid var(--border);
  padding-top: 18px;
}

.tl-modal-open-btn {
  flex: 1;
  min-width: 180px;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 860px) {
  .tl-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

@media (max-width: 600px) {
  .tl-hero { padding: 70px 20px 60px; }
  .tl-grid { grid-template-columns: 1fr; }
  .tl-suggest-card { padding: 36px 24px; }
  .tl-modal-box { padding: 24px; border-radius: 14px; max-height: 95vh; }
}
