/* ============================================================
   TERRA MAX - KONTAKT STYLES
   Extends: home.css
   ============================================================ */

/* Page Hero reuse */
.page-hero {
  position: relative;
  min-height: 50vh; /* Increased height for better spacing */
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-top: 0;
  padding-bottom: 60px; /* Prevent content overlap on zoom */
}
.page-hero__background {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.page-hero__background img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.page-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(30, 30, 30, 0.9) 0%,
    rgba(30, 30, 30, 0.6) 100%
  );
}
.page-hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background: var(--color-primary);
  clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 100%);
  z-index: 2;
}
.page-hero__content {
  position: relative;
  z-index: 3;
  padding-top: 100px; /* Increased from 60px for better spacing from header when zoomed */
}
.page-hero__title {
  color: var(--color-white);
  font-size: clamp(2.5rem, 4vw, 4rem);
  margin-bottom: 15px;
}
.page-hero__subtitle {
  color: rgba(255, 255, 255, 0.8);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 1.2rem;
  max-width: 600px;
  border-left: 4px solid var(--color-primary);
  padding-left: 20px;
}

/* ==================== CONTACT SECTION ==================== */
.contact-section {
  padding: var(--section-padding) 0;
  background: #fff;
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 60px;
}

/* Info Side */
.contact-info {
  padding-top: 20px;
}

.contact-heading {
  font-size: 2rem;
  color: var(--color-dark);
  margin-bottom: 20px;
}

.contact-desc {
  color: #666;
  margin-bottom: 40px;
  line-height: 1.7;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-bottom: 50px;
}

.detail-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.detail-icon {
  width: 50px;
  height: 50px;
  background: var(--color-dark);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  /* Hex shape */
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

.detail-item strong {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  color: var(--color-dark);
  margin-bottom: 5px;
}

.detail-item p,
.detail-item a {
  color: #666;
  font-size: 1rem;
}

.link-highlight {
  color: var(--color-primary-dark);
  font-weight: 700;
  transition: 0.3s;
}
.link-highlight:hover {
  color: var(--color-dark);
}

.contact-hours {
  background: #f9f9f9;
  padding: 30px;
  border-left: 4px solid var(--color-primary);
}

.contact-hours h4 {
  margin-bottom: 15px;
  font-size: 1.2rem;
}

.contact-hours ul li {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  color: #555;
  border-bottom: 1px solid #eee;
  padding-bottom: 5px;
}
.contact-hours ul li:last-child {
  border-bottom: none;
}
.closed {
  color: #f44336;
  font-weight: 700;
}

/* Form Box */
.contact-form-box {
  background: var(--color-dark);
  padding: 50px;
  color: #fff;
  position: relative;
  clip-path: polygon(
    40px 0,
    100% 0,
    100% 100%,
    0 100%,
    0 40px
  ); /* Cut Corner */
  box-shadow: var(--shadow-lg);
}

.form-heading {
  color: #fff;
  font-size: 1.8rem;
  margin-bottom: 30px;
}

.tech-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: var(--color-primary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.tech-form input,
.tech-form select,
.tech-form textarea {
  width: 100%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 15px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 1rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Input hover states - enhanced */
.tech-form input:hover,
.tech-form textarea:hover {
  border-color: rgba(254, 215, 0, 0.4);
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 0 10px rgba(254, 215, 0, 0.1);
}

/* Style for select dropdown arrow - hexagonal tech style */
.tech-form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FED700' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 18px;
  padding-right: 45px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

/* Select hover state - enhanced with glow and animated arrow */
.tech-form select:hover {
  border-color: var(--color-primary);
  background-color: rgba(255, 255, 255, 0.12);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FED700' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 20px;
  box-shadow: 0 0 15px rgba(254, 215, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

/* Select active/open state */
.tech-form select:active {
  transform: translateY(0);
  box-shadow: 0 0 20px rgba(254, 215, 0, 0.25) inset;
}

/* Yellow highlight on text selection inside select */
.tech-form select::selection {
  background: rgba(254, 215, 0, 0.3);
  color: #fff;
}

.tech-form select::-moz-selection {
  background: rgba(254, 215, 0, 0.3);
  color: #fff;
}

/* Remove blue highlight on focus (Chrome, Safari) */
.tech-form select:focus {
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
}

/* Style for dropdown options */
.tech-form select option {
  background-color: #1E1E1E !important;
  background: #1E1E1E !important;
  color: #fff !important;
  padding: 14px 20px;
  font-size: 0.95rem;
  font-weight: 500;
}

/* Disabled/placeholder option styling */
.tech-form select option:disabled {
  color: #666 !important;
  font-style: italic;
  background-color: #1E1E1E !important;
  background: #1E1E1E !important;
}

/* Checked/selected option - subtle yellow background */
.tech-form select option:checked,
.tech-form select option[selected] {
  background: #1E1E1E !important;
  background-color: #1E1E1E !important;
  color: var(--color-primary) !important;
  font-weight: 600;
}

/* For Webkit browsers (Chrome, Safari, Edge) */
.tech-form select option:checked::before {
  background: rgba(254, 215, 0, 0.1);
}

/* Focus/Active state for options */
.tech-form select option:focus,
.tech-form select option:active {
  background: rgba(254, 215, 0, 0.15) !important;
  background-color: rgba(254, 215, 0, 0.15) !important;
  color: var(--color-primary) !important;
  outline: none;
}

.tech-form input:focus,
.tech-form select:focus,
.tech-form textarea:focus {
  border-color: var(--color-primary);
  background: rgba(255, 255, 255, 0.1);
  outline: none;
  box-shadow: 0 0 20px rgba(245, 196, 0, 0.3), 0 0 40px rgba(245, 196, 0, 0.1);
  transform: translateY(-2px);
}

/* Select focus - maintain arrow */
.tech-form select:focus {
  background-color: rgba(255, 255, 255, 0.1);
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FED700' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 18px;
}

.form-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 30px;
  font-size: 0.85rem;
  color: #aaa;
  cursor: pointer;
  user-select: none;
}

/* Hide default checkbox */
.form-checkbox input[type="checkbox"] {
  appearance: none !important;
  -webkit-appearance: none !important;
  -moz-appearance: none !important;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  background: rgba(255, 255, 255, 0.05);
  border: 2px solid rgba(255, 255, 255, 0.3);
  cursor: pointer;
  position: relative;
  transition: all 0.3s var(--ease-tech);
  margin-top: 2px;
  flex-shrink: 0;
  padding: 0 !important;
  margin: 0 !important;
  margin-top: 2px !important;

  /* Clip-path matching --clip-btn style (proportional) */
  clip-path: polygon(
    4px 0,
    100% 0,
    100% calc(100% - 4px),
    calc(100% - 4px) 100%,
    0 100%,
    0 4px
  );
}

.form-checkbox input[type="checkbox"]:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--color-primary);
  transform: scale(1.05);
}

/* Checked state */
.form-checkbox input[type="checkbox"]:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
  box-shadow: 0 0 8px rgba(254, 215, 0, 0.4);
}

/* Checkmark - using icon for better visual */
.form-checkbox input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--color-dark);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
}

