/* 
   Progetto Antincendio - Custom CSS
   Colors: Primary Blue (#0B569E), Dark Navy (#1D2460), Accent Red (#D92525), Gold (#F5C518)
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Plus+Jakarta+Sans:wght@500;600;700&display=swap');

:root {
  --brand-blue: #0B569E;
  --brand-blue-dark: #1D2460;
  --brand-blue-light: #eef5fc;
  --brand-red: #D92525;
  --brand-red-hover: #b51c1c;
  --brand-gold: #F5C518;
  --brand-gray-light: #F8F9FA;
  --brand-dark: #1A1D20;
  --brand-text-muted: #5A626A;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--brand-dark);
  overflow-x: hidden;
  line-height: 1.6;
}

h1, h2, h3, h4, h5, h6, .hero-title, .section-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  letter-spacing: -0.3px;
}

/* Top Header Bar */
.top-header {
  background-color: var(--brand-blue-dark);
  color: #ffffff;
  font-size: 0.875rem;
  padding: 8px 0;
  border-bottom: 2px solid var(--brand-red);
}

.top-header a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s ease;
}

.top-header a:hover {
  color: var(--brand-gold);
}

/* Navbar */
.navbar-brand img {
  max-height: 52px;
  width: auto;
}

.navbar {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  padding: 10px 0;
}

.navbar-nav {
  flex-wrap: nowrap; /* Single line menu desktop */
}

.nav-link {
  font-weight: 500;
  color: var(--brand-blue-dark) !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px !important;
  border-radius: 6px;
  transition: all 0.25s ease;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.2px;
  white-space: nowrap;
}

/* Custom PNG Icons in Menu - Larger Size */
.menu-icon-img {
  width: 28px; /* Slightly larger menu PNG icons */
  height: 28px;
  object-fit: contain;
  vertical-align: middle;
  transition: transform 0.25s ease, filter 0.25s ease;
  filter: brightness(0) saturate(100%) invert(14%) sepia(35%) saturate(3025%) hue-rotate(212deg) brightness(95%) contrast(96%);
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-red) !important;
  background-color: rgba(217, 37, 37, 0.06);
}

.nav-link:hover .menu-icon-img, .nav-link.active .menu-icon-img {
  transform: translateY(-2px) scale(1.15);
  /* Turn PNG icon into brand red on hover */
  filter: brightness(0) saturate(100%) invert(18%) sepia(87%) saturate(5412%) hue-rotate(352deg) brightness(92%) contrast(88%);
}

/* Mobile Responsive Navigation Centered */
@media (max-width: 1199.98px) {
  .navbar-collapse {
    text-align: center;
    padding: 1.25rem 0;
    border-top: 1px solid rgba(0,0,0,0.06);
    margin-top: 10px;
  }
  .navbar-nav {
    flex-direction: column;
    align-items: center !important;
    justify-content: center !important;
    width: 100%;
    gap: 6px;
  }
  .nav-item {
    width: 100%;
    text-align: center;
  }
  .nav-link {
    justify-content: center !important;
    width: 100%;
    padding: 12px 0 !important;
    font-size: 1rem;
  }
}

/* Hero Carousel */
.hero-carousel .carousel-item {
  height: 78vh;
  min-height: 480px;
  background-color: #111;
}

.hero-carousel .carousel-item img {
  height: 100%;
  width: 100%;
  object-fit: cover;
  opacity: 0.88;
  filter: brightness(0.95);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(11, 86, 158, 0.38) 0%, rgba(29, 36, 96, 0.48) 100%);
  display: flex;
  align-items: center;
}

.hero-caption {
  color: #ffffff;
  z-index: 2;
}

