/* ===========================
   caipu321.com - Custom Styles
   =========================== */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;700&family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --primary: #1a56db;
  --primary-dark: #1e3a8a;
  --primary-light: #3b82f6;
  --accent: #60a5fa;
  --text-dark: #0f172a;
  --text-muted: #64748b;
  --bg-light: #f0f7ff;
  --white: #ffffff;
}

* {
  scroll-behavior: smooth;
}

body {
  font-family: 'Noto Sans SC', 'Inter', sans-serif;
  color: var(--text-dark);
  overflow-x: hidden;
}

/* ===================== NAVBAR ===================== */
.navbar-custom {
  background: rgba(10, 30, 80, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem 0;
  transition: background 0.3s ease, padding 0.3s ease;
}
.navbar-custom.scrolled {
  background: rgba(10, 30, 80, 1);
  padding: 0.6rem 0;
  box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}
.navbar-brand-text {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--white) !important;
  letter-spacing: 0.5px;
}
.navbar-brand-text span {
  color: var(--accent);
}
.navbar-custom .nav-link {
  color: rgba(255,255,255,0.85) !important;
  font-weight: 400;
  font-size: 0.95rem;
  padding: 0.5rem 1.1rem !important;
  transition: color 0.2s;
  position: relative;
}
.navbar-custom .nav-link::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 1.1rem;
  right: 1.1rem;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.25s ease;
}
.navbar-custom .nav-link:hover {
  color: var(--white) !important;
}
.navbar-custom .nav-link:hover::after {
  transform: scaleX(1);
}
.navbar-toggler {
  border-color: rgba(255,255,255,0.3);
}
.navbar-toggler-icon {
  filter: invert(1);
}

/* ===================== HERO ===================== */
#hero {
  min-height: 100vh;
  background: linear-gradient(135deg, #0d1b4b 0%, #1a3a8f 40%, #1e5bb5 70%, #3b82f6 100%);
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-label {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.3);
  color: var(--white);
  font-size: 0.8rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.35rem 1rem;
  border-radius: 50px;
  margin-bottom: 1.5rem;
  backdrop-filter: blur(5px);
}
.hero-title {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.25;
  margin-bottom: 1.5rem;
}
.hero-title span {
  background: linear-gradient(90deg, #93c5fd, #60a5fa);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-size: 1.1rem;
  color: rgba(255,255,255,0.75);
  font-weight: 300;
  max-width: 520px;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}
.btn-hero-primary {
  background: var(--white);
  color: var(--primary-dark);
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
}
.btn-hero-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
  color: var(--primary-dark);
}
.btn-hero-outline {
  background: transparent;
  color: var(--white);
  font-weight: 500;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  display: inline-block;
  border: 1.5px solid rgba(255,255,255,0.5);
  transition: border-color 0.2s, background 0.2s;
  margin-left: 1rem;
}
.btn-hero-outline:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.1);
  color: var(--white);
}
.hero-graphic {
  position: relative;
  z-index: 1;
}
.hero-graphic .card-float {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(15px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 2rem;
  color: white;
  animation: float 6s ease-in-out infinite;
}
.hero-graphic .card-float h3 {
  font-size: 3rem;
  font-weight: 700;
  color: #93c5fd;
  margin: 0;
}
.hero-graphic .card-float p {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.8;
}
.hero-graphic .stat-badge {
  display: inline-block;
  background: var(--accent);
  color: white;
  border-radius: 10px;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  font-weight: 600;
  margin: 0.3rem;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}
.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(255,255,255,0.6);
  animation: bounce 2s ease-in-out infinite;
  cursor: pointer;
  font-size: 0.85rem;
  text-align: center;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* ===================== SECTIONS GENERAL ===================== */
.section-label {
  display: inline-block;
  background: var(--bg-light);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0.3rem 0.9rem;
  border-radius: 50px;
  margin-bottom: 1rem;
  border: 1px solid rgba(26, 86, 219, 0.2);
}
.section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.3;
}
.section-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  max-width: 600px;
  margin: 0 auto;
}

/* ===================== SERVICES ===================== */
#services {
  background: var(--bg-light);
  padding: 5rem 0;
}
.service-card {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  height: 100%;
  transition: transform 0.3s, box-shadow 0.3s;
  border: 1px solid rgba(26, 86, 219, 0.08);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--primary-light));
  transform: scaleX(0);
  transition: transform 0.3s;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px rgba(26, 86, 219, 0.12);
}
.service-card:hover::before {
  transform: scaleX(1);
}
.service-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, var(--bg-light), #dbeafe);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
  font-size: 1.5rem;
}
.service-card h5 {
  font-weight: 600;
  font-size: 1.05rem;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}
.service-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

/* ===================== ABOUT ===================== */
#about {
  padding: 5rem 0;
  background: var(--white);
}
.stat-card {
  text-align: center;
  padding: 1.5rem;
}
.stat-card .stat-num {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1;
}
.stat-card .stat-num sup {
  font-size: 1.2rem;
}
.stat-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0.5rem 0 0;
}
.about-img-wrapper {
  position: relative;
}
.about-img-bg {
  position: absolute;
  top: -20px; right: -20px;
  bottom: 20px; left: 20px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 20px;
  z-index: 0;
  opacity: 0.15;
}
.about-img-wrapper img {
  position: relative;
  z-index: 1;
  border-radius: 16px;
  width: 100%;
}

