/* =============================================== */
/* ---             CONFIGURAÇÕES GERAIS          --- */
/* =============================================== */

*, *::before, *::after { box-sizing: border-box; }
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Inter:wght@400;500;600;700&family=Orbitron:wght@400;600;700&display=swap');

:root {
    --primary: #1e3a5f;
    --primary-dark: #152a45;
    --secondary: #00a9a5;
    --accent: #00c2bd;
    --turquoise: #00a8a0;
    --light: #f5f7fa;
    --white: #ffffff;
    --gray: #e5e9f0;
    --gray-dark: #cbd5e1;
    --dark: #0f1e33;
    --text-light: #64748b;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden; 
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 700;
    margin: 0 0 0.8em 0;
    line-height: 1.2;
    color: var(--primary);
}

h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 4vw, 2.2rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.1rem, 3vw, 1.25rem); font-weight: 600; margin-bottom: 0.5em; }

p {
    font-size: 1rem;
    margin: 0 0 1rem 0;
    color: var(--text-light);
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}
a:hover { color: var(--accent); text-decoration: underline; }

/* =============================================== */
/* ---             SEÇÃO HERO                  --- */
/* =============================================== */

.contact-hero {
    padding: 220px 0 100px; 
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.contact-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at 20% 50%, rgba(0, 169, 165, 0.15) 0%, transparent 50%),
                      radial-gradient(circle at 80% 20%, rgba(0, 169, 165, 0.1) 0%, transparent 40%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.contact-hero h1 {
    color: var(--white);
    margin-bottom: 20px;
}

.contact-hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
}

/* =============================================== */
/* ---         MAIN CONTENT GRID               --- */
/* =============================================== */

.contact-main-section {
    padding: 60px 0 100px;
    margin-top: -40px; /* Overlap effect */
}

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

/* --- Left Column: Contact Info --- */

.contact-info-card {
    background-color: var(--white);
    padding: 40px;
    border-radius: 20px; 
    box-shadow: var(--shadow-lg);
    height: 100%;
    position: relative;
    overflow: hidden;
    border-top: 5px solid var(--secondary);
}

.contact-info-card h2 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    color: var(--primary);
    position: relative;
    padding-bottom: 15px;
}

.contact-info-card h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--secondary);
    border-radius: 2px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-bottom: 40px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.icon-box {
    width: 48px;
    height: 48px;
    background-color: rgba(0, 169, 165, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--secondary);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.contact-item:hover .icon-box {
    background-color: var(--secondary);
    color: var(--white);
    transform: scale(1.05);
}

.text-content h3 {
    margin-bottom: 5px;
    color: var(--primary);
    font-size: 1.1rem;
}

.text-content p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.5;
}

.map-container {
    border-radius: 16px;
    overflow: hidden;
    height: 250px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray);
}

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

/* --- Right Column: Contact Form --- */

.contact-form-wrapper {
    background-color: var(--white);
    padding: 50px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.form-header {
    margin-bottom: 30px;
    text-align: center;
}

.form-header h2 {
    margin-bottom: 10px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

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

.form-group label {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

.input-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    opacity: 0.6;
    pointer-events: none;
    transition: all 0.3s ease;
}

.textarea-icon {
    top: 20px;
    transform: none;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px 14px 48px; /* Space for icon */
    border: 2px solid var(--gray);
    border-radius: 12px;
    font-size: 1rem;
    font-family: var(--font-body);
    background-color: #fcfcfc;
    color: var(--dark);
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--secondary);
    background-color: var(--white);
    box-shadow: 0 0 0 4px rgba(0, 169, 165, 0.1);
}

.form-group input:focus + .input-icon,
.form-group textarea:focus + .input-icon { /* This selector won't work with current HTML structure, but keeping for intent */
    color: var(--secondary);
    opacity: 1;
}

/* Fix for icon color change on focus - using focus-within on wrapper */
.input-wrapper:focus-within .input-icon {
    color: var(--secondary);
    opacity: 1;
}

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

.form-submit {
    width: 100%;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: var(--font-heading);
    margin-top: 10px;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--turquoise) 100%);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 169, 165, 0.3);
}

.form-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 169, 165, 0.4);
    filter: brightness(1.05);
}

.form-submit:active {
    transform: translateY(0);
}

/* =============================================== */
/* ---             ANIMATIONS                  --- */
/* =============================================== */

.fade-in-up {
    animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================== */
/* ---             MEDIA QUERIES               --- */
/* =============================================== */

@media (max-width: 992px) {
    .contact-grid-layout {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .contact-main-section {
        margin-top: 0;
        padding-top: 40px;
    }

    .contact-info-card {
        border-top: none;
        border-left: 5px solid var(--secondary);
    }
}

@media (max-width: 768px) {
    .contact-hero { padding: 140px 0 60px; }
    
    .contact-info-card,
    .contact-form-wrapper { 
        padding: 30px 20px; 
    }

    .form-row { 
        grid-template-columns: 1fr; 
        gap: 24px; 
    }
    
    .contact-details {
        gap: 20px;
    }
}

/* Contact page specific styles */
.map-iframe {
    border: 0;
}

.contact-form-delayed {
    animation-delay: 0.2s;
}
