/* ======================= PRELOADER STYLES ====================== */
.preloader {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #0a0a0a, #1a1a2e);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Hide preloader after loading */
.preloader.hide {
  opacity: 0;
  visibility: hidden;
}

/* ======================= MAIN TEXT (LOGO) STYLES ====================== */
.electric-text {
  font-size: clamp(24px, 6vw, 48px);
  font-weight: 900;
  letter-spacing: clamp(2px, 1vw, 8px);
  text-transform: uppercase;
  color: #E8F0FE;
  position: relative;
  font-family: "Poppins", "Montserrat", sans-serif;
  white-space: nowrap;
  background: transparent;
  text-align: center;
  animation: glowPulse 2s ease-in-out infinite;
}

/* Animated border glow effect */
.electric-text::before {
  content: "VOLTEDGE ENERGIES";
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(120deg, #FFB300, #f07400, #FFB300);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  width: 100%;
  height: 100%;
  overflow: hidden;
  white-space: nowrap;
  border-right: 3px solid #f07400;
  animation: typing 3s steps(20) infinite, gradientShift 3s ease infinite;
  text-shadow: 0 0 10px rgba(240, 116, 0, 0.5);
}

/* Typing Animation */
@keyframes typing {
  0% { width: 0; }
  50% { width: 100%; }
  100% { width: 0; }
}

/* Gradient shift for text */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Pulse glow animation */
@keyframes glowPulse {
  0%, 100% {
    filter: drop-shadow(0 0 5px rgba(240, 116, 0, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(240, 116, 0, 0.6));
  }
}

/* ======================= RESPONSIVE DESIGN ====================== */

/* Large Tablet (max-width: 992px) */
@media (max-width: 992px) {
  .electric-text {
    font-size: 36px;
    letter-spacing: 5px;
  }
  .electric-text::before {
    border-right: 3px solid #f07400;
  }
}

/* Tablet (max-width: 768px) */
@media (max-width: 768px) {
  .electric-text {
    font-size: 28px;
    letter-spacing: 4px;
  }
  .electric-text::before {
    border-right: 2.5px solid #f07400;
  }
  @keyframes typing {
    0% { width: 0; }
    50% { width: 100%; }
    100% { width: 0; }
  }
}

/* Mobile Landscape (max-width: 576px) */
@media (max-width: 576px) {
  .electric-text {
    font-size: 22px;
    letter-spacing: 3px;
    white-space: normal;
    word-break: break-word;
    max-width: 90%;
    margin: 0 auto;
  }
  .electric-text::before {
    content: "VOLTEDGE";
    white-space: normal;
    border-right: 2px solid #f07400;
    text-align: center;
    line-height: 1.4;
  }
}

/* Mobile Portrait (max-width: 480px) */
@media (max-width: 480px) {
  .electric-text {
    font-size: 18px;
    letter-spacing: 2px;
    white-space: normal;
    line-height: 1.4;
    max-width: 90%;
  }
  
  .electric-text::before {
    content: "VOLTEDGE  ENERGIES";
    font-size: 18px;
    white-space: nowrap;
    border-right: 2px solid #f07400;
    animation: typingMobile 3s steps(12) infinite;
  }
  
  /* Custom typing for mobile */
  @keyframes typingMobile {
    0% { width: 0; }
    50% { width: 100%; }
    100% { width: 0; }
  }
  
  @keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }
}

/* Small Mobile (max-width: 375px) */
@media (max-width: 375px) {
  .electric-text {
    font-size: 16px;
    letter-spacing: 1.5px;
  }
  
  .electric-text::before {
    content: "VOLTEDGE ENERGIES";
    font-size: 16px;
    white-space: nowrap;
    border-right: 1.5px solid #f07400;
    animation: typingMobile 2.5s steps(10) infinite;
  }
  
  @keyframes typingMobile {
    0% { width: 0; }
    50% { width: 100%; }
    100% { width: 0; }
  }
}

/* Extra Small (max-width: 320px) */
@media (max-width: 320px) {
  .electric-text {
    font-size: 14px;
    letter-spacing: 1px;
  }
  
  .electric-text::before {
    content: "VE";
    font-size: 20px;
    letter-spacing: 2px;
    border-right: 1.5px solid #f07400;
    animation: typingMobile 2s steps(4) infinite;
  }
  
  @keyframes typingMobile {
    0% { width: 0; }
    50% { width: 100%; }
    100% { width: 0; }
  }
}

/* ======================= ADDITIONAL LOGO STYLES ====================== */

/* For actual logo in header/navbar */
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  transition: transform 0.3s ease;
}

.logo:hover {
  transform: scale(1.02);
}

/* Text-based logo */
.logo-text {
  font-family: "Poppins", "Montserrat", sans-serif;
  font-weight: 800;
  font-size: clamp(18px, 5vw, 28px);
  background: linear-gradient(135deg, var(--ot-theme-color2, #FFB300), var(--ot-theme-color, #f07400));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: clamp(1px, 0.5vw, 2px);
}

.logo-text span {
  color: var(--ot-dark-color, #1B263B);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}

/* Image-based logo */
.logo img {
  height: auto;
  max-height: clamp(35px, 8vw, 60px);
  width: auto;
  object-fit: contain;
  transition: all 0.3s ease;
}

/* Mobile responsive for header logo */
@media (max-width: 768px) {
  .logo img {
    max-height: 40px;
  }
}

@media (max-width: 480px) {
  .logo img {
    max-height: 32px;
  }
  
  .logo-text {
    font-size: 16px;
  }
}

/* ======================= UTILITY CLASSES ====================== */

/* Hide on very small screens if needed */
.hide-on-mobile {
  display: inline-block;
}

@media (max-width: 480px) {
  .hide-on-mobile {
    display: none;
  }
  
  .show-on-mobile {
    display: inline-block;
  }
}

/* Center loader content */
.loader-content {
  text-align: center;
  padding: 20px;
}

/* Loading dots animation */
.loading-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
}

.loading-dots span {
  width: 10px;
  height: 10px;
  background: #f07400;
  border-radius: 50%;
  animation: bounce 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) { animation-delay: 0s; }
.loading-dots span:nth-child(2) { animation-delay: 0.2s; }
.loading-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
  40% { transform: scale(1); opacity: 1; }
}

/* Optional: Remove animation for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .electric-text::before,
  .electric-text {
    animation: none;
  }
  
  .electric-text::before {
    width: 100%;
    background: linear-gradient(120deg, #FFB300, #f07400);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
}