/* CSS Custom Properties for Theme Management */
:root {
  /* Light Mode Colors */
  --primary-color: #F5BF03;
  --bg-color: #f5f5f5;
  --text-color: #333333;
  --text-light: #666666;
  --card-bg: #ffffff;
  --border-color: #e0e0e0;
  --accent-color: #4a7bc8;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
}

/* Dark Mode Colors */
[data-theme="dark"] {
  --primary-color: #F5BF03;
  --bg-color: #0f0f0f;
  --text-color: #ffffff;
  --text-light: #cccccc;
  --card-bg: #1a1a1a;
  --border-color: #333333;
  --accent-color: #4a7bc8;
  --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--bg-color);
  transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* Header Styles */
.header {
  background-color: var(--card-bg);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-image {
  height: 84px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* Swap logos by theme (dark logo on light theme, light logo on dark theme) */
.logo-dark { display: block; }
.logo-light { display: none; }

[data-theme="dark"] .logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: block; }

.fallback-text {
  display: none;
}

/* Fallback text will be shown via JavaScript if logos fail to load */
.logo.no-logo .fallback-text {
  display: block;
}

.logo.no-logo .logo-image {
  display: none;
}

.logo-text h1 {
  color: var(--primary-color);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.tagline {
  color: var(--text-light);
  font-size: 0.9rem;
  font-weight: 400;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.phone {
  font-weight: 600;
  color: var(--accent-color);
  font-size: 1.1rem;
}

.theme-toggle {
  background: var(--primary-color);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.theme-toggle:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-hover);
}

.theme-icon {
  font-size: 1.4rem;
  font-weight: bold;
  color: #000;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, #e6a800 100%);
  color: #000;
  padding: 4rem 0;
  text-align: center;
}

.hero-content h2 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.hero-description {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  opacity: 0.9;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* Button Styles */
.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.btn-primary {
  background-color: var(--primary-color);
  color: #000;
  border: 2px solid var(--primary-color);
  font-weight: 600;
}

.btn-primary:hover {
  background-color: transparent;
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(245, 191, 3, 0.3);
}

.btn-secondary {
  background-color: transparent;
  color: #000;
  border: 2px solid #000;
  font-weight: 500;
}

.btn-secondary:hover {
  background-color: #000;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Section Styles */
section {
  padding: 4rem 0;
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* About Section */
.about {
  background-color: var(--card-bg);
}

.about-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.about-text .lead {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.about-text p {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  color: var(--text-light);
}

.highlight-card {
  background: linear-gradient(135deg, var(--primary-color), #e6a800);
  color: #000;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.highlight-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.highlight-card ul {
  list-style: none;
}

.highlight-card li {
  padding: 0.5rem 0;
  position: relative;
  padding-left: 1.5rem;
}

.highlight-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #000;
  font-weight: bold;
}

/* Services Section */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
  max-width: 1200px;
  margin: 0 auto;
}

.services-grid .service-card {
  width: 100%;
  min-width: 0;
}

.service-card {
  background-color: var(--card-bg);
  padding: 2.25rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid var(--border-color);
  min-height: 240px;
  display: grid;
  grid-auto-rows: min-content;
  align-content: center;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.service-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.service-card h3 {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.service-card p {
  color: var(--text-light);
  line-height: 1.6;
}

/* Locations Section */
.locations {
  background-color: var(--card-bg);
}

.locations-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.main-office, .satellite-offices {
  background-color: var(--bg-color);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
}

/* Center and emphasize main office */
.main-office .office-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.45rem;
}

/* Center main office card content vertically */

/* Keep heading at top; center content block within remaining space */
.main-office {
  display: flex;
  flex-direction: column;
  min-height: 320px;
}

.main-office h3 {
  margin-bottom: 0.75rem;
}

.main-office .office-info {
  margin-top: auto;
  margin-bottom: auto;
}

/* Ensure main office location label matches other cards' visual weight */
.main-office .office-name {
  font-size: 2.0rem;
  font-weight: 700;
  margin-bottom: 0.15rem;
}

@media (max-width: 600px) {
  .main-office { min-height: 260px; }
}

/* Emphasize address and phone on main office */
.main-office .office-address {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.25;
}

.main-office .phone .phone-link {
  font-size: 1.8rem;
  font-weight: 800;
}

@media (max-width: 600px) {
  .main-office .office-address {
    font-size: 1.25rem;
  }
  .main-office .phone .phone-link {
    font-size: 1.4rem;
  }
}

.main-office h3, .satellite-offices h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.office-info h4 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.office-info p {
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.office-info .phone {
  font-weight: 600;
  color: var(--accent-color);
  font-size: 1.1rem;
}

.office-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.office-item {
  padding: 1rem;
  background-color: var(--card-bg);
  border-radius: 8px;
  border: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.office-name {
  font-weight: 600;
  color: var(--text-color);
  font-size: 1.1rem;
}

.office-address {
  font-weight: 400;
  color: var(--text-light);
  font-size: 0.9rem;
  line-height: 1.4;
}

.office-address .line {
  display: block;
}

/* Compact vertical rhythm for office info blocks */
.office-info {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.office-info .address-link,
.office-item .office-address {
  display: inline-block;
  margin: 0;
  line-height: 1.3;
}

/* Clickable Links Styling */
.address-link, .phone-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.address-link:hover {
  color: var(--primary-color);
  text-decoration: underline;
}

.phone-link:hover {
  color: var(--accent-color);
  text-decoration: underline;
}

.phone-link {
  color: var(--accent-color);
  font-weight: 600;
}

/* Fax styling */
.fax {
  color: var(--text-light);
  font-size: 0.95rem;
}

.fax-link {
  color: var(--text-light);
  text-decoration: none;
}

.fax-link:hover {
  text-decoration: underline;
}

/* Mailing list in footer */
.mailing-addresses {
  margin-top: 0.5rem;
}

.mailing-list {
  list-style: none;
  padding-left: 0;
  margin: 0.25rem 0 0;
}

.mailing-list li {
  color: var(--text-light);
  line-height: 1.5;
}

/* Contact Section */
.contact-content {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: 2rem;
  align-items: center;
}

.contact-card {
  background-color: var(--card-bg);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow);
  text-align: center;
  border: 1px solid var(--border-color);
}

.contact-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.contact-details p {
  margin-bottom: 0.5rem;
  color: var(--text-light);
}

.contact-details .phone {
  font-weight: 600;
  color: var(--accent-color);
  font-size: 1.2rem;
}

.contact-cta {
  text-align: center;
}

.contact-cta h3 {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  color: var(--text-color);
}

.contact-cta p {
  font-size: 1.1rem;
  color: var(--text-light);
  margin-bottom: 2rem;
}

/* Footer */
.footer {
  background-color: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0 1rem;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.footer-info h3 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.footer-info p {
  color: var(--text-light);
}

.footer-contact p {
  color: var(--text-light);
  margin-bottom: 0.25rem;
}

.footer-bottom {
  text-align: center;
  padding-top: 1rem;
  border-top: 1px solid var(--border-color);
}

.footer-bottom p {
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Footer link color (unclicked/default) */
.footer-bottom a {
  color: var(--primary-color);
  text-decoration: none;
}

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

/* Footer social links */
.footer-social {
  text-align: right;
}

.social-links {
  display: flex;
  gap: 0.5rem;
}

/* Add vertical spacing when social links appear under footer info */
.footer-info .social-links {
  margin-top: 1.5rem; /* roughly two lines of space */
}

.social-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
}

.social-links a:hover {
  text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .services-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 1.2rem;
  }
  
  .service-card {
    padding: 1.5rem;
  }
}

@media (max-width: 992px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.2rem;
  }
  
  .service-card {
    padding: 1.25rem;
  }
}

@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }

  .logo-image {
    height: 64px;
  }

  .logo {
    flex-direction: column;
    gap: 0.5rem;
  }

  .logo-image {
    height: 50px;
  }

  .logo-text h1 {
    font-size: 1.8rem;
  }

  .hero-content h2 {
    font-size: 2rem;
  }

  .hero-description {
    font-size: 1rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .about-content,
  .locations-content,
  .contact-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .service-card {
    padding: 1rem;
  }

  .footer-content {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .footer-social { text-align: center; }

  .section-header h2 {
    font-size: 2rem;
  }

  .container {
    padding: 0 15px;
  }
}

@media (max-width: 600px) {
  .services-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 2rem 0;
  }

  .hero-content h2 {
    font-size: 1.8rem;
  }

  section {
    padding: 2rem 0;
  }

  .service-card,
  .contact-card,
  .highlight-card {
    padding: 1.5rem;
  }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Focus styles for accessibility */
.btn:focus,
.theme-toggle:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Animation for theme transition */
* {
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

