/*
========================================
   Masraty Enhanced Styles
   ملف CSS محسّن وشامل لموقع مسرتي
========================================
*/

/* ========================================
   1. الهيدر المحسّن (Enhanced Header)
======================================== */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: linear-gradient(135deg, #1A4D7C 0%, #2A5D8C 100%);
    box-shadow: 0 4px 20px rgba(26, 77, 124, 0.15);
    transition: all 0.3s ease;
}

.site-header.scrolled {
    box-shadow: 0 4px 30px rgba(26, 77, 124, 0.25);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 2rem;
}

.site-logo img {
    height: 50px;
    width: auto;
    transition: transform 0.3s ease;
}

.site-logo:hover img {
    transform: scale(1.05);
}

/* التنقل الرئيسي */
.main-navigation {
    display: none;
}

@media (min-width: 1024px) {
    .main-navigation {
        display: block;
        flex: 1;
    }
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    font-size: 1.05rem;
    font-weight: 600;
    color: #FFFFFF;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding-bottom: 5px;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #1FD9A6;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #1FD9A6;
}

/* أزرار الهيدر */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.btn-header {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.65rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.btn-publish {
    background: #1FD9A6;
    color: #FFFFFF;
}

.btn-publish:hover {
    background: #1AC299;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(31, 217, 166, 0.3);
}

.btn-login {
    background: rgba(255, 255, 255, 0.15);
    color: #FFFFFF;
    backdrop-filter: blur(10px);
}

.btn-login:hover {
    background: rgba(255, 255, 255, 0.25);
}

.btn-dashboard,
.btn-logout {
    background: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
}

.btn-dashboard:hover,
.btn-logout:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* إخفاء النصوص على الشاشات الصغيرة */
@media (max-width: 768px) {
    .btn-text-desktop {
        display: none;
    }
    
    .btn-header {
        padding: 0.65rem;
        min-width: 44px;
        justify-content: center;
    }
    
    .btn-header span:not(.btn-text-desktop) {
        display: none;
    }
    
    .btn-publish span {
        display: inline;
    }
}

/* زر القائمة المحمولة */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

@media (min-width: 1024px) {
    .mobile-menu-toggle {
        display: none;
    }
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background: #FFFFFF;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(10.5px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-10.5px) rotate(-45deg);
}

/* القائمة المحمولة */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-content {
    position: absolute;
    top: 80px;
    right: 0;
    width: 100%;
    max-width: 400px;
    background: linear-gradient(135deg, #1A4D7C 0%, #2A5D8C 100%);
    padding: 2rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-nav-overlay.active .mobile-nav-content {
    transform: translateX(0);
}

.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav-menu li {
    margin: 0;
    padding: 0;
}

.mobile-nav-menu a {
    display: block;
    padding: 1rem;
    color: #FFFFFF;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.mobile-nav-menu a:hover {
    background: rgba(31, 217, 166, 0.1);
    color: #1FD9A6;
    padding-right: 1.5rem;
}

.mobile-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.2);
    margin: 1rem 0;
}

body.mobile-menu-open {
    overflow: hidden;
}

/* ========================================
   2. Hero Section المحسّن
======================================== */
.hero-section-enhanced {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, #1A4D7C 0%, #2A5D8C 50%, #1FD9A6 100%);
}

/* الخلفية المتحركة */
.hero-animated-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.hero-shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    animation: float 20s infinite ease-in-out;
}

.hero-shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.hero-shape-2 {
    width: 200px;
    height: 200px;
    top: 60%;
    right: 15%;
    animation-delay: 5s;
}

.hero-shape-3 {
    width: 150px;
    height: 150px;
    bottom: 20%;
    left: 20%;
    animation-delay: 10s;
}

.hero-shape-4 {
    width: 250px;
    height: 250px;
    top: 30%;
    right: 30%;
    animation-delay: 15s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.1);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.9);
    }
    75% {
        transform: translate(20px, 30px) scale(1.05);
    }
}

