/* ========= Base / Reset ========= */
main, section, footer, header { margin: 0; padding: 0; }

/* ========= Typography ========= */
h1 { font-size: 2rem; margin: 1rem 0; }
h2 { font-size: 1.5rem; margin: .5rem 0; }
h5 { font-size: 1.125rem; margin: 1rem 0 0; }

/* ========= Utility ========= */
.mobile-hide { display: inline; } /* overridden by media query later */

/* ========= WhatsApp Float ========= */
.whatsapp-float {
  position: fixed;
  width: 75px;
  height: 75px;
  bottom: 100px;
  right: 100px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.3);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}
.whatsapp-float img { width: 50px; height: 50px; }

/* ========= Courses Grid ========= */
#courses-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 10px;
  padding: 10px 0;
}

.course-card {
  border: 1px solid #c3ddff;
  background-color: #eff5ff;
  border-radius: 5px;
  padding: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  cursor: pointer;
}

.course-card:hover {
  box-shadow: 0 8px 10px rgba(0,0,0,0.12);
  color:#071952;
}

.course-card-img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 8px 8px 0 0;
  margin-bottom: 12px;
  display: block;
}

.course-card h4 {
  margin: 0 0 10px;
  font-size: 1.1rem;
  color: #111;
}

.course-card p {
  font-size: 13px;
  color: #000;
  cursor: pointer;
}

.course-card-pp {
  color: #081a4b;
  cursor: pointer;
  display: block;
  background-color: #fff;
  padding: 4px;
  margin: 4px 0;
  border: 1px solid #0047ab;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}
.course-card-pp:hover { background-color: #e0f0ff; }

.date-badge {
  display:inline-block;
  margin-top:.55rem;
  padding:.15rem .5rem;
  border:1px solid currentColor;
  border-radius:10px;
  font-weight:400;
  line-height:1;
}

/* ========= Category intro block ========= */
.course-category {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin: 3rem 0;
}
.cat-info { flex: 1 1 320px; }
.cat-info ul { list-style: disc; padding-left: 1.25rem; margin: 0; }
.cat-info li { margin: .4rem 0; }

/* ========= Loading Animation ========= */
.loading-text { font-weight: 600; font-size: 1.1rem; letter-spacing: .5px; }
.loading-text span { animation: blink 1s infinite; display: inline-block; }
.loading-text span:nth-child(2) { animation-delay: .2s; }
.loading-text span:nth-child(3) { animation-delay: .4s; }

@keyframes blink {
  0%, 20% { opacity: 0; }
  50%     { opacity: 1; }
  100%    { opacity: 0; }
}

/* =======================================================
   Courses Index Categories
   ======================================================= */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 12px;
}
.category-card {
  border: 1px solid #e6e6e6;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.category-media { display: block; width: 100%; height: 180px; object-fit: cover; }
.category-body { padding: 14px 14px 10px; }
.category-title {
  margin: 0 0 6px;
  font-size: 1.1rem;
  color: #071952;
  font-weight: 700;
}
.course-links {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.course-links li {
  background: #f8fafc;
  border: 1px solid #edf2f7;
  border-radius: 10px;
  padding: 8px 10px;
  line-height: 1.35;
}
.course-links a { text-decoration: none; color: #183B4E; }
.course-links a:hover { text-decoration: underline; }

.soc-icons .share-links {
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.soc-icons .share-links li { line-height:0; }
.soc-icons .share-links img { height:28px; width:auto; display:block; }

/* =======================================================
   Two-column layout & Registration Form
   ======================================================= */
.left-column, .course-form { min-width:0; box-sizing:border-box; }
.section { margin-bottom:6px; }
.section ul, .section p { margin:0 0 6px 0; }

.course-layout {
  display:flex;
  flex-wrap:wrap;
  gap:30px;
  margin-top:20px;
  align-items:flex-start;
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  overflow-x:hidden;
}
.left-column {
  flex:1 1 60%;
  display:flex;
  flex-direction:column;
  gap:20px;
}
.image-box img { width:100%; height:auto; max-width:100%; border-radius:8px; }
.course-form {
  flex:1 1 36%;
  background:#f9f9f9;
  padding:20px;
  border-radius:8px;
}

form#registrationForm {
  display:flex;
  flex-direction:column;
  gap:16px;
  max-width:100%;
}
form#registrationForm .field { display:flex; flex-direction:column; gap:6px; }
form#registrationForm label { font-weight:500; font-size:14px; color:#000000; }
form#registrationForm input,
form#registrationForm select {
  width:100%;
  padding:10px 12px;
  font-size:14px;
  border:1px solid #ccc;
  border-radius:4px;
  background:#F3F3E0;
  color:#000000;
}
form#registrationForm button[type="submit"] {
  background:#FF4F0F;
  color:#F3F3E0;
  border:0;
  padding:12px;
  font-size:16px;
  border-radius:6px;
  cursor:pointer;
  transition:background-color .3s;
}
form#registrationForm button[type="submit"]:hover { background:#006b3a; }

/* ========= Responsive ========= */
@media (max-width: 1214px) {
  .menu a { padding: 10px 10px; }
  .categories-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 1136px) {
  .social-links li:nth-child(3),
  .social-links li:nth-child(4) { display: none; }
  .social-links { width: 125px; }
}

@media (max-width: 1067px) {
  .menu a { padding: 8px 9px; }
}

@media (max-width: 1024px) {
  .nav-toggle { display: block; }
  .menu {
    font-size: 12px;
    position: absolute;
    right: 0;
    top: 100%;
    flex-direction: column;
    width: 200px;
    background: #0e1b44e3;
    border: 1px solid #e5e5e5;
    padding: 1rem;
    display: none;
    z-index: 1000;
  }
  .menu.show { display: flex; }
  .social-links { display: none; }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .course-category { flex-direction: column; text-align: center; }
  .mobile-hide { display: none !important; }
  .course-layout { flex-direction: column; }
}

@media (max-width: 600px) {
  .categories-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .course-layout { gap: 20px; }
  .left-column, .course-form  {
    flex: 1 1 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width:590px){
  h1{ font-size:20px; line-height:1.3; }
}
