/*
  Modern and professional styles for Canada Calculator Hub
  This stylesheet defines a clean layout with clear hierarchy,
  generous spacing and subtle accents inspired by the original design.
  It uses CSS variables for colours and responsiveness without
  relying on external frameworks.
*/

/* Root colour palette and sizing */
:root {
  --brand-primary: #0ea5e9; /* blue accent from original site */
  --brand-secondary: #8b5cf6; /* purple accent from original site */
  --bg-light: #f7fbff;
  --bg-muted: #eef4fb;
  --text-primary: #0b1220;
  --text-muted: #52637a;
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.05);
  --radius: 14px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
  --transition-fast: 0.2s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-light);
  line-height: 1.6;
}

/* Container class centers content and applies horizontal padding */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Header styles */
.header {
  background-color: var(--bg-light);
  border-bottom: 1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.125rem;
}

.logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255,255,255,0.4);
}

.nav {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius);
  font-weight: 600;
  color: var(--text-primary);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
  background-color: var(--brand-primary);
  color: white;
}

/* Hero section */
.hero {
  padding: 3rem 0 2rem;
  background: radial-gradient(1000px 800px at 100% 0%, rgba(139,92,246,0.2), transparent 60%),
              radial-gradient(1200px 800px at 0% 0%, rgba(110,231,255,0.2), transparent 60%),
              var(--bg-light);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 2rem;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

.hero-text h1 {
  margin-top: 0;
  margin-bottom: 0.8rem;
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.2;
}

.hero-text p {
  margin-bottom: 1.2rem;
  color: var(--text-muted);
  max-width: 50ch;
}

.hero-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1rem;
}

.hero-controls .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 180px;
}

.hero-controls label {
  font-weight: 600;
  font-size: 0.9rem;
}

.hero-controls select {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background-color: var(--card-bg);
  font-size: 1rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  color: white;
  box-shadow: 0 6px 20px rgba(110, 231, 255, 0.25);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(110, 231, 255, 0.3);
}

.note {
  font-size: 0.9rem;
  color: var(--text-muted);
  max-width: 60ch;
}

/* Hero side card */
.hero-side .card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.hero-side h2 {
  margin-top: 0;
  margin-bottom: 0.6rem;
  font-size: 1.25rem;
  font-weight: 700;
}

.hero-side ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
  margin-bottom: 0.6rem;
}

.hero-side li {
  margin-bottom: 0.4rem;
  position: relative;
  padding-left: 1.2rem;
}

.hero-side li::before {
  content: '\2022';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--brand-primary);
  font-weight: bold;
}

.hero-side p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* Card component shared styles */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

/* Section headings */
section h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 1rem;
}

/* Accordion styles for FAQ */
.accordion {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.acc-item {
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background-color: var(--card-bg);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.acc-btn {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 1rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color var(--transition-fast);
}

.acc-btn:hover {
  background-color: var(--bg-muted);
}

.acc-btn .icon {
  font-size: 1.1rem;
  transition: transform var(--transition-fast);
}

.acc-item.open .acc-btn .icon {
  transform: rotate(90deg);
}

.acc-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-fast) ease;
  padding: 0 1rem;
}

.acc-item.open .acc-content {
  padding-top: 0;
  padding-bottom: 1rem;
  max-height: 1000px; /* large value to animate open */
}

.acc-content p {
  margin-top: 0.8rem;
  margin-bottom: 0;
  color: var(--text-muted);
}

.acc-content a {
  color: var(--brand-primary);
  text-decoration: none;
  font-weight: 600;
}

/* Guides section */
.guides .guide {
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  background-color: var(--card-bg);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 0.8rem;
}

.guide-btn {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 1rem;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color var(--transition-fast);
}

.guide-btn:hover {
  background-color: var(--bg-muted);
}

.guide-btn .icon {
  transition: transform var(--transition-fast);
}

.guide.open .guide-btn .icon {
  transform: rotate(90deg);
}

.guide-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-fast) ease;
  padding: 0 1rem;
}

.guide.open .guide-content {
  padding-top: 0;
  padding-bottom: 1rem;
  max-height: 2000px;
}

.guide-content p {
  margin: 0.6rem 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.guide-content .help {
  color: var(--text-muted);
  font-style: italic;
  margin-top: 0.5rem;
}

/* Footer */
.footer {
  background-color: var(--bg-light);
  border-top: 1px solid var(--card-border);
  padding: 1.5rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.footer a {
  color: var(--brand-primary);
  text-decoration: none;
  margin-left: 0.5rem;
}

.footer a:hover {
  text-decoration: underline;
}