/* Estilos para componentes específicos como tarjetas de servicios, características, etc. */

/* --- Grid de Servicios Destacados (index.php) y Servicios Full (servicios.php) --- */
.services-grid,
.services-full-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); /* Responsivo con minmax */
    gap: 30px; /* Espacio entre tarjetas */
    max-width: 1200px;
    margin: 0 auto;
}

.service-card { /* Esta clase es usada en index.php y servicios.php */
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px; /* Bordes más suaves */
    padding: 25px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; /* Para organizar el contenido internamente */
    flex-direction: column;
    justify-content: space-between; /* Empuja el botón al final */
    position: relative; /* Para el ícono y el precio absoluto */
    overflow: hidden; /* Asegura que las imágenes no se desborden si son más grandes */
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 230, 118, 0.15);
}

.service-card .service-image {
    width: calc(100% + 50px); /* Para que la imagen ocupe el ancho y se desborde un poco */
    height: 150px;
    margin: -25px -25px 20px -25px; /* Margen negativo para que la imagen se extienda a los bordes */
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    background-color: #333; /* Color de fondo si no hay imagen */
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-card .service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recorta la imagen para que cubra el área */
    display: block; /* Elimina espacio extra debajo de la imagen */
    opacity: 0.8; /* Ligeramente más opaco para que el texto se vea mejor encima */
}


.service-card .service-icon {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
    background-color: var(--secondary-color); /* Fondo para el ícono circular */
    border-radius: 50%;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px; /* Centrar el ícono */
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 230, 118, 0.3);
}

.service-card .service-price {
    position: absolute;
    top: 20px;
    right: 20px;
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 1.2em;
    z-index: 5;
}

.service-card .service-time {
    font-size: 0.9em;
    color: #999;
    margin-top: -10px; /* Ajuste para que quede cerca del precio */
    margin-bottom: 15px;
}


.service-card h3 {
    font-size: 1.4em;
    color: var(--text-color);
    margin-bottom: 10px;
    font-weight: 700;
}

.service-card p {
    font-size: 0.95em;
    color: #B0B0B0;
    margin-bottom: 20px;
    flex-grow: 1; /* Permite que el párrafo ocupe el espacio disponible */
}

.service-features {
    list-style: none;
    text-align: left;
    margin-bottom: 25px;
    padding-left: 0;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-color);
    font-size: 0.9em;
    margin-bottom: 8px;
}

.service-features li .fas {
    color: var(--primary-color);
    font-size: 1.1em;
}

.service-card .btn {
    width: 100%;
    margin-top: auto; /* Empuja el botón al final de la tarjeta */
}

/* --- Grid de Características (Por Qué Elegir) --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    max-width: 1000px; /* Un poco más estrecho para esta sección */
    margin: 0 auto;
}

.feature-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 230, 118, 0.15);
}

.feature-card .feature-icon {
    font-size: 3em;
    color: var(--primary-color);
    margin-bottom: 20px;
    background-color: var(--secondary-color);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(0, 230, 118, 0.4);
}

.feature-card h3 {
    font-size: 1.5em;
    color: var(--text-color);
    margin-bottom: 15px;
    font-weight: 700;
}

.feature-card p {
    font-size: 0.95em;
    color: #B0B0B0;
    line-height: 1.7;
}


/* --- Responsive adjustments for components --- */
@media (max-width: 768px) {
    .services-grid,
    .features-grid,
    .services-full-grid,
    .projects-grid-full {
        grid-template-columns: 1fr;
        max-width: 400px;
    }
    .service-card .service-image {
        margin: -25px -25px 20px -25px;
        height: 180px;
    }
}