/* ====== MODAL BACKDROP ====== */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  justify-content: center;
  align-items: center;
  z-index: 99999;
  background: none !important;
  background-color: transparent !important;
  backdrop-filter: blur(8px) brightness(0.85);
  -webkit-backdrop-filter: blur(8px) brightness(0.85);
  animation: fadeIn 0.3s ease-out;
}

.modal-backdrop.active { 
  display: flex; 
}

/* ====== MODAL CONTENT WRAPPER ====== */
.modal-content-wrapper {
  position: relative;
  border-radius: 28px;
  padding: 56px 64px;
  max-width: 680px;
  width: 92%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: 
    0 30px 90px rgba(0, 0, 0, 0.6),
    0 0 80px rgba(99, 102, 241, 0.15) inset,
    0 10px 40px rgba(99, 102, 241, 0.2);
  animation: slideUpModal 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
 background: 
  linear-gradient(
    135deg,
    rgba(81, 2, 160, 0.35),  
    rgba(3, 67, 163, 0.3), 
    rgba(1, 139, 116, 0.25) 
  ),
  url("../images/Digitallines.jpg");
background-size: cover;
background-position: center;
  background-size: cover;
  background-position: center;
  z-index: 1;
  overflow: hidden;
}

/* Content above all backgrounds */
.modal-content-wrapper > * {
  position: relative;
  z-index: 4;
}

/* ====== CLOSE BUTTON ====== */
.modal-close {
  position: absolute;
  top: 22px;
  right: 18px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: none;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 18px;
  font-weight: 600;       
  line-height: 1;          
  cursor: pointer;
  transition: .25s;
}

.modal-close:hover { background: rgba(255,255,255,0.28); }
/* ====== TITLE & SUBTITLE ====== */
.modal-title {
  font-size: 48px;
  font-weight: 800;
  text-align: center;
  letter-spacing: 1.2px;
  margin-bottom: 8px;
  background: linear-gradient(
    120deg,
    #ffffff 0%,
    #b7e3ef 50%,
    #60a5fa 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: titleGlow 3s ease-in-out infinite;
  text-shadow: 0 0 30px rgba(96, 165, 250, 0.3);
}

.modal-subtitle {
  font-size: 16px;
  text-align: center;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #d8f5ff;
  margin-bottom: 12px;
  display: block;
  opacity: 0.9;
  font-weight: 800;
}

/* Decorative line under subtitle */
.modal-subtitle-line {
  width: 70%;
  max-width: 300px;
  height: 3px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    #a78bfa 20%,
    #60a5fa 50%,
    #5eead4 80%,
    transparent 100%
  );
  border-radius: 3px;
  margin: 0 auto 32px;
  box-shadow: 0 0 15px rgba(96, 165, 250, 0.4);
  animation: lineGlow 2s ease-in-out infinite;
}


/* ====== CALL-TO-ACTION BUTTON (SAME AS FIRST CODE) ====== */
.modal-btn {
  display: block;
  width: fit-content;
  margin: 32px auto 0;
  padding: 14px 40px;
  border-radius: 50px;
  background: linear-gradient(
    135deg,
    #ffffff 0%,
    #e8f4ff 100%
  );
  color: #1a0d4d;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 1.2px;
  text-decoration: none;
  text-transform: uppercase;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 
    0 6px 24px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(96, 165, 250, 0.4);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.modal-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    transparent 0%,
    rgba(96, 165, 250, 0.3) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.modal-btn:hover::before {
  transform: translateX(100%);
}

.modal-btn:hover {
  background: linear-gradient(
    135deg,
    #f8fbff 0%,
    #ffffff 100%
  );
  transform: translateY(-4px) scale(1.05);
  box-shadow: 
    0 10px 35px rgba(0, 0, 0, 0.4),
    0 0 30px rgba(96, 165, 250, 0.6);
  color: #0f0638;
}

.modal-btn:active {
  transform: translateY(-2px) scale(1.02);
}

/* ====== ANIMATIONS ====== */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideUpModal {
  0% { 
    transform: translateY(60px) scale(0.9);
    opacity: 0;
  }
  100% { 
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes titleGlow {
  0%, 100% { 
    filter: drop-shadow(0 0 10px rgba(96, 165, 250, 0.3));
  }
  50% { 
    filter: drop-shadow(0 0 20px rgba(96, 165, 250, 0.6));
  }
}

@keyframes lineGlow {
  0%, 100% { 
    opacity: 0.6;
    box-shadow: 0 0 10px rgba(96, 165, 250, 0.3);
  }
  50% { 
    opacity: 1;
    box-shadow: 0 0 20px rgba(96, 165, 250, 0.6);
  }
}

@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ====== BODY SCROLL LOCK ====== */
body.modal-open {
  overflow: hidden;
}

/* ====== RESPONSIVE DESIGN ====== */
@media (max-width: 768px) {
  .modal-content-wrapper {
    padding: 40px 30px;
    width: 95%;
    border-radius: 24px;
  }
  
  .modal-title {
    font-size: 30px;
  }
  
  .modal-subtitle {
    font-size: 12px;
    letter-spacing: 1.5px;
  }
   
  .modal-btn {
    padding: 12px 32px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .modal-content-wrapper {
    padding: 30px 20px;
  }
  
  .modal-title {
    font-size: 26px;
  }
  
  .modal-close {
    width: 36px;
    height: 36px;
    font-size: 20px;
    top: 15px;
    right: 15px;
  }
  
  .modal-subtitle-line {
    width: 80%;
  }
}

/* ====== ACCESSIBILITY ====== */
.modal-backdrop:focus-within .modal-content-wrapper {
  box-shadow: 
    0 30px 90px rgba(0, 0, 0, 0.6),
    0 0 0 3px rgba(96, 165, 250, 0.5);
}

.modal-close:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 2px;
}

.modal-btn:focus-visible {
  outline: 3px solid #60a5fa;
  outline-offset: 3px;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .modal-backdrop,
  .modal-content-wrapper,
  .modal-close,
  .modal-btn,
  .brain-icon,
  .modal-title,
  .modal-subtitle-line {
    animation: none !important;
    transition: none !important;
  }
  
  .modal-close:hover {
    transform: none;
  }
  
  .modal-btn:hover {
    transform: none;
  }
}

.modal-center-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin: 26px auto;
  max-width: 400px;
}

@media (max-width: 768px) {
  .modal-center-row {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
}


/* ===== Brain Icon ===== */
.brain-icon {
  margin-top: 10px;
  width: 180px;
  min-width: 100px;
  filter: drop-shadow(0 0 15px rgba(168, 85, 247, 0.6))
          drop-shadow(0 0 30px rgba(96, 165, 250, 0.3));
  animation: float 3s ease-in-out infinite;
}

@media (max-width: 768px) {
  .brain-icon {
    width: 85px;
    min-width: 85px;
  }
}


.modal-description {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  color: #ecfaff;
  text-align: left;
  font-weight: 400;
}

@media (max-width: 768px) {
  .modal-description {
    font-size: 16px;
     text-align: center;
  }
}


@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
