/* ============================================
   Studio Dentistico Allegretti - Homepage CSS
   Replica fedele del sito WordPress Exponent/Tatsu
   ============================================ */

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

:root {
  --blue: #2293D7;
  --blue-light: #03A9F4;
  --blue-hero-btn: #5ac8fa;
  --text-dark: #343638;
  --text-body: #77797d;
  --text-muted: #848991;
  --white: #ffffff;
  --bg-light: #f8f8f8;
  --shadow-card: 0px 5px 30px 0px rgba(214, 215, 216, 0.57);
  --shadow-card-hover: 0px 5px 45px 0px rgba(175, 177, 177, 0.57);
  --container: 1160px;
  --font-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-system);
  font-size: 16px;
  line-height: 28px;
  color: var(--text-body);
  background: var(--white);
  overflow-x: hidden;
}

a { color: var(--blue); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--text-dark); }

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-system);
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.3;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-system);
  font-size: 12px;
  font-weight: 600;
  line-height: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 28px;
  border-radius: 50px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
}

.btn-primary {
  background: var(--blue);
  color: var(--white);
  border-color: var(--blue);
}
.btn-primary:hover { background: #1a7ab8; color: var(--white); }

.btn-white {
  background: var(--white);
  color: #313233;
  border-color: var(--white);
}
.btn-white:hover { background: #f0f0f0; color: #313233; }

.btn-outline {
  background: transparent;
  color: var(--blue);
  border-color: var(--blue);
}
.btn-outline:hover { background: var(--blue); color: var(--white); }

.btn-sm { font-size: 12px; padding: 10px 20px; }

/* ============================================
   HEADER
   ============================================ */
#site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

/* Top bar */
.header-top {
  background: var(--blue);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  padding: 5px 0;
}

.header-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-top-left {
  display: flex;
  align-items: center;
  gap: 0;
  padding-left: 32px;
}

.icon-card {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: 30px;
  font-size: 15px;
}

.icon-card a {
  color: var(--white);
  font-weight: 400;
}
.icon-card a:hover { color: rgba(255, 255, 255, 0.8); }
.icon-card .icon { color: var(--white); flex-shrink: 0; }

.header-top-right {
  display: flex;
  align-items: center;
  padding-right: 32px;
}

.header-divider {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.2);
  margin-right: 15px;
}

.social-icons {
  display: flex;
  align-items: center;
  gap: 15px;
}

.social-icons a {
  color: var(--white);
  display: flex;
  align-items: center;
}
.social-icons a:hover { color: rgba(255, 255, 255, 0.7); }

/* Main header */
.header-main {
  background: transparent;
  padding: 0;
  transition: background 0.3s, box-shadow 0.3s, padding 0.3s;
}

.header-main.stuck {
  background: var(--white);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.header-main-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  min-height: 80px;
}

.logo { display: flex; align-items: center; margin-right: 30px; }

.logo-img {
  max-height: 132px;
  width: auto;
  transition: max-height 0.3s;
}

.header-main.stuck .logo-img { max-height: 96px; }

.logo-stuck { display: none; }

/* Navigation */
.main-nav ul {
  display: flex;
  align-items: center;
  list-style: none;
  gap: 0;
}

.main-nav a {
  font-family: "Montserrat", var(--font-system);
  font-size: 16px;
  font-weight: 500;
  color: rgba(0, 0, 0, 1);
  padding: 8px 10px;
  display: block;
  transition: color 0.2s;
}

.header-main:not(.stuck) .main-nav a { color: var(--white); }
.header-main:not(.stuck) .main-nav a:hover { color: rgba(255, 255, 255, 0.4); }
.header-main:not(.stuck) .main-nav a.active { color: rgba(255, 255, 255, 0.4); }

.header-main.stuck .main-nav a { color: rgba(0, 0, 0, 1); }
.header-main.stuck .main-nav a:hover,
.header-main.stuck .main-nav a.active { color: var(--blue); }

.btn-cta { margin-left: 20px; flex-shrink: 0; }

.header-main:not(.stuck) .btn-cta {
  background: var(--white);
  color: var(--blue);
  border-color: #f5f5f5;
}
.header-main:not(.stuck) .btn-cta:hover {
  background: #f0f0f0;
  color: var(--blue);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #03A9F4;
  transition: all 0.3s;
}

.header-main:not(.stuck) .hamburger span { background: var(--white); }

/* Slide menu */
.slide-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 310px;
  height: 100vh;
  background: var(--blue);
  z-index: 2000;
  transform: translateX(310px);
  transition: transform 0.35s ease;
  overflow-y: auto;
}