.hero-title {
  font-size: 3rem;
  font-weight: 600;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 4px 16px rgba(0, 0, 0, 0.5);
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  font-size: 1.3rem;
  font-weight: 400;
  max-width: 750px;
  margin-bottom: 2rem;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

/* Buttons */
.btn-brand-red {
  background-color: var(--brand-red);
  color: #ffffff;
  font-weight: 600;
  border-radius: 50px;
  padding: 12px 30px;
  border: 2px solid var(--brand-red);
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(217, 37, 37, 0.35);
}

.btn-brand-red:hover {
  background-color: var(--brand-red-hover);
  border-color: var(--brand-red-hover);
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(217, 37, 37, 0.5);
}

.btn-brand-outline-white {
  background-color: rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(4px);
  color: #ffffff;
  font-weight: 600;
  border-radius: 50px;
  padding: 12px 30px;
  border: 2px solid #ffffff;
  transition: all 0.3s ease;
}

.btn-brand-outline-white:hover {
  background-color: #ffffff;
  color: var(--brand-blue-dark);
  transform: translateY(-2px);
}

.btn-brand-blue {
  background-color: var(--brand-blue);
  color: #ffffff;
  font-weight: 600;
  border-radius: 50px;
  padding: 12px 30px;
  border: 2px solid var(--brand-blue);
  transition: all 0.3s ease;
}

.btn-brand-blue:hover {
  background-color: var(--brand-blue-dark);
  border-color: var(--brand-blue-dark);
  color: #ffffff;
  transform: translateY(-2px);
}

/* Alternating Section Styles */

/* 1. Fullscreen Section - Brand Blue */
.section-fullscreen-blue {
  min-height: 80vh;
  background: linear-gradient(135deg, var(--brand-blue) 0%, var(--brand-blue-dark) 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  padding: 5rem 0;
  position: relative;
}

.section-fullscreen-blue h2 {
  color: #ffffff;
  font-weight: 600;
  font-size: 2.4rem;
}

.badge-gold {
  background-color: var(--brand-gold);
  color: var(--brand-blue-dark);
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.88rem;
  display: inline-block;
  margin-bottom: 1rem;
}

/* 2. Boxed Section - Light / White */
.section-boxed {
  padding: 5rem 0;
  background-color: #ffffff;
}

.section-boxed-alt {
  padding: 5rem 0;
  background-color: var(--brand-gray-light);
}

.section-title-wrap {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-title {
  font-size: 2.3rem;
  font-weight: 600;
  color: var(--brand-blue-dark);
  position: relative;
  display: inline-block;
}

.section-title::after {
  content: '';
  display: block;
  width: 70px;
  height: 4px;
  background-color: var(--brand-red);
  margin: 12px auto 0 auto;
  border-radius: 2px;
}

.section-subtitle {
  color: var(--brand-text-muted);
  font-size: 1.05rem;
  margin-top: 10px;
}

/* Service Card Styles */
.service-card {
  border: none;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
  transition: all 0.35s ease;
  height: 100%;
  overflow: hidden;
  border-top: 4px solid var(--brand-blue);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 14px 35px rgba(11, 86, 158, 0.15);
  border-top-color: var(--brand-red);
}

.service-card .card-icon {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  background-color: var(--brand-blue-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

.service-card .card-icon img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  transition: transform 0.3s ease, filter 0.3s ease;
  filter: brightness(0) saturate(100%) invert(14%) sepia(35%) saturate(3025%) hue-rotate(212deg) brightness(95%) contrast(96%);
}

.service-card:hover .card-icon {
  background-color: var(--brand-red);
}

.service-card:hover .card-icon img {
  filter: brightness(0) invert(1);
  transform: scale(1.1);
}

.service-card .card-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--brand-blue-dark);
  margin-bottom: 1rem;
}

/* 3. Fullscreen Section - Dark Navy / Red Accent */
.section-fullscreen-dark {
  min-height: 70vh;
  background: linear-gradient(135deg, var(--brand-blue-dark) 0%, #0d1233 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  padding: 5rem 0;
  position: relative;
  border-top: 5px solid var(--brand-red);
}

/* Certifications Section */
.certification-box {
  background: #ffffff;
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.05);
}

.cert-img-wrapper {
  text-align: center;
  padding: 1.5rem;
  background: #ffffff;
  border-radius: 12px;
}

.cert-img-wrapper img {
  max-width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: contain;
}

/* Contact Info Box */
.contact-info-card {
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(10px);
  border-radius: 12px;
  padding: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 1.5rem;
}

.contact-info-item i {
  font-size: 1.4rem;
  color: var(--brand-gold);
  margin-top: 3px;
}

/* Footer & Social Links */
footer {
  background-color: #0b0e1e;
  color: #b0b5c0;
  padding-top: 4rem;
  padding-bottom: 2rem;
  font-size: 0.95rem;
  border-top: 3px solid var(--brand-blue);
}

footer h5 {
  color: #ffffff;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

footer a {
  color: #b0b5c0;
  text-decoration: none;
  transition: color 0.2s ease;
}

footer a:hover {
  color: var(--brand-gold);
}

/* Larger & Colored Footer Social Icons */
.footer-social-link {
  font-size: 1.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  transition: transform 0.3s ease, background 0.3s ease;
  text-decoration: none !important;
}

.footer-social-link:hover {
  transform: translateY(-4px) scale(1.15);
  background: rgba(255, 255, 255, 0.18);
}

.footer-social-facebook {
  color: #1877F2 !important; /* Facebook Blue */
}

.footer-social-instagram {
  color: #E4405F !important; /* Instagram Pink / Violet */
}

.footer-social-whatsapp {
  color: #25D366 !important; /* WhatsApp Green */
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  margin-top: 3rem;
  font-size: 0.875rem;
}

/* WhatsApp Floating Button */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  bottom: 25px;
  right: 25px;
  background-color: #25d366;
  color: #fff;
  border-radius: 50px;
  text-align: center;
  font-size: 32px;
  box-shadow: 2px 2px 15px rgba(0, 0, 0, 0.3);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  text-decoration: none;
}

.whatsapp-float:hover {
  background-color: #20ba5a;
  color: #fff;
  transform: scale(1.1);
  box-shadow: 2px 4px 20px rgba(37, 211, 102, 0.5);
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
  .hero-title {
    font-size: 2.1rem;
  }
  .hero-subtitle {
    font-size: 1.05rem;
  }
  .hero-carousel .carousel-item {
    height: 65vh;
  }
  .section-title {
    font-size: 1.8rem;
  }
}
