/* ============================================================
   riparazionesmartphone.it — Style Sheet
   Design: Hi-tech, professionale, mobile-first
   Author: Perla per Rovato Computer
   ============================================================ */

/* --- RESET & BASE --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Palette */
  --primary: #0A66C2;
  --primary-dark: #084A8A;
  --primary-light: #E8F4FD;
  --accent: #FF6D00;
  --accent-hover: #E06000;
  --dark: #1A1A2E;
  --gray-900: #2D2D44;
  --gray-700: #4A4A6A;
  --gray-500: #7A7A9A;
  --gray-300: #C0C0D0;
  --gray-100: #F0F2F8;
  --white: #FFFFFF;
  --green: #10B981;
  --red: #EF4444;

  /* Layout */
  --max-width: 1200px;
  --header-h: 70px;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 4px 20px rgba(10, 102, 194, 0.10);
  --shadow-lg: 0 8px 40px rgba(10, 102, 194, 0.15);

  /* Typography */
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
ul { list-style: none; }
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }

/* --- BUTTONS --- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 32px; border-radius: var(--radius);
  font-weight: 600; font-size: 0.95rem;
  cursor: pointer; border: none;
  transition: all var(--transition);
  text-decoration: none;
}
.btn-primary {
  background: var(--accent); color: var(--white);
  box-shadow: 0 4px 14px rgba(255, 109, 0, 0.35);
}
.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 109, 0, 0.45);
  color: var(--white);
}
.btn-outline {
  background: transparent; color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--primary); color: var(--white);
  transform: translateY(-2px);
}
.btn-whatsapp {
  background: #25D366; color: var(--white);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}
.btn-whatsapp:hover {
  background: #1DA851; color: var(--white);
  transform: translateY(-2px);
}

/* --- HEADER / NAV --- */
.header {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-100);
  z-index: 1000;
  transition: box-shadow var(--transition);
}
.header.scrolled { box-shadow: var(--shadow); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 20px;
}

/* Logo */
.logo {
  display: flex; align-items: center; gap: 8px;
  font-size: 0.95rem; font-weight: 800; color: var(--dark);
  text-decoration: none; white-space: nowrap;
}
.logo img { width: 36px; height: 36px; flex-shrink: 0; }
.logo span { font-size: 0.85rem; background: linear-gradient(135deg, var(--primary), var(--accent)); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* Nav desktop */
.nav { display: flex; align-items: center; gap: 8px; }
.nav a {
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 0.9rem; font-weight: 500; color: var(--gray-700);
  transition: all var(--transition);
}
.nav a:hover, .nav a.active { background: var(--primary-light); color: var(--primary); }
.nav .btn { padding: 10px 20px; font-size: 0.85rem; }

/* Hamburger */
.hamburger {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: none; cursor: pointer;
  padding: 8px; z-index: 1001;
}
.hamburger span {
  display: block; width: 26px; height: 3px;
  background: var(--dark); border-radius: 3px;
  transition: all var(--transition);
}
.hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- HERO SECTION --- */
.hero {
  padding: calc(var(--header-h) + 60px) 0 80px;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--white) 100%);
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute;
  top: -50%; right: -20%; width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(10,102,194,0.06) 0%, transparent 70%);
  border-radius: 50%;
}
.hero-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 60px; align-items: center;
  position: relative; z-index: 1;
}
.hero-content h1 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 800; line-height: 1.15;
  color: var(--dark); margin-bottom: 20px;
}
.hero-content h1 span { color: var(--primary); }
.hero-content p {
  font-size: 1.1rem; color: var(--gray-500);
  margin-bottom: 32px; max-width: 520px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-image {
  display: flex; justify-content: center; align-items: center;
}
.hero-image img {
  width: 100%; max-width: 520px; border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

/* --- SECTION BASE --- */
.section {
  padding: 80px 0;
}
.section-title {
  text-align: center; margin-bottom: 16px;
}
.section-title h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800; color: var(--dark);
}
.section-title p {
  color: var(--gray-500); font-size: 1.05rem;
  max-width: 600px; margin: 12px auto 0;
}
.section-subtitle {
  text-align: center;
  color: var(--primary); font-weight: 600; font-size: 0.9rem;
  text-transform: uppercase; letter-spacing: 2px;
  margin-bottom: 8px;
}
.section-white { background: var(--white); }
.section-gray { background: var(--gray-100); }
.section-dark {
  background: linear-gradient(135deg, var(--dark), var(--gray-900));
  color: var(--white);
}
.section-dark .section-title h2 { color: var(--white); }
.section-dark .section-title p { color: var(--gray-300); }

/* --- SERVIZI GRID (Home) --- */
.servizi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px; margin-top: 40px;
}
.servizio-card {
  background: var(--white); border-radius: var(--radius);
  padding: 32px 24px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  text-align: center;
  border: 1px solid var(--gray-100);
}
.servizio-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}
.servizio-icon {
  width: 64px; height: 64px; margin: 0 auto 20px;
  background: var(--primary-light); border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
}
.servizio-icon svg { width: 32px; height: 32px; stroke: var(--primary); fill: none; color: var(--primary); }
.servizio-card h3 {
  font-size: 1.15rem; font-weight: 700; margin-bottom: 10px;
  color: var(--dark);
}
.servizio-card p {
  font-size: 0.9rem; color: var(--gray-500); line-height: 1.6;
}

