/* =========================
   HEADER
========================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    background:
        color-mix(
            in srgb,
            var(--bg) 92%,
            transparent
        );

    backdrop-filter: blur(14px);

    border-bottom:
        1px solid var(--border);
}


.header-inner {
    min-height: 72px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}


.brand {
    display: inline-flex;
    align-items: center;

    gap: 10px;

    font-size: 21px;
    font-weight: 800;

    white-space: nowrap;
}

.brand i {
    color: var(--primary);
}


.site-nav {
    display: flex;
    align-items: center;

    gap: 22px;
}


.site-nav a:not(.btn) {
    color: var(--muted);

    font-weight: 600;

    transition:
        color .2s ease;
}


.site-nav a:not(.btn):hover {
    color: var(--primary);
}


.nav-actions {
    display: flex;
    align-items: center;

    gap: 10px;
}


.mobile-menu {
    display: none;

    width: 42px;
    height: 42px;

    border:
        1px solid var(--border);

    border-radius: 10px;

    background: var(--card);

    color: var(--text);

    cursor: pointer;
}


/* =========================================================
   HERO
========================================================= */

.hero{
  padding:100px 0;
  background:linear-gradient(135deg,var(--soft),var(--bg))
}

.hero h1{
  font-size:clamp(40px,7vw,70px);
  line-height:1.05;
  max-width:850px;
  margin:0 0 18px
}

.hero p{
  max-width:760px;
  font-size:19px;
  color:var(--muted)
}


/* =========================================================
   FILTERS
========================================================= */

.filters{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin:28px 0
}

.filter{
  border:1px solid var(--border);
  background:var(--card);
  color:var(--text);
  padding:9px 14px;
  border-radius:99px;
  cursor:pointer
}

.filter.active{
  background:var(--primary);
  color:white;
  border-color:var(--primary)
}


/* =========================================================
   GENERAL FORM
========================================================= */

.form{
  display:grid;
  gap:14px;
  max-width:520px
}

.form input{
  width:100%;
  padding:13px 14px;
  border:1px solid var(--border);
  background:var(--card);
  color:var(--text);
  border-radius:10px
}


/* =========================================================
   PANEL
========================================================= */

.panel{
  padding:28px;
  border:1px solid var(--border);
  border-radius:18px;
  background:var(--card)
}


/* =========================================================
   CONTACT US
========================================================= */

.contact-grid{
  display:grid;
  grid-template-columns:1fr 1.15fr;
  gap:28px;
  margin-top:30px
}

.contact-info,
.contact-form{
  height:100%;
  box-sizing:border-box
}

.contact-info h3,
.contact-form h3{
  margin-top:0;
  margin-bottom:10px
}

.contact-info > p,
.contact-form > p{
  color:var(--muted);
  line-height:1.7;
  margin-bottom:24px
}


/* Contact information items */

.contact-item{
  display:flex;
  flex-direction:column;
  gap:5px;
  padding:16px 0;
  border-bottom:1px solid var(--border)
}

.contact-item:last-child{
  border-bottom:none
}

.contact-item strong{
  font-size:14px;
  color:var(--text)
}

.contact-item a{
  color:var(--primary);
  text-decoration:none;
  word-break:break-word;
  transition:opacity .2s ease
}

.contact-item a:hover{
  opacity:.75;
  text-decoration:underline
}


/* Contact form */

.contact-form form{
  display:grid;
  gap:16px
}

.form-group{
  display:flex;
  flex-direction:column;
  gap:7px
}

.form-group label{
  font-size:14px;
  font-weight:600
}

.form-group input,
.form-group textarea{
  width:100%;
  box-sizing:border-box;
  padding:13px 14px;
  border:1px solid var(--border);
  border-radius:10px;
  background:var(--card);
  color:var(--text);
  font:inherit;
  outline:none;
  transition:border-color .2s ease,box-shadow .2s ease
}

.form-group input{
  min-height:46px
}

.form-group textarea{
  min-height:140px;
  resize:vertical
}

.form-group input:focus,
.form-group textarea:focus{
  border-color:var(--primary);
  box-shadow:0 0 0 3px color-mix(
    in srgb,
    var(--primary) 15%,
    transparent
  )
}

.form-group input::placeholder,
.form-group textarea::placeholder{
  color:var(--muted);
  opacity:.7
}


/* Contact buttons */

.contact-actions{
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  margin-top:4px
}

.contact-actions .btn{
  flex:1 1 180px;
  text-align:center;
  cursor:pointer
}

.contact-status{
  min-height:20px;
  margin:0;
  color:var(--muted);
  font-size:14px
}


/* =========================================================
   FOOTER
   Content generated by:
   data/components/footerData.js
   js/footer.js
========================================================= */

.footer{
  margin-top:70px;
  padding:50px 0 0;
  border-top:1px solid var(--border);
  background:var(--card);
  color:var(--muted)
}


/* Footer container */

.footer > .container{
  width:min(1180px,92%);
  margin:0 auto
}


/* Footer grid */

.footer-grid{
  display:grid;
  grid-template-columns:
    minmax(220px,1.5fr)
    repeat(3,minmax(140px,1fr))
    minmax(150px,1fr)
    minmax(150px,1fr)
    minmax(120px,.8fr);
  gap:34px;
  align-items:start
}


