/* ----- ESTILOS BASE ----- */

/*  Importación de fuentes desde Google Fonts  */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Open+Sans:wght@400;600&display=swap');

/*  Importación de fuentes desde un archivo del mismo proyecto  */
@font-face {
  font-family : 'Proxima Nova Rg';
  src         : url('/files/proxima-nova-bold.otf');
}

:root {
  /*  Variables del proyecto  */

  /*  Anchura máxima del contenido en desktop */
  --max-width : 1200px;

  /*  Colores  */
  --primary-color     : #1D8348; /* Verde esmeralda oscuro, más profesional */
  --primary-color-alt : #145A32; /* Tono más profundo para interacciones */
  --title-color       : #1a202c; /* Gris oscuro casi negro para títulos */
  --text-color        : #4a5568; /* Gris más suave para texto */
  --body-bg-color     : #f7fafc; /* Fondo gris muy claro */
  --white-color       : #ffffff;
  --color             : var(--primary-color);
  --color-alt         : var(--primary-color-alt);

  /*  Fuentes  */
  --body-font  : 'Open Sans', sans-serif;
  --title-font : 'Montserrat', sans-serif;

  /*  Tamaños  */
  --header-height     : 3rem;
  --section-spacing   : 4rem;
  --block-spacing     : 2rem;
  --body-line-height  : 1.6;
  --title-line-height : 1.3;

  /* Tamaños de fuentes */
  --h1-font-size      : 2rem;
  --h2-font-size      : 1.5rem;
  --h3-font-size      : 1.25rem;
  --h4-font-size      : 1rem;
  --big-font-size     : 1rem;
  --normal-font-size  : 0.875rem;
  --small-font-size   : 0.75rem;
  --smaller-font-size : 0.6875rem;

  /* Capas */
  --z-back       : -10;
  --z-normal     : 1;
  --z-front      : 10;
  --z-tooltip    : 20;
  --z-overlay    : 30;
  --z-modal      : 40;
  --z-fixed      : 50;
  --z-off-canvas : 100;

  /* Otros */
  --border-radius : 0.5rem;
  --box-shadow    : 0 2px 2px rgba(36, 47, 66, 0.1);
}

@media screen and (min-width: 1024px) {

  /*  Variables de tamaño en desktop  */
  :root {
    --header-height         : 4rem;
    --section-spacing       : 8rem;
    --block-spacing         : 4rem;
    --h1-font-size          : 3rem;
    --h2-font-size          : 2rem;
    --h3-font-size          : 1.5rem;
    --h4-font-size          : 1.25rem;
    --big-font-size         : 1.25rem;
    --normal-font-size      : 1rem;
    --small-font-size       : 0.875rem;
    --smaller-font-size     : 0.75rem;
  }

}

body {
  display          : flex;
  flex-direction   : column;
  min-height       : calc(100vh - var(--header-height));
  color            : var(--text-color);
  padding-top      : var(--header-height);
  font-family      : var(--body-font);
  font-size        : var(--normal-font-size);
  line-height      : var(--body-line-height);
  background-color : var(--body-bg-color);
}

a {
  color : var(--primary-color);
}

p {
  margin-top : 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top  : 0;
  color       : var(--title-color);
  font-family : var(--title-font);
  line-height : var(--title-line-height);
  font-weight : 800;
}

h1 {
  font-size:  var(--h1-font-size);
}

h2 {
  font-size : var(--h2-font-size);
}

h3 {
  font-size : var(--h3-font-size);
}

h4 {
  font-size : var(--h4-font-size);
}

.main h1 {
  margin-bottom : var(--block-spacing);
  padding-top   : var(--block-spacing);
}

.content-wrapper {
  width        : calc(100% - 2rem);
  max-width    : var(--max-width);
  margin-left  : 1rem;
  margin-right : 1rem;
}

@media screen and (min-width: 1024px) {

  .content-wrapper {
    width        : 100%;
    margin-left  : auto;
    margin-right : auto;
  }

}


.section-container {
  margin-bottom : var(--section-spacing);
}

.section-container h1,
.section-container h2 {
  text-align : center;
}

.image-container {
  width          : 100%;
  height         : 0;
  overflow       : hidden;
  position       : relative;
  padding-bottom : 56.25%;
}

.image-container img {
  position   : absolute;
  top        : 0;
  left       : 0;
  width      : 100%;
  height     : 100%;
  object-fit : cover;
}

