
/* --- Styled Alerts (Toasts) --- */
#toast-container {
  position: fixed;
  bottom: 50px;
  right: 30px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 280px;
  padding: 16px 20px;
  border-radius: 12px;
  background: #1a1a1a;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
  border-left: 4px solid #00bcd4;
  animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.toast.success { border-left-color: #00e676; }
.toast.error { border-left-color: #ff5252; }
.toast.info { border-left-color: #00bcd4; }

@keyframes slideIn {
  from { opacity: 0; transform: translateX(100px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateY(20px); }
}


    /* ... Keep all your existing styles ... */
    * { box-sizing: border-box; margin: 0; padding: 0; }
    html, body { font-family: 'Poppins', sans-serif; background: #0f0f0f; color: #f5f5f5; scroll-behavior: smooth; }
    body { overflow-x: hidden; }

    nav {
      width: 100%;
      position: fixed;
      top: 0;
      left: 0;
      display: flex;
      justify-content: space-around;
      align-items: center;
      padding: 15px 0;
      background-color: rgba(0,0,0,0.75);
      backdrop-filter: blur(6px);
      z-index: 100;
      font-size: 1.05rem;
    }

    nav a {
      color: #f5f5f5;
      text-decoration: none;
      font-weight: 500;
      display: flex;
      align-items: center;
      gap: 8px;
      transition: color 0.3s ease, transform 0.3s ease;
    }

    nav a:hover { color: #00bcd4; transform: translateY(-2px); }

    .hero {
      height: 70vh;
      background: 
       linear-gradient(
        rgba(52, 52, 53, 0.096),
        rgba(36, 35, 35, 0.8)
    ),
      url('images/blog.jpg') center/cover no-repeat;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      margin-top: 60px;
      animation: zoomHero 18s ease-in-out infinite alternate;
    }

    .hero::before {
      content: "";
      position: absolute;
      inset: 0;
      background: rgba(0,0,0,0.6);
      z-index: 1;
    }

    .hero-content {
      z-index: 2;
      text-align: center;
    }

    .hero-content h1 {
      font-size: 3rem;
      color: #00bcd4;
      margin-bottom: 10px;
      animation: fadeInUp 2s ease-out;
    }

    .hero-content p {
      color: #ffffff;
      font-size: 1.3rem;
      animation: fadeInUp 2.4s ease-out;
    }

    .blog-container {
      padding: 100px 10%;
      display: flex;
      flex-direction: column;
      gap: 80px;
    }

    .blog-post {
      display: flex;
      flex-wrap: wrap;
      gap: 50px;
      align-items: center;
      justify-content: space-between;
      opacity: 0;
      transform: translateY(80px);
      transition: all 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .blog-post.visible { opacity: 1; transform: translateY(0); }
    .blog-post:nth-child(even) { flex-direction: row-reverse; }

    .post-image {
      flex: 1 1 45%;
      border-radius: 15px;
      overflow: hidden;
      box-shadow: 0 0 25px rgba(0,0,0,0.6);
    }

    .post-image img {
      width: 100%;
      height: 340px;
      object-fit: cover;
      transition: transform 1.5s ease;
    }

    .post-image:hover img { transform: scale(1.08); }

    .post-content {
      flex: 1 1 50%;
      background: rgba(25,25,25,0.85);
      padding: 35px;
      border-radius: 15px;
      box-shadow: 0 0 25px rgba(0,0,0,0.5);
    }

    .post-content h2 {
      color: #00bcd4;
      margin-bottom: 10px;
      font-size: 1.8rem;
    }

    .post-meta {
      font-size: 0.9rem;
      color: #bbb;
      margin-bottom: 15px;
    }

    .post-content p { color: #e0e0e0; line-height: 1.7; }

    /* Case study links */
    .case-study {
      margin-top: 20px;
      background: rgba(0,0,0,0.6);
      padding: 20px;
      border-radius: 10px;
      border-left: 4px solid #00bcd4;
      transition: all 0.3s ease;
      cursor: pointer; /* Change to pointer */
    }

    .case-study a {
      color: #00bcd4;
      text-decoration: none;
      display: block;
    }

    .case-study:hover {
      background: rgba(0,188,212,0.1);
      transform: translateY(-4px);
    }

    /* === FULL PAGE READER OVERLAY === */
    #readerOverlay {
      position: fixed;
      inset: 0;
      background: #0f0f0f;
      z-index: 1000;
      display: none; /* Hidden by default */
      overflow-y: auto;
      padding: 0;
      animation: fadeIn 0.4s ease-out;
    }

    .reader-content {
      max-width: 800px;
      margin: 0 auto;
      padding: 100px 20px;
    }

    .reader-image {
      width: 100%;
      height: 400px;
      object-fit: cover;
      border-radius: 20px;
      margin-bottom: 30px;
      box-shadow: 0 20px 40px rgba(0,0,0,0.5);
    }

    .reader-close {
      position: fixed;
      top: 30px;
      right: 30px;
      background: #00bcd4;
      color: #000;
      width: 50px;
      height: 50px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      font-size: 1.5rem;
      z-index: 1001;
      transition: transform 0.3s;
    }

    .reader-close:hover { transform: rotate(90deg); }

    .reader-content h1 {
      font-size: 3rem;
      color: #00bcd4;
      margin-bottom: 20px;
    }

    .reader-content p {
      font-size: 1.15rem;
      line-height: 1.8;
      color: #ddd;
      white-space: pre-wrap; /* Preserves paragraph spacing from DB */
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: scale(1.05); }
      to { opacity: 1; transform: scale(1); }
    }

    /* ... Keep existing footer/subscribe styles ... */
    .subscribe-box { position: fixed; bottom: -400px; right: 40px; width: 340px; background: rgba(20,20,20,0.95); border-radius: 15px; box-shadow: 0 0 25px rgba(0,0,0,0.6); padding: 25px; z-index: 200; text-align: center; transition: bottom 0.8s ease; }
    .subscribe-box.visible { bottom: 40px; }
    .subscribe-box h3 { color: #00bcd4; font-size: 1.4rem; margin-bottom: 10px; }
    .subscribe-box p { color: #ccc; font-size: 0.95rem; margin-bottom: 15px; }
    .subscribe-box input { width: 100%; padding: 12px; border: none; border-radius: 8px; background: #1f1f1f; color: #fff; font-size: 1rem; margin-bottom: 12px; outline: none; }
    .subscribe-box button { width: 100%; padding: 12px; border: none; border-radius: 8px; background: #00bcd4; color: #fff; font-weight: 600; cursor: pointer; transition: background 0.3s ease; }
    .subscribe-box button:hover { background: #0097a7; }
    .close-subscribe { position: absolute; top: 10px; right: 14px; font-size: 1.2rem; color: #888; cursor: pointer; transition: color 0.3s ease; }
    .close-subscribe:hover { color: #fff; }
    footer { text-align: center; padding: 40px; background: rgba(0,0,0,0.85); color: #aaa; margin-top: 80px; font-size: 0.9rem; }
  
/* --- Background Animation Fix --- */
.hero {
  animation: zoomHero 18s ease-in-out infinite alternate;
  overflow: hidden;
}

@keyframes zoomHero {
  from { transform: scale(1); }
  to { transform: scale(1.1); }
}

/* --- Reader Overlay Styles --- */
#readerOverlay {
  position: fixed;
  inset: 0;
  background: #0f0f0f;
  z-index: 1000;
  display: none;
  overflow-y: auto;
  padding: 0;
  animation: fadeIn 0.4s ease-out;
}

.reader-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 100px 20px;
}

.reader-image {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 20px;
  margin-bottom: 30px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

.reader-close {
  position: fixed;
  top: 30px;
  right: 30px;
  background: #00bcd4;
  color: #000;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.5rem;
  z-index: 1001;
  transition: transform 0.3s;
}

.reader-close:hover { 
  transform: rotate(90deg); 
}

.reader-content h1 {
  font-size: 3rem;
  color: #00bcd4;
  margin-bottom: 20px;
}

.reader-content p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #ddd;
  white-space: pre-wrap;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(1.05); }
  to { opacity: 1; transform: scale(1); }
}




  

/* =========================================================
   KIOTA PROJECTS / REGISTRATION PAGE
   RESPONSIVE LAYOUT
   Phones, tablets and landscape mobile devices
   ========================================================= */

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

/* ---------- Tablets ---------- */
@media (max-width: 1024px) {
  nav {
    padding: 12px 2%;
    gap: 4px;
  }

  nav a {
    font-size: 0.88rem;
    gap: 5px;
  }

  .icon {
    font-size: 1rem;
  }

  .hero {
    height: 43vh;
    margin-top: 55px;
  }

  .hero-content h1 {
    font-size: clamp(2.2rem, 5vw, 3rem);
  }

  .hero-content p {
    width: 90%;
    margin: 10px auto 0;
    font-size: 1.05rem;
  }

  .register-container {
    padding: 45px 6%;
    gap: 55px;
  }

  .role-section {
    gap: 25px;
  }

  .role-text {
    flex: 1 1 52%;
    padding: 28px;
  }

  .role-text h2 {
    font-size: 1.65rem;
  }

  .role-text p {
    font-size: 0.95rem;
  }

  .role-image {
    flex: 1 1 43%;
  }

  .role-image img {
    height: 270px;
  }

  .comments-section,
  .help-section {
    padding: 32px;
  }
}

/* ---------- Tablets / large phones ---------- */
@media (max-width: 768px) {
  html,
  body {
    min-height: 100%;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
  }

  nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 9px 5px;
    gap: 2px;
    justify-content: space-around;
  }

  nav a {
    flex: 1 1 auto;
    justify-content: center;
    gap: 4px;
    font-size: 0.68rem;
    white-space: nowrap;
  }

  .icon {
    font-size: 0.75rem;
  }

  .hero {
    height: 36vh;
    min-height: 245px;
    margin-top: 47px;
  }

  .hero-content {
    width: 90%;
    padding: 0 10px;
  }

  .hero-content h1 {
    font-size: clamp(1.9rem, 8vw, 2.7rem);
  }

  .hero-content p {
    font-size: clamp(0.84rem, 3.3vw, 1rem);
    line-height: 1.5;
  }

  .register-container {
    padding: 30px 6% 45px;
    gap: 35px;
  }

  /*
    Desktop alternates text/image.
    Mobile stacks them so every section remains readable.
  */
  .role-section,
  .role-section:nth-child(even) {
    flex-direction: column !important;
    align-items: stretch;
    gap: 16px;
  }

  .role-text {
    width: 100%;
    flex: none;
    padding: 22px 20px;
    border-radius: 12px;
  }

  .role-text h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
  }

  .role-text p {
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 16px;
  }

  .role-text button {
    padding: 11px 20px;
    font-size: 0.9rem;
  }

  .role-image {
    width: 100%;
    flex: none;
  }

  .role-image img {
    width: 100%;
    height: 235px;
    border-radius: 12px;
  }

  .comments-section,
  .help-section {
    padding: 25px 20px;
    border-radius: 12px;
  }

  .comments-section h2,
  .help-section h2 {
    font-size: 1.4rem;
  }

  textarea {
    width: 100%;
    max-width: 100%;
    height: 115px;
    font-size: 0.92rem;
  }

  .comment-btn,
  .help-section button {
    padding: 11px 25px;
    font-size: 0.9rem;
  }

  footer {
    padding: 22px 15px;
    font-size: 0.78rem;
  }

  /* Fixed background images can be awkward on mobile Safari/Chrome */
  .slide {
    background-attachment: scroll;
    background-position: center center;
  }
}

/* ---------- Phones ---------- */
@media (max-width: 480px) {
  nav {
    padding: 8px 2px;
  }

  nav a {
    font-size: 0.54rem;
    gap: 3px;
  }

  .icon {
    font-size: 0.65rem;
  }

  .hero {
    height: 32vh;
    min-height: 215px;
    margin-top: 42px;
  }

  .hero-content h1 {
    font-size: clamp(1.65rem, 9vw, 2.2rem);
  }

  .hero-content p {
    font-size: 0.78rem;
    line-height: 1.45;
  }

  .register-container {
    padding: 24px 5% 38px;
    gap: 28px;
  }

  .role-section {
    gap: 13px;
  }

  .role-text {
    padding: 18px 15px;
  }

  .role-text h2 {
    font-size: 1.2rem;
  }

  .role-text p {
    font-size: 0.82rem;
    line-height: 1.58;
  }

  .role-text button {
    width: 100%;
    padding: 10px 15px;
    font-size: 0.82rem;
  }

  .role-image img {
    height: 195px;
    border-radius: 10px;
  }

  .comments-section,
  .help-section {
    padding: 20px 15px;
  }

  .comments-section h2,
  .help-section h2 {
    font-size: 1.2rem;
  }

  .help-section p {
    font-size: 0.82rem;
    line-height: 1.55;
  }

  textarea {
    height: 105px;
    padding: 12px;
    font-size: 0.84rem;
  }

  .comment-btn,
  .help-section button {
    width: 100%;
    padding: 10px 18px;
    font-size: 0.82rem;
  }

  footer {
    padding: 18px 10px;
    font-size: 0.68rem;
  }
}

/* ---------- Very small phones ---------- */
@media (max-width: 360px) {
  nav {
    padding: 7px 1px;
  }

  nav a {
    font-size: 0.48rem;
    gap: 2px;
  }

  .icon {
    font-size: 0.58rem;
  }

  .hero {
    min-height: 200px;
  }

  .hero-content h1 {
    font-size: 1.55rem;
  }

  .hero-content p {
    font-size: 0.72rem;
  }

  .register-container {
    padding-left: 4%;
    padding-right: 4%;
  }

  .role-text {
    padding: 16px 13px;
  }

  .role-text h2 {
    font-size: 1.1rem;
  }

  .role-text p {
    font-size: 0.76rem;
  }

  .role-image img {
    height: 175px;
  }
}

/* ---------- Landscape phones ---------- */
@media (max-height: 600px) and (max-width: 900px) {
  html,
  body {
    overflow-y: auto;
  }

  nav {
    padding: 6px 4px;
  }

  nav a {
    font-size: 0.61rem;
  }

  .hero {
    height: 50vh;
    min-height: 205px;
    margin-top: 38px;
  }

  .hero-content h1 {
    font-size: clamp(1.65rem, 6vw, 2.25rem);
  }

  .hero-content p {
    font-size: 0.78rem;
  }

  .register-container {
    gap: 25px;
  }

  .role-text {
    padding: 18px;
  }

  .role-image img {
    height: 180px;
  }
}

/* ---------- Touch devices ---------- */
@media (hover: none) and (pointer: coarse) {
  nav a:hover {
    color: #f5f5f5;
    transform: none;
  }

  .role-text:hover {
    transform: none;
    box-shadow: 0 0 25px rgba(0,0,0,0.6);
  }

  .role-image img:hover {
    transform: none;
  }
}

