/* ═══════════════════════════════════════════════════════════════
   CareerAdda — Premium UI System
   Layered on top of custom.css
   Inspired by: Linear, Stripe, Vercel, Apple, OpenAI, Perplexity
   ═══════════════════════════════════════════════════════════════ */

/* ─── Premium Design Tokens ──────────────────────────────────── */
:root {
    /* Glow & accent colors */
    --glow-cyan: rgba(56, 189, 248, 0.4);
    --glow-cyan-soft: rgba(56, 189, 248, 0.15);
    --glow-blue: rgba(59, 130, 246, 0.35);
    --glow-blue-soft: rgba(59, 130, 246, 0.1);
    --glow-indigo: rgba(99, 102, 241, 0.3);

    /* Premium shadow layers — visually expensive depth */
    --shadow-premium-sm:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 2px 4px rgba(0, 0, 0, 0.03),
        0 4px 8px rgba(0, 0, 0, 0.02);
    --shadow-premium-md:
        0 2px 4px rgba(0, 0, 0, 0.04),
        0 4px 8px rgba(0, 0, 0, 0.04),
        0 8px 16px rgba(0, 0, 0, 0.04),
        0 16px 32px rgba(0, 0, 0, 0.02),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    --shadow-premium-lg:
        0 4px 6px rgba(0, 0, 0, 0.03),
        0 8px 16px rgba(0, 0, 0, 0.05),
        0 16px 32px rgba(0, 0, 0, 0.06),
        0 32px 64px rgba(0, 0, 0, 0.04),
        inset 0 0 0 1px rgba(255, 255, 255, 0.6);
    --shadow-premium-xl:
        0 8px 16px rgba(0, 0, 0, 0.04),
        0 16px 32px rgba(0, 0, 0, 0.06),
        0 24px 48px rgba(0, 0, 0, 0.08),
        0 40px 80px rgba(0, 0, 0, 0.06),
        0 0 0 1px rgba(0, 0, 0, 0.02);
    
    --shadow-glow-cyan:
        0 8px 32px rgba(56, 189, 248, 0.25),
        0 16px 64px rgba(59, 130, 246, 0.15),
        0 0 20px rgba(56, 189, 248, 0.1);

    /* Premium easing — ultra smooth */
    --ease-premium: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* 3D perspective */
    --perspective: 1200px;

    /* Secondary Color (Cyan Accent) */
    --secondary: #06b6d4;
    --secondary-glow: rgba(6, 182, 212, 0.3);
}


/* ═══════════════════════════════════════════════════════════════
   PREMIUM UTILITY CLASSES
   Tailwind-style utilities for custom premium effects
   ═══════════════════════════════════════════════════════════════ */

