body, html {
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', sans-serif;
}

.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: white;
  color: black;
  display: flex;
  justify-content: space-between;
  padding: 1rem 1rem; /* Reduced right padding */
  z-index: 1000;
  align-items: center;
}

.main-nav {
  display: none; /* Hide by default on small screens */
}

.hamburger-button {
  display: block; /* Show by default on small screens */
  background: none;
  border: none;
  color: black; /* Adjust color as needed */
  cursor: pointer;
  padding: 0.5rem;
  margin-right: 0.5rem; /* Added right margin */
}

.hamburger-button svg {
  width: 28px;
  height: 28px;
  stroke-width: 2;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
  justify-content: center;
}

nav a {
  color: black;
  text-decoration: none;
  font-weight: bold;
}

.logo {
  height: 50px; /* Adjust as needed */
}

/* Media query for larger screens */
@media (min-width: 768px) { /* Adjust breakpoint as needed */
  .main-nav {
    display: flex; /* Show on larger screens */
    position: static; /* Reset position for larger screens */
    width: auto; /* Reset width */
    height: auto; /* Reset height */
    background: none; /* Reset background */
    margin: 0 auto; /* Center the navigation block */
  }

  .main-nav ul {
    flex-direction: row; /* Horizontal layout on larger screens */
  }

  .hamburger-button {
    display: none; /* Hide on larger screens */
  }
}

/* Styles for the active mobile menu */
.main-nav.active {
  display: flex; /* Show when active */
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.95); /* Semi-transparent white background */
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 999; /* Ensure it's above other content but below header */
}

.main-nav.active ul {
  flex-direction: column; /* Vertical layout for menu items */
  gap: 1.5rem; /* Adjust spacing as needed */
}

.main-nav.active a {
  color: black; /* Ensure text is black on white background */
  font-size: 1.5rem; /* Adjust font size as needed */
}

.hero-section {
  height: 100vh;
  position: relative;
}

#bg-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overlay {
  height: 100vh;
  background: rgba(0,0,0,0.4);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 2rem;
  z-index: 1;
  position: relative;
}

.main-title {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.subtitle {
  font-size: 1.8rem;
}

.content-section {
  padding: 4rem 2rem;
  text-align: center;
}

#historia {
  background-color: #e0f7fa; /* Very light blue */
  background-image: url('clouds.png'); /* Assuming a cloud image exists */
  background-repeat: repeat; /* Repeat horizontally and vertically */
  background-position: 0 0; /* Initial position */
  animation: moveClouds 75s linear infinite; /* Slower animation for mobile */
  background-size: cover; /* Ensure background covers the section */
}

/* Faster animation for desktop */
@media (min-width: 768px) {
  #historia {
    animation: moveClouds 20s linear infinite; /* Faster animation for desktop */
  }
}

@keyframes moveClouds {
  from {
    background-position: 0 0;
  }
  to {
    background-position: 200% 0; /* Increased animation distance */
  }
}

.cta-button {
  margin-top: 1rem;
  padding: 0.75rem 2rem;
  background-color: #00bfff;
  color: white;
  border: none;
  border-radius: 8px;
  text-decoration: none;
  font-weight: bold;
  display: inline-block;
}

.image-container {
  width: 80%; /* Adjust as needed */
  height: 300px; /* Placeholder height, adjust as needed */
  background-color: #f0f0f0; /* Placeholder background */
  margin: 2rem auto; /* Center the container and add space */
  border-radius: 8px;
  overflow: hidden; /* Hide overflowing image parts */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Basic shadow effect */
}

.history-content {
  display: flex;
  gap: 2rem; /* Space between columns */
  align-items: center; /* Vertically align items */
  flex-wrap: wrap; /* Allow wrapping on smaller screens */
}

.history-text {
  flex: 1; /* Allow text to grow and shrink */
  min-width: 300px; /* Minimum width for text */
}

.history-content .image-container {
  flex: 1; /* Allow image container to grow and shrink */
  min-width: 300px; /* Minimum width for image container */
  margin: 0; /* Remove auto margin when in flex container */
}

h1 {
  font-size: 3.5rem;
  margin-bottom: 2rem;
  color: #ffffff;
  text-shadow: 5px 1px 2px rgba(0, 0, 0, 0.1);
  font-weight: 800;
  letter-spacing: 0.02em;
}



.quienes-somos-description {
  max-width: 800px;
  margin: 0 auto 3rem;
  text-align: center;
  line-height: 1.5;
  color: #333;
  padding: 0 1rem;
}

.quienes-somos-description p {
  font-size: 1.4rem;
  font-weight: 500;
  color: #000000;
}


.quienes-somos-cards {
  display: flex;
  justify-content: center;
  gap: 2rem; /* Space between cards */
  flex-wrap: wrap; /* Allow cards to wrap on smaller screens */
  margin-top: 2rem;
}

