/*
 * Estilos globales para el sitio web de Tamid Construcciones.
 * Utilizamos variables CSS para definir la paleta de colores y
 * aseguramos que la página sea responsiva mediante media queries.
 */

/* Variables de color */
:root {
  --primary-color: #00a1e0; /* Azul brillante utilizado en botones y títulos */
  --secondary-color: #0073aa; /* Azul oscuro para estados hover */
  --dark-color: #222; /* Color oscuro para textos y fondo del footer */
  --light-color: #f7f7f7; /* Gris muy claro para fondos */
  --white-color: #ffffff;
}

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

body {
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background-color: var(--white-color);
  scroll-behavior: smooth;
  font-size: 17px; /* texto base ligeramente más grande */
}

a {
  color: inherit;
}

ul {
  list-style: none;
}

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

/* Barra superior de contacto */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--dark-color);
  color: var(--white-color);
  font-size: 0.8rem;
  padding: 6px 0;
  z-index: 1000;
}

.topbar-content {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
}

.topbar-item a {
  color: var(--white-color);
  text-decoration: none;
}

.topbar-item a:hover {
  text-decoration: underline;
}

/* Encabezado */
.site-header {
  position: fixed;
  top: 32px;
  left: 0;
  width: 100%;
  background-color: var(--dark-color);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  z-index: 1000;
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo img {
  height: 50px;
  display: block;
}

/* Navegación principal */
.main-nav ul {
  display: flex;
  gap: 30px;
}

.main-nav a {
  text-decoration: none;
  color: var(--white-color);
  font-weight: bold;
  transition: color 0.3s ease;
}

.main-nav a:hover {
  color: var(--primary-color);
}

/* Ícono hamburguesa */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 25px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--white-color);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Menú móvil */
.mobile-nav {
  position: fixed;
  top: 102px;
  right: 0;
  width: 240px;
  height: calc(100% - 102px);
  background-color: var(--dark-color);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 999;
}

.mobile-nav.open {
  transform: translateX(0);
}

.mobile-nav ul {
  padding: 20px;
}

.mobile-nav li {
  margin-bottom: 15px;
}

.mobile-nav a {
  color: var(--white-color);
  text-decoration: none;
  font-size: 18px;
  display: block;
}

.mobile-nav a:hover {
  color: var(--primary-color);
}

/* Hero */
.hero {
  position: relative;
  width: 100%;
  height: calc(100vh - 70px);
  background: url('../images/hero.jpg') center/cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white-color);
  text-align: center;
}

/* Sección hero renovada */
.hero-section {
  padding-top: 120px; /* deja espacio para la barra superior y la cabecera */
  padding-bottom: 60px;
  background-color: var(--light-color);
  position: relative;
  margin-bottom: 80px;
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 40px;
}

.hero-left {
  flex: 1 1 50%;
  max-width: 600px;
}

.hero-left h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  color: var(--dark-color);
  line-height: 1.2;
}

.hero-left .highlight {
  color: var(--primary-color);
}

.hero-left p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: #555;
}

.hero-right {
  flex: 1 1 45%;
}

.hero-right img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

/* Lista de características en la sección hero */
.hero-features {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--dark-color);
  font-size: 0.9rem;
}

.hero-features li {
  display: flex;
  align-items: center;
  gap: 8px;
}

.hero-features svg {
  width: 16px;
  height: 16px;
  color: var(--primary-color);
}

/* Tarjeta destacada flotante en la sección hero */
.hero-card {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--white-color);
  border-radius: 10px;
  padding: 12px 20px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 220px;
  font-size: 0.9rem;
}

.hero-card-icon {
  background-color: var(--primary-color);
  color: var(--white-color);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.hero-card-icon svg {
  width: 18px;
  height: 18px;
}

.hero-card-text {
  color: var(--dark-color);
}

@media (max-width: 900px) {
  .hero-card {
    position: static;
    transform: none;
    margin-top: 30px;
  }
}

@media (max-width: 900px) {
  .hero-inner {
    flex-direction: column;
    text-align: center;
  }
  .hero-left, .hero-right {
    flex: 1 1 100%;
    max-width: 100%;
  }
  .hero-right {
    order: -1; /* coloca la imagen encima en móviles */
    margin-bottom: 20px;
  }
  .hero-left h1 {
    font-size: 2.4rem;
  }
  .hero-left p {
    font-size: 1rem;
  }
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
}

.hero h1 {
  font-size: 3rem;
  margin-bottom: 20px;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 30px;
}

/* Botones */
.btn {
  display: inline-block;
  padding: 14px 36px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: bold;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  margin: 8px;
}

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

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

.btn-secondary {
  background-color: var(--dark-color);
  color: var(--white-color);
}

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

/* Sección de servicios principales */
.services-section {
  padding: 100px 0;
  text-align: center;
}

.services-section h2 {
  font-size: 2.4rem;
  margin-bottom: 40px;
  color: var(--primary-color);
}

.cards {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.card {
  background-color: var(--white-color);
  padding: 30px 20px 40px;
  border-radius: 12px;
  flex: 1 1 280px;
  max-width: 350px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Número de servicio de fondo */
.service-number {
  position: absolute;
  bottom: 20px;
  right: 20px;
  font-size: 2.5rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.05);
  pointer-events: none;
}

/* Icono de servicio dentro de cada tarjeta */
.service-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--white-color);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2.2rem;
  transition: background-color 0.3s ease;
}

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

