/* ==========================================================
   ENGRANAJE DIGITAL — Elementor-Compatible CSS
   
   All classes use the "ed-" prefix to avoid conflicts with
   Elementor's own classes. Apply these classes to Elementor
   widgets via Advanced > CSS Classes.
   ========================================================== */

/* --- Google Fonts (also loaded via plugin) --- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800;900&display=swap');

/* ==========================================================
   1. CSS CUSTOM PROPERTIES
   ========================================================== */
:root {
  /* Brand Colors */
  --ed-teal: #3AAFA9;
  --ed-green: #7CB342;
  --ed-orange: #FFB300;
  --ed-deep-orange: #F57C00;
  --ed-magenta: #FF1867;

  /* Backgrounds */
  --ed-bg-primary: #06060C;
  --ed-bg-secondary: #0D0D18;
  --ed-bg-tertiary: #131320;
  --ed-bg-card: rgba(255, 255, 255, 0.025);
  --ed-bg-card-hover: rgba(255, 255, 255, 0.05);

  /* Text */
  --ed-text-primary: #F0F0F5;
  --ed-text-secondary: #8E8EA0;
  --ed-text-tertiary: #5A5A6E;

  /* Borders */
  --ed-border: rgba(255, 255, 255, 0.06);
  --ed-border-hover: rgba(255, 255, 255, 0.12);

  /* Gradients */
  --ed-gradient-brand: linear-gradient(135deg, var(--ed-magenta), var(--ed-deep-orange));
  --ed-gradient-teal: linear-gradient(135deg, var(--ed-teal), var(--ed-green));

  /* Glass */
  --ed-glass-bg: rgba(255, 255, 255, 0.03);
  --ed-glass-border: rgba(255, 255, 255, 0.07);
  --ed-glass-blur: 24px;

  /* Typography */
  --ed-font-heading: 'Outfit', sans-serif;
  --ed-font-body: 'Inter', sans-serif;

  /* Radius */
  --ed-radius-sm: 8px;
  --ed-radius-md: 14px;
  --ed-radius-lg: 20px;
  --ed-radius-xl: 28px;
  --ed-radius-full: 999px;

  /* Transitions */
  --ed-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ed-transition-fast: 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  --ed-transition-medium: 0.4s cubic-bezier(0.16, 1, 0.3, 1);

  /* Shadows */
  --ed-shadow-glow-magenta: 0 0 40px rgba(255, 24, 103, 0.2);
  --ed-shadow-glow-teal: 0 0 40px rgba(58, 175, 169, 0.15);
}

/* ==========================================================
   2. BASE OVERRIDES FOR ELEMENTOR
   ========================================================== */

/* Apply dark theme to the entire page */
.ed-dark-page,
.ed-dark-page .elementor-section,
.ed-dark-page .elementor-container,
.ed-dark-page .e-con {
  color: var(--ed-text-primary);
}

/* Override Elementor's default fonts on dark pages */
.ed-dark-page {
  font-family: var(--ed-font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--ed-bg-primary);
}

.ed-dark-page h1,
.ed-dark-page h2,
.ed-dark-page h3,
.ed-dark-page h4,
.ed-dark-page h5,
.ed-dark-page h6,
.ed-dark-page .elementor-heading-title {
  font-family: var(--ed-font-heading);
  letter-spacing: -0.02em;
  color: var(--ed-text-primary);
}

.ed-dark-page p,
.ed-dark-page .elementor-text-editor p {
  color: var(--ed-text-secondary);
  line-height: 1.8;
}

/* ==========================================================
   3. GRADIENT TEXT UTILITY
   Apply to any Elementor heading or text widget
   ========================================================== */
