/* =========================
   contactos.css 
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
}

:root {
    --primary-gold: #C5B358;
    --dark-gold: #A08D47;
    --dark-bg: #2A2A2A;
}

body {
    color: #333;
    line-height: 1.6;
    padding-top: var(--header-h);
}

/* =========================
   SECÇÃO PRINCIPAL CONTACTOS
========================= */
.contact-main {
    padding: 4rem 0;
    background: linear-gradient(to bottom, #f8fafc 0%, #ffffff 100%);
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
}

/* =========================
   FORMULÁRIO DE CONTACTO
========================= */
.contact-form-wrapper {
    background: #ffffff;
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
    border: 1px solid #f1f5f9;
}

.contact-form-header {
    margin-bottom: 2rem;
}

.contact-form-header h2 {
    font-size: 1.8rem;
    color: #111827;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.contact-form-header p {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.85rem 1rem;
    font-size: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background: #ffffff;
    color: #111827;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-gold);
    box-shadow: 0 0 0 3px rgba(197, 179, 88, 0.15);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-checkbox {
    flex-direction: row;
    align-items: center;
    gap: 0.7rem;
}

.form-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-gold);
}

.form-checkbox label {
    margin: 0;
    font-weight: 400;
    font-size: 0.9rem;
    color: #4b5563;
    cursor: pointer;
}

.form-checkbox label a {
    color: var(--gold-text);
    text-decoration: none;
    font-weight: 600;
}

.contact-submit-btn {
    padding: 1rem 2rem;
    background: var(--primary-gold);
    color: var(--navy);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.contact-submit-btn:hover {
    background: var(--dark-gold);
    transform: translateY(-2px);
}

.form-message {
    padding: 0;
    text-align: center;
    font-weight: 600;
    border-radius: 8px;
    min-height: 0;
}

.form-message-loading {
    color: var(--primary-gold);
    padding: 1rem;
    background: #fef9e7;
}

.form-message-success {
    color: #059669;
    padding: 1rem;
    background: #d1fae5;
}

.form-message-error {
    color: #dc2626;
    padding: 1rem;
    background: #fee2e2;
}

/* =========================
   INFORMAÇÕES DE CONTACTO
========================= */
.contact-info-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-info-header h2 {
    font-size: 1.8rem;
    color: #111827;
    margin: 0 0 0.5rem 0;
    font-weight: 700;
}

.contact-info-header p {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0;
}

.contact-info-cards {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-info-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    border: 1px solid #f1f5f9;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-card-link {
    text-decoration: none;
    color: inherit;
}

.contact-info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.1);
}

.contact-info-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: linear-gradient(135deg, #fff7e5 0%, #fef3c7 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-info-icon svg {
    width: 22px;
    height: 22px;
}

.contact-info-text {
    flex: 1;
    text-align: left;
    min-width: 0;
}

.contact-info-card h3 {
    font-size: 1rem;
    color: #111827;
    margin: 0 0 0.3rem 0;
    font-weight: 700;
}

.contact-info-card p {
    font-size: 0.95rem;
    color: #4b5563;
    margin: 0;
    line-height: 1.4;
    overflow-wrap: anywhere; /* a morada/email longos quebram em vez de saírem do cartão */
}

.contact-card-link p,
.contact-info-card.email-trigger p {
    color: var(--gold-text);
    font-weight: 600;
}

.contact-info-card a {
    color: var(--gold-text);
    text-decoration: none;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.contact-info-card a:hover {
    color: #5c4f14;
}

/* Redes Sociais */
.contact-social {
    background: linear-gradient(135deg, #243447 0%, #1e3a5f 100%);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.contact-social h3 {
    font-size: 1rem;
    color: #ffffff;
    margin: 0 0 1rem 0;
    font-weight: 700;
}

.contact-social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.contact-social-links a {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
}

.contact-social-links a:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.25);
}

.contact-social-links img {
    width: 20px;
    height: 20px;
    filter: brightness(0) invert(1);
}

/* =========================
   MODAL ESCOLHA DE EMAIL
========================= */
.email-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
}

.email-modal-content {
    background-color: #ffffff;
    padding: 2rem;
    border-radius: 16px;
    max-width: 420px;
    width: 90%;
    position: relative;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.close-modal {
    position: absolute;
    right: 18px;
    top: 14px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #94a3b8;
    transition: color 0.2s;
}

.close-modal:hover {
    color: #1e293b;
}

.email-modal-content h3 {
    margin-bottom: 0.5rem;
    color: #111827;
    font-size: 1.25rem;
    font-weight: 700;
}

.email-modal-content p {
    font-size: 0.9rem;
    color: #6b7280;
    margin-bottom: 1.5rem;
}

.email-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.email-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.85rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.email-btn.outlook { background-color: #0078d4; color: white; }
.email-btn.gmail { background-color: #ea4335; color: white; }
.email-btn.default-app { background-color: #4b5563; color: white; }
.email-btn.copy-btn { background-color: #f1f5f9; color: #1e293b; border: 1px solid #cbd5e1; }

.email-btn:hover {
    opacity: 0.92;
    transform: translateY(-1px);
}

.email-btn.copy-btn:hover {
    background-color: #e2e8f0;
}

/* =========================
   MAPA
========================= */
.contact-map {
    background: #f8fafc;
    padding: 0;
}

.contact-map-container {
    width: 100%;
    height: 400px;
    overflow: hidden;
}

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

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: minmax(0, 1fr);
        gap: 2.5rem;
    }

    .contact-form-wrapper,
    .contact-info-wrapper {
        max-width: 700px;
        margin: 0 auto;
        width: 100%;
    }
    
    .contact-info-cards {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1rem;
    }
    
    .contact-info-card p,
    .contact-info-card a {
        white-space: normal;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: var(--header-h);
    }
    
    .contact-main {
        padding: 3rem 0;
    }

    .contact-container {
        padding: 0 1rem;
        gap: 2rem;
    }

    .contact-form-wrapper {
        padding: 1.5rem;
    }

    .contact-form-header h2,
    .contact-info-header h2 {
        font-size: 1.5rem;
    }

    .form-row {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

    .contact-info-cards {
        grid-template-columns: minmax(0, 1fr);
        gap: 1rem;
    }

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

@media (max-width: 480px) {
    body {
        padding-top: var(--header-h);
    }
    
    .contact-form-wrapper {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .contact-form-header h2 {
        font-size: 1.3rem;
    }

    .contact-info-card {
        padding: 1rem;
    }

    .contact-social {
        padding: 1.25rem;
    }
}