/* General Styling */
body {
    font-family: 'Cairo', sans-serif; /* Using a more modern Arabic-friendly font */
    margin: 0;
    padding: 0;
    background-color: #f0f2f5; /* Lighter background */
    color: #333;
    direction: rtl; /* Right-to-left for Arabic */
    text-align: right;
    line-height: 1.6;
}

header {
    background-color: #2c3e50; /* Dark blue/grey */
    color: #ecf0f1;
    padding: 15px 25px;
    display: flex;
    flex-wrap: wrap; /* Allow wrapping for responsiveness */
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

header h1 {
    margin: 0;
    font-size: 2.2em;
    font-weight: 700;
}

header .location {
    font-size: 0.9em;
    opacity: 0.8;
    margin-top: 5px;
}

header nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px; /* Space between buttons */
    margin-right: 20px; /* Adjust if needed for RTL */
}

header nav button {
    background-color: #3498db; /* Blue */
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 25px; /* More rounded buttons */
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 0.95em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px; /* Space between icon and text */
}

header nav button:hover {
    background-color: #2980b9; /* Darker blue on hover */
    transform: translateY(-2px);
}

header nav button i {
    font-size: 1.1em;
}

main {
    padding: 25px;
    max-width: 1300px; /* Slightly wider main content */
    margin: 25px auto;
    background-color: #fff;
    border-radius: 12px; /* More rounded corners */
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

h2 {
    color: #2c3e50;
    font-size: 2em;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
    padding-bottom: 10px;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #3498db;
    border-radius: 2px;
}

/* Section Management */
.hidden-section {
    display: none;
}

.active-section {
    display: block;
}

/* Authentication Form */
.auth-form {
    background-color: #f9f9f9;
    padding: 35px;
    border-radius: 10px;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.08);
    max-width: 450px; /* Slightly wider form */
    margin: 40px auto;
    text-align: center;
}

.auth-form h3 {
    color: #2c3e50;
    margin-bottom: 30px;
    font-size: 1.6em;
}

.auth-form input[type="email"],
.auth-form input[type="password"] {
    width: calc(100% - 24px); /* Account for padding */
    padding: 14px;
    margin-bottom: 18px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1.05em;
    transition: border-color 0.3s ease;
}
.auth-form input[type="email"]:focus,
.auth-form input[type="password"]:focus {
    border-color: #3498db;
    outline: none;
}

.auth-form .user-type {
    margin-bottom: 25px;
    display: flex;
    justify-content: center;
    gap: 25px;
}

.auth-form .user-type label {
    font-size: 1.15em;
    color: #555;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}
.auth-form .user-type input[type="radio"] {
    transform: scale(1.2); /* Larger radio buttons */
}

.auth-form button {
    background-color: #27ae60; /* Green */
    color: white;
    border: none;
    padding: 13px 30px;
    margin: 0 12px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 1.15em;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.auth-form button:hover {
    background-color: #219d52; /* Darker green on hover */
    transform: translateY(-2px);
}

/* Dashboard Menu */
.dashboard-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px; /* More space */
    margin-top: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid #eee;
}

.dashboard-menu button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 18px 30px;
    border-radius: 10px; /* Slightly less rounded than header */
    cursor: pointer;
    font-size: 1.15em;
    display: flex;
    flex-direction: column; /* Icon above text */
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    flex: 1 1 auto;
    max-width: 280px; /* Slightly larger buttons */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.dashboard-menu button:hover {
    background-color: #2980b9;
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.dashboard-menu button i {
    font-size: 2em; /* Larger icons */
    margin-bottom: 5px;
}

/* Content Sections */
#clientContent,
#workshopContent {
    margin-top: 35px;
    background-color: #ecf0f1;
    padding: 30px;
    border-radius: 10px;
    min-height: 250px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.08);
}

#clientContent h3,
#workshopContent h3 {
    color: #2c3e50;
    border-bottom: 2px solid #3498db;
    padding-bottom: 12px;
    margin-bottom: 25px;
    font-size: 1.8em;
}

/* Form elements within content sections */
.content-form input,
.content-form select,
.content-form textarea {
    width: calc(100% - 24px);
    padding: 12px;
    margin-bottom: 18px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1.0em;
    transition: border-color 0.3s ease;
}
.content-form input:focus,
.content-form select:focus,
.content-form textarea:focus {
    border-color: #3498db;
    outline: none;
}

.content-form button {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1.05em;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 10px;
}

.content-form button:hover {
    background-color: #219d52;
    transform: translateY(-2px);
}

/* Workshop list styling (example) */
.workshop-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Slightly wider cards */
    gap: 25px;
    margin-top: 25px;
}

