/* ========================= 
   HOME CATEGORÍAS PRO (OSGRAP + APPLE)
========================= */

.home-categorias {
    padding: 100px 0;
    background: #fff;
}

/* =========================
   HEADER
========================= */
.home-section-head {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.home-section-head h2 {
    font-size: 36px;
    margin-bottom: 10px;
    color: #111;
}

.home-section-head p {
    color: #666;
    line-height: 1.6;
}

.section-line {
    width: 60px;
    height: 3px;
    background: var(--osgrap-red);
    margin: 10px auto 20px;
}

/* =========================
   GRID
========================= */
.osgrap-categorias-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

/* =========================
   CARD
========================= */
.osgrap-cat-card {
    position: relative;
    height: 320px;
    border-radius: 18px;
    overflow: hidden;
    display: block;
    text-decoration: none;
    background: #000;

    transform: scale(0.98);
    transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
                box-shadow 0.6s ease;

    /* Scroll animation base */
    opacity: 0;
    transform: translateY(50px) scale(0.98);
}

/* Visible (scroll) */
.osgrap-cat-card.is-visible {
    opacity: 1;
    transform: translateY(0) scale(0.98);
}

/* =========================
   IMAGEN
========================= */
.cat-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;

    transform: scale(1);
    transition: transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
}

/* =========================
   OVERLAY
========================= */
.cat-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,0.1) 0%,
        rgba(0,0,0,0.55) 100%
    );
    z-index: 1;
    transition: background 0.4s ease;
}

/* =========================
   CONTENIDO
========================= */
.cat-content {
    position: absolute;
    bottom: 30px;
    left: 30px;
    z-index: 2;
}

/* =========================
   TÍTULO BANDA (FORZADO BLANCO)
========================= */
.cat-title,
.osgrap-cat-card h2,
.osgrap-cat-card h3,
.osgrap-cat-card h4 {
    display: inline-block;
    background: var(--osgrap-red);
    color: #fff !important; /* 🔥 FORZADO */
    font-size: 20px;
    font-weight: 600;
    padding: 8px 16px;
    line-height: 1.2;
    margin: 0;

    position: relative;

    /* Animación */
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: all 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Pico */
.cat-title::after {
    content: "";
    position: absolute;
    top: 0;
    right: -12px;

    border-top: 16px solid transparent;
    border-bottom: 16px solid transparent;
    border-left: 12px solid var(--osgrap-red);
}

/* =========================
   HOVER (APPLE STYLE)
========================= */
.osgrap-cat-card:hover {
    transform: scale(1);
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
}

.osgrap-cat-card:hover .cat-img {
    transform: scale(1.08);
}

.osgrap-cat-card:hover .cat-overlay {
    background: linear-gradient(
        180deg,
        rgba(0,0,0,0.25) 0%,
        rgba(0,0,0,0.7) 100%
    );
}

/* Mostrar título */
.osgrap-cat-card:hover .cat-title {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* =========================
   FADE-UP GLOBAL (POR SI LO USAS)
========================= */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================
   RESPONSIVE
========================= */
@media (max-width: 1024px) {
    .osgrap-categorias-grid {
        grid-template-columns: 1fr;
    }

    .osgrap-cat-card {
        height: 280px;
    }
}

@media (max-width: 640px) {

    .home-categorias {
        padding: 70px 0;
    }

    .home-section-head h2 {
        font-size: 28px;
    }

    .cat-title {
        font-size: 16px;
        padding: 6px 12px;
    }

    .cat-title::after {
        border-top: 12px solid transparent;
        border-bottom: 12px solid transparent;
        border-left: 10px solid var(--osgrap-red);
    }
}