/* =====================================================
   CONTACT PAGE STYLES - Digital Boost DZ Theme
===================================================== */

/* =====================================================
   HERO SECTION WITH FORM
===================================================== */
.contact-hero-section {
    background: linear-gradient(180deg, 
        var(--bg-hero-gradient-start) 0%, 
        #F0EBFD 50%, 
        #FFFFFF 100%
    );
    padding: 160px 40px 160px;
}

.contact-hero-title-wrapper {
    text-align: center;
    margin-bottom: 100px;
}

.contact-hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.3;
    font-family: 'Changa', sans-serif;
}

.contact-hero-title .line1 {
    display: block;
    margin-bottom: 10px;
}

.contact-hero-title .line1.highlight {
    color: var(--primary-purple);
}

.contact-hero-title .line2 {
    display: block;
    color: var(--text-main);
}

/* المحتوى (النص + الفورم) */
.contact-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    max-width: 1200px;
    margin: 0 auto;
    gap: 60px;
}

/* =====================================================
   قسم المعلومات (يمين)
===================================================== */
.contact-info-section {
    flex: 1;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-self: stretch;
    min-height: 100%;
}

.contact-intro-text {
    font-size: 1.2rem;
    color: var(--text-light);
    line-height: 1.8;
    margin: 0 0 50px 0;
    font-family: 'Changa', sans-serif;
}

.contact-address-box {
    border-right: 5px solid var(--primary-purple);
    padding-right: 25px;
    margin: 0 0 50px 0;
}

.contact-address-box h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 15px;
    font-family: 'Changa', sans-serif;
}

.contact-address-box p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 10px;
    font-family: 'Changa', sans-serif;
}

.contact-address-box a {
    font-size: 1rem;
    color: var(--primary-purple);
    font-weight: 600;
    transition: color 0.3s ease;
    font-family: 'Changa', sans-serif;
}

.contact-address-box a:hover {
    color: var(--accent-pink);
}

/* =====================================================
   شبكة الشعارات - 12 لوغو (4 صفوف × 3)
===================================================== */
.contact-logos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px 25px;
    margin: 0;
    align-content: end;
    flex-grow: 1;
}

.contact-logos-grid .logo-item {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 8px;
}

.contact-logos-grid .logo-item img {
    max-height: 65px;
    width: auto;
    filter: none;
    opacity: 1;
    transition: transform 0.3s ease;
}

.contact-logos-grid .logo-item:hover img {
    transform: scale(1.15);
}

/* =====================================================
   CONTACT FORM CARD
===================================================== */
.contact-form-card {
    width: 450px;
    flex-shrink: 0;
    padding: 40px;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: visible;
}

.form-header {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-light);
    text-align: center;
    margin-bottom: 25px;
    font-family: 'Changa', sans-serif;
}

.contact-form {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    position: relative;
    overflow: visible;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    border: 2px solid var(--gray-200);
    border-radius: 12px;
    margin-bottom: 15px;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.5;
    background: var(--gray-100);
    padding: 15px 18px;
    color: var(--text-main);
    font-family: 'Changa', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form textarea {
    min-height: 150px;
    resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 0 4px rgba(109, 91, 151, 0.1);
}

.contact-form .btn-primary {
    width: 100%;
    margin-top: 10px;
    padding: 18px;
    font-size: 1.1rem;
    font-family: 'Changa', sans-serif;
}

.contact-form input[type="tel"] {
    text-align: right;
    direction: rtl;
}

/* =====================================================
   CUSTOM SELECT - Desktop & Mobile
===================================================== */
.custom-select-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
    z-index: 100;
}

.custom-select {
    position: relative;
    width: 100%;
    font-family: 'Changa', sans-serif;
}

.custom-select-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 15px 18px;
    background-color: #F8F9FA;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.custom-select-trigger:hover {
    border-color: #6D5B97;
}

.custom-select.open .custom-select-trigger {
    border-color: #6D5B97;
    box-shadow: 0 0 0 4px rgba(109, 91, 151, 0.1);
    border-radius: 12px 12px 0 0;
}

.custom-select-value {
    font-size: 1rem;
    font-weight: 500;
    color: #8a8a8a;
}

.custom-select-value.has-value {
    color: #1e1e1e;
}

.custom-select-arrow {
    width: 20px;
    height: 20px;
    color: #5E5475;
    transition: transform 0.3s ease;
}

.custom-select.open .custom-select-arrow {
    transform: rotate(180deg);
}

.custom-select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border: 2px solid #6D5B97;
    border-radius: 0 0 12px 12px;
    border-top: none;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    z-index: 9999;
    transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.custom-select.open .custom-select-options {
    max-height: 400px;
    opacity: 1;
    visibility: visible;
    overflow-y: auto;
}

.custom-select-option {
    padding: 14px 18px;
    font-size: 1rem;
    font-weight: 500;
    color: #1e1e1e;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-family: 'Changa', sans-serif;
    background-color: #ffffff;
}

