:root {
    --primary-red: #D32F2F;
    --dark-red: #B71C1C;
    --off-white: #f9fafb;
    --white: #ffffff;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Tajawal', sans-serif;
    background-color: var(--off-white);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    overflow-x: hidden;
    max-width: 100%;
}

@media (max-width: 768px) {
    input, select, textarea {
        font-size: 16px !important;
    }
}

::selection {
    background-color: var(--primary-red);
    color: #ffffff;
}

::-moz-selection {
    background-color: var(--primary-red);
    color: #ffffff;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100%;
}

/* Navbar */
.navbar {
    background-color: var(--white);
    box-shadow: var(--shadow);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-red);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
}

.nav-links auto {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
}

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    right: 0;
    background-color: var(--primary-red);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-links a:hover {
    color: var(--primary-red);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(211, 47, 47, 0.85), rgba(153, 27, 27, 0.85)), url('https://images.unsplash.com/photo-1508514177221-188b1c77eca2?auto=format&fit=crop&w=1920&q=80') center/cover;
    color: var(--white);
    text-align: center;
    padding: 120px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 80vh;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: 700;
    animation: fadeInDown 1s ease-out;
}

.hero p {
    font-size: 1.2rem;
    max-width: 700px;
    margin-bottom: 40px;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.3s backwards;
}

.btn {
    display: inline-block;
    background-color: var(--white);
    color: var(--primary-red);
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
    border: 2px solid var(--white);
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.3);
    animation: fadeInUp 1s ease-out 0.6s backwards;
}

.btn:hover {
    background-color: transparent;
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(211, 47, 47, 0.5);
}

/* Sections */
.section {
    padding: 100px 5%;
}

.section-title {
    color: var(--text-dark);
    font-size: 2.5rem;
    margin-bottom: 60px;
    position: relative;
    display: inline-block;
    text-align: center;
    width: 100%;
}

.section-title::after {
    content: '';
    width: 80px;
    height: 4px;
    background-color: var(--primary-red);
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Service / Product Cards */
.card {
    background-color: var(--white);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: right;
    border: 1px solid rgba(0,0,0,0.05);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border-color: rgba(211, 47, 47, 0.2);
}

.card img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover img {
    transform: scale(1.05);
}

.card-body {
    padding: 25px;
    background: var(--white);
    position: relative;
    z-index: 2;
}

.card-title {
    font-size: 1.4rem;
    color: var(--text-dark);
    margin-bottom: 15px;
    font-weight: 700;
}

.card-price {
    color: var(--primary-red);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: rgba(211, 47, 47, 0.05);
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
}

.card-desc {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 20px;
}

.category-tag {
    display: inline-block;
    background-color: #f3f4f6;
    color: var(--text-dark);
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Partners */
.partners {
    background-color: var(--white);
    border-top: 1px solid #f3f4f6;
}

.partner-logos {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.partner-logos img {
    height: 45px;
    filter: grayscale(100%) opacity(0.6);
    transition: var(--transition);
}

.partner-logos img:hover {
    filter: grayscale(0%) opacity(1) drop-shadow(0 4px 6px rgba(0,0,0,0.1));
    transform: scale(1.05);
}

/* Footer */
footer {
    background-color: #111827;
    color: var(--white);
    padding: 60px 5% 30px;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.footer-content h3 {
    color: var(--primary-red);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-red);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px 20px;
    margin-top: 40px;
    width: 100%;
}

.footer-bottom-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-align: center;
}

.footer-copy {
    color: #9ca3af;
    font-size: 0.9rem;
    margin: 0 !important;
    line-height: 1.5;
}

.footer-developer {
    color: #6b7280;
    font-size: 0.85rem;
    margin: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.footer-developer a {
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 700;
    transition: var(--transition);
}

.footer-developer a:hover {
    text-decoration: underline;
    opacity: 0.8;
}

/* Clear any conflicting global footer p styles */
footer p:last-child {
    display: none !important;
}

footer .footer-bottom p {
    display: block !important;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .hero h1 {
        font-size: 2.2rem;
    }
    .hero {
        padding: 80px 20px;
        min-height: 60vh;
    }
    .section {
        padding: 60px 20px;
    }
}
