/* ============================================
   ISTech - Home Page (index.css)
   ============================================ */

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  padding: calc(var(--nav-h) + 35px) 0 80px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  background: var(--bg);
  transition: background 0.8s ease;
}

.hero.dark-mode {
  background: var(--primary);
}

.hero-bg-shape {
  position: absolute;
  top: -200px; right: -200px;
  width: 700px; height: 700px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(0,194,168,0.09) 0%, transparent 65%);
  pointer-events: none;
  animation: floatShape 8s ease-in-out infinite;
}

.hero-bg-shape2 {
  position: absolute;
  bottom: -150px; left: -100px;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(10,37,64,0.06) 0%, transparent 65%);
  pointer-events: none;
  animation: floatShape 10s ease-in-out infinite reverse;
}

.hero.dark-mode .hero-bg-shape {
  background: radial-gradient(circle at center, rgba(0,194,168,0.15) 0%, transparent 65%);
}

.hero.dark-mode .hero-bg-shape2 {
  background: radial-gradient(circle at center, rgba(255,255,255,0.05) 0%, transparent 65%);
}

@keyframes floatShape {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-30px) scale(1.04); }
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero-content {
  animation: heroIn 0.8s ease both;
}

@keyframes heroIn {
  from { opacity: 0; transform: translateY(32px); }
  to { opacity: 1; transform: none; }
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(0,194,168,0.08);
  border: 1px solid rgba(0,194,168,0.2);
  border-radius: 50px;
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 10px;
  transition: all 0.6s ease;
}

.hero.dark-mode .hero-pill {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.8);
}

.hero-pill-dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

.hero.dark-mode .hero-pill-dot {
  background: rgba(255,255,255,0.8);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(38px, 5.5vw, 48px);
  font-weight: 800;
  line-height: 1.08;
  color: var(--primary);
  margin-bottom: 15px;
  transition: color 0.6s ease;
}

.hero.dark-mode .hero-title {
  color: #fff;
}

.hero-title-accent {
  color: var(--accent);
  position: relative;
  transition: color 0.6s ease;
}

.hero.dark-mode .hero-title-accent {
  color: #00e5ce;
}

.hero-title-accent::after {
  content: '';
  position: absolute;
  bottom: 2px; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), transparent);
  border-radius: 2px;
  opacity: 0.4;
}

.hero-desc {
  font-size: 17px;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.75;
  margin-bottom: 12px;
  font-weight: 300;
  transition: color 0.6s ease;
}

.hero.dark-mode .hero-desc {
  color: rgba(255,255,255,0.6);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

/* Switch Button */
.hero-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 50px;
  background: var(--accent);
  color: var(--primary);
  border: none;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s ease;
  box-shadow: 0 4px 12px rgba(0,194,168,0.2);
  margin-bottom: 20px;
  position: relative;
}

.hero-switch-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,194,168,0.3);
}

.hero.dark-mode .hero-switch-btn {
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 2px solid rgba(255,255,255,0.3);
  box-shadow: none;
}

.hero.dark-mode .hero-switch-btn:hover {
  background: rgba(255,255,255,0.2);
  border-color: rgba(255,255,255,0.5);
}

.switch-icon {
  font-size: 16px;
  transition: transform 0.4s ease;
}

.hero-switch-btn:active .switch-icon {
  transform: rotate(180deg);
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 24px;
  transition: all 0.6s ease;
}

.hero.dark-mode .hero-stats {
  color: rgba(255,255,255,0.8);
}

.hero-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-stat-num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  transition: color 0.6s ease;
}

.hero.dark-mode .hero-stat-num {
  color: #fff;
}

.hero-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  transition: color 0.6s ease;
}

.hero.dark-mode .hero-stat-label {
  color: rgba(255,255,255,0.5);
}

.hero-stat-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  transition: background 0.6s ease;
}

.hero.dark-mode .hero-stat-divider {
  background: rgba(255,255,255,0.1);
}

