/* DHL Rastreo Clone - Styles */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Delivery", Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #333;
  background: #fff;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Skip links */
.skip-links a {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 12px 16px;
  background: #fff;
  color: #000;
  text-decoration: underline;
}

.skip-links a:focus {
  left: 0;
}

/* Icons */
.icon {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.icon--chevron {
  width: 10px;
  height: 6px;
  margin-left: 6px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.2;
  transition: background-color 0.2s, opacity 0.2s;
}

.btn--primary {
  background: #d40511;
  color: #fff;
}

.btn--primary:hover {
  background: #b0040f;
}

.btn--sm {
  padding: 10px 16px;
  font-size: 13px;
  white-space: nowrap;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
}

.utility-bar {
  background: #ffcc00;
}

.utility-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  gap: 16px;
}

.logo__svg {
  width: 120px;
  height: auto;
  display: block;
  object-fit: contain;
}

.footer-logo {
  display: inline-block;
  line-height: 0;
}

.footer-logo .logo__svg,
.logo__svg--footer {
  width: 100px;
  height: auto;
  display: block;
  object-fit: contain;
}

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

.utility-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 14px;
  color: #000;
  border-radius: 2px;
  transition: background 0.2s;
}

.utility-nav__link:hover {
  background: rgba(255, 255, 255, 0.35);
}

.utility-nav__link--btn {
  background: transparent;
}

.utility-nav__lang {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  font-size: 14px;
}

.utility-nav__lang a.is-active {
  font-weight: 700;
}

.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
}

.mobile-menu-toggle span {
  display: block;
  height: 2px;
  background: #000;
  border-radius: 1px;
  transition: transform 0.2s, opacity 0.2s;
}

.mobile-menu-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle.is-open span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Primary navigation */
.primary-nav {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.primary-nav__inner {
  position: relative;
}

.primary-nav__list {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
}

.primary-nav__link {
  display: inline-flex;
  align-items: center;
  padding: 16px 20px;
  font-size: 15px;
  color: #000;
  text-decoration: underline;
  text-underline-offset: 3px;
  white-space: nowrap;
  transition: background 0.2s;
}

.primary-nav__link:hover,
.primary-nav__link.is-active {
  background: #f5f5f5;
}

.primary-nav__link--dropdown {
  text-decoration: underline;
}

.has-dropdown {
  position: relative;
}

.has-dropdown--right .dropdown-panel--right {
  right: 0;
  left: auto;
}

.dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 50;
  min-width: 320px;
  padding: 24px;
  background: #fff;
  border: 1px solid #e0e0e0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.dropdown-panel--narrow {
  min-width: 280px;
}

.dropdown-panel h4 {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
  color: #666;
}

.dropdown-panel p {
  font-size: 14px;
  color: #555;
  margin-bottom: 16px;
}

.dropdown-panel a {
  display: block;
  padding: 8px 0;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dropdown-panel a:hover {
  color: #d40511;
}

.dropdown-panel__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.dropdown-panel__label {
  font-size: 13px;
  font-weight: 700;
  color: #666;
  margin-bottom: 12px;
}

/* Main content */
.main {
  padding: 48px 0 80px;
  min-height: 60vh;
}

.tracking-hero {
  margin-bottom: 56px;
}

.tracking-hero h1 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: #000;
  margin-bottom: 32px;
  line-height: 1.2;
}

.tracking-form {
  display: flex;
  gap: 0;
  max-width: 100%;
}

.tracking-form__input {
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-right: none;
  border-radius: 4px 0 0 4px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.tracking-form__input:focus {
  border-color: #d40511;
  box-shadow: inset 0 0 0 1px #d40511;
}

.tracking-form__input::placeholder {
  color: #999;
}

.tracking-form__submit {
  border-radius: 0 4px 4px 0;
  padding: 14px 32px;
  font-size: 16px;
  flex-shrink: 0;
}

.tracking-form__error {
  margin-top: 12px;
  color: #d40511;
  font-size: 14px;
}

/* FAQ */
.faq {
  margin-bottom: 64px;
}

.faq h2 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.faq__list {
  border-top: 1px solid #e0e0e0;
}

.faq__item {
  border-bottom: 1px solid #e0e0e0;
}

.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 0;
  text-align: left;
  font-size: 16px;
  font-weight: 400;
  color: #000;
  gap: 16px;
}

