/* Component Styles */

/* Header & Navigation */
header {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.06);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--section-gap);
  max-width: 1400px;
  margin: 0 auto;
  min-height: 60px;
  position: relative;
}

.logo {
  font-weight: 700;
  font-size: 16px;
  letter-spacing: 0.08em;
  color: var(--brand);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-logo {
  font-size: 18px;
}

nav {
  flex-grow: 1;
  display: flex;
  justify-content: flex-end;
}

nav ul {
  display: flex;
  gap: 24px;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: var(--transition);
}

nav a:hover,
nav a.active {
  color: var(--brand);
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--brand);
  font-size: 28px;
  cursor: pointer;
  padding: 8px;
  min-width: 44px;
  min-height: 44px;
  -webkit-tap-highlight-color: transparent;
  margin-left: auto;
}

@media (max-width: 900px) {
  nav ul {
    gap: 16px;
  }
  
  nav a {
    font-size: 12px;
  }
}

@media (max-width: 700px) {
  .header-content {
    flex-direction: row;
  }

  .mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    order: 2;
  }
  
  .logo {
    order: 1;
    flex-grow: 1;
  }
  
  nav {
    order: 3;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    width: 100%;
    flex-direction: column;
    background: var(--card);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 12px rgba(13, 148, 136, 0.1);
    display: none;
  }
  
  nav.active {
    display: flex;
  }
  
  nav ul {
    flex-direction: column;
    gap: 0;
    width: 100%;
    padding: 8px 0;
  }
  
  nav ul li {
    width: 100%;
  }
  
  nav ul.nav-links a {
    display: block;
    padding: 16px var(--section-gap);
    font-size: 15px;
    min-height: 48px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
  }
  
  nav ul.nav-links a:last-child {
    border-bottom: none;
  }
}

/* Hero Section */
.hero {
  padding: 60px 0 40px 0;
  text-align: center;
  background: linear-gradient(180deg, rgba(13, 148, 136, 0.03) 0%, rgba(13, 148, 136, 0) 100%);
}

@media (max-width: 700px) {
  .hero {
    padding: 40px 0 32px 0;
  }
}

.hero-badge {
  display: inline-block;
  padding: 8px 20px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: white;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 24px;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.2);
  animation: fadeInUp 0.6s ease-out;
}

