/* =========================================================
   HOUSE OF CODE — COURSES PAGE
   Modern / Light / Professional
========================================================= */

/* =========================
   RESET
========================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: #f7f9fc;
  color: #172033;
  font-family: "Inter", sans-serif;
  line-height: 1.6;
}

/* IMPORTANT:
   Remove default underlines everywhere on this page.
*/
a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}


/* =========================================================
   NAVBAR
========================================================= */

.courses-header {
  position: sticky;
  top: 0;
  z-index: 1000;

  width: 100%;

  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid #e8edf3;

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.courses-nav-container {
  width: min(1200px, calc(100% - 40px));
  min-height: 76px;

  margin: 0 auto;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 30px;
}


/* Logo */

.courses-logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;

  flex-shrink: 0;

  color: #172033;
  text-decoration: none;

  font-family: "Space Grotesk", sans-serif;
  font-size: 17px;
  font-weight: 700;

  transition: opacity 0.2s ease;
}

.courses-logo:hover {
  opacity: 0.8;
}

.courses-logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}


/* Navigation */

.courses-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 27px;

  margin-left: auto;
}

.courses-nav a {
  position: relative;

  display: inline-flex;
  align-items: center;

  color: #5b687a;

  font-size: 14px;
  font-weight: 500;

  text-decoration: none;

  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.courses-nav a:hover {
  color: #172033;
  transform: translateY(-1px);
}

/* Active nav item */

.courses-nav a.active {
  color: #172033;
  font-weight: 700;
}

/* Small active indicator */

.courses-nav a.active::after {
  content: "";

  position: absolute;
  left: 0;
  right: 0;
  bottom: -9px;

  height: 2px;

  background: #2563eb;
  border-radius: 10px;
}


/* Get Started */

.courses-contact-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0;

  padding: 11px 18px;

  border: 1px solid #15803d;
  border-radius: 10px;

  background: #16a34a;
  color: #ffffff;

  font-size: 13px;
  font-weight: 700;

  text-decoration: none;

  box-shadow: 0 5px 16px rgba(22, 163, 74, 0.14);

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.courses-contact-btn:hover {
  background: #15803d;

  transform: translateY(-2px);

  box-shadow:
    0 10px 22px rgba(22, 163, 74, 0.22);
}


/* =========================================================
   HERO
========================================================= */

.courses-hero {
  position: relative;

  padding: 105px 20px 110px;

  background:
    radial-gradient(
      circle at 10% 20%,
      rgba(37, 99, 235, 0.10),
      transparent 32%
    ),
    radial-gradient(
      circle at 90% 75%,
      rgba(37, 99, 235, 0.07),
      transparent 30%
    ),
    #ffffff;

  overflow: hidden;
}

.courses-hero::before {
  content: "";

  position: absolute;
  top: -120px;
  right: -100px;

  width: 300px;
  height: 300px;

  border: 1px solid rgba(37, 99, 235, 0.08);
  border-radius: 50%;
}

.courses-hero-content {
  position: relative;
  z-index: 2;

  width: min(850px, 100%);
  margin: 0 auto;

  text-align: center;
}


/* Badge */

.courses-badge,
.section-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 7px 13px;

  border: 1px solid #dfe6ef;
  border-radius: 999px;

  background: #ffffff;

  color: #64748b;

  font-size: 10px;
  font-weight: 800;

  letter-spacing: 1.5px;
  text-transform: uppercase;
}


/* Hero title */

.courses-hero h1 {
  max-width: 900px;

  margin: 24px auto 20px;

  color: #172033;

  font-family: "Space Grotesk", sans-serif;
  font-size: clamp(44px, 7vw, 78px);

  line-height: 1.02;
  letter-spacing: -2.5px;
}

.courses-hero h1 span {
  display: block;

  color: #2563eb;
}


/* Hero description */

.courses-hero p {
  max-width: 700px;

  margin: 0 auto;

  color: #64748b;

  font-size: 17px;
  line-height: 1.8;
}


/* Hero buttons */

.courses-hero-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;

  gap: 14px;

  margin-top: 34px;
}


