/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Asegurar que todas las imágenes sean visibles */
img {
  display: block;
  max-width: 100%;
  height: auto;
}

body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  /* New general background with green and light blue gradient */
  background: linear-gradient(135deg, rgba(161, 231, 163, 0.3), rgba(161, 221, 231, 0.3));
  color: #333;
  line-height: 1.6;
}

/* Text justification */
.text-justified {
  text-align: justify;
}

/* Barra superior */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: #0a4da2;
}

.logo {
  height: 50px;
}

.social-icons a {
  color: white;
  margin-left: 10px;
  text-decoration: none;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  transition: transform 0.3s ease;
}

.social-icons a i {
  margin-right: 5px;
  font-size: 18px;
}

.social-icons a:hover {
  transform: scale(1.1);
}

/* Navegación */
nav {
  background: white;
  padding: 10px;
  position: relative;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.menu-toggle {
  display: none;
}

/* Update the menu icon to be centered and more visible */
.menu-icon {
  display: none;
  cursor: pointer;
  font-size: 28px;
  color: #0a4da2;
  padding: 10px;
  z-index: 100;
  text-align: center;
  width: 100%;
  background-color: #f5f5f5;
  border-bottom: 1px solid #ddd;
}

.nav {
  list-style: none;
  padding: 0;
  display: flex;
  justify-content: center;
}

.nav li {
  position: relative;
  margin: 0 15px;
}

.nav li a {
  text-decoration: none;
  color: #0a4da2;
  font-weight: bold;
  display: block;
  padding: 10px;
  transition: color 0.3s ease;
}

.nav li a i {
  margin-right: 5px;
}

.nav li a:hover,
.nav li a.active {
  color: red;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: white;
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  z-index: 1;
  border-radius: 4px;
}

.dropdown-content li {
  margin: 0;
}

.dropdown-content a {
  padding: 12px 16px;
  display: block;
  text-align: left;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Imagen de inicio con zoom y overlay */
.home-section {
  position: relative;
  text-align: center;
  overflow: hidden;
  height: 600px;
}

.home-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
  filter: brightness(0.7);
}

.home-section:hover .home-image {
  transform: scale(1.05);
  filter: brightness(0.8);
}

.home-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  text-align: center;
  width: 80%;
}

.home-overlay h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.home-overlay p {
  font-size: 1.5rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

/* Sección About */
.about {
  text-align: center;
  padding: 60px 20px;
  background-color: transparent;
}

.about h1 {
  color: red;
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.about h2 {
  color: #0a4da2;
  font-size: 2rem;
  margin-bottom: 20px;
}

.about p {
  max-width: 800px;
  margin: 0 auto 30px;
  font-size: 1.1rem;
}

.about-image {
  width: 80%;
  max-width: 800px;
  margin-top: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.5s ease;
}

.about-image:hover {
  transform: scale(1.02);
}

/* About Us Section */
.about-us {
  padding: 60px 20px;
  background-color: transparent;
  text-align: center;
}

.about-us h2 {
  color: #0a4da2;
  font-size: 2rem;
  margin-bottom: 40px;
}

.about-us-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 30px;
}

.about-us-text {
  flex: 1;
  min-width: 300px;
  text-align: center;
}

.about-us-text p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  line-height: 1.6;
}

.about-us-image-container {
  flex: 1;
  min-width: 300px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.about-us-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.about-us-image-container:hover .about-us-image {
  transform: scale(1.1);
}

/* Services Section */
.services {
  text-align: center;
  padding: 60px 20px;
  background-color: transparent;
}

.services h2 {
  color: red;
  font-size: 1.5rem;
  margin-bottom: 10px;
}

.services h3 {
  color: #0a4da2;
  font-size: 2rem;
  margin-bottom: 40px;
}

.service-container {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  margin-top: 20px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

.service-item {
  position: relative;
  width: 250px;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.service-item:hover {
  transform: scale(1.05);
}

.service-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
  filter: brightness(80%);
  transition: filter 0.3s ease, transform 0.5s ease;
}

.service-item:hover img {
  filter: brightness(100%);
  transform: scale(1.1);
}

.service-item h4 {
  background: white;
  padding: 15px;
  font-size: 18px;
  font-weight: bold;
  margin: 0;
  text-align: center;
  color: #0a4da2;
}

/* Pavers Section */
.pavers-section {
  padding: 60px 20px;
  background-color: transparent;
}

.pavers-section h2 {
  color: #0a4da2;
  font-size: 2rem;
  text-align: center;
  margin-bottom: 40px;
}

.pavers-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 30px;
}

.pavers-text {
  flex: 1;
  min-width: 300px;
}

.pavers-text p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  line-height: 1.6;
}

.pavers-benefits {
  list-style-type: none;
  padding-left: 0;
}

