/* ===================================
   ElleD. Parrucchieri - Main Styles
   Mobile-First Responsive Design
   =================================== */

/* Reset e Base Styles */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #333333;
  background-color: #ffffff;
  overflow-x: hidden;
  padding-top: 80px; /* Offset for fixed navbar */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #333333;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1rem;
  line-height: 1.6;
}

a {
  color: #000000;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #333333;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* Section Spacing */
section {
  position: relative;
  z-index: 1;
}

/* Utility Classes */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Loading Animation */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(0, 0, 0, 0.3);
  border-radius: 50%;
  border-top-color: #000000;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Focus Styles */
*:focus {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

button:focus,
a:focus {
  outline: 2px solid #000000;
  outline-offset: 2px;
}

/* Selection Styles */
::selection {
  background-color: #000000;
  color: #ffffff;
}

::-moz-selection {
  background-color: #000000;
  color: #ffffff;
}

/* Button Base Styles */
button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
}

/* Print Styles */
@media print {
  * {
    background: transparent !important;
    color: black !important;
    box-shadow: none !important;
    text-shadow: none !important;
  }

  a,
  a:visited {
    text-decoration: underline;
  }

  a[href]:after {
    content: " (" attr(href) ")";
  }

  .navbar,
  .footer-social,
  .btn-whatsapp,
  .btn-call {
    display: none !important;
  }
}

/* Tablet Styles */
@media (min-width: 768px) {
  body {
    padding-top: 100px;
  }

  .container {
    padding: 0 2rem;
  }

  h1 { font-size: 2.5rem; }
  h2 { font-size: 2.25rem; }
  h3 { font-size: 1.75rem; }
  h4 { font-size: 1.5rem; }
  h5 { font-size: 1.25rem; }
  h6 { font-size: 1.125rem; }
}

/* Desktop Styles */
@media (min-width: 1024px) {
  body {
    padding-top: 120px;
  }

  .container {
    padding: 0 3rem;
  }

  h1 { font-size: 3rem; }
  h2 { font-size: 2.5rem; }
  h3 { font-size: 2rem; }
  h4 { font-size: 1.75rem; }
  h5 { font-size: 1.5rem; }
  h6 { font-size: 1.25rem; }
}

/* Large Desktop */
@media (min-width: 1200px) {
  .container {
    max-width: 1400px;
  }

  h1 { font-size: 3.5rem; }
  h2 { font-size: 3rem; }
}

/* High Resolution Displays */
@media (min-resolution: 192dpi) {
  /* Optimize for high-DPI displays */
}

/* Reduce Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Dark Mode Support (Future Enhancement) */
@media (prefers-color-scheme: dark) {
  /* Dark mode styles can be added here if needed */
}

/* Component Imports - Now loaded directly in HTML for better compatibility */

/* Animation Classes */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s ease-out forwards;
}

.slide-up {
  transform: translateY(30px);
  opacity: 0;
  animation: slideUp 0.6s ease-out forwards;
}

.slide-down {
  transform: translateY(-30px);
  opacity: 0;
  animation: slideDown 0.6s ease-out forwards;
}

.slide-left {
  transform: translateX(30px);
  opacity: 0;
  animation: slideLeft 0.6s ease-out forwards;
}

.slide-right {
  transform: translateX(-30px);
  opacity: 0;
  animation: slideRight 0.6s ease-out forwards;
}

.scale-in {
  transform: scale(0.9);
  opacity: 0;
  animation: scaleIn 0.6s ease-out forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideDown {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes slideLeft {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideRight {
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes scaleIn {
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* Intersection Observer Classes */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Error States */
.error-message {
  background-color: #fee;
  color: #c33;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #fcc;
  margin: 1rem 0;
}

.success-message {
  background-color: #efe;
  color: #363;
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid #cfc;
  margin: 1rem 0;
}

/* Loading States */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 5px solid #f3f3f3;
  border-top: 5px solid #000000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Skip Links - Nascosto visivamente ma accessibile */
.skip-link {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

.skip-link:focus {
  position: absolute;
  top: 10px;
  left: 10px;
  width: auto;
  height: auto;
  overflow: visible;
  clip: auto;
  white-space: normal;
  background: #000000;
  color: #ffffff;
  padding: 12px 16px;
  text-decoration: none;
  z-index: 10000;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  font-size: 14px;
  font-weight: 500;
}