/* --- CSS Variables --- */
:root {
  --primary: #0066CC;
  --primary-dark: #004E9A;
  --primary-light: #3385D6;
  --secondary: #3399EE;
  --accent: #ffcc00;
  --accent-light: #facc55;
  --bg-light: #F5F5F0;
  --bg-white: #FFFFFF;
  --text-dark: #2C3E50;
  --text-gray: #5A6A7A;
  --text-light: #8899AA;
  --border: #DDE3EA;
  --shadow: rgba(0, 102, 204, 0.12);
  --radius: 8px;
  --max-width: 1200px;
  --header-height: 72px;
}

/* --- Keyframes --- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  70% {
    transform: scale(1.05);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 204, 0, 0.5);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(255, 204, 0, 0);
  }
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", sans-serif;
  color: var(--text-dark);
  background: var(--bg-white);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--secondary);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--accent);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

ul { list-style: none; }

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
  transition-delay: var(--delay, 0s);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Header / Navbar --- */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--primary);
  z-index: 1000;
  box-shadow: 0 2px 12px var(--shadow);
}

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

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--bg-white);
  font-weight: 700;
  font-size: 1.2rem;
  white-space: nowrap;
}

.logo-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
}

.logo-company-suffix {
  font-weight: 400;
  font-size: 0.9em;
}

.logo-text-sub {
  display: block;
  font-size: 0.65rem;
  font-weight: 400;
  color: var(--accent-light);
  letter-spacing: 0.5px;
}

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

.nav a {
  color: rgba(255, 255, 255, 0.85);
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
  position: relative;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 14px;
  right: 14px;
  height: 2px;
  background: var(--accent-light);
  border-radius: 1px;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.nav a:hover::after {
  transform: scaleX(1);
}

.nav a.active::after {
  transform: scaleX(1);
}

.nav a:hover,
.nav a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav a.active {
  color: var(--accent-light);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  background: none;
  border: none;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
}

.hamburger.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}
.hamburger.open span:nth-child(2) {
  opacity: 0;
}
.hamburger.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, #002D5C 100%);
  color: #fff;
  padding: 160px 0 100px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background:
    url('../data/images/banner.png') center / cover no-repeat,
    radial-gradient(circle at 20% 80%, rgba(51, 153, 238, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(212, 168, 67, 0.1) 0%, transparent 50%);
  opacity: 0.12;
}

/* Decorative geometric shapes */
.hero::after {
  content: '';
  position: absolute;
  top: 15%;
  right: 8%;
  width: 200px;
  height: 200px;
  border: 2px solid rgba(255, 204, 0, 0.15);
  border-radius: 50%;
  pointer-events: none;
}

.hero .container {
  position: relative;
}

.hero .container::before {
  content: '';
  position: absolute;
  bottom: -40px;
  right: 15%;
  width: 80px;
  height: 2px;
  background: rgba(255, 204, 0, 0.25);
  transform: rotate(-30deg);
  pointer-events: none;
}

.hero .container::after {
  content: '';
  position: absolute;
  top: -20px;
  right: 5%;
  width: 120px;
  height: 120px;
  border: 2px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  pointer-events: none;
}

.hero h1 {
  font-size: 2.8rem;
  font-weight: 800;
  margin-bottom: 16px;
  line-height: 1.3;
  animation: fadeInUp 0.8s ease-out both;
}

.hero h1 .highlight {
  color: var(--accent-light);
}

.hero p {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin-bottom: 36px;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero .hero-cta {
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--accent);
  color: var(--primary-dark);
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--radius);
  transition: all 0.3s;
}

.hero-cta:hover {
  background: var(--accent-light);
  color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(255, 204, 0, 0.45), 0 0 16px rgba(255, 204, 0, 0.25);
}

/* --- Button Variants --- */
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.95rem;
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  transition: all 0.3s;
  cursor: pointer;
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px var(--shadow);
}

/* --- Stats Bar --- */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-top: -50px;
  position: relative;
  z-index: 10;
}

.stat-card {
  background: var(--bg-white);
  padding: 28px 24px;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: 0 4px 20px var(--shadow);
  border-top: 3px solid var(--accent);
  transition: transform 0.3s, box-shadow 0.3s;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 28px var(--shadow);
}

.stat-card.reveal.visible {
  animation: popIn 0.5s ease-out both;
  animation-delay: var(--delay, 0s);
}

.stat-card .number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.2;
}

.stat-card .label {
  font-size: 0.9rem;
  color: var(--text-gray);
  margin-top: 4px;
}

/* --- Section --- */
.section {
  padding: 80px 0;
  position: relative;
}

.section + .section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  max-width: 600px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
}

.section-alt {
  background: var(--bg-light);
}

.section-alt + .section::before,
.section + .section-alt::before {
  display: none;
}

.section-title {
  text-align: center;
  margin-bottom: 48px;
}

.section-title h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.section-title .bar {
  display: inline-block;
  width: 60px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.section-title p {
  color: var(--text-gray);
  margin-top: 12px;
  font-size: 1.05rem;
}

/* --- Page Header (inner pages) --- */
.page-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 120px 0 60px;
  text-align: center;
}

