/* CONTACT PAGE */

.p.intro{
  max-width:70ch;
  margin-top:12px;
  line-height: 1.85;
}

.contact-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:16px;
  align-items:start;
}

.panel{
  border:1px solid var(--line);
  border-radius: var(--radius-lg);
  background:#fff;
  box-shadow: var(--shadow-sm);
  overflow:hidden;
}

.panel-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:16px 18px;
  border-bottom:1px solid var(--line);
  background: var(--soft);
}

.panel-body{
  padding:18px;
}

.panel-foot{
  padding:14px 18px;
  border-top:1px solid var(--line);
  background: rgba(247,247,248,.7);
}

/* Info */
.info{
  display:grid;
  gap:14px;
}

.info-row{
  display:grid;
  grid-template-columns: 120px 1fr;
  gap:14px;
  align-items:start;
}

.label{
  font-size:12px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color: var(--muted);
  font-weight:900;
  padding-top: 2px;
}

.value{
  min-width:0;
}

.divider{
  height:1px;
  background: var(--line);
  margin:18px 0;
}

/* Form */
.form{
  margin-top: 0;
}

.form label{
  display:block;
  font-size:12px;
  letter-spacing:.14em;
  text-transform:uppercase;
  color: var(--muted);
  font-weight:900;
  margin-bottom:8px;
}

.row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:12px;
  margin-bottom:12px;
}

.field{
  display:block;
  margin-bottom:12px;
}

.field:last-child{
  margin-bottom:0;
}

input, textarea{
  width:100%;
  border:1px solid var(--line);
  border-radius: 14px;
  padding:12px 14px;
  font: inherit;
  font-size:14px;
  background:#fff;
  color: var(--text);
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}

input::placeholder,
textarea::placeholder{
  color: var(--muted);
  opacity: 0.6;
}

textarea{ 
  resize: vertical;
  min-height: 120px;
  line-height: 1.6;
}

input:focus, textarea:focus{
  outline:none;
  border-color: rgba(209,15,27,.38);
  box-shadow: 0 0 0 4px rgba(209,15,27,.08);
}

input:hover:not(:focus), 
textarea:hover:not(:focus){
  border-color: rgba(209,15,27,.4);
  box-shadow: 0 0 0 4px rgba(209,15,27,.08);
}

.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}

/* Map */
.map{
  height: 520px;
  background:#f5f5f5;
  border-radius: 0;
  overflow: hidden;
}

.map iframe{
  width:100%;
  height:100%;
  border:0;
  display: block;
}

/* Responsive */
@media (max-width:980px){
  .contact-grid{ 
    grid-template-columns:1fr;
    gap: 14px;
  }
  .map{ height: 460px; }
}

@media (max-width:620px){
  .row{ 
    grid-template-columns:1fr;
    gap: 12px;
  }
  .info-row{ 
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .map{ height: 380px; }
  .panel-body{
    padding: 16px;
  }
  input, textarea{
    padding: 10px 12px;
    font-size: 16px; /* Prevents iOS zoom */
  }
  
  /* Better mobile buttons */
  .actions {
    flex-direction: column;
    gap: 10px;
  }
  
  .actions .btn {
    width: 100%;
    text-align: center;
  }
  
  /* Panel headers stack on mobile */
  .panel-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}

/* Form Status Messages */
.form-status {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  display: none;
}

.form-status.success {
  background: rgba(22,163,74,.08);
  border: 1px solid rgba(22,163,74,.2);
  color: #16a34a;
}

.form-status.error {
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.2);
  color: #ef4444;
}

/* ==========================================
   MODAL OVERLAY
   Uses inset:-200px to guarantee the dark
   overlay extends well past the viewport on
   every side, covering the iOS Safari bottom
   toolbar gap. Solid color = uniform look.
   ========================================== */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  top: -200px;
  left: -200px;
  right: -200px;
  bottom: -200px;
  background-color: rgba(0,0,0,0.7);
  align-items: center;
  justify-content: center;
  animation: modalFadeIn 0.3s ease;
  /* Offset the negative positioning so flex children stay centered */
  padding: 200px;
  box-sizing: border-box;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-content {
  background: #fff;
  padding: 40px 32px;
  border-radius: 20px;
  text-align: center;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: modalSlideUp 0.3s ease;
  position: relative;
}

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