/* ----- BOTONES ----- */

.button {
  display         : inline-block;
  padding         : 0.75rem 1.25rem;
  border-radius   : 1.5rem;
  text-decoration : none;
  font-weight     : 600;
  color           : var(--white-color);
  background      : var(--color);
  border          : 1px solid var(--color);
}

.button:hover {
  background : var(--color-alt);
}

.button.white {
  --color     : var(--white-color);
  --color-alt : var(--body-bg-color);
  color       : var(--primary-color);
}

.button.ghost {
  color      : var(--color);
  background : transparent;
}

.button.ghost:hover {
  color      : var(--white-color);
  background : var(--color);
}

.button.ghost.white:hover {
  color      : var(--primary-color);
  background : var(--color);
}

/*  ----- MENÚ PRINCIPAL -----  */
.main-header {
  display    : flex;
  position   : fixed;
  top        : 0;
  height     : var(--header-height);
  width      : 100%;
  background : var(--white-color);
  box-shadow : 0 3px 5px rgba(112, 126, 132, 0.1);
  z-index    : var(--z-fixed);
}

.main-header .content-wrapper {
  display     : flex;
  align-items : center;
}

.main-header .jam {
  margin-left : auto;
}

.main-header img {
  height : 1.5rem;
}

@media screen and (min-width: 1024px) {

  .main-header img {
    height : 2rem;
  }

}

.main-header .jam {
  color     : var(--title-color);
  font-size : 2.5rem;
  cursor    : pointer;
}

@media screen and (min-width: 1024px) {

  .main-header .jam {
    display : none;
  }

}

.main-menu {
  display         : flex;
  justify-content : center;
  align-items     : center;


}

@media screen and (min-width: 1024px) {

  .main-menu {
    margin-left : auto;
  }

}

@media screen and (max-width: 1024px) {

  .main-menu {
    position        : fixed;
    top             : 0;
    left            : 0;
    width           : 100%;
    height          : 100vh;
    background      : var(--white-color);
    z-index         : var(--z-off-canvas);
    transform       : scale(0);
    transition      : transform 0.25s;
    will-change     : transform;
  }

}

.main-menu.active {
  transform : initial;
}

.main-menu ul {
  list-style   : none;
  padding-left : 0;
  margin       : 0;
}

@media screen and (min-width: 1024px) {

  .main-menu ul {
    display : flex;
  }

}

.main-menu .jam-close {
  position : absolute;
  right    : 1rem;
  top      : 0.5rem;
}

.main-menu a {
  display         : block;
  padding         : 0.75rem 1rem;
  color           : var(--title-color);
  text-decoration : none;
  font-weight     : 600;
}

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

@media screen and (max-width: 1024px) {

  .main-menu a {
    text-align : center;
    font-size  : var(--big-font-size);
  }

}

@media screen and (min-width: 1024px) {

  .main-menu ul li:last-of-type a {
    padding-right : 0;
  }

}

/* ----- BANNER PRINCIPAL ----- */

.main-banner {
  position   : relative;
  padding    : var(--block-spacing) 0;
  background : var(--primary-color);
  color      : var(--white-color);
  text-align : center;
}

.main-banner .content-wrapper {
  position : relative;
  z-index  : var(--z-front);
}

.main-banner .title {
  color : var(--white-color);
}

.main-banner p {
  opacity : 0.85;
}

.main-banner p:first-of-type {
  margin-bottom : 0.75rem;
}

.main-banner p:nth-of-type(2) {
  margin-bottom: 2rem;
}

.main-banner .button {
  margin-bottom : 0.5rem;
}

.main-banner .btn-subtitle {
  font-size : var(--smaller-font-size);
  opacity   : 0.7;
}

.main-banner .background {
  position   : absolute;
  left       : 0;
  top        : 0;
  width      : 100%;
  height     : 100%;
  object-fit : cover;
  z-index    : var(--z-normal);
  opacity    : 0.85;
}

/* ----- SERVICIOS ----- */

.services-section h2 {
  margin-bottom : var(--block-spacing);
}

.services-section .content-wrapper {
  display         : grid;
  gap             : 2rem;
  justify-content : center;
}

@media screen and (min-width: 1024px) {

  .services-section .content-wrapper {
    grid-template-columns : repeat(3, 1fr);
  }

}

.service-item {
  display        : flex;
  flex-direction : column;
  align-items    : center;
  text-align     : center;
  max-width      : 300px;
  margin         : 0 auto;
}

