/* ==========================================
   PLUGINS PAGE STYLES
========================================== */

.plugins-hero {
    padding: 120px 5% 60px;
    text-align: center;
    min-height: 40vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.plugins-hero-content h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
    margin-bottom: 20px;
    font-weight: bold;
}

.plugins-subtitle {
    font-size: clamp(1.2rem, 3vw, 1.8rem);
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================
   AÑADIDO: SEARCH SECTION
========================================== */
.search-section {
    padding: 20px 5%;
    display: flex;
    justify-content: center;
}

.search-container {
    display: flex;
    width: 100%;
    max-width: 600px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: 50px;
    padding: 5px;
    transition: all 0.3s ease;
}

.search-container:focus-within {
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.4);
}

#pluginSearch {
    flex-grow: 1;
    background: transparent;
    border: none;
    outline: none;
    color: white;
    font-size: 1rem;
    padding: 10px 20px;
}

.search-btn {
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    border: none;
    border-radius: 50%;
    padding: 10px;
    width: 45px;
    height: 45px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.search-btn:hover {
    transform: scale(1.1);
}

.search-btn svg {
    width: 20px;
    height: 20px;
    color: white;
}

/* ==========================================
   PLUGINS CATALOG
========================================== */

.plugins-catalog {
    padding: 60px 5% 100px;
}

.plugins-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.plugin-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    position: relative;
    transform: translateY(30px);
    opacity: 0;
    animation: slideUpCard 0.8s ease-out forwards;
}

.plugin-card:nth-child(1) { animation-delay: 0.1s; }
.plugin-card:nth-child(2) { animation-delay: 0.2s; }
.plugin-card:nth-child(3) { animation-delay: 0.3s; }
.plugin-card:nth-child(4) { animation-delay: 0.4s; }

.plugin-card:hover {
    transform: translateY(-15px);
    border-color: #4ecdc4;
    box-shadow: 0 25px 50px rgba(78, 205, 196, 0.3);
}

.plugin-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.plugin-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.plugin-card:hover .plugin-image img {
    transform: scale(1.1);
}

.plugin-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    padding: 5px 15px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(255, 107, 107, 0.4);
}

.plugin-info {
    padding: 25px;
}

.plugin-name {
    font-size: 1.5rem;
    font-weight: bold;
    color: #4ecdc4;
    margin-bottom: 10px;
}

.plugin-description {
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.plugin-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.feature-tag {
    background: rgba(78, 205, 196, 0.2);
    color: #4ecdc4;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(78, 205, 196, 0.3);
}

.plugin-pricing {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 20px;
}

.price-from {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.price-amount {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.plugin-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    font-size: 1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.plugin-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 107, 107, 0.4);
}

.plugin-btn:disabled {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    cursor: not-allowed;
}

.plugin-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.plugin-btn:hover:not(:disabled)::before {
    left: 100%;
}

/* ==========================================
   MODAL STYLES (Primer Modal de Versiones) - CORREGIDO
========================================== */

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease-out;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: linear-gradient(135deg, rgba(15, 15, 35, 0.95), rgba(26, 0, 51, 0.95));
    padding: 0;
    border: 1px solid rgba(78, 205, 196, 0.5);
    border-radius: 20px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: slideInModal 0.4s ease-out;
}

.close {
    position: absolute;
    right: 20px;
    top: 15px;
    color: #4ecdc4;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1;
    transition: color 0.3s ease;
}

.close:hover {
    color: #ff6b6b;
}

.modal-body {
    padding: 40px 30px 30px;
}

/* ==========================================
   MODAL CONTENT STYLES (Primer Modal)
========================================== */

.modal-header {
    text-align: center;
    margin-bottom: 40px;
}

.modal-plugin-title {
    font-size: 2.5rem;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1);
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 3s ease infinite;
    margin-bottom: 10px;
    font-weight: bold;
}

