/**
 * ManoExperta Relaunch - Main Styles
 * Modern, clean, and trust-focused design
 */

/* Welcome Back Section Styles */
.welcome-back-section {
    margin-top: 2rem;
    animation: fadeIn 0.5s ease;
}

.welcome-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0 auto;
}

.welcome-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.user-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color, #6c63ff);
}

.welcome-info {
    flex: 1;
}

.welcome-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin: 0 0 0.25rem 0;
}

.welcome-name {
    font-size: 1rem;
    color: #666;
    margin: 0;
}

.welcome-message {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.welcome-message p {
    margin: 0;
    color: #555;
    line-height: 1.5;
}

.welcome-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.welcome-actions .btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.welcome-actions .btn-secondary {
    background: var(--primary-color, #6c63ff);
    color: white;
    border: none;
}

.welcome-actions .btn-secondary:hover {
    background: var(--primary-dark, #5a52d5);
    transform: translateY(-2px);
}

.welcome-actions .btn-outline {
    background: transparent;
    color: #666;
    border: 2px solid #e0e0e0;
}

.welcome-actions .btn-outline:hover {
    background: #f8f9fa;
    border-color: #ccc;
}

/* Hide CTAs when logged in */
.hero-ctas.hidden {
    display: none !important;
}

@media (max-width: 768px) {
    .welcome-card {
        padding: 1.5rem;
    }
    
    .welcome-actions {
        flex-direction: column;
    }
    
    .welcome-actions .btn {
        width: 100%;
    }
}

/* Notification Toast Styles */
.notification-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--primary-purple);
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10000;
}

.notification-toast.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-toast i {
    font-size: 16px;
}

/* ===== CSS Variables ===== */
:root {
  /* Brand Colors */
  --primary-purple: #7B3FF2;
  --primary-dark: #5D2FB8;
  --primary-light: #9D6FFF;
  --secondary: #FF6B6B;
  --success: #4CAF50;
  --warning: #FFC107;
  --danger: #F44336;
  
  /* Neutral Colors */
  --white: #FFFFFF;
  --gray-100: #F8F9FA;
  --gray-200: #E9ECEF;
  --gray-300: #DEE2E6;
  --gray-400: #CED4DA;
  --gray-500: #ADB5BD;
  --gray-600: #6C757D;
  --gray-700: #495057;
  --gray-800: #343A40;
  --gray-900: #212529;
  --black: #000000;
  
  /* Typography */
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-size-base: 16px;
  --line-height-base: 1.6;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3rem;
  
  /* Borders */
  --border-radius: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 20px;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  --shadow-xl: 0 20px 40px rgba(0,0,0,0.2);
  
  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;
}

/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  line-height: var(--line-height-base);
  color: var(--gray-800);
  background-color: var(--white);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.75rem; }
  h3 { font-size: 1.5rem; }
}

a {
  color: var(--primary-purple);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

/* ===== Header/Navigation ===== */
.header {
  background: var(--white);
  border-bottom: 1px solid rgba(124, 58, 237, 0.1);
  position: relative;
}

.nav-wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-lg) 0;
}

.logo {
  height: 40px;
}

.logo img {
  height: 100%;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
}

.language-selector {
  position: relative;
}

.language-selector select {
  padding: var(--spacing-sm) var(--spacing-md);
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  background: var(--white);
  cursor: pointer;
  font-size: 14px;
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  background: linear-gradient(135deg, var(--primary-purple) 0%, var(--primary-dark) 100%);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('../img/fondo-hero.jpg') center/cover;
  opacity: 0.1;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: var(--spacing-xxl) 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xxl);
  align-items: center;
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.hero-text {
  animation: fadeInLeft 1s ease;
}

.badge {
  display: inline-block;
  padding: var(--spacing-sm) var(--spacing-md);
  background: var(--secondary);
  color: var(--white);
  border-radius: var(--border-radius-xl);
  font-weight: 700;
  font-size: 0.875rem;
  margin-bottom: var(--spacing-lg);
  animation: pulse 2s infinite;
}

.hero h1 {
  color: var(--white);
  margin-bottom: var(--spacing-lg);
  font-size: 3.5rem;
}

.hero h1 .highlight {
  color: var(--secondary);
  display: block;
}