/* ===================== PORTFOLIO ===================== */
#portfolio {
  padding: 5rem 0;
  background: #f8faff;
}
.portfolio-card {
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  background: var(--white);
  box-shadow: 0 4px 20px rgba(0,0,0,0.07);
  transition: transform 0.3s, box-shadow 0.3s;
  height: 100%;
}
.portfolio-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 40px rgba(26, 86, 219, 0.15);
}
.portfolio-thumb {
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  position: relative;
  overflow: hidden;
}
.portfolio-card-body {
  padding: 1.25rem 1.5rem;
}
.portfolio-card-body h6 {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.35rem;
  color: var(--text-dark);
}
.portfolio-card-body p {
  font-size: 0.83rem;
  color: var(--text-muted);
  margin: 0;
}
.portfolio-tag {
  display: inline-block;
  font-size: 0.75rem;
  background: var(--bg-light);
  color: var(--primary);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-top: 0.5rem;
  font-weight: 500;
}

/* ===================== WHY US ===================== */
#whyus {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  position: relative;
  overflow: hidden;
}
#whyus::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
#whyus .section-title { color: var(--white); }
#whyus .section-subtitle { color: rgba(255,255,255,0.7); }
.whyus-item {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.whyus-item-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.whyus-item-text h6 {
  color: var(--white);
  font-weight: 600;
  margin-bottom: 0.35rem;
  font-size: 1rem;
}
.whyus-item-text p {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  margin: 0;
  line-height: 1.6;
}
.whyus-cta {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 20px;
  padding: 2.5rem;
  text-align: center;
  color: white;
  backdrop-filter: blur(10px);
}
.whyus-cta h3 { font-weight: 700; margin-bottom: 0.75rem; }
.whyus-cta p { opacity: 0.75; margin-bottom: 1.5rem; }
.btn-white {
  background: var(--white);
  color: var(--primary-dark);
  font-weight: 600;
  padding: 0.75rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s, box-shadow 0.2s;
  border: none;
}
.btn-white:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.25);
  color: var(--primary-dark);
}

/* ===================== NEWS ===================== */
#news {
  padding: 5rem 0;
  background: var(--white);
}
.news-card {
  border-radius: 14px;
  border: 1px solid rgba(0,0,0,0.07);
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
  height: 100%;
}
.news-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 35px rgba(26, 86, 219, 0.1);
}
.news-card-img {
  height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
}
.news-card-body { padding: 1.25rem; }
.news-date {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.news-card-body h6 {
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.5;
  margin-bottom: 0.5rem;
}
.news-card-body p {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ===================== CONTACT ===================== */
#contact {
  padding: 5rem 0;
  background: var(--bg-light);
}
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.contact-icon {
  width: 46px;
  height: 46px;
  background: var(--primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: white;
  flex-shrink: 0;
}
.contact-info-text strong {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 0.2rem;
}
.contact-info-text span {
  font-size: 1rem;
  color: var(--text-dark);
  font-weight: 600;
}
.contact-form .form-control,
.contact-form .form-select {
  border-radius: 10px;
  border: 1.5px solid #e2e8f0;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.contact-form .form-control:focus,
.contact-form .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 86, 219, 0.12);
}
.btn-primary-custom {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
  border: none;
  border-radius: 50px;
  padding: 0.75rem 2.5rem;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary-custom:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(26, 86, 219, 0.35);
  color: white;
}

/* ===================== FOOTER ===================== */
footer {
  background: #0a1233;
  color: rgba(255,255,255,0.6);
  padding: 3rem 0 1.5rem;
}
footer .brand-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
}
footer .brand-name span { color: var(--accent); }
footer p { font-size: 0.88rem; line-height: 1.8; }
footer a { color: rgba(255,255,255,0.55); text-decoration: none; font-size: 0.88rem; }
footer a:hover { color: var(--accent); }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.5rem; }
footer h6 { color: white; font-weight: 600; font-size: 0.9rem; margin-bottom: 1rem; letter-spacing: 0.5px; }
.footer-divider { border-color: rgba(255,255,255,0.1); margin: 2rem 0 1.5rem; }
.footer-bottom { font-size: 0.82rem; }
.footer-icp a { color: rgba(255,255,255,0.45); }
.footer-icp a:hover { color: var(--accent); }

/* ===================== BACK TO TOP ===================== */
#backToTop {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  background: var(--primary);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 1.1rem;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(26, 86, 219, 0.4);
  transition: background 0.2s, transform 0.2s;
  z-index: 999;
}
#backToTop:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
}
#backToTop.visible {
  display: flex;
}

/* ===================== UTILITIES ===================== */
.text-primary-custom { color: var(--primary) !important; }
.bg-primary-custom { background: var(--primary) !important; }

@media (max-width: 768px) {
  .hero-title { font-size: 1.9rem; }
  .btn-hero-outline { margin-left: 0; margin-top: 0.75rem; }
  .hero-graphic { margin-top: 3rem; }
}