.modal-checkmark {
  margin: 0 auto 24px;
  width: 80px;
  height: 80px;
}

.checkmark {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: block;
}

.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke: #16a34a;
  fill: none;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  animation: circle-draw 0.4s ease 0.1s forwards;
}

.checkmark-check {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke-width: 2;
  stroke: #16a34a;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: check-draw 0.3s ease 0.6s forwards;
}

@keyframes circle-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes check-draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes checkmarkFill {
  100% {
    box-shadow: inset 0px 0px 0px 30px #16a34a;
  }
}

.modal-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
}

.modal-message {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 28px;
}

.modal-close-btn {
  background: #2d2d2d;
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.modal-close-btn:hover {
  background: #D10F1B;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(209,15,27,0.3);
}

.modal-close-btn:active {
  transform: translateY(0);
}

/* Error Modal Icon */
.modal-error-icon {
  margin: 0 auto 24px;
  width: 80px;
  height: 80px;
}

.error-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: block;
}

.error-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke-width: 2;
  stroke: #ef4444;
  fill: none;
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  animation: circle-draw 0.4s ease 0.1s forwards;
}

.error-x-line1 {
  stroke-dasharray: 28;
  stroke-dashoffset: 28;
  stroke-width: 2;
  stroke: #ef4444;
  stroke-linecap: round;
  opacity: 0;
  animation: x-draw 0.2s ease 0.6s forwards;
}

.error-x-line2 {
  stroke-dasharray: 28;
  stroke-dashoffset: 28;
  stroke-width: 2;
  stroke: #ef4444;
  stroke-linecap: round;
  opacity: 0;
  animation: x-draw 0.2s ease 0.8s forwards;
}

@keyframes x-draw {
  from {
    opacity: 1;
  }
  to {
    stroke-dashoffset: 0;
    opacity: 1;
  }
}

/* Error Modal Email Button */
.modal-email-btn {
  display: inline-block;
  background: #2d2d2d;
  color: #fff;
  border: none;
  padding: 12px 32px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.3s var(--ease);
}

.modal-email-btn:hover {
  background: #D10F1B;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(209,15,27,0.3);
}

.modal-email-btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(209,15,27,0.2);
}

/* X Close Button (Top Right) */
.modal-x-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  font-size: 32px;
  line-height: 1;
  color: #9ca3af;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  padding: 0;
}

.modal-x-close:hover {
  color: #D10F1B;
  background: rgba(209,15,27,0.1);
  transform: rotate(90deg);
}

/* ==========================================
   VERIFICATION MODAL (CAPTCHA POPUP)
   ========================================== */
.verification-modal-content {
  max-width: 90%;
  width: 500px;
  max-height: 90vh;
  max-height: 90dvh;
  padding: 0;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
  border-radius: 20px;
}

/* Allow reCAPTCHA puzzle popup to escape modal bounds */
.verification-modal {
  z-index: 99999;
  overflow: visible;
}

