/* ===================================
   CMRDI Website - Main Stylesheet
   =================================== */

   :root {
    --primary-color: #1e3a8a;
    --secondary-color: #3b82f6;
    --accent-color: #f59e0b;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --text-color: #374151;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #ffffff;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--dark-color);
}

.section-title {
    position: relative;
    padding-bottom: 15px;
    margin-bottom: 30px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }

/* Header Styles */
.main-header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background-color: var(--dark-color);
    font-size: 0.9rem;
}

.navbar {
    padding: 0.5rem 0;
}

.navbar-brand h5 {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    color: var(--dark-color) !important;
    transition: var(--transition);
    padding: 0.5rem 1rem !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--box-shadow);
    border-radius: var(--border-radius);
}

.dropdown-item:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/pattern.png') repeat;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Department Cards */
.dept-card {
    border-left: 4px solid var(--primary-color);
}

.dept-icon {
    width: 60px;
    height: 60px;
    background-color: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Timeline for Presidents */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--primary-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 30px;
    padding-left: 30px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -36px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--primary-color);
}

.timeline-content {
    background-color: white;
    padding: 20px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.5rem 1.5rem;
    transition: var(--transition);
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #1e40af;
    border-color: #1e40af;
    transform: translateY(-2px);
}

/* Footer */
.main-footer {
    background-color: var(--dark-color);
    color: #9ca3af;
}

.main-footer h5,
.main-footer h6 {
    color: white;
}

.main-footer a:hover {
    color: var(--secondary-color) !important;
}

.text-light-50 {
    color: rgba(255, 255, 255, 0.75);
}

#newsletterForm .form-control {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

#newsletterForm .form-control::placeholder {
    color: rgba(255, 255, 255, 0.65);
}

#newsletterForm .form-control:focus {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: none;
}

/* Home News Strip */
.news-strip-shell {
    position: relative;
    overflow: hidden;
    padding: 8px 0 4px;
}

.news-strip-track {
    width: 100%;
}

.news-strip-lane {
    display: flex;
    gap: 18px;
    width: max-content;
}

.news-strip-lane.is-animated {
    animation: newsStripScroll var(--scroll-duration, 28s) linear infinite;
}

.news-strip-shell:hover .news-strip-lane.is-animated {
    animation-play-state: paused;
}

.news-strip-card {
    width: 320px;
    min-width: 320px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    box-shadow: 0 6px 16px rgba(31, 41, 55, 0.08);
}

.news-strip-image-wrap {
    height: 170px;
    background: #f3f4f6;
}

.news-strip-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-strip-body {
    padding: 14px 14px 16px;
}

.news-strip-title {
    font-size: 1rem;
    margin: 0 0 8px;
    line-height: 1.35;
}

.news-strip-excerpt {
    font-size: 0.92rem;
    color: #4b5563;
    margin: 0 0 10px;
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-strip-link {
    text-decoration: none;
    font-weight: 600;
    color: var(--primary-color);
}

.news-empty-state {
    width: 100%;
    text-align: center;
    padding: 22px 14px;
    border-radius: 10px;
    border: 1px dashed #d1d5db;
    color: #6b7280;
}

.dynamic-form-card {
    border: 1px solid #e5e7eb;
}

@keyframes newsStripScroll {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-50% - 9px)); }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Utilities */
.shadow-sm { box-shadow: var(--box-shadow) !important; }
.rounded { border-radius: var(--border-radius) !important; }