/* Glow & Gradients */
.glow-gradient {
    background: linear-gradient(135deg, #3b82f6, #06b6d4, #8b5cf6);
    background-size: 200% 200%;
    animation: gradient-shift 5s ease infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.bg-clip-text {
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.gradient-text {
    background: linear-gradient(135deg, #3b82f6, #06b6d4, #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    font-weight: 800;
}

.section-title {
    letter-spacing: -0.02em;
}

.section-subtitle {
    line-height: 1.6;
}

.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    animation: reveal-up 0.8s var(--ease-premium) forwards;
}

@keyframes reveal-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Shadows */
.shadow-glow-cyan {
    box-shadow: var(--shadow-glow-cyan);
}

.shadow-soft {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03), 0 1px 2px rgba(0, 0, 0, 0.02);
}

.shadow-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 0 1px rgba(0, 0, 0, 0.1);
}

/* Hover States (Escaped for HTML usage) */
.hover\:border-secondary\/30:hover {
    border-color: rgba(6, 182, 212, 0.3) !important;
}

.hover\:\!border-white:hover {
    border-color: white !important;
}

/* Group Hover States */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

.group:hover .group-hover\:shadow-glow-cyan {
    box-shadow: var(--shadow-glow-cyan);
}

.group:hover .group-hover\:text-secondary {
    color: var(--secondary);
}

.group:hover .group-hover\:bg-secondary\/10 {
    background-color: rgba(6, 182, 212, 0.1);
}

.group:hover .group-hover\:translate-x-1 {
    transform: translateX(4px);
}

/* Dynamic Border Hover (Handle via CSS Variable if needed) */
[class*="hover:border-"]:hover {
    border-color: currentColor;
    stroke-opacity: 0.3;
}


/* ═══════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════ */
@keyframes shine-sweep {
    0% { transform: translateX(-100%) rotate(12deg); }
    100% { transform: translateX(200%) rotate(12deg); }
}

@keyframes btn-sheen {
    0% { left: -100%; }
    100% { left: 200%; }
}

@keyframes float-gentle {
    0%, 100% { transform: translateY(0) rotateX(0); }
    50% { transform: translateY(-5px) rotateX(1deg); }
}

@keyframes pulse-border {
    0%, 100% { border-color: rgba(56, 189, 248, 0.2); }
    50% { border-color: rgba(56, 189, 248, 0.4); }
}


/* ═══════════════════════════════════════════════════════════════
   BASE CARD ENHANCEMENTS
   Applied to ALL .card elements — premium depth + 3D + glow
   ═══════════════════════════════════════════════════════════════ */
.card {
    position: relative;
    background: white;
    border: 1px solid rgba(226, 232, 240, 0.8);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-premium-sm);
    transition:
        transform 0.6s var(--ease-premium),
        box-shadow 0.6s var(--ease-premium),
        border-color 0.6s var(--ease-premium);
    transform-style: preserve-3d;
    perspective: var(--perspective);
    overflow: hidden;
    will-change: transform, box-shadow;
}

/* Cinematic lighting overlay */
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(56, 189, 248, 0.08),
        transparent 40%
    );
    opacity: 0;
    transition: opacity 0.5s var(--ease-premium);
    pointer-events: none;
    z-index: 1;
    border-radius: inherit;
}

/* Shine sweep effect */
.card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -100%;
    width: 60%;
    height: 200%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 40%,
        rgba(255, 255, 255, 0.2) 50%,
        rgba(255, 255, 255, 0.1) 60%,
        transparent 100%
    );
    transform: rotate(12deg);
    transition: none;
    pointer-events: none;
    z-index: 10;
}

.card:hover {
    transform: translateY(-12px) rotateX(2deg) rotateY(-1deg);
    box-shadow: 
        var(--shadow-premium-xl), 
        var(--shadow-glow-cyan),
        inset 0 0 0 1px rgba(56, 189, 248, 0.2);
    border-color: rgba(56, 189, 248, 0.4);
}

.card:hover::before {
    opacity: 1;
}

.card:hover::after {
    animation: shine-sweep 1s var(--ease-premium) forwards;
}


/* ═══════════════════════════════════════════════════════════════
   GLASS CARD
   ═══════════════════════════════════════════════════════════════ */
.glass-card {
    background: rgba(255, 255, 255, 1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow:
        var(--shadow-premium-md),
        inset 0 1px 2px rgba(255, 255, 255, 0.6);
}

/* Top edge glow line */
.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.9) 20%,
        rgba(56, 189, 248, 0.6) 50%,
        rgba(255, 255, 255, 0.9) 80%,
        transparent 100%
    );
    z-index: 5;
    opacity: 0;
    transition: opacity 0.5s var(--ease-premium);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 1);
    border-color: rgba(56, 189, 248, 0.5);
    box-shadow:
        var(--shadow-premium-xl),
        0 0 25px rgba(56, 189, 248, 0.2),
        var(--shadow-glow-cyan);
}

.glass-card:hover::before {
    opacity: 1;
}


/* ═══════════════════════════════════════════════════════════════
   GLASS DARK
   ═══════════════════════════════════════════════════════════════ */