.faq__question:hover {
  color: #d40511;
}

.faq__icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.25s;
}

.faq__item.is-open .faq__icon {
  transform: rotate(45deg);
}

.faq__answer {
  padding: 0 0 20px;
}

.faq__answer p {
  font-size: 15px;
  color: #555;
  line-height: 1.6;
  max-width: 800px;
}

/* Career promo */
.career-promo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  padding: 48px 0;
  border-top: 1px solid #e8e8e8;
}

.career-promo__content h2 {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 16px;
}

.career-promo__lead {
  font-weight: 600;
  margin-bottom: 12px;
}

.career-promo__content p {
  margin-bottom: 12px;
  color: #444;
  font-size: 15px;
}

.career-promo__cta {
  margin-top: 20px;
}

.career-promo__media {
  border-radius: 4px;
  overflow: hidden;
}

.career-promo__media img {
  width: 100%;
  object-fit: cover;
}

/* Footer */
.site-footer {
  background: #f5f5f5;
  padding: 48px 0 32px;
  border-top: 3px solid #ffcc00;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin-bottom: 40px;
}

.footer-col h3 {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  padding: 4px 0;
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.footer-col a:hover {
  color: #d40511;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  padding-top: 24px;
  border-top: 1px solid #ddd;
}

.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  flex: 1;
}

.footer-legal a,
.footer-legal__btn {
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 2px;
  color: #333;
}

.footer-legal__btn {
  padding: 0;
}

.footer-social h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}

.social-links {
  display: flex;
  gap: 12px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #333;
}

.social-links svg {
  width: 20px;
  height: 20px;
}

.social-links a:hover {
  color: #d40511;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 200;
  background: #333;
  color: #fff;
  padding: 20px 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
}

.cookie-banner.is-hidden {
  display: none;
}

.cookie-banner__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner__text {
  flex: 1;
  min-width: 280px;
  font-size: 13px;
  line-height: 1.5;
  color: #e0e0e0;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* Search overlay */
.search-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 120px;
}

.search-overlay[hidden] {
  display: none;
}

.search-overlay__inner {
  width: 100%;
}

.search-overlay__form {
  display: flex;
  gap: 8px;
  background: #fff;
  padding: 16px;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.search-overlay__form input {
  flex: 1;
  padding: 12px 16px;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.search-overlay__close {
  font-size: 28px;
  line-height: 1;
  padding: 0 8px;
  color: #666;
}

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

  .career-promo {
    grid-template-columns: 1fr;
  }

  .career-promo__media {
    order: -1;
  }
}

@media (max-width: 768px) {
  .utility-nav {
    display: none;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  .primary-nav__list {
    display: none;
    flex-direction: column;
    width: 100%;
    background: #fff;
    border-top: 1px solid #e8e8e8;
  }

  .primary-nav__list.is-open {
    display: flex;
  }

  .primary-nav__link {
    width: 100%;
    padding: 14px 16px;
    border-bottom: 1px solid #f0f0f0;
  }

  .dropdown-panel {
    position: static;
    box-shadow: none;
    border: none;
    border-top: 1px solid #f0f0f0;
    padding: 16px;
  }

  .dropdown-panel__grid {
    grid-template-columns: 1fr;
  }

  .tracking-form {
    flex-direction: column;
  }

  .tracking-form__input {
    border-right: 1px solid #ccc;
    border-radius: 4px;
  }

  .tracking-form__submit {
    border-radius: 4px;
    width: 100%;
  }

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

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .cookie-banner__inner {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-banner__actions {
    flex-direction: column;
  }

  .cookie-banner__actions .btn {
    width: 100%;
  }
}