.hero-subtitle {
  color: var(--white);
  font-size: 1.25rem;
  margin-bottom: var(--spacing-xl);
  opacity: 0.9;
}

/* ===== Hero CTAs ===== */
.cta-messaging {
  text-align: center;
  margin: var(--spacing-xl) 0 var(--spacing-lg);
  padding: var(--spacing-lg);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.8s ease-out;
}

.cta-title {
  font-size: 2.25rem;
  font-weight: 900;
  color: var(--white);
  margin-bottom: var(--spacing-md);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, var(--white) 0%, #f8f9fa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 2s ease-in-out infinite;
}

.cta-description {
  font-size: 1.25rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

@media (max-width: 768px) {
  .cta-title {
    font-size: 1.75rem;
  }
  
  .cta-description {
    font-size: 1.1rem;
  }
}

.hero-ctas {
  display: flex;
  gap: var(--spacing-lg);
  margin: var(--spacing-xl) 0 var(--spacing-lg);
}

@media (max-width: 768px) {
  .hero-ctas {
    flex-direction: column;
    align-items: stretch;
  }
}

.btn-hero {
  min-width: 200px;
  padding: var(--spacing-lg) var(--spacing-xxl);
  font-size: 1.25rem;
  font-weight: 800;
  border-radius: var(--border-radius-xl);
  box-shadow: var(--shadow-xl);
  transition: all var(--transition-base);
  animation: ctaPulse 3s ease-in-out infinite;
}

.btn-hero:hover {
  transform: translateY(-4px) scale(1.03);
  box-shadow: var(--shadow-xl);
  animation: none;
}

.hero-expectation {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.875rem;
  font-style: italic;
  margin-top: var(--spacing-md);
}

/* ===== Elegant Home Animation ===== */
.hero-visual {
  animation: fadeInRight 1.5s ease;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 550px;
  overflow: visible;
}

.home-animation {
  position: relative;
  width: 100%;
  max-width: 650px;
  height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.animated-home {
  width: 100%;
  height: 100%;
  max-width: 600px;
  filter: drop-shadow(0 15px 40px rgba(0,0,0,0.15));
}

/* ===== SVG Element Styles ===== */
.bg-circle {
  fill: rgba(255, 255, 255, 0.05);
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 1;
  animation: bgPulse 4s ease-in-out infinite;
}

/* Home structure elements */
#foundation {
  fill: var(--gray-600);
  stroke: var(--gray-500);
  stroke-width: 2;
  stroke-dasharray: 240;
  stroke-dashoffset: 240;
  animation: drawLine 1.5s ease-out 0.5s forwards;
}

#house-body {
  fill: rgba(255, 255, 255, 0);
  stroke: var(--white);
  stroke-width: 3;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: drawHouse 2s ease-out 1s forwards, fillHouse 1.5s ease-out 2.5s forwards;
}

#roof {
  fill: var(--primary-purple);
  stroke: var(--white);
  stroke-width: 3;
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  animation: drawRoof 1.8s ease-out 1.5s forwards;
  opacity: 0;
  animation: drawRoof 1.8s ease-out 1.5s forwards, fadeInElement 0.8s ease-out 2s forwards;
}

#door {
  fill: var(--secondary);
  stroke: var(--white);
  stroke-width: 2;
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: drawDoor 1s ease-out 3s forwards;
}

#door-handle {
  fill: #FFD700;
  opacity: 0;
  animation: fadeInElement 0.5s ease-out 4s forwards;
}

/* Windows */
#window-1, #window-2, #roof-window {
  fill: rgba(135, 206, 235, 0.3);
  stroke: var(--white);
  stroke-width: 2;
  stroke-dasharray: 150;
  stroke-dashoffset: 150;
  animation: drawWindow 0.8s ease-out forwards;
}

#window-1 { animation-delay: 3.5s; }
#window-2 { animation-delay: 3.7s; }
#roof-window { animation-delay: 3.9s; }

/* Window details */
#window1-cross-h, #window1-cross-v,
#window2-cross-h, #window2-cross-v,
#roof-window-cross {
  stroke: var(--white);
  stroke-width: 1;
  opacity: 0;
  animation: fadeInElement 0.3s ease-out forwards;
}

#window1-cross-h, #window1-cross-v { animation-delay: 4.2s; }
#window2-cross-h, #window2-cross-v { animation-delay: 4.4s; }
#roof-window-cross { animation-delay: 4.6s; }