.card {
  background-color: #fff;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: center;
  flex: 1; /* Allow cards to grow and shrink */
  min-width: 250px; /* Minimum width for cards */
  max-width: 300px; /* Maximum width for cards */
}

.card .icon {
  color: #007bff; /* Adjust color as needed */
  margin-bottom: 1rem;
}

.card .icon svg {
  width: 40px;
  height: 40px;
  stroke-width: 1.5;
}

.card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

/* Servicios section styles */
.servicios-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 3rem; /* Increased gap between cards */
  margin-top: 4rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 6rem; /* Increased bottom margin */
}

.servicio-card {
  background-color: white;
  border-radius: 12px; /* Increased border radius */
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* Lighter shadow */
  padding: 2.5rem; /* Increased padding */
  text-align: left;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  margin-bottom: 3rem; /* Increased bottom margin */
  position: relative; /* For proper spacing of elements */
  min-height: 300px; /* Minimum height to ensure consistent card sizes */
}

.servicio-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.servicio-icon {
  color: #0077cc;
  margin-bottom: 2rem; /* Increased bottom margin */
}

.servicio-icon svg {
  width: 36px;
  height: 36px;
  stroke-width: 1.5;
}

.servicio-card h3 {
  font-size: 1.5rem;
  margin-top: 0;
  margin-bottom: 1.5rem; /* Increased bottom margin */
  color: #333;
  font-weight: 600;
}

.servicio-card p {
  color: #666;
  line-height: 1.7;
  margin-bottom: 3rem; /* Significantly increased bottom margin */
  flex-grow: 1;
}

.servicio-link {
  color: #0077cc;
  text-decoration: none;
  font-weight: 500;
  display: inline-block;
  position: absolute; /* Position at bottom of card */
  bottom: 2.5rem; /* Distance from bottom */
}

.servicio-link:hover {
  text-decoration: underline; /* Simpler hover effect */
}

/* Apply the same styling to the Servicios heading as the Quiénes Somos heading */
h2 {
  font-size: 3.5rem;
  margin-bottom: 2rem;
  color: #005a9e;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Contacto section styles */
#contacto {
  background-color: #003366; /* Dark blue background */
  color: white; /* White text */
  padding: 6rem 2rem; /* Increased padding */
}

#contacto h2 {
  color: white; /* White heading */
  font-weight: 700; /* Bolder heading */
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2); /* Slightly stronger shadow for contrast */
}

#contacto p {
  font-size: 1.3rem; /* Larger text */
  font-weight: 500; /* Bolder text */
  margin-bottom: 2rem; /* More space before the button */
}

#contacto .cta-button {
  background-color: #0077cc; /* Brighter blue button */
  font-weight: 600; /* Bolder button text */
  padding: 1rem 2.5rem; /* Larger button */
  border-radius: 50px; /* Rounded button */
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#contacto .cta-button:hover {
  background-color: #0088ee; /* Lighter blue on hover */
  transform: scale(1.05); /* Slight grow effect */
}

/* Contact form styles */
.formulario-contacto {
  max-width: 700px;
  margin: 0 auto;
  padding: 2.5rem;
  background-color: #003366; /* Darker blue background matching the section */
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.form-group {
  margin-bottom: 1.2rem;
  position: relative;
}

.formulario-contacto input,
.formulario-contacto textarea {
  width: 100%;
  padding: 1rem 1.2rem;
  background-color: #2a5785; /* Lighter blue background for inputs */
  border: none;
  border-radius: 8px;
  color: white;
  font-size: 1rem;
  box-sizing: border-box;
}

.formulario-contacto input::placeholder,
.formulario-contacto textarea::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.formulario-contacto input:focus,
.formulario-contacto textarea:focus {
  outline: none;
  background-color: #336699;
}

.formulario-contacto textarea {
  resize: vertical;
  min-height: 150px;
}

.submit-button {
  width: 100%;
  padding: 1rem;
  background-color: #0099ff; /* Bright blue button */
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin-top: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.submit-button:hover {
  background-color: #00aaff;
}

/* Responsive adjustments for the form */
@media (max-width: 768px) {
  .formulario-contacto {
    padding: 1.5rem;
  }
  
  .formulario-contacto input,
  .formulario-contacto textarea {
    padding: 0.8rem 1rem;
  }
}

/* Footer styles */
.footer {
  background-color: #000000;
  color: white;
  padding: 2rem 0;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  padding: 0 2rem;
}

.footer-logo {
  flex: 1;
}

.footer-logo-img {
  height: 50px;
  filter: brightness(0) invert(1); /* Make logo white */
}

.footer-address {
  flex: 2;
  text-align: center;
  font-size: 1rem;
}

/* Responsive footer */
@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .footer-address {
    text-align: center;
  }
}
