/* 
 * STILE GENERALE
 * Foglio di stile per il sito di Medicina del Lavoro
 * Palette: bianco (#ffffff), blu (#2c5282), grigio chiaro (#f7fafc), grigio scuro (#4a5568)
 */

/* Reset CSS e stili di base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Arial", sans-serif;
  line-height: 1.6;
  color: #4a5568;
  background-color: #ffffff;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

/* Tipografia */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-bottom: 0.5em;
  font-weight: 700;
  line-height: 1.2;
  color: #2c5282;
}

p {
  margin-bottom: 1rem;
}

a {
  color: #2c5282;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #1a365d;
}

.section {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: #2c5282;
}

.bg-light {
  background-color: #f7fafc;
}

/* Bottoni */
.btn {
  display: inline-block;
  padding: 12px 30px;
  background-color: #2c5282;
  color: #ffffff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  font-weight: 600;
  text-align: center;
}

.btn:hover {
  background-color: #1a365d;
  color: #ffffff;
}

.btn-full {
  width: 100%;
}

/* Header e Navigazione */
.header {
  background-color: #ffffff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
}

.logo h1 {
  font-size: 1.8rem;
  margin: 0;
}

.nav ul {
  display: flex;
  list-style: none;
}

.nav ul li {
  margin-left: 30px;
}

.nav ul li a {
  font-weight: 600;
  position: relative;
}

.nav ul li a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: #2c5282;
  transition: width 0.3s ease;
}

.nav ul li a:hover::after {
  width: 100%;
}

/* Menu hamburger per mobile */
.menu-toggle {
  display: none;
}

.menu-icon {
  display: none;
  cursor: pointer;
  width: 30px;
  height: 20px;
  position: relative;
}

.menu-icon span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: #2c5282;
  border-radius: 3px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: 0.25s ease-in-out;
}

.menu-icon span:nth-child(1) {
  top: 0px;
}

.menu-icon span:nth-child(2) {
  top: 8px;
}

.menu-icon span:nth-child(3) {
  top: 16px;
}

/* Sezione Hero */
.hero {
  background-color: #2c5282;
  color: #ffffff;
  padding: 100px 0;
  text-align: center;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h2 {
  font-size: 2.5rem;
  margin-bottom: 20px;
  color: #ffffff;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

/* Sezione Chi Siamo */
.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.about-image {
  flex: 1;
}

.image-placeholder {
  width: 100%;
  padding-top: 100%; /* Aspect ratio 1:1 */
  background-color: #e2e8f0;
  border-radius: 10px;
  position: relative;
}

.about-text {
  flex: 2;
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
}

.subtitle {
  color: #718096;
  font-style: italic;
  margin-bottom: 20px;
}

/* Sezione Servizi */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}

.service-card {
  background-color: #ffffff;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-align: center;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.service-icon {
  margin-bottom: 20px;
}

.icon {
  width: 70px;
  height: 70px;
  margin: 0 auto;
  border-radius: 50%;
  background-color: #ebf4ff;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Icone stilizzate con CSS */
.icon::before,
.icon::after {
  content: "";
  position: absolute;
}

.icon-medical::before {
  width: 30px;
  height: 30px;
  background-color: #2c5282;
  border-radius: 50%;
}

.icon-medical::after {
  width: 30px;
  height: 6px;
  background-color: #2c5282;
  top: 50%;
  transform: translateY(-50%);
}

.icon-surveillance::before {
  width: 30px;
  height: 20px;
  border: 3px solid #2c5282;
  border-radius: 3px;
}

.icon-surveillance::after {
  width: 10px;
  height: 10px;
  background-color: #2c5282;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.icon-consulting::before {
  width: 30px;
  height: 40px;
  border: 3px solid #2c5282;
  border-radius: 5px;
}

.icon-consulting::after {
  width: 20px;
  height: 3px;
  background-color: #2c5282;
  top: 40%;
  left: 50%;
  transform: translateX(-50%);
  box-shadow: 0 8px 0 #2c5282, 0 16px 0 #2c5282;
}

.icon-training::before {
  width: 35px;
  height: 25px;
  border: 3px solid #2c5282;
  border-radius: 3px;
}

.icon-training::after {
  width: 3px;
  height: 15px;
  background-color: #2c5282;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.service-card h3 {
  margin-bottom: 15px;
}

/* Sezione Contatti */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 50px;
}

.contact-info ul {
  list-style: none;
}

.contact-info ul li {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.contact-icon {
  width: 40px;
  height: 40px;
  background-color: #ebf4ff;
  border-radius: 50%;
  margin-right: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

/* Icone di contatto stilizzate con CSS */
.location-icon::before {
  content: "";
  position: absolute;
  width: 12px;
  height: 12px;
  background-color: #2c5282;
  border-radius: 50%;
}

.location-icon::after {
  content: "";
  position: absolute;
  width: 0;
  height: 0;
  border-left: 8px solid transparent;
  border-right: 8px solid transparent;
  border-top: 12px solid #2c5282;
  top: 60%;
}

.phone-icon::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  border: 3px solid #2c5282;
  border-radius: 3px;
  transform: rotate(45deg);
}

.email-icon::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 16px;
  border: 2px solid #2c5282;
  border-radius: 2px;
}

.email-icon::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 8px;
  border-bottom: 2px solid #2c5282;
  border-left: 2px solid #2c5282;
  border-right: 2px solid #2c5282;
  top: 8px;
  border-radius: 0 0 2px 2px;
}

