/* Modern styles for 淨騰工商稅務 */

:root {
  --primary: #1a5f7a;
  --primary-light: #e8f4f8;
  --accent: #159895;
  --text: #2c3e50;
  --text-muted: #5a6a7a;
  --bg: #f7f9fc;
  --white: #ffffff;
  --border: #e2e8f0;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.1);
  --radius: 12px;
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Microsoft JhengHei", "Hiragino Sans GB", "STHeiti", "Microsoft YaHei", "Noto Sans TC", sans-serif !important;
  font-size: 18px;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ========== Navbar ========== */
.navbar {
  background-color: var(--white) !important;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.navbar-brand {
  font-size: 1.45rem !important;
  font-weight: 700;
  color: var(--primary) !important;
  letter-spacing: 0.02em;
}

.navbar-nav .nav-link {
  font-size: 1.1rem !important;
  font-weight: 500;
  color: var(--text) !important;
  padding: 0.5rem 1rem !important;
  margin: 0 0.15rem;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
  color: var(--primary) !important;
  background-color: var(--primary-light);
}

.navbar-toggler {
  border-color: var(--border) !important;
  padding: 0.4rem 0.6rem;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='30' height='30' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(26, 95, 122, 0.85)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* ========== Main content ========== */
.main-content {
  flex: 1;
  padding: 2rem 0 3rem;
}

.container {
  max-width: 960px;
}

/* ========== Typography ========== */
h1, h2, .page-title {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 1rem;
  letter-spacing: 0.01em;
}

h3, h4, .section-title {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 1.75rem;
  margin-bottom: 0.75rem;
}

p {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 0.9rem;
}

/* ========== Hero / Intro ========== */
.hero-section {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2.25rem;
  margin-bottom: 2rem;
}

.hero-section h2 {
  margin-top: 0;
}

.hero-section .lead {
  font-size: 1.15rem;
  color: var(--text);
  margin-bottom: 1rem;
}

.highlight-box {
  background: linear-gradient(135deg, var(--primary-light), #d4f1f4);
  border-left: 4px solid var(--accent);
  padding: 1rem 1.25rem;
  border-radius: 0 8px 8px 0;
  margin: 1.25rem 0;
  font-weight: 500;
  color: var(--primary);
  font-size: 1.1rem;
}

.btn-contact-now {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff !important;
  font-size: 1.15rem;
  font-weight: 600;
  padding: 0.85rem 1.75rem;
  border-radius: 10px;
  margin: 1.25rem 0;
  text-decoration: none !important;
  letter-spacing: 0.03em;
  box-shadow: 0 4px 15px rgba(26, 95, 122, 0.25);
  transition: opacity 0.2s, transform 0.15s, box-shadow 0.2s;
}

.btn-contact-now:hover {
  opacity: 0.92;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 95, 122, 0.35);
  color: #fff !important;
}

.hero-img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-width: 100%;
  height: auto;
}

/* ========== Service cards ========== */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid var(--border);
  height: 100%;
}

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

.service-card h4 {
  margin-top: 0;
  color: var(--primary);
  font-size: 1.2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--primary-light);
}

.service-card p {
  margin-bottom: 0;
  font-size: 1rem;
  line-height: 1.65;
}

/* ========== Form ========== */
.form-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  border: 1px solid var(--border);
}

.form-group label {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  margin-bottom: 0.4rem;
}

.form-control {
  font-size: 1.05rem !important;
  padding: 0.7rem 1rem !important;
  border-radius: 8px !important;
  border: 1.5px solid var(--border) !important;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(21, 152, 149, 0.15) !important;
}

.btn-submit {
  background: linear-gradient(135deg, var(--primary), var(--accent)) !important;
  border: none !important;
  font-size: 1.15rem !important;
  font-weight: 600 !important;
  padding: 0.85rem 1.5rem !important;
  border-radius: 10px !important;
  letter-spacing: 0.03em;
  transition: opacity 0.2s, transform 0.15s;
  margin-top: 0.5rem;
}

.btn-submit:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* ========== Services section (homepage) ========== */
.services-section {
  margin-top: 0.5rem;
  margin-bottom: 1rem;
}

.section-lead {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

/* ========== Contact page ========== */
.contact-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.contact-lead {
  max-width: 640px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.75;
}

.contact-grid {
  margin-bottom: 1rem;
}

.contact-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem;
  border: 1px solid var(--border);
  margin-bottom: 1.25rem;
  height: 100%;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.contact-card:hover {
  box-shadow: var(--shadow-hover);
}

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

.contact-card .avatar {
  width: 110px;
  height: 110px;
  object-fit: cover;
  border-radius: 50%;
  border: 4px solid var(--primary-light);
  margin: 0.5rem auto 1rem;
  display: block;
  box-shadow: 0 4px 12px rgba(26, 95, 122, 0.12);
}

.person-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 0.25rem;
}

.person-role {
  font-size: 0.95rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.contact-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  gap: 0.75rem;
}

.contact-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.contact-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 3.2rem;
  flex-shrink: 0;
}

.contact-list a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 1.05rem;
  word-break: break-all;
}

.contact-list a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.contact-line-card {
  text-align: left;
}

.line-qr {
  width: 140px;
  height: 140px;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 6px;
  background: #fff;
}

.line-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 0.5rem;
}

.line-desc {
  font-size: 1rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  line-height: 1.65;
}

.line-logo {
  height: 36px;
  width: auto;
  display: block;
}

.contact-address {
  text-align: left;
}

.address-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin: 0 0 0.5rem;
}

.address-text {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 1rem;
}

.map-wrapper {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border);
}

.map-wrapper iframe {
  width: 100% !important;
  max-width: 100%;
  height: 260px;
  border: 0;
  display: block;
}

/* ========== Footer ========== */
footer {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

footer p {
  font-size: 0.95rem;
  color: #8a9aab;
  margin-bottom: 0;
}

/* ========== Responsive ========== */
@media (max-width: 767.98px) {
  body {
    font-size: 17px;
  }

  .hero-section {
    padding: 1.5rem;
  }

  h1, h2, .page-title {
    font-size: 1.6rem;
  }

  .navbar-brand {
    font-size: 1.25rem !important;
  }

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

  .form-card {
    padding: 1.5rem;
  }

  .contact-card {
    padding: 1.5rem;
  }

  .line-qr {
    width: 120px;
    height: 120px;
  }

  .contact-list li {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.25rem;
  }
}
