/* css/style.css - Story Tamu Redesign */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', 'Segoe UI', serif;
    background-color: #FFF8F0;
    color: #2C2C2C;
    line-height: 1.7;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========== HEADER ========== */
header {
    background: linear-gradient(135deg, #8B5A2B 0%, #6B3E1A 100%);
    color: white;
    padding: 30px 0;
    text-align: center;
    border-bottom: 4px solid #CD7A5A;
}

header h1 a {
    color: white;
    text-decoration: none;
    font-size: 2.2rem;
    font-family: 'Georgia', serif;
    letter-spacing: 1px;
}

header p {
    margin-top: 8px;
    opacity: 0.85;
    font-style: italic;
}

/* ========== NAVIGATION ========== */
nav {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid #E8DCCC;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 35px;
    padding: 15px 0;
    flex-wrap: wrap;
}

nav ul li a {
    text-decoration: none;
    color: #5A3A22;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #CD7A5A;
}

/* ========== MAIN LAYOUT (2 COLUMNS) ========== */
.main-wrapper {
    display: flex;
    gap: 40px;
    padding: 40px 0;
    flex-wrap: wrap;
}

.content {
    flex: 3;
    min-width: 0;
}

.sidebar {
    flex: 1;
    min-width: 250px;
}

/* ========== SIDEBAR STYLES ========== */
.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #E8DCCC;
}

.sidebar-widget h3 {
    font-size: 1.2rem;
    color: #8B5A2B;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #CD7A5A;
    font-family: 'Georgia', serif;
}

.story-list {
    list-style: none;
}

.story-list li {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #E8DCCC;
}

.story-list li:last-child {
    border-bottom: none;
}

.story-list a {
    text-decoration: none;
    color: #2C2C2C;
    font-weight: 500;
    transition: color 0.3s;
    display: block;
}

.story-list a:hover {
    color: #CD7A5A;
}

.story-list small {
    display: block;
    font-size: 0.75rem;
    color: #999;
    margin-top: 4px;
}

/* Popular stories */
.popular-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popular-list .view-count {
    background: #F5EDE3;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.7rem;
    color: #8B5A2B;
}

/* ========== STORY CARDS ========== */
.section-title {
    font-size: 1.6rem;
    color: #8B5A2B;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 2px solid #CD7A5A;
    font-family: 'Georgia', serif;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.story-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #E8DCCC;
}

.story-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}

.story-card img, .no-image {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background: #F5EDE3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #CD7A5A;
}

.story-card h3 {
    padding: 15px 15px 8px;
    font-size: 1.1rem;
}

.story-card h3 a {
    text-decoration: none;
    color: #2C2C2C;
    transition: color 0.3s;
}

.story-card h3 a:hover {
    color: #CD7A5A;
}

.story-card p {
    padding: 0 15px;
    color: #666;
    font-size: 0.85rem;
    line-height: 1.5;
}

.story-meta {
    padding: 10px 15px 15px;
    font-size: 0.7rem;
    color: #999;
}

.btn {
    display: inline-block;
    margin: 5px 15px 15px;
    padding: 8px 18px;
    background: #CD7A5A;
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-size: 0.8rem;
    transition: background 0.3s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #B55A3A;
}

/* ========== STORY DETAIL PAGE ========== */
.story-detail {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.05);
    border: 1px solid #E8DCCC;
}

.story-detail h1 {
    font-size: 2rem;
    color: #8B5A2B;
    margin-bottom: 20px;
    font-family: 'Georgia', serif;
}

.featured-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 25px;
}

.story-description {
    background: #FEF9F0;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 35px;
    border-left: 4px solid #CD7A5A;
    font-style: italic;
}

.episodes h2 {
    font-size: 1.4rem;
    color: #8B5A2B;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #CD7A5A;
}

.episode-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.episode-item {
    background: #FEF9F0;
    padding: 15px 20px;
    border-radius: 10px;
    transition: background 0.3s;
    border: 1px solid #E8DCCC;
}

.episode-item:hover {
    background: #FFF4E8;
}

.episode-item h3 a {
    text-decoration: none;
    color: #2C2C2C;
    font-weight: 500;
}

.episode-item h3 a:hover {
    color: #CD7A5A;
}

.episode-item small {
    color: #999;
    font-size: 0.75rem;
}

/* ========== EPISODE PAGE ========== */
.episode-content {
    background: white;
    border-radius: 16px;
    padding: 35px;
    box-shadow: 0 3px 12px rgba(0,0,0,0.05);
    border: 1px solid #E8DCCC;
}

.episode-content h1 {
    font-size: 1.6rem;
    color: #8B5A2B;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #CD7A5A;
}

.episode-content .content {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 40px;
    color: #2C2C2C;
}

.episode-navigation {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #E8DCCC;
    flex-wrap: wrap;
}

.episode-navigation a {
    padding: 10px 20px;
    background: #F5EDE3;
    text-decoration: none;
    color: #5A3A22;
    border-radius: 30px;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.episode-navigation a:hover {
    background: #CD7A5A;
    color: white;
}

/* ========== FOOTER ========== */
footer {
    background: #8B5A2B;
    color: #F5EDE3;
    text-align: center;
    padding: 35px 0;
    margin-top: 50px;
    border-top: 4px solid #CD7A5A;
}

footer p {
    opacity: 0.85;
}

/* ========== RESPONSIVE (SIMU) ========== */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    header h1 a {
        font-size: 1.6rem;
    }
    
    header p {
        font-size: 0.85rem;
    }
    
    nav ul {
        gap: 20px;
        padding: 12px 0;
    }
    
    nav ul li a {
        font-size: 0.85rem;
    }
    
    .main-wrapper {
        flex-direction: column;
        gap: 25px;
        padding: 25px 0;
    }
    
    .sidebar {
        order: 2;
    }
    
    .content {
        order: 1;
    }
    
    .story-detail, .episode-content {
        padding: 20px;
    }
    
    .story-detail h1 {
        font-size: 1.5rem;
    }
    
    .episode-content h1 {
        font-size: 1.3rem;
    }
    
    .episode-content .content {
        font-size: 1rem;
        line-height: 1.7;
    }
    
    .grid {
        grid-template-columns: 1fr;
    }
    
    .episode-navigation {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .section-title {
        font-size: 1.3rem;
    }
}

/* ========== UTILITIES ========== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.error-msg {
    background: #FEF2F0;
    color: #D9534F;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #D9534F;
    margin-bottom: 20px;
}

.success-msg {
    background: #E8F5E8;
    color: #5A8F4C;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #5A8F4C;
    margin-bottom: 20px;
}
/* ========== CONTENT PROTECTION STYLES ========== */

/* Prevent text selection globally */
.protected-content,
.protected-content * {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Allow selection for input fields and textareas */
input, textarea, select, option {
    user-select: text !important;
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
}

/* Optional: Add a subtle indicator that content is protected */
.protected-content::before {
    content: "";
    display: none;
}

/* Disable image dragging */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none; /* Optional: prevents right-click on images */
}

/* Selection styling - shows a different color but still disabled */
::selection {
    background: transparent;
}

::-moz-selection {
    background: transparent;
}