/**
 * Single Project Page Enhanced Styles
 * ملف CSS مخصص لصفحة المشروع المحسّنة
 */

/*=================================
  Hero Section - Cinematic Premium
=================================*/
.project-hero-enhanced {
    position: relative;
    height: 70vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 0;
    margin-top: -100px;
    /* Pull up behind transparent header if exists, or remove margin */
}

/* Cinematic Overlay - Gradient from bottom */
.project-hero-enhanced .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.3) 0%,
            rgba(0, 0, 0, 0.4) 40%,
            rgba(0, 0, 0, 0.8) 100%);
    z-index: 1;
}

.project-hero-enhanced .hero-content {
    position: relative;
    z-index: 2;
    padding: 40px 20px;
    width: 100%;
    max-width: 1100px;
    text-align: center;
    margin-bottom: 60px;
    /* Space for the floating card */
}

.project-hero-enhanced .hero-badges {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.project-hero-enhanced .badge {
    display: inline-block;
    padding: 10px 24px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(5px);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
}

.project-hero-enhanced .badge:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.project-hero-enhanced .status-badge {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.project-hero-enhanced .project-hero-title {
    color: white !important;
    font-family: 'Tajawal', 'Cairo', sans-serif;
    /* Recommended Arabic/English fonts */
    /* font-size controlled by theme options - typography settings */
    font-weight: 700;
    line-height: 1.4;
    /* Increased line-height */
    margin: 0 auto 30px auto;
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    letter-spacing: normal;
    max-width: 900px;
    text-transform: capitalize;
}

.project-hero-enhanced .hero-location {
    color: rgba(255, 255, 255, 0.95);
    font-size: 20px;
    margin: 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 20px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
}

.project-hero-enhanced .hero-location i {
    color: #ffd700;
    /* Gold color for icon */
    font-size: 18px;
}

/*=================================
  Quick Info Bar - Floating Glass Card
=================================*/
.quick-info-bar {
    position: relative;
    margin-top: -80px;
    /* Invalidates header space to float over hero */
    z-index: 10;
    padding: 0 20px;
    margin-bottom: 50px;
}

.quick-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    max-width: 1100px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 1);
}

.quick-info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 30px 20px;
    background: transparent;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 0;
    transition: background 0.3s ease;
}

.quick-info-item:last-child {
    border-right: none;
}

.quick-info-item:hover {
    background: rgba(var(--primary-color-rgb), 0.05);
    /* Needs RGB var or separate color */
}

.quick-info-item i {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 5px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 6px rgba(var(--primary-color-rgb), 0.2));
}