.page-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.page-header p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 1rem;
}

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}

.breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
}

.breadcrumb a:hover {
  color: var(--accent-light);
}

/* --- Service Cards --- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--bg-white);
  padding: 32px 28px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all 0.3s;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--secondary), var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px var(--shadow);
  border-color: var(--secondary);
}

.service-card .icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--secondary), var(--primary));
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 16px;
  transition: transform 0.4s ease;
}

.service-card:hover .icon {
  transform: scale(1.15) rotate(5deg);
}

.service-card h3 {
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.service-card p {
  font-size: 0.9rem;
  color: var(--text-gray);
  line-height: 1.6;
}

/* --- Timeline --- */
.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--border);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 0 40px 40px;
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 8px;
  width: 16px;
  height: 16px;
  background: var(--accent);
  border: 3px solid var(--bg-white);
  border-radius: 50%;
  box-shadow: 0 0 0 3px var(--accent);
  z-index: 1;
  animation: pulse 2.5s ease-in-out infinite;
}

.timeline-item:nth-child(odd)::before {
  right: -8px;
}

.timeline-item:nth-child(even)::before {
  left: -8px;
}

.timeline-item .year {
  display: inline-block;
  padding: 4px 16px;
  background: var(--primary);
  color: var(--accent-light);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.timeline-item .content {
  background: var(--bg-white);
  padding: 20px 24px;
  border-radius: var(--radius);
  box-shadow: 0 2px 12px var(--shadow);
  border: 1px solid var(--border);
}

.timeline-item .content h3 {
  font-size: 1rem;
  color: var(--primary);
  margin-bottom: 6px;
}

.timeline-item .content p {
  font-size: 0.9rem;
  color: var(--text-gray);
}

/* --- News List --- */
.news-list {
  max-width: 800px;
  margin: 0 auto;
}

.news-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  transition: all 0.2s;
  color: var(--text-dark);
}

a.news-item {
  text-decoration: none;
}

.news-item:hover {
  padding-left: 8px;
}

.news-date {
  flex-shrink: 0;
  text-align: center;
  background: var(--primary);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius);
  min-width: 70px;
}

.news-date .day {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  line-height: 1.2;
}

.news-date .month {
  display: block;
  font-size: 0.7rem;
  color: var(--accent-light);
}

.news-item h3 {
  font-size: 1.05rem;
  color: var(--primary);
  margin-bottom: 4px;
  line-height: 1.5;
}

.news-item h3 a {
  color: var(--primary);
}

.news-item h3 a:hover {
  color: var(--secondary);
}

.news-tag {
  display: inline-block;
  padding: 2px 10px;
  background: var(--bg-light);
  color: var(--text-gray);
  border-radius: 20px;
  font-size: 0.75rem;
}

/* --- News Detail --- */
.news-detail {
  max-width: 800px;
  margin: 0 auto;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-gray);
  font-size: 0.9rem;
}

.news-meta-date {
  color: var(--text-gray);
}

.news-detail h2 {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 24px;
  line-height: 1.5;
}

.news-detail .body {
  font-size: 1rem;
  line-height: 1.9;
  color: var(--text-dark);
}

.news-detail .body p {
  margin-bottom: 16px;
}

.news-detail .back-link,
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 32px;
  padding: 10px 24px;
  background: var(--bg-light);
  border-radius: var(--radius);
  color: var(--primary);
  font-weight: 500;
}

.news-detail .back-link:hover,
.back-link:hover {
  background: var(--primary);
  color: #fff;
}

/* --- Contact Cards --- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.card {
  background: var(--bg-white);
  padding: 36px 32px;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px var(--shadow);
  border-top: 4px solid var(--accent);
}

.card h3 {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  margin-bottom: 10px;
}

.contact-row .label {
  flex-shrink: 0;
  font-weight: 600;
  color: var(--primary);
  min-width: 50px;
}

.contact-row .value {
  color: var(--text-gray);
}

.contact-row .value a {
  color: var(--secondary);
}

.contact-window {
  margin-top: 16px;
  padding: 16px;
  background: var(--bg-light);
  border-radius: var(--radius);
}

.contact-window h4 {
  font-size: 0.9rem;
  color: var(--primary);
  margin-bottom: 8px;
}

.bank-info {
  margin-top: 32px;
  padding: 20px 24px;
  background: var(--bg-light);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
}

/* --- Company Page --- */
.company-intro {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.company-intro-text h2 {
  font-size: 1.6rem;
  color: var(--primary);
  margin-bottom: 16px;
}

.company-intro-text h3 {
  font-size: 1.2rem;
  color: var(--primary);
  margin-top: 24px;
  margin-bottom: 8px;
}

.company-intro-text p {
  color: var(--text-gray);
  margin-bottom: 12px;
  line-height: 1.8;
}

.company-highlight {
  background: var(--bg-light);
  padding: 24px;
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  margin: 24px 0;
}

.company-highlight h3 {
  margin-top: 0;
}

.company-info-box {
  background: var(--bg-white);
  padding: 28px;
  border-radius: var(--radius);
  box-shadow: 0 4px 20px var(--shadow);
}

.company-badge {
  display: inline-block;
  padding: 6px 16px;
  background: var(--accent);
  color: var(--primary-dark);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.company-info-card {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.company-info-card:last-child {
  border-bottom: none;
}

.company-info-card h4 {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 4px;
}

.company-info-card p {
  font-size: 0.95rem;
  color: var(--text-dark);
}

/* --- Download Section --- */
.download-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 800px;
  margin: 0 auto;
}

.download-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px 24px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all 0.2s;
  color: var(--text-dark);
}

.download-card:hover {
  border-color: var(--secondary);
  box-shadow: 0 4px 16px var(--shadow);
  transform: translateY(-2px);
  color: var(--primary);
}

.download-card .file-icon {
  width: 44px;
  height: 44px;
  background: var(--bg-light);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--primary);
}