.ed-gradient-text,
.ed-gradient-text .elementor-heading-title,
.ed-gradient-text span {
  background: var(--ed-gradient-brand) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

.ed-gradient-text-teal,
.ed-gradient-text-teal .elementor-heading-title {
  background: var(--ed-gradient-teal) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  background-clip: text !important;
}

/* ==========================================================
   4. SECTION BACKGROUNDS
   Apply to Elementor sections/containers
   ========================================================== */
.ed-bg-primary { background-color: var(--ed-bg-primary) !important; }
.ed-bg-secondary { background-color: var(--ed-bg-secondary) !important; }
.ed-bg-tertiary { background-color: var(--ed-bg-tertiary) !important; }

/* ==========================================================
   5. HERO SECTION
   Apply "ed-hero" to the Elementor section/container
   ========================================================== */
.ed-hero {
  position: relative !important;
  min-height: 100vh !important;
  overflow: hidden !important;
}

.ed-hero #hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.ed-hero .hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}

.ed-hero .hero-glow-1 {
  top: -200px;
  right: -100px;
  background: var(--ed-magenta);
  opacity: 0.12;
}

.ed-hero .hero-glow-2 {
  bottom: -200px;
  left: -100px;
  background: var(--ed-teal);
  opacity: 0.08;
}

/* Make hero content sit above canvas */
.ed-hero > .elementor-container,
.ed-hero > .e-con-inner,
.ed-hero > .elementor-widget-wrap {
  position: relative;
  z-index: 2;
}

/* ==========================================================
   6. BADGE / TAG
   Apply "ed-badge" to an Elementor text or heading widget
   ========================================================== */
.ed-badge,
.ed-badge .elementor-heading-title,
.ed-badge .elementor-text-editor {
  display: inline-flex !important;
  align-items: center;
  gap: 10px;
  padding: 10px 24px;
  border-radius: var(--ed-radius-full);
  background: var(--ed-glass-bg);
  border: 1px solid var(--ed-glass-border);
  font-size: 1.3rem !important;
  font-weight: 500;
  color: var(--ed-magenta) !important;
  backdrop-filter: blur(10px);
  font-family: var(--ed-font-body);
  letter-spacing: 0.02em;
}

.ed-badge-teal,
.ed-badge-teal .elementor-heading-title {
  color: var(--ed-teal) !important;
}

/* ==========================================================
   7. BUTTONS
   Apply to Elementor button widgets
   ========================================================== */
.ed-btn-primary .elementor-button {
  background: var(--ed-gradient-brand) !important;
  border: none !important;
  border-radius: var(--ed-radius-full) !important;
  padding: 18px 40px !important;
  font-family: var(--ed-font-heading) !important;
  font-weight: 600 !important;
  font-size: 1.05rem !important;
  box-shadow: var(--ed-shadow-glow-magenta) !important;
  transition: all var(--ed-transition-medium) !important;
}

.ed-btn-primary .elementor-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 60px rgba(255, 24, 103, 0.35) !important;
}

.ed-btn-outline .elementor-button {
  background: transparent !important;
  border: 1px solid var(--ed-border-hover) !important;
  border-radius: var(--ed-radius-full) !important;
  padding: 18px 40px !important;
  font-family: var(--ed-font-heading) !important;
  font-weight: 600 !important;
  font-size: 1.05rem !important;
  color: var(--ed-text-primary) !important;
  transition: all var(--ed-transition-medium) !important;
}

.ed-btn-outline .elementor-button:hover {
  border-color: var(--ed-magenta) !important;
  color: var(--ed-magenta) !important;
  background: rgba(255, 24, 103, 0.05) !important;
  transform: translateY(-2px);
}

/* ==========================================================
   8. GLASSMORPHISM CARD
   Apply "ed-glass-card" to Elementor container/section
   ========================================================== */
.ed-glass-card {
  background: var(--ed-glass-bg) !important;
  border: 1px solid var(--ed-glass-border) !important;
  border-radius: var(--ed-radius-lg) !important;
  transition: all var(--ed-transition-medium) !important;
  overflow: hidden;
}

.ed-glass-card:hover {
  background: var(--ed-bg-card-hover) !important;
  border-color: var(--ed-border-hover) !important;
  transform: translateY(-6px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

/* Top border accent on hover */
.ed-glass-card-accent {
  position: relative;
}

.ed-glass-card-accent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--ed-gradient-brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--ed-transition-medium);
  z-index: 1;
}

.ed-glass-card-accent:hover::before {
  transform: scaleX(1);
}

/* ==========================================================
   9. SERVICE ICON BOXES
   Apply color variants to icon containers
   ========================================================== */
.ed-icon-magenta .elementor-icon {
  background: rgba(255, 24, 103, 0.1) !important;
  color: var(--ed-magenta) !important;
  border-radius: var(--ed-radius-md) !important;
  padding: 14px !important;
}

.ed-icon-teal .elementor-icon {
  background: rgba(58, 175, 169, 0.1) !important;
  color: var(--ed-teal) !important;
  border-radius: var(--ed-radius-md) !important;
  padding: 14px !important;
}

.ed-icon-orange .elementor-icon {
  background: rgba(255, 179, 0, 0.1) !important;
  color: var(--ed-orange) !important;
  border-radius: var(--ed-radius-md) !important;
  padding: 14px !important;
}

.ed-icon-green .elementor-icon {
  background: rgba(124, 179, 66, 0.1) !important;
  color: var(--ed-green) !important;
  border-radius: var(--ed-radius-md) !important;
  padding: 14px !important;
}

/* ==========================================================
   10. STAT COUNTER
   Apply "ed-stat" to Elementor counter widget container
   ========================================================== */