.quick-info-item .label {
    display: block;
    font-size: 13px;
    color: #666;
    font-weight: 500;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.quick-info-item .value {
    display: block;
    font-size: 20px;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1.2;
}

/*=================================
  Project Layout Enhanced
=================================*/
.project-layout-enhanced {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 30px;
    padding-top: 30px;
    padding-bottom: 50px;
}

/*=================================
  Tabs Navigation
=================================*/
.project-tabs-nav {
    display: flex;
    gap: 10px;
    background: white;
    padding: 15px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 25px;
    overflow-x: auto;
}

.tab-btn {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--border-color);
    background: white;
    border-radius: var(--radius-sm);
    font-size: 15px;
    font-weight: 600;
    color: var(--secondary-color);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.tab-btn:hover {
    background: var(--bg-light);
    border-color: var(--primary-color);
}

.tab-btn.active {
    background: var(--gradient-primary);
    color: white;
    border-color: var(--primary-color);
}

.tab-btn i {
    font-size: 16px;
}

/*=================================
  Tabs Content
=================================*/
.project-tabs-content {
    min-height: 400px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*=================================
  Pricing Highlight
=================================*/
.pricing-highlight {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
    color: white;
    padding: 25px;
    border-radius: var(--radius);
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    position: relative;
    overflow: hidden;
}

/* Subtle pattern overlay */
.pricing-highlight::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.05' fill-rule='evenodd'%3E%3Ccircle cx='3' cy='3' r='3'/%3E%3Ccircle cx='13' cy='13' r='3'/%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.3;
    pointer-events: none;
}

.pricing-highlight .price-main {
    text-align: right;
    margin-bottom: 0;
    flex: 1;
}

.pricing-highlight .price-label {
    display: block;
    font-size: 13px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.pricing-highlight .price-amount {
    font-size: 32px;
    font-weight: 800;
    display: flex;
    align-items: baseline;
    justify-content: flex-start;
    gap: 5px;
    line-height: 1;
}

.pricing-highlight .currency {
    font-size: 16px;
    font-weight: 600;
    opacity: 0.9;
}

.pricing-highlight .payment-terms {
    display: flex;
    gap: 30px;
    padding-top: 0;
    border-top: none;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    padding-right: 30px;
    align-items: center;
}

.pricing-highlight .term-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: right;
}

.pricing-highlight .term-item i {
    font-size: 32px;
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.05);
    padding: 10px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pricing-highlight .term-item div {
    display: flex;
    flex-direction: column;
}

.pricing-highlight .term-item strong {
    display: block;
    font-size: 18px;
    margin-bottom: 2px;
    line-height: 1.2;
}

.pricing-highlight .term-item span {
    display: block;
    font-size: 12px;
    opacity: 0.7;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .pricing-highlight {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
        padding: 20px;
    }

    .pricing-highlight .price-main {
        width: 100%;
        margin-bottom: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 15px;
    }

    .pricing-highlight .payment-terms {
        width: 100%;
        border-right: none;
        padding-right: 0;
        justify-content: space-between;
        gap: 15px;
    }

    .pricing-highlight .term-item {
        flex: 1;
        background: rgba(255, 255, 255, 0.05);
        padding: 10px;
        border-radius: 8px;
    }

    .pricing-highlight .term-item i {
        font-size: 20px;
        width: 40px;
        height: 40px;
        padding: 8px;
    }

    .pricing-highlight .term-item strong {
        font-size: 16px;
    }
}

/*=================================
  Download Brochure CTA
=================================*/
.download-brochure-cta {
    display: flex;
    align-items: center;
    gap: 20px;
    background: linear-gradient(135deg, #FFF5E6, #FFE8CC);
    padding: 25px;
    border-radius: var(--radius);
    border: 2px solid var(--primary-light);
}

.download-brochure-cta i.fa-file-pdf {
    font-size: 48px;
    color: var(--primary-color);
}

.download-brochure-cta h4 {
    margin: 0 0 5px 0;
    color: var(--secondary-color);
    font-size: 18px;
}

.download-brochure-cta p {
    margin: 0;
    color: var(--text-light);
    font-size: 14px;
}

.download-brochure-cta .btn {
    margin-right: auto;
}

/*=================================
  Features Grid Enhanced
=================================*/
.features-grid-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.feature-item-enhanced {
    display: flex;
    gap: 15px;
    padding: 20px;
    background: var(--bg-light);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.feature-item-enhanced:hover {
    background: white;
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.feature-item-enhanced .feature-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    box-shadow: var(--shadow-sm);
}

.feature-item-enhanced .feature-icon i {
    font-size: 22px;
    color: var(--primary-color);
}

.feature-item-enhanced .feature-text strong {
    display: block;
    color: var(--secondary-color);
    margin-bottom: 5px;
    font-size: 15px;
}

.feature-item-enhanced .feature-text p {
    margin: 0;
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.5;
}

/*=================================
  Gallery Grid
=================================*/
.project-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay i {
    font-size: 32px;
    color: white;
}

.gallery-note {
    text-align: center;
    color: var(--text-light);
    font-size: 14px;
    margin: 0;
}

/*=================================
  Sticky Sidebar
=================================*/
.project-sidebar-sticky .sticky-wrapper {
    position: sticky;
    top: 150px;
}

.sidebar-card {
    background: white;
    border-radius: var(--radius);
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.sidebar-card h3 {
    font-size: 20px;
    color: var(--secondary-color);
    margin: 0 0 10px 0;
}

.sidebar-card p {
    color: var(--text-light);
    font-size: 14px;
    margin: 0 0 20px 0;
}

/*=================================
  Lead Form Enhanced
=================================*/
.lead-form-enhanced .form-group {
    margin-bottom: 15px;
}

.lead-form-enhanced .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 15px;
    transition: var(--transition);
}

.lead-form-enhanced .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(193, 122, 74, 0.1);
}

.quick-contact-btns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

/*=================================
  Social Share Card
=================================*/
.share-card h4 {
    font-size: 16px;
    color: var(--secondary-color);
    margin: 0 0 15px 0;
}

.social-share-buttons {
    display: flex;
    gap: 10px;
}

.share-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: var(--radius-sm);
    color: white;
    transition: var(--transition);
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.share-btn.facebook {
    background: #1877F2;
}

.share-btn.twitter {
    background: #1DA1F2;
}

.share-btn.whatsapp {
    background: #25D366;
}

.share-btn.copy {
    background: var(--secondary-color);
}

.share-btn i {
    font-size: 18px;
}

/*=================================
  Responsive Design
=================================*/
@media (max-width: 1024px) {
    .project-layout-enhanced {
        grid-template-columns: 1fr 320px;
    }

    .quick-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .project-hero-enhanced {
        min-height: 280px;
    }

    /* Project hero title font-size controlled by theme options - responsive handled in typography-css.php */

    .project-hero-enhanced .hero-location {
        font-size: 15px;
    }

    .quick-info-bar {
        position: static;
    }

    .quick-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .quick-info-item {
        padding: 12px;
    }

    .project-layout-enhanced {
        grid-template-columns: 1fr;
    }

    .project-sidebar-sticky {
        order: -1;
    }

    .project-sidebar-sticky .sticky-wrapper {
        position: static;
    }

    .project-tabs-nav {
        padding: 10px;
    }

    .tab-btn {
        font-size: 13px;
        padding: 10px 12px;
    }

    .tab-btn i {
        display: none;
    }

    .pricing-highlight .price-amount {
        font-size: 36px;
    }

    .pricing-highlight .payment-terms {
        flex-direction: column;
        gap: 15px;
    }

    .download-brochure-cta {
        flex-direction: column;
        text-align: center;
    }

    .features-grid-enhanced {
        grid-template-columns: 1fr;
    }

    .project-gallery-grid {
        grid-template-columns: 1fr;
    }

    .quick-contact-btns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .pricing-highlight {
        padding: 20px;
    }

    .pricing-highlight .price-amount {
        font-size: 28px;
    }
}

/*=================================
  Modern Project Specs - Unified Bar Design
=================================*/
.project-specs-modern {
    display: flex;
    flex-wrap: wrap;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 40px;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

.spec-card {
    flex: 1 1 200px;
    padding: 25px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 15px;
    position: relative;
    background: transparent;
    border: none;
    box-shadow: none;
    transition: background 0.3s ease;
}

/* Vertical Dividers */
.spec-card:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    bottom: 20%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.08), transparent);
}

