/* ===== GLOBAL WIDTH SAFETY ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  max-width: 100%;
  overflow-x: hidden;
}

/* ===== NAVBAR ===== */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;

  background: var(--color-primary);
  color: white;

  padding: 1rem clamp(1rem, 4vw, 4rem);

  width: 100%;
  max-width: 100%;
  overflow: hidden;

  flex-wrap: wrap;
  gap: 1rem;
}


.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  flex-wrap: wrap;
  max-width: 100%;
}

.nav-links a,
.nav-logo a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}

.navbar .btn-outline:hover,
.navbar .btn-primary:hover {
  background: white;
  color: var(--color-primary);
}

/* ===== GLOBAL BUTTONS ===== */
.btn-primary {
  background: var(--color-primary);
  color: white;
  padding: 0.5rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  border: none;
 
}

.btn-outline{
    background:transparent;
    color:white;
    padding:0.5rem 1rem;
    border-radius:6px;
    border:1px solid white;
    text-decoration:none;
    font-weight:500;
    cursor:pointer;
}
.btn-outline:hover, .btn-primary:hover{
  background: white;
  color: var(--color-primary);
}

/* ===== ICON BUTTON (NAVBAR) ===== */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: white;
  text-decoration: none;
  line-height: 1;
}

.btn-icon i {
  display: block;
}

.btn-icon:hover {
  color: var(--color-secondary);

}

/* ===== HERO ===== */
.hero {

  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  text-align: center;
  padding:
  clamp(2rem,6vw,4rem)
  clamp(1rem,5vw,2rem);
  background: white;
}

.hero h3 {
  margin-bottom: 1rem;
  color: var(--color-primary);
  font-size: clamp(1.5rem, 4vw, 2.5rem);
  font-weight: 600;
}

.hero p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* ===== SECTIONS ===== */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 3rem 0 1.5rem;
}

.link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 500;
}

/* ===== COURSE GRID ===== */
.course-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.course-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 1.5rem;
}

.course-card h3 {
  margin-bottom: 0.5rem;
}

.course-card p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

.course-card-header {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.5rem;
}

.course-level {
  background: var(--color-muted);
  color: var(--color-primary);
  font-size: var(--font-small);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.progress-bar {
  height: 8px;
  background: var(--border-light);
  border-radius: 4px;
  margin: 0.5rem 0;
}

.progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: 4px;
}
/* ===== BUTTONS ===== */

.course-actions{
    display:flex;
    gap:clamp(0.5rem,2vw,1rem);
    align-items:center;
    justify-content:space-between;
    margin-top:clamp(0.9rem,2vw,1.3rem);
}

.action-btn{

    flex:1;

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

    min-width:0;

    padding:
        clamp(0.65rem,1.4vw,0.9rem)
        clamp(0.8rem,2vw,1.3rem);

    font-size:
        clamp(0.82rem,1.8vw,1rem);

    font-weight:600;

    line-height:1.2;

    text-align:center;

    text-decoration:none;

    background:var(--color-primary);

    color:#fff;

    border:none;

    border-radius:
        clamp(8px,1vw,12px);

    cursor:pointer;

    transition:
        background .25s ease,
        transform .2s ease,
        box-shadow .25s ease;

    white-space:nowrap;

    overflow:hidden;

    text-overflow:ellipsis;
}

.action-btn:hover{

    transform:translateY(-2px);

    box-shadow:
        0 8px 20px rgba(0,0,0,.15);
}

.action-btn:active{

    transform:translateY(0);
}

.btn-secondary {
  background: var(--color-secondary);
  color: var(--bg-white);
  border: none;
  border-radius: 6px;
  padding: 0.4rem 0.8rem;
  font-weight: 500;
}

.btn-secondary.active {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* ===== MATERIAL CARD ===== */
.material-card {
  background: var(--bg-white);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.card-icon {
  font-size:clamp(1.6rem,1.8vw,2.2rem);
  color: var(--color-primary);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--color-primary);
  color: white;
  padding: 3rem 4rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  border-top: 2px solid var(--color-secondary);
  font-size: 0.9rem;
}

.footer a {
  color: white;
  text-decoration: none;
}

.footer a:hover {
  color: var(--color-secondary);
}

.footer-bottom {
  width: 100%;
  text-align: center;
  margin-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 1rem;
  font-size: var(--font-small);
}

.footer-socials{
  width: 100%; height: 50%;
}

/*=====passwordToggle=====*/
.password-field {
  position: relative;
}

.password-field input {
  width: 100%;
  padding-right: 40px;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  user-select: none;
}