/* Category Content Animation */
.hero-category-content {
  display: none;
  opacity: 0;
  animation: fadeInContent 0.6s ease forwards;
}

.hero-category-content.active {
  display: block;
  opacity: 1;
}

@keyframes fadeInContent {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Visual */
.hero-visual {
  display: none;
  justify-content: center;
  align-items: center;
  animation: heroIn 0.8s 0.2s ease both;
  perspective: 1000px;
}

.hero-visual.active {
  display: flex;
}

.hero-card-stack {
  position: relative;
  width: 400px;
  height: 420px;
}

.hcard {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow-md);
  transition: transform 0.4s ease, filter 0.4s ease;
  will-change: transform;
}

.hcard:hover { 
  transform: translateY(-5px) scale(1.02) !important;
  box-shadow: var(--shadow-lg);
  filter: brightness(1.05);
}

.hcard-1 {
  top: 20px; left: 30px;
  width: 300px;
  transform: rotate(-8deg);
  z-index: 30;
  animation: cardFloat1 6s ease-in-out infinite;
}

.hcard-2 {
  top: 134px; right: 20px;
  width: 300px;
  transform: rotate(5deg);
  z-index: 20;
  animation: cardFloat2 7s ease-in-out infinite;
}

.hcard-3 {
  bottom: 92px; left: 50px;
  width: 300px;
  transform: rotate(-3deg);
  z-index: 10;
  animation: cardFloat3 8s ease-in-out infinite;
}

.hcard-4 {
  bottom: -14px; right: 60px;
  width: 270px;
  transform: rotate(4deg);
  z-index: 5;
  animation: cardFloat4 6.5s ease-in-out infinite;
}

@keyframes cardFloat1 {
  0%, 100% { transform: rotate(-8deg) translateY(0); }
  50% { transform: rotate(-8deg) translateY(-15px); }
}
@keyframes cardFloat2 {
  0%, 100% { transform: rotate(5deg) translateY(0); }
  50% { transform: rotate(5deg) translateY(-18px); }
}
@keyframes cardFloat3 {
  0%, 100% { transform: rotate(-3deg) translateY(0); }
  50% { transform: rotate(-3deg) translateY(-12px); }
}
@keyframes cardFloat4 {
  0%, 100% { transform: rotate(4deg) translateY(0); }
  50% { transform: rotate(4deg) translateY(-20px); }
}

.hcard-icon {
  width: 44px; height: 44px;
  background: var(--surface-alt);
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}

.hcard-info strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--primary);
  font-family: var(--font-display);
}

.hcard-info span {
  font-size: 12px;
  color: var(--text-muted);
}

.hcard-badge {
  margin-left: auto;
  background: rgba(0,194,168,0.1);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 50px;
  white-space: nowrap;
}

.hcard-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 280px; height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,194,168,0.1) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

/* Scroll hint */
.hero-scroll-hint {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeIn 1s 1s both;
  transition: color 0.6s ease;
}

.hero.dark-mode .hero-scroll-hint {
  color: rgba(255,255,255,0.5);
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.scroll-arrow {
  width: 18px; height: 18px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(45deg);
  animation: scrollBounce 1.5s ease-in-out infinite;
  transition: border-color 0.6s ease;
}

.hero.dark-mode .scroll-arrow {
  border-color: rgba(255,255,255,0.5);
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); }
  50% { transform: rotate(45deg) translateY(5px); }
}