/* Page Transition */
.page-content {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
 .hero-section {
            background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
            color: white;
            padding: 80px 20px;
            text-align: center;
        }
        
        .hero-section h1 {
            font-size: 2.5rem;
            margin-bottom: 15px;
        }
        
        .hero-section p {
            font-size: 1.2rem;
            opacity: 0.9;
            max-width: 600px;
            margin: 0 auto;
        }
        
        /* Tabs */
        .tabs {
            display: flex;
            justify-content: center;
            gap: 10px;
            margin-bottom: 40px;
            flex-wrap: wrap;
        }
        
        .tab-btn {
            padding: 15px 30px;
            border: 2px solid #e5e7eb;
            background: white;
            color: #374151;
            font-size: 16px;
            font-weight: 600;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .tab-btn:hover {
            border-color: #3b82f6;
            color: #3b82f6;
            transform: translateY(-2px);
        }
        
        .tab-btn.active {
            background: #3b82f6;
            color: white;
            border-color: #3b82f6;
            box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
        }
        
        /* Cards Grid */
        .cards-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 30px;
            opacity: 0;
            transform: translateY(20px);
            animation: fadeInUp 0.5s forwards;
        }
        
        @keyframes fadeInUp {
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .device-card {
            background: white;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 4px 6px rgba(0,0,0,0.05);
            transition: all 0.3s ease;
            cursor: pointer;
        }
        
        .device-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 24px rgba(0,0,0,0.1);
        }
        
        .card-image {
            width: 100%;
            height: 220px;
            object-fit: cover;
            background: #f1f5f9;
        }
        
        .card-content {
            padding: 25px;
        }
        
        .card-category {
            display: inline-block;
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
            margin-bottom: 12px;
        }
        
        .mechanical { background: #dbeafe; color: #1e40af; }
        .chemical { background: #dcfce7; color: #166534; }
        .physical { background: #fce7f3; color: #9d174d; }
        
        .card-title {
            font-size: 1.3rem;
            color: #1f2937;
            margin-bottom: 10px;
            font-weight: 700;
        }
        
        .card-description {
            color: #6b7280;
            font-size: 0.95rem;
            line-height: 1.5;
        }
        
        .card-arrow {
            margin-top: 15px;
            color: #3b82f6;
            font-size: 20px;
            transition: transform 0.3s;
        }
        
        .device-card:hover .card-arrow {
            transform: translateX(-5px);
        }
        
        /* Loading State */
        .loading {
            text-align: center;
            padding: 60px;
            color: #6b7280;
        }
        
        .spinner {
            width: 50px;
            height: 50px;
            border: 4px solid #e5e7eb;
            border-top-color: #3b82f6;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 20px;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        /* Empty State */
        .empty-state {
            text-align: center;
            padding: 80px 20px;
            color: #6b7280;
        }
        
        .empty-state-icon {
            font-size: 64px;
            margin-bottom: 20px;
            opacity: 0.3;
        }
        
        /* Modal */
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.6);
            z-index: 1050;
            justify-content: center;
            align-items: center;
            padding: 20px;
            backdrop-filter: blur(5px);
        }
        
        .modal-overlay.active {
            display: flex;
        }
        
        .modal-content {
            background: white;
            width: 100%;
            max-width: 800px;
            max-height: 90vh;
            overflow-y: auto;
            border-radius: 20px;
            position: relative;
            animation: modalSlide 0.3s ease;
        }
        
        @keyframes modalSlide {
            from {
                opacity: 0;
                transform: scale(0.9) translateY(20px);
            }
            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }
        
        .modal-close {
            position: absolute;
            top: 20px;
            right: 20px;
            width: 40px;
            height: 40px;
            background: rgba(255,255,255,0.9);
            border: none;
            border-radius: 50%;
            font-size: 24px;
            cursor: pointer;
            z-index: 10;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .modal-close:hover {
            background: #ef4444;
            color: white;
            transform: rotate(90deg);
        }
        
        .modal-image {
            width: 100%;
            height: 350px;
            object-fit: cover;
        }
        
        .modal-body {
            padding: 40px;
        }
        
        .modal-category {
            display: inline-block;
            padding: 8px 16px;
            border-radius: 25px;
            font-size: 14px;
            font-weight: 600;
            margin-bottom: 15px;
        }
        
        .modal-title {
            font-size: 2rem;
            color: #1f2937;
            margin-bottom: 10px;
        }
        
        .modal-subtitle {
            font-size: 1.5rem;
            color: #6b7280;
            margin-bottom: 25px;
        }
        
        .modal-description {
            color: #4b5563;
            font-size: 1.1rem;
            line-height: 1.8;
            margin-bottom: 30px;
        }
        
        .specs-section {
            background: #f8fafc;
            padding: 25px;
            border-radius: 12px;
        }
        
        .specs-title {
            font-size: 1.2rem;
            color: #1f2937;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .specs-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
            gap: 15px;
        }
        
        .spec-item {
            background: white;
            padding: 15px;
            border-radius: 8px;
            border-right: 4px solid #3b82f6;
        }
        
        .spec-label {
            font-size: 0.85rem;
            color: #6b7280;
            margin-bottom: 5px;
        }
        
        .spec-value {
            font-size: 1rem;
            color: #1f2937;
            font-weight: 600;
        }
        
        /* Responsive */
        @media (max-width: 768px) {
            .hero-section h1 {
                font-size: 1.8rem;
            }
            
            .tabs {
                gap: 5px;
            }
            
            .tab-btn {
                padding: 12px 20px;
                font-size: 14px;
            }
            
            .cards-grid {
                grid-template-columns: 1fr;
            }
            
            .modal-body {
                padding: 25px;
            }
            
            .modal-title {
                font-size: 1.5rem;
            }
        }
        /* نضيف ده في الـ style */
.card-image-placeholder {
    width: 100%;
    height: 220px;
    background: linear-gradient(135deg, #e5e7eb 0%, #f3f4f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 48px;
}

.device-card.no-image .card-image {
    display: none;
}
/* نضيف ده في الـ style tag في الصفحة */
body {
    background-image: none !important;
    background-color: #f8fafc !important;
}
.modal-image-container {
    width: 100%;
    height: 300px;
    background: linear-gradient(135deg, #e5e7eb 0%, #f3f4f6 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9ca3af;
    font-size: 64px;
    position: relative;
    overflow: hidden;
}

.modal-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.modal-image-placeholder {
    z-index: 1;
}
  <style>
        /* Additional styles for Technical Services page */
        .hero-section {
            background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
            color: white;
            padding: 80px 20px;
            text-align: center;
        }
        
        .hero-section h1 {
            font-size: 2.5rem;
            margin-bottom: 15px;
        }
        
        .hero-section p {
            font-size: 1.2rem;
            opacity: 0.9;
            max-width: 700px;
            margin: 0 auto;
        }
        
        .tabs-container {
            display: flex;
            justify-content: center;
            gap: 15px;
            margin-bottom: 40px;
            flex-wrap: wrap;
        }
        
        .tab-btn {
            padding: 15px 35px;
            border: 2px solid #e5e7eb;
            background: white;
            color: #374151;
            font-size: 16px;
            font-weight: 600;
            border-radius: 50px;
            cursor: pointer;
            transition: all 0.3s ease;
        }
        
        .tab-btn:hover {
            border-color: #3b82f6;
            color: #3b82f6;
            transform: translateY(-2px);
        }
        
        .tab-btn.active {
            background: #3b82f6;
            color: white;
            border-color: #3b82f6;
            box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
        }
        
        .devices-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: 30px;
        }
        
        .device-card {
            background: white;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 4px 6px rgba(0,0,0,0.05);
            transition: all 0.3s ease;
            cursor: pointer;
            border: 1px solid #e5e7eb;
        }
        
        .device-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 12px 24px rgba(0,0,0,0.1);
        }
        
        .card-image {
            width: 100%;
            height: 220px;
            object-fit: cover;
            background: #f1f5f9;
        }
        
        .card-body {
            padding: 25px;
        }
        
        .card-category {
            display: inline-block;
            padding: 5px 12px;
            border-radius: 20px;
            font-size: 11px;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 12px;
        }
        
        .cat-mechanical { background: #dbeafe; color: #1e40af; }
        .cat-chemical { background: #dcfce7; color: #166534; }
        .cat-physical { background: #fce7f3; color: #9d174d; }
        
        .card-title {
            font-size: 1.25rem;
            color: #1f2937;
            margin-bottom: 10px;
            font-weight: 700;
        }
        
        .card-text {
            color: #6b7280;
            font-size: 0.95rem;
            line-height: 1.5;
            margin-bottom: 15px;
        }
        
        .card-arrow {
            color: #3b82f6;
            font-size: 18px;
            transition: transform 0.3s;
            display: inline-flex;
            align-items: center;
            gap: 5px;
        }
        
        .device-card:hover .card-arrow {
            transform: translateX(5px);
        }
        
        .loading-state {
            text-align: center;
            padding: 80px 20px;
            color: #6b7280;
        }
        
        .spinner {
            width: 50px;
            height: 50px;
            border: 4px solid #e5e7eb;
            border-top-color: #3b82f6;
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 20px;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        .empty-state {
            text-align: center;
            padding: 100px 20px;
            color: #6b7280;
        }
        
        .empty-state i {
            font-size: 64px;
            margin-bottom: 20px;
            opacity: 0.3;
            color: #9ca3af;
        }
        
        /* Device Modal */
        .device-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.6);
            z-index: 1050;
            justify-content: center;
            align-items: center;
            padding: 20px;
            backdrop-filter: blur(5px);
        }
        
        .device-modal.active {
            display: flex;
        }
        
        .modal-content-box {
            background: white;
            width: 100%;
            max-width: 800px;
            max-height: 90vh;
            overflow-y: auto;
            border-radius: 20px;
            position: relative;
            animation: modalSlide 0.3s ease;
        }
        
        @keyframes modalSlide {
            from {
                opacity: 0;
                transform: scale(0.9) translateY(20px);
            }
            to {
                opacity: 1;
                transform: scale(1) translateY(0);
            }
        }
        
        .modal-close-btn {
            position: absolute;
            top: 20px;
            right: 20px;
            width: 40px;
            height: 40px;
            background: rgba(255,255,255,0.9);
            border: none;
            border-radius: 50%;
            font-size: 20px;
            cursor: pointer;
            z-index: 10;
            transition: all 0.3s;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .modal-close-btn:hover {
            background: #ef4444;
            color: white;
            transform: rotate(90deg);
        }
        
        .modal-image {
            width: 100%;
            height: 350px;
            object-fit: cover;
        }
        
        .modal-body-content {
            padding: 40px;
        }
        
        .modal-category-badge {
            display: inline-block;
            padding: 8px 16px;
            border-radius: 25px;
            font-size: 12px;
            font-weight: 600;
            text-transform: uppercase;
            margin-bottom: 15px;
        }
        
        .modal-device-title {
            font-size: 2rem;
            color: #1f2937;
            margin-bottom: 15px;
            font-weight: 700;
        }
        
        .modal-device-desc {
            color: #4b5563;
            font-size: 1.1rem;
            line-height: 1.8;
            margin-bottom: 30px;
        }
        
        .specs-box {
            background: #f8fafc;
            padding: 25px;
            border-radius: 12px;
        }
        
        .specs-box h4 {
            font-size: 1.1rem;
            color: #1f2937;
            margin-bottom: 20px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .specs-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
            gap: 15px;
        }
        
        .spec-item {
            background: white;
            padding: 15px;
            border-radius: 8px;
            border-left: 4px solid #3b82f6;
        }
        
        .spec-label {
            font-size: 0.8rem;
            color: #6b7280;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 5px;
        }
        
        .spec-value {
            font-size: 1rem;
            color: #1f2937;
            font-weight: 600;
        }
        
        @media (max-width: 768px) {
            .hero-section h1 {
                font-size: 1.8rem;
            }
            
            .tabs-container {
                gap: 10px;
            }
            
            .tab-btn {
                padding: 12px 25px;
                font-size: 14px;
            }
            
            .devices-grid {
                grid-template-columns: 1fr;
            }
            
            .modal-body-content {
                padding: 25px;
            }
            
            .modal-device-title {
                font-size: 1.5rem;
            }
        }
    </style>
