/* ==========================================================================
   AS HOLDING - Carousel & Loader Styles
   Version: 2.0
   ========================================================================== */

/* ==========================================================================
   Loader Mejorado
   ========================================================================== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: linear-gradient(135deg, #FFFFFF 0%, #F0F8FF 100%);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    position: relative;
}

.logo-loader-container {
    width: 180px;
    height: 180px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-loader-img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    z-index: 3;
    position: relative;
    animation: logoPulse 2s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

.loader-circle {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 107, 53, 0.2);
    border-top-color: #FF6B35;
    border-radius: 50%;
    animation: spin 1.5s linear infinite;
}

.loader-circle-2 {
    position: absolute;
    width: 130%;
    height: 130%;
    border: 3px solid rgba(0, 196, 204, 0.2);
    border-bottom-color: #00C4CC;
    border-radius: 50%;
    animation: spin-reverse 2s linear infinite;
    top: -15%;
    left: -15%;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spin-reverse {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

.loader-text {
    margin-top: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.loading-text {
    font-size: 1.2rem;
    font-weight: 600;
    background: linear-gradient(90deg, #FF6B35 0%, #00C4CC 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-dots {
    display: inline-flex;
}

.loading-dots span {
    font-size: 1.5rem;
    font-weight: bold;
    color: #FF6B35;
    animation: dotAnimation 1.5s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
    color: #00C4CC;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
    color: #FF6B35;
}

@keyframes dotAnimation {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: translateY(0);
    }
    30% {
        opacity: 1;
        transform: translateY(-10px);
    }
}

.loader-progress {
    width: 200px;
    height: 4px;
    background: rgba(0, 196, 204, 0.1);
    border-radius: 2px;
    margin: 20px auto 0;
    overflow: hidden;
    position: relative;
}

.loader-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #FF6B35 0%, #00C4CC 50%, #FF6B35 100%);
    animation: progressAnimation 2s ease-in-out infinite;
    background-size: 200% 100%;
}

@keyframes progressAnimation {
    0% {
        background-position: 200% 0;
        width: 0;
    }
    50% {
        width: 100%;
    }
    100% {
        background-position: -200% 0;
        width: 0;
    }
}

/* ==========================================================================
   Companies Carousel
   ========================================================================== */
.companies-carousel {
    padding: 40px 0;
}

.swiper {
    width: 100%;
    padding-bottom: 50px;
}

.swiper-slide {
    background-position: center;
    background-size: cover;
    height: auto;
}

.companies-carousel .company-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.companies-carousel .company-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.companies-carousel .company-logo {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
}

.companies-carousel .company-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.companies-carousel .logo-placeholder {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #FF6B35 0%, #00C4CC 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.companies-carousel h3 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.companies-carousel p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.companies-carousel .company-features {
    list-style: none;
    padding: 0;
    margin-bottom: 25px;
}

.companies-carousel .company-features li {
    padding: 8px 0;
    color: #555;
    display: flex;
    align-items: center;
    gap: 10px;
}

.companies-carousel .company-features i {
    color: #00C4CC;
    font-size: 0.9rem;
}

.companies-carousel .btn-learn-more {
    color: #FF6B35;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.companies-carousel .btn-learn-more:hover {
    gap: 15px;
    color: #00C4CC;
}

/* Swiper Navigation */
.swiper-button-next,
.swiper-button-prev {
    color: #FF6B35;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: linear-gradient(135deg, #FF6B35 0%, #00C4CC 100%);
    color: white;
    transform: scale(1.1);
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px;
    font-weight: bold;
}

/* Swiper Pagination */
.swiper-pagination {
    position: relative;
    margin-top: 30px;
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #00C4CC;
    opacity: 0.3;
    transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
    width: 30px;
    border-radius: 6px;
    background: linear-gradient(90deg, #FF6B35 0%, #00C4CC 100%);
    opacity: 1;
}

/* ==========================================================================
   Team Grid Actualizado
   ========================================================================== */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

/* Para 5 miembros, ajustar el grid */
@media (min-width: 1200px) {
    .team-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .team-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 768px) {
    .logo-loader-container {
        width: 140px;
        height: 140px;
    }
    
    .logo-loader-img {
        width: 90px;
        height: 90px;
    }
    
    .loading-text {
        font-size: 1rem;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        width: 40px;
        height: 40px;
    }
    
    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 16px;
    }
}

/* ==========================================================================
   About Section con Foto Grupal
   ========================================================================== */
.about-image {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    max-width: 600px;
    margin: 0 auto;
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.5s ease;
}

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

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.9) 0%, rgba(0, 196, 204, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.about-image:hover .image-overlay {
    opacity: 1;
}

.overlay-content {
    text-align: center;
    color: white;
}

.overlay-content i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.overlay-content p {
    font-size: 1.2rem;
    font-weight: 600;
}

/* ==========================================================================
   Modificaciones para Carrusel Principal - Sin Flechas y con Imagen Grupal
   ========================================================================== */

/* Imagen grupal en el carrusel hero */
.hero-slide-grupal {
    background-image: url('../assets/team/grupal-new.jpg');
    background-size: cover;
    background-position: center;
    position: relative;
}

/* Ocultar flechas de navegación en todos los carruseles */
.heroSwiper .swiper-button-next,
.heroSwiper .swiper-button-prev,
.companies-carousel-auto .swiper-button-next,
.companies-carousel-auto .swiper-button-prev,
.teamSwiper .swiper-button-next,
.teamSwiper .swiper-button-prev {
    display: none !important;
}

/* Estilos mejorados para el carrusel de empresas */
.companies-carousel-auto {
    padding: 40px 0;
}

.companies-carousel-auto .company-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(0.95);
    opacity: 0.9;
}

.companies-carousel-auto .swiper-slide-active .company-card {
    transform: scale(1);
    opacity: 1;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15);
}

/* Sección de Cobertura Mejorada */
.coverage-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    margin-top: 50px;
}

.coverage-stats-modern {
    animation: fadeInLeft 1s ease-out;
}

.stats-cards {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.stat-card.highlight {
    background: linear-gradient(135deg, #00BCD4 0%, #00ACC1 100%);
    color: white;
}

.stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 188, 212, 0.1);
    border-radius: 12px;
    margin-right: 20px;
    font-size: 24px;
    color: #00BCD4;
}

.stat-card.highlight .stat-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.stat-info h4 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: #666;
}

.stat-card.highlight .stat-info h4 {
    color: rgba(255,255,255,0.9);
}

.stat-number {
    font-size: 32px;
    font-weight: 700;
    color: #333;
    margin: 8px 0;
}

.stat-card.highlight .stat-number {
    color: white;
}

.stat-desc {
    font-size: 13px;
    color: #999;
}

.stat-card.highlight .stat-desc {
    color: rgba(255,255,255,0.8);
}

.coverage-details {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.detail-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 16px;
    color: #555;
}

.detail-item i {
    color: #00BCD4;
    margin-right: 12px;
    font-size: 20px;
}

/* Responsive para Cobertura */
@media (max-width: 768px) {
    .coverage-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .map-peru {
        height: 350px;
    }
    
    .stats-cards {
        grid-template-columns: 1fr;
    }
}
