/* Contact page specific styles */

/* Disable transitions on page load to prevent animation */
.contact-page-loading * {
    transition: none !important;
    animation: none !important;
}

/* Contact Form Section */
.contact-form-section {
    padding: 40px 0 96px;
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-form-section.form-active {
    display: block;
    align-items: unset;
    justify-content: unset;
    padding: 20px 0 96px;
}

.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    width: 100%;
}

.section-title {
    font-size: 32px;
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: 1.5px;
    text-align: center;
    margin-bottom: 48px;
    color: #1a1c1e;
    text-transform: uppercase;
}

/* Department Selection Card */
.department-selection-card {
    background: transparent;
    border-radius: 16px;
    padding: 48px;
    box-shadow: none;
    border: none;
    margin-bottom: 32px;
    transition: all 0.3s ease;
}

.department-selection-card.has-selection {
    background: rgba(254, 251, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.3), 0px 2px 6px 2px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0,0,0,0.08);
}


.department-selection-card .form-section-title {
    margin-bottom: 32px;
    text-align: center;
}

/* Contact Type Selection */
.contact-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
    margin-bottom: 0;
}

.contact-type-card {
    background: rgba(254, 251, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.3), 0px 2px 6px 2px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0,0,0,0.08);
    cursor: pointer;
    position: relative;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.contact-type-card:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-2px);
    box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.2), 0px 6px 20px 4px rgba(0, 0, 0, 0.1);
    border-color: rgba(0,0,0,0.15);
}

.contact-type-card.active {
    background: rgba(255, 255, 255, 1);
    border: 3px solid #3498db;
    box-shadow: 0px 4px 8px 0px rgba(52, 152, 219, 0.3), 0px 6px 20px 4px rgba(52, 152, 219, 0.15);
    opacity: 1;
    pointer-events: none;
    cursor: default;
}

.contact-type-card.active:hover {
    background: rgba(255, 255, 255, 1);
    transform: none;
    box-shadow: 0px 4px 8px 0px rgba(52, 152, 219, 0.3), 0px 6px 20px 4px rgba(52, 152, 219, 0.15);
    border: 3px solid #3498db;
}

.contact-type-icon {
    width: 72px;
    height: 72px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: white;
    box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.3), 0px 2px 6px 2px rgba(0, 0, 0, 0.15);
}

.sales-card .contact-type-icon {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.support-card .contact-type-icon {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.contact-type-icon .icon {
    width: 48px;
    height: 48px;
}

.contact-type-card h3 {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 12px;
    color: #1a1c1e;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.contact-type-card p {
    font-size: 16px;
    font-weight: bold;
    color: #44474f;
    margin-bottom: 16px;
    line-height: 1.4;
    letter-spacing: 1px;
}

/* Selected Contact Type Display */
.contact-type-selected {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 0;
    padding: 0 10%;
}

.selected-type-card {
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(254, 251, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 12px;
    padding: 16px 24px;
    flex: 1;
    box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.2), 0px 1px 3px 1px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.3s ease;
}

.selected-type-card.active {
    background: rgba(255, 255, 255, 1);
    border: 3px solid #3498db;
    box-shadow: 0px 4px 8px 0px rgba(52, 152, 219, 0.3), 0px 6px 20px 4px rgba(52, 152, 219, 0.15);
    opacity: 1;
}

.selected-type-card:hover:not(.active) {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
    box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.25), 0px 2px 6px 2px rgba(0, 0, 0, 0.15);
    border-color: rgba(0,0,0,0.15);
}

.selected-type-card.active:hover {
    background: rgba(255, 255, 255, 1);
    transform: none;
    box-shadow: 0px 4px 8px 0px rgba(52, 152, 219, 0.3), 0px 6px 20px 4px rgba(52, 152, 219, 0.15);
    border: 3px solid #3498db;
}

.selected-type-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: white;
    box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.2), 0px 1px 3px 1px rgba(0, 0, 0, 0.1);
}

.sales-selected .selected-type-icon {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
}