.slide-menu.open { transform: translateX(0); }

.slide-menu-inner {
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.slide-menu-logo img { max-height: 71px; width: auto; }

.slide-menu-nav ul { list-style: none; }

.slide-menu-nav a {
  font-family: "Montserrat", var(--font-system);
  font-size: 16px;
  font-weight: 500;
  color: var(--white);
  display: block;
  padding: 8px 0;
  margin-bottom: 5px;
}
.slide-menu-nav a:hover { color: rgba(255, 255, 255, 0.55); }

.slide-menu-social {
  display: flex;
  gap: 15px;
}
.slide-menu-social a { color: var(--white); }

.slide-menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1999;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s, visibility 0.35s;
}
.slide-menu-overlay.open { opacity: 1; visibility: visible; }

/* ============================================
   HERO SLIDER
   ============================================ */
.hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
}

.hero-slider {
  position: relative;
  width: 100%;
  height: 100vh;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s;
}

.hero-slide.active {
  opacity: 1;
  visibility: visible;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-slide-video::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 1;
}

.hero-slide-video .hero-content {
  z-index: 2;
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  z-index: 2;
  padding: 0 20px;
}

.hero-title {
  font-family: "Poppins", var(--font-system);
  font-size: 80px;
  font-weight: 800;
  line-height: 90px;
  letter-spacing: -4px;
  color: var(--white);
  margin-bottom: 0;
  animation: heroFadeUp 0.7s ease 0.3s both;
}

.hero-subtitle {
  font-family: Arial, var(--font-system);
  font-size: 29px;
  font-weight: 400;
  line-height: 36px;
  color: var(--white);
  margin-top: 20px;
  animation: heroFadeUp 0.7s ease 0.5s both;
}

.hero-btn {
  display: inline-block;
  margin-top: 50px;
  padding: 15px 35px;
  background: var(--blue-hero-btn);
  color: var(--white);
  font-family: "Roboto", var(--font-system);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-radius: 3px;
  transition: background 0.2s;
  animation: heroFadeUp 0.7s ease 0.7s both;
}
.hero-btn:hover { background: #000; color: var(--white); }

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(50px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero controls */
.hero-dots {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 10;
}

.hero-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: background 0.2s;
}
.hero-dot.active { background: var(--white); }

.hero-arrows { display: none; }

/* ============================================
   SECTIONS COMMON
   ============================================ */
.section { padding: 90px 0; }

.section-intro {
  text-align: center;
  margin-bottom: 50px;
}

.section-title {
  font-size: 46px;
  line-height: 60px;
  color: var(--blue);
  margin-bottom: 20px;
}

.section-desc {
  font-size: 16px;
  line-height: 28px;
  color: var(--text-body);
  max-width: 100%;
  margin: 0 auto;
}

.section-title-light { color: var(--white); }
.section-desc-light { color: var(--white); font-size: 16px; }

.text-black { color: #000000; }
.text-blue { color: var(--blue); }

/* ============================================
   SERVIZI
   ============================================ */
.section-services { background: var(--white); }

.services-grid {
  display: grid;
  gap: 30px;
  margin-bottom: 30px;
}

.services-grid-4 { grid-template-columns: repeat(4, 1fr); }
.services-grid-3 { grid-template-columns: repeat(3, 1fr); }

.service-card {
  background: var(--white);
  box-shadow: var(--shadow-card);
  border-radius: 0;
  overflow: hidden;
  transition: box-shadow 0.3s, transform 0.3s;
}

.service-card:hover { box-shadow: var(--shadow-card-hover); }

.service-card-image img {
  width: 100%;
  height: auto;
  display: block;
}

.service-card-body {
  padding: 0 16px 25px;
}

.service-card-title {
  font-size: 32px;
  line-height: 1.3;
  margin: 16px 0 10px;
  text-align: left;
}

.service-card-desc {
  font-size: 15px;
  font-weight: 600;
  line-height: 26px;
  color: var(--text-dark);
  margin-bottom: 0;
}

.animated-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 24px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--blue);
  letter-spacing: 0.5px;
  transition: color 0.2s;
}

