/**
 * Contact Home Block — Premium Light Redesign
 * Style: Airy, Technological, Modern
 */

.contact-home-block-premium {
    position: relative !important;
    padding: 10rem 0 !important;
    background: #F8FAFC !important;
    /* Soft White */
    color: #1A1A2E !important;
    overflow: hidden !important;
    width: 100% !important;
    margin: 0 !important;
    display: block !important;
}

/* === BACKGROUND SYSTEM === */
.contact-bg-system {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.contact-grid-overlay {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(rgba(26, 26, 46, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 26, 46, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
}

.contact-grain-overlay {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    opacity: 0.04;
    mix-blend-mode: multiply;
}

.contact-glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.12;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #EC4899 0%, transparent 70%);
    top: -10%;
    right: -5%;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #3B82F6 0%, transparent 70%);
    bottom: -5%;
    left: -5%;
}

/* === SVG CONNECTIONS === */
.contact-svg-connections {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0.3;
}

.contact-svg-connections svg {
    width: 100%;
    height: 100%;
}

/* === CONTAINER === */
.contact-home-container {
    max-width: 900px !important;
    margin: 0 auto !important;
    padding: 0 3rem !important;
    position: relative;
    z-index: 10;
}

/* === HEADER === */
.contact-home-header {
    text-align: center;
    margin-bottom: 5rem;
}

.contact-home-top-title {
    font-family: 'Montserrat', sans-serif !important;
    font-size: clamp(2.25rem, 5vw, 3.8rem) !important;
    font-weight: 950 !important;
    line-height: 1.05 !important;
    color: #1A1A2E !important;
    text-transform: uppercase !important;
    letter-spacing: -0.05em !important;
    margin-bottom: 2rem;
}

.contact-home-top-title .highlight-text {
    background: linear-gradient(135deg, #EC4899, #8B5CF6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.contact-home-top-desc {
    font-family: 'Inter', sans-serif !important;
    font-size: 1.15rem !important;
    line-height: 1.7 !important;
    color: rgba(26, 26, 46, 0.7) !important;
    max-width: 600px;
    margin: 0 auto;
}

.contact-header-line {
    width: 60px;
    height: 4px;
    background: #EC4899;
    margin: 2rem auto 0;
    border-radius: 2px;
}

/* === FORM CARD === */
.contact-home-card-premium {
    background: #FFFFFF;
    padding: 5rem 4rem;
    border-radius: 40px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.06);
    position: relative;
    /* Removed overflow: hidden to allow custom dropdown to be visible */
}

.contact-home-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    background: linear-gradient(90deg, #EC4899, #8B5CF6, #3B82F6);
}

/* === FORM GROUPS === */
.form-row-premium {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .form-row-premium {
        grid-template-columns: 1fr 1fr;
    }

    .form-row-premium:has(textarea),
    .form-row-premium:has(select),
    .form-row-premium:has(input[name="phone"]) {
        grid-template-columns: 1fr;
    }
}

/* Ensure the row containing the open custom select stays on top */
.form-row-premium:has(.custom-select-wrapper.open) {
    z-index: 100;
    position: relative;
}

.form-group-premium {
    position: relative;
}

.floating-label {
    position: absolute;
    left: 1.25rem;
    top: 1.15rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    color: rgba(26, 26, 46, 0.4);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.2, 1, 0.3, 1);
}

.form-group-premium input,
.form-group-premium select,
.form-group-premium textarea {
    width: 100% !important;
    padding: 1.15rem 1.25rem !important;
    background: #F8FAFC !important;
    border: 1.5px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 16px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 1rem !important;
    color: #1A1A2E !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    appearance: none !important;
}

.form-group-premium select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%231A1A2E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1.25rem center !important;
    background-size: 1.2rem !important;
    min-height: 58px;
    /* Ensure consistent height */
}

/* === CUSTOM SELECT UI === */
.custom-select-wrapper {
    position: relative;
    user-select: none;
    z-index: 50;
    /* Above other form groups */
}

.custom-select-trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100% !important;
    padding: 1.15rem 1.25rem !important;
    background: #F8FAFC !important;
    border: 1.5px solid rgba(0, 0, 0, 0.05) !important;
    border-radius: 16px !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 1rem !important;
    color: #1A1A2E !important;
    transition: all 0.3s ease !important;
    cursor: pointer;
    min-height: 58px;
}