.glass-dark {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(30px) saturate(200%);
    -webkit-backdrop-filter: blur(30px) saturate(200%);
    border: 1px solid rgba(56, 189, 248, 0.2);
    box-shadow:
        0 15px 45px rgba(0, 0, 0, 0.4),
        inset 0 1px 1px rgba(255, 255, 255, 0.1);
    color: #f8fafc;
}

/* Cyan edge highlight */
.glass-dark::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.6), transparent 40%, transparent 60%, rgba(59, 130, 246, 0.5));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.7;
    transition: opacity 0.5s var(--ease-premium);
}

.glass-dark:hover {
    border-color: rgba(56, 189, 248, 0.45);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.5),
        0 0 35px rgba(56, 189, 248, 0.25);
}

.glass-dark:hover::before {
    opacity: 1;
}


/* ═══════════════════════════════════════════════════════════════
   COLLEGE CARD — THE SHOWPIECE
   ═══════════════════════════════════════════════════════════════ */
.college-card {
    border-radius: var(--radius-xl);
}

/* Subtle border glow */
.college-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(56, 189, 248, 0.3),
        rgba(59, 130, 246, 0.1) 40%,
        rgba(139, 92, 246, 0.1) 60%,
        rgba(56, 189, 248, 0.3)
    );
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.5s var(--ease-premium);
    z-index: 10;
}

.college-card:hover {
    transform: translateY(-15px) rotateX(3deg) scale(1.02);
    box-shadow:
        var(--shadow-premium-xl),
        0 25px 60px rgba(56, 189, 248, 0.2),
        inset 0 0 0 1px rgba(56, 189, 248, 0.3);
    border-color: rgba(56, 189, 248, 0.5);
}

.college-card:hover::before {
    opacity: 1;
    background: radial-gradient(
        600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(56, 189, 248, 0.15),
        transparent 50%
    );
}

/* Image Hover Zoom */
.college-card .relative.h-44 img,
.college-card .card-banner img {
    transition: transform 1.2s var(--ease-premium), filter 0.8s var(--ease-premium);
}

.college-card:hover .relative.h-44 img,
.college-card:hover .card-banner img {
    transform: scale(1.1) translateY(-2%);
    filter: brightness(1.1) contrast(1.05);
}

.college-card .flex.gap-2.pt-4 {
    background: transparent;
    margin: 0;
    padding-top: 1rem;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
}

.college-card-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.college-stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.college-stat-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    font-weight: 700;
}

.college-stat-value {
    font-size: 0.85rem;
    font-weight: 800;
    color: #1e293b;
}

.college-card .chip {
    background: rgba(241, 245, 249, 0.8);
    border: 1px solid rgba(226, 232, 240, 0.5);
    color: #475569;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.65rem;
    font-weight: 600;
}

/* ─── Swiper Pagination Premium ────────── */
.card-image-slider .swiper-pagination-bullet {
    width: 6px;
    height: 6px;
    background: rgba(255, 255, 255, 0.4);
    opacity: 1;
    transition: all 0.3s var(--ease-premium);
    backdrop-filter: blur(4px);
}

.card-image-slider .swiper-pagination-bullet-active {
    width: 18px;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 0 10px rgba(56, 189, 248, 0.5);
}

/* Ensure images are visible before Swiper initialization */
.card-image-slider .swiper-slide {
    opacity: 1;
    visibility: visible;
}

.card-image-slider.swiper-initialized .swiper-slide:not(.swiper-slide-active) {
    opacity: 0;
    visibility: hidden;
}

.card-image-slider.swiper-initialized .swiper-slide-active {
    opacity: 1;
    visibility: visible;
}

/* Actions Area Polish */
.college-card .flex.gap-2.pt-3 {
    background: linear-gradient(to bottom, transparent, rgba(248, 250, 252, 0.5));
    margin: 0 -1rem -1rem;
    padding: 1rem;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}


