/* AI Revenue Service - Official Government Styling */

:root {
  --primary-dark: #1a2e4a;
  --primary: #2c5282;
  --primary-light: #3d7bbd;
  --accent: #c41e3a;
  --accent-light: #e53e3e;
  --gray-100: #f7fafc;
  --gray-200: #edf2f7;
  --gray-300: #e2e8f0;
  --gray-400: #cbd5e0;
  --gray-500: #a0aec0;
  --gray-600: #718096;
  --gray-700: #4a5568;
  --gray-800: #2d3748;
  --gold: #b8860b;
  --success: #276749;
  --warning: #c05621;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--gray-800);
  background: var(--gray-100);
}

/* Official Header Banner */
.official-banner {
  background: var(--gray-800);
  color: white;
  padding: 8px 0;
  font-size: 12px;
}

.official-banner .container {
  display: flex;
  align-items: center;
  gap: 8px;
}

.official-banner .flag-icon {
  font-size: 14px;
}

/* Main Header */
.main-header {
  background: var(--primary-dark);
  color: white;
  padding: 16px 0;
  border-bottom: 4px solid var(--accent);
}

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

.logo-section {
  display: flex;
  align-items: center;
  gap: 16px;
}

.seal {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--gold) 0%, #d4a017 50%, var(--gold) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  border: 3px solid white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.agency-name h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.agency-name .tagline {
  font-size: 14px;
  opacity: 0.9;
  font-weight: 400;
}

.header-search {
  display: flex;
  gap: 8px;
}

.header-search input {
  padding: 10px 16px;
  border: none;
  border-radius: 4px;
  width: 280px;
  font-size: 14px;
}

.header-search button {
  background: var(--accent);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.header-search button:hover {
  background: var(--accent-light);
}

/* Navigation */
.main-nav {
  background: var(--primary);
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 0;
}

.nav-list a {
  display: block;
  color: white;
  text-decoration: none;
  padding: 14px 24px;
  font-weight: 600;
  font-size: 15px;
  transition: background 0.2s;
  border-right: 1px solid rgba(255,255,255,0.1);
}

.nav-list a:hover,
.nav-list a.active {
  background: var(--primary-light);
}

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

/* Alert Banner */
.alert-banner {
  background: #fffbeb;
  border-left: 4px solid var(--warning);
  padding: 16px 24px;
  margin: 24px 0;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.alert-banner.info {
  background: #ebf8ff;
  border-color: var(--primary);
}

.alert-banner.success {
  background: #f0fff4;
  border-color: var(--success);
}

.alert-icon {
  font-size: 20px;
}

.alert-content h3 {
  font-size: 16px;
  margin-bottom: 4px;
  color: var(--gray-800);
}

.alert-content p {
  font-size: 14px;
  color: var(--gray-600);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: white;
  padding: 60px 0;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero h2 {
  font-size: 42px;
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.2;
}

.hero p {
  font-size: 18px;
  opacity: 0.9;
  margin-bottom: 24px;
}

.hero-cta {
  display: flex;
  gap: 16px;
}

.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: white;
}

.btn-primary:hover {
  background: var(--accent-light);
}

.btn-secondary {
  background: white;
  color: var(--primary-dark);
}

.btn-secondary:hover {
  background: var(--gray-200);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-outline:hover {
  background: white;
  color: var(--primary-dark);
}

.hero-card {
  background: white;
  border-radius: 8px;
  padding: 32px;
  color: var(--gray-800);
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.hero-card h3 {
  font-size: 20px;
  margin-bottom: 24px;
  color: var(--primary-dark);
}

.deadline-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--gray-200);
}

.deadline-item:last-child {
  border-bottom: none;
}

.deadline-date {
  background: var(--accent);
  color: white;
  padding: 8px 12px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  text-align: center;
  min-width: 80px;
}

.deadline-info h4 {
  font-size: 15px;
  margin-bottom: 2px;
}

.deadline-info p {
  font-size: 13px;
  color: var(--gray-600);
}

/* Quick Links Section */
.quick-links {
  padding: 60px 0;
  background: white;
}

.section-title {
  font-size: 28px;
  color: var(--primary-dark);
  margin-bottom: 32px;
  padding-bottom: 12px;
  border-bottom: 3px solid var(--accent);
  display: inline-block;
}

.links-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.link-card {
  background: var(--gray-100);
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  padding: 24px;
  text-decoration: none;
  color: var(--gray-800);
  transition: all 0.2s;
  display: block;
}

.link-card:hover {
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.link-card .icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.link-card h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: var(--primary-dark);
}

.link-card p {
  font-size: 14px;
  color: var(--gray-600);
}

/* Tax Code Styles */
.page-header {
  background: var(--primary-dark);
  color: white;
  padding: 48px 0;
}

.page-header h1 {
  font-size: 36px;
  margin-bottom: 8px;
}

.page-header .breadcrumb {
  font-size: 14px;
  opacity: 0.8;
}

.page-header .breadcrumb a {
  color: white;
  text-decoration: none;
}

.page-header .breadcrumb a:hover {
  text-decoration: underline;
}

.content-section {
  padding: 48px 0;
}

.content-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
}

.sidebar {
  position: sticky;
  top: 24px;
  height: fit-content;
}

.sidebar-nav {
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  overflow: hidden;
}

.sidebar-nav h3 {
  background: var(--gray-200);
  padding: 16px 20px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--gray-700);
}

