/* The close button must be rendered inside .modal-content in your HTML/JS for correct positioning */


*{
  margin: 0;
  padding:0;
  box-sizing: border-box;
}

@media (max-width: 800px) {
  .modal-content .close {
    top: 0.5rem;
    right: 0.5rem;
    left: auto;
    font-size: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
  }
}
/* ...existing code... */

body {
      margin: 0;
      font-family: 'Space Grotesk', sans-serif;
      background: linear-gradient(to bottom, #0b0c2a, #1b1e3d);
      color: #fff;
    }


/* Modal Styles */
/* Hero Section */
.hero {
  width: 100%;
  margin: 0 auto;
  padding: 2rem 0 0 0;
}
.hero-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}
.hero-content {
  text-align: left;
  max-width: 600px;
  margin: 0 auto;
  
}

.hero-content h2 {
  font-size: 1.5rem;
  line-height: 1.4;
  margin-bottom: 0 auto;
  padding: 0 1rem;
  color: #fff;
  word-break: break-all;
}

.hero-image-full {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}
.hero-full-img {
  width: 100%;
  height: auto;
  max-width: 500px;
}

@media (min-width: 768px) {
  .hero-grid {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 3rem;
  }
  .hero-content {
    max-width: 600px;
    margin: 0;
    flex: 1 1 0;
  }
  .hero-image-full {
    max-width: 500px;
    margin: 0;
    flex: 1 1 0;
  }
}
@media (max-width: 767px) {
  .hero-grid {
    flex-direction: column;
    gap: 2rem;
  }
  .hero-content, .hero-image-full {
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
  }
  
}

#modalText {
  color: #000;
  flex: 1;
  overflow-y: auto;
  padding-right: 1rem;
}

#modalText p, #modalText ul, #modalText ol, #modalText div, #modalText section {
  margin-bottom: 10px;
}

#modalText ul {
  list-style: none;
  padding-left: 0;
}
#modalText::-webkit-scrollbar {
  width: 8px;
}

#modalText::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
}

#modalText::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.3);
  border-radius: 4px;
}

#modalText::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,0.5);
}

#modalText p, #modalText ul, #modalText ol, #modalText div, #modalText section {
  margin-bottom: 10px;
}


.modal-content {
  position: relative;
}


.modal-content {
  position: relative;
}

.modal-content .close {
  position: absolute;
  top: 1rem;
  right: 0.5rem;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10;
  background: rgba(0,0,0,0.7);
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}


@media (max-width: 768px) {
  .modal-content .close {
    top: 0.5rem;
    right: 0.5rem;
    font-size: 1.5rem;
    width: 2.5rem;
    height: 2.5rem;
  }
}




 

/* Banner Header Responsive Styles */
.banner-header {
  width: 100%;
  padding: 2rem 1rem;
  text-align: center;
  background: #300804 radial-gradient(circle at top, #300804, #2b0704);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.kosmos-logo {
  max-width: 480px;
  width: 100%;
  height: auto;
}

@media (max-width: 768px) {
  .banner-header {
    padding: 1.25rem 0.5rem;
  }
  .kosmos-logo {
    max-width: 320px;
  }
}

@media (max-width: 450px) {
  .banner-header {
    padding: 0.75rem 0.25rem;
  }

  .kosmos-logo {
    max-width: 250px;
    max-width: 90vw;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
  }
}

/* Very small screens */
        @media (max-width: 320px) { 
          .kosmos-logo {
          max-width: 200px;
          max-width: 90vw;
          height: auto;
          object-fit: contain;
          display: block;
          margin: 0 auto;
  }
        }

@media (max-width: 1024px) and (min-width: 800px) {
   .modal-content .close {
  position: absolute;
  top: 1rem;
  right: 0.5rem;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  z-index: 10;
  background: rgba(0,0,0,0.7);
  border-radius: 50%;
  width: 3rem;
  height: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s;
}
}



  /* .banner-header {
    padding: 0.75rem 0.25rem;
  } */

/* Banner header logo responsiveness */
@media (max-width: 600px) {
  .banner-header {
    padding: 10px 0;
    text-align: center;
  }
  .kosmos-logo {
    width: 180px;
    height: auto;
    max-width: 95vw;
    object-fit: contain;
    display: block;
    margin: 0 auto;
  }
  .hero-content h2 {
    font-size: 1em;
    line-height: 1.3;
    word-break: break-word;
    padding: 0 8px;
  }
  .hero-grid {
    flex-direction: column;
    gap: 16px;
  }
  .hero-image-full {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
  }
  .hero-full-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 8px;
  }
  /* .cta-buttons {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  } */
}
/* End mobile responsiveness */

    /* nav {
      display: flex;
      justify-content: center;
      gap: 2rem;
      background-color: rgba(255, 255, 255, 0.05);
      padding: 1rem;
      backdrop-filter: blur(10px);
      position: sticky;
      top: 0;
      z-index: 1000;
    }

    nav a {
      color: #c9d1ff;
      text-decoration: none;
      font-weight: 600;
    } */

    section.hero {
      padding: 4rem 2rem;
      text-align: center;
    }

    .hero h2 {
      font-size: 2rem;
      max-width: 700px;
      margin: 0 auto 1rem;
    }