.workshop-card {
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: right;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.workshop-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.workshop-card h4 {
    margin-top: 0;
    color: #3498db;
    font-size: 1.5em;
    margin-bottom: 10px;
}

.workshop-card p {
    margin-bottom: 8px;
    color: #555;
}

.workshop-card .rating {
    color: #f39c12; /* Star color */
    font-size: 1.1em;
    margin-bottom: 12px;
}
.workshop-card button {
    background-color: #34495e; /* Darker blue/grey */
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s ease;
}
.workshop-card button:hover {
    background-color: #2c3e50;
}

/* Footer */
footer {
    text-align: center;
    padding: 25px;
    margin-top: 50px;
    background-color: #2c3e50;
    color: #ecf0f1;
    box-shadow: 0 -3px 8px rgba(0, 0, 0, 0.25);
    font-size: 0.95em;
}

/* Chat Room Specific Styling */
.chat-container {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    max-width: 700px;
    margin: 30px auto;
    display: flex;
    flex-direction: column;
    height: 500px; /* Fixed height for chat area */
}

.chat-messages {
    flex-grow: 1;
    overflow-y: auto;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 15px;
    background-color: #fcfcfc;
}

.message {
    margin-bottom: 15px;
    padding: 10px 15px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.client-message {
    background-color: #e0f7fa; /* Light blue */
    align-self: flex-end; /* Not fully functional without JS adding it to the element */
    margin-right: auto; /* Align to the right */
}

.workshop-message {
    background-color: #e8f5e9; /* Light green */
    align-self: flex-start; /* Not fully functional without JS adding it to the element */
    margin-left: auto; /* Align to the left */
}

.system-message {
    background-color: #ffe0b2; /* Light orange */
    text-align: center;
    color: #8d6e63;
    font-style: italic;
    font-size: 0.9em;
    margin: 10px auto;
    max-width: 90%;
}

.message p {
    margin: 0;
}

.message strong {
    color: #2c3e50;
}

.chat-input {
    display: flex;
    gap: 10px;
}

.chat-input input {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    font-size: 1em;
}

.chat-input button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}
.chat-input button:hover {
    background-color: #2980b9;
}

/* Services Section Styling */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 30px;
    margin-bottom: 50px;
}

.service-card {
    background-color: #fcfcfc;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.service-card .service-icon {
    font-size: 3.5em;
    color: #3498db;
    margin-bottom: 15px;
}

.service-card h3 {
    color: #2c3e50;
    font-size: 1.6em;
    margin-bottom: 10px;
}

.service-card p {
    color: #666;
    font-size: 0.95em;
}

.premium-service {
    background-color: #fff3e0; /* Light orange background for premium */
    border-color: #ffb74d; /* Orange border */
}
.premium-service .service-icon {
    color: #f39c12; /* Gold color for star icon */
}

.premium-info {
    background-color: #e3f2fd; /* Light blue background */
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-left: 5px solid #2196f3; /* Blue left border */
}

.premium-info h3 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-top: 0;
    margin-bottom: 15px;
}

.premium-info p {
    font-size: 1.05em;
    color: #444;
    margin-bottom: 10px;
}

.premium-info ul {
    list-style: none;
    padding: 0;
    margin-bottom: 20px;
}

.premium-info ul li {
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="%2327ae60"><path d="M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"/></svg>') no-repeat right center; /* Checkmark icon */
    background-size: 18px;
    padding-right: 25px; /* Space for icon */
    margin-bottom: 8px;
    color: #555;
}

/* Contact Us Section Styling */
.contact-info-card {
    background-color: #fcfcfc;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 30px;
    max-width: 600px;
    margin: 30px auto;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.contact-info-card h3 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 20px;
}

.contact-info-card p {
    font-size: 1.2em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: #555;
}

.contact-info-card p i {
    color: #3498db;
    font-size: 1.4em;
}

.contact-info-card a {
    color: #3498db;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}
.contact-info-card a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.contact-info-card hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 25px 0;
}

.contact-info-card .note {
    font-size: 0.9em;
    color: #888;
    margin-top: -10px;
    margin-bottom: 20px;
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }
    header .header-left {
        width: 100%;
        text-align: center;
        align-items: center;
        margin-bottom: 15px;
    }
    header nav {
        margin-right: 0;
        justify-content: center;
        width: 100%;
    }
    header nav button {
        flex-grow: 1; /* Make buttons expand */
        max-width: unset;
    }
    .dashboard-menu button {
        max-width: unset;
        width: 100%;
    }
    .services-grid {
        grid-template-columns: 1fr;
    }
    .chat-container {
        height: 400px; /* Shorter on smaller screens */
    }
    .message {
        max-width: 95%; /* Wider messages */
    }
}

@media (max-width: 576px) {
    main {
        padding: 15px;
        margin: 15px auto;
    }
    h2 {
        font-size: 1.6em;
    }
    .auth-form {
        padding: 25px;
    }
    .auth-form button {
        font-size: 1em;
        padding: 10px 20px;
        margin: 0 5px;
    }
    .dashboard-menu button {
        font-size: 1em;
        padding: 12px 15px;
    }
    .service-card, .contact-info-card {
        padding: 20px;
    }
    .service-card .service-icon {
        font-size: 3em;
    }
    .contact-info-card p {
        flex-direction: column; /* Stack phone numbers */
        gap: 5px;
    }
    .chat-input {
        flex-direction: column;
    }
    .chat-input button {
        width: 100%;
        justify-content: center;
    }
}