.sidebar-nav ul {
  list-style: none;
}

.sidebar-nav a {
  display: block;
  padding: 12px 20px;
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  border-bottom: 1px solid var(--gray-200);
  transition: background 0.2s;
}

.sidebar-nav a:hover {
  background: var(--gray-100);
}

.sidebar-nav a.active {
  background: var(--primary);
  color: white;
}

.main-content {
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  padding: 40px;
}

.main-content h2 {
  font-size: 24px;
  color: var(--primary-dark);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--gray-200);
}

.main-content h3 {
  font-size: 18px;
  color: var(--primary-dark);
  margin: 32px 0 12px 0;
}

.main-content p {
  margin-bottom: 16px;
  color: var(--gray-700);
}

.main-content ul, .main-content ol {
  margin: 16px 0 16px 24px;
  color: var(--gray-700);
}

.main-content li {
  margin-bottom: 8px;
}

/* Tax Tables */
.tax-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
}

.tax-table th {
  background: var(--primary-dark);
  color: white;
  padding: 14px 16px;
  text-align: left;
  font-weight: 600;
  font-size: 14px;
}

.tax-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--gray-300);
  font-size: 14px;
}

.tax-table tr:nth-child(even) {
  background: var(--gray-100);
}

.tax-table tr:hover {
  background: #ebf8ff;
}

.code-ref {
  font-family: 'Consolas', 'Monaco', monospace;
  background: var(--gray-200);
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 13px;
  color: var(--accent);
}

/* Form Styles */
.form-section {
  background: white;
  border: 1px solid var(--gray-300);
  border-radius: 8px;
  margin-bottom: 24px;
}

.form-section-header {
  background: var(--gray-100);
  padding: 20px 24px;
  border-bottom: 1px solid var(--gray-300);
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-section-header h3 {
  font-size: 18px;
  color: var(--primary-dark);
}

.form-section-header .step-number {
  background: var(--primary);
  color: white;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
}

.form-section-body {
  padding: 24px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group.full-width {
  grid-column: span 2;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 14px;
  color: var(--gray-700);
}

.form-group .required {
  color: var(--accent);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--gray-400);
  border-radius: 4px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.15);
}

.form-group .help-text {
  font-size: 13px;
  color: var(--gray-600);
  margin-top: 6px;
}

.form-group input[type="checkbox"],
.form-group input[type="radio"] {
  width: auto;
  margin-right: 8px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-weight: 400;
  cursor: pointer;
}

.checkbox-label input {
  margin-top: 4px;
}

/* Progress Indicator */
.progress-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 40px;
  position: relative;
}

.progress-bar::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--gray-300);
  z-index: 0;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 1;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--gray-400);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.progress-step.active .step-circle {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.progress-step.completed .step-circle {
  background: var(--success);
  border-color: var(--success);
  color: white;
}

.step-label {
  font-size: 13px;
  color: var(--gray-600);
  text-align: center;
}

.progress-step.active .step-label {
  color: var(--primary);
  font-weight: 600;
}

/* Tax Calculator Results */
.calculation-result {
  background: var(--gray-100);
  border: 2px solid var(--gray-300);
  border-radius: 8px;
  padding: 24px;
  margin-top: 32px;
}

.calculation-result h3 {
  font-size: 18px;
  margin-bottom: 20px;
  color: var(--primary-dark);
}

.result-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--gray-300);
}

.result-row:last-child {
  border-bottom: none;
}

.result-row.total {
  font-weight: 700;
  font-size: 18px;
  color: var(--primary-dark);
  border-top: 2px solid var(--gray-400);
  margin-top: 12px;
  padding-top: 16px;
}

.result-value {
  font-family: 'Consolas', monospace;
}

/* Footer */
.main-footer {
  background: var(--gray-800);
  color: white;
  padding: 48px 0 24px;
  margin-top: 60px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 40px;
}

.footer-section h4 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  color: var(--gray-400);
}

.footer-section ul {
  list-style: none;
}

.footer-section a {
  color: var(--gray-300);
  text-decoration: none;
  font-size: 14px;
  display: block;
  padding: 6px 0;
  transition: color 0.2s;
}

.footer-section a:hover {
  color: white;
}

.footer-bottom {
  border-top: 1px solid var(--gray-700);
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--gray-500);
}

