/* GLOBAL RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* BODY & TYPOGRAPHY */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f9f9f9;
  color: #333;
  line-height: 1.6;
  margin: 0 auto;
}

h1 {
  font-size: 2em;
  margin-bottom: 0.5em;
}

a {
  text-decoration: none;
  color: inherit;
}

/* HEADER & FOOTER */
header, footer {
  background-color: #1e1e2f;
  color: white;
  padding: 1em 2em;
  text-align: center;
}

footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  font-size: 0.9em;
  background-color: #1e1e2f;
  color: #ddd;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #1e1e2f;
  color: white;
  padding: 1em 2em;
  text-align: center;
}

header h1 {
  flex: 0 0 auto;
  font-size: 1.7em;
  max-width: 60vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}

nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
  padding: 0;
  position: relative;
}

nav a {
  display: inline-block;
  background-color: #0066cc;
  color: white;
  border-radius: 8px;
  padding: 0.5em 1em;
  margin: 0;
  margin-left: 5px;
  width: 150px;
  transition: background-color 0.2s ease;
}

nav a:hover {
  background-color: #00aaff;
}
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: none;
  font-size: 2em;
  color: #fff;
  cursor: pointer;
  z-index: 1001;
  appearance: auto;
}

/* HERO SECTION */
.hero {
  background: linear-gradient(to right, #0066cc, #00aaff);
  color: white;
  padding: 4em 2em;
  text-align: center;
}

.hero .cta-buttons {
  margin-top: 2em;
}

.btn {
  display: inline-block;
  padding: 0.75em 1.5em;
  border-radius: 4px;
  font-weight: bold;
  transition: 0.3s ease;
}

.btn.primary {
  background-color: #fff;
  color: #0066cc;
}

.btn.primary:hover {
  background-color: #e6e6e6;
}

.btn.secondary {
  background-color: transparent;
  border: 2px solid white;
  color: white;
  margin-left: 1em;
}

.btn.secondary:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.btn.small {
  font-size: 0.9em;
  padding: 0.5em 1em;
  background-color: #0066cc;
  color: white;
}

/* TOOL GRID */
.latest-tools {
  background-color: #f9f9f9;
  padding: 2em;
  text-align: center;
}

.tool-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2em;
  padding: 2em;
}

/* TOOL CARD WITH IMAGE - FIXED WIDTH */
.tool-card.has-image {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  padding: 2em;
  width: 100%;
  max-width: 640px;
  min-width: 300px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tool-card.has-image:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.tool-text {
  flex: 1;
  padding-right: 1.5em;
}

.tool-text h3 {
  font-size: 1.5em;
  margin-bottom: 0.5em;
}

.tool-text p {
  font-size: 1em;
  margin-bottom: 1em;
  color: #555;
}

.tool-img {
  flex-shrink: 0;
  width: 180px;
}

.tool-img img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* RESPONSIVE ADJUSTMENTS */
@media (max-width: 700px) {
  html, body {
    max-width: 100vw;
    overflow-x: hidden;
  }
  .tool-card.has-image {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.5em;
  }

  .tool-text {
    padding-right: 0;
    align-self: center;
  }

  .tool-img {
    width: 100%;
    max-width: 100%;
    margin-top: 1em;
  }

  .tool-img img {
    max-height: 200px;
    object-fit: contain;
  }

  .tool-grid {
    padding: 1em;
  }

  header {
    flex-direction: row;
    align-items: center;
    padding: 0.7em 1em;
  }
  header h1 {
    font-size: 1.2em;
    max-width: 60vw;
  }
  nav {
    flex: 1 1 auto;
    justify-content: flex-end;
    padding: 0;
  }
  .nav-toggle {
    display: block;
    margin-left: auto;
    position: static;
    top: auto;
    right: auto;
    transform: none;
  }
  nav .nav-links {
    display: flex;
    flex-direction: column;
    width: 90vw;
    max-width: 340px;
    background: #23234a;
    position: absolute;
    left: 50%;
    top: 110%;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -10px) scale(0.98);
    transition: opacity 0.35s cubic-bezier(.4,2,.6,1), transform 0.35s cubic-bezier(.4,2,.6,1);
    box-sizing: border-box;
    margin: 0;
  }
  nav .nav-links.open {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0) scale(1);
  }
  nav a {
    margin: 0.5em 1em;
    width: auto;
    border-radius: 4px;
    background: none;
    border-bottom: 1px solid #333;
    color: #fff;
    text-align: left;
    padding: 1em 2em;
    transition: background 0.2s;
  }
  nav a:last-child {
    border-bottom: none;
  }

  .hero .cta-buttons a {
    margin: 0;
    margin-bottom: 1em;
  }

}