@media  (max-width: 480px) {
  .hero h2 {
    font-size: 1rem;
    margin: 0 auto 1rem;
    padding: 0 0.5rem;
    word-break: break-word;
  }
}

/* Very small screens */
        @media (max-width: 375px) {
        .hero-content h2 {
    font-size: 1em;
    line-height: 1.3;
    word-break: break-word;
    
     width:60rem;
  }
        }
    /* .hero .cta-buttons {
      margin-top: 2rem;
    }

    .hero .cta-buttons button {
      background: #3345ff;
      color: white;
      border: none;
      padding: 1rem 2rem;
      margin: 0 1rem;
      border-radius: 30px;
      cursor: pointer;
      transition: background 0.3s;
    } */

    /* .hero .cta-buttons button:hover {
      background: #1a28b7;
    } */

    .chapter-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
      gap: 1.5rem;
      padding: 2rem;
    }

    .chapter-card {
      background-color: rgba(255, 255, 255, 0.05);
      border-radius: 12px;
      padding: 1.5rem;
      transition: transform 0.3s, box-shadow 0.3s;
      cursor: pointer;
    }

    .chapter-card:hover {
      transform: translateY(-5px);
      box-shadow: 0 10px 20px rgba(255, 255, 255, 0.1);
    }

    footer {
      padding: 2rem;
      text-align: center;
      font-size: 0.9rem;
      color: #aaa;
      background-color: #0b0c2a;
    }
  
/* Responsive adjustments for 1200px width */
@media (min-width: 1200px) {
  body {
    max-width: 1200px;
    margin: 0 auto;
    background-position: center top;
  }
  header {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 0;
    padding-right: 0;
  }
}

/* Modal centering for all screens */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  margin: 0;
  box-sizing: border-box;
  background: rgba(15, 18, 40, 0.75); /* semi-transparent dark overlay */
  backdrop-filter: blur(2px);
}
.modal-content {
  margin: auto;
  position: relative;
  width: 100%;
  max-width: 600px;
  min-height: 0;
  height: auto;
  max-height: 100vh;
  box-sizing: border-box;
  padding: 2rem;
  border-radius: 32px;
  overflow-y: auto;
}

@media (max-width: 768px) {
  .modal-content {
    padding: 1rem;
    border-radius: 18px;
  }
}

@media (max-width: 768px) {
  .modal-content {
    padding: 1rem;
  }
}


/* Base Mobile Styles (Default - applies to all screens) */
section.hero {
  padding: 2rem 1rem;
  text-align: center;
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.hero h2 {
  font-size: 1.25rem;
  max-width: 100%;
  margin: 0 auto 1.5rem;
  line-height: 1.4;
  padding: 0 0.5rem;
}

.hero .cta-buttons {
  margin-top: 2rem;
  display: flex;
  flex-direction: row;
  gap: 0.75rem;
  width: 100%;
  max-width: 100%;
  justify-content: center;
  flex-wrap: wrap;
}

/* .hero .cta-buttons button {
  background: #3345ff;
  color: white;
  border: none;
  padding: 0.875rem 1.25rem;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 0.85rem;
  font-weight: 600;
  flex: 1;
  min-width: 140px;
  max-width: 180px;
  box-shadow: 0 4px 12px rgba(51, 69, 255, 0.3);
}

.hero .cta-buttons button:hover {
  background: #1a28b7;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(51, 69, 255, 0.4);
}

.hero .cta-buttons button:active {
  transform: translateY(0);
} */

/* Mobile Specific Styles (up to 480px) */
@media (max-width: 480px) {
  section.hero {
    padding: 1.5rem 1rem;
    min-height: 50vh;
  }

  .hero h2 {
    font-size: 1.1rem;
    line-height: 1.3;
    margin: 0 auto 1.25rem;
    padding: 0 0.25rem;
  }

  /* .hero .cta-buttons {
    margin-top: 1.5rem;
    gap: 0.5rem;
    max-width: 100%;
  }

  .hero .cta-buttons button {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    min-width: 120px;
    max-width: 150px;
    border-radius: 25px;
  } */
}

/* Small Mobile Styles (up to 320px) */
@media (max-width: 320px) {
  .hero .cta-buttons {
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
  }

  .hero .cta-buttons button {
    width: 100%;
    max-width: 200px;
    min-width: auto;
  }
}

/* Large Mobile/Phablet Styles (481px to 767px) */
@media (min-width: 481px) and (max-width: 767px) {
  section.hero {
    padding: 2.5rem 1.5rem;
    min-height: 65vh;
  }

  .hero h2 {
    font-size: 1.4rem;
    margin: 0 auto 1.75rem;
  }

  .hero .cta-buttons {
    gap: 1rem;
    margin-top: 2.25rem;
  }

  .hero .cta-buttons button {
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    min-width: 160px;
    max-width: 200px;
  }
}

@media (max-width: 480px) {
  .banner-header {
    padding: 0.75rem 0.25rem;
  }
  .kosmos-logo {
    width: 200px;
    max-width: 90vw;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
  }
  .hero-content h2 {
    font-size: 1.25rem;
    line-height: 1.5;
    font-weight: 700;
    padding: 0 0.5rem;
    margin-bottom: 1.25rem;
  }
}


.footer_line{
  font-family: roboto, sans-serif;
  font-weight: 400;
  font-size: 1em;
  color: #fff;
}