.service-item .jam {
  margin-bottom : 1rem;
  color         : var(--primary-color);
  font-size     : 4rem;
}

.service-item h3 {
  margin-bottom : 0.5rem;
}

.service-item p {
  margin-bottom : 0;
}

/* ----- SOBRE NOSOTROS ----- */

.about-section {
  position   : relative;
  padding    : var(--block-spacing) 0;
  background : var(--primary-color);
  color      : var(--white-color);
  text-align : center;
}

.about-section .content-wrapper {
  position : relative;
  z-index  : var(--z-front);
}

.about-section .title {
  color : var(--white-color);
}

.about-section p {
  opacity : 0.85;
}

.about-section p:first-of-type {
  margin-bottom : 0.75rem;
}

.about-section p:nth-of-type(2) {
  margin-bottom: 2rem;
}

.about-section .button {
  margin-bottom : 0.5rem;
}

.about-section .btn-subtitle {
  font-size : var(--smaller-font-size);
  opacity   : 0.7;
}

.about-section .background {
  position   : absolute;
  left       : 0;
  top        : 0;
  width      : 100%;
  height     : 100%;
  object-fit : cover;
  z-index    : var(--z-normal);
  opacity    : 0.1;
}

/* ----- ÚLTIMOS PROYECTOS ----- */
.last-projects {
  display        : flex;
  flex-direction : column;
  align-items    : center;
}

.last-projects h2 {
  margin-bottom : var(--block-spacing);
}

