/* Custom overrides for responsive behavior */
:root {
  --header-gap: 1rem;
  --surface: #ffffff;
  --brand: #0b3b7e;
  --brand-light: #2563eb;
  --muted: #4b5563;
  --accent: #f59e0b;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.12);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.scroll-hide {
  overflow: hidden;
}

body {
  color: #0f172a;
  background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
  font-family: 'Noto Sans TC', sans-serif;
}

main,
section,
.container {
  max-width: 1200px;
}

img {
  max-width: 100%;
  height: auto;
}

/* Header with glassmorphism effect */
header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 999;
  transition: var(--transition);
}

header:hover {
  box-shadow: 0 6px 30px rgba(0, 0, 0, 0.12);
}

.header-content {
  gap: var(--header-gap);
}

.header-content .logo {
  transition: transform 0.3s ease;
}

.header-content .logo:hover {
  transform: scale(1.05);
}

.header-content .logo img {
  max-width: 80px;
  filter: drop-shadow(0 4px 8px rgba(11, 59, 126, 0.2));
  transition: var(--transition);
}

.header-content .logo img:hover {
  filter: drop-shadow(0 6px 12px rgba(11, 59, 126, 0.3));
}

/* Enhanced navigation */
.navigation-bar nav ul li a {
  position: relative;
  transition: var(--transition);
  font-weight: 600;
}

.navigation-bar nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-light));
  transition: width 0.3s ease;
  border-radius: 2px;
}

.navigation-bar nav ul li a:hover::after,
.navigation-bar nav ul li a.active::after {
  width: 100%;
}

.navigation-bar nav ul li a:hover {
  color: var(--brand-light);
  transform: translateY(-2px);
}

.menu-btn {
  display: none;
  margin-left: auto;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.menu-btn a {
  display: inline-flex;
  flex-direction: column;
  gap: 6px;
}

.menu-btn span {
  width: 28px;
  height: 3px;
  background: #0b3b7e;
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.menu-btn a:focus-visible {
  outline: 3px solid #94c4ff;
  outline-offset: 6px;
  border-radius: 8px;
}

.menu-btn.active .bar1 {
  transform: translateY(9px) rotate(45deg);
}

.menu-btn.active .bar2 {
  opacity: 0;
}

.menu-btn.active .bar3 {
  transform: translateY(-9px) rotate(-45deg);
}

.responsive-menu {
  display: none;
}

.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 900;
}

.responsive-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.responsive-menu ul li a {
  text-decoration: none;
  color: #0b3b7e;
  font-weight: 600;
}

.banner-img img,
.abt-img img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  transition: var(--transition);
}

.banner-img img:hover,
.abt-img img:hover {
  transform: scale(1.02) translateY(-5px);
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.2);
}

/* Animated gradient backgrounds for sections */
.about-us-section,
.teachers-section,
.page-content {
  position: relative;
  overflow: hidden;
}

.about-us-section::before,
.teachers-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(11, 59, 126, 0.03) 0%, transparent 70%);
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  33% { transform: translate(30px, -30px) rotate(120deg); }
  66% { transform: translate(-20px, 20px) rotate(240deg); }
}

@media (max-width: 1199px) {
  .header-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-add {
    width: 100%;
    gap: 0.75rem;
  }
}

@media (max-width: 991px) {
  .navigation-bar {
    display: none;
  }

  .menu-btn {
    display: inline-flex;
  }

  .responsive-menu {
    display: block;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100%;
    background: #ffffff;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.12);
    padding: 88px 24px 32px;
    transition: right 0.35s ease;
    z-index: 1000;
  }

  .responsive-menu.active {
    right: 0;
  }

  .menu-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }

  .responsive-menu ul {
    display: flex;
    flex-direction: column;
    gap: 18px;
  }

  .responsive-menu ul li a {
    display: block;
    font-size: 16px;
    padding-bottom: 4px;
    border-bottom: 1px solid #e5e7eb;
  }

  .responsive-menu ul li a:focus-visible {
    outline: 2px solid var(--brand);
    border-radius: 6px;
    padding: 6px;
  }

  .main-banner .row,
  .section-title,
  .contact-add {
    text-align: center;
    justify-content: center;
  }

  .banner-text {
    padding-right: 0;
  }

  .banner-img {
    margin-top: 24px;
  }
}

