/*
 * Stile personalizzato per il sito Just Sara Social
 * Basato sulla struttura del template originale ma con palette beige/marrone
 * e font specificati (Antic Didone, Story Script, Roboto).
 */

/* Variabili di colore */
:root {
  --beige: #f5ede6;
  --brown: #916c5c;
  --dark: #1a1a1a;
  --light: #ffffff;
  --accent: #b08968;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Roboto', sans-serif;
  color: var(--dark);
  background: var(--light);
  overflow-x: hidden;
}

/* Utility font classes */
.antic-didone-regular {
  font-family: 'Antic Didone', serif;
}
.story-script-regular {
  font-family: 'Story Script', sans-serif;
}

/* Scroll to top button */
.scroll-up-btn {
  position: fixed;
  bottom: 20px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: var(--brown);
  color: var(--light);
  text-align: center;
  line-height: 45px;
  font-size: 1.5rem;
  border-radius: 50%;
  cursor: pointer;
  z-index: 999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}
.scroll-up-btn.show {
  opacity: 1;
  pointer-events: auto;
  bottom: 40px;
}
.scroll-up-btn:hover {
  filter: brightness(90%);
}

/* Navbar */
.navbar {
  position: fixed;
  width: 100%;
  top: 0;
  left: 0;
  z-index: 1000;
  padding: 20px 0;
  background: transparent;
  transition: background 0.3s ease, padding 0.3s ease;
}
.navbar.sticky {
  background: var(--brown);
  padding: 10px 0;
}
.navbar .max-width {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.navbar .logo a {
  font-size: 1.8rem;
  color: var(--light);
  white-space: nowrap;
}
.navbar.sticky .logo a {
  color: var(--light);
}
.navbar .menu {
  list-style: none;
  display: flex;
  gap: 20px;
}
.navbar .menu li a {
  color: var(--light);
  font-size: 1rem;
  font-weight: 500;
  transition: color 0.3s ease;
}
.navbar .menu li a:hover {
  color: var(--accent);
}
.navbar.sticky .menu li a {
  color: var(--light);
}
.menu-btn {
  display: none;
  color: var(--light);
  font-size: 1.7rem;
  cursor: pointer;
}

/* Sezioni generali */
section {
  padding: 80px 0;
}
.max-width {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.title {
  text-align: center;
  font-size: 2.2rem;
  color: var(--brown);
  margin-bottom: 40px;
  position: relative;
  font-weight: 400;
}
.title::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 200px;
  height: 3px;
  background: var(--brown);
  transform: translateX(-50%);
}
.title::after {
  content: "";
  position: absolute;
  bottom: -7px;
  left: 50%;
  width: 40px;
  height: 3px;
  background: var(--accent);
  transform: translateX(-50%);
}

/* Hero/Home section */
.home {
  position: relative;
  height: 750px;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--light);
  overflow: hidden;
}
.home .hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.home .overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 1;
}
.home .home-content {
  position: relative;
  margin: 0 auto;
  z-index: 2;
  max-width: 800px;
  text-align: center;
}
.home .home-content h1 {
  font-size: 3rem;
  margin-bottom: 15px;
  font-weight: 400;
  color: var(--light);
}
.home .home-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  font-weight: 300;
  color: var(--light);
}
.cta-button {
  display: inline-block;
  padding: 12px 30px;
  background: linear-gradient(45deg, var(--brown), var(--accent));
  color: var(--light);
  border-radius: 30px;
  font-weight: 500;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cta-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

/* Storia/About section */
.about {
  background: var(--beige);
}
.about-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
}
.about .column.left {
  flex: 1 1 40%;
  display: flex;
  justify-content: center;
}
.about .column.left img {
  max-width: 100%;
  height: auto;
  border-radius: 15px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}
.about .column.right {
  flex: 1 1 55%;
  font-size: 1rem;
  line-height: 1.6;
}
.about .column.right p {
  margin-bottom: 15px;
}

/* Servizi section */
.services {
  background: var(--light);
}
.services .serv-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}
.services .card {
  background: var(--beige);
  padding: 40px 30px;
  border-radius: 15px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.services .card .box {
  text-align: center;
}
.services .card i {
  font-size: 2.5rem;
  color: var(--brown);
  margin-bottom: 15px;
}
.services .card h3 {
  margin-bottom: 10px;
  font-size: 1.4rem;
  color: var(--brown);
  font-family: 'Antic Didone', serif;
}
.services .card p {
  font-size: 0.95rem;
  color: var(--dark);
  line-height: 1.5;
}
.services .card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}

