@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

/* Hide scrollbar (all browsers) */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}
html, body {
    -ms-overflow-style: none;
    scrollbar-width: none;
    overflow-x: hidden;
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    background-size: 50%;
}

/* HEADER & NAVIGATION */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 40px;
    background: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.logo {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    /* Increased vertical padding to prevent the logo from being cut off */
    padding: 15px 10px; 
}

.curved-text-svg {
    position: absolute;
    width: 100px;
    height: 100px;
    /* Moved down from -15px to -8px to get closer to the head */
    top: 4px; 
    fill: #028090;
    font-weight: 800;
    font-size: 11px;
    /* Suggested Font: Fredoka is rounded and friendly */
    font-family: 'Fredoka', sans-serif; 
}

.logo-img {
    width: 42px;
    height: 42px;
    z-index: 2;
}

.logo-text {
    position: absolute;
    font-weight: 800;
    font-size: 11px;
    color: #028090;
    white-space: nowrap;
    font-family: 'Fredoka', sans-serif;
}

/* "DZ" moved down slightly */
.bottom {
    /* Changed from -2px to -6px to move it a tiny bit down */
    bottom: 0; 
    background: transparent;
    padding: 15px 4px;
    border-radius: 4px;
    z-index: 3; /* Ensures it stays on top of the image if they overlap */
}



.navigation {
    display: flex;
    align-items: center;
    margin-right: auto;
    margin-left: 30px;
}

.navigation a {
    position: relative;
    font-size: 1em;
    color: #028090;
    text-decoration: none;
    font-weight: 500;
    margin-left: 20px;
}

.navigation a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 3px;
    background: #028090;
    border-radius: 5px;
    transform-origin: right;
    transform: scaleX(0);
    transition: transform 0.5s;
}

.navigation a:hover::after {
    transform-origin: left;
    transform: scaleX(1);
}

/* ACTION BUTTONS (signup/login/lang/profile) */
.action-buttons {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: w;
}

.btn-signup {
    color: #028090;
    background: transparent;
    padding: 8px 18px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1em;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.4s, background-color 0.4s;
}
.btn-signup:hover {
    color: rgba(0, 168, 150, 0.4);
}

.btnLogin {
    width: 110px;
    height: 40px;
    background: #028090;
    border: 2px solid #028090;
    outline: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
    color: #fff;
    font-weight: 500;
    transition: background-color 0.5s, color 0.5s, border-color 0.5s;
}
.btnLogin:hover {
    background: #fff;
    color: #028090;
}

/* Language switcher */
.lang-btn {
    background: transparent;
    border: 1px solid #028090;
    color: #028090;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    transition: 0.3s;
}
.lang-btn:hover {
    background: #028090;
    color: white;
}
.lang-btn svg {
    fill: currentColor;
}

/* USER PROFILE DROPDOWN*/
.user-profile {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    padding: 5px 12px 5px 8px;
    border-radius: 60px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid rgba(2, 128, 144, 0.3);
}
.user-profile:hover {
    background: rgba(2, 128, 144, 0.1);
    border-color: #028090;
}
.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    background: #f0f0f0;
    border: 2px solid white;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}
.username {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1f2b1c;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dropdown-toggle {
    background: none;
    border: none;
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0;
    margin: 0;
    color: #028090;
}
.dropdown-toggle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s;
}
.dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-width: 160px;
    padding: 8px 0;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
    border: 1px solid #e2e8f0;
}
.dropdown-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 20px;
    text-decoration: none;
    color: #1e293b;
    font-size: 0.9rem;
    transition: background 0.2s;
}
.dropdown-menu li a:hover {
    background: #f1f5f9;
}
.dropdown-menu li a svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: #475569;
    stroke-width: 1.8;
}

/* MAIN CONTAINER (hero section) */
.container {
    background-color: #ffffff;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 150px 5% 10px 5%;
    gap: 40px;
}
.content-area {
    flex-basis: 50%;
    padding-right: 40px;
    padding-top: 10px;
}
.main-heading {
    font-weight: 600;
    font-size: 3em;
    color: #1a1a1a;
    margin-bottom: 20px;
}
.intro-paragraph {
    font-weight: 400;
    font-size: 1.2em;
    color: #4a4a4a;
    line-height: 1.5;
}
.illustration-wrapper {
    padding: 10px;
    max-width: 340px;
    align-self: flex-start;
}
.illustration-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

/*CARDS SECTION (6‑col grid) */
.cards_container {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
    padding: 20px;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
}
.action_card {
    max-width: 140px;
    max-height: 140px;
    background: #fff;
    border-radius: 20px;
    padding-top: 10px;
    padding-bottom: 25px;
    border: 1px solid #f0f0f0;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 12px rgba(0, 89, 89, 0.2), 0 1px 2px rgba(0, 89, 89, 0.1);
    aspect-ratio: 1/1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}
.action_card:hover {
    transform: translateY(-8px);
    box-shadow: 0 3px 12px rgba(4, 89, 89, 0.5);
    background-color: #f7fefe;
}

.card_icon{
    font-size: 40px;
    margin-top: 0;
    margin-bottom: 0;
}