/* --- BRAND GRID (Home) --- */
.brand-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px; margin-top: 40px;
}
.brand-card {
  display: flex; flex-direction: column; align-items: center;
  gap: 12px; padding: 24px 16px;
  background: var(--white); border-radius: var(--radius);
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow);
  transition: all var(--transition);
  text-decoration: none; color: var(--dark);
}
.brand-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}
.brand-card img {
  width: 64px; height: 64px; object-fit: contain;
  border-radius: 12px;
}
.brand-card span {
  font-weight: 600; font-size: 0.95rem;
}

/* --- RIPARAZIONI BOX (Brand pages) --- */
.riparazioni-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px; margin-top: 40px;
}
.riparazione-box {
  background: var(--white); border-radius: var(--radius);
  padding: 28px 24px;
  border: 1px solid var(--gray-100);
  box-shadow: var(--shadow);
  transition: all var(--transition);
  display: flex; gap: 20px; align-items: flex-start;
}
.riparazione-box:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary-light);
}
.riparazione-icon {
  width: 56px; height: 56px; flex-shrink: 0;
  background: var(--primary-light); border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
}
.riparazione-icon svg { width: 28px; height: 28px; stroke: var(--primary); fill: none; stroke-width: 1.8; color: var(--primary); }
.riparazione-content h3 {
  font-size: 1.05rem; font-weight: 700; margin-bottom: 6px;
  color: var(--dark);
}
.riparazione-content p {
  font-size: 0.88rem; color: var(--gray-500); line-height: 1.6;
}
.riparazione-content .prezzo {
  display: inline-block; margin-top: 10px;
  font-weight: 700; color: var(--accent);
  font-size: 0.95rem;
}

/* --- BRAND HERO (Brand pages) --- */
.brand-hero {
  padding: calc(var(--header-h) + 60px) 0 60px;
  background: linear-gradient(135deg, var(--primary-light) 0%, var(--white) 100%);
}
.brand-hero-inner {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 40px; align-items: center;
}
.brand-hero-content h1 {
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 800; color: var(--dark); margin-bottom: 16px;
}
.brand-hero-content p {
  font-size: 1rem; color: var(--gray-500); line-height: 1.7;
  margin-bottom: 24px;
}
.brand-hero-image img {
  width: 100%; max-width: 450px; border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  margin: 0 auto;
}

/* --- PERCHE' NOI --- */
.perche-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px; margin-top: 40px;
}
.perche-item {
  text-align: center; padding: 24px;
}
.perche-item .num {
  font-size: 2.4rem; font-weight: 800; color: var(--primary);
  line-height: 1;
}
.perche-item h3 { font-size: 1.1rem; font-weight: 700; margin: 12px 0 8px; color: var(--dark); }
.perche-item p { font-size: 0.88rem; color: var(--gray-500); line-height: 1.6; }

/* --- MARCHE (Brand page tabs) --- */
.brand-tabs {
  display: flex; flex-wrap: wrap; gap: 8px;
  justify-content: center; margin-top: 40px;
}
.brand-tab {
  padding: 10px 20px; border-radius: var(--radius);
  border: 2px solid var(--gray-300);
  background: var(--white);
  font-weight: 600; font-size: 0.88rem;
  cursor: pointer; transition: all var(--transition);
  color: var(--gray-700); text-decoration: none;
}
.brand-tab:hover, .brand-tab.active {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--white);
}

