/* ============================================================
   SeaTrans Shipping — Contact Page Styles
   ============================================================ */
/* ── Reset & Base ── */
*, *::before, *::after { 
  box-sizing: border-box; 
  margin: 0; 
  padding: 0; 
}

html { 
  scroll-behavior: smooth; 
  -webkit-text-size-adjust: 100%;
  overflow-x: hidden;
  width: 100%;
}

body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

img,
svg,
video,
canvas,
iframe {
  max-width: 100%;
}
/* ── Contact Layout ── */
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
  gap: 3rem;
  min-width: 0;
}

.contact-layout > *,
#contactForm > *,
.contact-detail,
.office-panel,
.map-wrap {
  min-width: 0;
}

.contact-info,
.contact-form-wrap,
.office-panel,
.contact-detail,
.map-address-card,
.toast {
  overflow-wrap: anywhere;
}

/* ── Office Tabs ── */
.office-tab {
  padding: 0.4rem 1rem;
  border-radius: 50px;
  border: 1px solid var(--medium-gray);
  background: var(--white);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s var(--ease-smooth);
}

.office-tab:hover {
  border-color: var(--sea-green);
  color: var(--sea-green);
}

.office-tab.active {
  background: var(--sea-green);
  color: #fff;
  border-color: var(--sea-green);
}

.office-panel {
  background: var(--light-gray);
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  transition: all 0.3s var(--ease-smooth);
}

.office-panel.active {
  display: block !important;
}

/* ── Form Styles ── */
#contactForm input,
#contactForm select,
#contactForm textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#contactForm > div[style*="display:grid"] {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

#contactForm input:focus,
#contactForm select:focus,
#contactForm textarea:focus {
  border-color: var(--sea-green);
  box-shadow: 0 0 0 3px rgba(30, 155, 110, 0.1);
}

#contactForm input.error,
#contactForm select.error,
#contactForm textarea.error {
  border-color: var(--coral-red);
}

#contactForm input:focus.error,
#contactForm select:focus.error,
#contactForm textarea:focus.error {
  box-shadow: 0 0 0 3px rgba(255, 111, 105, 0.15);
}

/* ── Quick Contact Strips ── */
.quick-contact-link {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--medium-gray);
  border-radius: var(--radius-lg);
  transition: all 0.3s var(--ease-smooth);
}

.quick-contact-link:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.quick-contact-link:hover .icon-box-green {
  background: var(--sea-green);
  color: #fff;
}

.section-sm.section-light .container > div[style*="display:grid"] {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  min-width: 0;
}

.section-sm.section-light .container > div[style*="display:grid"] > a {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ── Animated Map Pin ── */
.map-pin-animated {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -100%);
  z-index: 3;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pin-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(255, 111, 105, 0.3);
  animation: pinPulse 2s ease-in-out infinite;
}

.pin-pulse::before {
  content: '';
  position: absolute;
  inset: -1rem;
  border-radius: 50%;
  background: rgba(255, 111, 105, 0.15);
  animation: pinPulse 2s ease-in-out infinite 0.5s;
}

.pin-pulse::after {
  content: '';
  position: absolute;
  inset: -2rem;
  border-radius: 50%;
  background: rgba(255, 111, 105, 0.08);
  animation: pinPulse 2s ease-in-out infinite 1s;
}

.pin-icon {
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 4px 20px rgba(255, 111, 105, 0.5));
  animation: pinBounce 2s ease-in-out infinite;
}

.pin-label {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(10, 22, 40, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  padding: 0.4rem 1rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

@keyframes pinPulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.8);
    opacity: 0;
  }
}

@keyframes pinBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* ── Map Controls Hover ── */
.map-controls button:hover {
  background: rgba(10, 22, 40, 0.95) !important;
  transform: scale(1.08);
}

.map-controls button:active {
  transform: scale(0.92);
}

/* ── Map Loading Animation ── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Map Address Card ── */
.map-address-card {
  transform: translateY(0);
  transition: transform 0.4s var(--ease-smooth);
}

.map-address-card:hover {
  transform: translateY(-4px);
}

/* ── Map Responsive ── */
@media (max-width: 768px) {
  .map-wrap {
    height: 380px !important;
  }
  
  .map-address-card {
    max-width: 200px !important;
    padding: 0.75rem 1rem !important;
    bottom: 1rem !important;
    left: 1rem !important;
  }
  
  .map-address-card p {
    font-size: 0.7rem !important;
  }
  
  .map-address-card .btn {
    font-size: 0.7rem !important;
    padding: 0.25rem 0.75rem !important;
  }
  
  .map-controls {
    bottom: 1rem !important;
    right: 1rem !important;
  }
  
  .map-controls button {
    width: 2rem !important;
    height: 2rem !important;
    font-size: 0.85rem !important;
  }
  
  .pin-icon i {
    font-size: 1.6rem !important;
  }
  
  .pin-label {
    font-size: 0.65rem !important;
    padding: 0.2rem 0.7rem !important;
  }
  
  .pin-pulse {
    width: 2.2rem !important;
    height: 2.2rem !important;
  }
  
  .pin-pulse::before {
    inset: -0.5rem !important;
  }
  
  .pin-pulse::after {
    inset: -1rem !important;
  }
}

