/*
 * Global Styles for GBH Website
 *
 * This stylesheet defines the look and feel of the GBH Electricidad e Instrumentación
 * website. It is structured with CSS variables for easy customization of colours,
 * and uses modern flexbox and grid layouts to create a responsive design that
 * adapts gracefully to different screen sizes. Animations and hover effects
 * provide subtle feedback to users without overwhelming the content.
 */

/* Colour palette based on the company logo */
:root {
  --primary-color: #005c8b;
  --secondary-color: #007bb5;
  --text-color: #333333;
  --light-bg: #f5f7fa;
  --section-padding: 60px;
}

body {
  font-family: 'Open Sans', sans-serif;
  margin: 0;
  color: var(--text-color);
  line-height: 1.6;
  background: #fff;
}

h1, h2, h3, h4 {
  font-family: 'Montserrat', sans-serif;
  margin-top: 0;
  color: var(--primary-color);
}

/* Navigation bar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  padding: 10px 40px;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


/* Remove logo styling from navbar as logos are now placed in hero */
.navbar .logo img {
  display: none;
}

.navbar ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

.navbar ul li {
  margin-left: 25px;
}

.navbar ul li a {
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 600;
  transition: color 0.3s;
}

.navbar ul li a:hover {
  color: var(--secondary-color);
}

/* Hamburger icon for mobile */
.burger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.burger span {
  height: 3px;
  width: 25px;
  background: var(--primary-color);
  margin-bottom: 4px;
  border-radius: 2px;
  transition: 0.3s;
}

/* Toggle animation for burger */
.burger.toggle span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger.toggle span:nth-child(2) {
  opacity: 0;
}

.burger.toggle span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Hero section */
.hero {
  position: relative;
  height: 90vh;
  background-image: url('images/instrumentacion.jpg');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Ligero oscurecimiento para integrar el logo con el fondo sin opacar la imagen */
  background: rgba(0, 43, 78, 0.2);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: #ffffff;
  text-align: center;
  padding: 0 20px;
}

.hero-content h1 {
  display: none;
}

/* Subtitle below the main logo in the hero */
/* Subtitle below the main logo in the hero
 * Hidden by default; can be enabled if needed.
 */
.hero-subtitle {
  display: none;
}

/* Logo placement in the hero */
.hero-main-logo {
  max-width: 650px;
  width: 90%;
  height: auto;
}

.hero-secondary-logo {
  position: absolute;
  top: 20px;
  left: 20px;
}

.hero-secondary-logo img {
  width: 80px;
  height: auto;
}

/* Primary button style */
.btn-primary {
  background: var(--secondary-color);
  color: #ffffff;
  padding: 12px 30px;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 600;
  transition: background 0.3s;
  display: inline-block;
}

.btn-primary:hover {
  background: var(--primary-color);
}

