/* --- General Styles & Variables --- */
:root {
  --primary-color: rgb(1, 97, 239);
  --secondary-color: rgb(1, 84, 207);
  --accent-color: rgb(109, 40, 217);
  --text-heading-color: rgb(0, 0, 0);
  --text-default-color: rgb(16, 16, 16);
  --text-muted-color: rgba(16, 16, 16, 0.66);
  --background-color: rgb(255, 255, 255);
  --card-background: #f8f9fa;
  --border-color: #e9ecef;
  --font-family: "Inter", sans-serif;
}

body {
  font-family: var(--font-family);
  margin: 0;
  background-color: var(--background-color);
  color: var(--text-default-color);
  line-height: 1.6;
}

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

h1,
h2,
h3 {
  color: var(--text-heading-color);
  font-weight: 700;
}

h1 {
  font-size: 3rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
}

p {
  margin-bottom: 1rem;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--secondary-color);
}

strong {
  font-weight: 600;
}

/* --- Header & Navigation --- */
.site-header {
  background-color: var(--background-color);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-heading-color);
  z-index: 1001; /* Ensure logo is clickable over nav */
  position: relative;
}

.main-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  gap: 2rem;
}

.main-nav a {
  font-weight: 500;
  color: var(--text-default-color);
}

.cta-button-header {
  background-color: var(--primary-color);
  color: #fff;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.cta-button-header:hover {
  background-color: var(--secondary-color);
}

/* --- CSS-Only Hamburger Menu --- */
.nav-toggle-checkbox {
  display: none; /* Hide the checkbox */
}

.nav-toggle-label {
  display: none; /* Hidden by default, shown on mobile */
  height: 24px;
  width: 28px;
  cursor: pointer;
  z-index: 1001;
  position: relative;
}

.hamburger {
  display: block;
  position: relative;
  width: 1.75em;
  height: 2px;
  background: var(--primary-color);
  border-radius: 3px;
  transition: transform 250ms ease-in-out;
  top: 11px; /* Center the line */
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  width: 1.75em;
  height: 2px;
  background: var(--primary-color);
  border-radius: 3px;
  transition: all 250ms ease-in-out;
}

.hamburger::before {
  top: -7px;
}
.hamburger::after {
  top: 7px;
}

/* Animate to "X" when nav is open */
.nav-toggle-checkbox:checked + .nav-toggle-label .hamburger {
  background: transparent;
}

.nav-toggle-checkbox:checked + .nav-toggle-label .hamburger::before {
  transform: rotate(45deg);
  top: 0;
}

.nav-toggle-checkbox:checked + .nav-toggle-label .hamburger::after {
  transform: rotate(-45deg);
  top: 0;
}

/* Lock body scroll when nav is open */
body:has(.nav-toggle-checkbox:checked) {
  overflow: hidden;
}

/* --- Hero Section (Homepage) --- */
.hero-section {
  padding: 6rem 0;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-content .highlight {
  color: var(--primary-color);
}

.hero-content p {
  font-size: 1.1rem;
  color: var(--text-muted-color);
  margin-bottom: 2rem;
}

/* --- Page Hero Section (Internal Pages) --- */
.page-hero-section {
  background-color: var(--card-background);
  padding: 4rem 0;
  text-align: center;
  border-bottom: 1px solid var(--border-color);
}

.page-hero-section h1 {
  font-size: 2.8rem;
}

.page-hero-section .subtitle {
  font-size: 1.2rem;
  color: var(--text-muted-color);
  max-width: 800px;
  margin: 1rem auto 0;
}

/* --- Buttons --- */
.cta-button,
.cta-button-outline {
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
  display: inline-block;
  transition: all 0.3s ease;
  border: 2px solid var(--primary-color);
  cursor: pointer;
}

.cta-button {
  background-color: var(--primary-color);
  color: #fff;
}

.cta-button:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: #fff;
}

.cta-button-outline {
  background-color: transparent;
  color: var(--primary-color);
}

.cta-button-outline:hover {
  background-color: var(--primary-color);
  color: #fff;
}

.button-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 2rem;
}

/* --- Content & Layout Sections --- */
.content-section {
  padding: 5rem 0;
}

.content-container {
  max-width: 900px;
}

.content-container h2 {
  text-align: left;
  font-size: 2rem;
}

.content-container blockquote {
  border-left: 4px solid var(--primary-color);
  padding-left: 1.5rem;
  margin: 2rem 0;
  font-size: 1.2rem;
  font-style: italic;
  color: var(--text-muted-color);
}

