/* ==================== INFO DIVISION STYLES ==================== */

/* Fix for header overlap - Add padding to account for fixed header */
.info-division {
    padding-top: calc(var(--header-height, 70px) + 2rem);
    min-height: 100vh;
    background: var(--bg-primary, #0f172a);
    padding-bottom: 4rem;
}

.info-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==================== HERO SECTION ==================== */
.hero-section {
    text-align: center;
    padding: 3rem 0 4rem;
    animation: fadeInUp 0.8s ease;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, #6366f1, #8b5cf6, #ec4899);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.hero-description {
    font-size: 1.25rem;
    color: var(--text-secondary, #cbd5e1);
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto;
}

/* ==================== ALGORITHMS SECTION ==================== */
.algorithms-section {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.algorithm-category {
    animation: fadeInUp 0.6s ease;
}

.algorithm-category:nth-child(2) {
    animation-delay: 0.2s;
}

/* Category Header */
.category-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    position: relative;
}

.category-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color, #6366f1), var(--secondary-color, #8b5cf6));
    border-radius: 12px;
    color: white;
    flex-shrink: 0;
    animation: iconFloat 3s ease-in-out infinite;
}

.category-icon svg {
    width: 28px;
    height: 28px;
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.category-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary, #f1f5f9);
    margin: 0;
}

.category-line {
    flex: 1;
    height: 2px;
    background: linear-gradient(90deg, 
        rgba(99, 102, 241, 0.5) 0%, 
        rgba(99, 102, 241, 0) 100%
    );
    margin-left: 1rem;
}

/* ==================== CARDS GRID ==================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    animation: fadeIn 0.6s ease 0.3s both;
}

/* Algorithm Card */
.algorithm-card {
    position: relative;
    background: var(--bg-secondary, #1e293b);
    border-radius: 16px;
    border: 1px solid rgba(148, 163, 184, 0.1);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.algorithm-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color, #6366f1), var(--secondary-color, #8b5cf6));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.algorithm-card:hover::before {
    transform: scaleX(1);
}

.algorithm-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 
        0 20px 25px -5px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(99, 102, 241, 0.2);
}

/* Card Glow Effect */
.card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        circle,
        rgba(99, 102, 241, 0.1) 0%,
        transparent 70%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.algorithm-card:hover .card-glow {
    opacity: 1;
}

/* Card Content */
.card-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: relative;
    z-index: 1;
}

/* Card Icon */
.card-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon {
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-radius: 12px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--primary-light, #818cf8);
    transition: all 0.4s ease;
}

.card-icon svg {
    width: 32px;
    height: 32px;
    transition: transform 0.4s ease;
}

.algorithm-card:hover .card-icon {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.2));
    transform: scale(1.1);
}

.algorithm-card:hover .card-icon svg {
    transform: scale(1.1);
}

/* Card Info */
.card-info {
    flex: 1;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #f1f5f9);
    margin: 0 0 0.75rem 0;
    transition: color 0.3s ease;
}

.algorithm-card:hover .card-title {
    color: var(--primary-light, #818cf8);
}

.card-description {
    font-size: 0.95rem;
    color: var(--text-muted, #94a3b8);
    line-height: 1.6;
    margin: 0;
}

/* Card Button */
.card-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: linear-gradient(135deg, var(--primary-color, #6366f1), var(--secondary-color, #8b5cf6));
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    align-self: flex-start;
    position: relative;
    overflow: hidden;
}

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

.card-button:hover::before {
    left: 100%;
}

.card-button:hover {
    transform: translateX(4px);
    box-shadow: 0 8px 16px rgba(99, 102, 241, 0.4);
}

.button-arrow {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.card-button:hover .button-arrow {
    transform: translateX(4px);
}

/* ==================== ANIMATIONS ==================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 1200px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .info-division {
        padding-top: calc(var(--header-height, 70px) + 1rem);
    }

    .info-container {
        padding: 0 1rem;
    }

    .hero-section {
        padding: 2rem 0 3rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .category-title {
        font-size: 1.5rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .card-content {
        padding: 1.5rem;
    }

    .card-title {
        font-size: 1.25rem;
    }

    .category-line {
        display: none;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-description {
        font-size: 1rem;
    }

    .category-header {
        gap: 0.75rem;
    }

    .category-icon {
        width: 40px;
        height: 40px;
    }

    .category-icon svg {
        width: 24px;
        height: 24px;
    }

    .card-icon {
        width: 56px;
        height: 56px;
    }

    .card-icon svg {
        width: 28px;
        height: 28px;
    }
}

/* ==================== LOADING STATE ==================== */
.algorithm-card.loading {
    pointer-events: none;
    opacity: 0.6;
}

.algorithm-card.loading .card-button {
    background: linear-gradient(90deg, 
        var(--primary-color, #6366f1) 0%, 
        var(--secondary-color, #8b5cf6) 50%, 
        var(--primary-color, #6366f1) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* ==================== HOVER EFFECTS FOR TOUCH DEVICES ==================== */
@media (hover: none) {
    .algorithm-card:active {
        transform: scale(0.98);
    }
}