/* Estilos para Portfolio y Webs en index.php */

/* Tarjetas de proyectos */
.project-card, .web-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
}

.project-card:hover, .web-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.card-img-container {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.project-image, .web-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-image,
.web-card:hover .web-image {
    transform: scale(1.05);
}

.project-image-placeholder, .web-image-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #6c757d;
}

.project-badge, .web-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
}

.project-title, .web-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    line-height: 1.3;
    height: 2.6em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.project-description, .web-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.5;
    height: 4.5em;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.web-features {
    border-top: 1px solid #f0f0f0;
    padding-top: 10px;
    margin-top: 10px;
}

.web-features li {
    padding: 2px 0;
    font-size: 0.85rem;
}

/* Botón Ver Más */
#loadMorePortfolio, #loadMoreWebs {
    padding: 12px 40px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    border-width: 2px;
}

#loadMorePortfolio:hover, #loadMoreWebs:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

#loadMorePortfolio {
    border-color: #000000;
    color: #000000;
}

#loadMorePortfolio:hover {
    background-color: #eeff01;
    color: rgb(0, 0, 0);
}

#loadMoreWebs {
    border-color: #000000;
    color: #000000;
}

#loadMoreWebs:hover {
    background-color: #eeff01;
    color: rgb(0, 0, 0);
}

/* Animación para nuevos items */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.new-item {
    animation: fadeInUp 0.5s ease forwards;
}

/* Responsive */
@media (max-width: 992px) {
    .col-lg-3 {
        width: 50%;
    }
}

@media (max-width: 768px) {
    .col-lg-3, .col-md-6 {
        width: 100%;
    }
    
    .project-card, .web-card {
        max-width: 400px;
        margin: 0 auto;
    }
    
    .card-img-container {
        height: 180px;
    }
}

/* Loading spinner */
.loader {
    display: none;
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #eeff01;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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

/* Contador de items */
.items-count {
    background-color: rgba(71, 138, 201, 0.1);
    border-radius: 20px;
    padding: 5px 15px;
    font-size: 0.9rem;
    color: #478ac9;
    margin-left: 10px;
}

/* Grid layout */
.portfolio-container, .webs-container {
    position: relative;
}

.row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}

@media (min-width: 1200px) {
    .row {
        grid-template-columns: repeat(4, 1fr);
    }
}

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

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


/* Botones Ver Más - Estilo cuadrado amarillo */
.btn-ver-mas {
    width: 200px; /* Ancho cuadrado */
    height: 100px; /* Alto cuadrado */
    background-color: #FFD700 !important; /* Amarillo dorado */
    color: #000000 !important; /* Letras negras */
    border: 3px solid #000000 !important; /* Borde negro */
    border-radius: 15px !important; /* Bordes ligeramente redondeados */
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 800 !important; /* Negrita */
    font-size: 1.2rem !important;
    text-transform: uppercase !important;
    transition: all 0.3s ease !important;
    padding: 0 !important;
    margin: 20px auto !important;
    position: relative !important;
    overflow: hidden !important;
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3) !important;
}

/* Icono más grande */
.btn-ver-mas i {
    font-size: 3rem !important;
    margin-bottom: 10px !important;
    color: #000000 !important;
}

/* Badge dentro del botón */
.btn-ver-mas .btn-badge {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
    background-color: #000000 !important;
    color: #FFD700 !important;
    font-size: 0.9rem !important;
    font-weight: 700 !important;
    padding: 5px 10px !important;
    border-radius: 20px !important;
}

/* Efectos hover */
.btn-ver-mas:hover {
    background-color: #FFC107 !important; /* Amarillo más oscuro */
    transform: translateY(-5px) scale(1.05) !important;
    box-shadow: 0 10px 25px rgba(255, 215, 0, 0.4) !important;
    border-color: #000000 !important;
}

.btn-ver-mas:active {
    transform: translateY(-2px) scale(1.02) !important;
}

/* Versión para portfolio */
#loadMorePortfolio {
    background-color: #FFD700 !important;
    color: #000000 !important;
    border-color: #000000 !important;
}

/* Versión para webs */
#loadMoreWebs {
    background-color: #FFD700 !important;
    color: #000000 !important;
    border-color: #000000 !important;
}

/* Efecto de pulso */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 215, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

.btn-ver-mas.pulse {
    animation: pulse 2s infinite;
}

/* Responsive para botones */
@media (max-width: 768px) {
    .btn-ver-mas {
        width: 180px !important;
        height: 180px !important;
        font-size: 1.1rem !important;
    }
    
    .btn-ver-mas i {
        font-size: 2.5rem !important;
    }
}

@media (max-width: 576px) {
    .btn-ver-mas {
        width: 150px !important;
        height: 150px !important;
        font-size: 1rem !important;
    }
    
    .btn-ver-mas i {
        font-size: 2rem !important;
    }
    
    .btn-ver-mas .btn-badge {
        font-size: 0.8rem !important;
        padding: 4px 8px !important;
    }
}

/* Contenedor del botón */
.ver-mas-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 40px 0;
    padding: 20px;
}

/* Líneas decorativas */
.ver-mas-container::before,
.ver-mas-container::after {
    content: '';
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, transparent, #FFD700, transparent);
    margin: 0 30px;
}

@media (max-width: 768px) {
    .ver-mas-container::before,
    .ver-mas-container::after {
        margin: 0 15px;
    }
}