/* Chimney */
#chimney {
  fill: var(--secondary);
  stroke: var(--white);
  stroke-width: 2;
  stroke-dasharray: 150;
  stroke-dashoffset: 150;
  animation: drawChimney 0.8s ease-out 4.5s forwards;
}

#chimney-top {
  fill: var(--gray-600);
  stroke: var(--white);
  stroke-width: 2;
  opacity: 0;
  animation: fadeInElement 0.5s ease-out 5s forwards;
}

/* Garden elements */
#garden-1, #garden-2 {
  fill: none;
  stroke: #90EE90;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: drawGarden 1s ease-out forwards;
}

#garden-1 { animation-delay: 5.5s; }
#garden-2 { animation-delay: 5.7s; }

/* ===== Service Arch Icons ===== */
.service-arch {
  opacity: 0;
  animation: fadeInElement 1s ease-out 7s forwards;
}

.service-icon {
  fill: rgba(255, 255, 255, 0.15);
  stroke: var(--white);
  stroke-width: 2;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0;
  animation: popInDelayed 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

.service-icon:hover {
  fill: rgba(255, 255, 255, 0.25);
  transform: scale(1.1);
}

.service-icon.electrical {
  animation-delay: 7.2s;
}

.service-icon.plumbing {
  animation-delay: 7.4s;
}

.service-icon.carpentry {
  animation-delay: 7.6s;
}

.service-icon.painting {
  animation-delay: 7.8s;
}

.service-icon.cleaning {
  animation-delay: 8s;
}

.service-icon-text {
  font-family: var(--font-primary);
  font-size: 16px;
  fill: var(--white);
  opacity: 0;
  pointer-events: none;
  animation: fadeInElement 0.3s ease-out forwards;
}

.service-icon-text.electrical { animation-delay: 7.5s; }
.service-icon-text.plumbing { animation-delay: 7.7s; }
.service-icon-text.carpentry { animation-delay: 7.9s; }
.service-icon-text.painting { animation-delay: 8.1s; }
.service-icon-text.cleaning { animation-delay: 8.3s; }

/* ===== Categories Rotator ===== */
.categories-rotator {
  height: 2.5rem;
  overflow: hidden;
  margin: var(--spacing-lg) 0;
}

.categories-rotator ul {
  list-style: none;
  animation: rotateCategories 10s infinite;
}

.categories-rotator li {
  height: 2.5rem;
  line-height: 2.5rem;
  font-size: 2rem;
  font-weight: 700;
  color: var(--secondary);
}

/* ===== Features Section ===== */
.features {
  padding: var(--spacing-xxl) 0;
  background: var(--gray-100);
}

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xxl);
  margin-top: var(--spacing-xxl);
}

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--white);
  padding: var(--spacing-xl);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.feature-card h3 {
  color: var(--primary-purple);
  margin-bottom: var(--spacing-lg);
}

.feature-list {
  list-style: none;
}

.feature-list li {
  padding: var(--spacing-sm) 0;
  padding-left: 2rem;
  position: relative;
}

.feature-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 700;
  font-size: 1.25rem;
}

/* ===== Button Base Styles ===== */
.btn {
  padding: var(--spacing-md) var(--spacing-xl);
  border: none;
  border-radius: var(--border-radius-xl);
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-base);
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-sm);
  min-width: 200px;
  position: relative;
  overflow: hidden;
}

/* ===== Enhanced CTA Buttons ===== */
.btn-cta {
  background: linear-gradient(135deg, var(--white) 0%, #f8f9fa 100%);
  color: var(--primary-purple);
  border: 3px solid var(--white);
  box-shadow: var(--shadow-lg);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.6), transparent);
  transition: left 0.6s ease;
}

.btn-cta:hover::before {
  left: 100%;
}

.btn-cta:hover {
  background: linear-gradient(135deg, var(--white) 0%, var(--white) 100%);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 30px rgba(123, 63, 242, 0.3);
  border-color: var(--primary-light);
}

.btn-cta:active {
  transform: translateY(-1px) scale(1.01);
  transition: all 0.1s ease;
}

/* Subtle differentiation through icons and hover effects */
.client-cta:hover {
  box-shadow: 0 10px 30px rgba(123, 63, 242, 0.3), 0 0 0 4px rgba(123, 63, 242, 0.1);
}