/* Focus state - accessibility */
.form-checkbox input[type="checkbox"]:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(254, 215, 0, 0.3);
}

/* Focus visible (keyboard navigation) */
.form-checkbox input[type="checkbox"]:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.form-checkbox label {
  cursor: pointer;
  flex: 1;
}

.form-checkbox a {
  color: var(--color-primary);
  text-decoration: underline;
  transition: color 0.2s;
}

.form-checkbox a:hover {
  color: #fff;
}

/* Form Messages */
.form-message {
  padding: 15px 20px;
  margin-bottom: 20px;
  border-radius: 4px;
  font-size: 0.95rem;
  font-weight: 500;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
}

.form-message.show {
  opacity: 1;
  transform: translateY(0);
}

.form-message--success {
  background: rgba(76, 175, 80, 0.15);
  color: #4caf50;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

.form-message--error {
  background: rgba(244, 67, 54, 0.15);
  color: #f44336;
  border: 1px solid rgba(244, 67, 54, 0.3);
}

/* ==================== MAP ==================== */
.contact-map {
  position: relative;
  height: 400px;
  background: #eee;
}

.map-bg {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.2);
}

.map-pin-card {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #fff;
  padding: 25px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: var(--shadow-lg);
  border-bottom: 4px solid var(--color-primary);
}

.map-pin-card i {
  font-size: 30px;
  color: var(--color-primary);
  margin-bottom: 10px;
}
.map-pin-card strong {
  font-size: 1.2rem;
  color: var(--color-dark);
}
.map-pin-card span {
  color: #777;
  margin-bottom: 15px;
  display: block;
}

/* ==================== FAQ ==================== */
.faq {
  padding: 80px 0;
  background: #f4f4f4;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 30px;
}

.faq-item {
  background: #fff;
  padding: 30px;
  border-left: 3px solid var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.faq-item h4 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--color-dark);
}

.faq-item p {
  color: #666;
  font-size: 0.95rem;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 992px) {
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
  .contact-form-box {
    order: -1; /* Form first on mobile? Or after? Let's keep form last usually */
    clip-path: none;
  }
}

@media (max-width: 768px) {
  .tech-form .form-row {
    grid-template-columns: 1fr;
  }
  .faq-grid {
    grid-template-columns: 1fr;
  }
}
