
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background: url("images/back4.jpg") no-repeat center center fixed;
  background-size: cover;
}

header {
  background: #003366;
  color: #fff;
  padding: 15px;
  text-align: center;
}

nav {
  display: flex;
  justify-content: center;
  gap: 15px;
  background: #00509e;
  padding: 10px;
}

nav button {
  background: #fff;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 5px;
  font-weight: bold;
}

nav button:hover {
  background: #ffcc00;
}

section {
  display: none;
  padding: 40px;
  max-width: 900px;
  margin: auto;
  background: #fff;
  margin-top: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

section.active {
  display: block;
}

.kafedra-mudir {
  border: 1px solid #ccc;   /* Qirrali ramka */
  border-radius: 8px;       /* Burchaklarni yumaloqlash (ixtiyoriy) */
  padding: 15px;            /* Ichki bo‘sh joy */
  margin: 20px 0;           /* Yuqori va pastdan bo‘sh joy */
  display: flex;            /* Rasm va matn yonma-yon chiqishi uchun */
  align-items: center;      /* Vertikal tekislash */
  gap: 20px;                /* Rasm va matn orasidagi masofa */
  background-color: #f9f9f9; /* Orqa fon (ixtiyoriy) */
  box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Soyali effekt (ixtiyoriy) */
}
.kafedra-mudir img {
  border-radius: 6px;  /* Rasm burchaklarini yumaloqlash (ixtiyoriy) */
}
.kafedra-mudir p {
  margin: 4px 0;
}
/**/
#team {
  padding: 40px 20px;
  background: #fff;
}

#team h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #222;
}

.team-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.team-member {
  border: 1px solid #ddd;
  border-radius: 6px;
  text-align: center;
  padding: 15px;
  background: #fff;
  transition: box-shadow 0.3s;
}

.team-member:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.team-member img {
  width: 100%;
  max-height: 300px; /* balandlik chegarasi */
  object-fit: cover; /* kartochkaga sig‘diradi */
  object-position: center; /* markazga tekislaydi */
  border-radius: 4px;
  margin-bottom: 10px;
}


.team-member h3 {
  font-size: 16px;
  margin: 8px 0 4px;
  color: #222;
}

.team-member p {
  font-size: 14px;
  color: #555;
  margin: 4px 0 10px;
}

.team-member button {
  padding: 6px 12px;
  border: 1px solid #ccc;
  background: transparent;
  border-radius: 4px;
  cursor: pointer;
  transition: 0.3s;
}

.team-member button:hover {
  background: #f0f0f0;
}

footer {
  background: linear-gradient(135deg, #1e3c72, #2a5298); /* chiroyli gradient */
  color: #fff;
  padding: 20px 10px;
  margin-top: 40px;
  border-top: 3px solid #fff;

  /* yangi qo'shimchalar */
  display: flex;
  justify-content: center; /* o‘rtaga joylashtiradi */
  align-items: center;
  gap: 25px; /* yozuvlar orasidagi masofa */
  font-family: Arial, sans-serif;
  font-size: 14px;
}

footer a {
  color: #ffdd57; /* sariq rang */
  text-decoration: none;
  font-weight: bold;
  transition: 0.3s;
}

footer a:hover {
  text-decoration: underline;
}

/* ========== RESPONSIVE QOIDALAR ========== */

/* Planshet (992px gacha) */
@media (max-width: 992px) {
  nav {
    flex-wrap: wrap;
  }

  nav button {
    flex: 1 1 40%;
    max-width: 200px;
  }

  section {
    padding: 20px;
  }

  .kafedra-mudir {
    flex-direction: column;
    text-align: center;
  }

  .kafedra-mudir img {
    max-width: 250px;
    height: auto;
  }
}

/* Telefon (600px gacha) */
@media (max-width: 600px) {
  header h1 {
    font-size: 20px;
  }

  nav {
    flex-direction: column;
    gap: 10px;
  }

  nav button {
    width: 100%;
    max-width: 100%;
    padding: 12px;
  }

  section {
    padding: 15px;
  }

  .kafedra-mudir img {
    width: 100%;
    max-width: 200px;
    margin: auto;
  }

  .team-container {
    grid-template-columns: 1fr; /* faqat 1 ustun */
  }

 /* .team-member img {
    height: auto;
    max-height: 200px;
  }
*/
  .team-member h3 {
    font-size: 14px;
  }

  .team-member p {
    font-size: 13px;
  }

  footer {
    font-size: 14px;
    padding: 15px 5px;
  }
}
#educational p, 
#educational ul {
  text-align: justify;
  line-height: 1.6;
}
#science p {text-align: justify;
  line-height: 1.6;}

 .history p {text-align: justify;
  line-height: 1.6;}
  .history {
  text-align: justify;
  margin: 20px auto;
  max-width: 900px;
  padding: 10px;
}

