/* ============================================
   PATHOLOGIES SECTION - Reimaginada
   ============================================ */

.pathologies {
    padding: 30px 0 100px;
    background-color: #d3f6e8;
    position: relative;
    z-index: 1;
}

.pathologies svg#wave {
    display: block;
    width: 100%;
    height: auto;
    position: absolute;
    top: -1px;
    left: 0;
}

/* ---- Section Header ---- */
.pathologies .section-header {
    position: relative;
    z-index: 2;
    margin-bottom: 56px;
}



#pato {
    padding-top: 60px;
    color: #1a3a2a;
    font-weight: 800;
    position: relative;
    z-index: 2;
}

#pato-desc {
    color: #2d5a45;
    font-weight: 400;
    max-width: 680px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

#pato-desc strong {
    color: #007231;
    font-weight: 700;
}

/* ---- Grid ---- */
.pathologies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 28px;
    position: relative;
    z-index: 2;
}

/* ---- Card ---- */
.pathology-item {
    background: #fff;
    border-radius: 20px;
    padding: 32px 28px 24px;
    border: 2px solid rgba(0, 114, 49, 0.08);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.35s ease,
        border-color 0.3s ease;
}

/* Fondo pasto.webp – sube desde abajo al hacer hover */
.pathology-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background-image: url('../pix/pasto.webp');
    background-repeat: repeat-x;
    background-position: bottom center;
    background-size: auto 100px;
    opacity: 0.18;
    pointer-events: none;
    transform: translateY(50px);
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1),
        opacity 0.45s ease;
    z-index: 0;
}

.pathology-item:hover::after {
    transform: translateY(0);
    opacity: 0.52;
}

/* Logo decorativo – centrado verticalmente al lado derecho */
.pathology-logo-deco {
    position: absolute;
    top: 50%;
    right: -40px;
    width: 180px;
    height: 180px;
    object-fit: contain;
    opacity: 0.08;
    pointer-events: none;
    z-index: 1;
    transform: translateY(-50%);
    transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1),
        opacity 0.35s ease;
    filter: saturate(0.4) brightness(0.85);
}

.pathology-item:hover .pathology-logo-deco {
    transform: translateY(-50%) scale(1.12);
    opacity: 0.18;
}


.pathology-item:hover {
    transform: translateY(-10px) scale(1.015);
    box-shadow: 0 22px 52px rgba(0, 114, 49, 0.18);
    border-color: rgba(0, 114, 49, 0.28);
}

/* ---- Icon ---- */
.pathology-item>.pathology-icon {
    display: none;
}

/* ---- Body ---- */
.pathology-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    z-index: 2;
}

.pathology-title {
    font-size: 19px;
    font-weight: 700;
    color: #1a3a2a;
    margin: 0 0 10px;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.pathology-item:hover .pathology-title {
    color: #007231;
}

.pathology-desc {
    font-size: 14.5px;
    color: #5a7363;
    line-height: 1.65;
    margin: 0 0 18px;
    flex: 1;
}

/* ---- Treatment Tags ---- */
.treatment-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 0;
}

.tag {
    display: inline-block;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 11px;
    border-radius: 20px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.tag-kine {
    background: #dcf5e7;
    color: #1a6b3a;
    border: 1px solid rgba(26, 107, 58, 0.18);
}

.tag-quiro {
    background: #d0eff5;
    color: #0e6680;
    border: 1px solid rgba(14, 102, 128, 0.18);
}

.tag-acu {
    background: #fef5d7;
    color: #8a6200;
    border: 1px solid rgba(138, 98, 0, 0.18);
}


/* ---- Footer CTA ---- */
.pathologies-footer {
    margin-top: 56px;
    position: relative;
    z-index: 2;
}

.pathologies-footer-inner {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(211, 246, 232, 0.5));
    border: 2px solid rgba(0, 114, 49, 0.12);
    border-radius: 20px;
    padding: 32px 40px;
    display: flex;
    align-items: center;
    gap: 24px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    position: relative;
    overflow: hidden;
}

.pathologies-footer-inner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 90px;
    background-image: url('../pix/pasto.webp');
    background-repeat: repeat-x;
    background-position: bottom center;
    background-size: auto 90px;
    opacity: 0.18;
    pointer-events: none;
    transform: translateY(50px);
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1),
        opacity 0.45s ease;
    z-index: 0;
}

.pathologies-footer-inner:hover::after {
    transform: translateY(0);
    opacity: 0.52;
}

.pathologies-footer-icon,
.pathologies-footer-text,
.pathologies-footer-btn {
    position: relative;
    z-index: 1;
}

.pathologies-footer-icon {
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--primary-green), var(--dark-green));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.pathologies-footer-icon svg {
    width: 26px;
    height: 26px;
    color: #fff;
}

.pathologies-footer-text {
    flex: 1;
    font-size: 15.5px;
    color: #2d5a45;
    margin: 0;
    line-height: 1.5;
}

.pathologies-footer-text strong {
    color: #1a3a2a;
    display: block;
    font-size: 17px;
    margin-bottom: 3px;
}

.pathologies-footer-btn {
    flex-shrink: 0;
    white-space: nowrap;
    background: linear-gradient(135deg, #005a26, var(--dark-green));
    border-color: transparent;
    color: #fff;
    box-shadow: 0 8px 30px rgba(0, 90, 38, 0.35);
}

.pathologies-footer-btn::before {
    display: none;
}

.pathologies-footer-btn:hover {
    background: linear-gradient(135deg, #007231, #4a8a60);
    border-color: transparent;
    color: #fff;
    transform: scale(1.03);
    box-shadow: 0 0 0 4px rgba(122, 184, 120, 0.35), 0 14px 40px rgba(0, 90, 38, 0.4);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .pathologies-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 20px;
    }

    .pathology-item {
        padding: 26px 22px 20px;
    }

    .pathology-item>.pathology-icon {
        width: 56px;
        height: 56px;
    }

    .pathology-item>.pathology-icon svg {
        width: 28px;
        height: 28px;
    }

    .pathology-title {
        font-size: 17px;
    }

    .pathology-desc {
        font-size: 13.5px;
    }

    .pathologies-footer-inner {
        flex-direction: column;
        text-align: center;
        padding: 28px 24px;
        gap: 18px;
    }

    .pathology-cta {
        opacity: 1;
        transform: none;
    }
}

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

    #pato {
        padding-top: 40px;
    }
}