/* News Detail Container */
.news-detail-container {
    max-width: 1500px;
    margin: 40px auto;
    padding: 0 20px;
}

.news-detail {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Desktop Grid Layout */
@media (min-width: 769px) {
    .news-detail {
        display: grid;
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto 1fr auto;
        align-items: stretch;
        min-height: 85vh;
    }

    .news-image-container {
        grid-column: 1;
        grid-row: 1 / -1;
        height: 100%;
        min-height: 100%;
        margin: 0;
        padding: 0;
        align-self: stretch;
        border-right: 2px solid #e0e0e0;
    }

    .news-detail-header {
        grid-column: 2;
        grid-row: 1;
    }

    .news-content {
        grid-column: 2;
        grid-row: 2;
        overflow-y: auto;
        overflow-x: hidden;
        max-height: calc(90vh - 200px);
    }

    .news-actions {
        grid-column: 2;
        grid-row: 3;
    }
}

/* News Detail Header */
.news-detail-header {
    padding: 30px;
    border-bottom: 1px solid #eee;
}

.news-detail-header .news-category {
    color: #000000;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.news-detail-header .news-title {
    color: #333;
    font-size: 2rem;
    font-weight: bold;
    line-height: 1.3;
    margin-bottom: 15px;
}

.news-detail-header .news-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    color: #666;
    font-size: 0.9rem;
}

.news-detail-header .news-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* News Image Container */
.news-image-container {
    width: 100%;
    height: 600px;
    overflow: hidden;
    position: relative;
    background-color: #f5f5f5;
    margin: 0;
    padding: 0;
}

.news-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    margin: 0;
    padding: 0;
}

/* News Content */
.news-content {
    padding: 30px;
    line-height: 1.8;
    color: #333;
    font-size: 1.1rem;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.news-content p {
    margin-bottom: 20px;
    word-wrap: break-word;
    word-break: break-word;
    overflow-wrap: break-word;
}

.news-content img {
    max-width: 100%;
    height: auto;
    margin: 20px 0;
    border-radius: 4px;
}

/* News Actions */
.news-actions {
    padding: 20px 30px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.back-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: #7338A0;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.back-button:hover {
    background-color: #581845;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(115, 56, 160, 0.3);
}

.share-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #7338A0;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.share-button:hover {
    background-color: #581845;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(115, 56, 160, 0.3);
}

.news-meta {
    color: #7338A0;
}

.news-meta a {
    color: #7338A0;
    text-decoration: none;
}

.news-meta a:hover {
    color: #581845;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .news-detail-container {
        margin: 20px auto;
        padding: 0 15px;
    }

    .news-detail-header {
        padding: 20px;
    }

    .news-detail-header .news-title {
        font-size: 1.5rem;
    }

    .news-content {
        padding: 20px;
        font-size: 1rem;
    }

    .news-actions {
        padding: 15px 20px;
        flex-direction: column;
        gap: 15px;
    }

    .admin-controls {
        width: 100%;
    }

    .edit-button, .delete-button {
        flex: 1;
    }

    .news-image-container {
        height: 400px;
    }
}

/* Print Styles */
@media print {
    .news-detail-container {
        margin: 0;
        padding: 0;
    }

    .news-detail {
        box-shadow: none;
    }

    .news-actions, .admin-controls {
        display: none;
    }

    .news-content {
        padding: 0;
    }
}

/* Style for login-register btn */

.login-btn, .register-btn {
  display: inline-block;
  padding: 10px 20px;
  margin: 5px;
  background-color: #7338A0;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: all 0.3s ease;
  border: 2px solid white;
}

.login-btn:hover, .register-btn:hover {
  background-color: white;
  color: #0c4da2;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Add header-right container styles */
.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.logreg-buttons {
  display: flex;
  gap: 10px;
  align-items: center;
}