/* =========================
   Hero helpers
========================= */
.badge {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 0.9rem;
  margin-bottom: 18px;
}

/* =========================
   Buttons
========================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: var(--transition-fast);
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-surface);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  background: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.btn-secondary {
  border-color: var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.btn.accent {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: var(--color-surface);
  border: 1px solid transparent;
  font-weight: 600;
  position: relative;
  overflow: hidden;
}

.btn.accent::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
  transform: rotate(45deg);
  animation: shine 3s infinite;
}

@keyframes shine {
  0% { transform: translateX(-100%) rotate(45deg); }
  100% { transform: translateX(100%) rotate(45deg); }
}

.btn.accent:hover,
.btn.accent:focus-visible {
  background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* =========================
   Cards
========================= */
.card,
.stat-card,
.cta-box,
.stat-box,
.faq-item,
.gallery-item,
.form-wrapper {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.card {
  padding: 24px;
  transition: var(--transition-fast);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.card h3 {
  margin-bottom: 12px;
  color: var(--color-primary);
}

.stat-card {
  padding: 28px;
}

.stat-card h3 {
  margin-bottom: 16px;
  color: var(--color-primary);
}

.stat-card ul li {
  padding: 10px 0;
  border-bottom: 1px solid var(--color-border);
}

.stat-card ul li:last-child {
  border-bottom: 0;
}

.gallery-item {
  min-height: 220px;
  overflow: hidden;
  background: var(--color-surface-alt);
  position: relative;
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(37, 99, 235, 0.1);
}

.gallery-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.15) 0%, rgba(124, 58, 237, 0.15) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.1) 50%, transparent 60%);
  opacity: 0;
  transform: translateX(-100%);
  transition: none;
  z-index: 2;
}

.gallery-item:hover::before {
  opacity: 1;
}

.gallery-item:hover::after {
  opacity: 1;
  animation: galleryShine 0.8s ease;
}

@keyframes galleryShine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.gallery-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.2), 0 0 0 2px rgba(37, 99, 235, 0.3);
  border-color: rgba(37, 99, 235, 0.4);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 2;
  pointer-events: none;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-tech-lines {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(37, 99, 235, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.1) 1px, transparent 1px);
  background-size: 20px 20px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-tech-lines {
  opacity: 1;
}

.gallery-corner {
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid var(--color-primary);
  opacity: 0;
  transition: all 0.3s ease;
}

.gallery-corner--tl {
  top: 10px;
  left: 10px;
  border-right: none;
  border-bottom: none;
}

.gallery-corner--tr {
  top: 10px;
  right: 10px;
  border-left: none;
  border-bottom: none;
}

.gallery-corner--bl {
  bottom: 10px;
  left: 10px;
  border-right: none;
  border-top: none;
}

.gallery-corner--br {
  bottom: 10px;
  right: 10px;
  border-left: none;
  border-top: none;
}

.gallery-item:hover .gallery-corner {
  opacity: 1;
}

.gallery-item:hover .gallery-corner--tl {
  transform: translate(-5px, -5px);
}

.gallery-item:hover .gallery-corner--tr {
  transform: translate(5px, -5px);
}

.gallery-item:hover .gallery-corner--bl {
  transform: translate(-5px, 5px);
}

.gallery-item:hover .gallery-corner--br {
  transform: translate(5px, 5px);
}

.gallery-icon {
  width: 60px;
  height: 60px;
  background: rgba(37, 99, 235, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  transform: scale(0);
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

.gallery-item:hover .gallery-icon {
  transform: scale(1);
}

/* Gallery Section */
.gallery-section {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.gallery-tech-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.gallery-tech-grid {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(37, 99, 235, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.03) 1px, transparent 1px);
  background-size: 40px 40px;
}

.gallery-tech-glow {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.15;
  animation: galleryTechGlow 8s ease-in-out infinite;
}

.gallery-tech-glow--1 {
  top: -100px;
  right: -100px;
  background: var(--color-primary);
  animation-delay: 0s;
}

.gallery-tech-glow--2 {
  bottom: -100px;
  left: -100px;
  background: var(--color-secondary);
  animation-delay: 2.5s;
}

.gallery-tech-glow--3 {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--color-accent);
  animation-delay: 5s;
}

@keyframes galleryTechGlow {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.15;
  }
  50% {
    transform: translate(30px, -30px) scale(1.3);
    opacity: 0.25;
  }
}

