/* =====================================================
   CNCTASPHR — Story Pages Unified Theme
   Modern Editorial / Magazine-Style
   ===================================================== */
   

/* --- GLOBAL SETTINGS --- */
h3 { color: #000; }

.story-container {
  display: flex;
  flex-wrap: wrap;
  max-width: 1000px;
  margin: 2rem auto;
  /*padding: 0 1.5rem 4rem;*/
  box-sizing: border-box;
  /*background: #fff;*/
  border-radius: 12px;
}

/* --- HEADINGS & INTRO --- */
.story-main h1 {
  text-align: center;
  font-size: 1.9rem;
  color: #000;
  margin-bottom: 0.4rem;
  padding:8px;
  border-radius:12px;
  background:aliceblue;
   margin-top:58px;
}


.story-main .intro {
  text-align: center;
  color: #000;
  font-size: 0.95rem;
  margin-bottom: 1.8rem;
  padding:8px;
  border-radius:12px;
  background:aliceblue;
}

/* --- CREATE BUTTON --- */
.story-btn {
  display: inline-block;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 0.7rem 1.2rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: background 0.25s ease, transform 0.2s ease;
}
.story-btn:hover {
  background: #0a84ff;
  transform: translateY(-2px);
}

/* =====================================================
   STORIES PAGE — GRID LAYOUT
   ===================================================== */
.story-grid {
  column-count: 3;
  column-gap: 1.5rem;
  padding-top:20px;
}

.story-card {
  border-radius: 12px;
  padding-left:10px;
  padding-right:10px;
  margin-bottom: 1.5rem;
  display: inline-block;
  width: 100%;
  overflow: hidden;
  background: #f8f8f8;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.story-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}

/* --- COVER IMAGE --- */
.story-cover {
  position: relative;
  display: block;
  text-decoration: none;
  color: inherit;
}
.story-cover img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  border-radius: 12px;
  transition: transform 0.4s ease;
  padding-top:20px;
}
.story-card:hover .story-cover img {
  transform: scale(1.05);
}

/* --- CONTENT BELOW IMAGE --- */
.story-overlay {
  background: #fff;
  color: #111;
  padding: 1rem 1.2rem;
  border-radius: 0 0 12px 12px;
  position: relative;
  z-index: 2;
}

/* --- SINGLE STORY HEADER IMAGE --- */
.story-header-image {
  width: 100%;
  max-width: 900px;
  height: auto;
  display: block;
  object-fit: contain; /* show entire image */
  background: #f9f9f9; /* subtle backdrop for transparency or padding */
  margin: 0 auto 1.5rem;
  border-radius: 10px;
  box-shadow: 0 3px 12px rgba(0,0,0,0.25);
}


@media (max-width: 768px) {
  .story-header-image {
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  }
}



.story-overlay h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 0.4rem;
  color: #000;
  line-height: 1.4;
}
.story-overlay h2 a {
  text-decoration: none;
  color: inherit;
}
.story-card:hover .story-overlay h2 a {
  color: #007bff;
}

.story-overlay p {
  font-size: 0.9rem;
  color: #333;
  line-height: 1.5;
  margin-bottom: 0;
}

/* --- STORY META (AUTHOR + DATE) --- */
.story-card .story-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #e0e4e6;
  padding: 16px 12px 10px;
  margin-top: 1rem;
}

.story-author-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.1);
}
.story-author-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.story-author-name-link {
  text-decoration: none;
  color: #111;
  font-weight: 600;
  font-size: 0.9rem;
}
.story-author-name-link:hover {
  color: #007bff;
}
.story-date {
  font-size: 0.8rem;
  color: #777;
  opacity: 0.9;
}

/* --- ALERT MESSAGES --- */
.alert.success {
  background: #dff0d8;
  color: #3c763d;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 10px;
  font-size: 0.9rem;
  text-align: center;
}

/* =====================================================
   SINGLE STORY PAGE
   ===================================================== */
.single-story-container {
  max-width: 1000px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: #fff;
  border-radius: 12px;
  color: #f5f5f5;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.story-header-image {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 1rem;
}
.single-story h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #000;
  background:#f1f1f1;
  border-radius:12px;
  padding:8px;
  
}
.single-story .story-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.5rem;
}
.single-story .story-author-avatar {
  width: 50px;
  height: 50px;
  border-radius: 25%;
  border: 2px solid #007bff;
}
.story-content {
  font-size: 1rem;
  line-height: 1.7;
  color: #000;
  background: #f9f9f9;
  padding: 16px 20px;
  border-radius: 12px;
  word-wrap: break-word;
}

.story-content p {
  margin: 0 0 1rem 0;
  line-height: 1.8;
}

.story-content ul,
.story-content ol {
  margin: 0 0 1rem 1.4rem;
}

.story-content blockquote {
  border-left: 3px solid #007bff;
  padding-left: 1rem;
  color: #555;
  margin: 1rem 0;
  font-style: italic;
}





.story-actions {
  display: flex;
  justify-content: flex-start;
  gap: 10px;
}

/* --- BUTTONS --- */
.story-btn,
.delete-story-btn {
  font-weight: 600;
  border: none;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  transition: background 0.3s ease;
  cursor: pointer;
}
.story-btn {
  background: #007bff;
  color: #fff;
  text-decoration: none;
}
.story-btn:hover {
  background: #0a84ff;
}
.delete-story-btn {
  background: #e74c3c;
  color: #fff;
}
.delete-story-btn:hover {
  background: #c0392b;
}

