* {
  box-sizing: border-box;
}

body {
    background-color: rgb(226, 226, 226);
    margin: 0;
    font-family: Arial, sans-serif;
}

#scores {
    width: 100%;
    height: 125px;
    position: inherit;
}

.alert {
  padding: 20px;
  margin: auto;
  width: 50%;
  background-color: #ffbb00;
  color: black;
  border: 2px solid black;
  border-radius: 14px;
  text-align: center;
  margin-bottom: 10px;
}

#delete-success {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    margin-bottom: 20px;
}

#edit-success {
    background-color: #d4edda;
    color: #155724;
    padding: 15px;
    border: 1px solid #c3e6cb;
    border-radius: 8px;
    margin-bottom: 20px;
}

.no-stories {
  background: #f8d7da;
  color: #721c24;
  padding: 20px;
  border: 1px solid #f5c6cb;
  border-radius: 8px;
  margin: 20px 0;
  text-align: center;
}

.closebtn {
  margin-left: 15px;
  color: black;
  font-weight: bold;
  float: right;
  font-size: 32px;
  line-height: auto;
  cursor: pointer;
  transition: 0.3s;
}

.closebtn:hover {
  color: black;
}

/* Locator Bar */
#Locator-bar {
    background-color: rgb(43, 44, 45);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    height: 40px;
    width: 100%;
    position: absolute;
    overflow: visible; /* Ensure the slant is fully visible */
    z-index: 1;
    padding-left: 100px; /* Move the entire content of the Locator bar to the right */
}

/* Logo Container (Holds the "CSN" text and slant) */
.logo-container {
    position: relative;
    z-index: 2;
    margin-left: 0px; /* Space between logo and buttons */
    height: 100%;
    display: flex;
    justify-content: center; /* Centers content horizontally */
    align-items: center; /* Centers content vertically */
}

/* CSN Text */
.logo {
    color: white;
    z-index: 3;
    position: relative;
    width: 100px;
    height: 100px;
    left: -52%; /* Push slant to the right with a 75% margin */
}

/* Red slanted background behind "CSN" text but in front of Locator Bar */
.logo-container::before {
    content: '';
    position: absolute;
    top: 0; /* Start the slant at the very top */
    left: -75%; /* Push slant to the right with a 75% margin */
    width: 125%; /* Adjusted width */
    height: 100%; /* Full height */
    background-color: #d00;
    transform: skewX(-28deg); /* Apply slant effect */
    z-index: 0;
    border-left:10px solid #b40000;
    border-right: 10px solid #b40000;
}

/* Navigation Links */
.nav-links {
    display: flex;
    gap: -100px;
    z-index: 10; /* Ensure buttons are above background */
}

.nav-btn {
    background-color: transparent;
    color: white; /* Button text color is white */
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: normal;
    border: none; /* Removed border from buttons */
}

.nav-btn:hover {
    background-color: transparent;
    color: red; /* Button text turns red on hover */
    text-decoration: underline;
    font-style: italic;
}

/* Dropdown Menu */
.dropdown {
    position: relative; /* To position the dropdown content */
    z-index: 999; /* Make sure dropdown container stays on top */
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: black;
    min-width: 160px;
    z-index: 9999; /* Ensure dropdown content appears on top */
    top: 100%; /* Position dropdown directly below the "INFORMATION" button */
    left: 0;
    margin-top: 0px; /* Add a small margin to prevent it from touching the button */
}

.dropdown:hover .dropdown-content {
    display: block; /* Make the dropdown content visible on hover */
}

.dropdown-btn {
    background-color: transparent;
    color: white;
    padding: 10px 20px;
    cursor: pointer;
    font-size: 16px;
    width: 100%;
    font-weight: normal;
    border: none;
}

.dropdown-btn:hover {
    background-color: transparent;
    color: red;
    text-decoration: underline;
    font-style: italic;
}

#body {
    width: 85%;
    background-color: white;
    border-radius: 15px;
    margin: auto;
    padding: 15px;
}