.card h3 {
  margin-top: 15px;
  color: var(--primary-color);
  font-size: 1.6rem;
}

.card p {
  font-size: 0.95rem;
  margin-top: 10px;
  color: #555;
}

/* CTA */
.cta {
  padding: 80px 15px;
  text-align: center;
}

.cta-content {
  max-width: 700px;
  margin: 0 auto;
}

.cta-obra-nueva {
  background-color: var(--dark-color);
  color: var(--white-color);
}

.cta-obra-nueva h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
}

.cta-obra-nueva p {
  margin-bottom: 30px;
  color: var(--white-color);
}

.cta-contenedores {
  position: relative;
  color: var(--white-color);
  background: url('../images/container_red.png') center/cover no-repeat;
}

.cta-contenedores::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
}

.cta-contenedores .cta-content {
  position: relative;
  z-index: 1;
}

.cta-contacto {
  background-color: var(--primary-color);
  color: var(--white-color);
}

.cta-contacto h2 {
  margin-bottom: 15px;
}

.cta-contacto p {
  margin-bottom: 25px;
}

/* Servicios detallados */
.detailed-services {
  padding: 100px 0;
  text-align: center;
  background-color: #f7fbff;
}

.detailed-services h2 {
  font-size: 2.4rem;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.detailed-services .subtitle {
  font-size: 1rem;
  margin-bottom: 40px;
  color: #555;
}

.service-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
}

.service-item {
  flex: 1 1 280px;
  max-width: 350px;
  text-align: center;
}

.service-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 4px;
}

.service-item h3 {
  margin-top: 15px;
  font-size: 1.5rem;
  color: var(--primary-color);
}

.service-item p {
  font-size: 0.9rem;
  color: #555;
  margin-top: 10px;
}

/* Galería */
.projects-section {
  padding: 80px 0;
  text-align: center;
}

.projects-section h2 {
  font-size: 2.4rem;
  margin-bottom: 10px;
  color: var(--primary-color);
}

.projects-section .subtitle {
  font-size: 1rem;
  margin-bottom: 40px;
  color: #555;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 4px;
  transition: transform 0.3s ease;
}

.gallery img:hover {
  transform: scale(1.03);
}

/* Pie de página */
.site-footer {
  background-color: var(--dark-color);
  color: var(--white-color);
  padding-top: 60px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
}

.footer-brand img {
  width: 150px;
  margin-bottom: 15px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 300px;
}

.footer-links h4, .footer-contact h4 {
  margin-bottom: 10px;
  color: var(--primary-color);
}

.footer-links ul {
  padding: 0;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--white-color);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--primary-color);
}

.footer-contact p {
  margin: 4px 0;
  font-size: 0.9rem;
}

.footer-contact a {
  color: var(--white-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-contact a:hover {
  color: var(--primary-color);
}

.footer-bottom {
  text-align: center;
  font-size: 0.8rem;
  margin-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 20px 0;
}

/* Media queries para pantallas medianas y pequeñas */
@media (max-width: 900px) {
  .main-nav {
    display: none;
  }
  .hamburger {
    display: flex;
  }
  .cards {
    gap: 20px;
  }
  .card {
    flex: 1 1 45%;
  }
  .service-grid {
    gap: 20px;
  }
  .service-item {
    flex: 1 1 45%;
  }
}

@media (max-width: 600px) {
  .hero h1 {
    font-size: 2.2rem;
  }
  .hero p {
    font-size: 1rem;
  }
  .card {
    flex: 1 1 100%;
  }
  .service-item {
    flex: 1 1 100%;
  }
  .gallery img {
    height: 160px;
  }
  .footer-container {
    flex-direction: column;
    align-items: flex-start;
  }
  .footer-brand, .footer-links, .footer-contact {
    width: 100%;
    margin-bottom: 30px;
  }
}