@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;600;700&display=swap');

*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body{
    background-color: #c9d6ff;
    background: linear-gradient(to right, #e2e2e2, #c9d6ff);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    min-height: 100vh;
}

/* FAF Legal Header Replacement */

.faf-legal-text-header {
    text-align: center;
    margin-bottom: 20px;
}

/* Arabic title */
.arabic-title {
    font-family: "Amiri", serif;
    font-size: 30px;
    font-weight: 700;
    color: #ffffff;
    direction: rtl;
    line-height: 1.2;
}

/* English main title */
.eng-main {
    font-family: "Montserrat", sans-serif;
    font-size: 14px;
    font-weight: 800;
    color: #ffffff;
    margin-top: 8px;
}

/* Divider line */
.divider {
    height: 3px;
    background: #0f7a44;
    margin: 8px auto;
}

/* English subtext */
.eng-sub {
    font-family: "Montserrat", sans-serif;
    font-size: 9.5px;
    color: #ffffff;
    margin-top: 4px;
}

.container{
    background-color: #fff;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.35);
    position: relative;
    overflow: hidden;
    width: 90%;
    max-width: 100%;
    min-height: 520px;
}

.container p{
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0.3px;
    margin: 20px 0;
}

.container span{
    font-size: 12px;
}

.container a{
    color: #333;
    font-size: 13px;
    text-decoration: none;
    margin: 15px 0 10px;
}

.form-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.form-row input {
    flex: 1; /* Make inputs share the row equally */
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}
.container button{
    background-color: #198754;
    color: #fff;
    font-size: 12px;
    padding: 10px 45px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    cursor: pointer;
}

.container button.hidden{
    background-color: transparent;
    border-color: #fff;
}

.container #sign-up{
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    height: 100%;
}

.container #sign-in{
    background-color: #fff;
    display: flex;
    justify-content: center;
    flex-direction: column;
    padding: 0 30px;
    height: 100%;
}

.container #sign-in h2{
    text-align: center;
}

.container input{
    background-color: #eee;
    border: none;
    margin: 8px 0;
    padding: 10px 15px;
    font-size: 13px;
    border-radius: 8px;
    width: 100%;
    outline: none;
}

.form-container{
    position: absolute;
    top: 0;
    height: 100%;
    transition: all 0.6s ease-in-out;
}

.sign-in{
    left: 0;
    width: 50%;
    z-index: 2;
}

.container.active .sign-in{
    transform: translateX(100%);
}

.sign-up{
    left: 0;
    width: 50%;
    opacity: 0;
    z-index: 1;
}

.container.active .sign-up{
    transform: translateX(100%);
    opacity: 1;
    z-index: 5;
    animation: move 0.6s;
}

@keyframes move{
    0%, 49.99%{
        opacity: 0;
        z-index: 1;
    }
    50%, 100%{
        opacity: 1;
        z-index: 5;
    }
}

.social-icons{
    margin: 20px 0;
}

.social-icons a{
    border: 1px solid #ccc;
    border-radius: 20%;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin: 0 3px;
    width: 40px;
    height: 40px;
}

.toggle-container{
    position: absolute;
    top: 0;
    left: 50%;
    width: 50%;
    height: 100%;
    overflow: hidden;
    transition: all 0.6s ease-in-out;
    z-index: 1000;
}

.container.active .toggle-container{
    transform: translateX(-100%);
}

