/* ========================================================= */
/* 1. FIX CONFLICTOS CON SITE.CSS (¡IMPORTANTE!)            */
/* ========================================================= */
.machine-carousel-wrapper .carousel-item::before {
    content: none !important;
    background: none !important;
    display: none !important;
}

.machine-carousel-wrapper .carousel-item {
    height: auto !important;
    min-height: auto !important;
}

/* ========================================================= */
/* 2. HERO SECTION (CORREGIDO: ALTURA EXACTA 100vh)          */
/* ========================================================= */

.maquinaria-hero {
    /* POSICIONAMIENTO IDÉNTICO A SERVICIOS */
    position: relative;
    width: 100%;
    /* ALTURA DE PANTALLA COMPLETA */
    height: 100vh;
    min-height: 100vh;
    /* COMPENSACIÓN DEL NAVBAR (Igual que en Servicios) */
    margin-top: -95px;
    padding: 0; /* Importante: Sin padding para no alterar la altura */
    /* FLEXBOX PARA CENTRAR CONTENIDO */
    display: flex;
    align-items: center;
    justify-content: center;
    /* IMAGEN DE FONDO */
    background-image: url('../../img/FOTOS%20CATALOGO/portada_maquinaria.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Efecto Parallax */
    /* MARGEN INFERIOR PARA SEPARAR DEL CONTENIDO */
    margin-bottom: 0;
}

/* Overlay oscuro para legibilidad */
.maquinaria-hero .overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.60); /* Misma opacidad que Servicios */
    z-index: 1;
}

/* Contenido (Texto) */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 900px;
    padding: 20px;
    width: 100%; /* Asegura que ocupe el ancho disponible */
}

/* Título */
.hero-title-main {
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
}

/* Línea verde decorativa */
.hero-line {
    width: 100px;
    height: 5px;
    background: var(--km-green-primary);
    border-radius: 4px;
    box-shadow: 0 0 15px rgba(157, 204, 7, 0.6);
}

/* Subtítulo */
.hero-lead {
    text-shadow: 1px 1px 5px rgba(0,0,0,0.8);
    opacity: 0.95;
}

/* Animación de la flecha */
.animate-bounce {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* ========================================================= */
/* 3. ESTILOS GENERALES (Mismos de antes)                   */
/* ========================================================= */

.category-title {
    color: #1a1a1a; /* Texto oscuro */
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 6px solid var(--km-green-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* TARJETA DE MAQUINARIA */
.machine-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.04);
}

.machine-card .img-wrapper {
    width: 100%;
    height: 250px;
    background: #ffffff;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px;
}

.machine-card img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.6s ease;
    filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1));
}

.machine-overlay-hover {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(25,135,84,0.92), rgba(157,204,7,0.85));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    z-index: 10;
}

.btn-overlay {
    background: white;
    color: var(--km-green-dark);
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transform: translateY(20px) scale(0.9);
    transition: all 0.3s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.machine-info {
    padding: 1.5rem 0.8rem;
    background: white;
    position: relative;
    z-index: 5;
    border-top: 1px solid rgba(0,0,0,0.05);
    text-align: center;
}

.machine-title {
    font-size: 0.95rem;
    font-weight: 900;
    color: #1a1a1a;
    margin-bottom: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-height: 2.5em; 
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.25;
}

.machine-details-list {
    list-style: none;
    padding: 0 5px;
    margin: 0;
    font-size: 0.85rem;
    color: #6c757d;
    text-align: left;
}

.machine-details-list li {
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed #eee;
    padding-bottom: 2px;
}

.detail-label { font-weight: 700; color: var(--km-green-primary); }
.detail-value { font-weight: 500; color: #444; }

/* HOVER EFFECT */
.machine-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(25, 135, 84, 0.15);
    border-color: var(--km-green-primary);
}
.machine-card:hover img { transform: scale(1.1); }
.machine-card:hover .machine-overlay-hover { opacity: 1; }
.machine-card:hover .btn-overlay { transform: translateY(0) scale(1); }

/* FLECHAS */
.machine-carousel-wrapper {
    position: relative;
    padding: 0 60px;
}

.nav-btn-icon {
    width: 45px;
    height: 45px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    color: #1a1a1a;
    transition: all 0.3s ease;
    font-size: 1.2rem;
    border: 1px solid #eee;
}

.carousel-control-prev:hover .nav-btn-icon,
.carousel-control-next:hover .nav-btn-icon {
    background: var(--km-green-primary);
    color: white;
    transform: scale(1.15);
    border-color: var(--km-green-primary);
    box-shadow: 0 8px 15px rgba(157, 204, 7, 0.4);
}

.carousel-control-prev, .carousel-control-next {
    width: 50px;
    opacity: 1;
    z-index: 20;
}
.carousel-control-prev { left: 0; }
.carousel-control-next { right: 0; }

@media (max-width: 768px) {
    .machine-carousel-wrapper { padding: 0 10px; }
    .carousel-control-prev, .carousel-control-next { display: none; }
}

/* MODAL */
.btn-whatsapp {
    background-color: #25D366;
    color: white;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
}
.btn-whatsapp:hover {
    background-color: #128C7E;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4);
}

.btn-close-modal {
    background: white;
    border: 1px solid #eee;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.btn-close-modal:hover {
    background: #f8f9fa;
    transform: rotate(90deg);
}

/* ANIMACIONES */
.fade-in-up { animation: fadeInUp 0.8s ease-out; }
.fade-in-section { animation: fadeIn 1s ease-out; }

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}