.contact-page {
  overflow: hidden;
}

.contact-container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.contact-hero {
  position: relative;
  padding: 150px 0 100px;
  background-color: var(--primary-dark);
  overflow: hidden;
  min-height: 18vh;
}

.contact-hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.contact-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(28, 35, 39, 0.8);
}

.contact-hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
  text-align: center;
  margin: 0 auto;
  padding: 0 20px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.contact-label {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--text-color);
  position: relative;
  display: inline-block;
  padding: 0 20px;
  margin-bottom: 20px;
  text-transform: uppercase;
}

.contact-label::before,
.contact-label::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 30px;
  height: 1px;
  background-color: var(--text-color);
}

.contact-label::before {
  left: -20px;
}

.contact-label::after {
  right: -20px;
}

.contact-title {
  font-family: var(--font-heading);
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  color: var(--text-color);
  line-height: 1.2;
  margin-bottom: 20px;
  word-wrap: break-word;
}

.contact-subtitle {
  font-family: var(--font-body);
  font-size: clamp(16px, 2.5vw, 18px);
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
  max-width: 100%;
}

.contact-details {
  padding: 100px 0;
  background-color: #fff;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 60px;
  align-items: start;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}

.contact-info-item {
  padding: 30px 0;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.contact-info-item:nth-child(1) { animation-delay: 0.1s; }
.contact-info-item:nth-child(2) { animation-delay: 0.2s; }
.contact-info-item:nth-child(3) { animation-delay: 0.3s; }
.contact-info-item:nth-child(4) { animation-delay: 0.4s; }

.contact-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: var(--primary-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: #fff;
  font-size: 20px;
  flex-shrink: 0;
}

.icon-image {
  width: 24px;
  height: 24px;
  filter: brightness(0) invert(1);
}

.contact-info-item h3 {
  font-family: var(--font-heading);
  font-size: clamp(18px, 2.5vw, 20px);
  font-weight: 600;
  color: var(--primary-dark);
  margin-bottom: 15px;
  line-height: 1.3;
}

.contact-info-item p {
  font-family: var(--font-body);
  font-size: clamp(14px, 2vw, 16px);
  color: #666;
  line-height: 1.6;
  margin-bottom: 15px;
  word-wrap: break-word;
}

.contact-tel, .contact-email {
  color: var(--primary-dark);
  text-decoration: none;
  transition: color 0.3s ease;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.contact-tel:hover, .contact-email:hover {
  color: #2c373d;
  text-decoration: underline;
}

.contact-link {
  font-family: var(--font-body);
  font-size: clamp(12px, 1.8vw, 14px);
  font-weight: 600;
  color: var(--primary-dark);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  transition: all 0.3s ease;
  display: inline-block;
}

.contact-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background-color: var(--primary-dark);
  transition: width 0.3s ease;
}

.contact-link:hover::after {
  width: 100%;
}

.contact-form-wrapper {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.5s;
}

.form-card {
  background-color: #f8f8f8;
  padding: 40px;
  border-radius: 4px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  width: 100%;
  box-sizing: border-box;
}

.form-card h2 {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3.5vw, 28px);
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 15px;
  line-height: 1.3;
}

.form-card p {
  font-family: var(--font-body);
  font-size: clamp(14px, 2vw, 16px);
  color: #666;
  line-height: 1.6;
  margin-bottom: 30px;
}

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  width: 100%;
}

.form-group {
  margin-bottom: 10px;
  width: 100%;
}

.form-group.full-width {
  grid-column: span 2;
}

.contact-form label {
  display: block;
  font-family: var(--font-body);
  font-size: clamp(13px, 1.8vw, 14px);
  font-weight: 600;
  color: #444;
  margin-bottom: 8px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  font-family: var(--font-body);
  font-size: clamp(14px, 2vw, 15px);
  color: #333;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: #fff;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--primary-dark);
  outline: none;
  box-shadow: 0 0 0 3px rgba(28, 35, 39, 0.1);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
  max-height: 300px;
  overflow-y: auto;
}

.form-button {
  grid-column: span 2;
  display: inline-block;
  font-family: var(--font-body);
  font-size: clamp(12px, 1.8vw, 14px);
  font-weight: 600;
  color: var(--text-color);
  background-color: var(--primary-dark);
  border: none;
  padding: 14px 28px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all var(--transition-medium);
  margin-top: 20px;
  border-radius: 4px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.form-button:hover:not(:disabled) {
  background-color: #2c373d;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.form-button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.contact-map {
  height: 450px;
  position: relative;
  z-index: 1;
  min-height: 300px;
}

.map-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.map-container iframe {
  display: block;
  border: none;
  width: 100%;
  height: 100%;
}

#toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  max-width: 90vw;
}

