/* Main styles beyond the critical CSS */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2.5rem;
}

.feature-card {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--highlight-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s ease;
    z-index: -1;
}

.feature-card:hover {
    transform: translateY(-8px);
}

.feature-card:hover::before {
    transform: scaleX(1);
    transform-origin: left;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.feature-icon {
    margin-bottom: 1.2rem;
    color: var(--highlight-color);
}

.section-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
}

.pricing-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
    margin-top: 3rem;
}

.pricing-card {
    background-color: var(--secondary-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed);
    position: relative;
    display: flex;
    flex-direction: column;
    transform-origin: center;
}

.pricing-card:hover {
    transform: translateY(-10px);
}

.pricing-card.popular {
    border: 2px solid var(--highlight-color);
    z-index: 2;
}

.popular-tag {
    position: absolute;
    top: 0;
    right: 0;
    background-color: var(--highlight-color);
    color: var(--secondary-color);
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom-left-radius: 8px;
}

.package-header {
    padding: 2.5rem 1.5rem;
    text-align: center;
    background-color: var(--accent-color);
    position: relative;
    overflow: hidden;
}

.package-header::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--highlight-color), transparent);
}

.package-header h3 {
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--highlight-color);
    position: relative;
    display: inline-block;
}

.price::after {
    content: "ريال سعودي";
    font-size: 1rem;
    position: absolute;
    bottom: 0.3rem;
    right: 100%;
    margin-right: 0.5rem;
    color: #777;
    width: max-content;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
}

.pricing-card:hover .price::after {
    opacity: 1;
    transform: translateX(0);
}

.package-features {
    padding: 1.5rem;
    flex-grow: 1;
}

.package-features ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.package-features li {
    margin-bottom: 1rem;
    padding-right: 1.5rem;
    position: relative;
}

.package-features li:before {
    content: "✓";
    position: absolute;
    right: 0;
    color: var(--success-color);
    font-weight: bold;
}

.package-includes {
    padding: 0 1.5rem 1rem;
    font-size: 0.85rem;
    color: #666;
}

.package-btn {
    margin: 0 1.5rem 1.5rem;
}

.why-us-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.testimonial {
    border-right: 3px solid var(--highlight-color);
    padding: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    background-color: var(--accent-color);
    border-radius: 0 8px 8px 0;
    position: relative;
}

.testimonial::before, .testimonial::after {
    content: '"';
    font-size: 3rem;
    position: absolute;
    color: rgba(0,0,0,0.1);
    line-height: 1;
}

.testimonial::before {
    top: 0.5rem;
    right: 0.5rem;
}

.testimonial::after {
    bottom: -0.5rem;
    left: 0.5rem;
    transform: rotate(180deg);
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-item {
    text-align: center;
    padding: 2rem 1.5rem;
    background-color: var(--secondary-color);
    border-radius: 10px;
    box-shadow: var(--card-shadow);
    transition: transform var(--transition-speed);
}

.stat-item:hover {
    transform: translateY(-5px);
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--highlight-color);
    margin-bottom: 0.5rem;
    position: relative;
}

.stat-text {
    font-size: 1.1rem;
}

/* Portfolio Section */
.portfolio-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.portfolio-filter {
    background: transparent;
    border: 1px solid var(--border-color);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-speed);
}

.portfolio-filter.active,
.portfolio-filter:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    border-color: var(--primary-color);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
    margin-top: 2.5rem;
}

.portfolio-item {
    background-color: var(--secondary-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all var(--transition-speed);
    display: flex;
    flex-direction: column;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.portfolio-image {
    position: relative;
    width: 100%;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.05);
}

.portfolio-info {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.portfolio-info h3 {
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.portfolio-info p {
    margin-bottom: 1.25rem;
    color: #555;
}

.portfolio-results {
    margin: 1rem 0 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.portfolio-results span {
    padding: 0.4rem 0.8rem;
    background-color: var(--accent-color);
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
}

.portfolio-btn {
    margin-top: auto;
    align-self: flex-start;
}

.portfolio-cta {
    text-align: center;
    margin-top: 4rem;
    padding: 2rem;
    background-color: var(--accent-color);
    border-radius: 12px;
}

.portfolio-cta p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.cta {
    background-color: var(--accent-color);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle at center, rgba(0,0,0,0.03) 0%, rgba(0,0,0,0) 70%);
    z-index: 0;
}

.cta .container {
    position: relative;
    z-index: 1;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2.5rem;
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

.conclusion {
    text-align: center;
    padding: 6rem 1rem;
}

.conclusion h2 {
    margin-right: auto;
    margin-left: auto;
}

.conclusion p {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2.5rem;
}

.footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 5rem 0 2rem;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    margin-bottom: 1.5rem;
}

.footer h3 {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    position: relative;
    display: inline-block;
}

.footer h3::after {
    content: "";
    position: absolute;
    bottom: -0.5rem;
    right: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary-color);
}

.footer-links ul,
.footer-contact ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all var(--transition-speed);
    position: relative;
    display: inline-block;
}

.footer-links a::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: -3px;
    width: 0;
    height: 1px;
    background-color: var(--secondary-color);
    transition: width var(--transition-speed) ease;
}

