/* Reset and basic layout */
.pd-project-detail {
    width: 100%;
}

/* Hero Section */
.pd-hero-image {
    width: 100%;
    height: 600px;
    overflow: hidden;
    position: relative;
}

.pd-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Project Info Bar */
.pd-project-info-bar {
    background: #fff;
    padding: 25px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.pd-project-title {
    width: 30%;
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
}

.pd-project-title span {
    font-size: 1.1rem;
    color: #666;
    text-transform: uppercase;
}

.pd-project-title h1 {
    font-size: 2rem;
    margin: 0;
    color: #333;
    font-weight: 500;
}

.pd-project-stats {
    width: 70%;
    display: flex;
    justify-content: space-evenly;
    align-items: center;
}

.pd-stat-item {
    display: flex;
    align-items: center;
    margin-right: 20px;
    gap: 12px;
}

.pd-stat-item i {
    font-size: 32px;
    margin-right: 4px;
    color: #90c446;
}

.pd-stat-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pd-stat-content .pd-label {
    font-size: 1rem;
    color: #666;
    text-transform: uppercase;
}

.pd-stat-content .pd-value {
    font-size: 1.2rem;
    color: #333;
    font-weight: 500;
}

/* Project Tabs */
.pd-project-tabs {
    padding: 40px;
    width: 100%;
}

.pd-tab-buttons {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.pd-tab-button {
    padding: 10px 20px;
    border: none;
    background: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    position: relative;
}

.pd-tab-button.active {
    color: #4CAF50;
}

.pd-tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #4CAF50;
}

/* Tab Content - Override theme defaults with transitions */
.pd-tab-content {
    width: 100%;
    display: block !important;
    position: relative !important;
}

.pd-tab-pane {
    display: block !important;
    opacity: 0;
    visibility: hidden;
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease !important;
}

.pd-tab-pane.active {
    opacity: 1;
    visibility: visible;
    position: relative !important;
    transform: translateY(0);
}

/* Gallery Grid with Hover Effects */
.pd-tab-content .pd-tab-pane#photos .pd-gallery-grid,
.pd-tab-content .pd-tab-pane#floor-plans .pd-gallery-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 20px !important;
    padding: 20px !important;
    width: 100% !important;
}

.pd-tab-content .pd-tab-pane#photos .pd-gallery-grid a,
.pd-tab-content .pd-tab-pane#floor-plans .pd-gallery-grid a {
    display: block !important;
    width: 100% !important;
    aspect-ratio: 4/3 !important;
    overflow: hidden !important;
    position: relative !important;
}

.pd-tab-content .pd-tab-pane#photos .pd-gallery-grid img,
.pd-tab-content .pd-tab-pane#floor-plans .pd-gallery-grid img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    transition: transform 0.5s ease !important;
}

/* Hover Effects */
.pd-tab-content .pd-tab-pane#photos .pd-gallery-grid a::after,
.pd-tab-content .pd-tab-pane#floor-plans .pd-gallery-grid a::after {
    content: '\f002' !important;
    font-family: 'Font Awesome 6 Free' !important;
    font-weight: 900 !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    font-size: 36px !important;
    color: white !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    z-index: 2 !important;
}

.pd-tab-content .pd-tab-pane#photos .pd-gallery-grid a::before,
.pd-tab-content .pd-tab-pane#floor-plans .pd-gallery-grid a::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.5) !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    z-index: 1 !important;
}

/* Hover States */
.pd-tab-content .pd-tab-pane#photos .pd-gallery-grid a:hover img,
.pd-tab-content .pd-tab-pane#floor-plans .pd-gallery-grid a:hover img {
    transform: scale(1.1) !important;
}

.pd-tab-content .pd-tab-pane#photos .pd-gallery-grid a:hover::after,
.pd-tab-content .pd-tab-pane#floor-plans .pd-gallery-grid a:hover::after,
.pd-tab-content .pd-tab-pane#photos .pd-gallery-grid a:hover::before,
.pd-tab-content .pd-tab-pane#floor-plans .pd-gallery-grid a:hover::before {
    opacity: 1 !important;
}

/* Debug text styles */
.pd-tab-pane#photos .pd-gallery-grid p,
.pd-tab-pane#floor-plans .pd-gallery-grid p {
    grid-column: 1 / -1;
    margin: 10px 0;
    color: #333;
}

