/* ===== Fuli Middle School - Common Styles ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #660874;
  --primary-dark: #4a0555;
  --primary-light: #8e44ad;
  --gold: #c9a96e;
  --text: #333;
  --text-light: #666;
  --bg: #f5f5f5;
  --white: #fff;
  --border: #e0e0e0;
}
body {
  font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  line-height: 1.8;
  background: var(--bg);
}
a { text-decoration: none; color: inherit; transition: color 0.3s; }
a:hover { color: var(--primary-light); }
img { max-width: 100%; display: block; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ===== Top Bar ===== */
.top-bar {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  font-size: 12px;
  padding: 6px 0;
}
.top-bar .container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.top-bar a { color: rgba(255,255,255,0.8); margin-left: 15px; }
.top-bar a:hover { color: #fff; }

/* ===== Header ===== */
header {
  background: var(--white);
  border-bottom: 3px solid var(--primary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
}
.logo { display: flex; align-items: center; gap: 15px; }
.logo-icon {
  width: 60px; height: 60px;
  background: var(--primary);
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.8);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.logo-text h1 { font-size: 26px; color: var(--primary); font-weight: bold; letter-spacing: 2px; }
.logo-text p { font-size: 12px; color: var(--text-light); letter-spacing: 1px; }
.nav-toggle { display: none; font-size: 24px; cursor: pointer; background: none; border: none; color: var(--primary); }

nav.main-nav { background: var(--white); }
nav.main-nav ul { display: flex; list-style: none; gap: 5px; }
nav.main-nav > .container > ul { justify-content: center; }
nav.main-nav a {
  display: block;
  padding: 14px 22px;
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
  border-bottom: 3px solid transparent;
}
nav.main-nav a:hover, nav.main-nav a.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ===== Page Banner (for inner pages) ===== */
.page-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 60px 0;
  text-align: center;
}
.page-banner h2 { font-size: 34px; letter-spacing: 3px; margin-bottom: 10px; text-shadow: 2px 2px 8px rgba(0,0,0,0.3); }
.page-banner p { font-size: 16px; opacity: 0.9; letter-spacing: 1px; }
.breadcrumb { background: var(--white); padding: 12px 0; font-size: 13px; color: var(--text-light); border-bottom: 1px solid var(--border); }
.breadcrumb a { color: var(--primary-light); }
.breadcrumb a:hover { text-decoration: underline; }

/* ===== Hero Carousel ===== */
.hero { position: relative; height: 520px; overflow: hidden; }
.carousel { position: relative; width: 100%; height: 100%; }
.carousel-slide {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  opacity: 0; transition: opacity 1s ease;
}
.carousel-slide.active { opacity: 1; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(74,5,85,0.6) 0%, rgba(102,8,116,0.4) 100%);
  display: flex; align-items: center; justify-content: center;
  text-align: center; color: #fff; padding: 20px;
}
.carousel-overlay h2 { font-size: 46px; margin-bottom: 18px; text-shadow: 2px 2px 8px rgba(0,0,0,0.5); letter-spacing: 4px; }
.carousel-overlay p { font-size: 19px; text-shadow: 1px 1px 4px rgba(0,0,0,0.5); letter-spacing: 2px; }
.carousel-dots { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; gap: 12px; z-index: 10; }
.carousel-dots span { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.5); cursor: pointer; transition: all 0.3s; }
.carousel-dots span.active { background: #fff; transform: scale(1.3); }
.carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.3); color: #fff; border: none; width: 50px; height: 50px; border-radius: 50%; font-size: 20px; cursor: pointer; z-index: 10; transition: background 0.3s; }
.carousel-arrow:hover { background: rgba(0,0,0,0.6); }
.carousel-arrow.prev { left: 30px; }
.carousel-arrow.next { right: 30px; }

/* ===== Section Common ===== */
section { padding: 60px 0; }
.section-title { text-align: center; margin-bottom: 40px; }
.section-title h2 { font-size: 30px; color: var(--primary); display: inline-block; position: relative; padding-bottom: 12px; }
.section-title h2::after { content: ''; position: absolute; bottom: 0; left: 50%; transform: translateX(-50%); width: 60px; height: 3px; background: var(--gold); }
.section-title p { color: var(--text-light); font-size: 14px; margin-top: 8px; }

