/* ==============================
   Kuwait 965 - Reference Design
   ============================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Tajawal', Arial, sans-serif;
    background-color: #ffffff;
    background-image: radial-gradient(circle, #c8d8e8 1px, transparent 1px);
    background-size: 18px 18px;
    min-height: 100vh;
    direction: rtl;
}

/* ==============================
   Main Wrapper
   ============================== */
.main-wrapper {
    max-width: 1050px;
    margin: 0 auto;
    padding: 25px 30px 0;
    background: #fff;
    border-left: 1px solid #b8cfe0;
    border-right: 1px solid #b8cfe0;
    min-height: 100vh;

    display: flex;
    flex-direction: column;
}

/* ==============================
   HEADER
   ============================== */
.main-header {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 28px;
}

/* Banner on LEFT */
.banner-container {
    flex: 1;
    background: #d0d0d0;
    border-radius: 4px;
    overflow: hidden;
    height: 185px;
    max-width: 600px;
}

.top-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Logo on RIGHT */
.logo-container {
    flex-shrink: 0;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
}

.main-logo {
    width: 180px;
    height: auto;
}

/* ==============================
   CONTENT GRID
   ============================== */
.content-grid {
    display: flex;
    flex-direction: row;
    gap: 25px;
    align-items: flex-start;
    flex-grow: 1;
}

/* ==============================
   INFO SECTION (LEFT ~65%)
   ============================== */
.info-section {
    flex: 1.7;
    display: flex;
    flex-direction: column;
}