.pd-tab-pane#photos .pd-gallery-grid h3,
.pd-tab-pane#floor-plans .pd-gallery-grid h3 {
    grid-column: 1 / -1;
    margin: 0 0 20px 0;
    color: #333;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .pd-project-info-bar {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .pd-project-title,
    .pd-project-stats {
        width: 100%;
        align-items: center;
        /* text-align: center;
        align-items: center; */
    }

    .pd-project-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        justify-content: center;
        max-width: 500px;
        margin: 0 auto;
    }



    .pd-stat-item {
        margin: 0;
        display: flex;
        justify-content: flex-start;
        align-items: center;
    }
}

@media (max-width: 768px) {
    /* Base container adjustments */
    .pd-project-detail {
        min-width: 0;
        width: 100%;
        overflow-x: hidden;
    }

    /* Project info bar adjustments */
    .pd-project-info-bar {
        flex-direction: column;
        gap: 20px;
        padding: 20px;
    }

    .pd-project-title,
    .pd-project-stats {
        width: 100%;
        align-items: center;
        min-width: 0;
    }

    .pd-project-stats {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
        justify-content: center;
        max-width: 500px;
        margin: 0 auto;
    }

    .pd-stat-item {
        margin: 0;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        min-width: 0;
    }

    /* Gallery grid adjustments */
    .pd-tab-content .pd-tab-pane#photos .pd-gallery-grid,
    .pd-tab-content .pd-tab-pane#floor-plans .pd-gallery-grid {
        min-width: 0;
        width: 100%;
        grid-template-columns: repeat(2, 1fr) !important;
        padding: 10px !important;
    }

    /* Description content adjustments */
    .pd-tab-pane#description .pd-description-content {
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }

    /* Ensure all images and media are properly constrained */
    img,
    video,
    iframe {
        max-width: 100vw;
        width: 100%;
        height: auto;
        box-sizing: border-box;
    }

    /* Ensure containers properly contain their images */
    .pd-tab-content,
    .pd-tab-pane,
    .pd-description-content,
    .pd-gallery-grid {
        max-width: 100vw;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    /* Prevent content from overflowing its container */
    .pd-tab-pane#description .pd-description-content {
        width: 100%;
        max-width: 100%;
        padding: 0;
        box-sizing: border-box;
    }

    .pd-tab-pane#description .pd-description-content img {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    /* Hide tab buttons on mobile with higher specificity */
    .pd-project-tabs .pd-tab-buttons {
        display: none !important;
    }

    /* Reset tab content styles for mobile with higher specificity */
    .pd-project-tabs .pd-tab-content {
        display: block !important;
    }

    .pd-project-tabs .pd-tab-pane {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        position: relative !important;
        transform: none !important;
        margin-bottom: 40px;
        top: auto !important;
        left: auto !important;
    }

    /* Add section titles */
    .pd-project-tabs .pd-tab-pane#photos::before {
        content: 'Resimler';
        display: block;
        font-size: 1.5rem;
        font-weight: 500;
        margin-bottom: 20px;
        color: #333;
    }

    .pd-project-tabs .pd-tab-pane#description::before {
        content: 'Proje Özellikleri';
        display: block;
        font-size: 1.5rem;
        font-weight: 500;
        /* margin-bottom: 20px; */
        /* padding: 0 20px; */
        color: #333;
    }

    .pd-project-tabs .pd-tab-pane#floor-plans::before {
        content: 'Kat Planları';
        display: block;
        font-size: 1.5rem;
        font-weight: 500;
        margin-bottom: 20px;
        color: #333;
    }

    .pd-project-tabs .pd-tab-pane#location::before {
        content: 'Konum';
        display: block;
        font-size: 1.5rem;
        font-weight: 500;
        margin-bottom: 20px;
        color: #333;
    }

    /* Add some spacing between sections */
    .pd-project-tabs .pd-tab-pane {
        padding-top: 30px;
        padding-bottom: 30px;
        border-bottom: 1px solid #eee;
    }

    .pd-project-tabs .pd-tab-pane:last-child {
        border-bottom: none;
    }

    .pd-hero-image {
        height: 400px;
        width: 100vw;
        max-width: 100vw;
        margin: 0;
        padding: 0;
    }

    .pd-hero-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        max-width: none; /* Remove max-width constraint */
    }

    .pd-tab-buttons {
        gap: 10px;
    }

    .pd-tab-button {
        padding: 8px 12px;
        font-size: 1rem;
    }

    /* Hero Slider Mobile Fixes */
    #hero-slider {
        width: 100vw !important;
        height: 100vh !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: hidden;
        position: relative;
    }

    /* Counter section mobile adjustments */
    .counter-section {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        padding: 1rem 0;
        background: #fff;
        z-index: 10;
    }

    .counter-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
        padding: 10px;
        max-width: 100%;
    }

    .counter-item {
        text-align: center;
    }

    /* Hide the fifth counter on mobile */
    .counter-item:nth-child(n+5) {
        display: none;
    }

    .counter-item .counter {
        font-size: 2rem;
    }

    .counter-item h3 {
        font-size: 0.9rem;
    }

    /* Update section title size for mobile */
    .section-title {
        font-size: 2rem !important; /* Using !important to override any existing styles */
        line-height: 1.2;
    }

    /* Prevent horizontal scroll in description tab */
    .pd-tab-pane#description .pd-project-description::before {
        left: -20px;
        right: -20px;
    }

    .pd-tab-pane#description .pd-description-content {
        padding: 0 20px;
        width: 100%;
        overflow-x: hidden;
    }

    /* Ensure content stays within bounds */
    .pd-tab-pane#description .pd-description-content img,
    .pd-tab-pane#description .pd-description-content iframe,
    .pd-tab-pane#description .pd-description-content table {
        max-width: 100%;
        height: auto;
    }

    /* Handle long words and URLs */
    .pd-tab-pane#description .pd-description-content {
        word-wrap: break-word;
        overflow-wrap: break-word;
        -webkit-hyphens: auto;
        -ms-hyphens: auto;
        hyphens: auto;
    }

    /* Ensure tables don't overflow */
    .pd-tab-pane#description .pd-description-content table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Adjust list padding */
    .pd-tab-pane#description .pd-description-content ul,
    .pd-tab-pane#description .pd-description-content ol {
        padding-left: 20px;
        margin-left: 0;
    }

    /* Ensure list items are visible on mobile */
    .pd-tab-pane#description .pd-description-content ul li {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    /* Reset any animation delays */
    .pd-tab-pane#description.active .pd-description-content ul li {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
        transition-delay: 0s !important;
    }

    .pd-project-tabs {
        padding: 20px;
        width: 100%;
    }
}