/* ===== About Section ===== */
#about { background: var(--white); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.about-img { border-radius: 8px; overflow: hidden; box-shadow: 0 8px 25px rgba(0,0,0,0.15); }
.about-img img { width: 100%; height: 420px; object-fit: cover; }
.about-text h3 { font-size: 24px; color: var(--primary); margin-bottom: 15px; }
.about-text p { margin-bottom: 15px; color: var(--text-light); text-align: justify; }
.about-text .highlight { color: var(--primary); font-weight: bold; }

/* ===== Stats ===== */
.stats { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat-item { padding: 20px; }
.stat-item .num { font-size: 42px; font-weight: bold; color: var(--gold); }
.stat-item .label { font-size: 14px; margin-top: 5px; opacity: 0.9; }

/* ===== Philosophy Section ===== */
.philosophy-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px; }
.philosophy-card { background: var(--white); border-radius: 8px; padding: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); border-left: 4px solid var(--primary); }
.philosophy-card h3 { font-size: 19px; color: var(--primary); margin-bottom: 12px; }
.philosophy-card p { color: var(--text-light); font-size: 15px; }
.philosophy-card .quote { font-style: italic; color: var(--primary-light); font-size: 17px; font-weight: 500; }

/* ===== Features ===== */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 25px; }
.feature-card { background: var(--white); border-radius: 8px; padding: 30px 25px; text-align: center; box-shadow: 0 4px 15px rgba(0,0,0,0.08); transition: transform 0.3s; border-top: 3px solid transparent; }
.feature-card:hover { transform: translateY(-8px); border-top-color: var(--primary); }
.feature-icon { width: 70px; height: 70px; margin: 0 auto 20px; background: rgba(102,8,116,0.1); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 30px; }
.feature-card h3 { font-size: 18px; color: var(--primary); margin-bottom: 12px; }
.feature-card p { font-size: 14px; color: var(--text-light); }
.feature-card a.more-link { display: inline-block; margin-top: 12px; color: var(--primary-light); font-size: 13px; font-weight: 500; }
.feature-card a.more-link:hover { color: var(--primary); text-decoration: underline; }

/* ===== Facilities & Faculty ===== */
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.info-card { background: var(--white); border-radius: 8px; padding: 30px; box-shadow: 0 4px 15px rgba(0,0,0,0.08); }
.info-card h3 { font-size: 20px; color: var(--primary); margin-bottom: 18px; padding-bottom: 10px; border-bottom: 2px solid var(--gold); }
.info-card ul { list-style: none; }
.info-card li { padding: 8px 0 8px 25px; position: relative; color: var(--text-light); font-size: 15px; }
.info-card li::before { content: '◆'; color: var(--primary-light); position: absolute; left: 0; }
.info-card .faculty-line { display: flex; justify-content: space-between; padding: 10px 0; border-bottom: 1px dashed var(--border); font-size: 15px; }
.info-card .faculty-line:last-child { border-bottom: none; }
.info-card .faculty-line .val { color: var(--primary); font-weight: bold; }

/* ===== Campus Gallery ===== */
#campus { background: var(--white); }
.gallery-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.gallery-item { border-radius: 8px; overflow: hidden; position: relative; cursor: pointer; aspect-ratio: 4/3; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .caption { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.8)); color: #fff; padding: 35px 18px 18px; font-size: 16px; font-weight: 500; }

