* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Gotham", sans-serif;

  color: #1a1a1a;
}

header {
  width: 100%;
  height: 20.3125rem;
  flex-shrink: 0;
  aspect-ratio: 154/57;
  margin: 0 auto;
  background: url(bgImage.png) 0px 0px / 100% 126.856% no-repeat;
}

.hero-logos {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin: 0 auto 2rem auto;
  padding: 0.56rem 1.56rem 0 1.56rem;
}

.hero-logo {
  height: 60px;
  object-fit: contain;
}

.hero-logo-cj {
  justify-self: flex-start;
  width: 6.4275rem;
  height: 2.625rem;
  flex-shrink: 0;
}

.hero-logo-railway {
  width: 4.0625rem;
  height: 4.0625rem;
  flex-shrink: 0;
  aspect-ratio: 1/1;
}

.hero-logo-concor {
  justify-self: flex-end;
  width: 3.4375rem;
  height: 3.1875rem;
  flex-shrink: 0;
  aspect-ratio: 71/83;

}

/* Tracking Link Styles - Inside Header Bottom, Left Aligned */
.tracking-link-container-header {
  text-align: left;
  padding: 1.5rem 0 1rem 2.69rem;
}

.tracking-link {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: #fff;
  color: #047dc3;
  text-decoration: none;
  font-family: Gotham, sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.tracking-link:hover {
  background: linear-gradient(143deg, #047dc3 13.52%, #005381 89.92%);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.tracking-link:active {
  transform: translateY(0);
}

header h1 {
  padding:0 0 0 2.69rem;
  width: 46.8125rem;
  color: #fff;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  font-family: Gotham;
  font-size: 2.5rem;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 0.12rem;
  text-transform: uppercase;
}

header p {
  padding: 0 0 0 2.69rem;
  width: 64.625rem;
  color: #fff;
  font-family: Gotham;
  font-size: 1.3rem;
  font-style: italic;
  font-weight: 400;
  line-height: normal;
  letter-spacing: 0.06rem;
}

.route-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 4.1875rem;
  flex-shrink: 0;
  background: var(
    --oms,
    linear-gradient(143deg, #047dc3 13.52%, #005381 89.92%)
  );
  color: #fff;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  font-family: Gotham;
  font-size: 2rem;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 0.08rem;
}

/* Fixed width spans to prevent layout shift */
.route-banner-static {
  display: inline-block;
  width: auto;
  text-align: right;
  padding-right: 15px;
}

.route-banner-dynamic {
  display: inline-block;
  width: 400px;
  text-align: left;
  white-space: nowrap;
}

.route-banner-dynamic #rotatingRoute {
  color: yellow;
  display: inline-block;
  transition: opacity 0.5s ease-in-out;
}

/* Footer Route Banner */
.route-banner-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 4.1875rem;
  background: linear-gradient(143deg, #047dc3 13.52%, #005381 89.92%);
  color: #fff;
  text-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
  font-family: Gotham;
  font-size: 2rem;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  letter-spacing: 0.08rem;
  z-index: 100;
  box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

/* Train Footer with Animation */
.train-footer {
  width: 100%;
  margin-top: 2rem;
  overflow: hidden;
  background: #fff;
}

/* Train GIF section */
.train-gif-wrap {
  text-align: center;
  background: #fff;
}

.train-gif {
  width: 100%;
  max-width: 1200px;
  margin: -10px auto;
  display: block;
}

/* ===== Scrolling Text Banner ===== */
.scroll-footer {
  background: #047dc3;
  color: #fff;
  overflow: hidden;
  white-space: nowrap;
  width: 100%;
  position: relative;
  height: 50px;
  display: flex;
  align-items: center;
}

.scroll-text {
  display: inline-block;
  white-space: nowrap;
  animation: scroll 15s linear infinite;
}

.scroll-text span {
  display: inline-block;
  margin-right: 3rem;
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
}

@keyframes scroll {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

.form-section {
  max-width: 1200px;
  margin: 30px auto;
  padding: 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

h3 {
  margin-top: 0;
  font-size: 18px;
  color: #0056b3;
  margin-bottom: 15px;
}

label {
  display: block;
  font-weight: 500;
  margin-bottom: 5px;
}

.train-card {
  width: 600px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  
  overflow: hidden;
}

.train-header {
  background: #f4f9ff;
  color: #333;
  font-weight: bold;
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
}

.train-row {
  display: grid;
  grid-template-columns: 30px 1fr 120px 100px 100px;
  align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid #eaeaea;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}

.train-row-header {
  background: #fafafa;
  font-weight: bold;
  color: #888;
  cursor: default;
}

.train-row input[type="radio"] {
  accent-color: #007bff;
  cursor: pointer;
  margin-top: 1rem;
}

.route {
  font-weight: bold;
  color: #1a1a1a;
}

.date, .time {
  font-weight: bold;
  color: #333;
}

.train-row:hover {
  background: #f0f8ff;
}

.train-row input[type="radio"]:checked + .route,
.train-row input[type="radio"]:checked ~ span {
  color: #007bff;
}

.train-row input[type="radio"]:checked + .train-label {
  background: #f9fcff;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 136, 255, 0.2);
  padding: 8px;
}

input,
select {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border: 1px solid #dcdcdc;
  border-radius: 6px;
  font-size: 14px;
}

.form-section h3 {
  font-size: 1.125rem;
  font-weight: bold;
  color: #1a73e8;
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  border-bottom: 1px solid #eaeaea;
  padding-bottom: 0.25rem;
}

.radio-group {  
  display: grid;
  grid-template-columns: repeat(2, 1fr); 
  gap: 0 2rem;       
  margin: 0 0 2rem;
}

.radio-group label {
  display: flex;
  align-items: center;
  font-size: 0.875rem;      
  color: #666;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s ease;
}

.radio-group input[type="radio"] {
  margin-top: 1rem;
  width: 6%;
  margin-right: 0.5rem;     
  accent-color: #1a73e8;   
}

.radio-group input[type="radio"]:checked + span,
.radio-group input[type="radio"]:checked ~ span {
  font-weight: 600;
  color: #000;
}


.form-footer {
  grid-column: span 2;
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 10px;
}

button {
  padding: 12px 30px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.reset-btn {
  background: #f1f1f1;
  color: #333;
}

.submit-btn {
  background: linear-gradient(90deg, #007bff, #0056b3);
  color: #fff;
}

/* Accordion Styles - keeping existing width */
.accordion-item {
  margin-bottom: 8px;
  border: 1px solid #eaeaea;
  border-radius: 6px;
  overflow: hidden;
}

.accordion-header {
  display: flex;
  align-items: center;
  padding: 6px;
  background: #fafafa;
  cursor: pointer;
  transition: background 0.2s ease;
  position: relative;
}

.accordion-header:hover {
  background: #f0f8ff;
}

.accordion-header input[type="radio"] {
  margin-right: 12px;
}

.accordion-header .route-name {
  flex: 1;
  font-size: 14px;
  font-weight: normal;
  color: #1a1a1a;
}

/* Selected accordion header */
.accordion-header:has(input[type="radio"]:checked) .route-name {
  color: #0056b3;
}

.accordion-header .arrow {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
  color: #666;
}

.accordion-header.active .arrow {
  transform: rotate(180deg);
}

.accordion-content {
  display: none;
  padding: 16px;
  background: #fff;
  border-top: 1px solid #eaeaea;
}

.accordion-content.active {
  display: block;
}

.schedule-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.schedule-item {
  display: flex;
  flex-direction: column;
}

.schedule-label {
  font-size: 12px;
  color: #888;
  margin-bottom: 4px;
  text-transform: uppercase;
}

.schedule-value {
  font-size: 14px;
  font-weight: bold;
  color: #333;
}

@media (max-width: 768px) {
  .form-section {
    grid-template-columns: 1fr;
  }
  .form-footer {
    flex-direction: column;
  }
}

/* Tracking Popup Modal Styles */
.tracking-popup-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.tracking-popup-content {
  position: relative;
  background-color: #ffffff;
  margin: 2% auto;
  width: 95%;
  max-width: 1400px;
  height: 90vh;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease;
  overflow: hidden;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.tracking-popup-close {
  position: absolute;
  top: 15px;
  right: 25px;
  color: #333;
  font-size: 35px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10001;
  background: white;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
}

.tracking-popup-close:hover,
.tracking-popup-close:focus {
  background: #f44336;
  color: white;
  transform: rotate(90deg);
}

#trackingPopupFrame {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
}

@media (max-width: 768px) {
  .tracking-popup-content {
    width: 98%;
    height: 95vh;
    margin: 2.5vh auto;
  }

  .tracking-popup-close {
    top: 10px;
    right: 15px;
    font-size: 30px;
    width: 40px;
    height: 40px;
  }
}