.custom-select-option:hover {
    background-color: #F0EBFD;
    color: #6D5B97;
}

.custom-select-option:last-child {
    border-radius: 0 0 10px 10px;
}

.custom-select-options::-webkit-scrollbar {
    width: 6px;
}

.custom-select-options::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 0 12px 12px 0;
}

.custom-select-options::-webkit-scrollbar-thumb {
    background: #6D5B97;
    border-radius: 3px;
}

/* =====================================================
   LOGOS MARQUEE - مخفي في Desktop
===================================================== */
.logos-scroll-section {
    display: none;
}

/* =====================================================
   CTA SECTION
===================================================== */
.contact-cta {
    background: linear-gradient(135deg, var(--primary-purple) 0%, #5A4B7D 100%);
}

.contact-cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.3;
    font-style: italic;
    color: white;
    font-family: 'Changa', sans-serif;
}

.contact-cta-title .desktop-text {
    display: block;
}

.contact-cta-title .desktop-text .line1 {
    display: block;
    color: var(--accent-pink);
    font-size: 2.5rem;
}

.contact-cta-title .desktop-text .line2 {
    display: block;
    color: white;
    font-size: 1.8rem;
    margin-top: 8px;
    font-weight: 600;
}

.contact-cta-title .mobile-text {
    display: none;
}

/* =====================================================
   RESPONSIVE - TABLET (max-width: 1024px)
===================================================== */
@media (max-width: 1024px) {
    .contact-hero-title {
        font-size: 2.6rem;
    }
    
    .contact-content-wrapper {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }
    
    .contact-info-section {
        max-width: 100%;
        text-align: center;
        order: 1;
    }
    
    .contact-address-box {
        border-right: none;
        border-bottom: 3px solid var(--primary-purple);
        padding-right: 0;
        padding-bottom: 25px;
        text-align: center;
    }
    
    .contact-logos-grid {
        justify-content: center;
    }
    
    .contact-form-card {
        width: 100%;
        max-width: 500px;
        order: 2;
    }
}