/* ===== Specialty Page Styles ===== */
.specialty-hero {
  background: linear-gradient(135deg, rgba(74,5,85,0.85) 0%, rgba(102,8,116,0.75) 100%),
              url('https://trae-api-cn.mchost.guru/api/ide/v1/text_to_image?prompt=art%20class%20students%20painting%20classroom%20colorful&image_size=landscape_16_9') center/cover;
  padding: 80px 0;
  color: #fff;
  text-align: center;
}
.specialty-hero h2 { font-size: 36px; letter-spacing: 3px; margin-bottom: 12px; text-shadow: 2px 2px 8px rgba(0,0,0,0.4); }
.specialty-hero p { font-size: 18px; opacity: 0.95; letter-spacing: 1px; }
.specialty-content { background: var(--white); }
.specialty-content .lead {
  font-size: 18px;
  color: var(--text);
  text-align: center;
  max-width: 800px;
  margin: 0 auto 30px;
  padding: 20px;
  background: rgba(102,8,116,0.05);
  border-radius: 8px;
  border-left: 4px solid var(--primary);
}
.specialty-block { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; margin-bottom: 40px; }
.specialty-block.reverse .specialty-block-text { order: 2; }
.specialty-block img { width: 100%; height: 320px; object-fit: cover; border-radius: 8px; box-shadow: 0 6px 20px rgba(0,0,0,0.12); }
.specialty-block-text h3 { font-size: 22px; color: var(--primary); margin-bottom: 15px; }
.specialty-block-text p { color: var(--text-light); margin-bottom: 12px; text-align: justify; }
.specialty-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 30px; }
.specialty-feature { text-align: center; padding: 25px 15px; background: var(--bg); border-radius: 8px; }
.specialty-feature .icon { font-size: 36px; margin-bottom: 12px; }
.specialty-feature h4 { font-size: 16px; color: var(--primary); margin-bottom: 8px; }
.specialty-feature p { font-size: 13px; color: var(--text-light); }
.cta-box {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  text-align: center;
  padding: 40px 20px;
  border-radius: 8px;
  margin-top: 30px;
}
.cta-box h3 { font-size: 22px; margin-bottom: 12px; }
.cta-box p { font-size: 15px; opacity: 0.9; margin-bottom: 20px; }
.cta-box .btn {
  display: inline-block;
  background: var(--gold);
  color: var(--primary-dark);
  padding: 12px 36px;
  border-radius: 25px;
  font-weight: bold;
  font-size: 15px;
}
.cta-box .btn:hover:enabled { background: #fff; color: var(--primary-dark); }

/* ===== Contact Section ===== */
#contact-section { background: var(--white); }
.contact-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; }
.contact-info-card { background: var(--bg); border-radius: 8px; padding: 30px; }
.contact-info-card h3 { font-size: 20px; color: var(--primary); margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--gold); }
.contact-list { list-style: none; }
.contact-list li { padding: 12px 0; display: flex; align-items: flex-start; gap: 12px; border-bottom: 1px dashed var(--border); font-size: 15px; }
.contact-list li:last-child { border-bottom: none; }
.contact-list li .ico { font-size: 20px; flex-shrink: 0; }
.contact-list li .label { color: var(--text-light); min-width: 80px; }
.contact-list li .val { color: var(--text); font-weight: 500; }
.contact-list li .val.highlight { color: var(--primary); font-weight: bold; }
.contact-note { font-size: 12px; color: var(--text-light); margin-top: 15px; padding: 10px; background: rgba(201,169,110,0.1); border-radius: 4px; border-left: 3px solid var(--gold); }
.contact-map { border-radius: 8px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.contact-map img { width: 100%; height: 100%; object-fit: cover; min-height: 300px; }

/* ===== Footer ===== */
footer { background: #2c0a33; color: rgba(255,255,255,0.7); padding: 50px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 30px; }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 18px; }
.footer-col p, .footer-col a { font-size: 13px; line-height: 2; }
.footer-col a:hover { color: var(--gold); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 30px; padding-top: 20px; text-align: center; font-size: 12px; color: rgba(255,255,255,0.5); }

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .about-grid, .philosophy-grid, .info-grid, .specialty-block, .contact-grid { grid-template-columns: 1fr; }
  .specialty-block.reverse .specialty-block-text { order: 0; }
  .features-grid, .specialty-features { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .hero { height: 420px; }
  .carousel-overlay h2 { font-size: 34px; }
}
@media (max-width: 600px) {
  .nav-toggle { display: block; }
  nav.main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
  nav.main-nav.open { display: block; }
  nav.main-nav ul { flex-direction: column; }
  nav.main-nav a { padding: 12px 20px; border-bottom: 1px solid var(--border); }
  .header-main { padding: 12px 0; }
  .logo-icon { width: 45px; height: 45px; font-size: 18px; }
  .logo-text h1 { font-size: 18px; }
  .logo-text p { font-size: 10px; }
  .hero { height: 320px; }
  .carousel-overlay h2 { font-size: 24px; letter-spacing: 2px; }
  .carousel-overlay p { font-size: 14px; }
  .features-grid, .specialty-features, .gallery-grid, .stats-grid, .footer-grid { grid-template-columns: 1fr; }
  .carousel-arrow { width: 38px; height: 38px; font-size: 16px; }
  .carousel-arrow.prev { left: 10px; }
  .carousel-arrow.next { right: 10px; }
  section { padding: 40px 0; }
  .section-title h2 { font-size: 24px; }
  .page-banner h2 { font-size: 24px; }
  .specialty-hero h2 { font-size: 26px; }
}
