/* ===============================
   SECÇÃO DE CONTACTO - RESPONSIVA
   =============================== */

.contact.page-section {
    background-color: var(--secondary-color);
    padding: 20px 80px;
}

.section-title {
    text-align: center;
    color: var(--primary-color);
    font-size: 2.5rem;
    position: relative;
}

/* Layout Principal */
.contact-content {
    display: flex;
    gap: 50px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
}

/* Blocos esquerdo e direito */
.contact-info,
.contact-form {
    flex: 1 1 450px;
    max-width: 600px;
    width: 100%;
}

/* Itens com ícones */
.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2px;
}

.contact-item i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-right: 20px;
    margin-top: 15px;
    min-width: 32px;
    text-align: center;
}

.contact-item h3 {
    margin-bottom: 5px;
    color: var(--primary-color);
}

.contact-item p,
.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1rem;
}

/* Horário */

.operating-hours {
    width: 100%;
    max-width: 250px;
}

.operating-hours table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.operating-hours table td {
    padding: 6px 0;
    color: var(--primary-color);
}

.operating-hours table td:first-child {
    text-align: left;
    padding-right: 20px;
    width: auto;
}

.operating-hours table td:last-child {
    text-align: right;
    font-weight: 600;
    padding-left: 20px;
    white-space: nowrap;
}

/* Formulário */
.contact-form h3 {
    margin-bottom: 20px;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: var(--primary-color);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    padding: 11px 14px;
    border-radius: 4px;
    border: 1px solid var(--light-gray);
    font-size: 1rem;
    background-color: var(--white);
    color: var(--primary-color);
    transition: border 0.2s;
}

.contact-form textarea {
    resize: none;
    min-height: 221px;
    max-height: 221px;
}

.contact-form button.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-form button.btn:hover {
    background-color: var(--accent-color);
}

#form-message {
    margin-top: 10px;
    padding: 10px;
    font-size: 1.07em;
    border-radius: 8px;
    text-align: center;
    transition: opacity 0.5s ease, transform 0.5s ease;
    display: none;
}

#form-message.success {
    background: #e8f8ed;
    color: #20663b;
}

#form-message.error {
    background: #ffe4e4;
    color: #b30000;
}

button:disabled {
    background-color: #ccc;
}

/* Mapa */
.map-container {
    margin-top: 60px;
    width: 100%;
}

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

/* ======== MEDIA QUERIES ======== */
@media (min-width: 600px) and (max-width: 1073px) {
  .contact-content {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 40px;
  }

  .contact-info,
  .contact-form {
    flex: 1 1 45%;
    max-width: 100%;
  }

  .contact-item {
    flex-direction: row;
    align-items: flex-start;
    text-align: left;
  }

  .contact-item i {
    margin-right: 16px;
    margin-bottom: 0;
  }
}
@media (max-width: 599px) {
  .contact.page-section {
    padding: 20px 0;
  }

  .contact-content {
    flex-direction: column;
    gap: 40px;
    align-items: stretch;
  }

  .contact-item {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .contact-item i {
    margin-right: 0;
    margin-bottom: 10px;
  }

  .map-container {
    position: relative;
    width: 100vw;
    margin-top: 40px;
    margin-bottom: 0;
    padding: 0;
    box-sizing: border-box;
  }

  .map-container iframe {
    height: 320px;
    width: 100%;
  }
}
/* Reduções progressivas abaixo de 900px */
@media (max-width: 899px) {
  .section-title {
    font-size: 2.1rem;
  }

  .contact-item i {
    font-size: 1.7rem;
    margin-top: 12px;
    min-width: 28px;
  }

  .contact-item h3 {
    font-size: 1.05rem;
  }

  .contact-item p,
  .contact-item a {
    font-size: 0.95rem;
  }

  .contact-form h3 {
    font-size: 1.2rem;
    margin-bottom: 16px;
  }

  .contact-form label {
    font-size: 0.95rem;
  }

  .contact-form input,
  .contact-form select,
  .contact-form textarea {
    font-size: 0.95rem;
    padding: 9px 12px;
    border-radius: 5px;
  }

  .contact-form textarea {
    min-height: 200px;
    max-height: 200px;
  }

  .contact-form button.btn {
    padding: 10px 20px;
    font-size: 0.95rem;
  }

  #form-message {
    font-size: 1rem;
  }

  .operating-hours table td {
    font-size: 0.93rem;
  }
}

/* Telemóveis grandes (até 768px) */
@media (max-width: 768px) {
   

    .contact-item {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
    }

    .contact-item i {
        margin-right: 14px;
        margin-bottom: 0;
    }

    .operating-hours {
        max-width: 200px;
    }

    .operating-hours table {
        width: 100%;
        margin: 0 auto;
    }

    .operating-hours table td:first-child {
        text-align: left;
        padding-right: 0;
        width: auto;
    }

    .operating-hours table td:last-child {
        text-align: right;
        padding-left: 0;
    }
}

/* Telemóveis pequenos (até 576px) */
@media (max-width: 576px) {
    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .contact-item i {
        margin-right: 0;
        margin-bottom: 10px;
    }

    

    .operating-hours table {
        width: 100%;
        margin: 0 auto;
    }

    .operating-hours table td:first-child {
        text-align: left;
        padding-right: 0;
    }

    .operating-hours table td:last-child {
        text-align: right;
        padding-left: 0;
    }

    .map-container iframe {
        height: 350px;
    }
}

/* Extra pequeno */
@media (max-width: 400px) {
    

    .operating-hours table td {
        padding: 6px 0;
        font-size: 0.9rem;
    }
    .operating-hours {
      max-width: 200px;
  }
    .operating-hours table td:first-child {
        text-align: left;
        padding-right: 0;
    }

    .operating-hours table td:last-child {
        text-align: right;
        padding-left: 0;
    }

    .map-container iframe {
        height: 300px;
    }
}