.expert-cta:hover {
  box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3), 0 0 0 4px rgba(255, 107, 107, 0.1);
}

/* ===== Floating Vendor Button ===== */
.floating-vendor-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  animation: fadeInUp 1s ease-out 2s both;
}

.vendor-access-btn {
  background: linear-gradient(135deg, #FF6B35 0%, #F7931E 100%);
  color: var(--white);
  border: none;
  border-radius: 50px;
  padding: var(--spacing-md) var(--spacing-lg);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
  transition: all var(--transition-base);
  white-space: nowrap;
  animation: vendorPulse 3s ease-in-out infinite 3s;
}

.vendor-access-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 35px rgba(255, 107, 53, 0.4);
  animation: none;
}

.vendor-access-btn:active {
  transform: translateY(-1px) scale(1.02);
}

.vendor-access-btn i {
  font-size: 1.1rem;
}

@keyframes vendorPulse {
  0%, 100% { 
    transform: scale(1); 
    box-shadow: 0 8px 25px rgba(255, 107, 53, 0.3);
  }
  50% { 
    transform: scale(1.05); 
    box-shadow: 0 12px 35px rgba(255, 107, 53, 0.5);
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .floating-vendor-btn {
    bottom: 20px;
    right: 20px;
  }
  
  .vendor-access-btn {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.875rem;
  }
  
  .vendor-access-btn span {
    display: none; /* Show only icon on mobile */
  }
}

@media (max-width: 480px) {
  .vendor-access-btn {
    width: 50px;
    height: 50px;
    padding: 0;
    border-radius: 50%;
    justify-content: center;
  }
  
  .vendor-access-btn i {
    font-size: 1.25rem;
  }
}

/* ===== Footer ===== */
.footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: var(--spacing-xl) 0;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: var(--spacing-lg);
  justify-content: center;
  margin-bottom: var(--spacing-md);
}

.footer-links a {
  color: var(--gray-400);
}

.footer-links a:hover {
  color: var(--white);
}

/* ===== Bootstrap Modal Overrides ===== */
/* Remove conflicting modal styles - Bootstrap handles all modal display logic */

/* Custom modal styling that doesn't conflict with Bootstrap */
.modal-header p {
  color: var(--gray-600);
  font-size: 0.875rem;
}

/* Bootstrap handles modal body and close button styling */

/* ===== Authentication Toggles ===== */
.auth-toggles {
  margin-top: var(--spacing-lg);
  text-align: center;
}

.auth-toggles a {
  color: var(--primary-purple);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--transition-base);
  display: inline-block;
  margin: var(--spacing-xs) 0;
}

.auth-toggles a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.auth-toggles br {
  margin: var(--spacing-sm) 0;
}

/* ===== Form Elements ===== */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-control {
  width: 100%;
  padding: var(--spacing-md);
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: border-color var(--transition-base);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px rgba(123, 63, 242, 0.1);
}

.divider {
  display: flex;
  align-items: center;
  margin: var(--spacing-lg) 0;
  color: var(--gray-500);
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--gray-300);
}

.divider span {
  padding: 0 var(--spacing-md);
  font-size: 0.875rem;
}

/* ===== Google Sign-in Button ===== */
.btn-google {
  width: 100%;
  padding: var(--spacing-md);
  background: var(--white);
  border: 1px solid var(--gray-300);
  border-radius: var(--border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  font-weight: 500;
  color: var(--gray-700);
  cursor: pointer;
  transition: all var(--transition-base);
}

.btn-google:hover {
  background: var(--gray-100);
  border-color: var(--gray-400);
}

.btn-google img {
  width: 20px;
  height: 20px;
}

/* ===== Animations ===== */
@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes rotateCategories {
  0%, 10% {
    transform: translateY(0);
  }
  12.5%, 22.5% {
    transform: translateY(-2.5rem);
  }
  25%, 35% {
    transform: translateY(-5rem);
  }
  37.5%, 47.5% {
    transform: translateY(-7.5rem);
  }
  50%, 60% {
    transform: translateY(-10rem);
  }
  62.5%, 72.5% {
    transform: translateY(-12.5rem);
  }
  75%, 85% {
    transform: translateY(-15rem);
  }
  87.5%, 97.5% {
    transform: translateY(-17.5rem);
  }
  100% {
    transform: translateY(0);
  }
}

/* ===== Loading Spinner ===== */
.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--gray-300);
  border-top-color: var(--primary-purple);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== Elegant Home Animation Keyframes ===== */