.hero h1 {
  margin: 0 0 20px 0;
  font-size: clamp(34px, 5.2vw, 60px);
  line-height: 1.15;
  font-weight: 700;
  background: linear-gradient(135deg, var(--ink) 0%, var(--brand-2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 0.6s ease-out 0.1s backwards;
}

.hero .subheading {
  color: var(--muted);
  font-size: clamp(16px, 2.2vw, 20px);
  max-width: 680px;
  margin: 0 auto;
  line-height: 1.6;
  animation: fadeInUp 0.6s ease-out 0.2s backwards;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Search Box */
.search-box {
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.search-box input {
  width: 100%;
  padding: 16px 48px 16px 20px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: var(--font-base);
  transition: var(--transition);
  background: var(--card);
  color: var(--ink);
}

.search-box input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.15);
}

@media (prefers-color-scheme: dark) {
  .search-box input::placeholder {
    color: var(--muted);
  }
}

.search-box::after {
  content: "🔍";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  pointer-events: none;
}

/* Featured Strip */
.featured-strip {
  background: white;
  padding: 16px 0;
  margin: 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

@media (prefers-color-scheme: dark) {
  .featured-strip {
    background: var(--card);
  }
}

.section-intro {
  text-align: center;
  margin-bottom: 12px;
}

.section-intro h2 {
  color: var(--ink);
  margin: 0 0 2px 0;
  font-size: clamp(18px, 4vw, 24px);
  font-weight: 700;
}

.section-intro p {
  color: var(--muted);
  margin: 0;
  font-size: 12px;
  line-height: 1.3;
}

.featured-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 1200px;
  margin: 0 auto;
}

.featured-card {
  background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 14px 12px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.featured-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand) 0%, var(--accent) 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.featured-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(13, 148, 136, 0.15);
  border-color: var(--brand);
}

.featured-card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  font-size: 24px;
  margin-bottom: 6px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.featured-card h3 {
  margin: 0 0 2px 0;
  font-size: clamp(14px, 1.6vw, 16px);
  font-weight: 700;
  color: var(--ink);
}

.featured-card p {
  margin: 0 0 8px 0;
  color: var(--muted);
  font-size: clamp(12px, 1.4vw, 14px);
  line-height: 1.3;
  flex-grow: 1;
}

.card-arrow {
  margin-top: 8px;
  color: var(--brand);
  font-size: 18px;
  font-weight: 700;
  transition: transform 0.3s ease;
}

.featured-card:hover .card-arrow {
  transform: translateX(8px);
}

@media (max-width: 900px) {
  .featured-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .featured-card {
    padding: 20px 18px;
  }
}

@media (max-width: 700px) {
  .featured-strip {
    padding: 24px 0;
  }
  
  .featured-card {
    padding: 20px;
    min-height: 120px;
  }
  
  .card-icon {
    font-size: 32px;
    margin-bottom: 12px;
  }
  
  .featured-card h3 {
    font-size: 17px;
    margin-bottom: 6px;
  }
  
  .featured-card p {
    font-size: 14px;
    line-height: 1.5;
  }
}

/* Category Section */
.category-section {
  margin: 0;
  padding: 48px 0;
}

@media (max-width: 700px) {
  .category-section {
    padding: 32px 0;
  }
}

.category-section:nth-child(even) {
  background: linear-gradient(135deg, rgba(13, 148, 136, 0.02) 0%, rgba(94, 234, 212, 0.02) 100%);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.category-header {
  margin-bottom: 24px;
  text-align: center;
}

.category-header h2 {
  margin: 0 0 8px 0;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  color: var(--ink);
}

.category-header .description {
  color: var(--muted);
  font-size: clamp(13px, 1.8vw, 16px);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.5;
}

/* Tool Card */
.tool-card {
  background: var(--card);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 20px 18px;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  height: 100%;
  min-height: 140px;
}

@media (max-width: 700px) {
  .tool-card {
    padding: 20px;
    min-height: 160px;
    border-radius: 12px;
  }
  
  .tool-card h3 {
    font-size: 17px;
    margin-bottom: 8px;
  }
  
  .tool-card p {
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 12px;
  }
  
  .tool-card .open-btn {
    font-size: 14px;
    padding: 8px 0;
  }
}

.tool-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 16px;
  padding: 2px;
  background: linear-gradient(135deg, var(--brand), var(--accent));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(13, 148, 136, 0.12);
  border-color: transparent;
}

.tool-card:hover::after {
  opacity: 1;
}

.tool-card h3 {
  margin: 0 0 8px 0;
  font-size: clamp(15px, 1.8vw, 18px);
  font-weight: 700;
  color: var(--ink);
}

.tool-card p {
  margin: 0 0 16px 0;
  color: var(--muted);
  font-size: clamp(12px, 1.6vw, 15px);
  line-height: 1.5;
  flex-grow: 1;
}

.tool-card .open-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand);
  font-weight: 700;
  font-size: clamp(12px, 1.4vw, 14px);
  transition: gap 0.3s ease;
}

.tool-card:hover .open-btn {
  gap: 12px;
}

/* Related Planners */
.related-planners {
  margin-top: 48px;
  padding: 24px;
  background: #f8f9fb;
  border-radius: var(--radius);
}

.related-planners h3 {
  margin: 0 0 16px 0;
  font-size: var(--h3-size);
  font-weight: 600;
}

.related-planners ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.related-planners a {
  color: var(--brand);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}

.related-planners a:hover {
  color: var(--brand-2);
  text-decoration: underline;
}

/* Footer */
footer {
  background: var(--card);
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 64px;
}

@media (max-width: 700px) {
  footer {
    padding: 24px 0;
    margin-top: 48px;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 12px;
  }
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--section-gap);
  text-align: center;
}

.footer-content p {
  margin: 0 0 12px 0;
  color: var(--muted);
  font-size: var(--small-size);
}

.footer-links {
  display: flex;
  gap: 24px;
  justify-content: center;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: var(--small-size);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--brand);
}

/* No Results State */
.no-results {
  text-align: center;
  padding: 64px 24px;
  color: var(--muted);
}

.no-results h3 {
  font-size: var(--h2-size);
  margin: 0 0 12px 0;
}

.no-results p {
  font-size: var(--body-size);
  margin: 0;
}