.modal-plugin-desc {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.version-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.version-card {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid rgba(78, 205, 196, 0.3);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.version-card:hover {
    border-color: #4ecdc4;
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(78, 205, 196, 0.2);
}

.version-card.recommended {
    border-color: #ff6b6b;
    background: rgba(255, 107, 107, 0.1);
}

.version-card.recommended::before {
    content: '⭐ RECOMENDADO';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.version-name {
    font-size: 1.3rem;
    font-weight: bold;
    color: #4ecdc4;
    margin-bottom: 10px;
}

.version-price {
    font-size: 2rem;
    font-weight: bold;
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

.version-features {
    list-style: none;
    margin-bottom: 20px;
    padding: 0;
}

.version-features li {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.version-features li::before {
    content: '✓';
    color: #4ecdc4;
    font-weight: bold;
    margin-right: 8px;
}

.version-btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.version-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.4);
}

/* ==========================================
   ACTIVE NAVIGATION
========================================== */

.nav-links a.active {
    color: #4ecdc4;
    text-shadow: 0 0 10px #4ecdc4;
}

.nav-links a.active::after {
    width: 100%;
}

/* ==========================================
   ESTILOS PARA EL SEGUNDO MODAL (DETALLES) - CORREGIDO LAYOUT
========================================== */

#detailsModal {
    display: none;
    align-items: center;
    justify-content: center;
}

#detailsModal .modal-content {
    max-width: 1000px;
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-title {
    text-align: center;
    font-size: 2rem;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 30px;
    font-weight: bold;
}

/* CORREGIDO: Layout con carrusel - Video e imágenes en mismo contenedor deslizable */
.details-grid-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    color: rgba(255, 255, 255, 0.8);
    padding: 0 20px;
}

.details-media-column {
    position: relative;
}

/* Carrusel contenedor principal */
.media-carousel {
    position: relative;
    width: 100%;
    height: 300px;
    border-radius: 15px;
    overflow: hidden;
    border: 2px solid rgba(78, 205, 196, 0.3);
    background: rgba(0, 0, 0, 0.3);
}

/* Contenedor deslizable */
.carousel-container {
    display: flex;
    height: 100%;
    transition: transform 0.4s ease;
}

/* Elementos del carrusel (video e imágenes) */
.carousel-item {
    min-width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Video dentro del carrusel */
.carousel-item.video-item {
    background: rgba(0, 0, 0, 0.5);
}

.carousel-item iframe {
    width: 90%;
    height: 90%;
    border: none;
    border-radius: 10px;
}

/* Imágenes dentro del carrusel */
.carousel-item.image-item {
    background: rgba(0, 0, 0, 0.2);
}

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Botones de navegación */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #4ecdc4;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: bold;
    transition: all 0.3s ease;
    z-index: 10;
}

.carousel-nav:hover {
    background: rgba(78, 205, 196, 0.8);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
    left: 10px;
}

.carousel-nav.next {
    right: 10px;
}

/* Indicadores */
.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator.active {
    background: #4ecdc4;
    transform: scale(1.2);
}

/* Etiqueta de tipo de contenido */
.content-label {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #4ecdc4;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 10;
}

/* Info card al lado derecho - TAMAÑO CONTROLADO */
.details-info-card {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 0;
    max-width: 100%;
    overflow: hidden;
}

.details-price-box {
    background: rgba(78, 205, 196, 0.1);
    border: 2px solid rgba(78, 205, 196, 0.5);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-sizing: border-box;
}

.details-price-box span:first-child {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.details-price-box .price-amount {
    font-size: 1.8rem;
    font-weight: bold;
    background: linear-gradient(45deg, #4ecdc4, #45b7d1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0;
    word-break: break-word;
}

.details-features-box, .compatibility-box {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(78, 205, 196, 0.3);
    border-radius: 15px;
    padding: 15px;
    box-sizing: border-box;
}

.details-features-box h3, .compatibility-box h3 {
    color: #4ecdc4;
    font-size: 1.1rem;
    margin-bottom: 12px;
    font-weight: bold;
}

.features-list-box {
    list-style: none;
    padding: 0;
    margin: 0;
}

.features-list-box li {
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.features-list-box li::before {
    content: '✓';
    color: #4ecdc4;
    font-weight: bold;
    margin-right: 8px;
}

.compatibility-box p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 6px;
    font-size: 0.85rem;
    word-wrap: break-word;
}

.buy-button-container {
    grid-column: 1 / -1;
    padding: 20px 0 0;
    text-align: center;
}

.buy-btn {
    width: 100%;
    max-width: 400px;
    padding: 15px 30px;
    border: none;
    border-radius: 50px;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4);
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(255, 107, 107, 0.4);
}

/* Menú móvil */
.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.mobile-menu.active span:nth-child(2) { opacity: 0; }
.mobile-menu.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.nav-links.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
    padding: 20px 0;
}

/* ==========================================
   RESPONSIVE
========================================== */

@media (max-width: 768px) {
    .plugins-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 3%;
    }
    
    .version-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        max-height: 90vh;
    }
    
    .modal-body {
        padding: 30px 20px 20px;
    }
    
    .modal-plugin-title {
        font-size: 2rem;
    }

    .details-grid-container {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }
    
    .nav-links {
        display: none;
    }
    
    .mobile-menu {
        display: flex;
    }

    .gallery-image {
        width: 120px;
        height: 80px;
    }

    .video-container {
        padding-top: 60%; /* Más cuadrado en móvil */
    }
}

/* ==========================================
   ANIMATIONS
========================================== */

@keyframes slideUpCard {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInModal {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* FIX PARA ELEMENTOS MOLESTOS */
div[style*="position: fixed"][style*="bottom"]:not(.footer) {
    display: none !important;
}