/* Base styles */
body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  color: #333;
  background-color: white;
}

/* Root variables */
:root {
  --primary-blue: #1a73e8;
  --primary-blue-hover: #1557b3;
  --light-gray: #f8f9fa;
  --dark-gray: #424242;
}

/* Container styles */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Home page header styles */
.home-header {
  padding: 1.5rem 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  background-color: white;
  z-index: 100;
}

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

.logo {
  font-size: 1.8rem;
  font-weight: bold;
  color: var(--dark-gray);
}

.logo span {
  color: var(--primary-blue);
}

nav ul {
  display: flex;
  list-style: none;
}

nav ul li {
  margin-left: 2rem;
}

nav ul li a {
  text-decoration: none;
  color: var(--dark-gray);
  font-weight: 500;
  transition: color 0.3s ease;
}

nav ul li a:hover {
  color: var(--primary-blue);
}

/* Button styles */
.btn {
  display: inline-block;
  background-color: var(--primary-blue);
  color: white;
  padding: 0.8rem 1.8rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn:hover {
  background-color: var(--primary-blue-hover);
}

.btn-calculate {
  background-color: #e63946;
}

/* Hero section */
.hero {
  padding: 5rem 0;
  background-color: var(--light-gray);
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--dark-gray);
}

.hero p {
  font-size: 1.2rem;
  color: #666;
  max-width: 700px;
  margin: 0 auto 2rem auto;
}

/* Features section */
.features {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  color: var(--dark-gray);
}

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

.feature-card {
  padding: 2rem;
  border-radius: 8px;
  background-color: white;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  text-align: center;
  transition: transform 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-5px);
}

.feature-icon {
  font-size: 2.5rem;
  color: var(--primary-blue);
  margin-bottom: 1rem;
}

.feature-card h3 {
  margin-bottom: 1rem;
  color: var(--dark-gray);
}

/* Data safety section */
.data-safety {
  padding: 4rem 0;
  background-color: #e8f5e9;
  text-align: center;
}

.data-safety h2 {
  color: var(--dark-gray);
  margin-bottom: 1.5rem;
}

.data-safety p {
  font-size: 1.2rem;
  color: #555;
  max-width: 800px;
  margin: 0 auto;
}

/* Footer styles */
.home-footer {
  background-color: var(--light-gray);
  padding: 2rem 0;
  text-align: center;
  margin-top: 3rem;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.footer-links {
  margin-bottom: 1rem;
}

.footer-links a {
  color: var(--dark-gray);
  text-decoration: none;
  margin: 0 1rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-blue);
}

.copyright {
  color: #666;
  font-size: 0.9rem;
}

/* Form styles (keeping for completeness) */
header {
  text-align: center;
  margin-bottom: 20px;
  border-bottom: 2px solid #1d3557;
  padding-bottom: 10px;
}

h1 {
  color: #1d3557;
  margin-bottom: 5px;
}

h2 {
  color: #457b9d;
  border-bottom: 1px solid #ddd;
  padding-bottom: 5px;
  margin-top: 30px;
}

.due-date {
  font-weight: bold;
  color: #e63946;
  margin-bottom: 15px;
}

.contact-info {
  font-size: 14px;
  margin-bottom: 20px;
}

.form-section {
  margin-bottom: 30px;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 10px;
  align-items: center;
}

label {
  flex: 1;
  min-width: 250px;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"] {
  flex: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  min-width: 100px;
}

input[type="checkbox"] {
  margin-right: 5px;
}

.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
}

.checkbox-item {
  display: flex;
  align-items: center;
}

.tax-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #ddd;
}

.tax-line label {
  flex: 3;
}

.tax-line-input {
  flex: 1;
  text-align: right;
  position: relative;
}

.tax-line-input::before {
  content: "$";
  position: absolute;
  left: 5px;
  top: 8px;
}

.tax-line-input input {
  padding-left: 15px;
  text-align: right;
}

.tax-line.disabled {
  color: #999;
}

.tax-line.result {
  font-weight: bold;
  background-color: #f1faee;
}

.tax-line.subtotal {
  font-weight: bold;
  border-top: 2px solid #000;
}

.actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

th, td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: left;
}

th {
  background-color: #f1faee;
  font-weight: bold;
}

.worksheet {
  background-color: #f9f9f9;
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 30px;
  border: 1px solid #ddd;
}

.worksheet-header {
  text-align: center;
  margin-bottom: 15px;
  font-weight: bold;
  font-size: 18px;
  color: #1d3557;
}

.worksheet-note {
  font-size: 14px;
  font-style: italic;
  margin-bottom: 15px;
  color: #666;
}

.collapsible {
  background-color: #1d3557;
  color: white;
  cursor: pointer;
  padding: 10px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 16px;
  border-radius: 4px;
}

.active, .collapsible:hover {
  background-color: #457b9d;
}

.collapsible:after {
  content: '\002B';
  color: white;
  font-weight: bold;
  float: right;
  margin-left: 5px;
}

.active:after {
  content: "\2212";
}

.content {
  padding: 0 18px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.2s ease-out;
  background-color: #f1f1f1;
  border-radius: 0 0 4px 4px;
}

/* Instructions section styling */
.instructions-container {
  margin-top: 40px;
  padding: 20px;
  border-top: 2px solid #ccc;
  font-family: Arial, sans-serif;
}

.instructions-container h2 {
  color: #004080;
  text-align: center;
  margin-bottom: 20px;
}

.instructions-container h3 {
  color: #004080;
  margin-top: 25px;
  margin-bottom: 10px;
}

.instructions-container p {
  margin-bottom: 15px;
  line-height: 1.5;
}

.instructions-container .highlight {
  background-color: #fffacd;
  padding: 10px;
  border-left: 4px solid #ffd700;
}

.instructions-container hr {
  margin: 20px 0;
  border: 0;
  border-top: 1px solid #eee;
}

.apportionment-table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
}

.apportionment-table th, .apportionment-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

.apportionment-table th {
  background-color: #f2f2f2;
}

.instructions-container ol {
  padding-left: 20px;
}

.instructions-container ol li {
  margin-bottom: 10px;
}

/* Media queries */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
  }
  
  nav ul {
    margin-top: 1rem;
  }
  
  nav ul li {
    margin-left: 1rem;
    margin-right: 1rem;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
}

/* Media queries for form responsiveness */
@media (max-width: 600px) {
  .form-row {
    flex-direction: column;
    align-items: flex-start;
  }
  
  input[type="text"],
  input[type="email"],
  input[type="number"],
  input[type="date"] {
    width: 100%;
    margin-top: 5px;
  }
  
  .tax-line {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .tax-line-input {
    width: 100%;
    margin-top: 5px;
  }
  
  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
  }
}