@media (max-width: 480px) {
  .map-wrap {
    height: 320px !important;
  }
  
  .map-address-card {
    max-width: 160px !important;
    padding: 0.6rem 0.8rem !important;
    bottom: 0.75rem !important;
    left: 0.75rem !important;
  }
  
  .map-address-card p {
    font-size: 0.6rem !important;
  }
  
  .map-address-card .btn {
    font-size: 0.6rem !important;
    padding: 0.15rem 0.6rem !important;
  }
  
  .map-controls {
    bottom: 0.75rem !important;
    right: 0.75rem !important;
  }
  
  .map-controls button {
    width: 1.75rem !important;
    height: 1.75rem !important;
    font-size: 0.75rem !important;
  }
  
  .pin-icon i {
    font-size: 1.3rem !important;
  }
  
  .pin-label {
    font-size: 0.55rem !important;
    padding: 0.15rem 0.5rem !important;
  }
  
  .pin-pulse {
    width: 1.8rem !important;
    height: 1.8rem !important;
  }
  
  .pin-pulse::before {
    inset: -0.3rem !important;
  }
  
  .pin-pulse::after {
    inset: -0.6rem !important;
  }
}

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--sea-green-dark);
  color: #fff;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transform: translateY(120px);
  opacity: 0;
  transition: all 0.5s var(--ease-smooth);
  z-index: 5000;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ── Form Submit Button States ── */
#submitBtn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

#submitBtn .fa-spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .contact-layout {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .quick-contact-grid,
  .section-sm.section-light .container > div[style*="display:grid"] {
    grid-template-columns: repeat(2, 1fr) !important;
  }
}

@media (max-width: 768px) {
  .contact-layout {
    gap: 1.5rem;
  }

  .contact-form-wrap > div {
    padding: 1.5rem !important;
  }

  #contactForm .form-row,
  #contactForm > div[style*="display:grid"] {
    grid-template-columns: 1fr !important;
  }

  .quick-contact-grid,
  .section-sm.section-light .container > div[style*="display:grid"] {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0.75rem !important;
  }

  .quick-contact-link,
  .section-sm.section-light .container > div[style*="display:grid"] > a {
    padding: 1rem !important;
  }

  .quick-contact-link .icon-box,
  .section-sm.section-light .container > div[style*="display:grid"] .icon-box {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1rem;
  }

  .quick-contact-link div:last-child div:first-child,
  .section-sm.section-light .container > div[style*="display:grid"] > a div:last-child div:first-child {
    font-size: 0.75rem !important;
  }

  .quick-contact-link div:last-child div:last-child,
  .section-sm.section-light .container > div[style*="display:grid"] > a div:last-child div:last-child {
    font-size: 0.7rem !important;
  }

  .office-tabs {
    gap: 0.4rem;
    justify-content: center;
  }

  .office-tab {
    flex: 1 1 auto;
    min-width: max-content;
    padding: 0.3rem 0.7rem !important;
    font-size: 0.7rem !important;
  }

  .office-panel {
    padding: 1rem !important;
  }

  .office-panel div {
    overflow-wrap: anywhere;
  }

  .contact-detail {
    align-items: flex-start !important;
  }

  .contact-detail .icon-box {
    width: 2.75rem !important;
    height: 2.75rem !important;
    font-size: 1rem !important;
  }

  .map-wrap {
    height: 280px !important;
  }

  .map-wrap .map-overlay {
    padding: 1.25rem;
  }

  .map-wrap .map-overlay h3 {
    font-size: 1rem !important;
  }

  .map-wrap .map-overlay p {
    font-size: 0.8rem !important;
  }

  .toast {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    padding: 0.75rem 1rem;
    font-size: 0.85rem;
  }

  .page-hero-content {
    padding-top: 6rem !important;
    padding-bottom: 2.5rem !important;
  }

  .page-hero-title {
    font-size: 1.8rem !important;
  }

  .page-hero-subtitle {
    font-size: 0.9rem !important;
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }

  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    min-width: 0;
    white-space: normal;
    line-height: 1.25;
  }
}

@media (max-width: 480px) {
  .contact-form-wrap > div {
    padding: 1rem !important;
  }

  .quick-contact-grid,
  .section-sm.section-light .container > div[style*="display:grid"] {
    grid-template-columns: 1fr !important;
  }

  .quick-contact-link,
  .section-sm.section-light .container > div[style*="display:grid"] > a {
    padding: 0.75rem 1rem !important;
  }

  #contactForm .form-row,
  #contactForm > div[style*="display:grid"] {
    grid-template-columns: 1fr !important;
    gap: 0.75rem !important;
  }

  .office-tabs {
    gap: 0.3rem;
  }

  .office-tab {
    flex: 1 1 calc(50% - 0.3rem);
    min-width: 0;
    padding: 0.35rem 0.55rem !important;
    font-size: 0.65rem !important;
    text-align: center;
    white-space: normal;
  }

  #submitBtn {
    width: 100%;
    justify-content: center;
  }

  #contactForm > div[style*="display:flex"] {
    align-items: stretch !important;
    gap: 0.75rem !important;
  }

  #contactForm > div[style*="display:flex"] > div {
    justify-content: center;
    text-align: center;
  }

  .contact-detail {
    gap: 0.75rem !important;
  }

  .contact-detail-list {
    gap: 1rem !important;
  }

  .contact-form-wrap > div {
    border-radius: var(--radius-lg) !important;
  }

  .map-wrap {
    height: 220px !important;
  }

  .map-wrap .map-overlay {
    padding: 1rem;
  }

  .map-wrap .map-overlay h3 {
    font-size: 0.9rem !important;
  }

  .map-wrap .map-overlay p {
    font-size: 0.7rem !important;
  }

  .map-wrap .map-overlay .btn {
    font-size: 0.75rem !important;
    padding: 0.4rem 0.8rem !important;
  }
}
