/* ********** Custom Properties ********** */
:root {
  /* Identidad visual */
  --primary-color: #3b82f6;
  --secondary-color: #1e3a8a;
  --accent-color: #f59e0b;

  /* Texto */
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --text-light: #ffffff;

  /* Fondos */
  --bg-main: #f9fafb;
  --bg-surface: #ffffff;
  --bg-dark: #111827;

  /* Bordes y estados */
  --border-color: #e5e7eb;
  --error: #ef4444;
  --success: #10b981;

  /* Layout */
  --max-width: 1200px;
  --header-height: 70px;      /* Altura real del header fijo */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
}

/* ********** Reset y estilos base ********** */
html {
  box-sizing: border-box;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  scroll-behavior: smooth;
}

*, *::after, *::before {
  box-sizing: inherit;
}

body {
  margin: 0;
  color: var(--text-main);
  background-color: #1ea53b;
  background-color: var(--bg-main);
  /* Eliminamos overflow-x: hidden (puede recortar sombras o contenido lateral) */
}

a {
  color: var(--primary-color);
  transition: opacity 0.2s ease;
}
a:hover {
  opacity: 0.8;
}

h1, h2, h3 {
  margin: 0;
  line-height: 1.2;
}

img {
  max-width: 100%;
  height: auto;
  display: block;  /* Evita espacios fantasmas debajo de imágenes */
}

p {
  line-height: 1.6;
  margin-top: 0;
}
/* ********** OPTIMIZACIÓN DE RENDERIZADO (LCP) ********** */
/* Evita que las secciones fuera de pantalla bloqueen el pintado del héroe */
section:not(#inicio),
footer,
#about,
#servicios,
#contacto,
.otra-seccion-grande {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

/* ********** Utilidades ********** */
.container {
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}

.whatsapp-float {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #25D366; /* verde oficial WhatsApp */
  color: #fff;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  transition: transform 0.3s ease, background-color 0.3s ease;
  text-decoration: none;
}

.whatsapp-float:hover {
  background-color: #1da851;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

@keyframes pulse-whatsapp {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.whatsapp-float {
  animation: pulse-whatsapp 2s ease-in-out infinite;
}

.whatsapp-float svg {
  fill: currentColor;
}

.section {
  padding: 4rem 1rem;
}

section[id] {
  scroll-margin-top: var(--header-height);
  min-height: 100vh;
}

/* ********** Header ********** */
.header {
  background-color: var(--secondary-color);
  color: var(--text-light);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  height: var(--header-height); 
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.logo img {
  border-radius: 50%;
  /* width y height ya están en HTML, no es necesario repetir aquí */
}

/* Botón hamburguesa (móvil) */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-light);
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1001; /* Para que esté por encima del menú desplegado */
}

.menu-toggle:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.menu {
  display: none;
  position: absolute;
  top: var(--header-height);
  left: 0;
  width: 100%;
  background-color: var(--secondary-color);
  padding: 1rem;
  z-index: 999;
}

.menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.menu a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 0;
  display: block;
}

/* Estado abierto (agregado por JS) */
.menu--open {
  display: block;
}

/* Cambio de icono cuando el menú está abierto: mostramos una X */
.menu-toggle[aria-expanded="true"] .icon-menu {
  display: none;
}
.menu-toggle[aria-expanded="true"]::after {
  content: "✕";
  font-size: 1.5rem;
  line-height: 1;
  color: var(--text-light);
}

/* Escritorio */
@media screen and (min-width: 768px) {
  .menu-toggle {
    display: none;
  }

  .menu {
    display: block;
    position: static;
    width: auto;
    padding: 0;
    background: transparent;
  }

  .menu ul {
    flex-direction: row;
    gap: 2rem;
  }

  .menu a {
    padding: 0;
    transition: color 0.2s ease;
  }

  .menu a:hover {
    color: var(--accent-color);
    opacity: 1;  /* Quitamos el opacidad general */
  }
}

/* ********** Hero ********** */
.hero {
  min-height: 100vh;
  position: relative;          /* necesario para el posicionamiento absoluto de la imagen */
  overflow: hidden;            /* evita que la imagen sobresalga si usás border-radius o similar */
  margin-top: var(--header-height);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--text-light);
}

/* La imagen que actúa como fondo */
.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;           
  object-position: 80% center;     
  z-index: 0;                  
}

/* Capa de contenido (debe estar por encima) */
.hero-content {
  position: relative;
  z-index: 2;
  /* acá podés mantener cualquier estilo que ya tengas */
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.65);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
  padding: 2rem 1rem;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  text-align: justify;
}

.btn-cta {
  background-color: var(--primary-color);
  display: inline-block;
  padding: 0.8rem 2rem;
  color: var(--text-light);
  text-decoration: none;
  border-radius: 5px;
  font-weight: 700;
  transition: background-color 0.3s ease;
  align-items: center;
}

.btn-cta:hover {
  background-color: #2563eb;
}

