/* =========================
   GLOBAL RESET / BASE
   ========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  width: 100%;
  min-height: 100vh;
  overflow-x: hidden;
  background: #384C65; /* matches your portfolio vibe */
  color: var(--color-white, #ffffff);

  /* IMPORTANT:
     Don't set a global font-family here.
     Summernote (and other editors) can inherit it in ways that cause UI bugs. */
}

/* Main page wrapper */
.container {
  width: 100%;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

/* Basic heading reset so the top <h1> doesn't look wild by default */
.container > h1 {
  font-family: "loubag", cursive;
  font-size: 2.4rem;
  letter-spacing: 0.06em;
  text-align: center;
  margin: 1.5rem 0 2rem;
  color: var(--color-accent-light, #c0c9db);
}

/* =========================
   HEADER BANNER
   ========================= */

.header-container {
  width: 100%;
  aspect-ratio: 20 / 5; /* taller header on narrower screens */
  max-width: 1600px;
  margin: 0em auto !important;
  margin-top: 1em !important;
  background-image: url("/blog/panel/images/blog-header11.png");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  padding: 0 !important;
}

/* =========================
   BLOG INDEX: POST CARDS
   ========================= */

/* Grid that holds the post preview cards */
.post-previews-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem 0 6rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  justify-content: center;
}

/* Individual card wrapper */
.post-preview {
  margin: 0 auto;
  width: 100%;
  border-radius: 12px;
  padding: 1.25rem;
  text-align: center;
  font-size: 1.1rem;
  position: relative;
  background: rgba(18, 21, 36, 0.7); /* dark glass */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);

  background-size: 600% 600%;
  animation: wavey-gradient 15s ease infinite;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.post-preview:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
}

/* Post title inside card */
.post-preview h2 {
  font-size: 1.5em;
  margin: 0 0 0.5em;
  font-weight: normal;
  font-style: normal;
  text-transform: none;
  font-family: "brick", sans-serif;
  text-align: center;
  padding: 0.25em;

  /* gradient text */
  background: linear-gradient(
    90deg,
    #485f88,
    #485f88,
    #485f88,
    #9daccc,
    #485f88,
    #485f88,
    #485f88
  );
  background-size: 300% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: waveGradient 6s ease-in-out infinite;

  /* prevent weird overflow */
  white-space: normal;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.post-preview h2 a {
  text-decoration: none;
  color: inherit; /* keep gradient text behavior */
  text-transform: none;
}

.post-preview h2 a:hover {
  text-decoration: none;
}

/* Date under title on index */
.post-preview .post-date {
  font-size: 1em;
  color: #d6d6d6;
font-family: "brick";
margin: 0em;
padding: 0em;
}

/* Snippet text */
.post-snippet {
  font-size: 1em;
  color: var(--color-light, #e1e6f2);
  white-space: pre-line;   /* 👈 this is the magic */
  font-family: "seawashed";
  margin: 0em;
}

.post-blurb {
  margin: 0;
}

/* "Read more" button – uses existing .button from base.css, we just tweak if needed */
.post-preview .button {
  display: inline-block;
  margin-top: 0.25rem;
}

/* =========================
   SINGLE POST PAGE
   ========================= */

.post-container {
  width: 100%;
  padding: 2rem 2.25rem;
  border-radius: 12px;
  text-align: center;
  font-size: 1.15rem;
  margin: 1em auto;

  position: relative;
  background: rgba(18, 21, 36, 0.7);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background-size: 600% 600%;
  animation: wavey-gradient 15s ease infinite;
  max-width: 1200px;
}

/* Title on single post */
.post-container h1 {
  font-family: "loubag", cursive;
  font-size: 2.6rem;
  line-height: 1.2;
  margin: 0 0 0.5em;
  text-align: center;
  color: var(--color-accent-light, #c0c9db);
  max-width: 100%;

  overflow-wrap: anywhere; /* strongest wrap */
  word-break: break-word;  /* fallback */
  hyphens: auto;
  -webkit-hyphens: auto;
  white-space: normal;
}

/* Date under single post title */
.post-date {
  font-size: 0.9em;
  color: #ccc;
  text-align: center;
  margin-bottom: 2rem;

  /* safe */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Main body text — SAFE defaults (no custom fonts, no span targeting) */
.post-content {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.7;
  font-size: 1.15rem;
  color: #ffffff;

  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  -ms-hyphens: auto;

  width: 100%;
  text-align: left;
}

.post-content p {
  margin: 0 0 1.2em;
}

/* Subheadings inside posts */
.post-content h2,
.post-content h3 {
  margin-top: 2em;
  margin-bottom: 1em;
  font-family: "loubag", serif;
  color: var(--color-accent-light, #c0c9db);
}

/* Links inside post body */
.post-content a {
  color: var(--color-gold, #f2c984);
  text-decoration: underline;
}

.post-content a:hover {
  text-decoration: none;
  color: var(--color-teal, #00a29e);
}

/* Images inside post body */
.post-content img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2em auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

/* =========================
   OPTIONAL: SUBMENU TEST BOX
   ========================= */

.submenu {
  width: 100%;
  max-width: 500px;
  height: auto;
  min-height: 200px;
  background-color: #f08ac1;
  color: white;

  /* safe */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  border-radius: 12px;
  margin: 1rem auto;
  padding: 1rem;
}

/* =========================
   SUMMERNOTE SAFETY SHIELD
   =========================
   This prevents your theme CSS from breaking the editor UI.
   (toolbar, modals, dropdowns, editable area, etc.)
*/

.note-editor,
.note-editor * {
  font-family: initial !important;
}

/* Set a clean, readable font inside the editor typing area */
.note-editor .note-editable {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;
}

/* =========================
   ANIMATIONS
   ========================= */

@keyframes wavey-gradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes waveGradient {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Phones */
@media (max-width: 600px) {

  /* tighter page gutters */
  .container {
    padding: 0 1rem 3rem;
  }

  /* header: make it taller so the crop looks intentional */
  .header-container {
    aspect-ratio: 14 / 5;
    background-position: center top;
  }

  /* cards: force true single column and remove “grid math” surprises */
  .post-previews-container {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 1rem 0 3rem;
  }

  .post-preview {
    padding: 1rem;
    font-size: 1rem;
    border-radius: 14px;
  }

  .post-preview h2 {
    font-size: 1.35em;
    line-height: 1.2;
  }

  .post-snippet {
    font-size: 0.95em;
    line-height: 1.5;
  }

  /* single post container: readable width + less padding */
  .post-container {
    width: 100%;
    max-width: 720px;
    padding: 1.25rem 1.1rem;
    margin: 1rem auto;
    border-radius: 14px;
  }

  .post-container h1 {
    font-size: 1.85rem;
    line-height: 1.15;
  }

  .post-date {
    margin-bottom: 1.25rem;
    font-size: 0.85rem;
  }

  .post-content {
    font-size: 1rem;
    line-height: 1.75;
  }

  /* prevent long links/strings from wrecking layout */
  .post-content a {
    word-break: break-word;
  }

  /* images inside posts: make them breathe */
  .post-content img {
    margin: 1.25rem auto;
    border-radius: 12px;
  }
}

/* Very small phones (iPhone SE etc.) */
@media (max-width: 380px) {
  .container > h1 {
    font-size: 1.6rem;
  }

  .post-container h1 {
    font-size: 1.6rem;
  }

  .post-preview h2 {
    font-size: 1.2em;
  }

  .post-container {
    padding: 1.05rem 0.95rem;
  }
}