/* Global section styling */
.section {
  padding: var(--section-padding) 20px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Row layout */
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.col {
  flex: 1;
  padding: 20px;
}

.col.image img {
  width: 100%;
  border-radius: 10px;
}

/* Services section */
.services {
  background: var(--light-bg);
}

.services h2 {
  text-align: center;
  margin-bottom: 40px;
}

/* Intro paragraph for services */
.services-intro {
  text-align: center;
  max-width: 800px;
  margin: -10px auto 40px auto;
  color: var(--text-color);
  font-size: 18px;
}

/* Small description for a service card */
.service-item .service-desc {
  font-size: 14px;
  color: var(--text-color);
  margin-top: 10px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
}

.service-item {
  background: #ffffff;
  border-radius: 10px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.service-item i {
  font-size: 32px;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.service-item h4 {
  margin: 0;
  font-size: 18px;
}

.service-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Equipment section */
.equipment .equipment-note {
  margin-top: 20px;
  font-style: italic;
}

/* Quality and Safety sections share similar styling */
.quality,
.safety {
  background: var(--light-bg);
}

.quality ul,
.safety ul,
.equipment ul,
.personnel ul {
  list-style: none;
  padding: 0;
}

/* Use Font Awesome check icons for lists */
/* Custom check mark bullets for lists. Using a unicode check avoids reliance on external icon fonts. */
.quality ul li::before,
.safety ul li::before,
.equipment ul li::before,
.personnel ul li::before {
  content: '\2714\0020'; /* unicode check mark followed by a small space */
  color: var(--secondary-color);
  font-weight: bold;
  margin-right: 6px;
}

/* Contact section */
.contact .row {
  align-items: flex-start;
}

.contact form {
  background: #ffffff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.contact .form-group {
  margin-bottom: 15px;
}

.contact input,
.contact textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #dddddd;
  border-radius: 5px;
  font-family: 'Open Sans', sans-serif;
}

.contact textarea {
  resize: vertical;
  height: 120px;
}

.contact .info p {
  margin: 10px 0;
}

.contact .map-container {
  margin-top: 20px;
}

/* Footer */
footer {
  background: var(--primary-color);
  color: #ffffff;
  text-align: center;
  padding: 20px 10px;
}

footer p {
  margin: 0;
}

/* WhatsApp icon styling for contact section */
/* WhatsApp icon styling for contact section */
.whatsapp-icon-link {
  display: inline-block;
  margin-left: 8px;
  color: #25D366;
  font-size: 22px;
  vertical-align: middle;
  transition: color 0.3s;
}

.whatsapp-icon-link:hover {
  color: #128C7E;
}

/* Image-based WhatsApp logo styling */
.whatsapp-logo {
  width: 24px;
  height: 24px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Integrated hero logo: displays the main logo centred without a background card */
/* Integrated hero logo: displays the main logo centrado sin fondo */
.integrated-logo {
  /* Increase the main logo size significantly for the hero */
  max-width: 800px;
  width: 95%;
  height: auto;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

/* Button under the hero logo */
.hero-btn {
  margin-top: 20px;
  display: inline-block;
}

/* Position the call-to-action button at the bottom of the hero */
.hero-cta {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

/* About section logo styling */
/* Previous about logo container is no longer used. Instead, the secondary logo
   appears as its own column within the La Empresa section. */

/* Column for the secondary logo in the La Empresa section */
/* The column previously used to centre the secondary logo is no longer used. */

/* Styling for the enlarged secondary logo image in the La Empresa section */
.about-logo-big {
  max-width: 400px;
  width: 80%;
  height: auto;
  /* Raise the secondary logo upwards so it sits closer to the hero */
  margin: -40px auto 20px auto;
}

/* Layout adjustments for the La Empresa section */
.about .text {
  /* Allocate more horizontal space to the text to shorten its length */
  flex: 2;
}

.about .image-group {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  /* Occupies less horizontal space compared to the text */
  flex: 1;
}

/* Instrumentation image inside the La Empresa section */
.about-instrument-image {
  width: 80%;
  max-width: 400px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Hero logo card integration */
.hero-logo-card {
  display: inline-block;
  background: rgba(255, 255, 255, 0.85);
  padding: 30px 40px;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  text-align: center;
}

.hero-logo-card img.hero-main-logo {
  max-width: 280px;
  width: 70%;
  height: auto;
  margin: 0 auto;
}

.hero-logo-card .hero-tagline {
  margin-top: 15px;
  font-size: 24px;
  font-weight: 600;
  color: var(--primary-color);
}

.hero-logo-card .btn-primary {
  margin-top: 20px;
}

/* Position the secondary logo in the top-right corner of the hero */
.hero-secondary-logo.top-right {
  position: absolute;
  top: 20px;
  right: 20px;
  left: auto;
}

.hero-secondary-logo.top-right img {
  width: 70px;
  height: auto;
}

/* Differentiators section */
.differentiators h2 {
  text-align: center;
  margin-bottom: 40px;
}

.diff-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 30px;
}

.diff-item {
  background: #ffffff;
  border-radius: 10px;
  padding: 30px 20px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.diff-item i {
  font-size: 36px;
  color: var(--secondary-color);
  margin-bottom: 15px;
}

.diff-item h4 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.diff-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Policies section */
.policies h2 {
  text-align: center;
  margin-bottom: 40px;
}

.policy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.policy-card {
  background: #ffffff;
  border-radius: 10px;
  padding: 30px 25px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.policy-card i {
  font-size: 36px;
  color: var(--secondary-color);
  margin-bottom: 15px;
  display: block;
}

.policy-card h3 {
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.policy-card ul {
  list-style: none;
  padding-left: 0;
}

.policy-card ul li::before {
  content: '\2714\0020';
  color: var(--secondary-color);
  font-weight: bold;
  margin-right: 4px;
}

.policy-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Equipment gallery */
.equipment-gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  margin-top: 30px;
}

.equipment-gallery img {
  max-width: 300px;
  width: 100%;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  transition: transform 0.3s;
}

.equipment-gallery img:hover {
  transform: scale(1.05);
}

/* Founder quote styling */
.founder-quote {
  margin-top: 40px;
  padding: 20px 30px;
  background: var(--light-bg);
  border-left: 4px solid var(--secondary-color);
  font-style: italic;
  color: var(--text-color);
  border-radius: 5px;
}
.founder-quote p {
  margin: 0;
}
.founder-quote footer {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-color);
}

/* Author line in founder quote */
.quote-author {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary-color);
  font-style: normal;
}

/* Equipment side image */
.equipment-side-image {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Quality and commitment section */
.quality-commitment {
  background: var(--light-bg);
  text-align: center;
}
.quality-commitment h2 {
  margin-bottom: 20px;
}
.quality-commitment .quality-content {
  max-width: 900px;
  margin: 0 auto;
  font-size: 18px;
  line-height: 1.6;
  color: var(--text-color);
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .navbar ul {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column;
    align-items: center;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
  }

  .navbar ul.active {
    max-height: 500px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

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

  .burger {
    display: flex;
  }

  .row {
    flex-direction: column;
  }

  .hero-content h1 {
    font-size: 44px;
  }

  .hero-content p {
    font-size: 18px;
  }
}