/* --- CTA SECTION --- */
.cta-section {
  text-align: center; padding: 80px 0;
}
.cta-section h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 800; margin-bottom: 16px;
}
.cta-section p {
  font-size: 1.05rem; color: var(--gray-300);
  margin-bottom: 32px; max-width: 500px; margin-left: auto; margin-right: auto;
}
.cta-section .btn { font-size: 1.05rem; padding: 16px 40px; }

/* --- FOOTER --- */
.footer {
  background: var(--dark); color: var(--gray-300);
  padding: 60px 0 30px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px; margin-bottom: 40px;
}
.footer-brand .logo { color: var(--white); margin-bottom: 16px; }
.footer-brand p { font-size: 0.88rem; line-height: 1.7; max-width: 300px; }
.footer h4 { color: var(--white); font-size: 0.95rem; font-weight: 700; margin-bottom: 16px; }
.footer a { color: var(--gray-300); font-size: 0.88rem; display: block; padding: 4px 0; }
.footer a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 24px; text-align: center;
  font-size: 0.82rem; color: var(--gray-500);
}

/* --- BREADCRUMB (JSON-LD, fallback text) --- */
.breadcrumb {
  padding: 16px 0 0; font-size: 0.82rem;
  color: var(--gray-500);
}
.breadcrumb a { color: var(--gray-500); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--gray-700); }

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-image { display: none; }
  .brand-hero-inner { grid-template-columns: 1fr; }
  .brand-hero-image { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  :root { --header-h: 60px; }

  .hamburger { display: flex; }

  .nav {
    position: fixed; top: 0; right: -100%;
    width: 300px; height: 100vh;
    background: var(--white); flex-direction: column;
    padding: 80px 24px 24px; gap: 4px;
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    transition: right var(--transition);
  }
  .nav.open { right: 0; }
  .nav a { width: 100%; font-size: 1rem; padding: 12px 16px; }
  .nav .btn { width: 100%; justify-content: center; margin-top: 8px; }

  .hero { padding: calc(var(--header-h) + 40px) 0 50px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }

  .section { padding: 50px 0; }

  .servizi-grid { grid-template-columns: 1fr; }
  .brand-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .riparazioni-grid { grid-template-columns: 1fr; }
  .riparazione-box { flex-direction: column; align-items: center; text-align: center; }

  .footer-grid { grid-template-columns: 1fr; }
  .brand-hero { padding: calc(var(--header-h) + 40px) 0 40px; }
}

@media (max-width: 480px) {
  .brand-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .brand-card { padding: 16px; }
  .brand-card img { width: 48px; height: 48px; }
}

/* --- ANIMATIONS --- */
.fade-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible { opacity: 1; transform: translateY(0); }

/* --- WHATSAPP FLOATING BUTTON --- */
.whatsapp-float {
  position: fixed; bottom: 24px; right: 24px;
  z-index: 999;
  width: 60px; height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: all var(--transition);
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37, 211, 102, 0.55);
}
.whatsapp-float svg {
  width: 30px; height: 30px;
  fill: var(--white);
}
.whatsapp-float .tooltip {
  position: absolute; right: 70px; top: 50%;
  transform: translateY(-50%);
  background: var(--dark); color: var(--white);
  padding: 8px 14px; border-radius: var(--radius-sm);
  font-size: 0.82rem; font-weight: 500;
  white-space: nowrap; opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.whatsapp-float:hover .tooltip {
  opacity: 1;
}

@media (max-width: 768px) {
  .whatsapp-float { bottom: 16px; right: 16px; width: 52px; height: 52px; }
  .whatsapp-float svg { width: 26px; height: 26px; }
  .whatsapp-float .tooltip { display: none; }
}

/* --- ACCESSIBILITY --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}

/* SKIP LINK */
.skip-link {
  position: absolute; top: -100%; left: 8px;
  background: var(--primary); color: var(--white);
  padding: 8px 16px; border-radius: var(--radius-sm);
  z-index: 9999; font-weight: 600;
}
.skip-link:focus { top: 8px; }