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

body {
  font-family: 'Noto Sans CJK TC', 'PingFang TC', 'Microsoft JhengHei', 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: #2c2c2c;
  background-color: #fafafa;
  font-weight: 300;
}

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

/* Navigation */
.navbar {
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo h2 {
  color: #8b7355;
  font-weight: 400;
  font-size: 1.5rem;
  letter-spacing: 0.5px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-link {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #8b7355;
}

.nav-auth, .nav-user {
  display: flex;
  gap: 10px;
  align-items: center;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: #333;
  margin: 3px 0;
  transition: 0.3s;
}

/* Buttons */
.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn-primary {
  background: #8b7355;
  color: white;
  border: none;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.btn-primary:hover {
  background: #6d5a42;
  transform: none;
}

.btn-outline {
  background: transparent;
  color: #8b7355;
  border: 1px solid #8b7355;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.btn-outline:hover {
  background: #8b7355;
  color: white;
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
}

.btn-full {
  width: 100%;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #f5f3f0 0%, #e8e2d8 100%);
  color: #2c2c2c;
  padding: 120px 0 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 20px;
  line-height: 1.3;
  letter-spacing: 1px;
}

.hero-subtitle {
  font-size: 1.2rem;
  margin-bottom: 30px;
  opacity: 0.9;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.hero-card {
  background: rgba(255,255,255,0.8);
  backdrop-filter: blur(10px);
  border-radius: 8px;
  padding: 40px;
  border: 1px solid rgba(139,115,85,0.1);
  box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

.hero-card h3 {
  margin-bottom: 20px;
  font-size: 1.5rem;
}

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

.hero-card li {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

/* Sections */
section {
  padding: 80px 0;
}

section h2 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 50px;
  color: #8b7355;
  font-weight: 300;
  letter-spacing: 0.5px;
}

/* About Section */
.about {
  background: white;
}

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

.about-card {
  background: #fafafa;
  padding: 40px 30px;
  border-radius: 4px;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid rgba(139,115,85,0.1);
}

.about-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.about-card h3 {
  font-size: 1.4rem;
  margin-bottom: 20px;
  color: #8b7355;
  font-weight: 400;
}

/* Services Section */
.services {
  background: #f8f9fa;
}

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

.service-card {
  background: white;
  padding: 40px 30px;
  border-radius: 4px;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  transition: all 0.3s ease;
  border: 1px solid rgba(139,115,85,0.1);
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.service-icon {
  font-size: 2.5rem;
  margin-bottom: 20px;
  opacity: 0.8;
}

.service-card h3 {
  font-size: 1.3rem;
  margin-bottom: 15px;
  color: #8b7355;
  font-weight: 400;
}

/* Professionals Section */
.professionals {
  background: white;
}

.professionals-tabs {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 40px;
}

.tab-btn {
  padding: 12px 30px;
  border: 1px solid #8b7355;
  background: transparent;
  color: #8b7355;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 400;
  letter-spacing: 0.5px;
}

.tab-btn.active,
.tab-btn:hover {
  background: #8b7355;
  color: white;
}

.professionals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
}

.professional-card {
  background: #fafafa;
  padding: 30px;
  border-radius: 4px;
  border: 1px solid rgba(139,115,85,0.1);
  transition: all 0.3s ease;
}

.professional-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.professional-card h3 {
  color: #8b7355;
  margin-bottom: 10px;
  font-weight: 400;
}

.professional-card .type {
  background: #8b7355;
  color: white;
  padding: 4px 12px;
  border-radius: 4px;
  font-size: 0.9rem;
  display: inline-block;
  margin-bottom: 15px;
  font-weight: 400;
}

.professional-card .rating {
  color: #ffc107;
  margin-bottom: 15px;
}

.professional-card .fees {
  font-weight: 400;
  color: #8b7355;
  margin-bottom: 20px;
}

/* Modals */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  backdrop-filter: blur(5px);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 40px;
  border-radius: 4px;
  width: 90%;
  max-width: 500px;
  position: relative;
  animation: modalSlideIn 0.3s ease;
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
  border: 1px solid rgba(139,115,85,0.1);
}

.modal-content.large {
  max-width: 800px;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  position: absolute;
  right: 20px;
  top: 15px;
}

.close:hover {
  color: #333;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #8b7355;
}

.modal-switch {
  text-align: center;
  margin-top: 20px;
}

.modal-switch a {
  color: #8b7355;
  text-decoration: none;
  font-weight: 400;
}

.modal-switch a:hover {
  text-decoration: underline;
}

/* Footer */
.footer {
  background: #8b7355;
  color: white;
  padding: 50px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 30px;
}

.footer-section h3,
.footer-section h4 {
  margin-bottom: 20px;
  color: white;
  font-weight: 400;
}

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

.footer-section ul li {
  margin-bottom: 10px;
}

.footer-section ul li a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

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

.legal-notice {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.5;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.8);
}

/* EPA Form Styles */
.epa-form {
  max-width: 800px;
  margin: 0 auto;
}

.epa-step {
  display: none;
  padding: 20px 0;
}

.epa-step.active {
  display: block;
}

.epa-step h3 {
  color: #8b7355;
  margin-bottom: 20px;
  font-size: 1.4rem;
  font-weight: 400;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-row.single {
  grid-template-columns: 1fr;
}

.checkbox-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin: 20px 0;
}

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

.checkbox-item input[type="checkbox"] {
  width: auto;
}

.attorney-card {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 20px;
  border: 1px solid #e9ecef;
}

.attorney-card h4 {
  color: #8b7355;
  margin-bottom: 15px;
  font-weight: 400;
}

.step-navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e9ecef;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0,0,0,0.05);
    padding: 20px 0;
  }

  .nav-menu.active {
    left: 0;
  }

  .hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 40px;
  }

  .hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .checkbox-group {
    grid-template-columns: 1fr;
  }

  .modal-content {
    margin: 10% auto;
    width: 95%;
    padding: 20px;
  }

  .step-navigation {
    flex-direction: column;
    gap: 10px;
  }
}

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 2rem;
  }

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

  section h2 {
    font-size: 2rem;
  }

  .btn-large {
    padding: 14px 24px;
    font-size: 14px;
  }
}

/* Loading and Error States */
.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #2c5aa0;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.error-message {
  background: #f8d7da;
  color: #721c24;
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
  border: 1px solid #f5c6cb;
}

.success-message {
  background: #d4edda;
  color: #155724;
  padding: 15px;
  border-radius: 8px;
  margin: 20px 0;
  border: 1px solid #c3e6cb;
}

/* Print Styles */
@media print {
  .navbar,
  .hero,
  .footer,
  .modal,
  .btn {
    display: none !important;
  }
  
  body {
    background: white;
  }
  
  .container {
    max-width: none;
    padding: 0;
  }
}
