/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: hsl(222.2 84% 4.9%);
  --primary-foreground: hsl(210 40% 98%);
  --secondary: hsl(210 40% 96%);
  --secondary-foreground: hsl(222.2 84% 4.9%);
  --muted: hsl(210 40% 96%);
  --muted-foreground: hsl(215.4 16.3% 46.9%);
  --card: hsl(0 0% 100%);
  --border: hsl(214.3 31.8% 91.4%);
  --background: hsl(0 0% 100%);
  --foreground: hsl(222.2 84% 4.9%);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
}

/* Prevent body scroll when mobile menu is open */
body.mobile-menu-open {
  overflow: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Main Content */
.home-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.main-section {
  flex: 1;
  padding: 2rem 0;
}

.section-content {
  max-width: 64rem;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.section-title {
  font-size: 1.875rem;
  font-weight: bold;
  margin-bottom: 1rem;
  text-wrap: balance;
}

.header-logo-link {
  font-size: 1.875rem;
  font-weight: bold;
  
  text-wrap: balance;
}


.section-description {
  font-size: 1rem;
  color: var(--muted-foreground);
  margin-bottom: 1.5rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
  text-wrap: pretty;
}

.cta-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  justify-content: center;
}

.cta-primary,
.cta-secondary {
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  text-decoration: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
}

.cta-primary {
  background-color: var(--primary);
  color: var(--primary-foreground);
}

.cta-primary:hover {
  opacity: 0.9;
}

.cta-secondary {
  background-color: var(--secondary);
  color: var(--secondary-foreground);
}

.cta-secondary:hover {
  background-color: hsl(210 40% 92%);
}

/* Features Grid */
.features-grid {
  display: grid;
  gap: 1rem;
  margin-top: 2rem;
}

.feature-card {
  background-color: var(--card);
  padding: 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
}

.feature-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.feature-description {
  color: var(--muted-foreground);
  line-height: 1.6;
}

/* Tools Section */
.tools-section {
  margin-top: 3rem;
}

.tools-title {
  font-size: 1.5rem;
  font-weight: bold;
  text-align: center;
  margin-bottom: 2rem;
  text-wrap: balance;
}

.tools-grid {
  display: grid;
  gap: 1rem;
  grid-template-rows: masonry;
}

.tool-box {
  display: block;
  padding: 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: all 0.3s;
  background: linear-gradient(135deg, var(--card) 0%, var(--muted) 100%);
}

.tool-box:hover {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

.tool-box:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.tool-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  transition: transform 0.3s;
}

.tool-box:hover .tool-icon {
  transform: scale(1.1);
}

.tool-title {
  font-size: 1.125rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 0.5rem;
  transition: color 0.3s;
}

.tool-box:hover .tool-title {
  color: var(--primary);
}

.tool-description {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  text-align: center;
  line-height: 1.6;
}

/* Tool Color Schemes */
.tool-box.blue {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border-color: #93c5fd;
}

.tool-box.blue .tool-icon {
  background-color: #3b82f6;
  color: white;
}

.tool-box.green {
  background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border-color: #86efac;
}

.tool-box.green .tool-icon {
  background-color: #22c55e;
  color: white;
}

.tool-box.purple {
  background: linear-gradient(135deg, #f3e8ff 0%, #e9d5ff 100%);
  border-color: #c4b5fd;
}

.tool-box.purple .tool-icon {
  background-color: #8b5cf6;
  color: white;
}

.tool-box.orange {
  background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
  border-color: #fb923c;
}

.tool-box.orange .tool-icon {
  background-color: #f97316;
  color: white;
}

.tool-box.teal {
  background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%);
  border-color: #5eead4;
}

.tool-box.teal .tool-icon {
  background-color: #14b8a6;
  color: white;
}

/* Aside */
.main-aside {
  background-color: hsl(210 40% 98%);
  padding: 2rem 0;
}

.aside-content {
  padding: 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-title {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.news-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-title {
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.news-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s;
}

.news-link:hover {
  color: var(--primary);
}

.news-link:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}

.news-excerpt {
  font-size: 0.875rem;
  color: var(--muted-foreground);
  line-height: 1.6;
}

.quick-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.quick-link {
  color: var(--muted-foreground);
  text-decoration: none;
  padding: 0.25rem;
  display: block;
  transition: color 0.3s;
}

.quick-link:hover {
  color: var(--primary);
}

.quick-link:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 2px;
}


/* Responsive Design */
@media (min-width: 640px) {
  .container {
    padding: 0 1.5rem;
  }

  .main-section {
    padding: 3rem 0;
  }

  .section-content {
    gap: 2.5rem;
  }

  .section-title {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
  }

  .section-description {
    font-size: 1.125rem;
    margin-bottom: 2rem;
  }

  .cta-buttons {
    flex-direction: row;
    gap: 1rem;
  }

  .features-grid {
    gap: 1.5rem;
    margin-top: 3rem;
  }

  .feature-card {
    padding: 2rem;
  }

  .feature-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
  }

  .tools-section {
    margin-top: 4rem;
  }

  .tools-title {
    font-size: 1.875rem;
    margin-bottom: 2.5rem;
  }

  .tools-grid {
    gap: 1.5rem;
  }

  .aside-content {
    gap: 2.5rem;
  }

  .sidebar-title {
    font-size: 1.25rem;
    margin-bottom: 1.25rem;
  }

  .news-list {
    gap: 1.25rem;
  }
}

@media (min-width: 768px) {
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

@media (min-width: 1024px) {
  .section-title {
    font-size: 2.5rem;
  }

  .features-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .features-grid .feature-card:nth-child(3) {
    grid-column: span 1;
  }

  .tools-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 1280px) {
  .main-content {
    flex-direction: row;
  }

  .main-aside {
    width: 20rem;
    padding: 3rem 0;
  }

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

@media (min-width: 1536px) {
  .tools-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
