/* ============================================
   Sasha Hui｜鋅鋰師馬麻 - 合作洽詢頁面
   Brand Color: #E16B8C
   ============================================ */

:root {
    /* Brand Colors */
    --primary: #E16B8C;
    --primary-light: #F19CAD;
    --primary-dark: #C4526E;
    --primary-gradient: linear-gradient(135deg, #E16B8C 0%, #F19CAD 50%, #E16B8C 100%);

    /* Neutral Colors */
    --white: #FFFFFF;
    --cream: #FFF9F5;
    --gray-50: #FAF8F7;
    --gray-100: #F5F0ED;
    --gray-200: #E8E0DC;
    --gray-300: #D4C9C3;
    --gray-400: #A89B94;
    --gray-500: #7D736C;
    --gray-600: #5C544F;
    --gray-700: #3D3835;
    --gray-800: #2A2624;
    --gray-900: #1A1716;

    /* Functional Colors */
    --success: #4CAF50;
    --error: #E53935;
    --warning: #FFC107;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(225, 107, 140, 0.08);
    --shadow-md: 0 8px 24px rgba(225, 107, 140, 0.12);
    --shadow-lg: 0 16px 48px rgba(225, 107, 140, 0.16);
    --shadow-glow: 0 0 40px rgba(225, 107, 140, 0.3);

    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.5);

    /* Typography */
    --font-family: 'Noto Sans TC', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Spacing */
    --container-max: 640px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background: var(--cream);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Animated Background */
.bg-gradient {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            var(--cream) 0%,
            #FFF0F3 25%,
            #FFE8ED 50%,
            #FFF0F3 75%,
            var(--cream) 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    z-index: -2;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* Floating Shapes */
.floating-shapes {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.05;
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 300px;
    height: 300px;
    bottom: 20%;
    left: -80px;
    animation-delay: -5s;
}

.shape-3 {
    width: 200px;
    height: 200px;
    top: 40%;
    right: 10%;
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(20px, -20px) rotate(5deg);
    }

    50% {
        transform: translate(-10px, 20px) rotate(-5deg);
    }

    75% {
        transform: translate(-20px, -10px) rotate(3deg);
    }
}

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 40px 20px;
    position: relative;
}

/* Glass Card */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

/* ============================================
   Header / Profile Section
   ============================================ */
.header {
    margin-bottom: 32px;
}

.profile-card {
    padding: 32px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.profile-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: var(--primary-gradient);
    opacity: 0.1;
}

.avatar-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 20px;
}

.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
    box-shadow: var(--shadow-glow);
}

.avatar-text {
    font-size: 32px;
    font-weight: 700;
    color: var(--white);
    letter-spacing: 2px;
}

.avatar-glow {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.2;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 0.2;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.1;
    }
}

.profile-info {
    position: relative;
    z-index: 1;
}

.name {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--primary-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title {
    font-size: 16px;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 4px;
}

.subtitle {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 16px;
}

.company-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: var(--gray-100);
    border-radius: var(--radius-lg);
    font-size: 13px;
    color: var(--gray-600);
}

.company-badge .icon {
    width: 16px;
    height: 16px;
    color: var(--primary);
}

/* Avatar Image */
.avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 50%;
}

/* Inline Contact Links in Profile Card */
.contact-links-inline {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 16px;
}

.email-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--gray-600);
    font-size: 13px;
    transition: all var(--transition-fast);
}

.email-link:hover {
    background: rgba(225, 107, 140, 0.1);
    color: var(--primary);
}

.email-link svg {
    width: 16px;
    height: 16px;
    color: var(--primary);
    flex-shrink: 0;
}

.email-link span {
    word-break: break-all;
}

/* ============================================
   Form Section
   ============================================ */
.form-section {
    margin-bottom: 24px;
}

.section-header {
    text-align: center;
    margin-bottom: 24px;
}

.section-header h2 {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 22px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.section-header h2 .icon {
    width: 24px;
    height: 24px;
    color: var(--primary);
}

.section-desc {
    font-size: 14px;
    color: var(--gray-500);
}

.contact-form {
    padding: 32px;
}

/* Form Groups */
.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-label.required::after {
    content: ' *';
    color: var(--primary);
}

/* Text Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    font-family: inherit;
    color: var(--gray-800);
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    outline: none;
}

input[type="date"] {
    min-height: 52px;
    /* Ensure sufficient height on mobile */
    -webkit-appearance: none;
    /* Reset iOS styling */
    appearance: none;
    position: relative;
    line-height: 1.2;
}

input::placeholder,
textarea::placeholder {
    color: var(--gray-400);
}

input:hover,
textarea:hover {
    border-color: var(--gray-300);
}

input:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(225, 107, 140, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

/* Date Range */
.date-range {
    display: flex;
    align-items: flex-end;
    gap: 12px;
}

.date-input-wrapper {
    flex: 1;
}

.date-label {
    display: block;
    font-size: 12px;
    color: var(--gray-500);
    margin-bottom: 6px;
}

.date-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 48px;
    color: var(--gray-400);
}

.date-separator svg {
    width: 20px;
    height: 20px;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkbox-category {
    background: var(--gray-50);
    border-radius: var(--radius-md);
    padding: 4px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast);
}

.checkbox-item:hover {
    background: rgba(225, 107, 140, 0.05);
}

