/* Email Signup Popup */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeIn 0.3s ease-out forwards;
}

.popup.show {
  opacity: 1;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.popup-content {
  background: var(--bg-light);
  border-radius: var(--border-radius);
  max-width: 800px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--shadow-heavy);
  display: flex;
  transform: scale(0.9) translateY(20px);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.popup.show .popup-content {
  transform: scale(1) translateY(0);
}

.close-popup {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 2rem;
  color: var(--text-dark);
  cursor: pointer;
  z-index: 10001;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  transition: var(--transition);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.close-popup:hover {
  background: var(--accent-color);
  color: white;
  transform: scale(1.1) rotate(90deg);
  box-shadow: 0 5px 15px rgba(231, 76, 60, 0.3);
}

.popup-left {
  flex: 1;
  background: var(--gradient-hero);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  border-radius: var(--border-radius) 0 0 var(--border-radius);
  position: relative;
  overflow: hidden;
}

.popup-left::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  animation: float 6s ease-in-out infinite;
}

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

.popup-image {
  text-align: center;
  color: white;
  z-index: 1;
  position: relative;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

.popup-image h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  letter-spacing: 1px;
}

.popup-right {
  flex: 1;
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: var(--bg-light);
  position: relative;
}

.popup-right h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: var(--gradient-secondary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.2;
}

.popup-right h2 {
  font-size: 1.4rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-weight: 600;
}

.popup-right p {
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
  opacity: 0.8;
}

#emailForm {
  margin-bottom: 1rem;
}

#email {
  width: 100%;
  padding: 1rem 1.5rem;
  border: 2px solid #e0e0e0;
  border-radius: 25px;
  font-size: 1rem;
  margin-bottom: 1rem;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-dark);
}

#email:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(44, 90, 160, 0.1);
  background: white;
}

.signup-btn {
  width: 100%;
  padding: 1rem 2rem;
  background: var(--gradient-secondary);
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  overflow: hidden;
}

.signup-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transition: var(--transition);
  z-index: -1;
}

.signup-btn:hover::before {
  left: 0;
}

.signup-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(243, 156, 18, 0.3);
}

.signup-btn:active {
  transform: translateY(0);
}

.no-thanks {
  display: inline-block;
  text-align: center;
  color: var(--text-dark);
  text-decoration: none;
  font-size: 0.9rem;
  margin: 1rem 0;
  opacity: 0.7;
  transition: var(--transition);
}

.no-thanks:hover {
  opacity: 1;
  color: var(--accent-color);
  text-decoration: underline;
}

.terms {
  font-size: 0.8rem;
  color: var(--text-dark);
  opacity: 0.6;
  text-align: center;
  line-height: 1.4;
}

.terms a {
  color: var(--primary-color);
  text-decoration: none;
}

.terms a:hover {
  text-decoration: underline;
}

.success-message {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
  color: white;
  padding: 1rem;
  border-radius: var(--border-radius);
  text-align: center;
  font-weight: 600;
  margin-top: 1rem;
  animation: slideInUp 0.5s ease-out;
}

.error-message {
  background: linear-gradient(135deg, #e74c3c, #c0392b);
  color: white;
  padding: 0.75rem;
  border-radius: var(--border-radius);
  text-align: center;
  font-weight: 500;
  margin-top: 1rem;
  animation: shake 0.5s ease-in-out;
}

@keyframes slideInUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

/* Dark Mode Styles */
body.dark-theme .popup-content {
  background: var(--bg-dark);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

body.dark-theme .popup-right {
  background: #1c0a42;
}

body.dark-theme .close-popup {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
}

body.dark-theme .close-popup:hover {
  background: var(--accent-color);
  color: white;
}

body.dark-theme #email {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--text-light);
}

body.dark-theme #email:focus {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--primary-color);
}

/* Responsive Design */
@media (max-width: 768px) {
  .popup-content {
    flex-direction: column;
    width: 95%;
    max-height: 95vh;
  }
  
  .popup-left {
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    padding: 1.5rem;
  }
  
  .popup-right {
    padding: 2rem 1.5rem;
  }
  
  .popup-right h1 {
    font-size: 1.8rem;
  }
  
  .popup-right h2 {
    font-size: 1.2rem;
  }

  .popup-image h3 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .popup-right {
    padding: 1.5rem 1rem;
  }
  
  .popup-right h1 {
    font-size: 1.6rem;
  }
  
  .popup-right h2 {
    font-size: 1.1rem;
  }
  
  .close-popup {
    top: 10px;
    right: 15px;
    width: 35px;
    height: 35px;
    font-size: 1.5rem;
  }
  .popup-image h3 {
    font-size: 1.3rem;
  }
  
  #email {
    padding: 0.875rem 1.25rem;
  }
  
  .signup-btn {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
}

