body {
      font-family: 'Segoe UI', sans-serif;
      background: #f1f4f9;
      margin: 0px;
      display: flex;
      flex-direction: column;
      align-items: center;
    }



    * {
  box-sizing: border-box;
}
    /*HERO*/

    .hero-section {
      width: 100%;
      height: 360px;
      background-image: url('./images/self-study-detail-page-bg.jpg'); /* replace with your image */
      background-size: cover;
      background-position: center;
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);

    }

    .hero-overlay {
      background: linear-gradient(to right, rgba(0, 48, 124, 0.6), rgba(128, 0, 128, 0.6));
      width: 100%;
      height: 100%;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 0 20px;
    }

    .hero-content {
      max-width: 700px;
      color: white;
      text-align: center; /* <-- center the text */
    }



    .hero-title {
      font-size: 44px;
      font-weight: bold;
      margin-top: -20px;
      text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    }

    .hero-desc {
      font-size: 20px;
      line-height: 1.5;
      max-width: 700px;
    }

    .hero-meta {
      display: flex;
      justify-content: space-between;
      margin-top: 10px;
      font-size: 16px;
      color: #f0f0f0;
      opacity: 0.9;
      padding: 0 10px;
    }

      
    h1 {
      color: #00307c;
      padding-bottom: 10px;
      margin-bottom: 30px;
    }
    h2 {
      color: #00307c;
      margin-top: 40px;
      font-size: 1.4rem;
    }
     h3 {
      color: #00307c;
      margin-top: 40px;
      font-size: 1.4rem;
    }
    p {
      margin: 12px 0;
    }
    a {
      color: #00307c;
      text-decoration: none;
    }

    .study-section {
      max-width: 80%;
      margin: 20px auto;
      padding: 0 20px;
      text-align: center;
    }

    .study-intro {
      font-size: 16px;
      margin-bottom: 50px;
      margin-top: 30px;
      color: #333;
      text-align: justify;
    }

    .study-intro a:hover{
      color: #f05454;
    }

    .study-card-1 {
      display: flex;
      flex-wrap: wrap;
      gap: 30px;
      padding: 30px;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 40px;
      /* background image settings */
      background-image: url('./images/self-study2.jpg');
      background-size: cover;
      background-position: center;
      border-radius: 12px;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
      color: white; /* Optional: makes text visible */
      position: relative;
    }

    .study-card-2 {
      display: flex;
      flex-wrap: wrap;
      gap: 30px;
      padding: 30px;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 40px;
      /* background image settings */
      background-image: url('./images/self-study3.jpg');
      background-size: cover;
      background-position: center;
      border-radius: 12px;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
      color: white; /* Optional: makes text visible */
      position: relative;
    }

    .study-card-3 {
      display: flex;
      flex-wrap: wrap;
      gap: 30px;
      padding: 30px;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 40px;
      /* background image settings */
      background-image: url('./images/self-study4.jpg');
      background-size: cover;
      background-position: center;
      border-radius: 12px;
      box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
      color: white; /* Optional: makes text visible */
      position: relative;
    }

    /* Optional: semi-transparent overlay to make text readable */
    .study-card-1::before {
      content: "";
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      background: linear-gradient(to right, rgba(60, 78, 24, 0.6), rgba(128, 0, 128, 0.6));
      border-radius: 12px;
      z-index: 1;
    }

    .study-card-2::before {
      content: "";
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      background: linear-gradient(to right, rgba(123, 48, 124, 0.6), rgba(128, 0, 128, 0.6));
      border-radius: 12px;
      z-index: 1;
    }

    .study-card-3::before {
      content: "";
      position: absolute;
      top: 0; left: 0; right: 0; bottom: 0;
      background: linear-gradient(to right, rgba(45, 48, 194, 0.6), rgba(128, 0, 128, 0.6));
      border-radius: 12px;
      z-index: 1;
    }

    .card-content {
      flex: 1;
      position: relative;
      z-index: 2; /* ensures text is above overlay */
    }

    .card-title {
      font-size: 20px;
      margin-top: 5px;
      margin-bottom: 30px;
      color: #ffffff;
    }


    .download-buttons {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 15px;
    }

    .download-box {
      background-color: #00307c;
      color: white;
      padding: 12px;
      border-radius: 8px;
      text-decoration: none;
      transition: background-color 0.1s ease;
      font-weight: 500;
      display: block;
    }

    .download-box:hover {
      background-color: white;
      color: #00307c;
    }

    .square-button-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 20px;
      justify-items: center;
    }

  
    .square-item a {
      text-decoration: none;
      color: inherit;
      text-align: center; 
      display: flex;
      flex-direction: column;
      align-items: center; 
    }

    .square-box {
      width: 220px;
      height: 220px;
      background-size: cover;
      background-position: center;
      border-radius: 12px;
      transition: 0.1s;
    }


    .square-item a:hover .square-box {
      background-color: #00307c;
      opacity: 0.8;
    }

    .square-title {
      margin-top: 10px;
      font-weight: 500;
      color: white;
      display: block;
      max-width: 200px;
      text-align: center;

    }

    .square-item a:hover .square-title {
      color: #ccc;
    }

    .back-to-korean-course {
      margin-top: 60px;
      text-align: center;
    }

    .back-to-korean-course a {
      display: inline-block;
      background-color: #00307c;
      color: white;
      padding: 12px 24px;
      border-radius: 30px;
      font-size: 16px;
      text-decoration: none;
      font-weight: 500;
      transition: background-color 0.2s ease;
    }

    .back-to-korean-course a:hover {
      background-color: #f05454;
    }


   

    @media (max-width: 768px) {
      .study-section {
        padding: 0 0px;
      }

      .study-card-1,
      .study-card-2,
      .study-card-3 {
        flex-direction: column;
        align-items: stretch;
        padding: 10px 5px;
        max-width: 100%;
      }

      .hero-overlay {
        padding: 0 20px;
        text-align: center;
      }

      .hero-content {
        text-align: center;
      }

      .hero-title {
        font-size: 36px;
      }

      .hero-desc {
        font-size: 16px;
      }

      .hero-meta {
        flex-direction: column;
        align-items: center;
        gap: 4px;
        font-size: 14px;
      }

      .study-card {
        flex-direction: column;
        text-align: center;
      }

      .card-image {
        display: none;
      }

      .download-buttons {
        grid-template-columns: repeat(2, 1fr);
      }

      .square-box {
        width: 120px;
        height: 120px;
      }
    }