/* ---------- Trust Bar ---------- */
.trust-bar {
  background: var(--surface);
  padding: 30px 0;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.trust-scroll {
  display: flex;
  gap: 3rem;
  animation: trustMove 28s linear infinite;
  white-space: nowrap;
  width: max-content;
}

.trust-scroll span {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  opacity: 0.6;
  transition: opacity var(--transition);
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

@keyframes trustMove {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ---------- Intro Section ---------- */
.intro-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}

.intro-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.intro-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: var(--text);
}

.check-icon {
  width: 22px; height: 22px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}

.intro-visual-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.iv-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition);
}
.iv-block:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.iv-block-1, .iv-block-4 { background: var(--primary); border-color: var(--primary); }
.iv-block-1 strong, .iv-block-4 strong { color: #fff; }
.iv-block-1 p, .iv-block-4 p { color: rgba(255,255,255,0.6); }

.iv-icon {
  font-size: 28px;
  line-height: 1;
}

.iv-block strong {
  display: block;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 4px;
}

.iv-block p {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

/* ---------- Courses Grid ---------- */
.section-head {
  text-align: center;
  margin-bottom: 56px;
}
.section-head .section-subtitle { margin: 12px auto 0; }

.courses-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.course-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all var(--transition);
}
.course-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.cc-top {
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.cc-top-blue { background: linear-gradient(135deg, #0a2540 0%, #1a4a8a 100%); }
.cc-top-teal { background: linear-gradient(135deg, #006b5f 0%, #00c2a8 100%); }
.cc-top-orange { background: linear-gradient(135deg, #c44a00 0%, #ff6b35 100%); }
.cc-top-purple { background: linear-gradient(135deg, #4a0080 0%, #9b59b6 100%); }

.cc-icon {
  font-size: 42px;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.2));
}

.cc-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cc-body h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--primary);
}

.cc-body p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.cc-btn {
  margin-top: 8px;
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: 14px;
}

.courses-cta {
  text-align: center;
  margin-top: 48px;
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
  margin: 48px 0;
}

.service-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 24px rgba(0, 194, 168, 0.12);
  transform: translateY(-4px);
}

.sc-top {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  position: relative;
  overflow: hidden;
}

.sc-top-blue {
  background: linear-gradient(135deg, rgba(0, 102, 204, 0.1) 0%, rgba(0, 102, 204, 0.05) 100%);
  border-bottom: 2px solid rgba(0, 102, 204, 0.2);
}

.sc-top-teal {
  background: linear-gradient(135deg, rgba(0, 194, 168, 0.1) 0%, rgba(0, 194, 168, 0.05) 100%);
  border-bottom: 2px solid rgba(0, 194, 168, 0.2);
}

.sc-top-orange {
  background: linear-gradient(135deg, rgba(255, 127, 39, 0.1) 0%, rgba(255, 127, 39, 0.05) 100%);
  border-bottom: 2px solid rgba(255, 127, 39, 0.2);
}

.sc-top-purple {
  background: linear-gradient(135deg, rgba(138, 43, 226, 0.1) 0%, rgba(138, 43, 226, 0.05) 100%);
  border-bottom: 2px solid rgba(138, 43, 226, 0.2);
}

.sc-icon {
  display: block;
  font-size: 48px;
}

.sc-body {
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.sc-body .badge {
  display: inline-block;
  padding: 6px 12px;
  background: var(--primary-soft);
  color: var(--accent);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  width: fit-content;
  margin-bottom: 12px;
}

.sc-body h3 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}

.sc-body p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  flex: 1;
}

.sc-btn {
  margin-top: 16px;
  width: 100%;
  justify-content: center;
  padding: 12px;
  font-size: 14px;
}

.services-cta {
  text-align: center;
  margin-top: 48px;
}

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, #0d3a6e 50%, #0a2540 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 500px; height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,194,168,0.15) 0%, transparent 65%);
  pointer-events: none;
}

.cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 1;
}

.cta-text h2 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 36px);
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.cta-text p {
  font-size: 16px;
  color: rgba(255,255,255,0.6);
  font-weight: 300;
}

.cta-actions {
  display: flex;
  gap: 14px;
  flex-shrink: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .courses-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { display: none !important; }
  .intro-grid { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; text-align: center; }
}

@media (max-width: 600px) {
  .courses-grid { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  .trust-bar .container { flex-direction: column; align-items: flex-start; gap: 14px; }
  .hero-card-stack { width: 100%; height: 300px; }
  .hcard-1, .hcard-2, .hcard-3, .hcard-4 { width: 220px !important; }
}