/* Root & Global Styles */
:root {
  --primary-color: #4757fc;
  --primary-color-dark: #2433b7;
  --secondary-color: #34a853;
  --accent-color: #ea4335;
  --light-color: #f8f9fa;
  --dark-color: #222;
  --gray-color: #5f6368;
  --light-gray: #e8eaed;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background-color: #f5f5f5;
  color: var(--dark-color);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: var(--primary-color);
  transition: color 0.2s;
}

a:focus,
a:hover {
  color: var(--primary-color-dark);
  outline: 2px dashed var(--accent-color);
  outline-offset: 2px;
}

/* Buttons and CTA */
.cta-btn,
.btn {
  display: inline-block;
  background-color: var(--primary-color);
  color: #fff!important;
  padding: 12px 28px;
  border-radius: 8px;
  font-weight: 500;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-size: 1.15em;
  transition: background 0.3s, transform 0.2s;
  margin: 1em 0 0 0;
}

.cta-btn:hover,
.btn:hover,
.tool-card a:hover {
  background: var(--primary-color-dark);
  transform: translateY(-2px);
  color: #fff!important;
}

.cta-btn:focus,
.btn:focus {
  outline: 2px solid var(--accent-color);
}

/* Header Styles */
header {
  background: #292b36;
  color: #fff;
  padding: 2.5em 0 1.5em 0;
  text-align: center;
}

header h1 {
  font-size: 2.5em;
  letter-spacing: -1px;
  font-weight: 800;
}

header p {
  margin: 1.1em auto 1.3em;
  max-width: 540px;
  color: #e4eafd;
  font-size: 1.15em;
}

/* Navigation */
nav {
  background: #fff;
  box-shadow: 0 2px 8px rgba(100,100,100,0.07);
  padding: 1em 0;
}

nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}

nav li {
  margin: 0 1.2em;
}

nav a {
  color: var(--primary-color);
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 1em;
}

nav a:hover,
nav a:focus,
nav a.active {
  background-color: rgba(66, 133, 244, 0.10);
  color: var(--primary-color-dark);
}

/* Main Tools Grid */
main {
  max-width: 1200px;
  margin: 2.5em auto;
  padding: 0 1em;
}

.tools-grid {
  display: grid;
  gap: 2em;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  margin-top: 1.5em;
}

.tool-card {
  background: #fff;
  padding: 1.8em 1.5em;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(60,80,120,0.10);
  text-align: left;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s, box-shadow 0.25s;
}

.tool-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 8px 18px rgba(60,70,120,0.15);
}

.tool-card h2 {
  font-size: 1.18em;
  margin: 0 0 0.4em;
  color: var(--primary-color-dark);
  font-weight: 700;
  letter-spacing: -.5px;
}

.tool-card p {
  flex: 1;
  color: #566;
  font-size: 1em;
  margin-bottom: 1.2em;
}

.tool-card a {
  align-self: flex-start;
  margin-top: 1em;
  font-weight: 500;
  color: #fff!important;
  background: var(--primary-color);
  padding: 0.5em 1.2em;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.25s;
  font-size: 1em;
}

/* Footer */
footer {
  background: #222;
  color: #ccd0e0;
  text-align: center;
  padding: 2em 1em .8em 1em;
  font-size: 1em;
  margin-top: 3em;
}

footer a {
  color: #fff;
  font-weight: 500;
}

footer a:hover {
  color: var(--accent-color);
}

/* Footer note */
footer p:last-child {
  font-size: 0.96em;
  color: #999;
  margin-top: .9em;
}

/* Responsive Styles */
@media (max-width: 900px) {
  header h1 { font-size: 2em; }
  .tools-grid { gap: 1em; }
}

@media (max-width: 600px) {
  .tools-grid { grid-template-columns: 1fr; }
  header { padding: 1.3em 0;}
  nav ul { flex-direction: column; }
  nav li { margin: 0.4em 0; }
  main { margin-top: 1em; }
}

/* Accessibility: Visually highlight focus for keyboard users */
a:focus-visible, .btn:focus-visible, .cta-btn:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 1.5px;
}