.animated-link svg { fill: currentColor; }
.animated-link .arrow-head { fill: currentColor; }
.animated-link .arrow-bar { fill: currentColor; }
.animated-link:hover { color: #313233; }
.animated-link:hover svg { color: var(--blue); }

/* ============================================
   CHI SIAMO
   ============================================ */
.section-about {
  background: var(--blue);
  padding: 45px 0 0;
}

.about-grid {
  display: grid;
  grid-template-columns: 55% 45%;
  align-items: center;
  gap: 0;
}

.about-title {
  font-size: 46px;
  line-height: 60px;
  color: var(--white);
  margin-bottom: 16px;
}

.about-text {
  margin-bottom: 36px;
}

.about-text p {
  font-family: "Open Sans", var(--font-system);
  font-size: 20px;
  font-weight: 300;
  line-height: 30px;
  color: var(--white);
  margin-bottom: 10px;
}

.about-text strong { font-weight: 600; }

.about-image {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: visible;
}

.about-image img {
  width: 106%;
  transform: translateY(45px);
  max-width: none;
}

/* ============================================
   BLOG
   ============================================ */
.section-blog { background: var(--bg-light); }

.blog-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  margin-bottom: 40px;
}

.blog-card { text-align: center; }

.blog-card-thumb { margin-bottom: 20px; }

.blog-placeholder {
  width: 100%;
  padding-bottom: 80%;
  background: #e0e0e0;
  border-radius: 0;
}

.blog-category {
  margin-bottom: 8px;
}

.blog-category a {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  color: rgba(0, 0, 0, 0.45);
  letter-spacing: 0.5px;
}
.blog-category a:hover { color: var(--blue); }

.blog-card-title {
  font-size: 22px;
  line-height: 34px;
  margin-bottom: 10px;
}

.blog-card-title a {
  color: var(--text-dark);
  font-weight: 600;
}
.blog-card-title a:hover { color: var(--blue); }

.blog-date a {
  font-size: 13px;
  color: rgba(0, 0, 0, 0.45);
  font-weight: 500;
}
.blog-date a:hover { color: var(--blue); }

.blog-cta { text-align: center; }

/* ============================================
   RECENSIONI
   ============================================ */
.section-reviews { background: var(--blue); }

.testimonials {
  position: relative;
  max-width: 900px;
  margin: 0 auto;
}

.testimonials-track {
  position: relative;
  min-height: 200px;
}

.testimonial {
  display: none;
  text-align: center;
}

.testimonial.active { display: block; }

.testimonial-content {
  font-size: 18px;
  line-height: 1.7;
  color: var(--white);
  max-width: 71%;
  margin: 0 auto 20px;
}

.testimonial-content p { color: var(--white); }

.testimonial-author {
  font-size: 15px;
  font-weight: 600;
  line-height: 26px;
  color: var(--white);
}

.testimonials-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: 30px;
}

.testimonial-arrow {
  background: none;
  border: none;
  color: var(--white);
  cursor: pointer;
  padding: 8px;
  opacity: 0.7;
  transition: opacity 0.2s;
}
.testimonial-arrow:hover { opacity: 1; }

.testimonials-dots {
  display: flex;
  gap: 8px;
}

