/* Language Support CSS for Jiilna Website */
/* دعم اللغات والاتجاهات لموقع جيلنا */

/* ============= RTL/LTR Support ============= */
.rtl {
    direction: rtl;
    text-align: right;
}

.ltr {
    direction: ltr;
    text-align: left;
}

/* ============= Form Elements ============= */
.rtl input,
.rtl select,
.rtl textarea {
    text-align: right;
}

.ltr input,
.ltr select,
.ltr textarea {
    text-align: left;
}

.rtl .form-group {
    text-align: right;
}

.ltr .form-group {
    text-align: left;
}

/* ============= Buttons ============= */
.rtl .btn {
    text-align: center;
}

.ltr .btn {
    text-align: center;
}

.rtl .btn-translate {
    align-self: flex-start;
}

.ltr .btn-translate {
    align-self: flex-end;
}

/* ============= Language Switchers ============= */
.rtl .language-switcher {
    margin-left: 0;
    margin-right: auto;
}

.ltr .language-switcher {
    margin-right: 0;
    margin-left: auto;
}

/* Ensure language button position is stable */
.language-switcher {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.language-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Prevent any position changes due to text direction */
    text-align: center !important;
    direction: inherit !important;
    background: #065465 !important;
    color: white !important;
    border: none !important;
    font-family: 'Nunito', sans-serif !important;
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    padding: 0 !important;
    border-radius: 50% !important;
    width: 35px !important;
    height: 35px !important;
    min-width: 35px !important;
    text-decoration: none !important;
    outline: none !important;
    transition: all 0.3s ease !important;
}

.language-btn:hover {
    background: #054555 !important;
    transform: scale(1.1) !important;
}

.language-btn.active {
    background: #065465 !important;
}

/* ضمان ثبات الهيدر في كلا الاتجاهين */
.header-section {
    direction: ltr !important;
}

.header-content {
    direction: ltr !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
}

.left-section {
    direction: inherit !important;
    text-align: left !important;
    order: 1 !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 1.5rem !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    position: relative !important;
    left: 0 !important;
    right: auto !important;
}

.logo {
    direction: inherit !important;
    text-align: left !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    flex-basis: auto !important;
    position: relative !important;
    left: 0 !important;
    right: auto !important;
}

.header-actions {
    direction: inherit !important;
    text-align: right !important;
    order: 2 !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    position: relative !important;
    right: 0 !important;
    left: auto !important;
}

/* ضمان ترتيب العناصر في header-actions */
.language-switcher {
    order: 1 !important;
    margin-right: 15px !important;
}

.login-btn, .account-link {
    order: 2 !important;
    margin-right: 15px !important;
}

/* التصميم المتجاوب للجوال */
@media (max-width: 768px) {
    .header-actions {
        gap: 8px !important;
        padding: 0 10px !important;
    }
    
    .language-switcher {
        margin-right: 8px !important;
    }
    
    .login-btn, .account-link {
        margin-right: 8px !important;
        padding: 8px 12px !important;
        font-size: 14px !important;
        white-space: nowrap !important;
    }
    
    .language-btn {
        width: 30px !important;
        height: 30px !important;
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .header-actions {
        gap: 5px !important;
        padding: 0 5px !important;
    }
    
    .language-switcher {
        margin-right: 5px !important;
    }
    
    .login-btn, .account-link {
        margin-right: 5px !important;
        padding: 6px 10px !important;
        font-size: 12px !important;
    }
    
    .language-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 12px !important;
    }
}

/* منع أي تغيير في الاتجاه للعناصر الفرعية */
.header-actions * {
    direction: inherit !important;
}

.login-btn, .account-link {
    direction: inherit !important;
    text-align: center !important;
    position: relative !important;
}

.language-switcher {
    direction: inherit !important;
    position: relative !important;
}

/* ضمان ثبات عناصر التخطيط الأساسية */
.nav, .navigation, .navbar, .menu {
    direction: ltr !important;
    text-align: left !important;
}

.footer, .footer-content {
    direction: ltr !important;
    text-align: left !important;
}

