/*
 * Connect Security Go - Composants améliorés
 * Ce fichier contient les styles pour les composants avancés comme les carousels et les compteurs
 */

/* ===== PARTNER CAROUSEL ===== */
.partner-carousel {
    padding: 20px 0;
}

.partner-slide {
    display: flex !important;
    justify-content: center;
    align-items: center;
    height: 100px;
    padding: 0 15px;
}

.partner-slide img {
    max-height: 80px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.partner-slide:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Slick carousel customization */
.slick-prev, .slick-next {
    width: 40px;
    height: 40px;
    background-color: rgba(22, 31, 59, 0.8);
    border-radius: 50%;
    z-index: 10;
    transition: all 0.3s ease;
}

.slick-prev:hover, .slick-next:hover {
    background-color: #9D835F;
}

.slick-prev:before, .slick-next:before {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 18px;
    opacity: 1;
}

.slick-prev:before {
    content: '\f104';
}

.slick-next:before {
    content: '\f105';
}

.slick-dots {
    bottom: -30px;
}

.slick-dots li button:before {
    font-size: 10px;
    color: rgba(22, 31, 59, 0.5);
    opacity: 1;
}

.slick-dots li.slick-active button:before {
    color: #9D835F;
}

/* ===== COUNTER SECTION ===== */
.counter-section {
    background-color: #161F3B;
    color: #ffffff;
    padding: 50px 0;
    position: relative;
    overflow: hidden;
}

.counter-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('../img/video-hd.jpg') center/cover no-repeat;
    opacity: 0.1;
    z-index: 1;
}

.counter-grid {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    text-align: center;
}

.counter-item {
    padding: 20px;
    transition: all 0.3s ease;
}

.counter-item:hover {
    transform: translateY(-10px);
}

.counter-icon {
    font-size: 2.5rem;
    color: #9D835F;
    margin-bottom: 15px;
}

.counter-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 5px;
    font-family: 'Raleway', sans-serif;
    background: linear-gradient(45deg, #9D835F, #d4c09f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.counter-text {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ===== TESTIMONIALS ===== */
.testimonials {
    padding: 50px 0;
    background-color: #f8f9fa;
}

.testimonial-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 0;
}

.testimonial {
    background-color: #fff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
}

.testimonial.active {
    opacity: 1;
    transform: translateY(0);
    position: relative;
}

.testimonial-content {
    margin-bottom: 20px;
    font-style: italic;
    color: #555;
}

.testimonial-content p::before {
    content: '\201C';
    font-size: 30px;
    color: #9D835F;
    margin-right: 5px;
}

.testimonial-content p::after {
    content: '\201D';
    font-size: 30px;
    color: #9D835F;
    margin-left: 5px;
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.testimonial-author-image {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 15px;
    border: 3px solid #9D835F;
}

.testimonial-author-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-author-name {
    font-weight: 700;
    color: #161F3B;
    margin-bottom: 5px;
}

.testimonial-author-title {
    font-size: 0.9rem;
    color: #9D835F;
}

.testimonial-dots {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.testimonial-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(22, 31, 59, 0.3);
    margin: 0 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.testimonial-dot.active {
    background-color: #9D835F;
    transform: scale(1.2);
}

/* ===== GALLERY ===== */
.gallery-section {
    padding: 50px 0;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    height: 250px;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(22, 31, 59, 0.1), rgba(22, 31, 59, 0.8));
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: all 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-caption {
    color: #fff;
    font-weight: 600;
    transform: translateY(20px);
    transition: all 0.3s ease 0.1s;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* Lightbox */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    position: relative;
}

.lightbox-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 5px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    color: #9D835F;
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
}

.lightbox-prev, .lightbox-next {
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.lightbox-prev {
    margin-left: -60px;
}

.lightbox-next {
    margin-right: -60px;
}

.lightbox-prev:hover, .lightbox-next:hover {
    background-color: #9D835F;
}

.lightbox-caption {
    position: absolute;
    bottom: -40px;
    left: 0;
    width: 100%;
    text-align: center;
    color: #fff;
    font-size: 16px;
}

/* ===== RESPONSIVE STYLES ===== */
@media (max-width: 992px) {
    .counter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .counter-number {
        font-size: 2.5rem;
    }
    
    .testimonial {
        padding: 20px;
    }
    
    .lightbox-prev {
        margin-left: 10px;
    }
    
    .lightbox-next {
        margin-right: 10px;
    }
}

@media (max-width: 576px) {
    .counter-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonial-author-image {
        width: 60px;
        height: 60px;
    }
}