/*=============================================
	* Empresa: City Peten S. De R.L
	* Departamento: IT
	* Autor: J. Carlos Martinez G.
	* Versión: V.5
	* Fecha: 25 Jul 2025
=============================================*/


/*=============== VARIABLES CSS ===============*/
:root {
  --header-height: 3.5rem;

  /*========== Colores ==========*/
  --primary-color: #47693a;
  --accent-color: #ffa400;
  --text-color: #333;
  --text-color-light: #777;
  --body-color: #ffffff;
  --container-color: #f9f9f9;
  --white-color: #fff;
  --border-color: #e0e0e0;

  /*========== Tipografía ==========*/
  --heading-font: 'Montserrat', sans-serif;
  --body-font: 'Lato', sans-serif;
  --h1-font-size: 2.5rem;
  --h2-font-size: 2rem;
  --h3-font-size: 1.25rem;
  --normal-font-size: 1rem;
  --small-font-size: 0.875rem;

  /*========== Z-index ==========*/
  --z-tooltip: 10;
  --z-overlay: 100;
  --z-menu: 110;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--heading-font);
  font-weight: 600;
  line-height: 1.2;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}

strong {
    font-weight: 700;
}

/*=============== REUSABLE CSS CLASSES ===============*/
.container {
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1.5rem;
}

.section {
  padding: 6rem 0 2rem;
}

.section__title {
  font-size: var(--h2-font-size);
  text-align: center;
  margin-bottom: 3rem;
  color: var(--primary-color);
  font-weight: 700;
}

/*=============== HEADER & NAV ===============*/
#header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-menu); /* El header siempre encima del overlay */
  background-color: transparent;
  transition: background-color 0.4s, box-shadow 0.4s;
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  font-family: var(--heading-font);
  font-weight: 700;
  color: var(--white-color);
  font-size: 1.5rem;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
  transition: color 0.4s;
}

.nav__list {
  display: flex;
  column-gap: 2.5rem;
}

.nav__link {
  font-family: var(--heading-font);
  color: var(--white-color);
  font-weight: 600;
  transition: color 0.3s;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
  position: relative;
  padding-bottom: 0.25rem;
}

.nav__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.nav__link:hover, .nav__link.active-link {
  color: var(--accent-color);
}
.nav__link:hover::after, .nav__link.active-link::after {
    width: 100%;
}

.nav__toggle {
    display: none; /* Oculto en desktop */
}

/*-- Estilo del Header al hacer scroll --*/
.scrolled {
  background-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}
.scrolled .nav__logo,
.scrolled .nav__link {
  color: var(--primary-color);
  text-shadow: none;
}
.scrolled .nav__link:hover {
    color: var(--accent-color);
}
.scrolled .nav__link.active-link {
    color: var(--accent-color);
}

/*-- Estilo del Header cuando el menú móvil está abierto --*/
.header--menu-open {
    background-color: var(--white-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.header--menu-open .nav__logo {
    color: var(--primary-color);
    text-shadow: none;
}


/*=============== INICIO (SLIDER) ===============*/
.slider-section {
    height: 100vh;
    position: relative;
}

.home-slider {
    width: 100%;
    height: 100%;
}

.home-slider .swiper-slide {
    position: relative;
    background-size: cover;
    background-position: center;
    color: var(--white-color);
}

.home-slider .swiper-slide::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
}

.slide__content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2;
    text-align: center;
    width: 80%;
    max-width: 900px;
}

.slide__title {
    font-size: var(--h1-font-size);
    font-weight: 700;
    text-transform: uppercase;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.7);
    animation: fadeInDown 1s ease-out both;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.swiper-button-next, .swiper-button-prev {
    color: var(--white-color);
    opacity: 0.5;
    transition: opacity 0.3s;
}
.swiper-button-next:hover, .swiper-button-prev:hover {
    opacity: 1;
}
.swiper-pagination-bullet-active {
    background: var(--accent-color);
}