.history img {
  display: block;
  margin: 20px auto;
  max-width: 100%;  /* rasm ekran kengligidan chiqmaydi */
  height: auto;     /* balandlik proporsional bo‘ladi */
  border-radius: 10px; /* yumaloq burchak (zamonaviyroq ko‘rinishi uchun) */
  box-shadow: 0 4px 10px rgba(0,0,0,0.2); /* biroz soya */
}

  #educational {
    padding: 20px;
  }

  #educational h2 {
    margin-bottom: 10px;
  }

  #educational p {
    text-align: justify; /* matnni ikki tomonga tekislaydi */
  }

  #educational ol {
    margin-left: 20px; /* raqamlangan ro‘yxatni chapdan siljitadi */
    line-height: 1.6; /* satrlar orasini ochadi */
  }
  
  /*header qismi */
  .site-header {
  background-color: #003366;
  color: white;
  padding: 15px 20px;
  display: flex;
  align-items: center;
  justify-content: center; /* matnni o‘rtaga olib keladi */
  position: relative;
}

.logo {
  position: absolute;
  left: 20px;  /* chapdan masofa */
  top: 50%;
  transform: translateY(-50%); /* logoni vertikal markazga joylashtiradi */
}

.logo img {
  height: 60px;
  filter: brightness(0) invert(1); /* logoni oq qilib ko‘rsatadi */
}

.header-text {
  text-align: center;
}

.header-text h1,
.header-text h2,{
  margin: 5px 0;
}

/* 📱 Mobil qurilmalar uchun */
@media (max-width: 768px) {
  .site-header {
    flex-direction: column;
    padding: 10px;
  }

  .logo {
    position: static;
    transform: none;
    margin-bottom: 10px;
  }

  .logo img {
    height: 50px;
  }

  .header-text h1 { font-size: 18px; }
  .header-text h2 { font-size: 16px; } 
}
  #regdoc {
    max-width: 800px;
    margin: 50px auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: transform 0.3s;
  }

  #regdoc:hover {
    transform: translateY(-5px);
  }

  #regdoc h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 30px;
    color: #34495e;
    position: relative;
  }

  #regdoc h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: #3498db;
    margin: 10px auto 0;
    border-radius: 2px;
  }

  #regdoc ul {
    list-style: none;
    padding: 0;
  }

  #regdoc ul li {
    background: #f8f9fa;
    margin-bottom: 15px;
    padding: 15px 20px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s, transform 0.3s;
  }

  #regdoc ul li:hover {
    background: #e8f0fe;
    transform: translateX(5px);
  }

  #regdoc ul li a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
  }

  #regdoc ul li a:hover {
    color: #1d6fa5;
    text-decoration: underline;
  }

  @media (max-width: 600px) {
    #regdoc {
      padding: 20px;
    }
    #regdoc ul li {
      flex-direction: column;
      align-items: flex-start;
    }
    #regdoc ul li a {
      margin-top: 5px;
    }
  }