/* الجزيئات المتحركة */
.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: particle-float 15s infinite ease-in-out;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; }
.particle:nth-child(4) { left: 40%; animation-delay: 6s; }
.particle:nth-child(5) { left: 50%; animation-delay: 8s; }
.particle:nth-child(6) { left: 60%; animation-delay: 10s; }
.particle:nth-child(7) { left: 70%; animation-delay: 12s; }
.particle:nth-child(8) { left: 80%; animation-delay: 14s; }

@keyframes particle-float {
    0% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 77, 124, 0.3);
    z-index: 2;
}

.hero-content-enhanced {
    position: relative;
    z-index: 3;
    text-align: center;
    color: #FFFFFF;
    padding: 3rem 0;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: rgba(31, 217, 166, 0.2);
    border: 1px solid rgba(31, 217, 166, 0.5);
    border-radius: 50px;
    color: #FFFFFF;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
    animation: fadeInUp 0.8s ease;
}

.hero-title-enhanced {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-subtitle-enhanced {
    font-size: 2rem;
    font-weight: 600;
    color: #1FD9A6;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.6s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* نموذج البحث المحسّن */
.hero-search-form-enhanced {
    animation: fadeInUp 0.8s ease 0.8s both;
}

.search-box-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #FFFFFF;
    padding: 0.75rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 900px;
    margin: 0 auto;
}

.search-input-group {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
}

.search-icon-wrapper {
    color: #6B7280;
}

.search-input-enhanced {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #1F2937;
}

.search-input-enhanced::placeholder {
    color: #9CA3AF;
}

.search-select-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-right: 1px solid #E5E7EB;
    color: #6B7280;
}

.search-select-enhanced {
    border: none;
    outline: none;
    font-size: 1rem;
    color: #1F2937;
    background: transparent;
    cursor: pointer;
}

.btn-search-enhanced {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: #1FD9A6;
    color: #FFFFFF;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-search-enhanced:hover {
    background: #1AC299;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(31, 217, 166, 0.3);
}