/* Background circle subtle pulsing */
@keyframes bgPulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.02);
  }
}

/* Drawing line animations */
@keyframes drawLine {
  to {
    stroke-dashoffset: 0;
  }
}

/* House body drawing and filling */
@keyframes drawHouse {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes fillHouse {
  from {
    fill: rgba(255, 255, 255, 0);
  }
  to {
    fill: rgba(255, 255, 255, 0.1);
  }
}

/* Roof drawing */
@keyframes drawRoof {
  to {
    stroke-dashoffset: 0;
  }
}

/* Door drawing */
@keyframes drawDoor {
  to {
    stroke-dashoffset: 0;
  }
}

/* Window drawing */
@keyframes drawWindow {
  to {
    stroke-dashoffset: 0;
  }
}

/* Chimney drawing */
@keyframes drawChimney {
  to {
    stroke-dashoffset: 0;
  }
}

/* Garden drawing */
@keyframes drawGarden {
  to {
    stroke-dashoffset: 0;
  }
}

/* Element fade in */
@keyframes fadeInElement {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Service icons pop in with delay */
@keyframes popInDelayed {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  80% {
    transform: scale(1.15);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Service labels fade in up */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* CTA Button subtle pulsing */
@keyframes ctaPulse {
  0%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
  }
  50% {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
  }
}

/* ===== Responsive Design for Home Animation ===== */
@media (max-width: 768px) {
  .hero-visual {
    height: 450px;
  }
  
  .home-animation {
    max-width: 450px;
    height: 400px;
  }
  
  .animated-home {
    max-width: 450px;
  }
  
  .service-icon-text {
    font-size: 14px;
  }
  
  /* Reduce motion for users who prefer it */
  @media (prefers-reduced-motion: reduce) {
    .bg-circle,
    #foundation,
    #house-body,
    #roof,
    #door,
    #window-1,
    #window-2,
    #roof-window,
    #chimney,
    #garden-1,
    #garden-2,
    .service-arch,
    .service-icon,
    .service-icon-text {
      animation: none !important;
      opacity: 1 !important;
      stroke-dashoffset: 0 !important;
    }
    
    #house-body {
      fill: rgba(255, 255, 255, 0.1) !important;
    }
    
    #door-handle {
      opacity: 1 !important;
    }
  }
}

/* ===== Responsive Utilities ===== */
@media (max-width: 768px) {
  .hide-mobile {
    display: none;
  }
}

@media (min-width: 769px) {
  .hide-desktop {
    display: none;
  }
}

/* ===== Contact Form Styles ===== */
.form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group {
  flex: 1;
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-dark);
}

.form-input {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid #e1e1e1;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary-purple);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-input:invalid {
  border-color: #ef4444;
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
}

select.form-input {
  cursor: pointer;
}

/* Captcha Styles */
.captcha-group {
  background: #f8f9fa;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #e1e1e1;
}

.captcha-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.5rem;
}

#captchaQuestion {
  font-weight: 500;
  color: var(--text-dark);
  min-width: 120px;
}

.captcha-input {
  max-width: 100px;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #e1e1e1;
}

.btn.btn-secondary {
  background: #6b7280;
  color: white;
}

.btn.btn-secondary:hover {
  background: #4b5563;
}

/* Contact Modal Specific */
#contactModal .modal-content {
  max-width: 600px;
}

#contactModal .modal-header p {
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Loading State */
.btn.loading {
  position: relative;
  color: transparent;
}

.btn.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Success/Error States */
.form-message {
  padding: 0.75rem;
  border-radius: 6px;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-message.success {
  background: #d1fae5;
  color: #065f46;
  border: 1px solid #10b981;
}

.form-message.error {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #ef4444;
}

/* Responsive */
@media (max-width: 768px) {
  .form-row {
    flex-direction: column;
    gap: 0;
  }
  
  .form-actions {
    flex-direction: column;
  }
  
  .captcha-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }
  
  #captchaQuestion {
    min-width: auto;
  }
  
  .captcha-input {
    max-width: 150px;
  }
}