/*=============== NOSOTROS ===============*/
.about__container {
    display: flex;
    flex-direction: column;
    gap: 4rem;
}

.about__item {
    display: grid;
    grid-template-columns: 40% 1fr;
    gap: 3rem;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 10px;
    padding: 1rem;
}

.about__item:nth-child(even) {
    grid-template-columns: 1fr 40%;
}
.about__item:nth-child(even) .about__image {
    order: 2;
}

.about__item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.about__image img {
    border-radius: 10px;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about__content h3 {
    font-size: var(--h3-font-size);
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 700;
}

.about__content p, .about__content li {
    margin-bottom: 1rem;
    line-height: 1.7;
    color: var(--text-color-light);
}

.about__content ul {
    list-style: disc;
    padding-left: 1.5rem;
}

.about__content i {
    color: var(--primary-color);
    font-weight: 600;
}


/*=============== PROYECTOS & RSE (TABS) ===============*/
.tabs-container {
    background: var(--white-color);
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 25px rgba(0,0,0,0.05);
}

.tabs__buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.tabs__button {
    font-family: var(--heading-font);
    padding: 0.75rem 1.5rem;
    border: 2px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

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

.tabs__button.active {
    background: var(--primary-color);
    color: var(--white-color);
    border-color: var(--accent-color);
}

.tabs__content .tabs__pane {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tabs__content .tabs__pane.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.project__content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
}

.project__text h4 {
    font-size: var(--h3-font-size);
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 700;
}

.project__text p {
    line-height: 1.7;
    margin-bottom: 1rem;
}
.project__text p strong {
    color: var(--text-color);
}

.project__image img {
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease;
}
.project__image img:hover {
    transform: scale(1.05);
}

.rse__gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.rse__gallery a {
    overflow: hidden;
    border-radius: 8px;
    display: block;
}

.rse__gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.4s ease, filter 0.4s ease;
}

.rse__gallery a:hover img {
    transform: scale(1.1);
    filter: brightness(0.9);
}

/*=============== NOTICIAS ===============*/
.news__container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.news__card {
    background-color: var(--white-color);
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.news__card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.news__content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news__date {
    font-family: var(--heading-font);
    font-size: var(--small-font-size);
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.news__title {
    font-size: var(--h3-font-size);
    margin-bottom: 0.75rem;
    font-weight: 700;
}

.news__description {
    color: var(--text-color-light);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

/*=============== SEPARATOR ===============*/
.section-separator {
    border: none;
    height: 1px;
    background-color: var(--border-color);
    margin: 2rem auto 4rem;
    max-width: 80%;
}


/*=============== CONTACTO ===============*/
.contact__container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.contact__column {
    text-align: left;
}

.contact__item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.contact__item i {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 0.25rem;
}

.contact__item a {
    font-weight: 600;
    transition: color 0.3s ease;
    word-break: break-word;
}

.contact__item a:hover {
    color: var(--accent-color);
}

.contact__item small {
    display: block;
    font-weight: 400;
    color: var(--text-color-light);
    font-size: var(--small-font-size);
}

.contact__social {
    text-align: center;
}

.contact__social h3 {
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.contact__social-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
}

.contact__social-links a i {
    font-size: 2.5rem;
    color: var(--primary-color);
    transition: color 0.3s ease, transform 0.3s ease;
}

.contact__social-links a:hover i {
    color: var(--accent-color);
    transform: translateY(-5px);
}

/*=============== FOOTER ===============*/
.footer {
    background-color: var(--primary-color);
    color: var(--white-color);
    text-align: center;
    padding: 3rem 1.5rem;
}

.footer__logo {
     width: 150px;
     height: auto;
     display: block; /* Importante para que el centrado funcione correctamente */
     margin: 0 auto; /* Centra el elemento en bloque horizontalmente */
}

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

.footer p:first-of-type {
    margin-bottom: 0.5rem;
}

/*=============== SCROLL ANIMATIONS ===============*/
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/*=============== SCROLL UP ===============*/
.scrollup {
    position: fixed;
    right: 1rem;
    bottom: -30%;
    background-color: var(--primary-color);
    padding: .5rem;
    border-radius: .4rem;
    z-index: var(--z-tooltip);
    transition: .4s;
    opacity: .9;
}

.scrollup:hover {
    background-color: var(--accent-color);
    opacity: 1;
}

.scrollup__icon {
    font-size: 1.2rem;
    color: var(--white-color);
}

.show-scroll {
    bottom: 3rem;
}

/*=============== MEDIA QUERIES ===============*/
@media screen and (max-width: 992px) {
  .about__item, .about__item:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .about__item:nth-child(even) .about__image {
    order: 0;
  }
  .about__image {
    max-height: 300px;
  }
  
  .project__content {
    grid-template-columns: 1fr;
  }
  .rse__gallery {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .contact__container {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .contact__item {
    justify-content: center;
    text-align: left;
  }
}

@media screen and (max-width: 768px) {
  :root {
    --h1-font-size: 2rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.1rem;
    --normal-font-size: 0.938rem;
  }
  
  .section {
    padding: 4rem 0 2rem;
  }

  /*-- MENÚ MÓVIL --*/
  .nav__menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 80%;
    max-width: 320px;
    height: 100%;
    background-color: var(--primary-color);
    padding: 6rem 2rem 0;
    z-index: var(--z-menu);
    transition: transform 0.4s ease-in-out;
    transform: translateX(100%);
  }
  
  .show-menu {
    transform: translateX(0);
  }

  .nav__list {
    flex-direction: column;
    align-items: center;
    row-gap: 2.5rem;
  }

  .nav__link {
    color: var(--white-color);
    text-shadow: none;
    font-size: var(--h3-font-size);
  }
  .nav__link:hover {
    color: var(--accent-color);
  }
  .nav__link.active-link {
      color: var(--accent-color);
      font-weight: 700;
  }
  .nav__link::after {
      display: none;
  }
  
  /*-- SUPERPOSICIÓN (OVERLAY) --*/
  .nav__overlay {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.5);
      z-index: var(--z-overlay);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.4s ease-in-out;
  }
  .show-overlay {
      opacity: 1;
      pointer-events: auto;
  }

  /*-- ESTILOS PARA EL NUEVO ICONO HAMBURGUESA ANIMADO --*/
  .nav__toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 28px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: var(--z-menu); /* Asegura que esté por encima de todo */
  }

  .nav__toggle span {
    width: 28px;
    height: 3px;
    background-color: var(--white-color);
    border-radius: 10px;
    transition: all 0.3s ease-in-out;
    position: relative;
    transform-origin: 1px;
  }

  /* Color del icono cuando se hace scroll */
  .scrolled .nav__toggle span,
  .header--menu-open .nav__toggle span {
      background-color: var(--primary-color);
  }
  
  /* Animación a 'X' */
  .nav__toggle.menu-open span:nth-child(1) {
    transform: rotate(45deg);
  }

  .nav__toggle.menu-open span:nth-child(2) {
    opacity: 0;
    transform: translateX(20px);
  }

  .nav__toggle.menu-open span:nth-child(3) {
    transform: rotate(-45deg);
  }
  
  /* Cuando el menú está abierto, la 'X' debe ser blanca para contrastar con el fondo oscuro del menú */
   .header--menu-open .nav__toggle.menu-open span {
      background-color: var(--primary-color);
  }


  /*-- OTROS ESTILOS MÓVIL --*/
  .slide__title {
    font-size: 1.8rem;
  }

  .tabs__buttons {
    gap: 0.5rem;
  }
  .tabs__button {
    padding: 0.5rem 1rem;
    font-size: var(--small-font-size);
  }

  .contact__column {
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .contact__item {
    max-width: 320px;
    width: 100%;
  }
}

@media screen and (max-width: 576px) {
    .news__container {
        grid-template-columns: 1fr;
    }
    .rse__gallery {
        grid-template-columns: 1fr;
    }
     .rse__gallery img {
        height: auto;
    }
}