/* =====================================================
   RESPONSIVE DESIGN
   ===================================================== */
@media (max-width: 1100px) {
  .story-grid { column-count: 2; }
}
@media (max-width: 768px) {
  .story-grid {
    column-count: 1;
    column-gap: 1rem;
  }
  .story-btn {
    width: 100%;
    text-align: center;
  }
  .story-overlay {
    padding: 1rem;
  }
  .story-overlay h2 {
    font-size: 1rem;
  }
  .story-overlay p {
    font-size: 0.85rem;
  }
  .story-main { padding: 1rem; }
  .single-story-container {
    margin: 1rem;
    padding: 1rem;
  }
  .story-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .story-btn,
  .delete-story-btn {
    width: 100%;
    text-align: center;
  }
}



/* =====================================================
   CREATE STORY PAGE (Scoped Styles)
   ===================================================== */
.create-story-page {
  max-width: 720px;
  margin: 2.5rem auto;
  background: #ffffff;
  border-radius: 10px;
  padding: 2rem 2.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.create-story-page h1 {
  text-align: center;
  font-size: 2rem;
  color: #111;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.create-story-page .intro {
  text-align: center;
  color: #444;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 2rem;
}

/* Form Structure */
.create-story-page .story-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.create-story-page .form-group {
  display: flex;
  flex-direction: column;
}

.create-story-page label {
  font-weight: 600;
  color: #111;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.create-story-page input[type="text"],
.create-story-page input[type="file"],
.create-story-page textarea {
  width: 100%;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  background: #f9f9f9;
  color: #222;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.create-story-page input[type="text"]:focus,
.create-story-page textarea:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
  background: #fff;
  outline: none;
}

.create-story-page input[type="file"] {
  padding: 0.5rem;
  background: #f7f7f7;
}

/* Button */
.create-story-page .story-btn {
  display: inline-block;
  background: #007bff;
  color: #fff;
  border: none;
  padding: 0.8rem 1.4rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  text-align: center;
}

.create-story-page .story-btn:hover {
  background: #009bff;
  transform: translateY(-2px);
}

/* Alerts */
.create-story-page .alert.error {
  background: #ffe8e8;
  color: #c0392b;
  padding: 0.9rem 1.2rem;
  border-radius: 6px;
  margin-bottom: 1.2rem;
  text-align: center;
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .create-story-page {
    margin: 1.2rem;
    padding: 1.5rem;
  }

  .create-story-page .story-form {
    gap: 1.2rem;
  }

  .create-story-page input,
  .create-story-page textarea {
    font-size: 0.95rem;
  }

  .create-story-page .story-btn {
    width: 100%;
    padding: 0.9rem;
  }
}

/* =====================================================
   EDIT STORY PAGE (Scoped Styles)
   ===================================================== */
.edit-story-page {
  max-width: 720px;
  margin: 2.5rem auto;
  background: #ffffff;
  border-radius: 10px;
  padding: 2rem 2.5rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.edit-story-page h1 {
  text-align: center;
  font-size: 2rem;
  color: #111;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.edit-story-page .intro {
  text-align: center;
  color: #444;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 2rem;
}

/* --- Form Structure --- */
.edit-story-page .story-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.edit-story-page .form-group {
  display: flex;
  flex-direction: column;
}

.edit-story-page label {
  font-weight: 600;
  color: #111;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.edit-story-page input[type="text"],
.edit-story-page input[type="file"],
.edit-story-page textarea {
  width: 100%;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  background: #f9f9f9;
  color: #222;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.edit-story-page input[type="text"]:focus,
.edit-story-page textarea:focus {
  border-color: #007bff;
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
  background: #fff;
  outline: none;
}

.edit-story-page input[type="file"] {
  padding: 0.5rem;
  background: #f7f7f7;
}

/* --- Current Header Preview --- */
.edit-story-page .current-header {
  margin-top: 1rem;
  margin-bottom: 1rem;
  text-align: center;
}

.edit-story-page .current-header img {
  max-width: 100%;
  max-height: 300px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

/* --- Button --- */
.edit-story-page .story-btn {
  display: inline-block;
  background: #007bff;
  color: #fff;
  border: none;
  padding: 0.8rem 1.4rem;
  border-radius: 6px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.2s ease;
  text-align: center;
}

.edit-story-page .story-btn:hover {
  background: #009bff;
  transform: translateY(-2px);
}

/* --- Alerts --- */
.edit-story-page .alert.error {
  background: #ffe8e8;
  color: #c0392b;
  padding: 0.9rem 1.2rem;
  border-radius: 6px;
  margin-bottom: 1.2rem;
  text-align: center;
  font-weight: 500;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .edit-story-page {
    margin: 1.2rem;
    padding: 1.5rem;
  }

  .edit-story-page .story-form {
    gap: 1.2rem;
  }

  .edit-story-page input,
  .edit-story-page textarea {
    font-size: 0.95rem;
  }

  .edit-story-page .story-btn {
    width: 100%;
    padding: 0.9rem;
  }
}
/* Reduce visual gap between textarea/editor and labels */
.create-story-page .story-form textarea,
.edit-story-page .story-form textarea {
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