.primary-course-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 48px;
  padding: 13px 21px;

  border: 1px solid #15803d;
  border-radius: 10px;

  background: #16a34a;
  color: #ffffff;

  font-size: 14px;
  font-weight: 700;

  text-decoration: none;

  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.18);

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.primary-course-btn:hover {
  background: #15803d;
  transform: translateY(-2px);

  box-shadow:
    0 12px 26px rgba(22, 163, 74, 0.25);
}


/* Secondary button */

.secondary-course-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-height: 48px;

  padding: 13px 21px;

  border: 1px solid #d8e0ea;
  border-radius: 10px;

  background: #ffffff;
  color: #172033;

  font-size: 14px;
  font-weight: 700;

  text-decoration: none;

  transition:
    border-color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.secondary-course-btn:hover {
  border-color: #b8c5d6;

  transform: translateY(-2px);

  box-shadow: 0 10px 25px rgba(24, 39, 75, 0.07);
}


/* =========================================================
   INSTRUCTOR
========================================================= */

.instructor-section {
  padding: 95px 20px;

  background: #f1f5f9;
}

.instructor-container {
  width: min(1080px, 100%);

  margin: 0 auto;

  display: grid;

  grid-template-columns: 320px minmax(0, 1fr);

  gap: 65px;

  align-items: center;
}


/* Instructor photo */

.instructor-photo {
  width: 320px;
  max-width: 100%;

  margin: 0 auto;

  padding: 8px;

  background: #ffffff;

  border: 1px solid #e1e8f0;

  border-radius: 24px;

  box-shadow:
    0 18px 45px rgba(24, 39, 75, 0.12);
}

.instructor-photo img {
  width: 100%;
  height: 360px;

  object-fit: cover;
  object-position: center top;

  border-radius: 18px;
}


/* Instructor content */

.instructor-content {
  min-width: 0;
}

.instructor-content h2 {
  margin: 18px 0 8px;

  color: #172033;

  font-family: "Space Grotesk", sans-serif;

  font-size: clamp(38px, 5vw, 58px);

  line-height: 1.06;

  letter-spacing: -1.8px;
}

.instructor-content h2 span {
  color: #2563eb;
}

.instructor-content h3 {
  margin: 0 0 22px;

  color: #536174;

  font-size: 17px;
  font-weight: 600;
}

.instructor-content p {
  max-width: 720px;

  margin: 0 0 17px;

  color: #68778b;

  font-size: 15px;
  line-height: 1.85;
}


/* Instructor stats */

.instructor-stats {
  display: grid;

  grid-template-columns: repeat(3, minmax(0, 1fr));

  gap: 12px;

  margin: 28px 0;
}

.instructor-stats div {
  min-width: 0;

  padding: 17px 15px;

  background: #ffffff;

  border: 1px solid #e0e7ef;
  border-radius: 14px;
}

.instructor-stats strong {
  display: block;

  margin-bottom: 2px;

  color: #172033;

  font-family: "Space Grotesk", sans-serif;

  font-size: 23px;
  line-height: 1.2;
}

.instructor-stats span {
  color: #7a8798;

  font-size: 12px;
  font-weight: 500;
}


.udemy-profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  min-height: 46px;

  padding: 12px 19px;

  border: 1px solid #15803d;
  border-radius: 10px;

  background: #16a34a;
  color: #ffffff;

  font-size: 13px;
  font-weight: 700;

  text-decoration: none;

  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.16);

  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.udemy-profile-btn:hover {
  background: #15803d;

  transform: translateY(-2px);

  box-shadow:
    0 11px 24px rgba(22, 163, 74, 0.23);
}

/* =========================================================
   COURSES SECTION
========================================================= */

.courses-section {
  width: min(1200px, calc(100% - 40px));

  margin: 0 auto;

  padding: 105px 0;
}

.courses-section-header {
  width: min(720px, 100%);

  margin: 0 auto;

  text-align: center;
}

.courses-section-header h2 {
  margin: 18px 0 12px;

  color: #172033;

  font-family: "Space Grotesk", sans-serif;

  font-size: clamp(36px, 5vw, 56px);

  line-height: 1.1;
  letter-spacing: -1.7px;
}