.verification-content {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.verification-header {
  padding: 32px 32px 24px 32px;
  text-align: center;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: #fff;
}

.verification-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px auto;
  background: linear-gradient(135deg, rgba(209,15,27,0.1) 0%, rgba(209,15,27,0.05) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.verification-icon svg {
  width: 28px;
  height: 28px;
  color: var(--red);
}

.verification-header h3 {
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 8px 0;
  color: var(--heading);
}

.verification-header p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.verification-body {
  flex: 1;
  min-height: 200px;
  background: #fafafa;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

.recaptcha-wrapper {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  border: 1px solid rgba(0,0,0,0.06);
}

#recaptcha-container {
  display: flex;
  justify-content: center;
  transform: scale(1);
}

.verification-footer {
  padding: 16px 32px;
  text-align: center;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.verification-footer p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
  line-height: 1.4;
}

.verification-iframe {
  width: 100%;
  height: 100%;
  min-height: 600px;
  border: none;
  display: block;
}

.verification-modal .modal-x-close {
  z-index: 10;
  background: rgba(255,255,255,0.9);
}

/* ==========================================
   MOBILE RESPONSIVE — 768px
   ========================================== */
@media (max-width: 768px) {
  /* Success & Error Modals */
  .modal-content {
    padding: 32px 24px;
    max-width: 90%;
    width: 90%;
  }
  
  .modal-checkmark,
  .modal-error-icon {
    width: 70px;
    height: 70px;
    margin: 0 auto 20px;
  }
  
  .checkmark,
  .error-icon {
    width: 70px;
    height: 70px;
  }
  
  .modal-title {
    font-size: 24px;
    margin: 0 0 10px;
  }
  
  .modal-message {
    font-size: 15px;
    margin: 0 0 24px;
  }
  
  .modal-close-btn,
  .modal-email-btn {
    padding: 11px 28px;
    font-size: 14px;
  }
  
  .modal-x-close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    font-size: 28px;
  }
  
  /* Verification Modal — compact for mobile */
  .verification-modal-content {
    width: 92%;
    max-height: 85vh;
    max-height: 85dvh;
    border-radius: 16px;
  }
  
  .verification-header {
    padding: 20px 20px 16px 20px;
  }

  .verification-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px auto;
  }

  .verification-icon svg {
    width: 24px;
    height: 24px;
  }
  
  .verification-header h3 {
    font-size: 18px;
    margin: 0 0 6px 0;
  }
  
  .verification-header p {
    font-size: 13px;
  }
  
  .verification-body {
    min-height: auto;
    padding: 24px 16px;
  }

  .recaptcha-wrapper {
    padding: 14px;
    border-radius: 10px;
  }

  /* Scale reCAPTCHA to fit mobile */
  #recaptcha-container {
    transform: scale(0.92);
    transform-origin: center center;
  }
  
  .verification-footer {
    padding: 12px 20px;
  }

  .verification-footer p {
    font-size: 11px;
  }

  .verification-iframe {
    min-height: 400px;
  }
}

/* ==========================================
   MOBILE RESPONSIVE — 480px (small phones)
   ========================================== */
@media (max-width: 480px) {
  .modal-content {
    padding: 28px 20px;
    border-radius: 16px;
  }
  
  .modal-checkmark,
  .modal-error-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
  }
  
  .checkmark,
  .error-icon {
    width: 60px;
    height: 60px;
  }
  
  .modal-title {
    font-size: 22px;
  }
  
  .modal-message {
    font-size: 14px;
    line-height: 1.5;
  }
  
  .modal-close-btn,
  .modal-email-btn {
    padding: 10px 24px;
    font-size: 13px;
    width: 100%;
  }
  
  .modal-x-close {
    top: 10px;
    right: 10px;
    width: 30px;
    height: 30px;
    font-size: 26px;
  }
  
  /* Verification Modal — extra small screens */
  .verification-modal-content {
    width: 95%;
    max-height: 80vh;
    max-height: 80dvh;
    border-radius: 14px;
  }
  
  .verification-header {
    padding: 16px 16px 12px 16px;
  }

  .verification-icon {
    width: 44px;
    height: 44px;
    margin: 0 auto 10px auto;
  }

  .verification-icon svg {
    width: 22px;
    height: 22px;
  }
  
  .verification-header h3 {
    font-size: 16px;
  }
  
  .verification-header p {
    font-size: 12px;
  }
  
  .verification-body {
    min-height: auto;
    padding: 20px 12px;
  }

  /* Scale reCAPTCHA more on tiny screens */
  #recaptcha-container {
    transform: scale(0.82);
    transform-origin: center center;
  }

  .recaptcha-wrapper {
    padding: 10px;
    border-radius: 8px;
  }

  .verification-footer {
    padding: 10px 16px;
  }

  .verification-footer p {
    font-size: 11px;
  }

  .verification-iframe {
    min-height: 350px;
  }
}