/* =========================================================
   Global Reset & Base
   ========================================================= */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Tajawal', sans-serif;
}

html {
    direction: rtl;
}

body {
    background-color: #f4f7f6;
    color: #333;
    line-height: 1.6;
}

/* =========================================================
   Top Navigation
   ========================================================= */

.top-nav {
    background-color: #5D676F;
    padding: 0 5%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

    .top-nav ul {
        list-style: none;
        display: flex;
        align-items: center;
        gap: 30px;
        height: 60px;
    }

        .top-nav ul li a {
            color: #ffffff;
            text-decoration: none;
            font-size: 16px;
            font-weight: 500;
            transition: opacity 0.2s ease-in-out;
        }

            .top-nav ul li a:hover {
                opacity: 0.85;
            }

/* =========================================================
   Header (Logo + Language)
   ========================================================= */

.header-nav {
    background-color: #ffffff;
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

    /* Logo sizing */
    .header-nav .logo img {
        height: 40px; /* ✅ primary control */
        width: auto; /* ✅ keep aspect ratio */
        max-width: 160px; /* ✅ prevents wide PNG */
        object-fit: contain;
        display: block;
    }

.lang-switch {
    font-weight: bold;
    color: #5B6770;
    cursor: pointer;
}

/* Green divider line */
.page-top-line {
    width: 100%;
    height: 5px;
    background-color: #A9c23F;
}

/* =========================================================
   Hero / Top Banner
   ========================================================= */

.hero,
.top-banner {
    background-color: #A9c23F;
    color: #ffffff;
    text-align: center;
    padding: 25px 20px;
}

    .hero h2,
    .top-banner h2 {
        font-size: 26px;
        font-weight: 700;
        margin-bottom: 10px;
    }

    .hero p,
    .top-banner p {
        font-size: 16px;
        opacity: 0.95;
    }

/* =========================================================
   Cards (Landing Page)
   ========================================================= */


.cards-wrapper {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
    display: flex;
    gap: 30px;
    justify-content: center;
    align-items: stretch; /* ✅ equal height cards */
}

.main-card {
    background-color: #ffffff;
    flex: 1;
    min-width: 320px;
    max-width: 480px;
    padding: 35px;
    border-radius: 18px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    border-top: none;
    transition: none;
}

    .main-card:hover {
        transform: none;
        box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    }

    .main-card h3 {
        font-size: 22px;
        color: #5B6770;
        margin-bottom: 25px;
        display: flex;
        align-items: center;
        gap: 10px;
        border-bottom: 1px solid #eee;
        padding-bottom: 12px;
    }

    .main-card .btn-primary {
        display: block;
        margin: 32px auto 0;
        text-align: center;
        width: 100%;
        max-width: 300px;
    }


.input-group {
    margin-bottom: 18px;
}

select {
    background-color: #fff;
    cursor: pointer;
}

    select:hover {
        border-color: #A9c23F;
    }

/* -- Animation -- */
.hero {
    animation: fadeInDown 0.8s ease;
}

.main-card {
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================================
   Form Layout (Chairman Message)
   ========================================================= */
.form-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

.main-single-card {
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    border-top: none;
    overflow: hidden;
}

.section-title {
    color: #5B6770;
    font-size: 20px;
    font-weight: 700;
    margin: 30px 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-right: 4px solid #A9c23F;
    padding-right: 15px;
}

.card-content {
    padding: 45px;
}

    /* Message text */
    .card-content p {
        font-size: 15px;
        line-height: 1.9; /* ✅ spacing between lines */
        color: #5B6770;
        text-align: justify; /* ✅ cleaner reading */
        max-width: 900px; /* ✅ prevent long lines */
        margin: 0 auto; /* ✅ center content */
    }

    /* Message title */
    .card-content h2 {
        margin-bottom: 20px;
    }

/* =========================================================
   Form Elements
   ========================================================= */
label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.custom-input,
select,
textarea,
input[type="text"],
input[type="password"],
input[type="number"] {
    width: 100%;
    padding: 14px;
    border: 2px solid #e1e1e1;
    border-radius: 12px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s, background-color 0.3s;
}

    .custom-input:focus,
    select:focus,
    textarea:focus,
    input:focus {
        border-color: #A9c23F;
        background-color: #f9fdfc;
    }

textarea {
    min-height: 120px;
    resize: vertical;
}

/* Help text under inputs */
.help-text {
    display: block;
    font-size: 13px;
    color: #777;
    margin-top: 6px;
}

/* =========================================================
   Upload Zone
   ========================================================= */

.upload-zone {
    margin-top: 10px;
    border: 2px dashed #A9c23F;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    background-color: #fdfdfd;
    color: #666;
}

/* =========================================================
   Buttons
   ========================================================= */

/* Base shared style */
.btn-primary,
.btn-send {
    display: block;
    padding: 16px;
    border: none;
    border-radius: 12px;
    background-color: #A9c23F;
    color: #ffffff;
    font-weight: bold;
    font-size: 18px;
    cursor: pointer;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
}

/* ✅ FIRST PAGE BUTTONS (inside cards) → FULL WIDTH */
.main-card .btn-primary {
    width: 100%;
    margin-top: 20px;
}

/* ✅ REPORT PAGE SUBMIT BUTTON → FIXED WIDTH */
.btn-send {
    width: auto;
    padding: 16px 80px;
    margin: 40px auto 0; /* center horizontally */
    border-radius: 14px;
}

    /* Hover effect */
    .btn-primary:hover,
    .btn-send:hover {
        background-color: #EF9600;
        transform: translateY(-3px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    }

/* Mobile optimization */
@media (max-width: 768px) {
    .btn-send {
        padding: 14px 60px;
        font-size: 16px;
    }
}

/* =========================================================
   Footer
   ========================================================= */

footer {
    background-color: #5D676F;
    color: #ffffff;
    text-align: center;
    padding: 30px;
    margin-top: 60px;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 768px) {
    .header-nav {
        flex-direction: column;
        gap: 15px;
    }

    .top-nav ul {
        flex-wrap: wrap;
        gap: 15px;
    }

    .cards-wrapper {
        margin-top: 20px;
    }
}

/* ===== Management Section ===== */

.management-wrapper {
    display: flex;
    justify-content: center;
    gap: 80px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.management-person {
    text-align: center;
}

    .management-person img {
        width: 180px;
        height: 180px;
        border-radius: 50%;
        object-fit: cover;
        border: 6px solid #A9c23F; /* الأخضر */
        margin-bottom: 15px;
    }

    .management-person h4 {
        color: #5B6770;
        font-size: 18px;
        font-weight: 700;
        margin-bottom: 5px;
    }

    .management-person p {
        color: #777;
        font-size: 14px;
    }

/* --------- Validation error text ---------------------- */
.text-danger {
    color: #dc3545 !important;
    font-size: 14px;
    margin-top: 6px;
    display: block;
}

/* Highlight invalid inputs */
input.input-validation-error,
select.input-validation-error,
textarea.input-validation-error {
    border-color: #dc3545;
    outline: none;
}

/* Error message box - Track Report */
.error-box {
    background-color: #fdecea;
    border: 1px solid #f5c6cb;
    color: #a94442;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

    .error-box i {
        color: #dc3545;
        font-size: 18px;
    }

.read-only {
    /*background-color: #f8f9fa;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    color: #333;
    border: 1px solid #e0e0e0;*/

    display: block;
    width: 100%;
    background: #f9faf9;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #e5e5e5;
    font-size: 14px;
    color: #5B6770;
}

/* ==========================================
   RTL / LTR SUPPORT
========================================== */

html[dir="rtl"] {
    direction: rtl;
    text-align: right;
}

html[dir="ltr"] {
    direction: ltr;
    text-align: left;
}

    /* flip section border */
    html[dir="ltr"] .section-title {
        border-right: none;
        border-left: 4px solid #A9c23F;
        padding-left: 15px;
        padding-right: 0;
    }

.lang-switch a.active {
    color: #A9c23F;
    font-weight: bold;
}

/* ==========================================
   TABLE DESIGN (Communication)
========================================== */

.table-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
    width: 100%;
    max-width: 100%;
    margin-top: 25px;
}

    .table-card .table-responsive {
        width: 100%;
    }


.modern-table thead th {
    background-color: #A9c23F;
    color: #ffffff;
    font-weight: bold;
    text-align: center;
}

.modern-table td, .modern-table th {
    padding: 10px;
    border-bottom: 1px solid #eee;
    text-align: center;
    border: 1px solid #e5e5e5;
}


.modern-table tbody tr {
    background-color: #fff;
}

.modern-table tr:hover {
    background-color: #f9faf7;
}

.modern-table {
    width: 100% !important;
    table-layout: fixed;
    border-collapse: collapse;
}

/* Remove inline shrink behavior */
.table {
    width: 100% !important;
}

/* --------- Copy Code -----------------------*/
.copy-container {
    margin-top: 15px;
}

/* Code styling */
.report-code {
    font-size: 28px;
    font-weight: bold;
    color: #A9c23F;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

/* Button */
.btn-copy {
    background-color: #f5f7f6;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    padding: 8px 16px;
    font-size: 14px;
    color: #5B6770;
    cursor: pointer;
    transition: all 0.2s ease;
}

    /* Hover */
    .btn-copy:hover {
        background-color: #A9c23F;
        color: #fff;
        border-color: #A9c23F;
    }

    /* Icon spacing */
    .btn-copy i {
        margin-right: 6px;
    }

/* ---- Security Questions ----- */
.security-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.security-col {
    flex: 1;
}

@media (max-width: 768px) {
    .security-row {
        flex-direction: column;
    }
}

.security-note {
    display: block;
    margin-top: -8px;
    margin-bottom: 20px;
    color: #6c757d;
    font-size: 14px;
    line-height: 1.5;
    text-align: right;
}

html[dir="rtl"] .security-note {
    text-align: right;
}

html[dir="ltr"] .security-note {
    text-align: left;
}

/* --------- General ----------------------- */

.input-group {
    margin-bottom: 18px;
}

input[type="radio"] {
    margin: 0 5px;
}

.input-group label {
    display: block;
    width: 100%;
    margin-bottom: 6px;
    color: #5B6770;
}

.input-group .read-only {
    width: 100%;
}

.success-box {
    background-color: #e6f4ea;
    border-left: 6px solid #A9c23F;
    padding: 12px 16px;
    margin-top: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    color: #2d6a4f;
    font-weight: 500;
}


.lang-switch a {
    text-decoration: none;
    color: #5B6770;
    font-weight: 500;
    margin: 0 5px;
}

    /* ✅ ACTIVE LANGUAGE */
    .lang-switch a.active {
        color: #A9c23F;
        font-weight: bold;
        border-bottom: 2px solid #A9c23F;
    }

/* Mandatory Assign */
.required {
    color: red;
    font-weight: bold;
}
