.tarjetas-section {
    padding: 6rem 0;
    background: #EDE5D5;
}

.tarjetas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.tarjeta {
    perspective: 1000px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    transition: box-shadow 0.4s ease;
    position: relative;
    border: 1px solid rgba(0,0,0,0.04);
}

.tarjeta:hover {
    box-shadow: 0 16px 48px rgba(0,0,0,0.12), 0 4px 12px rgba(0,0,0,0.06);
}

.tarjeta-flipper {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 420px;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
    border-radius: 16px;
}

.tarjeta:hover .tarjeta-flipper {
    transform: rotateY(180deg);
}

.tarjeta-front,
.tarjeta-back {
    position: relative;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 16px;
    overflow: hidden;
}

.tarjeta-front {
    background: #FFFDF9;
    z-index: 2;
}

.tarjeta-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transform: rotateY(180deg);
    background: #2D2A24;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tarjeta-back-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tarjeta-back-content {
    position: relative;
    z-index: 2;
    color: #FFF;
    text-align: center;
    padding: 2rem 1.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.55), rgba(0,0,0,0.35));
    backdrop-filter: blur(2px);
}

.tarjeta-back-content h3 {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.35;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.tarjeta-back-content h3::after {
    content: '';
    display: block;
    width: 2rem;
    height: 2px;
    background: rgba(255,255,255,0.4);
    margin: 0.6rem auto 0;
    border-radius: 1px;
}

.tarjeta-back-content p {
    font-size: 0.82rem;
    line-height: 1.55;
    opacity: 0.85;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-width: 90%;
}

.tarjeta-back-content span {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.4rem;
    padding: 0.45rem 1.2rem;
    border: 1.5px solid rgba(255,255,255,0.5);
    border-radius: 50px;
    font-size: 0.78rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    background: rgba(255,255,255,0.08);
}

.tarjeta-back-content span:hover {
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.8);
}

.tarjeta-back-content span i {
    transition: transform 0.3s ease;
}

.tarjeta:hover .tarjeta-back-content span i {
    transform: translateX(4px);
}

.tarjeta-img {
    position: relative;
    height: 200px;
    overflow: hidden;
    background: #E8E0D0;
}

.tarjeta-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.tarjeta:hover .tarjeta-img img {
    transform: scale(1.05);
}

.tarjeta-img::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 40%;
    background: linear-gradient(to top, rgba(255,253,249,0.85), transparent);
    pointer-events: none;
}

.tarjeta-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #D1C8B5;
}

.tarjeta-badge {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.3rem 0.8rem;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(12px);
    color: #FFF;
    border-radius: 50px;
    font-size: 0.72rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    letter-spacing: 0.02em;
    z-index: 3;
    border: 1px solid rgba(255,255,255,0.1);
}

.tarjeta-body {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
    background: #FFFDF9;
}

.tarjeta-body::before {
    content: '';
    display: block;
    width: 2.5rem;
    height: 3px;
    background: linear-gradient(90deg, #0B6E4F, rgba(11,110,79,0.2));
    border-radius: 2px;
    margin-bottom: 0.85rem;
}

.tarjeta-title {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: #1E1B16;
    line-height: 1.35;
    letter-spacing: -0.01em;
}

.tarjeta-desc {
    color: #7A6F5E;
    font-size: 0.85rem;
    line-height: 1.65;
    margin-bottom: 0.85rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tarjeta-meta {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1rem;
    font-size: 0.8rem;
    color: #8B7F6E;
    padding-top: 0.75rem;
    border-top: 1px solid #EFE9DD;
}

.tarjeta-meta span {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.tarjeta-meta i {
    color: #C4BAA8;
    font-size: 0.7rem;
    width: 0.9rem;
    text-align: center;
}

.tarjeta-btn {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1.4rem;
    background: linear-gradient(135deg, #1E1B16, #2D2A24);
    border: none;
    border-radius: 8px;
    color: #FFF;
    font-weight: 500;
    font-size: 0.82rem;
    letter-spacing: 0.02em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.tarjeta-btn:hover {
    background: linear-gradient(135deg, #0B6E4F, #065F46);
    gap: 0.7rem;
    box-shadow: 0 4px 16px rgba(11,110,79,0.3);
}

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

.detalle-section {
    position: relative;
    z-index: 1;
}

.detalle-content {
    max-width: 820px;
    margin: -3rem auto 4rem;
    position: relative;
    z-index: 10;
    background: rgba(245,237,224,0.9);
    backdrop-filter: blur(8px);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);
    border: 1px solid rgba(255,255,255,0.6);
}

.detalle-desc {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #4A4238;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #EFE9DD;
}

.detalle-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.85rem;
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.9rem 1.1rem;
    background: #F8F4EC;
    border-radius: 12px;
    border: 1px solid #EFE9DD;
    transition: all 0.3s ease;
}

.info-item:hover {
    background: #FFFDF9;
    border-color: #E0D8C8;
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

.info-item i {
    font-size: 1.1rem;
    color: #0B6E4F;
    width: 1.2rem;
    text-align: center;
    flex-shrink: 0;
}

.info-item strong {
    display: block;
    font-size: 0.7rem;
    color: #9B8F7E;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 0.1rem;
}

.info-item span,
.info-item a {
    font-size: 0.88rem;
    color: #2D2A24;
    font-weight: 500;
}

.info-item a {
    color: #0B6E4F;
}

.detalle-galeria {
    padding-top: 0.5rem;
}

.galeria-title {
    font-size: 1rem;
    font-weight: 600;
    color: #2D2A24;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.galeria-title::before {
    content: '\f03e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #0B6E4F;
    font-size: 0.9rem;
}

.detalle-media {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
}
.detalle-media video,
.detalle-media img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.detalle-media video {
    grid-column: 1 / -1;
    max-height: 500px;
    object-fit: cover;
}
.detalle-media img {
    height: 250px;
    object-fit: cover;
    transition: all 0.4s ease;
}
.detalle-media img:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

@media (max-width: 600px) {
    .detalle-content {
        margin: -2rem 0.75rem 3rem;
        padding: 1.5rem;
        border-radius: 16px;
    }
    .detalle-info-grid {
        grid-template-columns: 1fr;
    }
}