/* Hamburger Button */
.hamburger {
    position: fixed;
    top: 10px;
    left: 10px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Hamburger Bars */
.bar {
    width: 30px;
    height: 4px;
    background: white;
    transition: 0.3s;
}

/* Sidebar Menu */
.sidebar {
    position: fixed;
    top: 6%;
    left: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(255, 255, 255, 10);
    display: flex;
    align-items: top;
    transition: 0s;
    overflow: scroll;
}

.sidebar ul {
    list-style: none;
    padding: 0;
    text-align: left;
    width: 100%;
}

.sidebar ul li {
    border-bottom: 1px solid gray;
    line-height: 70px;
}

.sidebar ul li a {
    color: black;
    text-decoration: none;
    font-size: 30px;
    transition: 0s;
    padding: 15px;
}

.sidebar ul li a:hover {
    color: red;
    text-decoration: underline;
    font-style: italic;
}

/* Active Sidebar */
.sidebar.active {
    left: 0;
}

/* Transform Hamburger into 'X' */
.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(8px, 7px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

.story {
    padding: 25px;
    font-family: 'Times New Roman', Times, serif;
    max-width: 96%;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
}

.story-title {
    font-weight: bold;
    font-family: 'Bebas Neue', Arial, sans-serif;
    font-size: 1.6em;
    cursor: pointer;
    background-clip: text;
    text-align: left;
    margin-bottom: 15px;
    padding: 8px 0;
    position: relative;
    transition: all 0.3s ease;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    letter-spacing: 0.5px;
}

.story-preview {
    margin-top: 10px;
    font-family: 'Times New Roman', Times, serif;
    font-size: 1.1em;
    color: #555;
    max-width: 100%; /* Ensure text fits within the max-width of 80% */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; /* Prevent preview text from wrapping */
}

hr {
    border: 0;
    border-top: 1px solid #ddd;
    margin: 10px 0;
}

@media only screen and (max-width: 1085px) {
    body { margin: 0px; }

    .nav-links {
        display: none;
    }

    .logo {
        display: none;
    }

    .logo-container {
        width: 12%;
        content: '';
        position: absolute;
        top: 0; /* Start the slant at the very top */
        left: 5%; /* Push slant to the right with a 5% margin */
    }

    #Locator-bar {
        position: fixed;
        top: 0;
    }

    #scores {
        display: none;
    }

    .newsroom-container {
        position: relative;
        top: 50px !important;
        padding: 15px;
    }

    .no-stories {
        width: 99%;
        line-height: 20px;
    }
}

@media only screen and (min-width: 1086px) {
    #menuToggle {
        display: none;
    }
    .newsroom-container {
        margin-top: 75px !important; /* Adjust for desktop */
    }
}

#edit-btn {
    padding: 5px;
    padding-left: 10px;
    padding-right: 10px;
    color: white;
    background-color: green;
    text-decoration: none;
    border: solid 3px green;
    border-radius: 10px;
}

#edit-btn:hover {
    color: black;
    background-color: white;
    cursor: pointer;
}

#delete-btn {
    padding: 5px;
    padding-left: 10px;
    padding-right: 10px;
    color: white;
    background-color: red;
    text-decoration: none;
    border: solid 3px red;
    border-radius: 10px;
}

#delete-btn:hover {
    color: black;
    background-color: white;
    cursor: pointer;
}

#newsroom-Header {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 3rem;
    color: #FF3131;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 20px;
    border-bottom: 2px solid #FF3131;
    padding-bottom: 10px;
}

