:root {
  /* fondos */
  --bg: #f9f9f9;
  --bg2: #d9f1dc;  
  /* textos */
  --text: #1c1c1c;
  --text2:#ffffff;
  /* colores y texto contrastado */
  /* --primary: #ff6f3c;
  --textPri: #ffffff; */
  --primary: #ffffff;
  --textPri: #556b2f;
  --secondary:#556b2f;
  --textSecon:#ffffff;
  --accent: #ff6f3c;
  --textacc:#000000;
  --logo1: #000000;
  --logo2: #000000;
}

html {
  scroll-behavior: smooth;
  font-size: 18px;
  line-height: 1.5;      /* valor relativo al tamaño de fuente  1.5*/
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Roboto', sans-serif;
  /* font-size: 18px; */
  background-color: var(--bg);
}

.section__title,
.navbar__brand,
h1,
h2,
h3 {
  font-family: 'Poppins', sans-serif;
  color: var(--secondary);
}

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

}
/* fondos */

.fondo {
  background-color: var(--bg);
}

.fondo2 {
  background-color: var(--bg2);
}

.sombra {
   box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  color: white;
}

.navbar__left {
  display: flex;
  align-items: center;
}

.navbar__toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--textPri);
  cursor: pointer;
  margin-right: 1rem;
}

.navbar__brand {
  font-size: 1.2rem;
  font-weight: bold;
  display: flex;
  flex-direction: column; /* Móviles: columna */
  align-items: flex-start; /* Alineación a la izquierda */
  align-items: baseline;
}
/* Escritorio: mostrar en fila */
@media (min-width: 768px) {
  .navbar__brand {
    flex-direction: row;
    gap: 0.5rem; /* Espacio entre elementos si deseas */
  }
}

.navbar__menu {
  display: flex;
  gap: 1rem;
}

.navbar__item {
  color: var(--textPri);
  text-decoration: none;
  padding: 0.5rem;
}


.navbar__item:hover {
  /* background-color: rgba(255, 255, 255, 0.2); */
  /* border-radius: 4px; */
  border-bottom: 2px solid var(--textPri);
  color: var(--textPri);
}
.navbar__logoTexto {
    font-family: 'Poppins', sans-serif;
    font-weight: 700; /* hace que se vea más elegante */
    color: var(--textacc);
    font-size: 25px;
}
.navbar__logoTexto--small {
    font-weight: 100; 
    font-size: 15px;
    color: #696060;
}

@media (max-width: 768px) {
  .navbar__toggle {
    display: block;
  }

  .navbar__menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: var(--primary);
    flex-direction: column;
    padding-bottom: 20px;
  }

  .navbar__item {
    width: 100%;
    padding-left: 40px;
    padding-top: 20px;
  }

  .navbar__menu--open {
    display: flex;
  }


}

section {
  padding: 50px 20px;
  min-height: 100vh;
  scroll-margin-top: 80px;
}
.section__p {
  text-align: left;
}

.home {
 
  text-align: left;
  padding-top: 100px;
}


.section__title {
  font-size: 1.8rem;
  margin-bottom: 1rem;
  text-align: left;
}
.section__title--grande {
  font-size: 3.25rem;
  line-height: 1.2;      /* valor relativo al tamaño de fuente  1.5*/
}

@media (max-width: 768px) {
  .section__title--grande {
    text-align: center;
    font-size: 40px;

  }
}


.about__content {
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.6;
}

.portfolio__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  padding: 1rem;
}

.portfolio__item {
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.portfolio__item img {
  max-width: 100%;
  border-radius: 4px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.portfolio__item:hover img {
  transform: scale(1.05);
}

.contact__form {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact__form input,
.contact__form textarea {
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.contact__form button {
  background-color: var(--accent);
  color: var(--textacc);
  border: none;
  padding: 0.75rem;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
}

.contact__form button:hover {
  background-color: var(--secondary);
  color: var(--textSecon);
}

footer {
  background: var(--secondary);
  color: var(--textSecon);
  text-align: center;
  padding: 1rem;
}

.section {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.section--visible {
  opacity: 1;
  transform: translateY(0);
}

.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
}

.modal__img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 8px;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
}

.modal__close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: #fff;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-size: 1.125rem;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: background-color 0.3s ease;
}

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

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

.btn--lg {
  font-size: 1.25rem;
  padding: 1rem 2rem;
}

/* === ESTRUCTURA DE DOS COLUMNAS === */
.home__container,
.about__container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.home__right img,
.about__left img {
  max-width: 100%;
  border-radius: 8px;
}

.home__right,
.about__left,
.about__right {
  flex: 1 1 45%;
}

@media (max-width: 768px) {
  .home {
      text-align: center;
  }

  .home__container,
  .about__container {
    flex-direction: column;
  }

  .home__right {
    order: -1;
  }
}


.home__container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.home__image,
.home__content {
  flex: 1 1 45%;
}

.home__image img {
  width: 100%;
  border-radius: 8px;
}


@media (max-width: 768px) {
  .home__container {
    flex-direction: column;
  }

  .home__image {
    order: -1;
  }
}


.about__container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
}

.about__image,
.about__content {
  flex: 1 1 45%;
}

.about__image img {
  width: 70%;
  border-radius: 8px;
  
 }

@media (max-width: 768px) {
  .about__container {
    flex-direction: column;
  }

  .about__image {
    order: -1;
  }
  .about__image img {
  width: 100%;

  }
}


.contact__container {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.contact__form-column,
.contact__info {
  flex: 1 1 45%;
}

.contact__info {
  font-size: 1.1rem;
}

.contact__info .icon {
  margin-right: 0.5rem;
  font-size: 1.2rem;
}

/* .contact__info a {
  color: var(--text);
  text-decoration: none;
} */

/* .contact__info a:hover {
  text-decoration: underline;
} */

@media (max-width: 768px) {
  .contact__container {
    flex-direction: column;
  }
}


@media (max-width: 768px) {
  .contact__form {
    width: 100%;
  }
}


/* === MOBILE FIRST STYLES === */
/* Estructura base para todos los tamaños */
.contact__container {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact__form-column,
.contact__info {
  width: 100%;
}

.contact__form {
  width: 100%;
}

.contact__info .icon {
  margin-right: 0.5rem;
  font-size: 1.2rem;
}
/* 
.contact__info a {
  color: var(--text);
  text-decoration: none;
}

.contact__info a:hover {
  text-decoration: underline;
} */

/* === ESTILOS PARA TABLETS Y ESCRITORIO === */
@media (min-width: 769px) {
  .contact__container {
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
  }

  .contact__form-column,
  .contact__info {
    flex: 1 1 45%;
  }
}

/* === CONTENEDOR CENTRAL RESPONSIVO COMO EN BOOTSTRAP === */
.container {
  width: 100%;
  max-width: 1140px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* Estilo específico para que navbar siga siendo flex */
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
}


/* === ACCESIBILIDAD Y UX === */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px dashed var(--accent);
  outline-offset: 4px;
}

a,
button,
input,
textarea {
  transition: all 0.3s ease;
}


/* Validación visual de campos del formulario */
input:required:valid,
textarea:required:valid {
  border: 2px solid green;
}

input:required:invalid,
textarea:required:invalid {
  border: 2px solid red;
}

.form__message {
  margin-top: 1rem;
  padding: 1rem;
  background-color: var(--bg2);
  color: var(--accent);
  font-weight: bold;
  border-radius: 6px;
}