/* Project Stage Progress */
.pd-project-stage-progress {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 60px auto;
    position: relative;
    padding: 0 40px;
    max-width: 1000px;
}

/* Base grey line */
.pd-project-stage-progress:before {
    content: '';
    position: absolute;
    left: 66px; /* 40px padding + 28px (half of 56px circle) */
    right: 66px; /* 40px padding + 28px (half of 56px circle) */
    top: 30%;
    transform: translateY(-50%);
    height: 4px;
    background: #f0f0f0;
    z-index: 1;
}

/* Stage Item */
.pd-stage-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

/* Green progress line */
/* .pd-stage-item.complete:after {
    content: '';
    position: absolute;
    left: 50%;
    width: 100%;
    top: 28px;
    height: 4px;
    background: #90c446;
    z-index: 1;
} */

/* Adjust first and last items */
.pd-stage-item:first-child:after {
    left: 50%;
    width: 100%;
}

.pd-stage-item:last-child:after {
    width: 50%;
}

/* Hide progress line after active stage */
.pd-stage-item.active ~ .pd-stage-item:after {
    display: none;
}

/* Stage Icon - ensure it's above the lines */
.pd-stage-icon {
    position: relative;
    z-index: 3;
}

/* Stage Icon - Ensure solid background */
.pd-stage-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: white;
    border: 3px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Stage Label */
.pd-stage-label {
    font-size: 14px;
    color: #666;
    text-align: center;
    max-width: 120px;
    font-weight: 500;
    transition: all 0.3s ease;
    opacity: 0.7;
}

/* Active Stage */
.pd-stage-item.active .pd-stage-icon {
    border-color: #90c446;
    background: #90c446;
    transform: scale(1.5);
    box-shadow: 0 4px 12px rgba(144, 196, 70, 0.3);
}

.pd-stage-item.active .pd-stage-label {
    color: #90c446;
    opacity: 1;
    transform: translateY(4px);
}

