/* =========================================================
   home.css
   Page-specific styles for the Home view: hero, the "Popular Courses"
   carousel, and the shared Enroll modal. Relies on design tokens and
   the navbar/footer already defined in site.css.
   ========================================================= */

/* ===== HERO ===== */
/* ===== HERO SLIDER ===== */
.hero-slider {
    position: relative;
    overflow: hidden;
    min-height: 400px;
    isolation: isolate;
}

.hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease;
    display: flex;
    align-items: center;
    color: #fff;
}

    .hero-slide.is-active {
        position: relative;
        opacity: 1;
        visibility: visible;
    }

.hero-slide-inner {
    max-width: 1180px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 64px 70px;
}

.hero-slide-text {
    max-width: 600px;
}

.hero-slide-eyebrow {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.3);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 600;
    margin-bottom: 18px;
}

    .hero-slide-eyebrow strong {
        color: #ffd75e;
    }

.hero-slide-text h1 {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 14px;
    letter-spacing: -0.5px;
}

    .hero-slide-text h1 span {
        display: block;
        color: #ffd75e;
    }

.hero-slide-text p {
    font-size: 15px;
    line-height: 1.6;
    opacity: 0.92;
    margin-bottom: 24px;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.hero-tag {
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.25);
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    backdrop-filter: blur(2px);
}

.hero-slide-visual {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-visual-circle {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 88px;
}

.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255,255,255,0.18);
    border: 1px solid rgba(255,255,255,0.35);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: background .15s ease;
}

    .hero-arrow:hover {
        background: rgba(255,255,255,0.32);
    }

    .hero-arrow svg {
        width: 18px;
        height: 18px;
    }

.hero-arrow-left {
    left: 20px;
}

.hero-arrow-right {
    right: 20px;
}

.hero-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background .15s ease, width .15s ease;
}

    .hero-dot.is-active {
        background: #fff;
        width: 22px;
        border-radius: 5px;
    }

@media (max-width:800px) {
    .hero-slide-inner {
        flex-direction: column;
        text-align: center;
        padding: 48px 20px;
    }

    .hero-slide-text {
        max-width: 100%;
    }

    .hero-tags {
        justify-content: center;
    }

    .hero-slide-visual {
        display: none;
    }

    .hero-slide-text h1 {
        font-size: 26px;
    }
}

/* ===== POPULAR COURSES ===== */
.courses-section{
  padding:0px 24px 64px;
  border-top:1px solid #e9ecf4;
}
.courses-section-inner{max-width:1180px;margin:0 auto;}
.courses-heading{
  font-size:23px;
  font-weight:700;
  letter-spacing:-0.3px;
  color:#111827;
  margin-bottom:24px;
}
.courses-slider{position:relative;}
.courses-track{
  display:grid;
  grid-auto-flow:column;
  grid-template-rows:repeat(2, auto);
  grid-auto-columns:260px;
  gap:24px;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  padding:4px 2px 8px;
  -ms-overflow-style:none;
  scrollbar-width:none;
}
.courses-track::-webkit-scrollbar{display:none;}

.course-card{
  scroll-snap-align:start;
  background:#fff;
  border:1px solid #e9ecf4;
  border-radius:14px;
  overflow:hidden;
  box-shadow:0 8px 24px rgba(20,30,60,0.06);
  display:flex;
  flex-direction:column;
  transition:box-shadow .18s ease, transform .18s ease;
}
.course-card:hover{box-shadow:0 16px 36px rgba(20,30,60,0.12);transform:translateY(-2px);}

.course-banner{
  height:130px;
  display:flex;
  align-items:center;
  gap:10px;
  padding:0 18px;
  color:#fff;
}
.course-banner-icon{font-size:26px;line-height:1;flex-shrink:0;}
.course-banner-title{font-size:16px;font-weight:700;line-height:1.25;}