.support-selected .selected-type-icon {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

.selected-type-icon .icon {
    width: 24px;
    height: 24px;
}

.selected-type-name {
    font-size: 16px;
    font-weight: bold;
    color: #1a1c1e;
    letter-spacing: 1px;
    text-transform: uppercase;
}


/* Contact Form Container */
.contact-form-container {
    background: rgba(254, 251, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 16px;
    padding: 48px;
    box-shadow: 0px 1px 2px 0px rgba(0, 0, 0, 0.3), 0px 2px 6px 2px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0,0,0,0.08);
    position: relative;
}

/* Form Sections */
.form-section {
    margin-bottom: 48px;
}

.form-section-title {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 24px;
    color: #1a1c1e;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

.contact-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.single-column-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.form-group {
    position: relative;
}

/* Only add margin to form groups not inside grids */
.form-section > .form-group:not(.contact-info-grid .form-group):not(.single-column-grid .form-group) {
    margin-bottom: 16px;
}

/* Input Styling - base styles inherited from forms.css */

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 16px 16px 68px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    font-weight: bold;
    font-family: 'Oswald', Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: #ffffff;
    color: #333333;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(51, 51, 51, 0.6);
    font-weight: bold;
    text-transform: uppercase;
    padding-left: 0px;
}

.form-group textarea {
    resize: vertical;
    height: 120px;
    line-height: 1.4;
    overflow: hidden;
}

.form-group textarea::-webkit-resizer {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666666'%3e%3cpath d='M7 10l5-5 5 5z'/%3e%3cpath d='M7 14l5 5 5-5z'/%3e%3c/svg%3e");
    background-size: 18px 18px;
    background-repeat: no-repeat;
    background-position: center;
    width: 40px;
    height: 40px;
    padding: 8px;
    margin-right: 4px;
    margin-bottom: 4px;
}

.form-group textarea::-moz-resizer {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23666666'%3e%3cpath d='M7 10l5-5 5 5z'/%3e%3cpath d='M7 14l5 5 5-5z'/%3e%3c/svg%3e");
    background-size: 18px 18px;
    background-repeat: no-repeat;
    background-position: center;
    width: 40px;
    height: 40px;
    padding: 8px;
    margin-right: 4px;
    margin-bottom: 4px;
}


/* Hide number input spinner arrows */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* Prevent browser autofill background color changes */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus,
.form-group input:-webkit-autofill:active,
.form-group textarea:-webkit-autofill,
.form-group textarea:-webkit-autofill:hover,
.form-group textarea:-webkit-autofill:focus,
.form-group textarea:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: #333333 !important;
    background-color: #ffffff !important;
    background: #ffffff !important;
}

/* Firefox autofill prevention */
.form-group input:-moz-autofill,
.form-group textarea:-moz-autofill {
    background-color: #ffffff !important;
    background: #ffffff !important;
}

/* Dynamic placeholder centering based on textarea height */
.form-group textarea:not(:focus)::placeholder {
    line-height: var(--placeholder-line-height, 5.5);
}

/* Hide placeholder on focus and when typing */
.form-group textarea:focus::placeholder {
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Dynamic placeholder repositioning with ResizeObserver fallback */
.form-group textarea {
    position: relative;
}

/* Field Label */
.field-label {
    display: block;
    font-size: 14px;
    font-weight: bold;
    color: #1a1c1e;
    margin-top: 20px;
    margin-bottom: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Radio Group */
.radio-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}


.radio-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    margin: 0 12px 0 0;
    padding: 0;
    border: 2px solid #cccccc;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.radio-option label {
    font-size: 14px;
    font-weight: bold;
    color: #1a1c1e;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.radio-option input[type="radio"]:checked {
    background: #3498db;
}

.radio-option input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ffffff;
    transform: translate(-50%, -50%);
}

.radio-option input[type="radio"]:checked + label {
    color: #3498db;
}

/* Conditional Fields */
.conditional-fields {
    transition: all 0.3s ease;
}

/* Form Actions */
.form-actions {
    text-align: right;
    margin-top: 48px;
}