.footer-bottom a {
  color: var(--gray-400);
  text-decoration: none;
  margin-left: 24px;
}

.footer-bottom a:hover {
  color: white;
}

/* Success Page */
.success-container {
  text-align: center;
  padding: 60px 0;
}

.success-icon {
  width: 100px;
  height: 100px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  margin: 0 auto 24px;
}

.confirmation-number {
  background: var(--gray-100);
  border: 2px dashed var(--gray-400);
  padding: 24px;
  border-radius: 8px;
  margin: 32px auto;
  max-width: 400px;
}

.confirmation-number h4 {
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 8px;
  text-transform: uppercase;
}

.confirmation-number .number {
  font-family: 'Consolas', monospace;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary-dark);
  letter-spacing: 2px;
}

/* Responsive */

/* Tablet */
@media (max-width: 1024px) {
  .links-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .content-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .hero h2 {
    font-size: 32px;
  }
}

/* Mobile */
@media (max-width: 768px) {
  /* Container */
  .container {
    padding: 0 16px;
  }

  /* Header */
  .main-header {
    padding: 12px 0;
  }

  .header-content {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .logo-section {
    flex-direction: column;
    gap: 8px;
  }

  .seal {
    width: 56px;
    height: 56px;
    font-size: 22px;
  }

  .agency-name h1 {
    font-size: 22px;
  }

  .agency-name .tagline {
    font-size: 12px;
  }

  .header-search {
    width: 100%;
  }

  .header-search input {
    flex: 1;
    width: 100%;
  }

  /* Navigation */
  .main-nav {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-list {
    flex-wrap: nowrap;
    min-width: max-content;
  }

  .nav-list a {
    padding: 12px 16px;
    font-size: 14px;
    white-space: nowrap;
  }

  /* Hero */
  .hero {
    padding: 32px 0;
  }

  .hero-content {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .hero h2 {
    font-size: 28px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-cta .btn {
    width: 100%;
    text-align: center;
  }

  .hero-card {
    padding: 20px;
  }

  /* Buttons */
  .btn {
    padding: 12px 20px;
    font-size: 15px;
  }

  /* Alert Banner */
  .alert-banner {
    flex-direction: column;
    padding: 16px;
  }

  /* Quick Links */
  .quick-links {
    padding: 32px 0;
  }

  .section-title {
    font-size: 22px;
  }

  .links-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .link-card {
    padding: 20px;
  }

  /* Page Header */
  .page-header {
    padding: 24px 0;
  }

  .page-header h1 {
    font-size: 26px;
  }

  /* Content Section */
  .content-section {
    padding: 24px 0;
  }

  .main-content {
    padding: 20px;
  }

  .main-content h2 {
    font-size: 20px;
  }

  /* Tables - Horizontal scroll */
  .tax-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }

  .tax-table th,
  .tax-table td {
    padding: 10px 12px;
    font-size: 13px;
  }

  /* Forms */
  .form-section-header {
    padding: 16px;
    flex-wrap: wrap;
  }

  .form-section-header h3 {
    font-size: 16px;
  }

  .form-section-body {
    padding: 16px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .form-group.full-width {
    grid-column: span 1;
  }

  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 14px;
    font-size: 16px; /* Prevents zoom on iOS */
  }

  /* Progress Bar */
  .progress-bar {
    overflow-x: auto;
    padding-bottom: 8px;
    margin-bottom: 24px;
    gap: 8px;
  }

  .progress-bar::before {
    display: none;
  }

  .progress-step {
    min-width: 60px;
  }

  .step-circle {
    width: 32px;
    height: 32px;
    font-size: 14px;
  }

  .step-label {
    font-size: 11px;
  }

  /* Results */
  .result-row {
    flex-direction: column;
    gap: 4px;
    padding: 10px 0;
  }

  .result-row.total {
    flex-direction: row;
    font-size: 16px;
  }

  .calculation-result {
    padding: 16px;
  }

  /* Footer */
  .main-footer {
    padding: 32px 0 20px;
    margin-top: 32px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .footer-bottom a {
    margin-left: 12px;
    margin-right: 12px;
  }

  /* Success Page */
  .success-container {
    padding: 32px 0;
  }

  .success-icon {
    width: 80px;
    height: 80px;
    font-size: 36px;
  }

  .confirmation-number .number {
    font-size: 20px;
    word-break: break-all;
  }

  /* News Grid */
  [style*="grid-template-columns: repeat(3"] {
    display: block !important;
  }

  [style*="grid-template-columns: repeat(3"] > * {
    margin-bottom: 16px;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .agency-name h1 {
    font-size: 20px;
  }

  .hero h2 {
    font-size: 24px;
  }

  .section-title {
    font-size: 20px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .deadline-item {
    flex-direction: column;
    text-align: center;
    gap: 8px;
  }

  .deadline-date {
    min-width: auto;
  }
}