.gallery-scanline {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 50%,
    rgba(37, 99, 235, 0.02) 50%
  );
  background-size: 100% 4px;
  pointer-events: none;
}

/* Gallery Grid - Fixed 3x2 Layout */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 20px;
  margin-bottom: 40px;
  position: relative;
  z-index: 1;
}

@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
  }
}

@media (max-width: 640px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(6, 1fr);
  }
}

/* Gallery CTA Section */
.gallery-cta {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0;
  position: relative;
  z-index: 1;
}

.gallery-cta-text {
  margin-top: 16px;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 0.95rem;
  max-width: 500px;
  line-height: 1.6;
}

.gallery-bale-btn {
  position: relative;
  display: inline-flex;
  text-decoration: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-width: 320px;
  transition: transform 0.3s ease;
  z-index: 1;
}

.gallery-bale-btn:hover {
  transform: translateY(-4px);
}

.gallery-bale-btn-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  background-color: var(--color-primary);
  z-index: 0;
  opacity: 1;
  display: block;
}

.gallery-bale-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.3;
  z-index: 0;
}

.gallery-bale-glow {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  animation: galleryBaleGlow 4s ease-in-out infinite;
}

.gallery-bale-glow--1 {
  top: -50px;
  left: -50px;
  background: var(--color-accent);
  animation-delay: 0s;
}

.gallery-bale-glow--2 {
  bottom: -50px;
  right: -50px;
  background: var(--color-secondary);
  animation-delay: 2s;
}

@keyframes galleryBaleGlow {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.4;
  }
  50% {
    transform: translate(20px, 20px) scale(1.2);
    opacity: 0.6;
  }
}

.gallery-bale-btn-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 28px;
  color: #ffffff !important;
  opacity: 1;
  display: flex;
}

.gallery-bale-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.gallery-bale-btn:hover .gallery-bale-icon {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(-10deg) scale(1.1);
}

.gallery-bale-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.gallery-bale-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
  font-weight: 600;
  color: #ffffff !important;
}

.gallery-bale-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff !important;
}

.gallery-bale-arrow {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.gallery-bale-btn:hover .gallery-bale-arrow {
  transform: translateX(-8px);
  background: rgba(255, 255, 255, 0.3);
}

.gallery-cta-buttons {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  justify-content: center;
}

.gallery-eitaa-btn {
  position: relative;
  display: inline-flex;
  text-decoration: none;
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-width: 320px;
  transition: transform 0.3s ease;
  z-index: 1;
}

.gallery-eitaa-btn:hover {
  transform: translateY(-4px);
}

.gallery-eitaa-btn-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #00a651 0%, #008c44 100%);
  background-color: #00a651;
  z-index: 0;
  opacity: 1;
  display: block;
}

.gallery-eitaa-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.1) 1px, transparent 1px);
  background-size: 30px 30px;
  opacity: 0.3;
  z-index: 0;
}

.gallery-eitaa-glow {
  position: absolute;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
  animation: galleryEitaaGlow 4s ease-in-out infinite;
}

.gallery-eitaa-glow--1 {
  top: -50px;
  left: -50px;
  background: #00ff88;
  animation-delay: 0s;
}

.gallery-eitaa-glow--2 {
  bottom: -50px;
  right: -50px;
  background: #00cc6a;
  animation-delay: 2s;
}

@keyframes galleryEitaaGlow {
  0%, 100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.4;
  }
  50% {
    transform: translate(20px, 20px) scale(1.2);
    opacity: 0.6;
  }
}

.gallery-eitaa-btn-inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 28px;
  color: #ffffff !important;
  opacity: 1;
  display: flex;
}

.gallery-eitaa-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  transition: all 0.3s ease;
}

.gallery-eitaa-btn:hover .gallery-eitaa-icon {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(-10deg) scale(1.1);
}

.gallery-eitaa-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.gallery-eitaa-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
  font-weight: 600;
  color: #ffffff !important;
}

.gallery-eitaa-text {
  font-size: 1.1rem;
  font-weight: 700;
  color: #ffffff !important;
}

.stat-box {
  padding: 28px 20px;
  text-align: center;
}

.stat-box strong {
  display: block;
  font-size: 2rem;
  color: var(--color-primary);
  margin-bottom: 8px;
}

/* =========================
   Navigation
========================= */
.main-nav a {
  position: relative;
}