.time-icon::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  border: 2px solid #2c5282;
  border-radius: 50%;
}

.time-icon::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 2px;
  background-color: #2c5282;
  top: 50%;
  left: 50%;
  transform: translate(-25%, -50%) rotate(45deg);
}

/* Modulo di contatto */
.form-group {
  margin-bottom: 20px;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

input,
textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #cbd5e0;
  border-radius: 4px;
  font-family: inherit;
  font-size: 1rem;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: #2c5282;
  box-shadow: 0 0 0 3px rgba(44, 82, 130, 0.2);
}

/* Checkbox personalizzato */
.checkbox-container {
  display: block;
  position: relative;
  padding-left: 35px;
  cursor: pointer;
  font-weight: normal;
}

.checkbox-container input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: absolute;
  top: 0;
  left: 0;
  height: 20px;
  width: 20px;
  background-color: #eee;
  border-radius: 3px;
}

.checkbox-container:hover input ~ .checkmark {
  background-color: #ccc;
}

.checkbox-container input:checked ~ .checkmark {
  background-color: #2c5282;
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
  display: block;
}

.checkbox-container .checkmark:after {
  left: 7px;
  top: 3px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Footer */
.footer {
  background-color: #2c5282;
  color: #ffffff;
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer h3,
.footer h4 {
  color: #ffffff;
  margin-bottom: 20px;
}

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

.footer-links ul li {
  margin-bottom: 10px;
}

.footer-links ul li a {
  color: #e2e8f0;
  transition: color 0.3s ease;
}

.footer-links ul li a:hover {
  color: #ffffff;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Media Queries per Responsive Design */
@media (max-width: 992px) {
  .about-content {
    flex-direction: column;
  }

  .about-image {
    margin-bottom: 30px;
  }

  .contact-container {
    grid-template-columns: 1fr;
  }

  .contact-info {
    margin-bottom: 30px;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 60px 0;
  }

  .hero {
    padding: 80px 0;
  }

  .hero h2 {
    font-size: 2rem;
  }

  /* Menu hamburger per mobile */
  .menu-icon {
    display: block;
  }

  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
  }

  .menu-toggle:checked ~ .nav {
    max-height: 300px;
  }

  .nav ul {
    flex-direction: column;
    padding: 20px;
  }

  .nav ul li {
    margin: 0 0 15px 0;
  }

  .nav ul li:last-child {
    margin-bottom: 0;
  }
}

@media (max-width: 576px) {
  .section-title {
    font-size: 1.8rem;
  }

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

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
}
