/* ===========================================
   함께하기 페이지 전용 스타일
   NextE&M Connect Page
   =========================================== */

/* === 애니메이션 === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* === 컨테이너 === */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 2rem;
    animation: fadeIn 0.8s ease-out;
}

/* === 카드 디자인 통일 === */
.contact-form-section,
.contact-info-section {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    border: 1px solid #e2e8f0;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* 상단 색상바 - material-card와 동일한 슬라이딩 방식 */
.contact-form-section::before,
.contact-info-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, rgba(0, 51, 153, 0.5), rgba(0, 153, 68, 0.5));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

/* 호버 효과 */
.contact-form-section:hover,
.contact-info-section:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 51, 153, 0.15);
}

.contact-form-section:hover::before,
.contact-info-section:hover::before {
    transform: scaleX(1);
}

/* 애니메이션 적용 */
.contact-form-section {
    animation: fadeInLeft 0.8s ease-out;
}

.contact-info-section {
    animation: fadeInRight 0.8s ease-out;
}

/* === 폼 디자인 개선 === */
.contact-form {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.contact-form input,
.contact-form textarea {
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.contact-form input:focus,
.contact-form textarea:focus {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 51, 153, 0.1);
    transform: translateY(-2px);
}

/* Submit 버튼 - tech-page 필터 버튼 스타일 */
.submit-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 51, 153, 0.3);
    display: inline-block;
    margin-top: 1rem;
    align-self: flex-start;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 51, 153, 0.4);
}

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

/* === 회사 정보 개선 === */
.company-info {
    padding: 2rem;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border-radius: 15px;
    border: 1px solid #e2e8f0;
}

.company-info ul {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.2rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.company-info li {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: clamp(0.9rem, 1.5vw + 0.3rem, 1rem);
    line-height: 1.6;
}

.company-info li strong {
    color: var(--primary-color);
    font-weight: 600;
    font-size: clamp(0.85rem, 1.5vw + 0.2rem, 0.95rem);
    display: block;
    margin-bottom: 0.25rem;
}

.company-info li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* === 회사 정보 별도 섹션 === */
.company-info-section {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.company-info-section h2 {
    text-align: center;
    font-size: clamp(1.75rem, 4vw + 0.5rem, 2.5rem);
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.info-card {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 2rem;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    border-color: var(--primary-color);
}

.info-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 51, 153, 0.2);
    flex-shrink: 0;
}

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

.info-content {
    flex: 1;
}

.info-content h3 {
    font-size: clamp(0.9rem, 1.5vw + 0.3rem, 1rem);
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
    line-height: 1.2;
}

.info-card p {
    font-size: clamp(0.85rem, 1.5vw + 0.2rem, 0.95rem);
    color: #5a6c7d;
    line-height: 1.6;
    margin: 0;
}

/* 지도 아래 길찾기 버튼 */
.map-direction-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    padding: 1rem 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 51, 153, 0.3);
    align-self: flex-start;
}

.map-direction-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 51, 153, 0.4);
    color: white;
}

.map-direction-link svg {
    transition: transform 0.3s ease;
}

.map-direction-link:hover svg {
    transform: translate(2px, -2px);
}

/* 각 카드별 아이콘 색상 */
.info-card:nth-child(1) .info-icon {
    background: linear-gradient(135deg, #003399, #0066CC);
}

.info-card:nth-child(2) .info-icon {
    background: linear-gradient(135deg, #009944, #00CC55);
}

.info-card:nth-child(3) .info-icon {
    background: linear-gradient(135deg, #0066CC, #0099FF);
}

.info-card:nth-child(4) .info-icon {
    background: linear-gradient(135deg, #00CC55, #009944);
}

/* === 지도 섹션 레이아웃 === */
.map-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* === 맵 컨테이너 개선 === */
.map-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    flex: 1;
}

.map-container:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

/* === 성공/에러 메시지 === */
.success-message,
.error-message {
    padding: 1rem 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    animation: slideDown 0.5s ease-out;
}

.success-message {
    position: relative;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.message-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.message-content p {
    margin: 0;
    flex: 1;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.close-btn:active {
    background-color: rgba(255, 255, 255, 0.3);
}

.close-btn svg {
    width: 20px;
    height: 20px;
}

.error-message {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

/* === 반응형 디자인 === */
@media (max-width: 900px) {
    .contact-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-form-section,
    .contact-info-section {
        padding: 2.5rem;
    }
}

@media (max-width: 600px) {
    .contact-form-section,
    .contact-info-section {
        padding: 2rem;
    }
    
    .company-info {
        padding: 1.5rem;
    }
    
    .company-info li {
        padding: 1.2rem;
    }
    
    .submit-btn {
        width: 100%;
        text-align: center;
    }
}