.testimonial-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: none;
  cursor: pointer;
  padding: 0;
}
.testimonial-dot.active { background: var(--white); }

.reviews-cta { text-align: center; margin-top: 30px; }

.btn-review {
  background: var(--white);
  color: var(--blue);
}
.btn-review:hover { background: #f0f0f0; color: var(--blue); }

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: var(--blue-light);
  padding: 50px 0;
  color: var(--white);
}

.footer-grid {
  display: grid;
  grid-template-columns: 30% 36.67% 33.33%;
  gap: 30px;
}

.footer-logo {
  max-width: 40%;
  margin-bottom: 30px;
}

.footer-social {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.footer-social a { color: var(--white); }
.footer-social a:hover { color: rgba(255, 255, 255, 0.7); }

.footer-copy,
.footer-piva {
  font-size: 15px;
  color: var(--white);
  line-height: 1.6;
}

.footer-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.footer-links h5,
.footer-contact h5 {
  font-size: 17px;
  line-height: 30px;
  color: var(--white);
  margin-bottom: 15px;
}

.footer-links ul { list-style: none; }

.footer-links a {
  font-size: 15px;
  color: var(--white);
  display: block;
  padding: 3px 0;
  line-height: 25px;
}
.footer-links a:hover { color: rgba(56, 213, 82, 1); }

.footer-contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 13px;
}

.footer-contact-item svg { flex-shrink: 0; margin-top: 4px; color: #313233; }

.footer-contact-item a {
  font-size: 15px;
  color: var(--white);
  line-height: 25px;
}
.footer-contact-item a:hover { color: rgba(255, 255, 255, 0.8); }

/* ============================================
   WHATSAPP & BACK TO TOP
   ============================================ */
.whatsapp-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #25D366;
  color: var(--white);
  padding: 12px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s, box-shadow 0.2s;
}
.whatsapp-btn:hover { color: var(--white); transform: scale(1.05); }

.back-to-top {
  position: fixed;
  bottom: 90px;
  right: 30px;
  z-index: 900;
  width: 44px;
  height: 44px;
  background: var(--blue);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { color: var(--white); background: #1a7ab8; }

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .header-top { display: none; }

  .services-grid-4 { grid-template-columns: repeat(2, 1fr); }
  .services-grid-3 { grid-template-columns: repeat(2, 1fr); }

  .about-grid { grid-template-columns: 1fr 1fr; }
  .about-content { padding-left: 30px; }

  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 767px) {
  .main-nav,
  .btn-cta { display: none; }

  .hamburger { display: flex; }

  .header-main-inner { padding: 0 8px; min-height: 70px; }

  .logo-img { max-height: 110px; }
  .header-main.stuck .logo-img { max-height: 104px; }

  .hero-title {
    font-size: 48px;
    line-height: 48px;
    letter-spacing: -2px;
  }

  .hero-subtitle { font-size: 24px; line-height: 30px; }

  .section { padding: 60px 0; }

  .section-title { font-size: 32px; line-height: 42px; }

  .services-grid-4,
  .services-grid-3 { grid-template-columns: 1fr; }

  .about-grid { grid-template-columns: 1fr; }
  .about-content { padding: 0; order: 1; }
  .about-image { order: 2; margin-top: 52px; }
  .about-image img { width: 100%; transform: none; }

  .section-about { padding: 90px 0 0; }

  .blog-grid { grid-template-columns: 1fr; }

  .testimonial-content { max-width: 100%; font-size: 16px; }

  .footer-grid { grid-template-columns: 1fr; }
  .footer-links { grid-template-columns: 1fr; }

  .footer-logo { max-width: 60%; }

  .whatsapp-btn span { display: none; }
  .whatsapp-btn { padding: 14px; border-radius: 50%; }
}

@media (min-width: 768px) and (max-width: 1024px) {
  .header-top { display: none; }
  .main-nav { display: none; }
  .hamburger { display: flex; }
  .btn-cta { display: none; }
}