.ed-stat {
  text-align: center;
  padding: 32px 20px !important;
  border-radius: var(--ed-radius-lg) !important;
  background: var(--ed-glass-bg) !important;
  border: 1px solid var(--ed-glass-border) !important;
  transition: all var(--ed-transition-medium) !important;
}

.ed-stat:hover {
  background: var(--ed-bg-card-hover) !important;
  transform: translateY(-4px);
}

.ed-stat-magenta .elementor-counter-number-wrapper { color: var(--ed-magenta) !important; }
.ed-stat-teal .elementor-counter-number-wrapper { color: var(--ed-teal) !important; }
.ed-stat-orange .elementor-counter-number-wrapper { color: var(--ed-orange) !important; }
.ed-stat-green .elementor-counter-number-wrapper { color: var(--ed-green) !important; }

.ed-stat .elementor-counter-number-wrapper {
  font-family: var(--ed-font-heading) !important;
  font-size: 2.8rem !important;
  font-weight: 800 !important;
}

.ed-stat .elementor-counter-title {
  font-size: 0.9rem !important;
  color: var(--ed-text-secondary) !important;
}

/* ==========================================================
   11. PORTFOLIO ITEM
   Apply "ed-portfolio-item" to an Elementor container
   ========================================================== */
.ed-portfolio-item {
  position: relative !important;
  border-radius: var(--ed-radius-lg) !important;
  overflow: hidden !important;
  cursor: pointer;
}

.ed-portfolio-item img {
  transition: transform 0.7s var(--ed-ease) !important;
}

.ed-portfolio-item:hover img {
  transform: scale(1.05);
}

.ed-portfolio-overlay {
  position: absolute !important;
  inset: 0 !important;
  background: linear-gradient(to top, rgba(6, 6, 12, 0.95) 0%, rgba(6, 6, 12, 0.4) 50%, transparent 100%) !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
  padding: 32px !important;
  opacity: 0;
  transition: opacity var(--ed-transition-medium);
  z-index: 2;
}

.ed-portfolio-item:hover .ed-portfolio-overlay {
  opacity: 1;
}

/* ==========================================================
   12. TESTIMONIAL CARD
   ========================================================== */
.ed-testimonial-card {
  text-align: center !important;
  padding: 48px !important;
  border-radius: var(--ed-radius-xl) !important;
  background: var(--ed-glass-bg) !important;
  border: 1px solid var(--ed-glass-border) !important;
  position: relative;
}

.ed-testimonial-card::before {
  content: '"';
  position: absolute;
  top: 24px;
  left: 36px;
  font-family: var(--ed-font-heading);
  font-size: 5rem;
  font-weight: 800;
  color: var(--ed-magenta);
  opacity: 0.2;
  line-height: 1;
}

.ed-testimonial-avatar img {
  width: 64px !important;
  height: 64px !important;
  border-radius: 50% !important;
  border: 2px solid var(--ed-magenta) !important;
  object-fit: cover;
}

/* ==========================================================
   13. PROCESS TIMELINE STEP
   ========================================================== */
.ed-process-step {
  text-align: center;
}

.ed-step-number {
  width: 72px !important;
  height: 72px !important;
  border-radius: 50% !important;
  background: var(--ed-bg-primary) !important;
  border: 2px solid var(--ed-border) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  margin: 0 auto 24px !important;
  font-family: var(--ed-font-heading) !important;
  font-size: 1.5rem !important;
  font-weight: 800 !important;
  color: var(--ed-text-tertiary) !important;
  transition: all var(--ed-transition-medium) !important;
}

.ed-process-step:hover .ed-step-number,
.ed-process-step.active .ed-step-number {
  border-color: var(--ed-magenta) !important;
  color: var(--ed-magenta) !important;
  box-shadow: var(--ed-shadow-glow-magenta);
}

/* ==========================================================
   14. CONTACT FORM STYLES
   Apply to Elementor Form widget container
   ========================================================== */
.ed-contact-form {
  padding: 48px !important;
  border-radius: var(--ed-radius-xl) !important;
  background: var(--ed-glass-bg) !important;
  border: 1px solid var(--ed-glass-border) !important;
}

.ed-contact-form .elementor-field-textual {
  padding: 14px 18px !important;
  border-radius: var(--ed-radius-md) !important;
  background: rgba(255, 255, 255, 0.03) !important;
  border: 1px solid var(--ed-border) !important;
  color: var(--ed-text-primary) !important;
  font-size: 0.95rem !important;
  transition: all var(--ed-transition-fast) !important;
}

.ed-contact-form .elementor-field-textual:focus {
  border-color: var(--ed-magenta) !important;
  background: rgba(255, 24, 103, 0.03) !important;
  box-shadow: 0 0 0 3px rgba(255, 24, 103, 0.08) !important;
}