.custom-select-wrapper.open .custom-select-trigger {
    border-color: #EC4899 !important;
    background: #FFFFFF !important;
    box-shadow: 0 10px 20px rgba(236, 72, 153, 0.05) !important;
    /* Maintain border radius for a "floating" feel */
    border-radius: 16px !important;
}

.custom-options {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    background: #FFFFFF !important;
    /* Force solid white */
    border: 1.5px solid #EC4899;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
    z-index: 9999 !important;
    /* Extremely high */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.2, 1, 0.3, 1);
    overflow: hidden;
}

.custom-select-wrapper.open .custom-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-option {
    padding: 0.9rem 1.25rem;
    /* Slightly reduced padding */
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 1rem;
    color: #1A1A2E;
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
}

.custom-option:last-child {
    border-bottom: none;
}

.custom-option:hover {
    background: #FDF2F8;
    color: #EC4899;
    padding-left: 1.5rem;
}

.custom-option.selected {
    background: #FDF2F8;
    color: #EC4899;
    font-weight: 600;
}

.custom-arrow {
    transition: transform 0.3s ease;
}

.custom-select-wrapper.open .custom-arrow {
    transform: rotate(180deg);
}

/* Floating Label adjust for custom select */
.form-group-premium:has(.custom-select-wrapper) .floating-label {
    top: 1.15rem;
}

.custom-select-wrapper.open+.floating-label,
.custom-select-wrapper.has-value+.floating-label {
    transform: translateY(-2.8rem) scale(0.85) !important;
    left: 0.5rem !important;
    color: #EC4899 !important;
}

/* Floating Label Logic */
.form-group-premium input:focus+.floating-label,
.form-group-premium input:not(:placeholder-shown)+.floating-label,
.form-group-premium select:focus+.floating-label,
.form-group-premium select:not([value=""])+.floating-label,
.form-group-premium textarea:focus+.floating-label,
.form-group-premium textarea:not(:placeholder-shown)+.floating-label {
    transform: translateY(-2.8rem) scale(0.85);
    left: 0.5rem;
    color: #EC4899;
}

.form-group-premium input:focus,
.form-group-premium select:focus,
.form-group-premium textarea:focus {
    border-color: #EC4899 !important;
    background: #FFFFFF !important;
    box-shadow: 0 10px 20px rgba(236, 72, 153, 0.05) !important;
}

/* === PRIVACY === */
.form-privacy-premium {
    margin: 2.5rem 0;
}

.privacy-label-premium {
    display: flex;
    gap: 1rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: rgba(26, 26, 46, 0.6);
    line-height: 1.6;
}

.privacy-label-premium input {
    display: none;
}

.checkbox-box {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-radius: 6px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
}

.privacy-label-premium input:checked+.checkbox-box {
    background: #EC4899;
    border-color: #EC4899;
}

.privacy-label-premium input:checked+.checkbox-box::after {
    content: '✓';
    position: absolute;
    color: white;
    font-size: 12px;
    font-weight: bold;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}

.privacy-text a {
    color: #1A1A2E;
    font-weight: 600;
    text-decoration: underline;
}

/* === SUBMIT BUTTON === */
.form-submit-row-premium {
    margin-bottom: 2rem;
}

.contact-home-submit-btn {
    width: 100%;
    padding: 1.25rem;
    background: #1A1A2E;
    color: white !important;
    border: none;
    border-radius: 18px;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 800 !important;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.2, 1, 0.3, 1);
    box-shadow: 0 15px 30px rgba(26, 26, 46, 0.15);
}

.contact-home-submit-btn:hover {
    background: #EC4899;
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(236, 72, 153, 0.3);
}

.btn-icon {
    transition: transform 0.3s ease;
}

.contact-home-submit-btn:hover .btn-icon {
    transform: translate(3px, -3px);
}

/* === DISCLAIMER === */
.form-disclaimer-premium {
    font-size: 0.75rem;
    line-height: 1.6;
    color: rgba(26, 26, 46, 0.4);
    text-align: center;
    margin: 0;
}

/* === MESSAGES === */
.form-message-premium {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    display: none;
}

.form-message-premium.success {
    display: block;
    background: #FDF2F8;
    /* Soft Pink / Brand alignment */
    color: #EC4899;
    /* Magenta Pink */
}

.form-message-premium.error {
    display: block;
    background: #fef2f2;
    color: #dc2626;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .contact-home-block-premium {
        padding: 6rem 0 !important;
    }

    .contact-home-card-premium {
        padding: 3rem 2rem;
    }

    .contact-home-top-title {
        font-size: 2.5rem !important;
    }
}