.pavers-benefits li {
  padding: 10px 0;
  border-bottom: 1px solid #eee;
  position: relative;
  padding-left: 30px;
}

.pavers-benefits li:before {
  content: "✓";
  color: #0a4da2;
  position: absolute;
  left: 0;
  font-weight: bold;
}

.pavers-image {
  flex: 1;
  min-width: 300px;
}

.pavers-image img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.5s ease;
}

.pavers-image img:hover {
  transform: scale(1.03);
}

/* More Services Section */
.more-services {
  padding: 60px 20px;
  background-color: transparent;
  text-align: center;
}

.more-services h2 {
  color: #0a4da2;
  font-size: 2rem;
  margin-bottom: 40px;
}

.more-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.more-service-item {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.more-service-item:hover {
  transform: translateY(-10px);
}

.more-service-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.more-service-item:hover img {
  transform: scale(1.1);
}

.more-service-item h4 {
  color: #0a4da2;
  padding: 15px 15px 5px;
  font-size: 1.2rem;
}

.more-service-item p {
  padding: 0 15px 20px;
  color: #666;
}

/* Gallery Page Styles */
.gallery-banner {
  background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url("images/main-image.jpg");
  background-size: cover;
  background-position: center;
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: white;
}

.gallery-banner-content h1 {
  font-size: 3rem;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.gallery-banner-content p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.gallery-page {
  padding-top: 30px;
}

.gallery-page .gallery-grid {
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}

.gallery-page .gallery-item {
  height: 280px;
}

.gallery-cta {
  background: linear-gradient(rgba(10, 77, 162, 0.9), rgba(10, 77, 162, 0.9)), url("images/background.jpg");
  background-size: cover;
  background-position: center;
  padding: 60px 20px;
  text-align: center;
  color: white;
  margin-top: 60px;
}

.cta-content h2 {
  font-size: 2.5rem;
  margin-bottom: 15px;
}

.cta-content p {
  font-size: 1.2rem;
  max-width: 800px;
  margin: 0 auto 30px;
}

.cta-buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.cta-button {
  background: white;
  color: #0a4da2;
  padding: 12px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  transition: transform 0.3s ease, background 0.3s ease;
}

.cta-button i {
  margin-right: 8px;
}

.cta-button:hover {
  background: #f0f0f0;
  transform: scale(1.05);
}

/* Gallery Section */
.gallery-section {
  padding: 60px 20px;
  background-color: transparent;
  text-align: center;
}

.gallery-section h2 {
  color: #0a4da2;
  font-size: 2rem;
  margin-bottom: 40px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  height: 250px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  background-color: #f0f0f0; /* Add background color for loading state */
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  display: block; /* Ensure image displays as block */
  opacity: 1 !important; /* Forzar visibilidad */
  visibility: visible !important; /* Forzar visibilidad */
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 77, 162, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-text {
  color: white;
  font-size: 1.2rem;
  font-weight: bold;
  text-transform: uppercase;
}

/* Modal for Gallery Images */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  padding-top: 50px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.zoomed {
  transform: scale(1.5);
  cursor: zoom-out;
}

#modal-caption {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  text-align: center;
  color: white;
  padding: 10px 0;
  height: 50px;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
  cursor: pointer;
  z-index: 1010;
}

.close-modal:hover,
.close-modal:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

.modal-nav {
  position: absolute;
  bottom: 20px;
  left: 0;
  right: 0;
  text-align: center;
  z-index: 1010;
}

.modal-nav button {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  padding: 10px 20px;
  margin: 0 10px;
  font-size: 24px;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s ease;
}

.modal-nav button:hover {
  background: rgba(255, 255, 255, 0.4);
}

/* Contact Section */
.contact-section {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  padding: 60px 20px;
  background-color: transparent;
  gap: 30px;
}

.contact-box {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
  background: #0a4da2;
  color: white;
  padding: 30px;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease;
}

.contact-box:hover {
  transform: translateY(-5px);
}

.contact-box h3 {
  margin-bottom: 20px;
  font-size: 1.5rem;
}

.contact-box p {
  margin-bottom: 25px;
  line-height: 1.6;
}

.contact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: white;
  color: #0a4da2;
  padding: 12px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  transition: transform 0.3s ease, background 0.3s ease;
}

.contact-button i {
  margin-right: 8px;
}

.contact-button:hover {
  background: #f0f0f0;
  transform: scale(1.05);
}

/* Location Section */
.location-section {
  padding: 60px 20px;
  background-color: transparent;
  text-align: center;
}

.location-section h2 {
  color: #0a4da2;
  font-size: 2rem;
  margin-bottom: 40px;
}

.location-container {
  display: flex;
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
  gap: 30px;
}

.map-container {
  flex: 1;
  min-width: 300px;
  height: 450px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.location-info {
  flex: 1;
  min-width: 300px;
  padding: 30px;
  background: #f9f9f9;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.location-info h3 {
  color: #0a4da2;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.location-info p {
  margin-bottom: 15px;
  font-size: 1.1rem;
}

.location-info a {
  color: #0a4da2;
  text-decoration: none;
  transition: color 0.3s ease;
}

.location-info a:hover {
  color: red;
}

.location-button {
  display: inline-block;
  background: #0a4da2;
  color: white;
  padding: 12px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  margin-top: 20px;
  transition: transform 0.3s ease, background 0.3s ease;
}

.location-button:hover {
  background: #083b7e;
  transform: scale(1.05);
}

/* Email Form Section */
.email-form-section {
  padding: 60px 20px;
  background-color: transparent;
  text-align: center;
}

.email-form-section h2 {
  color: #0a4da2;
  font-size: 2rem;
  margin-bottom: 40px;
}

.contact-form {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #333;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #0a4da2;
  outline: none;
}

.form-button {
  background: #0a4da2;
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 30px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
}

.form-button:hover {
  background: #083b7e;
  transform: scale(1.05);
}

/* Success message */
.success-message {
  display: none;
  background-color: #4caf50;
  color: white;
  text-align: center;
  padding: 15px;
  margin-top: 20px;
  border-radius: 5px;
}

/* Error message */
.error-message {
  display: none;
  background-color: #f44336;
  color: white;
  text-align: center;
  padding: 15px;
  margin-top: 20px;
  border-radius: 5px;
}

/* Footer */
.footer {
  background: #0a4da2;
  color: white;
  padding: 40px 20px 20px;
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  gap: 30px;
}

.footer-logo {
  flex: 1;
  min-width: 250px;
}

.footer-logo img {
  height: 60px;
  margin-bottom: 15px;
}

.footer-contact,
.footer-social {
  flex: 1;
  min-width: 250px;
}

.footer h4 {
  margin-bottom: 20px;
  font-size: 1.2rem;
  position: relative;
  padding-bottom: 10px;
}

.footer h4:after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background: white;
}

.footer-social-icons {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-social-icons a {
  color: white;
  text-decoration: none;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
}

.footer-social-icons a i {
  margin-right: 8px;
  font-size: 18px;
}

.footer-social-icons a:hover {
  transform: translateX(5px);
}

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

.footer a {
  color: white;
  text-decoration: underline;
}

.footer a:hover {
  text-decoration: none;
}

/* Responsive Design */
@media (max-width: 768px) {
  /* Make sure the mobile menu works correctly */
  .menu-icon {
    display: block;
  }

  .nav {
    display: none;
    flex-direction: column;
    width: 100%;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    z-index: 100;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  }

  .menu-toggle:checked ~ .nav {
    display: flex;
  }

  .nav li {
    margin: 0;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid #eee;
  }

  .nav li:last-child {
    border-bottom: none;
  }

  .dropdown-content {
    position: static;
    box-shadow: none;
    width: 100%;
    background-color: #f9f9f9;
  }

  .dropdown-content a {
    text-align: center;
    padding: 10px;
  }

  .home-overlay h1 {
    font-size: 2rem;
  }

  .home-overlay p {
    font-size: 1rem;
  }

  .service-container,
  .pavers-content,
  .more-services-grid {
    gap: 20px;
  }

  .contact-section {
    flex-direction: column;
    align-items: center;
  }

  .contact-box {
    width: 100%;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .footer h4:after {
    left: 50%;
    transform: translateX(-50%);
  }

  .footer-social-icons {
    align-items: center;
  }

  .modal-content {
    width: 100%;
  }

  .close-modal {
    top: 10px;
    right: 20px;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .top-bar {
    flex-direction: column;
    gap: 10px;
  }

  .social-icons {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  .home-section {
    height: 400px;
  }

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

  .modal-nav button {
    padding: 8px 15px;
    font-size: 18px;
  }

  .gallery-banner-content h1 {
    font-size: 2rem;
  }
}

/* Gallery Section */
.gallery-more {
  margin-top: 30px;
}

.gallery-more-link {
  display: inline-block;
  background: #0a4da2;
  color: white;
  padding: 12px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: bold;
  transition: transform 0.3s ease, background 0.3s ease;
}

.gallery-more-link i {
  margin-left: 8px;
  transition: transform 0.3s ease;
}

.gallery-more-link:hover {
  background: #083b7e;
  transform: scale(1.05);
}

.gallery-more-link:hover i {
  transform: translateX(5px);
}

/* Asegurar que las imágenes en animación sean visibles */
.animated {
  opacity: 1 !important;
  transform: none !important;
}

/* Corregir la visualización de imágenes en dispositivos móviles */
@media (max-width: 768px) {
  .gallery-item {
    height: 200px;
  }
}