/* Responsive Hero */
@media (max-width: 768px) {
    .hero-section-enhanced {
        min-height: 500px;
    }
    
    .hero-title-enhanced {
        font-size: 2rem;
    }
    
    .hero-subtitle-enhanced {
        font-size: 1.5rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .search-box-wrapper {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .search-input-group,
    .search-select-group {
        width: 100%;
        border: none;
        border-bottom: 1px solid #E5E7EB;
    }
    
    .search-select-group {
        border-right: none;
    }
    
    .btn-search-enhanced {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   3. قسم الفئات بالأيقونات
======================================== */
.categories-section-enhanced {
    padding: 4rem 0;
    background: #F9FAFB;
}

.section-header-enhanced {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title-enhanced {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1A4D7C;
    margin-bottom: 0.75rem;
}

.section-subtitle-enhanced {
    font-size: 1.1rem;
    color: #6B7280;
}

.categories-grid-horizontal {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.category-card-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1.5rem;
    background: #FFFFFF;
    border-radius: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.category-card-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--category-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-card-icon:hover::before {
    transform: scaleX(1);
}

.category-card-icon:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.1);
}

.category-icon-wrapper {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--category-color);
    border-radius: 20px;
    margin-bottom: 1.25rem;
    transition: all 0.3s ease;
}

.category-icon-wrapper svg {
    color: #FFFFFF;
    transition: transform 0.3s ease;
}

.category-card-icon:hover .category-icon-wrapper {
    transform: scale(1.1) rotate(5deg);
}

.category-card-icon:hover .category-icon-wrapper svg {
    transform: scale(1.1);
}

.category-info-icon {
    text-align: center;
}

.category-name-icon {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 0.5rem;
}

.category-count-icon {
    font-size: 0.9rem;
    color: #6B7280;
}

/* Responsive Categories */
@media (max-width: 640px) {
    .categories-grid-horizontal {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .category-card-icon {
        padding: 1.5rem 1rem;
    }
    
    .category-icon-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .category-icon-wrapper svg {
        width: 32px;
        height: 32px;
    }
}

/* ========================================
   4. البنرات الإعلانية
======================================== */
.banners-slider-section {
    padding: 3rem 0;
    background: #FFFFFF;
}

.banners-slider {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
}

.banner-slide {
    display: none;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
    padding: 3rem;
    border-radius: 16px;
    min-height: 300px;
}

.banner-slide:first-child {
    display: grid;
}

.banner-content {
    color: #FFFFFF;
}

.banner-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1rem;
    backdrop-filter: blur(10px);
}

.banner-content h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.banner-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.btn-banner {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    background: #FFFFFF;
    color: #1A4D7C;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.banner-image {
    display: flex;
    align-items: center;
    justify-content: center;
}

.banner-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.slider-dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #D1D5DB;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dot.active {
    background: #1A4D7C;
    width: 32px;
    border-radius: 6px;
}

/* Responsive Banners */
@media (max-width: 768px) {
    .banner-slide {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem;
    }
    
    .banner-content h3 {
        font-size: 1.5rem;
    }
    
    .banner-image {
        order: -1;
    }
}

/* ========================================
   5. الخدمات المميزة
======================================== */
.featured-services-section-enhanced {
    padding: 4rem 0;
    background: #FFFFFF;
}

.services-grid-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.service-card-enhanced {
    background: #FFFFFF;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.service-card-enhanced:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.service-image-enhanced {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.service-image-enhanced img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.service-card-enhanced:hover .service-image-enhanced img {
    transform: scale(1.1);
}

.service-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
}

.service-badge-featured {
    padding: 0.4rem 0.85rem;
    background: #1FD9A6;
    color: #FFFFFF;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 600;
}

.service-favorite {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.service-favorite:hover {
    background: #FFFFFF;
    transform: scale(1.1);
}

.service-favorite svg {
    color: #EF4444;
}

.service-content-enhanced {
    padding: 1.5rem;
}

.service-header-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.service-title-enhanced {
    flex: 1;
}

.service-title-enhanced a {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1F2937;
    text-decoration: none;
    transition: color 0.3s ease;
}

.service-title-enhanced a:hover {
    color: #1A4D7C;
}

.service-rating-enhanced {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    color: #FFC107;
    font-weight: 600;
}

.service-location-enhanced {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6B7280;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.service-excerpt-enhanced {
    color: #6B7280;
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.service-footer-enhanced {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid #E5E7EB;
}

.service-price-enhanced {
    display: flex;
    flex-direction: column;
}

.price-label {
    font-size: 0.8rem;
    color: #9CA3AF;
}

.price-amount {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1A4D7C;
}

.btn-view-service {
    padding: 0.65rem 1.5rem;
    background: #1FD9A6;
    color: #FFFFFF;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-view-service:hover {
    background: #1AC299;
    transform: translateY(-2px);
}

/* Responsive Services */
@media (max-width: 640px) {
    .services-grid-enhanced {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   6. قسم CTA
======================================== */
.cta-section {
    padding: 5rem 0;
    background: linear-gradient(135deg, #1A4D7C 0%, #2A5D8C 100%);
    color: #FFFFFF;
    text-align: center;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-icon {
    margin-bottom: 2rem;
}

.cta-icon svg {
    color: #1FD9A6;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.btn-white {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    background: #FFFFFF;
    color: #1A4D7C;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-white:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* Responsive CTA */
@media (max-width: 768px) {
    .cta-title {
        font-size: 2rem;
    }
    
    .cta-subtitle {
        font-size: 1rem;
    }
}

/* ========================================
   7. إصلاحات عامة Responsive
======================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* منع التمرير الأفقي */
body {
    overflow-x: hidden;
}

/* إصلاح الفراغات الجانبية */
* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   8. الأنيميشن العامة
======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
