/* ==========================================
   CONTACT SECTION - CLEAN PURPLE PIXEL ART
   ========================================== */

.contact-section {
    position: relative;
    height: 100vh;
    max-height: 100vh;
    padding: 60px 20px 20px;
    background-color: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background:
        /* TOP FADE */
        linear-gradient(to bottom,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 0.8) 15%,
            rgba(0, 0, 0, 0) 30%),

        /* BOTTOM FADE */
        linear-gradient(to top,
            rgba(0, 0, 0, 1) 0%,
            rgba(0, 0, 0, 0.8) 15%,
            rgba(0, 0, 0, 0) 30%),

        url('../Assets/Fundo-japones-cyberpunk.gif') center center / cover no-repeat;
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
}

/* Remove pseudo-element for after overlay - not needed */
.contact-section::after {
    content: none;
}

/* Floating Pixel Stars */
#contact-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.contact-container {
    max-width: 900px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    margin-top: -40px;
}

/* ==========================================
   HEADER - COMPACT
   ========================================== */
.contact-header {
    text-align: center;
    margin-bottom: 20px;
    animation: pixelFadeIn 0.6s steps(4);
}

@keyframes pixelFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.contact-title {
    font-family: "Nata Sans", sans-serif;
    font-size: 2rem;
    color: #ffffff;
    margin-bottom: 5px;
    text-shadow:
        3px 3px 0 #333333,
        6px 6px 0 rgba(255, 255, 255, 0.2);
    letter-spacing: 2px;
}

.contact-title i {
    color: #ffffff;
    margin-right: 10px;
}

.contact-subtitle {
    font-size: 0.9rem;
    color: #d5d5d5;
    font-weight: 400;
    margin-bottom: 0;
}

/* ==========================================
   HIDE INFO CARDS AND MASCOT
   ========================================== */
.contact-info,
.contact-mascot {
    display: none;
}

/* ==========================================
   CONTENT LAYOUT - SINGLE COLUMN
   ========================================== */
.contact-content {
    display: block;
    /* removed animation: slideIn to guarantee backdrop-filter works properly */
}

/* ==========================================
   FORM - PREMIUM WHITE GLASSMORPHISM
   ========================================== */
.contact-form-wrapper {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    padding: 40px 30px;
    position: relative;
    box-shadow:
        0 30px 60px rgba(0, 0, 0, 0.6),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.contact-form-wrapper::before {
    content: 'ENTRE EM CONTATO';
    position: absolute;
    top: -16px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    color: #000000;
    background: #ffffff;
    padding: 6px 20px;
    letter-spacing: 2px;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group {
    position: relative;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    display: block;
    color: #ffffff;
    font-weight: 300;
    margin-bottom: 8px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
}

.form-group label i {
    color: #ffffff;
    margin-right: 6px;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #ffffff;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    font-weight: 300;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #ffffff;
    background: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background: #1a1a1a;
    color: #e0e0e0;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.8rem;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
    max-height: 150px;
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #e74c3c;
    animation: shake 0.4s steps(4);
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-6px);
    }

    75% {
        transform: translateX(6px);
    }
}

.error-message {
    color: #e74c3c;
    font-size: 0.75rem;
    margin-top: 4px;
    display: block;
    text-shadow: 1px 1px 0 #000;
}

.char-counter {
    position: absolute;
    bottom: 10px;
    right: 15px;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.75rem;
    pointer-events: none;
}

/* ==========================================
   SUBMIT BUTTON - SIMPLE STYLE
   ========================================== */
.form-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 5px;
}

.btn-submit {
    display: inline-block;
    padding: 16px 45px;
    background: #ffffff;
    color: #000000;
    text-decoration: none;
    border: none;
    border-radius: 30px;
    font-size: 1.05rem;
    font-weight: 500;
    font-family: 'Poppins', sans-serif;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.btn-submit:hover {
    transform: translateY(-4px);
    background: #e0e0e0;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.btn-submit:active {
    transform: translateY(-1px);
}

.btn-submit i {
    margin-right: 8px;
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ==========================================
   FORM MESSAGES & LOADING STATE
   ========================================== */
.btn-submit:disabled {
    opacity: 0.8;
    cursor: wait;
    background: #f0f0f0;
    color: #333333;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    animation: pulseGlow 1.2s infinite alternate ease-in-out;
}

@keyframes pulseGlow {
    from {
        box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
    }

    to {
        box-shadow: 0 0 25px rgba(255, 255, 255, 0.6);
    }
}

.form-message {
    grid-column: 1 / -1;
    padding: 15px 20px;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
    font-size: 0.95rem;
    font-family: 'Poppins', sans-serif;
    animation: messageFadeIn 0.4s ease-out forwards;
    margin-top: 15px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

@keyframes messageFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
        /* using this inside an already loaded container won't break the wrapper's blur */
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-message.success {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.4);
    color: #2ecc71;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.2);
}

.form-message.error {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.4);
    color: #e74c3c;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.2);
}

/* ==========================================
   CONTACT INFO - FOOTER STYLE
   ========================================== */
.contact-footer-info {
    text-align: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #2a2a2a;
}

.contact-footer-info p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin: 5px 0;
}

.contact-footer-info a {
    color: #bb8fce;
    text-decoration: none;
    transition: color 0.2s;
}

.contact-footer-info a:hover {
    color: #ffffff;
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 768px) {
    .contact-section {
        padding: 100px 15px 40px !important;
        height: auto !important;
        max-height: none !important;
        min-height: 100vh !important;
        overflow: visible !important;
    }

    .contact-title {
        font-size: 1.6rem;
    }

    .contact-form {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .contact-form-wrapper {
        padding: 35px 15px 15px;
        margin-top: 15px;
    }

    .btn-submit {
        width: 100%;
        padding: 12px 30px;
    }
}

@media (max-width: 480px) {
    .contact-title {
        font-size: 1.4rem;
    }

    .form-group label {
        font-size: 0.8rem;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 0.8rem;
        padding: 8px;
    }
}

/* Hide scrollbar but allow scrolling if needed */
.contact-section::-webkit-scrollbar {
    display: none;
}

.contact-section {
    -ms-overflow-style: none;
    scrollbar-width: none;
}