.course-body{padding:16px 18px 4px;flex:1;}
.course-title{font-size:15px;font-weight:700;color:#111827;line-height:1.35;margin-bottom:8px;}

.star-rating{
  position:relative;
  display:inline-block;
  font-size:14px;
  letter-spacing:2px;
  color:#e2e5ec;
  vertical-align:middle;
}
.star-rating:before{content:"★★★★★";}
.star-rating-fill{
  position:absolute;
  top:0;left:0;
  overflow:hidden;
  white-space:nowrap;
  color:#f5a623;
}
.star-rating-fill:before{content:"★★★★★";}
.course-rating{display:flex;align-items:center;gap:6px;margin-bottom:10px;}
.course-rating-num{font-size:13px;font-weight:600;color:var(--text);}

.course-meta{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:12.5px;
  color:var(--muted);
  margin-bottom:6px;
}
.course-meta svg{width:13px;height:13px;flex-shrink:0;}

.course-actions{
  display:flex;
  border-top:1px solid #eef0f6;
  margin-top:12px;
}
.course-btn-enroll{
  flex:1.4;
  text-align:center;
  padding:12px 0;
  background:var(--primary);
  color:#fff;
  font-size:12.5px;
  font-weight:800;
  letter-spacing:0.4px;
  text-decoration:none;
  text-transform:uppercase;
  border:none;
  cursor:pointer;
  transition:background .15s ease;
}
.course-btn-enroll:hover{background:var(--primary-dark);}
.course-btn-share{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  border-left:1px solid #eef0f6;
  font-size:12px;
  font-weight:800;
  letter-spacing:0.3px;
  color:var(--text);
  text-decoration:none;
  text-transform:uppercase;
  transition:background .15s ease;
}
.course-btn-share:hover{background:var(--bg);}
.course-btn-share svg{width:13px;height:13px;}

.slider-arrow{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:34px;
  height:34px;
  border-radius:50%;
  background:#fff;
  border:1px solid #dfe4ee;
  box-shadow:0 6px 16px rgba(20,30,60,0.12);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  color:var(--text);
  z-index:5;
  transition:background .15s ease, border-color .15s ease;
}
.slider-arrow:hover{background:var(--bg);border-color:var(--primary);color:var(--primary);}
.slider-arrow svg{width:15px;height:15px;}
.slider-arrow-left{left:-17px;}
.slider-arrow-right{right:-17px;}

@media (max-width:640px){
  .hero{padding:44px 16px 40px;}
  .hero h1{font-size:27px;}
  .courses-section{padding:40px 16px;}
  .slider-arrow{display:none;}
}

/* ===== ENROLL / CONSULTATION MODAL ===== */
.modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(15,20,35,0.55);
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:200;
}
.modal-overlay.open{display:flex;}
.modal-card{
  background:#fff;
  width:100%;
  max-width:600px;
  border-radius:20px;
  padding:32px 36px 36px;
  box-shadow:0 30px 80px rgba(0,0,0,0.3);
  max-height:90vh;
  overflow-y:auto;
  position:relative;
  animation:modalPop .22s ease;
}
@keyframes modalPop{from{opacity:0;transform:scale(0.96) translateY(8px);}to{opacity:1;transform:scale(1) translateY(0);}}
.modal-close{
  position:absolute;
  top:24px;right:28px;
  width:32px;height:32px;
  border:none;
  background:none;
  color:var(--muted);
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius:8px;
  transition:background .15s ease, color .15s ease;
}
.modal-close:hover{background:var(--bg);color:var(--text);}
.modal-close svg{width:20px;height:20px;}

.modal-title{font-size:22px;font-weight:800;color:#111827;margin-bottom:4px;padding-right:40px;}
.modal-subtitle{font-size:13px;color:var(--muted);margin-bottom:24px;}

.modal-field{margin-bottom:18px;}
.modal-field label{display:block;font-size:13px;font-weight:700;color:var(--text);margin-bottom:8px;}
.modal-field label .req{color:var(--error);}
.modal-field input,.modal-field select{
  width:100%;
  padding:12px 14px;
  border:1.5px solid #e2e5ec;
  border-radius:10px;
  font-size:14px;
  outline:none;
  background:#fff;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.modal-field input:focus,.modal-field select:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 3px rgba(43,87,209,0.1);
}
.modal-row-2{display:grid;grid-template-columns:1fr 1fr;gap:18px;}

.modal-phone-wrap{
  display:flex;
  border:1.5px solid #e2e5ec;
  border-radius:10px;
  overflow:hidden;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.modal-phone-wrap select{
  border:none;
  border-right:1.5px solid #e2e5ec;
  border-radius:0;
  width:auto;
  padding:12px 10px;
  background:#f8f9fc;
  font-weight:600;
}
.modal-phone-wrap input{border:none;border-radius:0;flex:1;}
.modal-phone-wrap select:focus,.modal-phone-wrap input:focus{box-shadow:none;}
.modal-phone-wrap:focus-within{border-color:var(--primary);box-shadow:0 0 0 3px rgba(43,87,209,0.1);}

.modal-checkbox-row{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin-bottom:24px;
  font-size:13.5px;
  color:var(--text);
  cursor:pointer;
}
.modal-checkbox-row input{margin-top:2px;width:16px;height:16px;accent-color:var(--primary);cursor:pointer;flex-shrink:0;}
.modal-checkbox-row a{color:var(--primary);text-decoration:none;font-weight:600;}
.modal-checkbox-row a:hover{text-decoration:underline;}

.modal-submit{
  width:100%;
  padding:15px;
  border:none;
  border-radius:12px;
  background:var(--primary);
  color:#fff;
  font-size:15px;
  font-weight:800;
  letter-spacing:0.2px;
  cursor:pointer;
  transition:background .15s ease, transform .12s ease;
}
.modal-submit:hover{background:var(--primary-dark);}
.modal-submit:active{transform:scale(0.99);}

.modal-field.has-error input,
.modal-field.has-error select{border-color:var(--error);}
.modal-phone-wrap.has-error{border-color:var(--error);}
.modal-error-msg{display:none;color:var(--error);font-size:11.5px;margin-top:5px;}
.modal-field.has-error .modal-error-msg{display:block;}

.modal-success{display:none;text-align:center;padding:24px 0 8px;}
.modal-success.show{display:block;}
.modal-success .check-circle{
  width:56px;height:56px;
  border-radius:50%;
  background:#e8f8ee;
  color:var(--success);
  display:flex;
  align-items:center;
  justify-content:center;
  margin:0 auto 16px;
}
.modal-success h3{font-size:18px;font-weight:800;margin-bottom:6px;color:#111827;}
.modal-success p{font-size:13.5px;color:var(--muted);}

@media (max-width:520px){
  .modal-card{padding:26px 22px 30px;border-radius:16px;}
  .modal-row-2{grid-template-columns:1fr;}
}