.ed-contact-form .elementor-field-label {
  color: var(--ed-text-secondary) !important;
  font-size: 0.85rem !important;
  font-weight: 500 !important;
}

.ed-contact-form .elementor-button {
  background: var(--ed-gradient-brand) !important;
  border-radius: var(--ed-radius-full) !important;
  padding: 18px 40px !important;
  font-family: var(--ed-font-heading) !important;
  font-weight: 600 !important;
  width: 100%;
}

/* ==========================================================
   15. SOCIAL LINK ICONS
   ========================================================== */
.ed-social-link .elementor-social-icon {
  width: 44px !important;
  height: 44px !important;
  border-radius: 50% !important;
  border: 1px solid var(--ed-border) !important;
  background: transparent !important;
  color: var(--ed-text-secondary) !important;
  transition: all var(--ed-transition-fast) !important;
}

.ed-social-link .elementor-social-icon:hover {
  border-color: var(--ed-magenta) !important;
  color: var(--ed-magenta) !important;
  background: rgba(255, 24, 103, 0.08) !important;
  transform: translateY(-3px);
}

/* ==========================================================
   16. NAVBAR (Elementor Nav Menu widget)
   Apply to the section containing the nav
   ========================================================== */
.ed-navbar {
  position: fixed !important;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000 !important;
  padding: 20px 0 !important;
  transition: all var(--ed-transition-medium) !important;
}

.ed-navbar.scrolled {
  padding: 12px 0 !important;
  background: rgba(6, 6, 12, 0.85) !important;
  backdrop-filter: blur(var(--ed-glass-blur));
  -webkit-backdrop-filter: blur(var(--ed-glass-blur));
  border-bottom: 1px solid var(--ed-border);
}

.ed-navbar .elementor-nav-menu a {
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  color: var(--ed-text-secondary) !important;
  padding: 8px 18px !important;
  border-radius: var(--ed-radius-full) !important;
  transition: all var(--ed-transition-fast) !important;
}

.ed-navbar .elementor-nav-menu a:hover,
.ed-navbar .elementor-nav-menu .current-menu-item a {
  color: var(--ed-text-primary) !important;
  background: var(--ed-glass-bg) !important;
}

/* ==========================================================
   17. REVEAL ANIMATIONS
   Add these classes, GSAP will handle the animation
   ========================================================== */
.ed-reveal {
  opacity: 0;
  transform: translateY(40px);
}

.ed-reveal-left {
  opacity: 0;
  transform: translateX(-40px);
}

.ed-reveal-right {
  opacity: 0;
  transform: translateX(40px);
}

/* ==========================================================
   18. LOADING SCREEN
   ========================================================== */
.loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: var(--ed-bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 24px;
  transition: opacity 0.5s, visibility 0.5s;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-gear {
  width: 60px;
  height: 60px;
  animation: ed-spin-gear 2s linear infinite;
}

.loader-gear svg { width: 100%; height: 100%; }

@keyframes ed-spin-gear {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.loader-text {
  font-family: var(--ed-font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--ed-text-secondary);
  letter-spacing: 0.05em;
}

/* ==========================================================
   19. SCROLL INDICATOR
   ========================================================== */
.scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--ed-text-tertiary);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: ed-float-scroll 3s ease-in-out infinite;
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, var(--ed-magenta), transparent);
  animation: ed-scroll-line 2s ease-in-out infinite;
}

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

@keyframes ed-scroll-line {
  0% { transform: scaleY(0); transform-origin: top; }
  50% { transform: scaleY(1); transform-origin: top; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* Hero glows */
.hero-glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
.hero-glow-1 { top: -200px; right: -100px; background: var(--ed-magenta); opacity: 0.12; }
.hero-glow-2 { bottom: -200px; left: -100px; background: var(--ed-teal); opacity: 0.08; }

/* ==========================================================
   20. SCROLLBAR
   ========================================================== */
.ed-dark-page::-webkit-scrollbar { width: 8px; }
.ed-dark-page::-webkit-scrollbar-track { background: var(--ed-bg-primary); }
.ed-dark-page::-webkit-scrollbar-thumb { background: var(--ed-border-hover); border-radius: 4px; }
.ed-dark-page::-webkit-scrollbar-thumb:hover { background: var(--ed-magenta); }

/* ==========================================================
   21. RESPONSIVE
   ========================================================== */
@media (max-width: 768px) {
  .ed-hero { min-height: 100svh !important; }
  .scroll-indicator { bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .ed-reveal,
  .ed-reveal-left,
  .ed-reveal-right {
    opacity: 1;
    transform: none;
  }
}
