/**
 * Civil Marriage Form Styles
 * Inspired by Utah Marriage Online design
 * Clean white background, professional appearance
 */

/* Container and Layout */
.mas-civil-form-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    min-height: 100vh;
    direction: rtl;
    color: #333;
    line-height: 1.6;
}

/* Header Section - Clean Utah Marriage Online style */
.mas-civil-header {
    background: #ffffff;
    color: #111827;
    padding: 40px 20px;
    text-align: center;
    border-bottom: 1px solid #e5e7eb;
}

.mas-civil-hero {
    max-width: 600px;
    margin: 0 auto;
}

.mas-civil-logo {
    width: 60px;
    height: auto;
    margin-bottom: 20px;
    filter: none;
}

.mas-civil-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #111827;
}

.mas-civil-subtitle {
    font-size: 1rem;
    margin: 0;
    color: #6B7280;
    font-weight: 400;
}

/* Progress Indicator */
.mas-progress-container {
    background: #ffffff;
    padding: 30px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.mas-progress-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 800px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 10px;
}

.mas-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    opacity: 0.5;
    transition: all 0.3s ease;
    min-width: 120px;
}

.mas-progress-step.active {
    opacity: 1;
}

.mas-progress-step.current .mas-step-number {
    background: #4F46E5;
    color: white;
    box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
}

.mas-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.mas-progress-step.active .mas-step-number {
    background: #4F46E5;
    color: white;
}

.mas-step-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #6c757d;
}

.mas-progress-step.active .mas-step-name {
    color: #333;
}

.mas-progress-line {
    flex: 1;
    height: 2px;
    background: #e9ecef;
    margin: 0 10px;
    max-width: 100px;
    transition: all 0.3s ease;
}

.mas-progress-line.completed {
    background: #28a745;
}

/* Step Container */
.mas-step-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 20px;
    background: white;
}

.mas-step-content h2 {
    font-size: 2rem;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
    text-align: center;
}

.mas-step-description {
    text-align: center;
    color: #6c757d;
    font-size: 1.1rem;
    margin: 0 0 40px 0;
}

/* Form Styles */
.mas-form {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    border: 1px solid #e9ecef;
}

.mas-form-group {
    margin-bottom: 25px;
}

.mas-form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 1rem;
}

.mas-form input[type="text"],
.mas-form input[type="email"],
.mas-form input[type="date"],
.mas-form input[type="tel"],
.mas-form select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
    direction: ltr;
    text-align: left;
}

.mas-form input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.mas-form input::placeholder {
    color: #6c757d;
    font-style: italic;
    direction: rtl;
    text-align: right;
}

/* Checkbox Styles */
.mas-checkbox-group {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
    padding-right: 35px;
    margin-bottom: 15px;
}

.mas-checkbox-group input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    width: 0;
    height: 0;
}

.mas-checkmark {
    position: absolute;
    right: 0;
    top: 2px;
    height: 20px;
    width: 20px;
    background-color: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.mas-checkbox-group:hover .mas-checkmark {
    border-color: #667eea;
}

.mas-checkbox-group input:checked ~ .mas-checkmark {
    background-color: #667eea;
    border-color: #667eea;
}

.mas-checkmark:after {
    content: "";
    position: absolute;
    display: none;
    right: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.mas-checkbox-group input:checked ~ .mas-checkmark:after {
    display: block;
}

.mas-checkbox-text {
    font-weight: 500;
    color: #333;
    line-height: 1.4;
}

/* Radio Button Styles */
.mas-radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mas-radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
    background: #ffffff;
}

.mas-radio-option:hover {
    border-color: #667eea;
    background: #f8f9ff;
}

.mas-radio-option input[type="radio"] {
    margin-left: 12px;
    transform: scale(1.2);
    accent-color: #667eea;
}

.mas-radio-option input:checked {
    background: #667eea;
}

.mas-radio-option input:checked + .mas-radio-mark + span {
    font-weight: 600;
    color: #667eea;
}

/* Partners Container */
.mas-partners-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    margin-bottom: 30px;
}

@media (min-width: 768px) {
    .mas-partners-container {
        grid-template-columns: 1fr 1fr;
    }
}

.mas-partner-section {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.mas-partner-section h3 {
    margin: 0 0 25px 0;
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.mas-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

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

/* Button Styles */
.mas-form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    gap: 15px;
    flex-wrap: wrap;
}

.mas-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    min-width: 140px;
    justify-content: center;
}

.mas-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.mas-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.mas-btn-secondary {
    background: #ffffff;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.mas-btn-secondary:hover {
    background: #f8f9fa;
    border-color: #dee2e6;
    color: #495057;
}

.mas-btn-arrow {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Homepage CTA */
.mas-homepage-cta {
    text-align: center;
    margin: 40px 0;
}

.mas-cta-button {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 18px 35px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.mas-cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 25px rgba(102, 126, 234, 0.4);
    color: white;
    text-decoration: none;
}

/* Error Messages */
.mas-error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    margin-top: 20px;
    text-align: center;
    font-weight: 500;
}

.mas-success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
    margin-top: 20px;
    text-align: center;
    font-weight: 500;
}

/* Loading States */
.mas-loading {
    opacity: 0.6;
    pointer-events: none;
}

.mas-loading .mas-btn {
    position: relative;
}

.mas-loading .mas-btn::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: mas-spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .mas-civil-title {
        font-size: 2rem;
    }
    
    .mas-civil-subtitle {
        font-size: 1rem;
    }
    
    .mas-form {
        padding: 25px;
    }
    
    .mas-step-container {
        padding: 40px 15px;
    }
    
    .mas-progress-bar {
        flex-direction: column;
        gap: 20px;
    }
    
    .mas-progress-line {
        display: none;
    }
    
    .mas-form-actions {
        flex-direction: column;
    }
    
    .mas-btn {
        width: 100%;
    }
}

/* Accessibility */
.mas-form input:focus,
.mas-form button:focus,
.mas-checkbox-group:focus-within .mas-checkmark,
.mas-radio-option:focus-within {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Animation for smooth transitions */
.mas-step-container {
    animation: mas-fade-in 0.5s ease-out;
}

@keyframes mas-fade-in {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}