/* Featured Section Styles */
.featured-section {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.section-header {
    margin-bottom: 30px;
    text-align: left;
}

.section-title {
    color: #ff3131;
    border-bottom: 2px solid #ff3131;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-family: 'Bebas Neue', Arial, sans-serif;
    font-size: 2.2rem;
    font-weight: bold;
    letter-spacing: -0.5px;
}

.section-divider {
    display: none;
}

.featured-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.featured-card {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    height: 100px;
    display: flex;
    flex-direction: column;
}

.main-featured {
    height: 100px;
}

.main-featured .card-content {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.side-featured .card-content {
    padding: 15px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-image {
    width: 100%;
    height: 150px;
    overflow: hidden;
    flex-shrink: 0;
}

.main-featured .card-image {
    height: 150px;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.featured-card:hover .card-image img {
    transform: scale(1.05);
}

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

.breaking-badge {
    background: linear-gradient(135deg, #FF3131, #e74c3c);
    color: white;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    border-radius: 4px;
    text-transform: uppercase;
}

.publish-time {
    color: #6c757d;
    font-size: 14px;
    font-style: italic;
}

.card-title {
    margin: 0 0 10px 0;
    line-height: 1.2;
}

.main-featured .card-title {
    font-size: 1.15rem;
    font-weight: bold;
}

.side-featured .card-title {
    font-size: 1.15rem;
    font-weight: 600;
}

.story-title {
    font-size: 1.15rem;
    margin: 0 0 6px 0;
    line-height: 1.2;
    font-weight: 600;
}

.card-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.card-title a:hover {
    color: #FF3131;
    text-decoration: underline;
    font-style: italic;
}

.card-byline {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 20px;
    font-style: italic;
}

.card-actions {
    margin-top: auto;
    display: flex;
    gap: 10px;
}

.edit-btn, .delete-btn {
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.edit-btn {
    background: #28a745;
    color: white;
    border: 2px solid #28a745;
}

.edit-btn:hover {
    background: white;
    color: #28a745;
}

.delete-btn {
    background: #dc3545;
    color: white;
    border: 2px solid #dc3545;
}

.delete-btn:hover {
    background: white;
    color: #dc3545;
}

/* All Stories Section */
.all-stories-section {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 15px;
}

.story-card {
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    border: 1px solid #dee2e6;
    border-left: 3px solid #FF3131;
    position: relative;
    max-height: 280px;
}

.story-image {
    width: 100%;
    height: 100px;
    overflow: hidden;
}

.story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.story-card:hover .story-image img {
    transform: scale(1.03);
}

.story-content {
    padding: 12px;
}

.story-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.story-category {
    background: #FF3131;
    color: white;
    padding: 4px 8px;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
    border-radius: 3px;
    text-transform: uppercase;
}

.story-date {
    color: #6c757d;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.story-title {
    font-size: 0.85rem !important;
    margin: 0 0 8px 0;
    line-height: 1.3;
    font-weight: 600;
}

.card-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.story-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.15rem !important;
}

.story-card:hover .story-title a {
    color: red;
    text-decoration: underline;
    font-style: italic;
}

.story-byline {
    color: #6c757d;
    font-size: 13px;
    margin-bottom: 15px;
    font-style: italic;
}

.story-actions {
    position: absolute;
    top: 15px;
    right: 15px;
    display: flex;
    gap: 5px;
}

.edit-btn-small, .delete-btn-small {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 12px;
    transition: all 0.3s ease;
    opacity: 0;
}

.story-card:hover .edit-btn-small,
.story-card:hover .delete-btn-small {
    opacity: 1;
}

.edit-btn-small {
    background: #28a745;
    color: white;
}

.edit-btn-small:hover {
    background: #218838;
    transform: scale(1.1);
}

.delete-btn-small {
    background: #dc3545;
    color: white;
}

.delete-btn-small:hover {
    background: #c82333;
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .main-featured {
        grid-row: auto;
        max-height: 300px;
    }

    .stories-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .main-featured .card-title {
        font-size: 1.15rem;
    }

    .side-featured .card-title {
        font-size: 1.15rem;
    }

    .story-title {
        font-size: 1.1rem;
    }

    .card-image, .main-featured .card-image {
        height: 120px;
    }

    .story-image {
        height: 100px;
    }

    .story-actions {
        position: static;
        margin-top: 10px;
        justify-content: flex-end;
    }

    .edit-btn-small, .delete-btn-small {
        opacity: 1;
        position: static;
        width: auto;
        height: auto;
        padding: 6px 10px;
        border-radius: 4px;
    }
}

.newsroom-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.story-title {
    color: black;
    text-decoration: none;
    font-size: 30px;
}

.story-title:hover {
    cursor: pointer;
}

/* User icon dropdown styles */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-icon {
    font-size: 28px !important;
    color: #fff;
    cursor: pointer;
    padding: 10px;
}

.user-menu {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    right: 0;
    min-width: 120px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: 6px;
    overflow: hidden;
}

.user-menu a {
    color: black;
    padding: 10px 12px;
    text-decoration: none;
    display: block;
    font-size: 14px;
}

.user-menu a:hover {
    background-color: #f1f1f1;
}

.user-dropdown:hover .user-menu {
    display: block;
}

/* Position icon to far right */
.nav-user-icon {
    margin-left: auto;
    display: flex;
    align-items: center;
}

#footer {
    background-color: white;
    color: black;
    padding: 15px;
    margin-top: 50px;
}