.intro-paragraph {
  font-size: 1.1rem;
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4rem;
}

/* --- Homepage Sections --- */
.tools-section {
  padding: 4rem 0;
  background-color: var(--card-background);
  text-align: center;
}

.tools-section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.tools-list {
  font-size: 1.1rem;
  color: var(--text-muted-color);
  max-width: 900px;
  margin: 0 auto;
}

.advantages-section {
  padding: 6rem 0;
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  text-align: left;
}

.advantage-card {
  background-color: var(--card-background);
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.advantage-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--primary-color);
}

.services-section {
  padding: 6rem 0;
  background-color: #fff;
}
.services-section h2 {
  text-align: center;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  padding: 2rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}
.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
}

.service-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.service-link {
  margin-top: auto;
  font-weight: 600;
}

.cta-section {
  background-color: var(--accent-color);
  color: #fff;
  text-align: center;
  padding: 5rem 0;
}

.cta-section h2 {
  color: #fff;
}

.cta-section .cta-button {
  background-color: #fff;
  color: var(--accent-color);
  border-color: #fff;
}

.cta-section .cta-button:hover {
  background-color: #eee;
  border-color: #eee;
}

/* --- Why JR Solutions Page --- */
.alternating-feature {
  display: flex;
  gap: 3rem;
  align-items: center;
  margin-bottom: 5rem;
}
.alternating-feature.reverse {
  flex-direction: row-reverse;
}
.feature-text {
  flex: 1;
}
.feature-text h2 {
  text-align: left;
  margin-bottom: 1rem;
}
.feature-image {
  flex: 1;
}
.feature-image img {
  width: 100%;
  border-radius: 12px;
}

/* --- Service Detail Pages --- */
.service-detail-container {
  max-width: 1000px;
}
.service-intro {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 4rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}
.service-columns {
  display: flex;
  gap: 3rem;
  margin-bottom: 3rem;
}
.service-tasks,
.service-benefits {
  flex: 1;
}
.service-tasks h3,
.service-benefits h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 0.5rem;
}
.service-tasks ul,
.service-benefits ul {
  list-style: none;
  padding: 0;
}
.service-tasks ul li,
.service-benefits ul li {
  padding-left: 1.5rem;
  position: relative;
  margin-bottom: 1rem;
}
.service-tasks ul li::before,
.service-benefits ul li::before {
  content: "✓";
  color: var(--primary-color);
  position: absolute;
  left: 0;
  font-weight: 700;
}
.proficiency-section {
  background-color: var(--card-background);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
}
.proficiency-section h3 {
  margin-bottom: 1rem;
}

/* --- Contact Page --- */
.contact-container {
  display: flex;
  gap: 3rem;
  max-width: 1100px;
}
.contact-form-wrapper {
  flex: 2;
}
.contact-details {
  flex: 1;
  background-color: var(--card-background);
  padding: 2rem;
  border-radius: 12px;
}
.contact-details h2 {
  text-align: left;
  margin-bottom: 1.5rem;
}
.contact-form-wrapper h2 {
  text-align: left;
}
.form-group {
  margin-bottom: 1.5rem;
}
.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: var(--font-family);
  font-size: 1rem;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(1, 97, 239, 0.2);
}
.form-group select[multiple] {
  height: 150px;
}
.privacy-note {
  font-size: 0.9rem;
  color: var(--text-muted-color);
  margin-top: 1rem;
}

/* --- Footer --- */
.site-footer-bottom {
  background-color: var(--text-heading-color);
  color: #fff;
  text-align: center;
  padding: 1.5rem 0;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
  .alternating-feature,
  .alternating-feature.reverse {
    flex-direction: column;
  }
  .contact-container {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  h1,
  .page-hero-section h1 {
    font-size: 2.2rem;
  }

  h2 {
    font-size: 1.8rem;
  }

  .cta-button-header {
    display: none; /* Hide desktop CTA */
  }

  .nav-toggle-label {
    display: block; /* Show hamburger icon */
  }

  .main-nav {
    display: none; /* Hide nav by default */
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(3px);
    z-index: 1000;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  /* Show nav when checkbox is checked */
  .nav-toggle-checkbox:checked ~ .main-nav {
    display: flex;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 2.5rem;
    text-align: center;
  }

  .main-nav a {
    font-size: 1.25rem;
    font-weight: 600;
  }

  .service-columns {
    flex-direction: column;
  }
}
