@charset "UTF-8";

/*======
*
* Services Grid Styling
* Beautiful grid layout for displaying services with photos
*
======*/

/* Prevent overflow issues */
* {
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
}

/* Services Grid Container */
.services-grid-container {
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

/* Category Section */
.services-category {
    margin-bottom: 4rem;
}

.services-category:last-child {
    margin-bottom: 2rem;
}

/* Category Title */
.services-category-title {
    font-family: var(--font-primary);
    font-size: var(--font-size-3xl);
    font-weight: var(--font-weight-bold);
    color: #1a1a1a;
    text-align: center;
    margin-bottom: 2.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.services-category-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(135deg, #007cba, #64b5f6);
    border-radius: 2px;
}

/* Professional Services Grid */
.services-grid {
    display: grid;
    gap: 1.5rem;
    margin: 0 auto 3rem auto;
    padding: 1rem;
    background: rgba(0, 34, 56, 0.02);
    border-radius: 12px;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

/* Fixed Grid Columns - Equal Sizes */
.services-columns-2 {
    grid-template-columns: repeat(2, 1fr);
}

.services-columns-3 {
    grid-template-columns: repeat(3, 1fr);
}

.services-columns-4 {
    grid-template-columns: repeat(4, 1fr);
}

.services-columns-5 {
    grid-template-columns: repeat(4, 1fr);
}

/* Professional Service Card Design */
.service-item {
    background: #002238;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 
        0 8px 25px rgba(0, 34, 56, 0.15),
        0 4px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.1);
    height: 320px;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Formal hover effect with golden accent */
.service-item:hover {
    transform: translateY(-8px);
    box-shadow: 
        0 12px 35px rgba(0, 34, 56, 0.25),
        0 6px 15px rgba(253, 169, 53, 0.15);
    border-color: #fda935;
}

/* Professional Service Image Design */
.service-image-wrapper {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.service-image {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: linear-gradient(135deg, #003055 0%, #002238 100%);
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
    filter: brightness(0.9) contrast(1.1);
}

/* Clean professional hover effect */
.service-item:hover .service-image img {
    transform: scale(1.05);
    filter: brightness(1) contrast(1.2);
}

/* Professional Service Icon */
.service-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    background: rgba(0, 34, 56, 0.9);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.service-icon i {
    font-size: 1.4rem;
    color: #ffffff;
    transition: all 0.3s ease;
}

/* Professional hover effect with golden accent */
.service-item:hover .service-icon {
    background: #fda935;
    transform: scale(1.1);
    box-shadow: 0 6px 18px rgba(253, 169, 53, 0.3);
}

.service-item:hover .service-icon i {
    color: #002238;
    transform: scale(1.1);
}

/* Professional Service Content Design */
.service-content {
    padding: 1.5rem;
    text-align: center;
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Professional service titles with ellipsis */
.service-name,
.service-title {
    font-family: 'Cairo', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    color: #ffffff;
    margin: 0;
    transition: all 0.3s ease;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    
    /* Text ellipsis for overflow */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* Professional hover effect with golden accent */
.service-item:hover .service-name,
.service-item:hover .service-title {
    color: #fda935;
    transform: translateY(-2px);
}

/* Service excerpt with ellipsis */
.service-excerpt {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    margin-top: 0.8rem;
    line-height: 1.5;
    transition: all 0.3s ease;
    font-weight: 400;
    
    /* Multi-line ellipsis */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 4.5em; /* 3 lines * 1.5 line-height */
}

.service-item:hover .service-excerpt {
    color: rgba(255, 255, 255, 0.95);
}

/* Arabic Text Support */
.services-grid-container[dir="rtl"] .service-content,
.services-grid-container[dir="rtl"] .services-category-title {
    text-align: right;
}

.services-grid-container[dir="rtl"] .services-category-title {
    text-align: center;
}

.services-grid-container[dir="rtl"] .service-icon {
    right: auto;
    left: 15px;
}

/* Professional Placeholder */
.service-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #003055 0%, #002238 100%);
    color: rgba(255, 255, 255, 0.4);
    font-size: 3rem;
    transition: all 0.3s ease;
}

.service-item:hover .service-placeholder {
    color: #fda935;
    transform: scale(1.05);
}

/* Loading State for Images */
.service-image img[src*="placeholder.jpg"] {
    opacity: 0.6;
    filter: grayscale(100%);
}

/* Service Link Styling */
.service-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.service-link:hover,
.service-link:focus {
    text-decoration: none;
    color: inherit;
}

/* Professional Responsive Design */
@media (max-width: 1200px) {
    .services-grid-container {
        padding: 0 0.5rem;
    }
    
    .services-columns-4,
    .services-columns-5 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .services-grid {
        gap: 1.2rem;
        padding: 0.8rem;
    }
    
    .service-item {
        height: 300px;
    }
    
    .service-image-wrapper {
        height: 160px;
    }
}

@media (max-width: 900px) {
    .services-columns-3,
    .services-columns-4,
    .services-columns-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .services-grid-container {
        padding: 0;
        margin: 1rem auto;
    }
    
    .services-grid {
        gap: 1rem;
        padding: 0.5rem;
    }
    
    .services-columns-2,
    .services-columns-3,
    .services-columns-4,
    .services-columns-5 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .service-item {
        height: 280px;
    }
    
    .service-image-wrapper {
        height: 140px;
    }
    
    .service-content {
        padding: 1.2rem;
    }
    
    .service-name,
    .service-title {
        font-size: 1rem;
    }
    
    .service-excerpt {
        font-size: 0.8rem;
        -webkit-line-clamp: 2;
        max-height: 3em;
    }
}

@media (max-width: 480px) {
    .services-grid-container {
        padding: 0;
    }
    
    .services-grid {
        gap: 0.8rem;
        padding: 0.3rem;
    }
    
    .services-columns-2,
    .services-columns-3,
    .services-columns-4,
    .services-columns-5 {
        grid-template-columns: 1fr;
    }
    
    .service-item {
        height: 260px;
    }
    
    .service-image-wrapper {
        height: 120px;
    }
    
    .service-content {
        padding: 1rem;
    }
    
    .service-icon {
        width: 40px;
        height: 40px;
        top: 10px;
        right: 10px;
    }
    
    .service-icon i {
        font-size: 1.2rem;
    }
    
    .service-name,
    .service-title {
        font-size: 0.95rem;
    }
}

/* Dark Theme Support */
.gt-dark .service-item {
    background: #2c2c2c;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.gt-dark .service-item:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.gt-dark .services-category-title {
    color: #ffffff;
}

.gt-dark .service-name {
    color: #ffffff;
}

.gt-dark .service-item:hover .service-name {
    color: #64b5f6;
}

.gt-dark .service-image {
    background: linear-gradient(135deg, #3a3a3a, #2c2c2c);
}

/* Professional Entrance Animation */
@keyframes professionalFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Professional card entrance */
.service-item {
    animation: professionalFadeIn 0.6s ease-out both;
}

/* Staggered entrance timing */
.service-item:nth-child(1) { animation-delay: 0.1s; }
.service-item:nth-child(2) { animation-delay: 0.2s; }
.service-item:nth-child(3) { animation-delay: 0.3s; }
.service-item:nth-child(4) { animation-delay: 0.4s; }
.service-item:nth-child(5) { animation-delay: 0.5s; }
.service-item:nth-child(6) { animation-delay: 0.6s; }
.service-item:nth-child(7) { animation-delay: 0.7s; }
.service-item:nth-child(8) { animation-delay: 0.8s; }

/* Print Styles */
@media print {
    .services-grid-container {
        margin: 1rem 0;
    }
    
    .service-item {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
        margin-bottom: 1rem;
    }
    
    .service-image {
        height: 150px;
    }
    
    .service-icon {
        background: #000 !important;
    }
    
    .services-category-title,
    .service-name {
        color: #000 !important;
    }
}