.courses-section-header p {
  margin: 0;

  color: #68778b;

  font-size: 15px;
  line-height: 1.8;
}


/* Course grid */

.courses-grid {
  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 28px;

  margin-top: 55px;
}


/* Course card */

.course-card {
  display: flex;
  flex-direction: column;

  overflow: hidden;

  min-width: 0;

  background: #ffffff;

  border: 1px solid #e2e8f0;

  border-radius: 18px;

  box-shadow:
    0 8px 28px rgba(24, 39, 75, 0.055);

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

.course-card:hover {
  transform: translateY(-6px);

  border-color: #ced9e6;

  box-shadow:
    0 18px 42px rgba(24, 39, 75, 0.105);
}


/* Course image */

.course-image {
  position: relative;

  width: 100%;

  aspect-ratio: 16 / 9;

  overflow: hidden;

  background: #e9eef5;
}

.course-image img {
  width: 100%;
  height: 100%;

  object-fit: cover;

  transition: transform 0.45s ease;
}

.course-card:hover .course-image img {
  transform: scale(1.035);
}


/* NEW badge */

.new-course-badge {
  position: absolute;

  top: 15px;
  right: 15px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  padding: 7px 10px;

  border-radius: 7px;

  background: #2563eb;
  color: #ffffff;

  font-size: 10px;
  font-weight: 800;

  letter-spacing: 1px;

  box-shadow:
    0 7px 20px rgba(37, 99, 235, 0.25);
}


/* Course body */

.course-content {
  display: flex;
  flex-direction: column;
  flex: 1;

  padding: 27px;
}


/* Category */

.course-category {
  display: inline-block;

  margin-bottom: 8px;

  color: #2563eb;

  font-size: 10px;
  font-weight: 800;

  letter-spacing: 1.25px;
  text-transform: uppercase;
}


/* Course heading */

.course-content h3 {
  margin: 0 0 12px;

  color: #172033;

  font-family: "Space Grotesk", sans-serif;

  font-size: 24px;

  line-height: 1.25;

  letter-spacing: -0.4px;
}


/* Description */

.course-content p {
  margin: 0;

  color: #68778b;

  font-size: 14px;

  line-height: 1.75;
}


/* Course information */

.course-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;

  gap: 9px 16px;

  margin-top: auto;
  padding-top: 22px;
  padding-bottom: 22px;

  color: #758296;

  font-size: 12px;
  font-weight: 500;
}

.course-info span {
  display: inline-flex;
  align-items: center;

  white-space: nowrap;
}


/* Course button */

.course-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;

  width: 100%;
  min-height: 46px;
  padding: 12px 18px;

  border: 1px solid #0EA5E9;
  border-radius: 10px;

  background: #0EA5E9;
  color: #ffffff;

  font-size: 13px;
  font-weight: 700;
  text-decoration: none;

  box-shadow: 0 6px 18px rgba(14, 165, 233, 0.18);

  transition:
    transform 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

.course-button:hover {
  background: #0284C7;
  border-color: #0284C7;

  transform: translateY(-2px);

  box-shadow: 0 10px 24px rgba(14, 165, 233, 0.28);
}

/* Featured course */

.featured-course {
  border-color: #aac4f7;

  box-shadow:
    0 10px 32px rgba(37, 99, 235, 0.08);
}

.featured-course:hover {
  border-color: #8eaff0;
}


/* =========================================================
   FINAL CTA
========================================================= */

.courses-final-cta {
  padding: 105px 20px;

  text-align: center;

  background:
    radial-gradient(
      circle at 50% 0%,
      rgba(37, 99, 235, 0.22),
      transparent 38%
    ),
    #172033;

  color: #ffffff;
}

.courses-final-cta .section-label {
  border-color: rgba(255, 255, 255, 0.16);

  background: rgba(255, 255, 255, 0.05);

  color: #d9e3f0;
}

.courses-final-cta h2 {
  width: min(700px, 100%);

  margin: 20px auto 14px;

  font-family: "Space Grotesk", sans-serif;

  font-size: clamp(36px, 5vw, 56px);

  line-height: 1.08;

  letter-spacing: -1.7px;
}

