* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #b6a686;
    --white: #ffffff;
    --text-dark: #333;
    --text-light: #666;
    --border-color: #ddd;
    --success-color: #28a745;
    --error-color: #dc3545;
}

html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--white);
    color: var(--text-dark);
    line-height: 1.6;
    direction: rtl;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* زر الواتساب */
.whatsapp-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: transform 0.3s ease;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.whatsapp-btn:hover,
.whatsapp-btn:active {
    transform: scale(1.1);
}

.whatsapp-btn:focus {
    outline: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 3px rgba(37, 211, 102, 0.3);
}

/* الهيدر */
.header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #9a8a6f 100%);
    color: var(--white);
    padding: 40px 0;
    text-align: center;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.logo {
    max-width: 120px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.header-text {
    flex: 1;
    min-width: 200px;
}

.header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* قسم الخدمات */
.services-section {
    padding: 60px 0;
    background-color: #f8f8f8;
}

.services-section h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 40px;
    color: var(--primary-color);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-card i {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-card h3 {
    color: var(--text-dark);
    margin-bottom: 15px;
}

.service-card p {
    color: var(--text-light);
}

/* قسم الحجز */
.booking-section {
    padding: 60px 0;
}

.booking-section h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 40px;
    color: var(--primary-color);
}

.booking-form,
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-dark);
    font-weight: 600;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    font-family: inherit;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(182, 166, 134, 0.1);
}

/* تحسين select على الموبايل */
.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    padding-right: 12px;
    padding-left: 35px;
}

@media (max-width: 768px) {
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* منع التكبير التلقائي على iOS */
    }
}

/* التقويم */
.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-top: 15px;
}

.calendar-header {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin-bottom: 10px;
    font-weight: bold;
    text-align: center;
}

.calendar-day {
    padding: 15px;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--white);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.calendar-day:hover {
    background-color: #f0f0f0;
}

.calendar-day:active {
    transform: scale(0.95);
}

.calendar-day.selected {
    background-color: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.calendar-day.disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.calendar-day.today {
    border-color: var(--primary-color);
    font-weight: bold;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-nav button {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.calendar-nav button:hover {
    background: #9a8a6f;
}

.calendar-nav button:active {
    transform: scale(0.95);
}

.calendar-nav span {
    font-size: 18px;
    font-weight: bold;
}

/* الأزرار */
.btn-submit {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 5px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.btn-submit:hover {
    background-color: #9a8a6f;
}

.btn-submit:active {
    transform: scale(0.98);
}

/* قسم اتصل بنا */
.contact-section {
    padding: 60px 0;
    background-color: #f8f8f8;
}

.contact-section h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 40px;
    color: var(--primary-color);
}

/* الفوتر */
.footer {
    background-color: var(--text-dark);
    color: var(--white);
    text-align: center;
    padding: 30px 0;
}

/* الرسائل */
.message {
    padding: 15px;
    margin: 20px 0;
    border-radius: 5px;
    text-align: center;
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* لوحة التحكم */
.admin-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #9a8a6f 100%);
    color: var(--white);
    padding: 20px 0;
    margin-bottom: 30px;
}

.admin-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-nav {
    display: flex;
    gap: 20px;
}

.admin-nav a {
    color: var(--white);
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.admin-nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-table th,
.admin-table td {
    padding: 15px;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

.admin-table th {
    background-color: var(--primary-color);
    color: var(--white);
    font-weight: bold;
}

.admin-table tr:hover {
    background-color: #f8f8f8;
}

.btn {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-success {
    background-color: var(--success-color);
    color: var(--white);
}

.btn-danger {
    background-color: var(--error-color);
    color: var(--white);
}

.btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

/* التقويم في لوحة التحكم */
.admin-calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    margin: 20px 0;
}

.calendar-cell {
    min-height: 100px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    background: var(--white);
}

.calendar-cell.has-booking {
    background-color: #fff3cd;
}

.booking-item {
    background: var(--primary-color);
    color: var(--white);
    padding: 5px;
    margin: 5px 0;
    border-radius: 3px;
    font-size: 12px;
}

/* التقارير */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.report-card {
    background: var(--white);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.report-card h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.report-card .value {
    font-size: 2.5em;
    font-weight: bold;
    color: var(--text-dark);
    margin: 15px 0;
}

/* صفحة تسجيل الدخول */
.login-container {
    max-width: 400px;
    margin: 100px auto;
    padding: 40px;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.login-container h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
}

/* الصور */
.payment-receipt {
    max-width: 300px;
    max-height: 300px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    margin: 10px 0;
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 30px 0;
    }
    
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .logo {
        max-width: 100px;
        max-height: 100px;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .header p {
        font-size: 1em;
    }
    
    .services-section {
        padding: 40px 0;
    }
    
    .services-section h2 {
        font-size: 1.5em;
        margin-bottom: 30px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .service-card {
        padding: 20px;
    }
    
    .booking-section,
    .contact-section {
        padding: 40px 0;
    }
    
    .booking-section h2,
    .contact-section h2 {
        font-size: 1.5em;
        margin-bottom: 30px;
    }
    
    .booking-form,
    .contact-form {
        padding: 25px 20px;
    }
    
    .calendar {
        grid-template-columns: repeat(7, 1fr);
        gap: 5px;
    }
    
    .calendar-header {
        gap: 5px;
        font-size: 12px;
    }
    
    .calendar-day {
        padding: 8px 4px;
        font-size: 12px;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .calendar-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .calendar-nav button {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .calendar-nav span {
        font-size: 16px;
    }
    
    .whatsapp-btn {
        width: 55px;
        height: 55px;
        font-size: 28px;
        bottom: 20px;
        left: 20px;
    }
    
    .admin-nav {
        flex-direction: column;
        gap: 10px;
        flex-wrap: wrap;
    }
    
    .admin-nav a {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    .admin-table {
        font-size: 14px;
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    
    .admin-table th,
    .admin-table td {
        padding: 10px 8px;
        font-size: 12px;
    }
    
    .admin-table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 20px 0;
    }
    
    .footer {
        padding: 20px 0;
        font-size: 14px;
    }
}

/* للأجهزة الصغيرة جداً (آيفون SE وأصغر) */
@media (max-width: 375px) {
    .header h1 {
        font-size: 1.5em;
    }
    
    .logo {
        max-width: 80px;
        max-height: 80px;
    }
    
    .services-section h2,
    .booking-section h2,
    .contact-section h2 {
        font-size: 1.3em;
    }
    
    .calendar-day {
        padding: 6px 3px;
        font-size: 11px;
        min-height: 35px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 14px;
        padding: 10px;
    }
    
    .btn-submit {
        padding: 12px;
        font-size: 16px;
    }
    
    .whatsapp-btn {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
}

/* للأجهزة اللوحية */
@media (min-width: 769px) and (max-width: 1024px) {
    .header h1 {
        font-size: 2.2em;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .calendar-day {
        padding: 12px 8px;
    }
}

/* للأجهزة الكبيرة */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
    }
}