/* Blue card */
.info-card {
    background: linear-gradient(180deg, #82bce8 0%, #5aa3dc 25%, #3f8fd1 60%, #2a78be 100%);
    border-radius: 18px;
    padding: 22px 25px 18px;
    color: white;
    box-shadow: 0 4px 16px rgba(50, 120, 200, 0.3);
    position: relative;
}

.info-content {
    display: flex;
    flex-direction: row;
    gap: 18px;
    align-items: flex-start;
}

.text-area {
    flex: 1;
    text-align: right; /* Text aligned right as per image */
}

.text-area p {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 14px;
    color: #ffffff;
    font-weight: 400;
}

.btn-more {
    background: #3d4f61;
    color: white;
    border: none;
    padding: 5px 22px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    font-size: 0.82rem;
}

.btn-more:hover {
    background: #2d3e4f;
}

.image-area {
    flex-shrink: 0;
}

.info-img {
    width: 130px;
    height: 130px;
    border-radius: 8px;
    background: #b8d0e8;
    object-fit: cover;
    display: block;
}

/* Slider controls BELOW card, spread to edges */
.slider-controls {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin-top: -1px;
    padding: 0 5px;
    position: relative;
    z-index: 2;
}

.slider-btn {
    width: 42px;
    height: 35px;
    border-radius: 7px;
    border: none;
    background: linear-gradient(180deg, #5aa3dc 0%, #2a78be 100%);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.8rem;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
    transition: opacity 0.2s;
}

.slider-btn:hover {
    opacity: 0.85;
}

/* ==============================
   LOGIN SECTION (RIGHT ~35%)
   ============================== */
.login-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* The main bubble */
.login-bubble {
    width: 100%;
    max-width: 310px;
    background: #41a5e1;
    border-radius: 30px 30px 155px 155px; /* Perfect bottom arch */
    padding: 40px 20px 45px;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    margin-top: 30px; /* Space for the white tab */
    border: 1px solid #5aaad8;
    border-bottom: 2px solid #2880d0; /* Subtle edge instead of thick 3D */
}

/* Floating elements */
.bubble-white-tab {
    position: absolute;
    top: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    height: 45px;
    width: max-content; /* Wrap tightly around content */
    padding: 5px 15px 0 10px;
    display: flex;
    align-items: center;
    border-radius: 5px 5px 0 0;
    z-index: 1;
}

.chat-bubble-bg {
    background: linear-gradient(180deg, #6c6c6c 0%, #4a4a4a 100%);
    border-radius: 8px;
    padding: 5px 15px;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    position: relative;
    border: 1px solid #333;
    margin-bottom: 5px;
    margin-right: -10px; /* Overlap with the smiley */
    z-index: 1;
}

.chat-bubble-bg::after {
    content: '';
    position: absolute;
    right: -8px; /* Tail pointing right */
    bottom: 5px;
    border-width: 8px 0 0 8px;
    border-style: solid;
    border-color: transparent transparent transparent #4a4a4a;
}

.header-smiley {
    width: 35px;
    height: 35px;
    margin-bottom: 5px;
    z-index: 2;
    position: relative;
}

/* Form area - darker inset */
.bubble-body {
    position: relative;
    margin-bottom: 25px;
    margin-top: 10px;
}

.login-form {
    background: #196fba;
    padding: 20px 15px;
    border-radius: 8px;
    box-shadow: inset 0 4px 8px rgba(0,0,0,0.3);
    position: relative;
    z-index: 2;
    border: 1px solid #2880d0;
}

.ribbon-fold {
    position: absolute;
    right: -5px;
    bottom: -10px;
    width: 0;
    height: 0;
    border-top: 15px solid #0f4577; /* Dark blue */
    border-right: 10px solid transparent;
    z-index: 1;
}

.form-row-reversed {
    display: flex;
    flex-direction: row-reverse; /* Puts label on the LEFT, input on the RIGHT */
    align-items: flex-start;
    justify-content: flex-end; /* Align to the left side in RTL */
    gap: 15px;
}

.form-row-reversed label {
    color: white;
    font-weight: 700;
    white-space: nowrap;
    font-size: 1.05rem;
    margin-top: 4px;
}

.input-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-start; /* Button on the right under input */
    width: 100%;
    max-width: 190px;
    gap: 10px;
}

.input-wrapper input {
    width: 100%;
    height: 30px;
    padding: 0 10px;
    border-radius: 2px;
    border: none;
    font-family: inherit;
    font-size: 0.95rem;
    background: white;
    outline: none;
}

.btn-enter {
    background: linear-gradient(180deg, #f8f8f8 0%, #d8d8d8 100%);
    color: #000;
    border: 1px solid #777;
    padding: 3px 20px;
    border-radius: 3px;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9rem;
    align-self: flex-start; /* Align to the right in RTL */
}

/* Footer buttons */
.bubble-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.secondary-btns-reversed {
    display: flex;
    flex-direction: row-reverse; /* Left: الاعضاء, Right: الزائر */
    justify-content: center;
    gap: 10px;
    margin-bottom: 12px;
}

.btn-grey {
    background: linear-gradient(180deg, #666 0%, #333 100%);
    color: white;
    border: 1px solid #222;
    padding: 6px 15px;
    border-radius: 5px;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    font-weight: bold;
}

.btn-create {
    background: linear-gradient(180deg, #666 0%, #333 100%);
    color: white;
    border: 1px solid #222;
    padding: 6px 20px;
    border-radius: 5px;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: inherit;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    font-weight: bold;
}

/* ==============================
   FOOTER
   ============================== */
.main-footer {
    margin-top: 40px;
    border: 1px solid #b8cfe0;
    border-radius: 0;
    padding: 18px 20px;
    background: #fff;
}

.footer-inner {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.social-links {
    display: flex;
    flex-direction: row;
    gap: 16px;
}

.social-links a {
    color: #555;
    font-size: 1.3rem;
    text-decoration: none;
    transition: color 0.2s;
}

.social-links a:hover {
    color: #3a8dcc;
}

.app-links {
    display: flex;
    flex-direction: row;
    gap: 12px;
    align-items: center;
}

.app-links img {
    height: 40px;
}

.quick-links {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

.quick-links a {
    text-decoration: none;
    color: #3a8dcc;
    font-weight: 700;
    font-size: 0.95rem;
}

.quick-links a:hover {
    text-decoration: underline;
}

/* ==============================
   RESPONSIVE
   ============================== */
@media (max-width: 768px) {
    .main-wrapper {
        padding: 15px;
        border: none;
    }
    .main-header {
        flex-direction: column;
    }
    .banner-container {
        max-width: 100%;
    }
    .logo-container {
        justify-content: center;
    }
    .content-grid {
        flex-direction: column;
    }
    .login-bubble {
        max-width: 100%;
    }
    .footer-inner {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}

/* ==========================================
   NEW: Dynamic Login Form Style
   ========================================== */
.form-title {
    color: #fbd068;
    font-weight: bold;
    text-align: center;
    margin-bottom: 15px;
    font-size: 1rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 8px;
}

.form-group-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    direction: rtl; /* Force natural RTL layout */
}

.form-group-row label {
    color: white;
    font-weight: bold;
    font-size: 0.9rem;
    white-space: nowrap;
    width: 80px;
    text-align: right;
}

.form-group-row input, .form-group-row select {
    flex: 1;
    height: 32px;
    padding: 0 10px;
    border-radius: 4px;
    border: 1px solid #1a5ea0;
    font-family: inherit;
    font-size: 0.9rem;
    outline: none;
    background: #ffffff;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
}

.form-group-row input:focus, .form-group-row select:focus {
    border-color: #fbd068;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1), 0 0 0 3px rgba(251, 208, 104, 0.4);
}

.custom-file-input {
    padding: 0 !important;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #1a5ea0;
    color: #475569;
    font-size: 0.8rem !important;
    width: 100%;
    height: 32px;
    line-height: 32px;
    overflow: hidden;
}
.custom-file-input::file-selector-button {
    background: #f8f8f8;
    color: #333;
    border: none;
    border-left: 1px solid #1a5ea0;
    height: 32px;
    padding: 0 10px;
    margin-left: 10px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s;
}
.custom-file-input::file-selector-button:hover {
    background: #e0e0e0;
}