/* ضمان ثبات العناصر الهيكلية */
.container, .wrapper, .main-content {
    direction: ltr !important;
}

/* منع تحرك العناصر عند تغيير اللغة */
.sidebar, .sidebar-content {
    direction: ltr !important;
    text-align: left !important;
}

/* ضمان ثبات أزرار التنقل */
.nav-btn, .menu-btn, .toggle-btn {
    direction: inherit !important;
    text-align: center !important;
}

/* ضمان ثبات الروابط */
.nav-link, .menu-link {
    direction: inherit !important;
    text-align: center !important;
}

.rtl .language-toggle {
    left: 20px;
    right: auto;
}

.ltr .language-toggle {
    right: 20px;
    left: auto;
}

/* ============= Navigation ============= */
/* منع تغيير اتجاه الهيدر في كلا الاتجاهين */
.rtl .left-section,
.ltr .left-section {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    direction: inherit !important;
    text-align: left !important;
    order: 1 !important;
    position: relative !important;
    left: 0 !important;
    right: auto !important;
}

.rtl .header-actions,
.ltr .header-actions {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    direction: inherit !important;
    text-align: right !important;
    order: 2 !important;
    margin-left: auto !important;
    margin-right: 20px !important;
    position: relative !important;
    right: 0 !important;
    left: auto !important;
}

/* ضمان ترتيب العناصر في header-actions في كلا الاتجاهين */
.rtl .language-switcher,
.ltr .language-switcher {
    order: 1 !important;
    margin-right: 15px !important;
}

.rtl .login-btn,
.ltr .login-btn,
.rtl .account-link,
.ltr .account-link {
    order: 2 !important;
    margin-right: 15px !important;
}

.rtl .logo,
.ltr .logo {
    text-align: left !important;
    direction: inherit !important;
    position: relative !important;
    left: 0 !important;
    right: auto !important;
}

.rtl .header-content,
.ltr .header-content {
    direction: ltr !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    justify-content: space-between !important;
}

/* التصميم المتجاوب للهيدر في الجوال */
@media (max-width: 768px) {
    .header-content {
        padding: 0 10px !important;
        gap: 10px !important;
    }
    
    .left-section {
        flex: 1 !important;
        min-width: 0 !important;
    }
    
    .logo {
        font-size: 18px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }
    
    .header-actions {
        flex-shrink: 0 !important;
        gap: 8px !important;
    }
}

@media (max-width: 480px) {
    .header-content {
        padding: 0 5px !important;
        gap: 5px !important;
    }
    
    .logo {
        font-size: 16px !important;
    }
    
    .header-actions {
        gap: 5px !important;
    }
}

/* ============= Content Alignment ============= */
.rtl .hero-description {
    text-align: right;
}

.ltr .hero-description {
    text-align: left;
}

.rtl .registration-buttons {
    justify-content: flex-start;
}

.ltr .registration-buttons {
    justify-content: flex-end;
}

.rtl .student-text {
    text-align: right;
}

.ltr .student-text {
    text-align: left;
}

.rtl .manager-info-text {
    text-align: right;
}

.ltr .manager-info-text {
    text-align: left;
}

.rtl .startups-info {
    text-align: right;
}

.ltr .startups-info {
    text-align: left;
}

/* ============= Checkboxes and Radio Buttons ============= */
.rtl .checkbox-container input[type="checkbox"] {
    margin-right: 10px;
    margin-left: 0;
}

.ltr .checkbox-container input[type="checkbox"] {
    margin-left: 10px;
    margin-right: 0;
}

.rtl .checkbox-item {
    margin-right: 10px;
    margin-left: 0;
}

.ltr .checkbox-item {
    margin-left: 10px;
    margin-right: 0;
}

/* ============= Lists ============= */
.rtl ul,
.rtl ol {
    padding-right: 20px;
    padding-left: 0;
}

.ltr ul,
.ltr ol {
    padding-left: 20px;
    padding-right: 0;
}

.rtl li {
    text-align: right;
}

.ltr li {
    text-align: left;
}

/* ============= Tables ============= */
.rtl table {
    direction: rtl;
}