.spec-card:hover {
    background: rgba(var(--primary-color-rgb), 0.03);
    transform: none;
    /* Disable lift on hover for this layout */
}

/* Icon Styling - Clean & Central */
.spec-icon-wrapper {
    width: 45px;
    height: 45px;
    font-size: 20px;
    color: var(--primary-color);
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    position: relative;
}

/* Subtle circle behind icon */
.spec-icon-wrapper::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    opacity: 0.1;
    border-radius: 50%;
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.spec-card:hover .spec-icon-wrapper::before {
    transform: scale(1.2);
    opacity: 0.15;
}

.spec-card:hover .spec-icon-wrapper {
    transform: translateY(-3px);
    background: transparent;
    color: var(--primary-color);
}

/* Text Styling */
.spec-data {
    align-items: center;
    width: 100%;
}

.spec-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #999;
    font-weight: 700;
    margin-bottom: 8px;
}

.spec-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1.4;
}

/* Full Width Handling - Make it a row of its own or integrate */
.spec-card.full-width-spec {
    flex-basis: 100%;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    flex-direction: row;
    justify-content: center;
    padding: 20px;
}

.spec-card.full-width-spec::after {
    display: none;
    /* No vertical divider for full width row */
}

.spec-card.full-width-spec .spec-data {
    flex-direction: row;
    gap: 15px;
    width: auto;
}

.spec-card.full-width-spec .spec-label {
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 900px) {
    .project-specs-modern {
        border-radius: 12px;
    }

    .spec-card {
        flex-basis: 50%;
        /* 2 items per row */
        border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    }

    .spec-card:nth-child(2n)::after {
        display: none;
        /* Remove divider every 2nd item */
    }

    .spec-card:nth-last-child(1),
    .spec-card:nth-last-child(2) {
        border-bottom: none;
        /* No bottom border for last row */
    }
}

@media (max-width: 480px) {
    .spec-card {
        flex-basis: 100%;
        /* Stack on mobile */
        flex-direction: row;
        text-align: left;
        align-items: center;
        padding: 15px 20px;
        gap: 20px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .spec-card::after {
        display: none;
    }

    .spec-icon-wrapper {
        margin-bottom: 0;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .spec-data {
        align-items: flex-start;
    }

    .spec-card.full-width-spec {
        flex-direction: column;
        align-items: flex-start;
    }
}