/* ---------- Base Styling ---------- */
html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: 'Open Sans', sans-serif;
  color: white;
}

/* ---------- Heading Section ---------- */
.heading-container {
    text-align: center;
    backdrop-filter: blur(4px);
    max-width: 95%;
    margin: 20px auto 20px auto;
    padding: 40px 20px 30px; 
    display: block;  
}

.heading-container h1 {
    font-size: 3rem;
    font-weight: 100;
    color: white;
    margin-bottom: 10px;
    display: block;
}

.heading-container p {
    color: grey;
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    display: block;
}

/* ---------- Container ---------- */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 20px 60px;
}

/* Container for cards in grid with spacing */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(275px, 1fr));
    gap: 20px;
}
/* Each card style (like in screenshot) */
.news-card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: rgba(255, 255, 255, 0.014);
    border-radius: 10px;
    padding: 20px;
    color: #0dc4f6;
    font-family: 'Open Sans', sans-serif;
    transition: box-shadow 0.3s ease;
    position: relative; /* needed for absolute edit icon */
    display: flex;
    flex-direction: column;
}
.news-card:hover {
    box-shadow: 0 0 15px rgba(13, 196, 246, 0.7);
    transform: translateY(-10px);
}
/* Thumbnail image styling */
.news-thumbnail {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}
/* Edit icon position */
.edit-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 18px;
    color: #ddecec;
    z-index: 10;
}
.edit-icon:hover {
    color: #0dffff;
}
.news-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    line-height: 1.2em;
    font-weight: 600;
    color: #1dd9ff;
    cursor: pointer;
    text-decoration: none;
}
.news-card h3:hover {
    text-decoration: underline;
}
.news-card p {
    font-size: 14px;
    line-height: 1.25em;
    color: #ffffffb0;
    margin-bottom: 12px;
    flex-grow: 1;
}
.read-more {
    font-size: 14px;
    color: #0dffff;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}
.read-more:hover {
    color: #00b4ff;
    text-decoration: underline;
}
.publish-date {
    font-size: 11px;
    color: #777;
    margin-top: 10px;
}

/* ---------- Add News Button ---------- */
.add-news {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 20px;
}

.add-news .btn {
    padding: 10px 20px;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.3s;
    text-decoration: none;
    background: linear-gradient(90deg, #88ff00, #00ffd5da, #88ff00);
    transition: background-color 0.3s ease;
    animation: sparkle 2s linear infinite;
}

.add-news .btn:hover {
    background: linear-gradient(135deg, #3ea645, #257f4c);
    transform: translateY(-5px);
}

/* ---------- Responsive ---------- */
@media (max-width: 768px) {
    .heading-container h1 {
        font-size: 28px;
    }

    .heading-container p{
        font-size: 17px;
    }

    .add-news {
        justify-content: center;
    }

    .add-news .btn {
        width: 100%;
        text-align: center;
    }
}