.ltr table {
    direction: ltr;
}

.rtl th,
.rtl td {
    text-align: right;
}

.ltr th,
.ltr td {
    text-align: left;
}

/* ============= Icons and Images ============= */
.rtl .icon-left {
    margin-right: 0;
    margin-left: 8px;
}

.ltr .icon-left {
    margin-left: 0;
    margin-right: 8px;
}

.rtl .icon-right {
    margin-left: 0;
    margin-right: 8px;
}

.ltr .icon-right {
    margin-right: 0;
    margin-left: 8px;
}

/* ============= Modals and Popups ============= */
.rtl .modal-header {
    flex-direction: row-reverse;
}

.ltr .modal-header {
    flex-direction: row;
}

.rtl .modal-close {
    left: 15px;
    right: auto;
}

.ltr .modal-close {
    right: 15px;
    left: auto;
}

/* ============= Alerts and Messages ============= */
.rtl .alert {
    text-align: right;
}

.ltr .alert {
    text-align: left;
}

.rtl .flash-message {
    text-align: right;
}

.ltr .flash-message {
    text-align: left;
}

/* ============= Footer ============= */
.rtl .footer-content {
    text-align: right;
}

.ltr .footer-content {
    text-align: left;
}

.rtl .social-links {
    justify-content: flex-start;
}

.ltr .social-links {
    justify-content: flex-end;
}

/* ============= Responsive Design ============= */
@media (max-width: 768px) {
    .rtl .language-toggle,
    .ltr .language-toggle {
        position: static;
        margin-bottom: 15px;
        width: 100%;
        text-align: center;
    }
    
    .rtl .header-actions,
    .ltr .header-actions {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }
    
    .rtl .registration-buttons,
    .ltr .registration-buttons {
        justify-content: center;
        flex-direction: column;
        align-items: center;
    }
    
    .rtl .student-text,
    .ltr .student-text,
    .rtl .manager-info-text,
    .ltr .manager-info-text,
    .rtl .startups-info,
    .ltr .startups-info {
        text-align: center;
    }
}

/* ============= Print Styles ============= */
@media print {
    .rtl {
        direction: rtl;
    }
    
    .ltr {
        direction: ltr;
    }
    
    .language-switcher,
    .language-toggle {
        display: none !important;
    }
}

/* ============= Accessibility ============= */
.rtl [dir="rtl"] {
    direction: rtl;
}

.ltr [dir="ltr"] {
    direction: ltr;
}

/* ============= Animation Support ============= */
.rtl .slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

.ltr .slide-in-right {
    animation: slideInLeft 0.3s ease-out;
}

.rtl .slide-in-left {
    animation: slideInLeft 0.3s ease-out;
}

.ltr .slide-in-left {
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ============= Focus States ============= */
.rtl input:focus,
.rtl select:focus,
.rtl textarea:focus {
    outline-offset: 2px;
    outline-color: #065465;
}

.ltr input:focus,
.ltr select:focus,
.ltr textarea:focus {
    outline-offset: 2px;
    outline-color: #065465;
}

/* ============= Loading States ============= */
.rtl .loading {
    text-align: center;
}

.ltr .loading {
    text-align: center;
}

/* ============= Error States ============= */
.rtl .error-message {
    text-align: right;
}

.ltr .error-message {
    text-align: left;
}

/* ============= Success States ============= */
.rtl .success-message {
    text-align: right;
}

.ltr .success-message {
    text-align: left;
}

/* ============= Contact Alert Styles ============= */
.contact-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    z-index: 1000;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.contact-alert.show {
    transform: translateX(0);
}

.contact-alert.success {
    background-color: #4caf50;
    color: white;
}

.contact-alert.error {
    background-color: #f44336;
    color: white;
}

/* ============= Todo Content Styles ============= */
.todo-content p {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

/* ============= Progress Bar Styles ============= */
.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin-top: 1rem;
    overflow: hidden;
}

.progress-fill {
    width: 60%;
    height: 100%;
    background: white;
    border-radius: 4px;
    transition: width 0.3s ease;
} 