:root { 
    --primary-color: #008990; 
    --primary-dark: #006b70;
    --secundary-color: #525252;
}

body { 
    font-family: 'Inter', sans-serif; 
    transition: background 0.3s ease, color 0.3s ease;
}

/* Utilidades de Color Personalizadas */
.text-custom { color: var(--primary-color) !important; }
.text-custom-2 { color: var(--secundary-color) !important; }
.bg-custom { background-color: var(--primary-color) !important; }
.btn-custom { 
    background-color: var(--primary-color); 
    color: white; 
    border: none;
    transition: 0.3s;
}
.btn-custom:hover { 
    background-color: var(--primary-dark); 
    color: white;
    transform: translateY(-2px);
}

/* Estilos de Tarjetas de Producto */
.product-card { 
    border: none; 
    border-radius: 16px; 
    transition: 0.3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.product-card:hover { 
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

/* La magia para que la imagen no se deforme */
.img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Ajusta la imagen sin cortarla y sin estirarla */
    transition: transform 0.3s ease;
}

.img-container {
    width: 100%;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: #fff;
    border-radius: 16px 16px 0 0;
}

[data-bs-theme="dark"] .img-container { background: #f8f9fa; } /* Fondo claro para resaltar hardware oscuro */

/* Switch de Tema */
.theme-toggle {
    cursor: pointer;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid rgba(0,0,0,0.1);
    transition: 0.3s;
}

/* Tarjetas de servicios */
.service-card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}
.service-card:hover {
    transform: scale(1.05);
}

/* Ajuste de imágenes para tarjetas de servicios para unificar tamaños */
.service-card img {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

/* Tarjetas de noticias */
.tarjeta-peq-noticia{
    border-top: 1px solid #DCE2E9;
    padding: 2em;
}

.img-peq-noticia{
    width: 70%;
}

.list-inline .list-inline-item {
    padding: 10px 15px;
}

.scale {width: 60%;}

[data-bs-theme="dark"] .theme-toggle { border-color: rgba(255,255,255,0.2); }

/* Contenedor de la imagen principal */
.main-img-container {
    width: 100%;
    height: 450px; /* Altura máxima controlada */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    border: 1px solid #eee;
}

.main-img-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Mantiene la proporción sin deformar */
    transition: opacity 0.3s ease;
}

/* Contenedor de miniaturas */
.thumbnail-grid {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.thumb-link {
    width: 80px;
    height: 80px;
    border: 2px solid #eee;
    border-radius: 8px;
    cursor: pointer;
    overflow: hidden;
    transition: 0.2s;
}

.thumb-link:hover, .thumb-link.active {
    border-color: var(--primary-color); /* Tu color #008990 */
}

.thumb-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}