.download-card .file-icon.pdf { background: #FDE8E8; color: #C62828; }
.download-card .file-icon.doc { background: #E3F2FD; color: #1565C0; }
.download-card .file-icon.jpg { background: #FFF3E0; color: #E65100; }

.download-card .file-info h3 {
  font-size: 0.95rem;
  color: var(--primary);
  margin-bottom: 2px;
}

.download-card .file-info p {
  font-size: 0.8rem;
  color: var(--text-light);
}

/* --- Links Section --- */
.links-section {
  padding: 40px 0;
}

.links-section h2 {
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

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

.link-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.88rem;
  color: var(--text-dark);
  transition: all 0.2s;
}

.link-item:hover {
  border-color: var(--secondary);
  color: var(--secondary);
  background: #F0F7FF;
}

.link-item::before {
  content: '\2192';
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* Speedy links table */
.speedy-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px var(--shadow);
}

.speedy-table thead th {
  background: var(--primary);
  color: #fff;
  padding: 14px 16px;
  font-size: 0.9rem;
  font-weight: 600;
  text-align: center;
}

.speedy-table tbody td {
  padding: 8px 12px;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  background: var(--bg-white);
}

.speedy-table tbody td a {
  display: block;
  padding: 6px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--text-dark);
  transition: all 0.2s;
}

.speedy-table tbody td a:hover {
  background: #F0F7FF;
  color: var(--secondary);
}

/* --- Wave Divider --- */
.wave-divider {
  display: block;
  width: 100%;
  height: 60px;
  position: relative;
  overflow: hidden;
  line-height: 0;
  margin-bottom: -1px;
}

.wave-divider svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* --- Footer --- */
.footer {
  background: var(--primary-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 32px;
}

.footer h4 {
  color: var(--accent-light);
  font-size: 1rem;
  margin-bottom: 16px;
}

.footer p,
.footer li {
  font-size: 0.88rem;
  line-height: 1.8;
}

.footer a {
  color: rgba(255, 255, 255, 0.7);
}

.footer a:hover {
  color: var(--accent-light);
}

.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.4);
}

/* --- Back to Top --- */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.2s;
  z-index: 999;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
}

.back-to-top:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* --- Utilities --- */
.text-center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mt-4 { margin-top: 32px; }
.mb-2 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 32px; }

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

  .links-grid {
    grid-template-columns: repeat(3, 1fr);
  }

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

  .company-intro {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 60px;
  }

  .nav {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--primary);
    flex-direction: column;
    padding: 16px;
    gap: 2px;
    box-shadow: 0 8px 24px var(--shadow);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
    padding-top: 0;
    padding-bottom: 0;
  }

  .nav.open {
    max-height: calc(100vh - var(--header-height));
    opacity: 1;
    overflow-y: auto;
    padding: 16px;
  }

  .nav a {
    padding: 12px 16px;
    font-size: 1rem;
    border-radius: 6px;
  }

  .nav a::after {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero {
    padding: 120px 0 80px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero::after {
    width: 120px;
    height: 120px;
    top: 10%;
    right: 4%;
  }

  .stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: -30px;
  }

  .stat-card {
    padding: 20px 16px;
  }

  .stat-card .number {
    font-size: 1.6rem;
  }

  .section {
    padding: 60px 0;
  }

  .section-title h2 {
    font-size: 1.6rem;
  }

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

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

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

  .links-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Timeline mobile */
  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    left: 0 !important;
    padding-left: 52px;
    padding-right: 0;
    text-align: left !important;
  }

  .timeline-item::before {
    left: 12px !important;
    right: auto !important;
  }

  .page-header {
    padding: 100px 0 40px;
  }

  .page-header h1 {
    font-size: 1.7rem;
  }

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

  .speedy-table {
    display: block;
    overflow-x: auto;
  }

  .back-to-top {
    bottom: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
  }

  .wave-divider {
    height: 40px;
  }
}

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

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

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

  .news-item {
    flex-direction: column;
    gap: 12px;
  }
}
