/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

.modal.active,
.modal[style*="display: flex"] {
  display: flex;
}

.modal-content{
  background: #fff;
  padding: 20px;
  border-radius: 6px;
  max-width: 450px;
  text-align: center;
  display:flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap:40px
}

.modal-content p{
  font-size: 20px;
  line-height:30px;
  letter-spacing: 1px;
  font-family: var(--font-henry);
}

.modal-content.error {
  background: #f8d7da;
  color: #721c24;
}

#close-contact-modal{
    background-color: var(--color-primary-blue);
    color: #f9faf3;
    text-decoration: none;
    padding: 10px 40px;
    font-size: 12px;
    border-radius: 25px;
    transition: background-color 0.3s ease-in-out;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    border: none;
    width: 152px;
    cursor: pointer;
}

#close-contact-modal:hover {
    background-color: var(--color-secondary-blue);
}

/* ---------- TABLET (≤1024px) ---------- */
@media (max-width: 1024px) {
    .modal-content {
        max-width: 350px;
        padding: 18px;
        gap: 30px;
    }

    .modal-content p {
        font-size: 18px;
        line-height: 28px;
    }

    #close-contact-modal {
        padding: 8px 32px;
        font-size: 11px;
        width: 140px;
    }
}

/* ---------- MOBILE (≤768px) ---------- */
@media (max-width: 768px) {
    .modal {
        padding: 10px; /* add padding so content doesn't touch screen edges */
    }

    .modal-content {
        max-width: 90%; /* fit within viewport */
        padding: 15px;
        gap: 20px;
    }

    .modal-content p {
        font-size: 16px;
        line-height: 24px;
    }

    #close-contact-modal {
        padding: 6px 28px;
        font-size: 10px;
        width: 120px;
    }
}
