/* Contact Page Styles */
/* شناسه تغییر: CSS-CONTACT-001 */

/* Contact Page Wrapper - RTL Support */
.contact-page-wrapper {
    padding: 2rem 0 4rem;
    min-height: 60vh;
    direction: rtl;
    text-align: right;
}

/* Optimize Font Awesome loading */
.contact-page-wrapper i[class^="fa"],
.contact-page-wrapper i[class*=" fa-"] {
    font-display: swap;
    font-style: normal;
    font-weight: 400;
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free", "FontAwesome";
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.contact-page-content {
    max-width: 100%;
}

/* Contact Page Header */
.contact-page-header {
    text-align: center;
    margin-bottom: 3rem;
    direction: rtl;
}

.contact-page-title {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

.contact-page-excerpt {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
}

/* Contact Page Grid */
.contact-page-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

/* Contact Section Title */
.contact-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    direction: rtl;
    text-align: right;
}

.contact-section-title i {
    color: #FFB22C;
    font-size: 1.3rem;
}

/* Contact Form Section */
.contact-form-section {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Contact Messages */
.contact-message {
    padding: 1rem 1.5rem;
    border-radius: 6px;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.95rem;
}

.contact-message--success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.contact-message--error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.contact-message i {
    font-size: 1.2rem;
}

.contact-message p {
    margin: 0;
}

/* Contact Form */
.contact-form {
    width: 100%;
}

.contact-form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.contact-form-group {
    margin-bottom: 1.5rem;
}

.contact-form-group--submit {
    margin-bottom: 0;
    margin-top: 1rem;
}

.contact-form-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.contact-form-label .required {
    color: #dc3545;
    margin-right: 0.25rem;
    margin-left: 0;
}

.contact-form-input,
.contact-form-textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #fff;
    direction: rtl;
    text-align: right;
}

.contact-form-input:focus,
.contact-form-textarea:focus {
    outline: none;
    border-color: #FFB22C;
    box-shadow: 0 0 0 3px rgba(255, 178, 44, 0.1);
}

.contact-form-input::placeholder,
.contact-form-textarea::placeholder {
    direction: rtl;
    text-align: right;
    opacity: 0.7;
}

.contact-form-input.error,
.contact-form-textarea.error {
    border-color: #dc3545;
}

.contact-form-error {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
}

.contact-form-textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-form-submit {
    background: linear-gradient(135deg, #FFB22C 0%, #ff9f00 100%);
    color: #fff;
    border: none;
    padding: 1rem 2.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: inherit;
    direction: rtl;
    flex-direction: row-reverse;
    box-shadow: 0 2px 8px rgba(255, 178, 44, 0.3);
}

.contact-form-submit:hover {
    background: linear-gradient(135deg, #ff9f00 0%, #FFB22C 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 178, 44, 0.4);
}

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

.contact-form-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.contact-form-submit i {
    font-size: 0.9rem;
}

/* Contact Info Section */
.contact-info-section {
    background: #fff;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.contact-info-list {
    margin-bottom: 2rem;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid #eee;
    direction: rtl;
    flex-direction: row;
}

.contact-info-item:last-child {
    border-bottom: none;
}

.contact-info-icon {
    width: 40px;
    height: 40px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.contact-info-icon:hover {
    background: #fff;
    border-color: #FFB22C;
    transform: scale(1.05);
}

.contact-info-icon i {
    font-size: 1rem;
    color: #666;
    transition: color 0.3s ease;
}

.contact-info-icon:hover i {
    color: #FFB22C;
}

.contact-info-content {
    flex: 1;
    text-align: right;
    direction: rtl;
}

.contact-info-label {
    font-size: 0.9rem;
    color: #666;
    margin: 0 0 0.5rem 0;
    font-weight: 500;
}

.contact-info-value {
    font-size: 1.1rem;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    display: block;
    transition: color 0.3s ease;
}

.contact-info-value:hover {
    color: #FFB22C;
}

/* Contact Page Thumbnail */
.contact-page-thumbnail {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.contact-thumbnail-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Contact Page Content Text */
.contact-page-content-text {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    color: #555;
    line-height: 1.8;
}

.contact-page-content-text p {
    margin-bottom: 1rem;
}

.contact-page-content-text p:last-child {
    margin-bottom: 0;
}

/* Responsive Design - Tablet */
@media (min-width: 768px) {
    .contact-page-wrapper {
        padding: 3rem 0 5rem;
    }

    .contact-page-title {
        font-size: 2.5rem;
    }

    .contact-form-row {
        grid-template-columns: 1fr 1fr;
    }

    .contact-form-section,
    .contact-info-section {
        padding: 2.5rem;
    }
}

/* Responsive Design - Desktop */
@media (min-width: 1024px) {
    .contact-page-grid {
        grid-template-columns: 1fr 1.2fr;
        gap: 4rem;
    }

    .contact-page-title {
        font-size: 3rem;
    }

    .contact-section-title {
        font-size: 1.75rem;
    }
}

/* Additional RTL Support */
.contact-form {
    direction: rtl;
    text-align: right;
}

.contact-form-group {
    direction: rtl;
    text-align: right;
}

.contact-message {
    direction: rtl;
    text-align: right;
    flex-direction: row-reverse;
}

.contact-page-content-text {
    direction: rtl;
    text-align: right;
}

/* Contact Social Media */
.contact-social-media {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
    direction: rtl;
    text-align: right;
}

.contact-social-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 1.5rem;
    text-align: right;
}

.contact-social-links {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: flex-end;
    direction: rtl;
}

.contact-social-link {
    width: 55px;
    height: 55px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 50%;
    color: #FFB22C;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #FFB22C;
    box-shadow: 0 2px 8px rgba(255, 178, 44, 0.15);
    position: relative;
    overflow: hidden;
}

.contact-social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #FFB22C 0%, #ff9f00 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: 50%;
}

.contact-social-link:hover {
    color: #fff;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 20px rgba(255, 178, 44, 0.4);
    border-color: #ff9f00;
}

.contact-social-link:hover::before {
    opacity: 1;
}

.contact-social-link i,
.contact-social-link .social-icon-image {
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.contact-social-link:hover i {
    transform: scale(1.1) rotate(5deg);
}

.contact-social-link i {
    font-size: 1.5rem;
    font-weight: 400;
}

.contact-social-link .social-icon-image {
    width: 70%;
    height: 70%;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.contact-social-link:hover .social-icon-image {
    transform: scale(1.1);
}

/* Prevent FOUT (Flash of Unstyled Text) for Font Awesome icons */
.contact-social-link i {
    display: inline-block;
    min-width: 1em;
    text-align: center;
}

/* Preload optimization for contact page icons */
.contact-page-wrapper .contact-social-links {
    content-visibility: auto;
}

/* Responsive Social Media */
@media (min-width: 768px) {
    .contact-social-link {
        width: 60px;
        height: 60px;
    }
    
    .contact-social-link i {
        font-size: 1.6rem;
    }
}