.toast {
  background: #fff;
  padding: 16px 20px;
  margin-bottom: 10px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-left: 4px solid;
  max-width: 350px;
  min-width: 250px;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
  font-family: Arial, sans-serif;
  position: relative;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.success {
  border-left-color: #28a745;
  background: linear-gradient(135deg, #f8fff9 0%, #e8f5e8 100%);
}

.toast.error {
  border-left-color: #dc3545;
  background: linear-gradient(135deg, #fff8f8 0%, #ffeaea 100%);
}

.toast.info {
  border-left-color: #007bff;
  background: linear-gradient(135deg, #f8fcff 0%, #e6f3ff 100%);
}

.toast-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-right: 10px;
  vertical-align: middle;
  flex-shrink: 0;
}

.toast-message {
  display: inline-block;
  vertical-align: middle;
  font-weight: 500;
  color: #333;
  font-size: 14px;
  line-height: 1.4;
}

.toast-close {
  position: absolute;
  top: 8px;
  right: 10px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #999;
  line-height: 1;
  padding: 0;
  min-width: 20px;
  height: 20px;
}

.toast-close:hover {
  color: #666;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 1440px) {
  .contact-container {
    max-width: 1400px;
  }
  
  .contact-details {
    padding: 120px 0;
  }
  
  .contact-grid {
    gap: 80px;
  }
}

@media (max-width: 1439px) and (min-width: 1024px) {
  .contact-title {
    font-size: 42px;
  }
  
  .contact-details {
    padding: 80px 0;
  }
  
  .contact-grid {
    gap: 40px;
  }
  
  .form-card {
    padding: 35px;
  }
}

@media (max-width: 1023px) and (min-width: 768px) {
  .contact-hero {
    padding: 100px 0 70px;
  }
  
  .contact-title {
    font-size: 36px;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  
  .contact-info {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    order: 2;
  }
  
  .contact-form-wrapper {
    order: 1;
  }
  
  .contact-details {
    padding: 60px 0;
  }
  
  .form-card {
    padding: 30px;
  }
  
  .contact-map {
    height: 400px;
  }
}

@media (max-width: 767px) and (min-width: 576px) {
  .contact-hero {
    padding: 80px 0 60px;
    min-height: 30vh;
  }
  
  .contact-container {
    padding: 0 15px;
  }
  
  .contact-title {
    font-size: 32px;
  }
  
  .contact-subtitle {
    font-size: 16px;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .contact-info {
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
  }
  
  .contact-form {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .form-group.full-width,
  .form-button {
    grid-column: span 1;
  }
  
  .contact-details {
    padding: 50px 0;
  }
  
  .form-card {
    padding: 25px 20px;
  }
  
  .contact-map {
    height: 350px;
  }
  
  .toast {
    max-width: 280px;
    min-width: 200px;
  }
  
  #toast-container {
    right: 15px;
    top: 15px;
  }
}

@media (max-width: 575px) {
  .contact-hero {
    padding: 80px 0 40px;
    min-height: 20vh;
  }
  
  .contact-container {
    padding: 0 10px;
  }
  
  .contact-hero-content {
    padding: 0 15px;
  }
  
  .contact-label {
    font-size: 12px;
    letter-spacing: 1px;
    padding: 0 15px;
  }
  
  .contact-label::before,
  .contact-label::after {
    width: 20px;
  }
  
  .contact-label::before {
    left: -15px;
  }
  
  .contact-label::after {
    right: -15px;
  }
  
  .contact-title {
    font-size: 28px;
    margin-bottom: 15px;
  }
  
  .contact-subtitle {
    font-size: 14px;
  }
  
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .contact-info {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .contact-info-item {
    padding: 20px 0;
    text-align: center;
  }
  
  .contact-icon {
    margin: 0 auto 15px;
    width: 45px;
    height: 45px;
    font-size: 18px;
  }
  
  .contact-form {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .form-group.full-width,
  .form-button {
    grid-column: span 1;
  }
  
  .contact-details {
    padding: 40px 0;
  }
  
  .form-card {
    padding: 20px 15px;
    margin: 0 5px;
  }
  
  .form-card h2 {
    text-align: center;
    margin-bottom: 10px;
  }
  
  .form-card p {
    text-align: center;
    margin-bottom: 25px;
  }
  
  .contact-form input,
  .contact-form textarea {
    padding: 10px 12px;
  }
  
  .form-button {
    padding: 12px 20px;
    font-size: 12px;
    letter-spacing: 1px;
  }
  
  .contact-map {
    height: 300px;
  }
  
  .toast {
    max-width: calc(100vw - 40px);
    min-width: 200px;
    margin-bottom: 8px;
    padding: 12px 15px;
  }
  
  .toast-message {
    font-size: 13px;
  }
  
  #toast-container {
    right: 10px;
    top: 10px;
    left: 10px;
  }
}

@media (max-width: 359px) {
  .contact-hero {
    padding: 50px 0 30px;
  }
  
  .contact-container {
    padding: 0 8px;
  }
  
  .contact-title {
    font-size: 24px;
  }
  
  .contact-subtitle {
    font-size: 13px;
  }
  
  .form-card {
    padding: 15px 10px;
    margin: 0;
  }
  
  .contact-form input,
  .contact-form textarea {
    padding: 8px 10px;
    font-size: 14px;
  }
  
  .form-button {
    padding: 10px 15px;
    font-size: 11px;
  }
  
  .contact-map {
    height: 250px;
  }
  
  .toast {
    padding: 10px 12px;
    font-size: 12px;
  }
}

@media (hover: none) and (pointer: coarse) {
  .contact-form input,
  .contact-form textarea,
  .form-button {
    font-size: 16px; 
  }
  
  .form-button:hover {
    transform: none; 
  }
  
  .contact-link:hover::after {
    width: 0;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .contact-hero {
    padding: 40px 0 30px;
    min-height: auto;
  }
  
  .contact-title {
    font-size: 28px;
    margin-bottom: 10px;
  }
  
  .contact-subtitle {
    font-size: 14px;
  }
}

@media print {
  .contact-hero {
    padding: 20px 0;
    background: none !important;
    color: #000 !important;
  }
  
  .contact-hero-overlay {
    display: none;
  }
  
  .contact-title,
  .contact-info-item h3 {
    color: #000 !important;
  }
  
  .contact-map,
  .form-button,
  #toast-container {
    display: none;
  }
  
  .contact-form input,
  .contact-form textarea {
    border: 1px solid #000;
  }
}