/* ═══════════════════════════════════════════════════════════════
   CAREER CARD
   ═══════════════════════════════════════════════════════════════ */
.career-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, #3b82f6, #8b5cf6, #06b6d4);
    opacity: 0.8;
    transition: width 0.4s var(--ease-premium), opacity 0.4s var(--ease-premium);
}

.career-card:hover {
    transform: translateY(-6px) rotateY(1deg);
    border-color: rgba(59, 130, 246, 0.25);
}

.career-card:hover::before {
    width: 6px;
    opacity: 1;
}


/* ═══════════════════════════════════════════════════════════════
   STAT CARD
   ═══════════════════════════════════════════════════════════════ */
.stat-card {
    border-radius: var(--radius-lg);
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.stat-card:hover {
    transform: translateY(-4px) scale(1.03);
    background: linear-gradient(135deg, #fff, rgba(248, 250, 252, 0.8));
    border-color: rgba(56, 189, 248, 0.2);
    box-shadow: var(--shadow-premium-md), 0 10px 20px rgba(0, 0, 0, 0.02);
}


/* ═══════════════════════════════════════════════════════════════
   SCHOLARSHIP CARD
   ═══════════════════════════════════════════════════════════════ */
.scholarship-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #10b981, #3b82f6);
    transform: scaleX(0.8);
    transition: transform 0.5s var(--ease-premium), height 0.3s var(--ease-premium);
}

.scholarship-card:hover {
    transform: translateY(-8px) rotateX(-1deg);
    border-color: rgba(16, 185, 129, 0.25);
}

.scholarship-card:hover::before {
    transform: scaleX(1);
    height: 4px;
}


/* ═══════════════════════════════════════════════════════════════
   BLOG CARD
   ═══════════════════════════════════════════════════════════════ */
.blog-card:hover {
    transform: translateY(-8px) rotateY(0.5deg);
    border-color: rgba(99, 102, 241, 0.25);
}

.blog-card .aspect-video {
    overflow: hidden;
}

.blog-card:hover img {
    transform: scale(1.08);
}


/* ═══════════════════════════════════════════════════════════════
   BUTTON SYSTEM — TACTILE & MODERN
   ═══════════════════════════════════════════════════════════════ */
.btn {
    position: relative;
    isolation: isolate;
    transition: all 0.4s var(--ease-premium);
}

/* Primary Button Upgrade */
.btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    background-size: 200% 100%;
    background-position: 0% 0%;
    border: none;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
    background-position: 100% 0%;
    box-shadow: 
        0 12px 24px rgba(30, 64, 175, 0.4), 
        0 0 20px rgba(59, 130, 246, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Glow Button Upgrade */
.btn-glow {
    background: linear-gradient(135deg, #3b82f6, #6366f1, #06b6d4);
    background-size: 200% 100%;
    color: white;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1), 0 8px 32px rgba(59, 130, 246, 0.3);
}

.btn-glow::after {
    content: '';
    position: absolute;
    inset: -3px;
    background: linear-gradient(135deg, #3b82f6, #6366f1, #06b6d4, #3b82f6);
    background-size: 200% 100%;
    z-index: -1;
    border-radius: inherit;
    opacity: 0;
    filter: blur(15px);
    transition: opacity 0.4s var(--ease-premium);
    animation: gradient-shift 3s linear infinite;
}

.btn-glow:hover {
    transform: translateY(-4px) scale(1.06);
    box-shadow: 0 15px 40px rgba(59, 130, 246, 0.5);
    background-position: 100% 0%;
}

.btn-glow:hover::after {
    opacity: 0.6;
}

/* Compare Button — Refined */
.btn-compare {
    background: rgba(56, 189, 248, 0.05);
    border: 1px solid rgba(56, 189, 248, 0.2);
    color: #0284c7;
    backdrop-filter: blur(8px);
    font-weight: 600;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: var(--radius-full);
    transition: all 0.4s var(--ease-premium);
}

.btn-compare:hover {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.4);
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 15px rgba(56, 189, 248, 0.15);
    color: #0369a1;
}


/* ═══════════════════════════════════════════════════════════════
   BADGE IMPROVEMENTS — PILL DESIGN
   ═══════════════════════════════════════════════════════════════ */
.badge {
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.25rem 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    letter-spacing: 0.01em;
    text-transform: none;
    font-size: 0.7rem;
}

.badge-featured {
    background: rgba(254, 243, 199, 0.85);
    color: #92400e;
    border-color: rgba(251, 191, 36, 0.3);
}

.badge-verified {
    background: rgba(209, 250, 229, 0.85);
    color: #065f46;
    border-color: rgba(52, 211, 153, 0.3);
}


/* ═══════════════════════════════════════════════════════════════
   MICRO INTERACTIONS
   ═══════════════════════════════════════════════════════════════ */

/* Smooth Image Overlay */
.card .absolute.inset-0.bg-gradient-to-t {
    transition: opacity 0.6s var(--ease-premium);
}

.card:hover .absolute.inset-0.bg-gradient-to-t {
    opacity: 0.8;
}

/* Floating Heart/Shortlist */
.college-card button[onclick*="toggleShortlist"] {
    transition: all 0.4s var(--ease-spring);
}

.college-card:hover button[onclick*="toggleShortlist"] {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.9);
    color: #ef4444;
}


/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
   ═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .card:hover {
        transform: translateY(-4px) scale(1.01); /* Reduced lift on mobile */
    }
    
    .card::after {
        display: none; /* Disable shine on mobile for performance */
    }
    
    .college-card:hover {
        transform: translateY(-6px) scale(1.01);
    }
}