/* Case study section */
.case {
  background: var(--beige);
}
.case-content {
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  margin-top: 60px;
}
.case-card {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 40px;
  background: var(--light);
  padding: 40px 30px;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
  margin-top: -80px;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.case-content .case-card:first-child {
  margin-top: 0;
}
.case-content .case-card:nth-child(1) {
  z-index: 4;
}
.case-content .case-card:nth-child(2) {
  z-index: 3;
}
.case-content .case-card:nth-child(3) {
  z-index: 2;
}
.case-content .case-card:nth-child(4) {
  z-index: 1;
}
.case-card.visible {
  opacity: 1;
  transform: translateY(0);
}
.case-card .case-text {
  flex: 1 1 50%;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--dark);
}
.case-card .case-text h3 {
  margin-bottom: 10px;
  font-size: 1.5rem;
  color: var(--brown);
}
.case-card .case-images {
  flex: 1 1 20%;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 420px;
}
.case-card .case-images img {
  width: 185px;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
  position: absolute;
  transition: transform 0.3s ease;
}
.case-card .case-images img:nth-child(1) {
  top: 0;
  left: 0;
  transform: rotate(-4deg) translate(-10px, -10px);
  z-index: 2;
}
.case-card .case-images img:nth-child(2) {
  top: 40px;
  left: 30px;
  transform: rotate(2deg) translate(10px, 10px);
  z-index: 1;
}

/* Contatti section */
.contact {
  background: var(--light);
}
.contact-intro {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 30px;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--dark);
}
.contact-info {
  text-align: center;
  margin-bottom: 30px;
  font-size: 1rem;
  line-height: 1.6;
}
.contact-info p {
  margin: 8px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.contact-info i {
  color: var(--brown);
  font-size: 1.2rem;
}
.contact-info a {
  color: var(--brown);
}
.contact-info a:hover {
  color: var(--accent);
}
.contact-info .whatsapp a {
  font-size: 2rem;
  color: var(--brown);
  transition: color 0.3s ease;
}
.contact-info .whatsapp a:hover {
  color: var(--accent);
}
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
  max-width: 600px;
  margin: 0 auto;
}
.contact-form input,
.contact-form textarea {
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.3s ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--brown);
}
.contact-form textarea {
  min-height: 120px;
  resize: vertical;
}
.contact-form button {
  align-self: center;
}

/* Footer */
footer {
  background: var(--brown);
  color: var(--light);
  text-align: center;
  padding: 20px 0;
  font-size: 0.9rem;
}

/* Responsive breakpoints */
@media (max-width: 992px) {
  .max-width {
    width: 90%;
    padding: 0 40px;
  }
  .navbar .menu li a {
    font-size: 0.9rem;
    margin-left: 15px;
  }
  .home .home-content h1 {
    font-size: 2.4rem;
  }
  .home .home-content p {
    font-size: 1.1rem;
  }
}

@media (max-width: 768px) {
  .navbar {
    padding: 15px 0;
  }
  .navbar .menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    right: 0;
    width: 100%;
    background: var(--brown);
    padding: 20px 0;
    gap: 20px;
    text-align: center;
  }
  .navbar .menu.active {
    display: flex;
  }
  .navbar .menu li a {
    color: var(--light);
    font-size: 1rem;
    margin: 0;
  }
  .menu-btn {
    display: block;
  }
  .home .home-content h1 {
    font-size: 2rem;
  }
  .about .about-content {
    flex-direction: column;
  }
  .services .serv-content {
    grid-template-columns: 1fr;
  }
  .case-card {
    flex-direction: column;
  }
}

/* Additional tweaks for very small screens */
@media (max-width: 576px) {
  /* Reduce the overall height of the hero section to avoid large empty areas on
     small devices. Allow the section to grow naturally based on its content. */
  .home {
    height: auto;
    min-height: 480px;
    padding: 100px 0;
  }
  /* Scale down the hero headline and body text for better readability on small
     devices. */
  .home .home-content h1 {
    font-size: 1.8rem;
  }
  .home .home-content p {
    font-size: 1rem;
  }
  /* Reduce padding on call‑to‑action buttons and adjust font size so they
     remain appropriately sized for mobile thumbs. */
  .cta-button {
    padding: 10px 25px;
    font-size: 0.9rem;
  }
  /* Adjust case study cards: remove the negative stacking effect, increase
     spacing between cards and make images stack horizontally with equal
     widths. This prevents images from overflowing the container. */
  .case-card {
    margin-top: 30px;
    padding: 30px 20px;
  }
  .case-card .case-images {
    flex: 1 1 100%;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    position: static;
  }
  .case-card .case-images img {
    position: static;
    width: 45%;
    height: auto;
    transform: none;
    box-shadow: none;
  }
  /* Fine tune the contact form elements for small screens by slightly
     decreasing font size and input padding to prevent horizontal scrolling. */
  .contact-form input,
  .contact-form textarea {
    font-size: 0.9rem;
    padding: 12px;
  }
}