.last-projects .content-wrapper {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.project-item {
  display: block;
  text-decoration: none;
  color: var(--text-color);
  background-color: var(--white-color);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 4px 12px rgba(36, 47, 66, 0.15);
}

.project-item .image-container {
  overflow: hidden;
}

.project-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

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

.project-item article > div:first-of-type {
  padding: 1.5rem;
}

.project-item h4 {
  color: var(--title-color);
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.project-item p {
  margin-bottom: 0;
  font-size: var(--normal-font-size);
}

/* ----- TRABAJA CON NOSOTROS (DISEÑO MODERNO) ----- */

.work-with-us {
  position: relative;
  padding: var(--section-spacing) 1rem;
  background-color: var(--primary-color);
  color: var(--white-color);
  text-align: center;
  overflow: hidden;
}


.work-with-us .content-wrapper {
  position: relative;
  z-index: var(--z-front);
}

.work-with-us .title {
  color: var(--white-color);
  margin-bottom: 1rem;
}

.work-with-us .subtitle {
  opacity: 0.9;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
  line-height: var(--body-line-height);
}

.work-with-us .button {
  background-color: var(--white-color);
  color: var(--primary-color);
  border: 2px solid transparent;
}

.work-with-us .button:hover {
  background-color: transparent;
  border-color: var(--white-color);
  color: var(--white-color);
}

/*  ----- REDES SOCIALES -----  */

.social-networks a {
  padding         : 0.25rem;
  color           : var(--text-color);
  font-size       : 1rem;
  text-decoration : none;
}

.social-networks a:hover {
  color : var(--primary-color);
}

.social-networks a:not(:last-of-type) {
  margin-right : 1.5rem;
}

/* ----- FOOTER (DISEÑO MODERNO) ----- */

.main-footer {
  background-color: #1a202c; /* Un fondo oscuro y elegante */
  color: #a0aec0; /* Texto gris claro para legibilidad */
  padding-top: var(--section-spacing);
}

.main-footer .content-wrapper {
  display: grid;
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
}

@media screen and (min-width: 768px) {
  .main-footer .content-wrapper {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
}

.footer-column .footer-logo {
  max-width: 150px;
  margin-bottom: 1rem;
}

.footer-column h4 {
  color: var(--white-color);
  font-family: var(--title-font);
  margin-bottom: 1rem;
  font-size: var(--h3-font-size);
}

.footer-column p {
  margin-bottom: 0.5rem;
  line-height: var(--body-line-height);
}

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

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

.main-footer .social-networks {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

.main-footer .social-networks a {
  font-size: 1.5rem;
  color: var(--white-color);
}

.footer-bottom {
  border-top: 1px solid #2d3748; /* Línea separadora sutil */
  text-align: center;
  padding: 1.5rem 1rem;
  margin-top: 2rem;
}

.footer-bottom p {
  margin: 0;
  font-size: var(--small-font-size);
}

/*  ----- PROYECTOS -----  */
.projects-section .content-wrapper {
  display : grid;
  gap     : 2rem;
}

@media screen and (min-width: 1024px) {

  .projects-section .content-wrapper {
    grid-template-columns : repeat(3, 1fr);
  }

}

.card-project {
  border-radius : var(--border-radius);
  overflow      : hidden;
  box-shadow    : var(--box-shadow);
}

.card-project a {
  display         : inline-flex;
  align-items     : center;
  text-decoration : none;
  font-weight     : 600;
}

.card-project h3 {
  margin-bottom : 0.5rem;
}

.card-project p {
  margin-bottom : 1rem;
}

.card-project a span:first-of-type {
  margin-right : 0.25rem;
}

.card-project .jam {
  font-size : var(--big-font-size);
}

.card-project > div:nth-of-type(2) {
  padding    : 1rem;
  background : var(--white-color);
}

/* ----- SOBRE NOSOTROS (DISEÑO MODERNO) ----- */

.about-us .content-wrapper {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem; /* Añadido para consistencia en móviles */
}

.about-item {
  display: grid;
  gap: 2rem;
  align-items: center;
  text-align: center;
}

@media screen and (min-width: 768px) {
  .about-item {
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    text-align: left;
  }
}

.about-item .image-container {
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

.about-item img {
  width: 100%;
  display: block;
}

.about-item h2 {
  margin-bottom: 1rem;
}

.about-item p {
  margin-bottom: 1.5rem;
}

.about-item .button {
  margin-top: 1rem;
}

/*  ----- CONTACTO -----  */

.contact-section .content-wrapper {
  display    : grid;
  gap        : var(--block-spacing);
  text-align : center;
}

@media screen and (min-width: 1024px) {

  .contact-section .content-wrapper {
    --max-width           : 800px;
    grid-template-columns : 1fr 1fr;
    text-align            : left;
  }

}

.contact-section h4 {
  margin-bottom : 0.5rem;
}

.contact-section address {
  display    : grid;
  gap        : 1rem;
  font-style : normal;
}

@media screen and (min-width: 1024px) {

  .contact-section address {
    order : -1;
    gap   : 2rem;
  }

}

.contact-item .jam {
  font-size : 1rem;
}

.map-ubication {
  width         : 100%;
  height        : 200px;
  overflow      : hidden;
  border-radius : var(--border-radius);
}

/* Animación para tarjetas de servicio */
.service-item {
  transition    : transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
  transform  : translateY(-8px);
  box-shadow : 0 4px 12px rgba(36, 47, 66, 0.15);
}

/* ----- VENTAJAS ----- */

.advantages-section .content-wrapper {
  display: grid;
  gap: 2rem;
}

@media screen and (min-width: 768px) {
  .advantages-section .content-wrapper {
    grid-template-columns: repeat(3, 1fr);
  }
}

.advantage-item {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--border-radius);
  background-color: var(--white-color);
  box-shadow: var(--box-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.advantage-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 4px 12px rgba(36, 47, 66, 0.15);
}

.advantage-item .jam {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  display: block;
}

.advantage-item h3 {
  margin-bottom: 0.5rem;
}

/* ----- PRODUCTOS ----- */

.products-section .content-wrapper {
  display: grid;
  gap: 2rem;
}

.products-section h1,
.products-section h2 {
  text-align : center;
}

@media screen and (min-width: 768px) {
  .products-section .content-wrapper {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product-item {
  border-radius: var(--border-radius);
  background-color: var(--white-color);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 4px 12px rgba(36, 47, 66, 0.15);
}

.product-item .image-container {
  padding-bottom: 75%; /* Aspect ratio 4:3 */
}

.product-item h3,
.product-item p {
  padding: 0 1.5rem;
}

.product-item h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.product-item p {
  padding-bottom: 1.5rem;
}

/* ----- BROCHURE ----- */

.brochure-section {
  background-color: var(--body-bg-color);
  padding: 4rem 1rem;
}

.brochure-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
  background-color: var(--white-color);
  padding: 3rem;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.brochure-content h3 {
  margin-bottom: 1rem;
  font-size: var(--h3-font-size);
}

.brochure-content p {
  margin-bottom: 2rem;
}

@media screen and (min-width: 1024px) {
  .brochure-section {
    padding: var(--section-spacing) 1rem;
  }
  
  .brochure-content h3 {
    font-size: var(--h2-font-size);
  }
}
