body {
    font-family: "Open Sans", sans-serif;
}
main {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    width: 100%;
}
.courses-main h1 {
    color: #FF6B6B;
    font-size: 36px;
    font-weight: bolder;
    text-align: center;
}
.courses-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 40px;
    width: 100%;
}
.age-select {
    display: flex;
    justify-content: space-between;
    width: 1240px;
}
.age-button {
    width: 20%;
    height: 55px;
    background-color: #1B2A4E;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #004BFF;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
    transition: background-color 0.3s;
    cursor: pointer;
}
.age-button p {
    font-size: 24px;
    color: #EDF2F7;
    font-weight: bold;
    line-height: 10px;
}
.age-button:hover {
    background-color: #FF6B6B;
}
.course-background {
    background-color: #BAE6FD;
    width: 1240px;
    height: max-content;
    margin-top: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}
.courses-grid {
    padding-inline: 50px;
    padding-block: 50px;
    display: grid;
    grid-template-columns: 350px 350px 350px;
    grid-template-rows: 370px 370px;
    gap: 60px 45px;
}
.courses-card {
    width: 350px;
    height: 370px;
    background-color: #EDF2F7;
    border-radius: 10px;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.4s ease;
    opacity: 1;
    transform: scale(1);
}
.courses-card.hidden {
  opacity: 0;
  transform: scale(0.85) translateY(20px);
  pointer-events: none;    
}
.courses-card p {
    margin: 0;
    font-size: 18px;
}
.course-button {
    width: 200px;
    height: 45px;
    background-color: #1B2A4E;;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
    transition: background-color 0.3s;
    line-height: 45px;
    color: #EDF2F7;
    font-size: 30px;
    text-decoration: none;
    cursor: pointer;
}
.course-button:hover {
    background-color: #FF6B6B;
}
.card-content {
    margin-block: 28px;
    margin-inline: 37px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    width: 276px;
    height: 314px;
}
.filter-button {
    display: none;
    width: 100%;
    background-color: #1B2A4E;
    font-size: 24px;
    color: #EDF2F7;
    font-weight: medium;
    height: 55px;
    border-radius: 10px;
    text-align: center;
    line-height: 55px;
    border: 1px solid #004BFF;
    box-shadow: 0 4px 4px rgba(0, 0, 0, 0.25);
}
.filter-wrapper {
  position: relative;
  display: block;
  width: 50%;
  display: flex;
  justify-content: center;
}
.filter-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 10px;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.4);
  min-width: 220px;
  z-index: 100;
}

.filter-menu.show {
  display: block;
}
.age-menu {
    padding: 0;
}
.age-menu li {
  padding: 14px 24px;
  color: white;
  font-weight: bold;
  cursor: pointer;
  list-style-type: none;
}

.age-menu li:hover {
  background: #2c3e5a;
}

.age-menu li.active {
  background: #FF6B6B;
}
.modal {
  display: none;                    
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 2000;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}

.modal.show {
  display: flex;
}
.modal-content {
  background: white;
  max-width: 800px;
  width: 100%;
  height: 900px;
  max-height: 95vh;
  overflow-y: auto;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: modalPop 0.4s ease forwards;
  padding: 5px 5px;
}
.modal-header {
  background: white;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}
.close {
  font-size: 46px;
  font-weight: 500;
  color: #999;
  cursor: pointer;
  line-height: 1;
  transition: color 0.2s;
}
.close:hover {
  color: #333;
}
.icon-block {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 35%;
    align-items: center;
    background-color: #EDF2F7;
    height: 280px;
    border-radius: 10px;
}
.icon-block h1 {
    font-size: 20px;
    font-weight: bolder;
    color: #222;
}
.modal-body {
  color: #444;
  font-size: 15.5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-inline: 20px;
  overflow-y: auto;
}
.modal-text {
    width: 100%;
    font-size: 20px;
}
.modal-text h3 {
  margin: 20px 0 12px;
  color: #222;
}

.modal-text ul {
  padding-left: 20px;
}

.modal-text li {
  margin-bottom: 8px;
}

.modal-footer {
  background: white;
  text-align: center;
}

.add-to-cart-btn {
  background: #FF6B6B;
  width: 50%;
  color: white;
  border: none;
  padding: 12px 25px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 20px;
  font-weight: bold;
  transition: background-color 0.3s;
}
@media (max-width: 800px) {
    .icon-block {
        width: 50%;
    }
}
@media (max-width: 650px) {
    .icon-block {
        width: 70%;
    }
}
.btn-close:hover {
  background-color: #1B2A4E;
}
@keyframes modalPop {
  from { opacity: 0; transform: scale(0.85) translateY(50px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}