/* ===========================
    HOMEPAGE - HERO SECTION
=========================== */
.hero-section {
    padding: 50px 0 30px;
    text-align: center;
}

.hero-section h1 {
    margin-bottom: 20px;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ===========================
   CTF CARDS GRID
=========================== */
.ctf-list-section {
    padding: 30px 0 60px;
}

.ctf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    align-items: stretch;
}

.ctf-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 30px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.ctf-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--blue));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.ctf-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 15px 40px var(--accent-glow);
}

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

.ctf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ctf-icon {
    width: 50px;
    height: 50px;
    background: var(--accent-glow);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
}

.ctf-badge {
    background: var(--primary);
    color: var(--bg-dark);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.ctf-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-primary);
}

.ctf-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.meta-item i {
    color: var(--primary);
}

.ctf-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tag {
    padding: 4px 12px;
    background: rgba(100, 255, 218, 0.1);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.8rem;
    color: var(--primary);
}

.ctf-footer {
    border-top: 1px solid var(--border);
    padding-top: 15px;
    margin-top: auto;
}

.read-more {
    color: var(--primary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ctf-card:hover .read-more i {
    transform: translateX(5px);
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 768px) {
    .hero-section {
        padding: 70px 0 40px;
    }

    .ctf-list-section {
        padding: 30px 0 60px;
    }

    .ctf-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .ctf-card {
        padding: 22px;
    }

    .ctf-meta {
        gap: 12px;
    }
}

/* Disable hover transforms on touch devices */
@media (hover: none) {
    .ctf-card:hover {
        transform: none;
        box-shadow: none;
        border-color: var(--border);
    }

    .ctf-card:hover::before {
        transform: scaleX(0);
    }

    .ctf-card:hover .read-more i {
        transform: none;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 50px 0 30px;
    }

    .subtitle {
        font-size: 1rem;
        margin-bottom: 40px;
    }

    .ctf-card {
        padding: 18px;
    }

    .ctf-title {
        font-size: 1.2rem;
    }

    .ctf-badge {
        font-size: 0.75rem;
        padding: 5px 10px;
    }

    .ctf-icon {
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }
}