/* Isı Yalıtım Nedir - Premium Card Animations */

/* Base card setup */
.premium-card {
    position: relative;
    overflow: visible !important;
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
        box-shadow 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    transform-style: preserve-3d;
    perspective: 1000px;
    isolation: isolate;
}

/* ========================================
   ANIMATED BORDER TRACE EFFECT
   ======================================== */

/* Animated gradient border layer */
.premium-card::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 19px;
    padding: 3px;
    background: conic-gradient(from var(--card-gradient-angle, 0deg),
            var(--card-gradient-start, #f59e0b),
            var(--card-gradient-end, #ef4444),
            var(--card-gradient-start, #f59e0b));
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
    z-index: 100;
    opacity: 0;
    transition: opacity 0.4s ease;
}

/* Activate border on hover */
.premium-card:hover::before {
    opacity: 1;
    animation: borderTrace 3s linear infinite;
}

/* CSS Houdini for animating custom properties */
@property --card-gradient-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes borderTrace {
    0% {
        --card-gradient-angle: 0deg;
    }

    100% {
        --card-gradient-angle: 360deg;
    }
}

/* Card-specific gradient colors */
.premium-card-grid>.premium-card:nth-child(1) {
    --card-gradient-start: #f59e0b;
    --card-gradient-end: #ef4444;
}

.premium-card-grid>.premium-card:nth-child(2) {
    --card-gradient-start: #10b981;
    --card-gradient-end: #3b82f6;
}

.premium-card-grid>.premium-card:nth-child(3) {
    --card-gradient-start: #8b5cf6;
    --card-gradient-end: #ec4899;
}

/* ========================================
   CARD HOVER EFFECTS
   ======================================== */

.premium-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
}

/* ========================================
   ACCENT LINE ANIMATIONS
   ======================================== */

.card-accent {
    transition: width 0.6s cubic-bezier(0.23, 1, 0.32, 1),
        opacity 0.4s ease;
}

.premium-card:hover .card-accent {
    width: 80px !important;
    opacity: 0.9;
}

/* ========================================
   CONTENT ANIMATIONS
   ======================================== */

.premium-card h3 {
    transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
        letter-spacing 0.5s ease;
}

.premium-card:hover h3 {
    transform: translateX(8px);
    letter-spacing: 0.02em;
}

.premium-card .card-content p {
    transition: opacity 0.4s ease 0.1s,
        transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.premium-card:hover .card-content p {
    transform: translateY(-3px);
}

/* ========================================
   IMAGE ANIMATIONS
   ======================================== */

.card-visual {
    overflow: hidden !important;
}

.card-visual img {
    transition: transform 0.8s cubic-bezier(0.23, 1, 0.32, 1),
        filter 0.5s ease;
    filter: brightness(0.85) saturate(1.1);
}

.premium-card:hover .card-visual img {
    transform: scale(1.08);
    filter: brightness(1) saturate(1.2);
}

/* ========================================
   ENTRANCE ANIMATIONS
   ======================================== */

@keyframes cardReveal {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.premium-card-grid>.premium-card:nth-child(1) {
    animation: cardReveal 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.1s both;
}

.premium-card-grid>.premium-card:nth-child(2) {
    animation: cardReveal 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.25s both;
}

.premium-card-grid>.premium-card:nth-child(3) {
    animation: cardReveal 0.8s cubic-bezier(0.23, 1, 0.32, 1) 0.4s both;
}

/* ========================================
   COLORED GLOW PER CARD
   ======================================== */

.premium-card-grid>.premium-card:nth-child(1):hover {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(245, 158, 11, 0.25);
}

.premium-card-grid>.premium-card:nth-child(2):hover {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(16, 185, 129, 0.25);
}

.premium-card-grid>.premium-card:nth-child(3):hover {
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(139, 92, 246, 0.25);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 1024px) {
    .premium-card:hover {
        transform: translateY(-8px);
    }

    .premium-card:hover h3 {
        transform: translateX(4px);
    }
}

@media (max-width: 768px) {

    /* Layout Fixes */
    .premium-card-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .premium-card {
        min-height: auto !important;
        /* Allow content to dictate height */
        margin-bottom: var(--space-sm);
    }

    .premium-card:hover {
        transform: translateY(-4px);
        /* Reduce extensive movement */
    }

    .premium-card:hover .card-accent {
        width: 60px !important;
    }

    .premium-card:hover::before {
        animation-duration: 4s;
    }

    /* Prevent huge scale on mobile which might cause horizontal scroll */
    .premium-card:hover .card-visual img {
        transform: scale(1.05);
    }

    .premium-card h3 {
        font-size: 1.5rem;
    }
}