/* Footer columns */

.footer-column{
  min-width:0
}

.footer-column h3{
  margin:0 0 16px;
  font-size:15px;
  font-weight:800;
  color:var(--text)
}


/* Company */

.footer-company{
  max-width:300px
}

.footer-brand{
  display:inline-block;
  margin-bottom:12px;
  font-size:22px;
  font-weight:900;
  color:var(--text);
  text-decoration:none
}

.footer-company p{
  margin:0;
  font-size:14px;
  line-height:1.7;
  color:var(--muted)
}


/* Footer lists */

.footer-column ul{
  list-style:none;
  margin:0;
  padding:0
}

.footer-column li{
  margin-bottom:10px
}

.footer-column li:last-child{
  margin-bottom:0
}


/* Footer links */

.footer-column a{
  color:var(--muted);
  text-decoration:none;
  font-size:14px;
  line-height:1.5;
  transition:color .2s ease,opacity .2s ease
}

.footer-column a:hover{
  color:var(--primary);
  opacity:.9;
  text-decoration:underline
}


/* Footer bottom */

.footer-bottom{
  display:flex;
  align-items:center;
  justify-content:center;
  margin-top:45px;
  padding:20px 0;
  border-top:1px solid var(--border);
  text-align:center
}

.footer-bottom p{
  margin:0;
  font-size:13px;
  color:var(--muted)
}


/* =========================================================
   COURSE / LESSON
========================================================= */

.course-hero{
  padding:55px 0;
  background:var(--soft)
}

.lesson-layout{
  display:grid;
  grid-template-columns:280px 1fr;
  gap:28px
}

.sidebar{
  position:sticky;
  top:90px;
  height:max-content
}

.lesson-content{
  font-size:18px
}

.lesson-content pre{
  overflow:auto;
  padding:18px;
  border-radius:12px;
  background:#111827;
  color:#f9fafb
}

.lesson-content code{
  background:var(--soft);
  padding:2px 5px;
  border-radius:5px
}

.lesson-content pre code{
  background:none;
  padding:0
}

.lesson-nav{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin-top:40px
}


/* =========================================================
   STATS
========================================================= */

.stat-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:14px
}

.stat{
  padding:20px;
  border:1px solid var(--border);
  border-radius:16px;
  background:var(--card)
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media(max-width:1100px){

  .footer-grid{
    grid-template-columns:
      repeat(4,minmax(150px,1fr))
  }

  .footer-company{
    grid-column:span 4;
    max-width:650px
  }

}


@media(max-width:800px){

  .nav-links{
    display:none;
    position:absolute;
    left:4%;
    right:4%;
    top:68px;
    padding:18px;
    flex-direction:column;
    align-items:stretch;
    background:var(--card);
    border:1px solid var(--border);
    border-radius:14px
  }

  .nav-links.open{
    display:flex
  }

  .menu{
    display:block
  }


  /* Contact */

  .contact-grid{
    grid-template-columns:1fr;
    gap:20px
  }


  /* Footer */

  .footer-grid{
    grid-template-columns:
      repeat(2,minmax(140px,1fr));
    gap:30px 24px
  }

  .footer-company{
    grid-column:span 2
  }


  /* Lessons */

  .lesson-layout{
    grid-template-columns:1fr
  }

  .sidebar{
    position:static
  }

}


@media(max-width:500px){

  .contact-grid{
    margin-top:20px
  }

  .contact-actions{
    flex-direction:column
  }

  .contact-actions .btn{
    width:100%;
    flex:none
  }


  .footer{
    margin-top:45px;
    padding-top:40px
  }

  .footer > .container{
    width:calc(100% - 28px)
  }

  .footer-grid{
    grid-template-columns:1fr;
    gap:28px
  }

  .footer-company{
    grid-column:auto;
    max-width:none
  }

  .footer-bottom{
    margin-top:35px
  }

}

/* =========================================================
   FLOATING THEME TOGGLE
========================================================= */

.floating-theme-btn{
  position: fixed;

    top: 85px;
    right: 20px;

    width: 42px;
    height: 42px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border:
        1px solid var(--border);

    border-radius: 50%;

    background: var(--card);

    color: var(--text);

    cursor: pointer;

    font-size: 17px;

    box-shadow:
        var(--shadow-sm);

    z-index: 900;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.floating-theme-btn:hover{
  background: var(--soft);

    color: var(--primary);

    border-color: var(--primary);

    transform: translateY(-2px);
}

.floating-theme-btn:active{
  transform:scale(.94);
}


/* =========================================================
   AFTER SCROLL
========================================================= */

.floating-theme-btn.scrolled{
  top:14px;
}


/* =========================================================
   MOBILE
========================================================= */

@media(max-width:800px){

  .floating-theme-btn{
    top:76px;
    right:14px;
    width:42px;
    height:42px;
  }

  .floating-theme-btn.scrolled{
    top:12px;
  }

}
/* Resource Action Buttons */
.resource-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.resource-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.resource-actions .btn i {
    font-size: 0.9rem;
}