.toggle{
    background-color: #198754;
    height: 100%;
    background: linear-gradient(to right, #198754, #198754);
    color: #fff;
    position: relative;
    left: -100%;
    height: 100%;
    width: 200%;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.container.active .toggle{
    transform: translateX(50%);
}

.toggle-panel{
    position: absolute;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0 30px;
    text-align: center;
    top: 0;
    transform: translateX(0);
    transition: all 0.6s ease-in-out;
}

.panel-form{
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 0;
    height: auto;
    width: 100%;
}

.panel-form input{
    background-color: #eee;
    border: none;
    margin: 8px 0;
    padding: 10px 15px;
    font-size: 13px;
    border-radius: 8px;
    width: 100%;
    outline: none;
}

.panel-form button{
    background-color: #198754;
    color: #fff;
    font-size: 12px;
    padding: 10px 45px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-top: 10px;
    cursor: pointer;
}

.toggle-left{
    transform: translateX(-200%);
}

.container.active .toggle-left{
    transform: translateX(0);
}

.toggle-right{
    right: 0;
    transform: translateX(0);
}

.container.active .toggle-right{
    transform: translateX(200%);
}

/* RTL Support for Arabic */
html[lang="ar"] .sign-in{
    right: 0;
    left: auto;
}

html[lang="ar"] .sign-up{
    right: 0;
    left: auto;
}

html[lang="ar"] .container.active .sign-in{
    transform: translateX(-100%);
}

html[lang="ar"] .container.active .sign-up{
    transform: translateX(-100%);
}

html[lang="ar"] .toggle-container{
    left: auto;
    right: 50%;
}

html[lang="ar"] .container.active .toggle-container{
    transform: translateX(100%);
}

html[lang="ar"] .toggle{
    left: auto;
    right: -100%;
}

html[lang="ar"] .container.active .toggle{
    transform: translateX(-50%);
}

html[lang="ar"] .toggle-left{
    transform: translateX(200%);
}

html[lang="ar"] .container.active .toggle-left{
    transform: translateX(0);
}

html[lang="ar"] .toggle-right{
    left: 0;
    right: auto;
    transform: translateX(0);
}

html[lang="ar"] .container.active .toggle-right{
    transform: translateX(-200%);
}

/* Logo Styling */


.top-logo{
    width: 100px;
    height: auto;
    margin-bottom: 10px;
    object-fit: contain;
}

.logo-text{
    font-size: 18px;
    font-weight: 600;
    color: #198754;
    margin-bottom: 30px;
    letter-spacing: 0.5px;
}

.toggle-logo{
    width: 80px;
    height: auto;
    margin-bottom: 15px;
    object-fit: contain;
}

.toggle-logo-small{
    width: 60px;
    height: auto;
    margin-top: 10px;
    object-fit: contain;
}

.toggle-text{
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.form-header-logo{
    width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: cover;
    margin-bottom: 0;
    display: block;
}

@media (min-width: 769px) {
    .mobile-toggle-tabs {
        display: none !important;
    }
}


@media (max-width: 768px) {
    body {
        background: #f8f9fa;
        padding: 20px 10px;
        min-height: 100vh;
    }

    .page-header-logo {
        width: 80%;
        max-width: 400px;
        margin: 0 auto 30px;
        display: block;
    }

    .container {
        width: 100%;
        margin: 0 auto;
        border-radius: 0 0 20px 20px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
        overflow: hidden;
        flex-direction: column;
        min-height: auto;
    }

    /* Hide the fancy toggle overlay completely on mobile */
    .toggle-container,
    .toggle,
    .toggle-panel {
        display: none !important;
    }

    /* Show both forms vertically, one at a time */
    .form-container {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        transform: none !important;
        width: 100% !important;
        height: auto !important;
        opacity: 1 !important;
        padding: 40px 20px;
        background: #fff;
    }

    .form-container.sign-in,
    .form-container.sign-up {
        display: none;
    }

    /* Show active form */
    .container.active .form-container.sign-up,
    .container:not(.active) .form-container.sign-in {
        display: block !important;
    }

    /* Simple toggle buttons at the top */
    /* Tabs container matches the form container width */
.mobile-toggle-tabs {
    display: flex;
    flex-direction: column; /* stack children vertically */
    align-items: center; /* center all children horizontally */
    background: #198754;
    border-radius: 20px 20px 0 0;
    overflow: hidden;
    margin-top: 15%;
    width: 100%;
    box-shadow: 0 4px 15px rgba(25, 135, 84, 0.3);
    padding: 10px 0; /* optional spacing */
}

/* Keep the logo smaller on mobile */
.mobile-toggle-tabs .toggle-logo {
    width: 70px;
    margin-bottom: 10px;
}

/* Keep the toggle-text below header */
.mobile-toggle-tabs .toggle-text {
    font-size: 14px;
    color: #fff;
    margin-bottom: 10px;
}

/* Tabs row */
.mobile-toggle-tabs .tabs-row {
    display: flex;
    width: 100%;
}

.mobile-toggle-tabs .mobile-tab {
    flex: 1;
    padding: 12px 0;
    color: white;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all 0.3s;
}

.mobile-toggle-tabs .mobile-tab.active {
    background: rgba(255, 255, 255, 0.2);
    border-bottom: 3px solid white;
}



    /* Form improvements */
    .container form h2 {
      display: none;
    }

    .container input {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }

    .container form{
        padding: 0;
        display: block !important;
    }
}




/* ===============================================
   SMALL MOBILE (<480px)
================================================ */
@media (max-width: 480px) {
    body {
        padding: 10px;
    }
    
    .container{
        width: 100%;
        border-radius: 0 0 15px 15px;
        min-height: auto;
    }
    
    .page-header-logo{
        width: 80%;
        max-height: 100px;
        margin: 0 auto 10px;
    }
    
   
    
    .container input{
        font-size: 11px;
        padding: 7px 10px;
        margin: 5px 0;
    }
    
    .container button{
        padding: 7px 25px;
        font-size: 12px;
    }
    
    .toggle-logo{
        width: 80px;
    }
    
    .toggle-text{
        font-size: 12px;
    }
    
    h1{
        font-size: 16px;
    }
}


/* ===============================================
   EXTRA SMALL (<360px)
================================================ */
@media (max-width: 360px) {
    .container{
        width: 100%;
        border-radius: 0 0 10px 10px;
    }
    
    .page-header-logo{
        width: 80%;
        max-height: 80px;
    }
    
  
    
    .toggle-logo{
        width: 70px;
    }
    
    h1{
        font-size: 14px;
    }
}
@media (min-width: 1024px) {
    .container{
        width: 60% !important;
    }
}