/* ********** About ********** */

.about {
  background-color: var(--bg-surface);
}

.about h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 2rem;
  color: var(--text-main);
}

.about-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-text p {
  margin-bottom: 2rem;
}

.about-text ul {
  padding-left: 1.2rem;
  margin: 0;
}

.about-text li {
  margin-bottom: 0.5rem;
}

.about-img {
  border-radius: 8px;
  align-self: center;
  object-fit: cover;
  max-width: 100%;
  height: auto;
}


@media screen and (min-width: 768px) {
  .about h2 {
    text-align: left;
  }
  
  .about-wrapper {
    flex-direction: row;
    align-items: center;
    gap: 4rem;
  }

  .about-text {
    flex: 1 1 55%;
  }

  .about-img {
    flex: 1 1 45%;
    max-width: 100%;
    height: auto;
  }
}

/* ********** Services ********** */
/* .services {
  background-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0 6px 20px rgba(0,0,0,0.50);
}
 */
.services-header {
  text-align: center;
  margin-bottom: 3rem;
}

.services-header h2 {
  font-size: 2rem;
  color: var(--text-main);
  margin-bottom: 0.5rem;
}

.services-header  {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.cards-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.card {
  background-color: var(--bg-surface);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.2rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.card-icon {
  width: 40px;
  height: 40px;
  color: var(--primary-color);
  flex-shrink: 0;
}

.card-title {
  font-size: 1.3rem;
  color: var(--text-main);
}

.card-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: left;
  margin-bottom: 0.5rem;
}

.card ul {
  list-style: square;
  padding-left: 1.2rem;
  margin: 0;
  width: 100%;
  text-align: left;
}

.card ul li {
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

@media screen and (min-width: 768px) {
  .cards-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
  }

    .card {
    flex: 1 1 280px;
    max-width: 350px;
  }
}

/* ********** contact ********** */
.contact-section {
  background: var(--bg-main);
}

.contact-header {
  text-align: center;
  margin-bottom: 2rem;
}

.contact-header h2 {
  font-size: 2rem;
  color: var(--text-main);
}

.contact-header p {
  color: var(--text-muted);
  margin-top: 0.5rem;
}

/* Form */
.contact-form {
  max-width: var(--max-width);
  margin: 0 auto;
  background: var(--bg-surface);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

/* GRID FLEX BASE */
.form-grid {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* Inputs */
.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-group input,
.form-group textarea {
  padding: 0.9rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 1rem;
  outline: none;
  transition: 0.3s ease;
  background: #fff;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}

#message {
  min-height: 44px;          
  box-sizing: border-box;    
}

/* Botón */
.btn-submit {
  display: block;
  margin: 2rem auto 0; 
  width: 70%;
  padding: 1rem;
  border: none;
  border-radius: 8px;
  background: var(--primary-color);
  color: var(--text-light);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: 0.3s ease;
  min-height: 44px;
  min-width: 44px;
}

.btn-submit:hover {
  background: var(--secondary-color);
}
@media (min-width: 768px) {
  .form-grid {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .form-group {
    flex: 1;
    min-width: 48%;
  }

  .form-group.full {
    flex: 1 1 100%;
  }

  .btn-submit {
    width: 30%;
  }
}

/* ********** Footer ********** */
.footer {
  background-color: var(--secondary-color, #1e293b);
  color: var(--text-light, #f1f5f9);
  text-align: center;
  padding: 2.5rem 1rem 2rem;
}

.footer-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.footer-icon {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #ffffff;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  background: #2c3647;
  transition: all 0.3s ease;
}

.footer-icon svg {
  flex-shrink: 0;
  transition: transform 0.3s ease;
}

.footer-icon span {
  white-space: nowrap;
}

.footer-icon:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* LinkedIn */
.footer-icon[aria-label="LinkedIn"]:hover {
  background: #0a66c2;
  color: #ffffff;
}

/* Instagram */
.footer-icon[aria-label="Instagram"]:hover {
  background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
  color: #ffffff;
}

/* WhatsApp */
.footer-icon[aria-label="WhatsApp"]:hover {
  background: #25d366;
  color: #ffffff;
}

.footer-icon:hover svg {
  transform: scale(1.1);
}

.footer-copy {
  display: block;
  color: #cbd5e1;
  font-size: 0.85rem;
  margin-bottom: 0.6rem;
}

.footer-dev {
  display: block;
  font-size: 0.95rem;
  color: #34d399; 
  font-weight: bolder;
  text-align: center;
  letter-spacing: 0.3px;
}

.footer-dev a {
  color: #e2e8f0; 
  text-decoration: none;
  font-weight: 600;
  position: relative;
  transition: all 0.3s ease;
}

.footer-dev a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0%;
  height: 1px;
  background: #ffffff;
  transition: width 0.3s ease;
}

.footer-dev a:hover {
  color: #d4af37; 
}

.footer-dev a:hover::after {
  width: 100%;
  background: #d4af37;
}