/* Loading State - Full viewport centered */
.loading-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fefbff;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

/* Success States (kept for backwards compatibility) */
.success-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    margin-top: 16px;
    font-size: 16px;
    font-weight: bold;
    color: #44474f;
    text-transform: uppercase;
}

.success-icon {
    width: 96px;
    height: 96px;
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px;
    color: white;
    box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.15);
}

.success-icon .icon {
    width: 64px;
    height: 64px;
}

.success-title {
    font-size: 48px;
    font-weight: bold;
    margin: 16px 0;
    color: #1a1c1e;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1;
}

.success-text {
    font-size: 20px;
    color: #44474f;
    margin: 24px 0 48px 0;
    line-height: 1.5;
    font-weight: 500;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Success page button group */
.success-message-card .button-group {
    display: flex;
    gap: 16px;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.success-message-card .return-home-btn,
.success-message-card .back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #3498db;
    color: white;
    padding: 16px 32px;
    text-decoration: none;
    border: none;
    border-radius: 8px;
    font-family: 'Oswald', Arial, sans-serif;
    font-weight: 500;
    font-size: 18px;
    text-transform: uppercase;
    line-height: 1;
    height: 60px;
    width: calc(50% - 8px);
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.15);
}

.success-message-card .return-home-btn:hover,
.success-message-card .back-btn:hover {
    background: #64b5f6;
    transform: translateY(-2px);
    box-shadow: 0px 4px 8px 0px rgba(0, 0, 0, 0.2);
}

.success-message-card .return-home-btn .icon,
.success-message-card .back-btn .icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Success Message Card (separate from form) - Full viewport centered */
.success-message-card {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fefbff;
    width: 100vw;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.success-content {
    background: #ffffff;
    border-radius: 16px;
    padding: 48px 32px;
    box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.12);
    text-align: center;
    max-width: 800px;
    width: 90%;
    position: relative;
    transform: none;
}

/* Responsive Design */
@media (max-width: 905px) {
    .contact-form-section {
        padding: 40px 0 64px;
    }
    
    .contact-form-section.form-active {
        display: block;
        padding: 20px 0 64px;
    }
    
    .section-title {
        font-size: 28px;
        margin-bottom: 24px;
    }
    
    .department-selection-card {
        padding: 32px;
    }
    
    .department-selection-card .form-section-title {
        margin-bottom: 24px;
    }
    
    .contact-form-container {
        padding: 32px;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info-grid {
        grid-template-columns: 1fr;
    }
    
    .radio-group {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .contact-container {
        padding: 0 16px;
    }
    
    .contact-form-section {
        padding: 32px 0 48px;
    }
    
    .contact-form-section.form-active {
        display: block;
        padding: 15px 0 48px;
    }
    
    .section-title {
        font-size: 24px;
        margin-bottom: 20px;
    }
    
    .department-selection-card {
        padding: 24px;
    }
    
    .department-selection-card .form-section-title {
        margin-bottom: 20px;
    }
    
    .contact-form-container {
        padding: 24px;
    }
    
    .contact-type-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .contact-type-card {
        padding: 24px;
    }
    
    .form-section {
        margin-bottom: 32px;
    }
    
    .success-content {
        padding: 32px 24px;
        width: 95%;
    }
    
    .success-icon {
        width: 80px;
        height: 80px;
        margin-bottom: 24px;
    }
    
    .success-icon .icon {
        width: 48px;
        height: 48px;
    }
    
    .success-title {
        font-size: 36px;
    }
    
    .success-text {
        font-size: 18px;
        margin: 20px 0 36px 0;
    }
    
    .success-message-card .button-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .success-message-card .return-home-btn,
    .success-message-card .back-btn {
        width: 100%;
        padding: 14px 24px;
        font-size: 15px;
    }
}

/* Accessibility and Motion Preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .contact-type-card,
    .contact-form-container {
        border-width: 2px;
    }
    
    .form-group input,
    .form-group textarea,
    .radio-option {
        border-width: 2px;
    }
}