/* Featured Colleges carousel — equal-height slides, no horizontal clip */
[data-testid="featured-section"] {
    overflow: visible;
}

.featured-swiper-host {
    overflow: hidden;
    padding: 0.75rem 0.25rem;
    margin: -0.75rem -0.25rem;
}

.featured-swiper {
    overflow: visible;
}

.featured-swiper .swiper-wrapper {
    align-items: stretch;
}

.featured-swiper .swiper-slide {
    height: auto;
    box-sizing: border-box;
    min-width: 0;
}

.featured-swiper .featured-college-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 100%;
    box-sizing: border-box;
}

.featured-college-card .featured-college-card__title {
    min-height: 1.25rem;
}

.featured-college-card .featured-college-card__location {
    min-height: 1rem;
}

.featured-college-card .featured-college-card__meta {
    min-height: 1.25rem;
}

.featured-college-card .featured-college-card__highlight {
    min-height: 2.5rem;
}

/* ═══════════════════════════════════════════════════════════════
   NO-CARD-HOVER — Disable all hover effects inside this wrapper
   Used on Featured Colleges section on homepage
   ═══════════════════════════════════════════════════════════════ */
.no-card-hover .card:hover,
.no-card-hover .college-card:hover {
    transform: none !important;
    box-shadow: var(--shadow-premium-sm) !important;
    border-color: rgba(226, 232, 240, 0.8) !important;
}

.no-card-hover .card:hover::before,
.no-card-hover .college-card:hover::before {
    opacity: 0 !important;
}

.no-card-hover .card:hover::after {
    animation: none !important;
}

.no-card-hover .college-card:hover .relative img,
.no-card-hover .college-card:hover .card-banner img,
.no-card-hover .college-card .relative.h-44 img,
.no-card-hover .college-card .card-banner img {
    transform: none !important;
    filter: none !important;
}

.no-card-hover .card:hover .absolute.inset-0.bg-gradient-to-t {
    opacity: 1 !important;
}

.no-card-hover .college-card:hover button[onclick*="toggleShortlist"] {
    transform: none !important;
    background: inherit !important;
    color: inherit !important;
}