.main-nav a.active {
  color: var(--color-secondary);
  font-weight: 700;
}

.main-nav a.active::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background-color: var(--color-secondary);
  border-radius: 2px;
}

/* =========================
   Forms & Inputs
========================= */
.form-wrapper {
  border-radius: var(--radius-lg);
  padding: 32px;
}

.admission-form {
  display: grid;
  gap: 24px;
}

.form-group {
  display: grid;
  gap: 10px;
}

.form-group label {
  font-weight: 600;
  color: var(--color-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  outline: none;
  transition: var(--transition-fast);
  color: var(--color-text);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-primary-light);
}

.input-error {
  border-color: #d93025 !important;
  box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.12);
}

.error-message {
  display: block;
  margin-top: 6px;
  color: #d93025;
  font-size: 0.85rem;
  line-height: 1.6;
}

.form-success {
  padding: 14px 16px;
  border-radius: 12px;
  background: #ecfdf3;
  border: 1px solid #a7f3d0;
  color: #166534;
  font-size: 0.95rem;
}

/* =========================
   FAQ & CTA
========================= */
.faq-list {
  display: grid;
  gap: 16px;
}

.faq-item {
  padding: 18px 20px;
}

.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--color-primary);
}

.faq-item p {
  margin-top: 12px;
  color: var(--color-text-muted);
}

.cta-box {
  padding: 32px;
}

.news-card .meta {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--color-secondary);
  font-size: 0.9rem;
}

/* =========================
   Animations
========================= */
.fade-in,
.slide-in {
  opacity: 0;
  transition: all 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
}

.slide-in {
  transform: translateY(24px);
}

.slide-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* =========================
   Floating Tech Icons
========================= */
.floating-tech-icons {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.tech-icon {
  position: absolute;
  font-size: 48px;
  color: rgba(37, 99, 235, 0.35);
  animation: techFloat 20s linear infinite;
}

.tech-icon:nth-child(1) { top: 10%; left: 5%; animation-delay: 0s; }
.tech-icon:nth-child(2) { top: 20%; right: 8%; animation-delay: -2s; }
.tech-icon:nth-child(3) { top: 30%; left: 12%; animation-delay: -4s; }
.tech-icon:nth-child(4) { top: 40%; right: 5%; animation-delay: -6s; }
.tech-icon:nth-child(5) { top: 50%; left: 8%; animation-delay: -8s; }
.tech-icon:nth-child(6) { top: 60%; right: 12%; animation-delay: -10s; }
.tech-icon:nth-child(7) { top: 70%; left: 5%; animation-delay: -12s; }
.tech-icon:nth-child(8) { top: 80%; right: 8%; animation-delay: -14s; }
.tech-icon:nth-child(9) { top: 15%; left: 20%; animation-delay: -1s; }
.tech-icon:nth-child(10) { top: 35%; right: 20%; animation-delay: -3s; }
.tech-icon:nth-child(11) { top: 55%; left: 25%; animation-delay: -5s; }
.tech-icon:nth-child(12) { top: 75%; right: 25%; animation-delay: -7s; }
.tech-icon:nth-child(13) { top: 25%; left: 35%; animation-delay: -9s; }
.tech-icon:nth-child(14) { top: 45%; right: 35%; animation-delay: -11s; }
.tech-icon:nth-child(15) { top: 65%; left: 40%; animation-delay: -13s; }

@keyframes techFloat {
  0% {
    opacity: 0;
    transform: translateY(30px) rotate(0deg);
  }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translateY(-30px) rotate(360deg);
  }
}

.floating-codes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.code-line {
  position: absolute;
  font-family: "Courier New", monospace;
  font-size: 14px;
  color: rgba(37, 99, 235, 0.15);
  animation: codeFloat 15s linear infinite;
}

.code-line:nth-child(1) { top: 20%; left: 10%; animation-delay: 0s; }
.code-line:nth-child(2) { top: 40%; right: 15%; animation-delay: -3s; }
.code-line:nth-child(3) { top: 60%; left: 20%; animation-delay: -6s; }
.code-line:nth-child(4) { top: 80%; right: 10%; animation-delay: -9s; }
.code-line:nth-child(5) { top: 30%; left: 50%; animation-delay: -12s; }

@keyframes codeFloat {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% {
    opacity: 0;
    transform: translateY(-20px);
  }
}