/* Animation for popup entrance */
@media (prefers-reduced-motion: no-preference) {
  .popup-content {
    animation: popupEnter 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
  }
  
  @keyframes popupEnter {
    0% {
      transform: scale(0.8) translateY(30px);
      opacity: 0;
    }
    100% {
      transform: scale(1) translateY(0);
      opacity: 1;
    }
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .popup-content {
    border: 3px solid var(--text-dark);
  }
  #email {
    border-width: 3px;
  }
}


/* Cookie Consent Styles */
.cookie-consent {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: white;
  padding: 1.5rem 0;
  z-index: 999;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(100%);
  opacity: 0;
  transition: var(--transition);
  display: none;
}

.cookie-consent.show {
  transform: translateY(0);
  opacity: 1;
}

.cookie-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.cookie-content p,
.cookie-content p:first-child {
  color: #b0b0b0; /* grey text for cookie popup */
}

.cookie-content p:first-child {
  font-weight: 500;
}

#learn-more-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
}

#learn-more-link:hover {
  color: #fff;
  text-shadow: 0 0 10px var(--secondary-color);
}

#learn-more-link::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-secondary);
  transition: var(--transition);
}

#learn-more-link:hover::after {
  width: 100%;
}

.learn-more-content {
  display: none;
  background: rgba(255, 255, 255, 0.05);
  border-radius: var(--border-radius);
  padding: 1.25rem;
  margin-top: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.learn-more-content p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 0.75rem;
}

.learn-more-content p:last-child {
  margin-bottom: 0;
}

.show-less-link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: none;
  transition: var(--transition);
  margin-top: 0.5rem;
}

.show-less-link:hover {
  color: #fff;
  text-shadow: 0 0 10px var(--secondary-color);
}

.cookie-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.accept-cookies,
.reject-cookies {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: 25px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  min-width: 100px;
}

.accept-cookies {
  background: var(--gradient-secondary);
  color: white;
  box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
}

.accept-cookies:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(243, 156, 18, 0.4);
}

.accept-cookies::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: var(--transition);
}

.accept-cookies:hover::before {
  left: 100%;
}

.reject-cookies {
  background: transparent;
  color: #444444; /* dark grey for reject button text */
  border: 2px solid #444444; /* dark grey border */
}

.reject-cookies:hover {
  background: #ededed;
  color: #222;
  border-color: #222;
}

/* Dark Theme Adjustments */
body.dark-theme .cookie-consent {
  background: rgba(26, 26, 26, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

body.dark-theme .learn-more-content {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

body.dark-theme .reject-cookies {
  border-color: rgba(255, 255, 255, 0.4);
}

body.dark-theme .reject-cookies:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.6);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .cookie-consent {
    padding: 1.25rem 0;
  }
  
  .cookie-content {
    padding: 0 1rem;
    gap: 0.75rem;
  }
  
  .cookie-content p {
    font-size: 0.9rem;
  }
  
  .cookie-buttons {
    flex-direction: column;
    gap: 0.75rem;
    justify-content: stretch;
  }
  
  .accept-cookies,
  .reject-cookies {
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-size: 0.95rem;
  }
  
  .learn-more-content {
    padding: 1rem;
    margin-top: 0.5rem;
  }
  
  .learn-more-content p {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .cookie-consent {
    padding: 1rem 0;
  }
  
  .cookie-content {
    padding: 0 0.75rem;
  }
  
  .cookie-content p {
    font-size: 0.85rem;
  }
  
  .accept-cookies,
  .reject-cookies {
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
  }
}

/* Animation for cookie consent appearance */
@keyframes cookieSlideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-consent.show {
  animation: cookieSlideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover effects for links in cookie text */
.cookie-content a:not(.show-less-link):not(#learn-more-link) {
  color: var(--secondary-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.cookie-content a:not(.show-less-link):not(#learn-more-link):hover {
  color: white;
  border-bottom-color: var(--secondary-color);
  text-shadow: 0 0 8px rgba(243, 156, 18, 0.5);
}

/* Accessibility improvements */
.accept-cookies:focus,
.reject-cookies:focus,
#learn-more-link:focus,
.show-less-link:focus {
  outline: 2px solid var(--secondary-color);
  outline-offset: 2px;
}

/* Subtle pulse animation for accept button */
@keyframes subtlePulse {
  0%, 100% {
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.3);
  }
  50% {
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.5);
  }
}

.accept-cookies {
  animation: subtlePulse 3s ease-in-out infinite;
}

.accept-cookies:hover {
  animation: none;
}