/* =====================================================
   RESPONSIVE - MOBILE (max-width: 768px)
===================================================== */
@media (max-width: 768px) {
.contact-hero-section {
        padding: 130px 10px 100px;
    }
    
    .contact-hero-title {
        font-size: 2rem;
    }
    
    .contact-hero-title .line1 {
        font-size: 1.8rem;
    }
    
    .contact-hero-title .line2 {
        font-size: 2rem;
    }
    
    .contact-hero-title-wrapper {
        margin-bottom: 50px;
    }
    
    .contact-intro-text {
        font-size: 1.05rem;
        margin-bottom: 30px;
        padding: 0 15px;
    }
    
    .contact-address-box,
    .contact-logos-grid {
        display: none;
    }
    
    .contact-content-wrapper {
        padding: 0 10px;
    }
    
    .contact-form-card {
        padding: 30px 25px;
        width: 100%;
        max-width: none;
        margin: 0;
        border-radius: 20px;
        overflow: visible;
    }
    
    .contact-form {
        overflow: visible;
    }
    
    .contact-form input,
    .contact-form textarea {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .contact-form input[type="tel"] {
        text-align: right;
        direction: rtl;
    }
    
    .contact-form textarea {
        min-height: 120px;
    }
    
    /* Custom Select Mobile - يظهر تحت الحقل مباشرة */
    .custom-select-wrapper {
        position: relative;
        z-index: 100;
        overflow: visible;
    }
    
    .custom-select {
        position: relative;
        overflow: visible;
    }
    
    .custom-select-trigger {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .custom-select-options {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        max-height: 0;
        overflow: hidden;
        z-index: 9999;
    }
    
    .custom-select.open .custom-select-options {
        max-height: none;
        overflow: visible;
    }
    
    .custom-select-option {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    /* =====================================================
       LOGOS INFINITE SCROLL - Mobile Only
    ===================================================== */
    .logos-scroll-section.mobile-only {
        display: block !important;
        overflow: hidden !important;
        background: #ffffff !important;
        padding: 30px 0 15px !important;
        margin-top: 0 !important;
        direction: ltr !important;
        border-bottom: 2px solid #E5E7EB;
    }
    
    .logos-track {
        display: flex !important;
        flex-wrap: nowrap !important;
        width: max-content !important;
        animation: scrollLogos 35s linear infinite !important;
        gap: 0 !important;
    }
    
    .logo-item {
        flex-shrink: 0 !important;
        width: 130px !important;
        padding: 0 20px !important;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .logo-item img {
        height: 50px !important;
        width: 100% !important;
        object-fit: contain !important;
        filter: none !important;
        opacity: 1 !important;
    }
    
    @keyframes scrollLogos {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-50%);
        }
    }
    
    /* CTA Mobile */
    .contact-cta-title .desktop-text {
        display: none;
    }
    
    .contact-cta-title .mobile-text {
        display: block;
    }
    
    .contact-cta-title .mobile-text .line1 {
        color: var(--accent-pink);
        font-size: 2rem;
    }
    
    .contact-cta-title .mobile-text .line2 {
        display: block;
        color: white;
        font-size: 1.5rem;
        margin-top: 8px;
        font-weight: 600;
    }
}

/* =====================================================
   RESPONSIVE - SMALL MOBILE (max-width: 480px)
===================================================== */
@media (max-width: 480px) {
    .contact-hero-section {
        padding: 110px 8px 100px;
    }
    
    .contact-hero-title {
        font-size: 1.75rem;
    }
    
    .contact-hero-title .line1 {
        font-size: 1.5rem;
    }
    
    .contact-hero-title .line2 {
        font-size: 1.75rem;
    }
    
    .contact-intro-text {
        font-size: 0.95rem;
        padding: 0 12px;
    }
    
    .contact-content-wrapper {
        padding: 0 8px;
    }
    
    .contact-form-card {
        padding: 25px 20px;
        border-radius: 18px;
    }
    
    .form-header {
        font-size: 1.1rem;
    }
    
    .contact-form input,
    .contact-form textarea {
        padding: 12px 14px;
        margin-bottom: 12px;
    }
    
    .contact-form .btn-primary {
        padding: 16px;
        font-size: 1rem;
    }
    
    /* Custom Select */
    .custom-select-trigger {
        padding: 12px 14px;
    }
    
    .custom-select-option {
        padding: 12px 14px;
    }
    
    /* Logos */
    .logo-item {
        width: 120px !important;
        padding: 0 18px !important;
    }
    
    .logo-item img {
        height: 45px !important;
    }
    
    .logos-track {
        animation-duration: 30s !important;
    }
    
    /* CTA */
    .contact-cta-title .mobile-text .line1 {
        font-size: 1.6rem;
    }
    
    .contact-cta-title .mobile-text .line2 {
        font-size: 1.2rem;
    }
}

/* =====================================================
   RESPONSIVE - EXTRA SMALL MOBILE (max-width: 360px)
===================================================== */
@media (max-width: 360px) {
    .contact-hero-section {
        padding: 100px 6px 70px;
    }
    
    .contact-hero-title {
        font-size: 1.5rem;
    }
    
    .contact-hero-title .line1 {
        font-size: 1.3rem;
    }
    
    .contact-hero-title .line2 {
        font-size: 1.5rem;
    }
    
    .contact-content-wrapper {
        padding: 0 6px;
    }
    
    .contact-form-card {
        padding: 22px 16px;
        border-radius: 16px;
    }
    
    /* Logos */
    .logo-item {
        width: 110px !important;
        padding: 0 15px !important;
    }
    
    .logo-item img {
        height: 40px !important;
    }
    
    .logos-track {
        animation-duration: 28s !important;
    }
    
    .contact-cta-title .mobile-text .line1 {
        font-size: 1.4rem;
    }
    
    .contact-cta-title .mobile-text .line2 {
        font-size: 1.1rem;
    }
}

/* =====================================================
   تصميم نافذة التنبيهات الاحترافية (Popup)
===================================================== */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* خلفية داكنة شفافة */
    backdrop-filter: blur(8px); /* تأثير الضباب */
    -webkit-backdrop-filter: blur(8px);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.popup-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(249, 247, 253, 0.9));
    padding: 40px;
    border-radius: 24px;
    text-align: center;
    max-width: 450px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(109, 91, 151, 0.25);
    border: 2px solid rgba(255, 255, 255, 0.8);
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.popup-overlay.active .popup-card {
    transform: translateY(0) scale(1);
}

/* الأيقونة */
.popup-icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    position: relative;
}

.popup-success .popup-icon-wrapper {
    background: rgba(76, 175, 80, 0.1);
    color: #4CAF50;
}

.popup-error .popup-icon-wrapper {
    background: rgba(255, 82, 82, 0.1);
    color: #FF5252;
}

.popup-title {
    font-family: 'Changa', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 10px;
}

.popup-message {
    font-family: 'Changa', sans-serif;
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 30px;
}

.popup-btn {
    background: var(--primary-purple);
    color: white;
    border: none;
    padding: 12px 35px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 12px;
    cursor: pointer;
    font-family: 'Changa', sans-serif;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(109, 91, 151, 0.3);
}

.popup-btn:hover {
    background: var(--accent-pink);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 143, 163, 0.4);
}

/* خط ملون في الأعلى */
.popup-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
}

.popup-success .popup-card::before {
    background: linear-gradient(90deg, #4CAF50, #8BC34A);
}

.popup-error .popup-card::before {
    background: linear-gradient(90deg, #FF5252, #FF1744);
}