/* Completed Stage - Ensure white icon on green background */
/* .pd-stage-item.complete .pd-stage-icon {
    border-color: #90c446;
    background: #90c446;
} */

 .pd-stage-icon i {
    color: white;
    font-size: 20px;
    animation: fadeIn 0.3s ease;
    position: relative;
    z-index: 3;
}

/* Animation */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.5); }
    to { opacity: 1; transform: scale(1); }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .pd-project-stage-progress {
        padding: 0 20px;
        margin: 40px auto;
    }
    
    .pd-stage-icon {
        width: 44px;
        height: 44px;
    }
    
    .pd-stage-label {
        font-size: 12px;
        max-width: 80px;
    }
    
    .pd-project-stage-progress:before {
        left: 48px; /* 20px mobile padding + 28px (half of 56px circle) */
        right: 48px; /* 20px mobile padding + 28px (half of 56px circle) */
        top: 50%;
        transform: translateY(-50%);
    }

    .pd-stage-item.complete:after {
        top: 50%;
        transform: translateY(-50%);
    }
}

/* Stage-specific icons */
.pd-stage-item[data-stage="pre_sale"] .pd-stage-icon:before {
    content: '';
    width: 20px;
    height: 20px;
    background: url('../images/tag-icon.svg') no-repeat center;
    background-size: contain;
}

.pd-stage-item[data-stage="on_sale"] .pd-stage-icon:before {
    content: '';
    width: 20px;
    height: 20px;
    background: url('../images/cart-icon.svg') no-repeat center;
    background-size: contain;
}

.pd-stage-item[data-stage="sales_completed"] .pd-stage-icon:before {
    content: '';
    width: 20px;
    height: 20px;
    background: url('../images/check-icon.svg') no-repeat center;
    background-size: contain;
}

.pd-stage-item[data-stage="delivered"] .pd-stage-icon:before {
    content: '';
    width: 20px;
    height: 20px;
    background: url('../images/key-icon.svg') no-repeat center;
    background-size: contain;
}

/* Active and Complete stages - make icons white */
.pd-stage-item.active .pd-stage-icon:before,
.pd-stage-item.complete .pd-stage-icon:before {
    filter: brightness(0) invert(1);
}

/* Project Description (now inside tab) */
.pd-tab-pane#description .pd-project-description {
    padding: 40px 0;
    position: relative;
    box-shadow: none;
    overflow: hidden;
}

.pd-tab-pane#description .pd-project-description::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/paper.jpg');
    background-size: cover;
    opacity: 0.3;
    z-index: 0;
    width: 100%;
}

.pd-tab-pane#description .pd-description-content {
    font-size: larger;     
    max-width: 1200px; 
    margin: 0 auto;
    line-height: 1.6;
    color: #333;
    position: relative;
    z-index: 1;
    text-align: start;
}

@media (max-width: 768px) {
    .pd-tab-pane#description .pd-project-description {
        padding: 20px 0;
    }
    
    .pd-tab-pane#description .pd-project-description::before {
        left: 0;
        right: 0;
    }
}

/* Description Tab Animations */
.pd-tab-pane#description .pd-description-content ul li {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.pd-tab-pane#description.active .pd-description-content ul li {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger the animation for each list item */
.pd-tab-pane#description.active .pd-description-content ul li:nth-child(1) { transition-delay: 0.1s; }
.pd-tab-pane#description.active .pd-description-content ul li:nth-child(2) { transition-delay: 0.2s; }
.pd-tab-pane#description.active .pd-description-content ul li:nth-child(3) { transition-delay: 0.3s; }
.pd-tab-pane#description.active .pd-description-content ul li:nth-child(4) { transition-delay: 0.4s; }
.pd-tab-pane#description.active .pd-description-content ul li:nth-child(5) { transition-delay: 0.5s; }
.pd-tab-pane#description.active .pd-description-content ul li:nth-child(6) { transition-delay: 0.6s; }
.pd-tab-pane#description.active .pd-description-content ul li:nth-child(7) { transition-delay: 0.7s; }
.pd-tab-pane#description.active .pd-description-content ul li:nth-child(8) { transition-delay: 0.8s; }
.pd-tab-pane#description.active .pd-description-content ul li:nth-child(9) { transition-delay: 0.9s; }
.pd-tab-pane#description.active .pd-description-content ul li:nth-child(n+10) { transition-delay: 1s; } 