.astro-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 20px;
    position: relative;
    z-index: 1;
}

.astro-section h2 {
    font-size: 2.5em;
    color: #f5f5f7;
    text-align: center;
    margin-bottom: 15px;
}

.astro-section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #667eea, #764ba2);
    margin: 12px auto 0;
    border-radius: 2px;
}

.astro-section > p {
    text-align: center;
    color: #86868b;
    font-size: 1.1em;
    margin-bottom: 50px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Messier Objects Grid */
.messier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.messier-card {
    background: rgba(29, 29, 31, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.messier-card:hover {
    transform: translateY(-8px);
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.2);
}

.messier-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.messier-card .card-body {
    padding: 20px;
}

.messier-card .messier-id {
    font-size: 1.4em;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 4px;
}

.messier-card .messier-name {
    font-size: 1em;
    color: #f5f5f7;
    margin-bottom: 8px;
}

.messier-card .messier-info {
    font-size: 0.85em;
    color: #86868b;
    line-height: 1.6;
}

.messier-card .messier-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

.messier-card .messier-tags span {
    font-size: 0.75em;
    padding: 4px 10px;
    border-radius: 12px;
    background: rgba(102, 126, 234, 0.15);
    color: #a1a1f7;
}

/* Wide Field Section */
.widefield-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.widefield-card {
    background: rgba(29, 29, 31, 0.6);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.widefield-card:hover {
    transform: translateY(-8px);
    border-color: rgba(245, 87, 108, 0.4);
    box-shadow: 0 20px 50px rgba(245, 87, 108, 0.15);
}

.widefield-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.widefield-card .card-body {
    padding: 24px;
}

.widefield-card h3 {
    font-size: 1.3em;
    color: #f5f5f7;
    margin-bottom: 8px;
}

.widefield-card p {
    font-size: 0.9em;
    color: #86868b;
    line-height: 1.7;
}

/* Divider between sections */
.astro-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    margin: 20px 0;
}

/* Placeholder for missing images */
.img-placeholder {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3em;
    color: rgba(255,255,255,0.15);
}

.widefield-card .img-placeholder {
    height: 250px;
}

@media (max-width: 768px) {
    .astro-section h2 {
        font-size: 1.8em;
    }

    .messier-grid {
        grid-template-columns: 1fr;
    }

    .widefield-grid {
        grid-template-columns: 1fr;
    }
}
