:root {
  --primary: #0f4c81;
  /* Classic Blue for water/waterproofing */
  --secondary: #e63946;
  /* Premium Red */
  --dark: #1a1a1a;
  --light: #f4f7f6;
  --text-dark: #333;
  --text-light: #fff;
  --font-main: 'Zilla Slab', 'Clarendon', Georgia, serif;
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-main);
  background-color: var(--light);
  color: var(--text-dark);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3 {
  font-weight: 700;
  color: var(--dark);
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* Utilities */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
  cursor: pointer;
}

.btn-primary {
  background-color: var(--secondary);
  color: var(--text-light);
  border: 2px solid var(--secondary);
}

.btn-primary:hover {
  background-color: #b91d2c; /* Slightly darker than secondary red */
  border-color: #b91d2c;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3);
}

/* Header */
header {
  background-color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.navbar {
  display: flex;
  justify-content: space-between;
  text-align: center;
  padding: 20px 0;
}

.logo {
  display: flex;
  align-items: center;
}

.header-logo {
  max-height: 50px;
  width: auto;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-links li {
  position: relative;
}

.nav-links a {
  font-weight: 500;
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 5px;
}

.nav-links a:hover {
  color: var(--primary);
}

/* Dropdown Styles */
.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #fff;
  min-width: 220px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(15px);
  transition: all 0.3s ease;
  z-index: 1000;
  list-style: none;
}

.dropdown:hover .dropdown-content {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-content li {
  width: 100%;
}

.dropdown-content a {
  padding: 10px 20px !important;
  font-size: 0.95rem;
  display: block !important;
  font-weight: 400;
  color: var(--text-dark) !important;
  text-align: left;
}

.dropdown-content a:hover {
  background-color: var(--light);
  color: var(--primary) !important;
}

.dropbtn i {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.dropdown:hover .dropbtn i {
  transform: rotate(180deg);
}

/* Hero Section */
.hero {
  position: relative;
  background: linear-gradient(rgba(60, 78, 96, 0.72), rgba(24, 32, 45, 0.82)), url('../img/hero-bg.jpg') center/cover no-repeat;
  height: 80vh;
  display: flex;
  align-items: center;
  text-align: center;
  color: var(--text-light);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 2.7rem;
  color: var(--text-light);
  margin-bottom: 20px;
  animation: fadeInUp 1s ease;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 30px;
  animation: fadeInUp 1s ease 0.2s;
  opacity: 0;
  animation-fill-mode: forwards;
}

.hero .btn {
  animation: fadeInUp 1s ease 0.4s;
  opacity: 0;
  animation-fill-mode: forwards;
}

/* Services */
.services {
  padding: 80px 0;
}

.section-title {
  text-align: center;
  margin-bottom: 50px;
  font-size: 2.5rem;
}

.section-title span {
  color: var(--secondary);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.service-card {
  background: #fff;
  padding: 40px 30px;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background-color: var(--primary);
  transform: scaleX(0);
  transition: var(--transition);
  transform-origin: left;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  font-size: 40px;
  color: var(--secondary);
  margin-bottom: 20px;
}

.service-card h3 {
  margin-bottom: 15px;
  font-size: 1.5rem;
}

/* Footer */
footer {
  background-color: var(--dark);
  color: #fff;
  padding: 60px 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: var(--text-light);
  font-size: 1.2rem;
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}

.footer-col h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 40px;
  height: 2px;
  background-color: var(--secondary);
}

.footer-col p,
.footer-col li {
  color: #bbb;
  margin-bottom: 10px;
}

.footer-col ul li a {
  transition: var(--transition);
}

.footer-col ul li a:hover {
  color: var(--secondary);
  padding-left: 5px;
}

.footer-bottom {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #888;
  font-size: 0.9rem;
}

.social-links {
  margin-top: 25px;
  display: flex;
  gap: 15px;
}

.social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-light);
  border-radius: 50%;
  font-size: 1.2rem;
  transition: var(--transition);
}

.social-links a:hover {
  background-color: var(--secondary);
  color: #fff;
  transform: translateY(-3px);
}

/* Page Header Heroes (Contact, About, Services) */
.page-header {
  padding: 120px 0 80px;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.page-header h1 {
  color: #fff;
  font-size: 3.5rem;
  margin-bottom: 20px;
  text-shadow: 0 2px 15px rgba(0, 0, 0, 0.4);
  font-weight: 800;
  animation: fadeInUp 1s ease;
}

.page-header p {
  font-size: 1.3rem;
  max-width: 750px;
  margin: 0 auto;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
  animation: fadeInUp 1s ease 0.2s;
  opacity: 0;
  animation-fill-mode: forwards;
}

.contact-hero {
  background: linear-gradient(rgba(60, 78, 96, 0.72), rgba(24, 32, 45, 0.82)), url('../img/contact-hero.jpg') center/cover no-repeat;
}

.about-hero {
  background: linear-gradient(rgba(60, 78, 96, 0.72), rgba(24, 32, 45, 0.82)), url('../img/about-story.jpg') center/cover no-repeat;
}

.waterproofing-hero {
  background: linear-gradient(rgba(60, 78, 96, 0.72), rgba(24, 32, 45, 0.82)), url('../img/waterproofing-hero.jpg') center/cover no-repeat;
}

.coibentazioni-hero {
  background: linear-gradient(rgba(60, 78, 96, 0.72), rgba(24, 32, 45, 0.82)), url('../img/coibentazioni-hero.png') center/cover no-repeat;
}

/* Contact Section */
.contact-section {
  padding: 80px 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 50px;
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.info-card {
  background: #fff;
  padding: 30px 20px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: var(--transition);
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.info-card i {
  display: block;
  text-align: center;
  font-size: 30px;
  color: var(--secondary);
  margin-bottom: 15px;
}

.info-card h3 {
  text-align: center;
  font-size: 1.1rem;
  margin-bottom: 20px;
}

.info-card p {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 15px;
}

.info-card-full {
  grid-column: span 2;
}

@media (max-width: 576px) {
  .info-card-full {
    grid-column: span 1;
  }
}

/* Contact Form */
.contact-form-container {
  background: #fff;
  padding: 40px;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.form-instruction {
  margin-bottom: 25px;
  color: #666;
  font-size: 0.95rem;
  line-height: 1.5;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 576px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--dark);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  transition: var(--transition);
}

.privacy-group {
  margin-top: 25px;
  margin-bottom: 25px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.9rem;
  color: #666;
  cursor: pointer;
  font-weight: 400 !important;
}

.checkbox-label input {
  width: auto !important;
  margin-top: 4px;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.15);
}

/* Map Section */
.map-section {
  padding-bottom: 80px;
}

.maps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
}

.single-map-container {
  max-width: 800px;
  margin: 0 auto;
}

.map-item h3 {
  margin-bottom: 10px;
  color: var(--secondary);
}

.map-address {
  font-weight: 600;
  margin-bottom: 5px;
}

.map-note {
  font-size: 0.85rem;
  color: #888;
  margin-bottom: 15px;
  font-style: italic;
}

.map-container {
  width: 100%;
  height: 350px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

@media (max-width: 992px) {
  .maps-grid {
    grid-template-columns: 1fr;
  }
}

/* About Hero is now handled by .page-header and its specific class above */

.section-padding {
  padding: 80px 0;
}

.story-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.section-title-left {
  font-size: 2.5rem;
  margin-bottom: 25px;
  position: relative;
}

.section-title-left span {
  color: var(--secondary);
}

.story-content p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: #555;
}

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 40px;
}

.stat-item {
  text-align: left;
}

.stat-number {
  display: block;
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

.stat-label {
  font-size: 1rem;
  color: #777;
  font-weight: 500;
}

.img-responsive {
  max-width: 100%;
  height: auto;
}

.rounded-shadow {
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.value-card {
  background: #fff;
  padding: 40px 30px;
  border-radius: 8px;
  text-align: center;
  transition: var(--transition);
  border: 1px solid #eee;
}

.value-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
  border-color: var(--primary);
}

.value-card i {
  font-size: 40px;
  color: var(--secondary);
  margin-bottom: 20px;
}

.value-card h3 {
  margin-bottom: 15px;
}

.text-center {
  text-align: center;
}

.evolution-content,
.philosophy-card {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.evolution-content p,
.philosophy-card p {
  font-size: 1.15rem;
  line-height: 1.8;
  color: #555;
  margin-bottom: 20px;
}

.cta-section {
  background: linear-gradient(135deg, #343a40, #1a1a1a) !important;
  color: #fff !important;
}

.cta-section h2 {
  color: #fff !important;
  margin-bottom: 25px;
  font-size: 2.2rem;
}

.cta-section p {
  color: #ccc !important;
  margin-bottom: 35px;
  font-size: 1.2rem;
}

.bg-primary {
  background-color: var(--primary);
  color: #fff;
}

.btn-secondary {
  background-color: var(--secondary);
  color: #fff;
  border: 2px solid var(--secondary);
}

.btn-secondary:hover {
  background-color: #b91d2c; /* Slightly darker than secondary red */
  border-color: #b91d2c;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3);
}

/* Responsive About Us */
@media (max-width: 992px) {
  .story-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .values-grid {
    grid-template-columns: 1fr;
  }
  
  .section-title-left {
    font-size: 2rem;
  }
  
  .stat-number {
    font-size: 2.5rem;
  }
}

/* Responsive Contact */
@media (max-width: 992px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 576px) {
  .contact-info {
    grid-template-columns: 1fr;
  }
  
  .contact-form-container {
    padding: 25px;
  }
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Loader */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 5px solid var(--light);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  100% {
    transform: rotate(360deg);
  }
}

/* Responsive Design */
@media (max-width: 992px) {
  .hero h1 {
    font-size: 2.3rem;
  }
}

@media (max-width: 768px) {
  .hero {
    height: auto;
    min-height: 80vh;
    padding: 120px 0 80px;
  }

  .hero h1 {
    font-size: 1.8rem;
    line-height: 1.3;
  }

  .hero p {
    font-size: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .navbar {
    flex-direction: column;
    gap: 15px;
    padding: 15px 0;
  }

  .nav-links {
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.5rem;
  }

  .container {
    width: 92%;
  }

  .hero {
    padding: 100px 0 60px;
  }
}

/* Expert Section Styles */
.expert-lead {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary);
  margin-bottom: 30px;
  line-height: 1.5;
}

.expert-list {
  margin-bottom: 40px;
}

.expert-list li {
  display: flex;
  gap: 20px;
  margin-bottom: 25px;
  align-items: flex-start;
}

.expert-list i {
  font-size: 1.3rem;
  color: var(--secondary);
  background: rgba(230, 57, 70, 0.1);
  padding: 15px;
  border-radius: 50%;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.expert-list span {
  font-size: 1.05rem;
  color: #444;
  line-height: 1.6;
}

.expert-quote {
  background: var(--light);
  padding: 30px 40px;
  border-left: 6px solid var(--secondary);
  border-radius: 0 8px 8px 0;
  position: relative;
  margin-top: 40px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.expert-quote i {
  position: absolute;
  top: -15px;
  left: 20px;
  font-size: 24px;
  color: var(--secondary);
  background: #fff;
  padding: 5px 10px;
  border-radius: 4px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.expert-quote p {
  font-style: italic;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--dark);
  margin: 0;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .expert-quote p {
    font-size: 1.1rem;
  }
  
  .expert-list i {
    padding: 10px;
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
}

/* Accordion Styles */
.accordion {
  margin-top: 40px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}
.accordion h3 {
  margin-bottom: 20px;
  font-size: 1.8rem;
  color: var(--primary);
  text-align: center;
}
.accordion-item {
  background: #fff;
  border-radius: 8px;
  margin-bottom: 15px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  overflow: hidden;
  border-left: 4px solid var(--secondary);
}
.accordion-item details {
  width: 100%;
}
.accordion-item summary {
  padding: 20px;
  font-weight: 600;
  font-size: 1.15rem;
  cursor: pointer;
  list-style: none; /* Hide default arrow */
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--dark);
  transition: background-color 0.3s;
}
.accordion-item summary::-webkit-details-marker {
  display: none;
}
.accordion-item summary:hover {
  background-color: var(--light);
}
.accordion-item summary::after {
  content: '\f107'; /* FontAwesome angle-down */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  transition: transform 0.3s;
  color: var(--secondary);
}
.accordion-item details[open] summary::after {
  transform: rotate(180deg);
}
.accordion-item details[open] summary {
  border-bottom: 1px solid #eee;
  background-color: var(--light);
}
.accordion-content {
  padding: 20px;
  color: #555;
  line-height: 1.7;
  font-size: 1.05rem;
}