.footer-links a:hover {
    transform: translateX(-5px);
}

.footer-links a:hover::after {
    width: 100%;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    transition: all var(--transition-speed);
}

.social-links a:hover {
    background-color: var(--secondary-color);
}

.social-links a:hover svg path {
    fill: var(--primary-color);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom a {
    color: var(--secondary-color);
    text-decoration: none;
    position: relative;
}

.footer-bottom a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 1px;
    bottom: -2px;
    right: 0;
    background-color: var(--secondary-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform var(--transition-speed) ease;
}

.footer-bottom a:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* شريط إجراءات الموبايل */
.mobile-cta-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #000;
    z-index: 999;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
}

.mobile-cta-buttons {
    display: flex;
    width: 100%;
}

.mobile-cta-btn {
    flex: 1;
    padding: 1rem;
    color: white;
    text-align: center;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.mobile-cta-btn:hover, .mobile-cta-btn:focus {
    text-decoration: none;
}

.whatsapp-btn {
    background-color: #25D366;
}

.call-btn {
    background-color: #3B82F6;
}

/* بنر الكوكيز */
.cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(0, 0, 0, 0.9);
    color: var(--secondary-color);
    padding: 1rem;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.2);
}

.cookie-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    gap: 1rem;
}

.cookie-content p {
    margin: 0;
}

.cookie-content a {
    color: #3B82F6;
    text-decoration: underline;
}

.consent-btn {
    background-color: #25D366;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
}

/* تحسينات إمكانية الوصول */
.skip-link {
    position: absolute;
    top: -40px;
    right: 0;
    background: var(--primary-color);
    color: var(--secondary-color);
    padding: 8px;
    z-index: 1000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 0;
}

/* زيادة التباين لإمكانية الوصول */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--highlight-color);
    outline-offset: 2px;
}

/* تحسينات للأجهزة المحمولة */
@media (max-width: 992px) {
    :root {
        --section-padding: 4rem 1rem;
    }
    
    .why-us-content {
        grid-template-columns: 1fr;
    }
    
    .stats-container {
        margin-top: 2rem;
    }
    
    .portfolio-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 3rem 1rem;
    }
    
    h1 {
        font-size: 1.8rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .hero {
        padding: 6rem 1rem 4rem;
    }
    
    .mobile-cta-bar {
        display: block;
    }
    
    body {
        padding-bottom: 60px;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .portfolio-filters {
        gap: 0.5rem;
    }
    
    .portfolio-filter {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .cookie-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .consent-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .header-container {
        min-height: 64px;
    }
    
    .btn {
        padding: 0.85rem 1rem;
        width: 100%;
    }
    
    .stats-container {
        grid-template-columns: 1fr;
    }
    
    .portfolio-image {
        aspect-ratio: 16/9;
    }
    
    .portfolio-info {
        padding: 1.25rem;
    }
    
    .portfolio-results span {
        font-size: 0.8rem;
        padding: 0.3rem 0.6rem;
    }
    
    h1 {
        font-size: 1.75rem;
        line-height: 1.4;
    }
    
    .hero p {
        font-size: 1rem;
    }
}

/* تحسين الأداء */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* أنماط الطباعة */
@media print {
    .header, .footer, .cta, .mobile-cta-bar, .cookie-banner {
        display: none;
    }
    
    body {
        background: white;
        color: black;
        padding: 0;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
    }
    
    .pricing-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .section {
        padding: 2rem 0;
    }
}