/* ===============================
   PROJECT DETAIL PAGE STYLES
=============================== */

/* Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
}

.category-badge {
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-primary-dark, #0056b3));
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* Featured Image Section */
.featured-image-section {
    position: relative;
}

.featured-image-section .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.featured-image-section .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1) !important;
}

/* Project Info Section */
.project-info-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.info-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.info-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--bs-primary);
}

.info-card .info-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--bs-primary), var(--bs-primary-dark, #0056b3));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* Styles pour le contenu CKEditor5 */
.project-content,
.project-description-content {
    font-size: 1.1rem;
    line-height: 1.7;
    color: #495057;
}

.project-content h1,
.project-content h2,
.project-content h3,
.project-content h4,
.project-content h5,
.project-content h6,
.project-description-content h1,
.project-description-content h2,
.project-description-content h3,
.project-description-content h4,
.project-description-content h5,
.project-description-content h6 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #212529;
}

.project-content h1,
.project-description-content h1 {
    font-size: 2rem;
    border-bottom: 3px solid #007bff;
    padding-bottom: 0.5rem;
}

.project-content h2,
.project-description-content h2 {
    font-size: 1.75rem;
    color: #007bff;
}

.project-content h3,
.project-description-content h3 {
    font-size: 1.5rem;
}

.project-content p,
.project-description-content p {
    margin-bottom: 1.25rem;
    text-align: justify;
}

.project-content ul,
.project-content ol,
.project-description-content ul,
.project-description-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.project-content li,
.project-description-content li {
    margin-bottom: 0.5rem;
}

.project-content img,
.project-description-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0;
}

.project-content blockquote,
.project-description-content blockquote {
    border-left: 4px solid var(--bs-primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #666;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 0 8px 8px 0;
}

/* Metrics Section */
.project-metrics-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.project-metrics-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="white" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="white" opacity="0.1"/><circle cx="50" cy="10" r="1" fill="white" opacity="0.1"/><circle cx="10" cy="90" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    z-index: 1;
}

.project-metrics-section .container {
    position: relative;
    z-index: 2;
}

.metric-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.metric-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.metric-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.metric-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.875rem;
}

/* Testimonial Section */
.testimonial-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    position: relative;
}

.testimonial-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 0%, rgba(0, 123, 255, 0.02) 50%, transparent 100%);
    z-index: 1;
}

.testimonial-section .container {
    position: relative;
    z-index: 2;
}

.testimonial-card {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 8rem;
    color: var(--bs-primary);
    opacity: 0.1;
    font-family: Georgia, serif;
    z-index: 1;
}

.testimonial-card .card-body {
    position: relative;
    z-index: 2;
}

.testimonial-content {
    font-size: 1.125rem;
    line-height: 1.7;
    color: #555;
    font-style: italic;
    margin-bottom: 2rem;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--bs-primary);
    padding: 2px;
}

.testimonial-author-info h6 {
    margin: 0;
    color: #333;
    font-weight: 600;
}

.testimonial-author-info small {
    color: #666;
}

.stars {
    color: #ffc107;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* Gallery Carousel */
.carousel-item img {
    transition: transform 0.3s ease;
}

.carousel-item:hover img {
    transform: scale(1.02);
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin: 0 4px;
    background-color: rgba(255, 255, 255, 0.5);
    border: 2px solid white;
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    background-color: var(--bs-primary);
    transform: scale(1.2);
}

.carousel-control-prev,
.carousel-control-next {
    width: 5%;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 30px;
    height: 30px;
    background-size: 100%;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.5);
    padding: 8px;
}

/* Similar Projects Section */
.similar-projects-section {
    background: #f8f9fa;
}

.project-card {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--bs-primary);
}

.project-card .card-img-top {
    transition: transform 0.3s ease;
    height: 200px;
    object-fit: cover;
}

.project-card:hover .card-img-top {
    transform: scale(1.05);
}

.project-card .card-body {
    position: relative;
}

.project-card .category-badge {
    position: absolute;
    top: -10px;
    left: 1rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
}

.project-card .card-title {
    color: #333;
    font-weight: 600;
    margin-top: 1rem;
}

.project-card .card-text {
    color: #666;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }
    
    .metric-number {
        font-size: 2rem;
    }
    
    .testimonial-author {
        flex-direction: column;
        text-align: center;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 8%;
    }
}

@media (max-width: 576px) {
    .metric-card {
        margin-bottom: 1rem;
    }
    
    .project-card {
        margin-bottom: 2rem;
    }
    
    .testimonial-card::before {
        font-size: 6rem;
        top: -5px;
    }
}

.project-content blockquote {
    border-left: 4px solid #007bff;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    background-color: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
}

.project-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0;
}

.project-content .image-style-align-left {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
    max-width: 50%;
}

.project-content .image-style-align-right {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    max-width: 50%;
}

