/*****
AGRICULTURA INTERACTIVE NODE 4
*****/

.page-node-4 #main {
    background-image: url(../img/backgrounds/bg-agricultura.jpg);
    background-size: cover;
    background-position: center;
    min-height: calc(100vh - var(--drupal-displace-offset-top, 0px) - 76px);
    position: relative;
    padding: 0;
    overflow: hidden;
}

.agriculture-interactive {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: calc(100vh - var(--drupal-displace-offset-top, 0px) - 76px);
}

.agriculture-header {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    z-index: 20;
    width: auto;
    min-width: 300px;
}

.agriculture-header .title {
    background-color: var(--rojo);
    color: white;
    padding: 15px 40px 0 40px;
    font-size: 2.5rem;
    font-weight: 800;
    border-radius: 15px 15px 0 0;
    font-family: var(--font-title);
    line-height: 1;
}

.agriculture-header .subtitle {
    background-color: var(--rojo);
    color: white;
    padding: 8px 20px;
    font-size: 1rem;
    border-radius: 0 0 15px 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.agri-pin {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none !important;
    z-index: 10;

    /* Transición suave y prolongada al soltar (mouse-leave) */
    transform: translateY(0) scale(1);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.agri-pin:hover {
    z-index: 30;
    /* El estado final en hover: un poco más grande y desplazado hacia arriba */
    transform: translateY(-8px) scale(1.15);
    /* Transición rápida y elástica al pasar por encima */
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.agri-pin img {
    /* Filtro rojo: #D8000D */
    filter: brightness(0) saturate(100%) invert(14%) sepia(85%) saturate(7000%) hue-rotate(345deg) brightness(90%) contrast(110%);
}

.pin-icon {
    background: var(--uagn-bg);
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    margin-bottom: 8px;
    border: 4px solid var(--uagn-bg);
    position: relative;
}

.pin-icon::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-top: 10px solid var(--uagn-bg);
}

.pin-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.pin-text {
    background-color: var(--rojo);
    color: white;
    padding: 4px 15px;
    font-size: .8rem;
    border-radius: 5px;
    white-space: nowrap;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
}

.page-node-95 .pin-text {
    background-color: var(--gris);
}

.pin-hortaliza {
    top: 22%;
    left: 15%;
}

.pin-vina {
    top: 45%;
    left: 19%;
}

.pin-cereal {
    top: 80%;
    left: 12%;
}

.pin-frutales {
    top: 28%;
    left: 73%;
}

.pin-fincas {
    top: 52%;
    left: 85%;
}

.pin-olivos {
    top: 78%;
    left: 71%;
}

.pin-maquinaria {
    top: 62%;
    left: 47%;
}

@media (max-width: 991px) {

    .page-node-4 #main,
    .page-node-95 #main {
        min-height: auto;
        overflow: visible;
    }

    .agriculture-interactive,
    .ganaderia-interactive {
        min-height: auto;
        padding-bottom: 50px;
        background-color: transparent;
    }

    .agriculture-header {
        position: relative;
        top: 0;
        margin-top: 40px;
        margin-bottom: 30px;
        transform: none;
        left: 0;
    }

    .agriculture-header .title {
        font-size: 1.8rem;
    }

    .agriculture-header .subtitle {
        font-size: 0.8rem;
    }

    .pins-map {
        display: flex;
        flex-direction: column;
        gap: 15px;
        padding: 0 20px;
        max-width: 500px;
        margin: 0 auto;
    }

    .agri-pin {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        flex-direction: row;
        align-items: center;
        background-color: var(--uagn-card-bg);
        opacity: 0.95;
        border-radius: 50px;
        padding: 8px 20px 8px 8px;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
        transform: translateY(0) scale(1) !important;
        animation: none !important;
        width: 100%;
        /* Transición suave y prolongada al soltar (mouse-leave / touch-end) */
        transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
        justify-content: flex-start;
    }

    .agri-pin:hover,
    .agri-pin:active {
        transform: translateY(-4px) scale(1.02) !important;
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
        /* Transición rápida y elástica al pasar por encima (hover / touch-start) */
        transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    }

    .pin-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 0;
        margin-right: 15px;
        border: none;
        box-shadow: none;
        background-color: rgba(220, 53, 69, 0.1);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        flex-shrink: 0;
    }

    .page-node-95 .pin-icon {
        background-color: rgba(46, 53, 66, 0.1);
    }

    .pin-icon::after {
        display: none;
    }

    .pin-icon img {
        width: 28px;
        height: 28px;
        object-fit: contain;
    }

    .pin-text {
        background-color: transparent !important;
        color: var(--uagn-text) !important;
        padding: 0 !important;
        font-size: 1.05rem;
        font-weight: 700;
        box-shadow: none !important;
        letter-spacing: 0.5px;
        flex-grow: 1;
        text-align: left;
        white-space: normal;
    }

    .agri-pin::after {
        content: '';
        display: block;
        width: 8px;
        height: 8px;
        border-top: 2px solid var(--rojo);
        border-right: 2px solid var(--rojo);
        transform: rotate(45deg);
        margin-left: auto;
        margin-right: 5px;
        opacity: 0.6;
        flex-shrink: 0;
    }

    .page-node-95 .agri-pin::after {
        border-color: #2e3542;
    }
}

/*****
GANADERIA INTERACTIVE NODE 95
*****/

.page-node-95 #main {
    background-image: url(../img/backgrounds/bg-ganaderia.jpg);
    background-size: cover;
    background-position: center;
    min-height: calc(100vh - var(--drupal-displace-offset-top, 0px) - 76px);
    position: relative;
    padding: 0;
    overflow: hidden;
}

.page-node-95 #main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    /* Subtle dark overlay */
    z-index: 1;
}

.ganaderia-interactive {
    z-index: 2;
    position: relative;
}

.ganaderia-header .title {
    background-color: #2e3542 !important;
    /* Dark bluish gray */
}

.ganaderia-header .subtitle {
    background-color: #2e3542 !important;
}

.pin-vacuno {
    top: 22%;
    left: 14%;
}

.pin-ovino {
    top: 45%;
    left: 19%;
}

.pin-porcino {
    top: 80%;
    left: 13%;
}

.pin-caballar {
    top: 62%;
    left: 47%;
}

.pin-apicultura {
    top: 28%;
    left: 73%;
}

.pin-avicola {
    top: 78%;
    left: 71%;
}

.pin-cunicola {
    top: 52%;
    left: 85%;
}