.courses-final-cta p {
  width: min(600px, 100%);

  margin: 0 auto 30px;

  color: #bdc8d7;

  font-size: 15px;
}


/* =========================================================
   FOOTER
========================================================= */

.courses-footer {
  width: min(1200px, calc(100% - 40px));

  margin: 0 auto;

  min-height: 85px;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 20px;
}

.courses-footer > div {
  display: inline-flex;
  align-items: center;
  gap: 10px;

  color: #172033;

  font-family: "Space Grotesk", sans-serif;

  font-size: 14px;
  font-weight: 700;
}

.courses-footer img {
  width: 34px;
  height: 34px;

  object-fit: contain;
}

.courses-footer p {
  margin: 0;

  color: #7b8798;

  font-size: 12px;
}


/* =========================================================
   RESPONSIVE — TABLET
========================================================= */

@media (max-width: 1000px) {

  .courses-nav-container {
    gap: 20px;
  }

  .courses-nav {
    gap: 18px;
  }

  .courses-nav a {
    font-size: 13px;
  }

  .instructor-container {
    grid-template-columns: 290px minmax(0, 1fr);

    gap: 45px;
  }

  .instructor-photo {
    width: 290px;
  }

  .instructor-photo img {
    height: 325px;
  }

}


/* =========================================================
   RESPONSIVE — MOBILE
========================================================= */

@media (max-width: 850px) {

  .courses-nav {
    display: none;
  }

  .courses-contact-btn {
    display: none;
  }

  .courses-nav-container {
    min-height: 70px;
  }


  .courses-hero {
    padding: 78px 20px 85px;
  }


  .courses-hero h1 {
    font-size: clamp(41px, 11vw, 62px);

    letter-spacing: -1.7px;
  }


  .instructor-section {
    padding: 80px 20px;
  }

  .instructor-container {
    grid-template-columns: 1fr;

    gap: 40px;

    text-align: center;
  }

  .instructor-photo {
    width: min(285px, 100%);
  }

  .instructor-photo img {
    height: 320px;
  }

  .instructor-content p {
    margin-left: auto;
    margin-right: auto;
  }

  .instructor-stats {
    width: min(500px, 100%);

    margin-left: auto;
    margin-right: auto;
  }

  .udemy-profile-btn {
    margin-top: 4px;
  }


  .courses-section {
    width: min(100% - 30px, 650px);

    padding: 80px 0;
  }

  .courses-grid {
    grid-template-columns: 1fr;

    gap: 22px;

    margin-top: 42px;
  }

}


/* =========================================================
   RESPONSIVE — SMALL PHONES
========================================================= */

@media (max-width: 560px) {

  .courses-nav-container {
    width: min(100% - 28px, 1200px);
  }

  .courses-logo img {
    width: 38px;
    height: 38px;
  }

  .courses-logo {
    font-size: 15px;
  }


  .courses-hero {
    padding: 70px 16px 75px;
  }

  .courses-hero p {
    font-size: 15px;
  }

  .courses-hero-actions {
    flex-direction: column;

    width: 100%;
  }

  .primary-course-btn,
  .secondary-course-btn {
    width: 100%;
  }


  .instructor-section {
    padding: 70px 15px;
  }

  .instructor-photo {
    width: 250px;

    padding: 6px;

    border-radius: 20px;
  }

  .instructor-photo img {
    height: 280px;

    border-radius: 15px;
  }

  .instructor-content h2 {
    font-size: 39px;
    letter-spacing: -1.2px;
  }

  .instructor-content h3 {
    font-size: 15px;
  }


  .instructor-stats {
    grid-template-columns: 1fr 1fr;
  }

  .instructor-stats div:last-child {
    grid-column: 1 / -1;
  }


  .courses-section {
    width: calc(100% - 24px);

    padding: 70px 0;
  }

  .courses-section-header h2 {
    font-size: 38px;
  }

  .course-content {
    padding: 22px;
  }

  .course-content h3 {
    font-size: 22px;
  }


  .courses-final-cta {
    padding: 75px 18px;
  }


  .courses-footer {
    width: calc(100% - 28px);

    min-height: auto;

    padding: 28px 0;

    flex-direction: column;

    text-align: center;
  }

}