/**
 * KAJAL Coffee Types - Additional Styles
 * Version: 1.0.0
 */

/* Animaciones adicionales */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes shine {
    0% {
        left: -100%;
    }
    20%, 100% {
        left: 100%;
    }
}

/* Efectos de entrada */
.type-card {
    animation: fadeInUp 0.6s ease-out forwards;
}

.type-card:nth-child(1) {
    animation-delay: 0.1s;
}

.type-card:nth-child(2) {
    animation-delay: 0.2s;
}

.type-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Efecto de brillo en hover */
.type-card {
    overflow: hidden;
    position: relative;
}

.type-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent
    );
    transition: left 0.7s ease;
}

.type-card:hover::after {
    left: 100%;
}

/* Badge pulsante */
.type-badge {
    animation: pulse 2s infinite;
}

.type-card:hover .type-badge {
    animation: none;
    transform: scale(1.1) rotate(360deg);
}

/* Mejoras de tipografía */
.type-title {
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.type-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #D2691E, transparent);
    transition: width 0.4s ease;
}

.type-card:hover .type-title::after {
    width: 100%;
}

/* Efectos de feature items */
.feature-item {
    position: relative;
    overflow: hidden;
}

.feature-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(180deg, #D2691E, #CD853F);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.feature-item:hover::before {
    transform: scaleY(1);
}

/* Responsivo mejorado */
@media (max-width: 1200px) {
    .type-card {
        padding: 30px;
    }

    .type-image {
        width: 160px;
        height: 160px;
    }
}

@media (max-width: 992px) {
    .types-container {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 576px) {
    .type-card {
        padding: 25px 20px;
    }

    .type-title {
        font-size: 24px;
    }

    .type-image {
        width: 130px;
        height: 130px;
    }

    .feature-item {
        padding: 12px;
    }
}

/* Print styles */
@media print {
    .kajal-coffee-types {
        background: white;
        border: 1px solid #000;
        box-shadow: none;
    }

    .type-card {
        break-inside: avoid;
        page-break-inside: avoid;
        border: 1px solid #000;
        background: white;
    }

    .connection-arrow {
        display: none;
    }
}

/* Accesibilidad */
.type-card:focus-within {
    outline: 3px solid #D2691E;
    outline-offset: 2px;
}

/* Scroll suave para anclas */
html {
    scroll-behavior: smooth;
}

/* Loading state */
.kajal-coffee-types.loading {
    opacity: 0.5;
    pointer-events: none;
}

.kajal-coffee-types.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 50px;
    height: 50px;
    border: 4px solid #D2691E;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}