.checkbox-item input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 22px;
    height: 22px;
    border: 2px solid var(--gray-300);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    flex-shrink: 0;
}

.checkmark::after {
    content: '';
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 3px;
    transform: scale(0);
    transition: transform var(--transition-fast);
}

.checkbox-item input:checked+.checkmark {
    border-color: var(--primary);
    background: rgba(225, 107, 140, 0.1);
}

.checkbox-item input:checked+.checkmark::after {
    transform: scale(1);
}

.label-text {
    font-size: 15px;
    color: var(--gray-700);
}

.category-header .label-text {
    font-weight: 600;
}

.sub-options {
    padding-left: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
}

.sub-options.active {
    max-height: 300px;
}

.sub-item {
    padding: 10px 16px;
}

.sub-item .label-text {
    font-size: 14px;
    color: var(--gray-600);
}

/* File Upload */
.file-upload {
    position: relative;
}

.file-upload input[type="file"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.file-upload-content {
    padding: 24px;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-md);
    text-align: center;
    transition: all var(--transition-fast);
    background: var(--white);
}

.file-upload:hover .file-upload-content {
    border-color: var(--primary);
    background: rgba(225, 107, 140, 0.02);
}

.file-upload.has-file .file-upload-content {
    border-color: var(--primary);
    border-style: solid;
    background: rgba(225, 107, 140, 0.05);
}

.upload-icon {
    width: 32px;
    height: 32px;
    color: var(--gray-400);
    margin-bottom: 8px;
}

.upload-text {
    display: block;
    font-size: 14px;
    color: var(--gray-500);
}

.file-name {
    display: none;
    font-size: 14px;
    color: var(--primary);
    font-weight: 500;
    margin-top: 8px;
}

.file-upload.has-file .upload-text {
    display: none;
}

.file-upload.has-file .file-name {
    display: block;
}

.form-hint {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 8px;
}

/* Attachment Hint */
.attachment-hint {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    font-size: 13px;
    color: var(--gray-600);
    border: 1px dashed var(--gray-300);
}

.attachment-hint svg {
    width: 18px;
    height: 18px;
    color: var(--primary);
    flex-shrink: 0;
}

.attachment-hint a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.attachment-hint a:hover {
    text-decoration: underline;
}

/* Form Divider */
.form-divider {
    display: flex;
    align-items: center;
    margin: 32px 0;
}

.form-divider::before,
.form-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.form-divider span {
    padding: 0 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-500);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Submit Button */
.submit-btn {
    width: 100%;
    padding: 16px 32px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    color: var(--white);
    background: var(--primary-gradient);
    background-size: 200% auto;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.submit-btn:hover {
    background-position: right center;
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn .btn-icon {
    width: 20px;
    height: 20px;
}

.submit-btn .btn-loading {
    display: none;
}

.submit-btn.loading .btn-text,
.submit-btn.loading .btn-icon {
    display: none;
}

.submit-btn.loading .btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

.spinner circle {
    stroke-dasharray: 50;
    stroke-dashoffset: 20;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   Contact Info Section
   ============================================ */
.contact-info {
    padding: 24px;
    margin-bottom: 24px;
}

.contact-info h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 16px;
    text-align: center;
}

.contact-links {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: var(--gray-50);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--gray-700);
    transition: all var(--transition-fast);
}

.contact-link:hover {
    background: rgba(225, 107, 140, 0.1);
    color: var(--primary);
}

.contact-link svg {
    width: 20px;
    height: 20px;
    color: var(--primary);
    flex-shrink: 0;
}

.contact-link span {
    font-size: 14px;
    word-break: break-all;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    text-align: center;
    padding: 24px 0;
}

.footer p {
    font-size: 13px;
    color: var(--gray-500);
}

.footer-sub {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 4px;
}

/* ============================================
   Modal
   ============================================ */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-normal);
    padding: 20px;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    max-width: 400px;
    width: 100%;
    padding: 40px 32px;
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: transform var(--transition-normal);
}

.modal-overlay.active .modal {
    transform: scale(1) translateY(0);
}

.modal-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-icon.success {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
    box-shadow: 0 8px 24px rgba(76, 175, 80, 0.3);
}

.modal-icon svg {
    width: 36px;
    height: 36px;
    color: var(--white);
}

.modal h3 {
    font-size: 22px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 12px;
}

.modal p {
    font-size: 15px;
    color: var(--gray-600);
    margin-bottom: 24px;
    line-height: 1.6;
}

.modal-btn {
    padding: 14px 40px;
    font-size: 15px;
    font-weight: 600;
    font-family: inherit;
    color: var(--white);
    background: var(--primary);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-btn:hover {
    background: var(--primary-dark);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 640px) {
    .container {
        padding: 24px 16px;
    }

    .profile-card {
        padding: 24px 20px;
    }

    .name {
        font-size: 20px;
    }

    .title {
        font-size: 14px;
    }

    .contact-form {
        padding: 24px 20px;
    }

    .date-range {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .date-separator {
        transform: rotate(90deg);
        height: auto;
    }

    .submit-btn {
        padding: 14px 24px;
    }
}

@media (max-width: 480px) {
    .avatar {
        width: 80px;
        height: 80px;
    }

    .avatar-text {
        font-size: 24px;
    }

    .company-badge {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* ============================================
   Accessibility
   ============================================ */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(225, 107, 140, 0.3);
}