.card_icon svg{
    width: 30px;
    height: 30px;
    fill: #028090;
}
.action_card h3{
    font-size: 1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    color: #1a1a1a;
    padding-top: 0;
    
}
.action_card p{
    padding-top: 5px;
    text-align: center;
    font-size: 0.85rem;
    color: #757575;
    line-height: 1.4;
   
}


.stats-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #f0f7f7;
    padding: 5px 15px;
    border-radius: 40px;
    margin-right: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #028090;
    border: 1px solid rgba(2, 128, 144, 0.2);
}
.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/*SIGNUP / LOGIN OVERLAY FORMS */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(5px);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s ease;
}
.overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.form_container {
    position: relative;
    max-width: 400px;
    width: 100%;
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.form_close {
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    color: #05668D;
}
.form_container h2 {
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: -0.5px;
    color: #028090;
    text-align: center;
    padding-top: 10px;
    padding-bottom: 10px;
}
.input_box {
    display: flex;
    align-items: center;
    position: relative;
    margin-top: 20px;
    height: 40px;
    width: 100%;
}
.input_box input {
    flex-grow: 1;
    height: 45px;
    padding: 0 15px;
    padding-right: 45px;
    width: 100%;
    border-radius: 0 10px 10px 0;
    border: 1.5px solid rgb(237, 245, 249);
    border-left: none;
    outline: none;
    color: #333;
    font-size: 14px;
    background-color: rgb(237, 245, 249);
    transition: 200ms ease;
}
.input_box input:hover {
    border-color: #028090;
}
.input_box input:focus {
    border-color: #05668D;
}
div:has(input:focus) > label {
    background-color: #05668D;
}
.input_box label {
    flex-shrink: 0;
    height: 45px;
    width: 45px;
    background-color: #028090;
    border-radius: 10px 0 0 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.input_box label svg {
    fill: #fff;
    width: 20px;
    height: 20px;
}
.password_toggle {
    position: absolute;
    right: 15px;
    cursor: pointer;
    display: flex;
    z-index: 10;
}
.password_toggle svg {
    width: 22px;
    height: 22px;
}
.password_toggle .eye_closed {
    display: none;
}
.password_toggle .eye_open {
    display: block;
}
.password_toggle.visible .eye_open {
    display: none;
}
.password_toggle.visible .eye_closed {
    display: block;
    fill: #028090;
}
/* Hide browser native password reveal */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}
input[type="password"]::-webkit-textfield-decoration-container {
    display: none;
}
.form_container .button {
    background-color: #028090;
    color: #ffffff;
    margin-top: 50px;
    width: 100%;
    padding: 10px 0;
    border-radius: 10px;
    cursor: pointer;
    transition: 200ms ease;
    border: none;
    box-shadow: 1px 1px 1px 1px rgba(0, 0, 0, 0.2);
}
.form_container .button:hover {
    background-color: #05668D;
}
.form_container p {
    text-align: center;
    padding-top: 25px;
    font-size: 14px;
}
.form_container a {
    text-decoration: none;
    color: #06445d;
    transition: 100ms ease;
}
.form_container a:hover {
    text-decoration: underline;
}
.option_field {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}
.checkbox {
    display: flex;
    align-items: center;
    white-space: nowrap;
    column-gap: 8px;
}
.checkbox label {
    background: none;
    height: auto;
    width: auto;
    font-size: 13px;
    cursor: pointer;
    user-select: none;
}
.option_field a {
    font-size: 13px;
}
.login_form {
    display: none;
}
.form_container.active .login_form {
    display: block;
}
.form_container.active .signup_form {
    display: none;
}


/*RESPONSIVE ADJUSTMENTS */
@media (max-width: 780px) {
    .username {
        max-width: 80px;
        font-size: 0.8rem;
    }
    .user-avatar {
        width: 32px;
        height: 32px;
    }
}

.stats-badge {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background: #f0f7f7;
    padding: 5px 15px;
    border-radius: 40px;
    margin-right: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #028090;
    border: 1px solid rgba(2, 128, 144, 0.2);
}
.stat-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}



/*RTL (ARABIC) SUPPORT*/
[dir="rtl"] {
    text-align: right;
    font-family: 'Cairo', sans-serif;
}
[dir="rtl"] .navigation {
    margin-right: 30px;
    margin-left: auto;
}
[dir="rtl"] .action-buttons {
    flex-direction: row-reverse;
}

[dir="rtl"] .arrow-back svg,
[dir="rtl"] .btnLogout svg {
    transform: scaleX(-1);
}


[dir="rtl"] .password_toggle {
    right: auto;
    left: 15px;
}
[dir="rtl"] .input_box label{
border-radius: 0 10px 10px 0;
}

[dir="rtl"] .input_box input{
    border-radius: 10px 0 0 10px ;
}

[dir="rtl"] .content-area {
    padding-right: 0;
    padding-left: 40px; /* Moves the gap to the other side of the text */
}
[dir="rtl"] .main-heading, 
[dir="rtl"] .intro-paragraph {
    text-align: right;
}