@media (max-width: 767px) {
  .header-content {
    gap: 0.75rem;
  }

  .contact-add {
    flex-direction: column;
    align-items: flex-start;
  }

  .contact-add .contact-info {
    align-items: center;
  }

.about-sec .row > div,
.footer-section .row > div {
  margin-bottom: 16px;
}

.main-banner {
  padding: clamp(2rem, 2vw + 1.5rem, 4rem) 0;
}

.banner-text h2 {
  font-size: clamp(2rem, 2.5vw + 1.25rem, 3.2rem);
  line-height: 1.2;
  font-weight: 800;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.banner-text h2 span {
  display: inline-block;
  position: relative;
}

.banner-text h2 span::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

.banner-text p {
  color: var(--muted);
  font-size: clamp(1rem, 1vw + 0.9rem, 1.125rem);
}

.btn-default-home {
  background: linear-gradient(135deg, #0b3b7e, #2563eb, #3b82f6);
  color: var(--surface);
  border: none;
  padding: 16px 32px;
  border-radius: 50px;
  box-shadow: 0 10px 30px rgba(11, 59, 126, 0.3);
  transition: var(--transition);
  font-weight: 600;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.btn-default-home::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn-default-home:hover::before {
  width: 300px;
  height: 300px;
}

.btn-default-home:hover,
.btn-default-home:focus-visible {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 15px 40px rgba(37, 99, 235, 0.4);
  color: var(--surface);
}

.btn-default-home:active {
  transform: translateY(-1px) scale(1.02);
}

.abt-col {
  background: var(--surface);
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.abt-col::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(135deg, var(--brand), var(--brand-light), var(--accent));
  border-radius: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.abt-col:hover::before {
  opacity: 1;
}

.abt-col::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  border-radius: 18px;
  z-index: -1;
}

.abt-col:hover,
.abt-col:focus-within {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 25px 60px rgba(11, 59, 126, 0.2);
}

.abt-col p {
  color: var(--muted);
}

.section-title h2 {
  font-size: clamp(1.8rem, 1.5vw + 1.4rem, 2.6rem);
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  position: relative;
  display: inline-block;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: 2px;
}

.section-title p {
  color: var(--muted);
  line-height: 1.8;
  max-width: 800px;
  margin: 20px auto 0;
}

.mdp-map iframe,
.mdp-map h3,
.mdp-contact,
.contact-info {
  max-width: 100%;
}

.mdp-map iframe {
  width: 100%;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  border: 3px solid transparent;
}

.mdp-map iframe:hover {
  border-color: var(--brand-light);
  box-shadow: 0 15px 50px rgba(11, 59, 126, 0.2);
  transform: translateY(-2px);
}

.mdp-map h3 {
  margin-bottom: 20px;
  font-weight: 700;
  color: var(--brand);
  position: relative;
  padding-left: 15px;
}

.mdp-map h3::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 5px;
  height: 70%;
  background: linear-gradient(180deg, var(--brand), var(--accent));
  border-radius: 2px;
}

.comment-area,
.contact-info,
.contact-add .contact-info,
.mdp-our-contacts {
  background: var(--surface);
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.mdp-our-contacts {
  border: 2px solid transparent;
  background: linear-gradient(var(--surface), var(--surface)) padding-box,
              linear-gradient(135deg, var(--brand), var(--brand-light), var(--accent)) border-box;
}

.mdp-our-contacts:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.mdp-our-contacts h3 {
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 25px;
  font-size: 1.5rem;
}

.mdp-our-contacts ul li {
  margin-bottom: 20px;
  transition: var(--transition);
  padding: 15px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(11, 59, 126, 0.02), rgba(37, 99, 235, 0.02));
}

.mdp-our-contacts ul li:hover {
  background: linear-gradient(135deg, rgba(11, 59, 126, 0.08), rgba(37, 99, 235, 0.08));
  transform: translateX(10px);
}

.mdp-our-contacts .icon-v {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  box-shadow: 0 5px 15px rgba(11, 59, 126, 0.3);
  flex-shrink: 0;
}

.mdp-our-contacts .icon-v img {
  filter: brightness(0) invert(1);
  width: 24px;
  height: 24px;
}

.mdp-our-contacts .dd-cont h4 {
  color: var(--brand);
  font-weight: 600;
  margin-bottom: 5px;
}

.contact-add .contact-info img {
  max-width: 32px;
}

.mdp-contact .form-group input,
.mdp-contact .form-group textarea {
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  padding: 12px 14px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--surface), #f0f9ff);
  box-shadow: var(--shadow-sm);
  color: var(--brand);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.social-links a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.social-links a i {
  position: relative;
  z-index: 1;
  transition: var(--transition);
}

.social-links a:hover::before {
  opacity: 1;
}

.social-links a:hover,
.social-links a:focus-visible {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 10px 25px rgba(11, 59, 126, 0.3);
}

.social-links a:hover i,
.social-links a:focus-visible i {
  color: #fff;
  transform: scale(1.2);
}

.avt-img img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 20px;
}

.about-page-content .row {
  margin-bottom: 30px;
}

.about-page-content .section-title,
.about-page-content .act-inffo {
  padding: 20px 0;
}

/* Enhanced Footer */
footer {
  background: linear-gradient(135deg, #0a1f3d 0%, #0b3b7e 50%, #1e40af 100%);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--brand-light), var(--accent));
}

footer .widget-title {
  color: #ffffff;
  font-weight: 700;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

footer .widget-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

footer a {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

footer a:hover {
  color: var(--accent);
  transform: translateX(5px);
}

footer p {
  color: rgba(255, 255, 255, 0.9);
}

footer .bottom-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 40px;
  padding-top: 20px;
}

/* Page title enhancements */
.page-title {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 50%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 800;
  text-align: center;
  padding: 40px 0;
  font-size: clamp(2rem, 3vw, 3rem);
  position: relative;
}

.page-title::after {
  content: '';
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  border-radius: 2px;
}

/* Enhanced form inputs */
.form-group input,
.form-group textarea {
  border-radius: 12px;
  border: 2px solid #e5e7eb;
  padding: 14px 18px;
  transition: var(--transition);
  background: var(--surface);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--brand-light);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: none;
  transform: translateY(-2px);
}

/* Enhanced faculty cards */
.teacher {
  position: relative;
  transition: var(--transition);
  background: var(--surface);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.teacher:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 50px rgba(11, 59, 126, 0.25);
}

.teacher::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--brand), var(--brand-light), var(--accent));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.teacher:hover::before {
  transform: scaleX(1);
}

.teacher-info {
  padding: 20px;
  text-align: center;
  background: linear-gradient(to bottom, transparent, rgba(11, 59, 126, 0.02));
}

.teacher-info h3 {
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 8px;
  transition: var(--transition);
}

.teacher:hover .teacher-info h3 {
  color: var(--brand-light);
  transform: scale(1.05);
}

.teacher-info span {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Uniform faculty photo sizes */
.teacher-img {
  position: relative;
  overflow: hidden;
  padding-top: 100%; /* 1:1 aspect ratio */
}

.teacher-img img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: var(--transition);
}

.teacher:hover .teacher-img img {
  transform: scale(1.1);
  filter: brightness(1.1);
}

/* Social icons with modern styling */
.teacher .sc-div {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-radius: 15px;
  padding: 15px;
  box-shadow: var(--shadow-lg);
}

.teacher .sc-div ul li a {
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-light));
  color: white;
}

.teacher .sc-div ul li a:hover {
  transform: translateY(-3px) scale(1.1);
  box-shadow: 0 10px 20px rgba(11, 59, 126, 0.4);
}
}