.project-content .image-style-align-center {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.project-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.project-content table th,
.project-content table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.project-content table th {
    background-color: #007bff;
    color: white;
    font-weight: 600;
}

.project-content table tr:hover {
    background-color: #f5f5f5;
}

.project-content code {
    background-color: #f1f3f4;
    color: #c7254e;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

.project-content pre {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.project-content pre code {
    background: none;
    color: #212529;
    padding: 0;
    border-radius: 0;
}

/* Styles pour les descriptions d'images avec CKEditor5 */
.project-image-description {
    font-size: 0.95rem;
    line-height: 1.6;
}

.project-image-description p {
    margin-bottom: 0.75rem;
}

.project-image-description h1,
.project-image-description h2,
.project-image-description h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

/* Icônes personnalisées */
.icon-lg {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
}

.icon-xl {
    width: 80px;
    height: 80px;
    font-size: 2rem;
}

/* Animation hover pour les cartes */
.card-img-scale {
    transition: transform 0.3s ease;
}

.card-img-scale:hover {
    transform: translateY(-5px);
}

.card-img-scale-wrapper img {
    transition: transform 0.3s ease;
}

.card-img-scale:hover .card-img-scale-wrapper img {
    transform: scale(1.05);
}

/* Styles responsifs */
@media (max-width: 768px) {
    .project-content {
        font-size: 1rem;
    }
    
    .project-content h1 {
        font-size: 1.75rem;
    }
    
    .project-content h2 {
        font-size: 1.5rem;
    }
    
    .project-content .image-style-align-left,
    .project-content .image-style-align-right {
        float: none;
        margin: 1rem 0;
        max-width: 100%;
    }
    
    .icon-lg {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
    
    .icon-xl {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }
}

/* Styles pour les badges de catégories */
.category-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Animation pour les métriques */
.metric-card {
    transition: all 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Amélioration du modal d'image */
.modal-content {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.modal-body img {
    transition: transform 0.3s ease;
}

.modal-body:hover img {
    transform: scale(1.02);
}

/* Gradient pour le témoignage */
.testimonial-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Animation d'entrée pour les éléments */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.6s ease forwards;
}

/* Badge colors for different statuses */
.status-badge {
    padding: 0.375rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.status-draft {
    background-color: #6c757d;
    color: white;
}

.status-badge.status-in-progress {
    background-color: #ffc107;
    color: #212529;
}

.status-badge.status-completed {
    background-color: #28a745;
    color: white;
}

.status-badge.status-on-hold {
    background-color: #fd7e14;
    color: white;
}

.status-badge.status-cancelled {
    background-color: #dc3545;
    color: white;
}

/* Client logo filter for dark backgrounds */
.logo-filter-white {
    filter: brightness(0) invert(1);
}

/* Testimonial stars */
.testimonial-stars {
    color: #ffc107;
    font-size: 1.2rem;
}

/* Hero section height reduction */
.hero-section {
    padding-top: 4rem !important;
    padding-bottom: 3rem !important;
}

.hero-title {
    font-size: 2.5rem !important;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 3rem !important;
    }
}

@media (min-width: 1200px) {
    .hero-title {
        font-size: 3.5rem !important;
    }
}

/* Gallery Slider Styles */
.gallery-slider {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.gallery-slider-track {
    display: flex;
    transition: transform 0.3s ease;
    will-change: transform;
}

.gallery-slide {
    min-width: 300px;
    margin-right: 1rem;
    flex-shrink: 0;
}

.gallery-slide:last-child {
    margin-right: 0;
}

.gallery-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery-controls:hover {
    background: rgba(0, 0, 0, 0.9);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.gallery-controls.prev {
    left: 15px;
}

.gallery-controls.next {
    right: 15px;
}

.gallery-indicators {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 1rem;
}

.gallery-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #dee2e6;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-indicator.active {
    background: #007bff;
    transform: scale(1.2);
}

.gallery-indicator:hover {
    background: #007bff;
}

/* Improved testimonial section */
.testimonial-improved {
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.9) 0%, rgba(25, 135, 84, 0.9) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.testimonial-improved::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    opacity: 0.5;
}

.testimonial-content {
    position: relative;
    z-index: 2;
}

.testimonial-quote {
    font-size: 1.25rem;
    font-style: italic;
    line-height: 1.6;
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.testimonial-author {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.testimonial-role {
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Responsive adjustments for gallery */
@media (max-width: 768px) {
    .gallery-slide {
        min-width: 250px;
    }
    
    .gallery-controls {
        width: 40px;
        height: 40px;
    }
    
    .gallery-controls.prev {
        left: 10px;
    }
    
    .gallery-controls.next {
        right: 10px;
    }
    
    .hero-section {
        padding-top: 3rem !important;
        padding-bottom: 2rem !important;
    }
    
    .hero-title {
        font-size: 2rem !important;
    }
}
