/*Consideraciones generales*/

@import url("https://fonts.googleapis.com/css2?family=Satisfy&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap");

* {
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
}
:root {
  --azulBoton: rgba(38, 50, 102, 0.795);
}
main {
  max-width: 1440px;
  min-width: 1200px;
  margin: 0 auto;
}
/*Arreglos del header*/
header {
  text-align: center;
  background-color: black;
  color: white;
  padding-top: 100px;
  height: 250px;
}
/*Logo de la empresa*/
header img {
  width: 20%;
  height: 80px;
  border-radius: 50px;
}
/*barra navegadora*/
nav {
  margin-top: 100px;
  border: 1px solid gray;
}
nav li {
  display: inline-block;
  padding: 20px;
}
header a {
  text-decoration: none;
  color: white;
  padding: 5px;
  font-family: "Great Vibes", cursive;
}
header a:hover {
  background-color: white;
  color: black;
  border-radius: 30px;
}
/*Titulo de la pagina*/
h1 {
  padding: 140px;
  font-size: 3em;
  font-family: "Satisfy", cursive;
  color: darkkhaki;
}
/*Titulos de las secciones*/
h2 {
  font-family: "Great Vibes", cursive;
  text-align: center;
  margin-top: 10px;
  margin-bottom: 15px;
}
/*Separacion entre secciones*/
section {
  padding-bottom: 100px;
}
/*Imagen (fondo) del 1er seccion*/
section:first-of-type {
  height: 250px;
  background-image: url(./img/fondo.jpg);
  text-align: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center -150px;
}
/*Articulos para lectura*/
section:nth-child(3) {
  text-align: center;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
}
section:nth-child(3) img {
  width: 150px;
  height: 180px;
  border: solid 1px grey;
  border-radius: 5px;
  object-fit: contain;
}
section:nth-child(3) article:first-child {
  width: 100%;
  height: 90px;
  border: none;
  display: block;
  text-align: center;
  margin-top: 20px;
  margin-bottom: 0;
}
/*Para que el titulo y descripcion de la seccion no tengan el efecto de
agrandarse como los articulos para leer*/
section:nth-child(3) article:first-child:hover {
  transform: none;
}
section:nth-child(3) article:first-child:hover {
  box-shadow: none;
}
/*comun a todos los articulos de la seccion Noticias*/
section:nth-child(3) article {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  text-align: left;
  width: 40%;
  height: 180px;
  border: solid 1px grey;
  border-radius: 5px;
  margin: 15px 10px;
  margin-top: 0;
}
section:nth-child(3) figure {
  height: 100%;
}
h3 {
  margin: 5px;
  text-decoration: underline grey;
}
h3 + p {
  width: 60%;
  margin-left: 10px;
}
p + p {
  margin: 10px 0px;
  width: 50%;
}
div p {
  display: inline-block;
}
section:nth-child(3) a {
  background-color: var(--azulBoton);
  color: white;
  border-radius: 10px;
  padding: 3px 4px;
  text-decoration: none;
  margin: 0 10px;
}
section:nth-child(3) a:hover {
  background-color: green;
}
/*Efecto de agrandar, con fondo para que no se mezclen los superpuestos y sombra*/
section:nth-child(3) article:hover {
  transform: scale(1.5);
  transition: 1.5s;
  background-color: white;
  box-shadow: 7px -6px 50px 0 black;
}
/*Titulo de la seccion Imagenes*/
section:nth-child(4) article:first-child {
  background-color: lightgrey;
  padding: 10px;
}
/*Disposicion de las imagenes*/
section:nth-child(4) article:nth-child(2) {
  padding-left: 120px;
  background-color: lightgrey;
  display: grid;
  grid-template-columns: repeat(3, 20%) 25%;
  grid-template-rows: repeat(4, 23%);
  grid-gap: 5px;
  height: 750px;
}
section:nth-child(4) img {
  width: 100%;
}
section:nth-child(4) figure {
  display: flex;
  border: solid 1px black;
  contain: content;
}
article:nth-child(2) figure:first-child {
  grid-column: 1/3;
  grid-row: 1/2;
}
article:nth-child(2) figure:nth-child(2) {
  grid-column: 3/4;
  grid-row: 1/3;
}
article:nth-child(2) figure:nth-child(3) {
  grid-column: 4/5;
  grid-row: 1/4;
}
article:nth-child(2) figure:nth-child(4) {
  grid-column: 1/2;
  grid-row: 2/4;
}
article:nth-child(2) figure:nth-child(5) {
  grid-column: 2/3;
  grid-row: 2/3;
}
article:nth-child(2) figure:nth-child(6) {
  grid-column: 2/4;
  grid-row: 3/4;
}
article:nth-child(2) figure:nth-child(9) {
  grid-column: 3/5;
  grid-row: 4/5;
}
/*Arreglo de las categorias*/
section:nth-child(5) {
  display: flex;
  flex-wrap: wrap;
}
section:nth-child(5) h2 {
  width: 100%;
  margin-bottom: 30px;
}
section:nth-child(5) article {
  width: 20%;
  margin: 0 auto;
  text-align: center;
}
section:nth-child(5) img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 1px solid grey;
}
section:nth-child(5) ul {
  width: 100px;
  text-align: left;
  margin: 10px auto;
}
/*Distribucion de la tabla y el formulario de contacto*/
section:nth-child(6) {
  display: flex;
  flex-wrap: wrap;
}
section:nth-child(6) h2 {
  width: 49%;
  margin-bottom: 15px;
}
section:nth-child(6) article {
  width: 40%;
  margin: 0 auto;
}
/*Estilo de la tabla*/
table {
  font-family: "Satisfy";
  font-size: 1.1rem;
  border-collapse: collapse;
  width: 90%;
  height: 200px;
}
thead {
  background-color: black;
  color: white;
}
tbody tr:nth-child(odd) {
  background-color: lightgray;
}
/*Estilo del formulario de contacto*/
form {
  display: flex;
  flex-wrap: wrap;
}
fieldset {
  border: none;
}
form :first-child {
  width: 50%;
}
form :first-child input {
  border: solid 1px grey;
  width: 90%;
  height: 23px;
  margin: 5px 0;
}
form :nth-child(2) {
  width: 50%;
  border: none;
  display: flex;
  flex-wrap: wrap;
}
form :nth-child(2) select {
  border: solid 1px grey;
  width: 90%;
  height: 25px;
  margin: 5px 0;
  color: gray;
}
form :nth-child(3) {
  width: 100%;
}
form :nth-child(3) input {
  height: 23px;
}
form :nth-child(3) textarea {
  resize: none;
  height: 80px;
}
form :nth-child(3) input,
form :nth-child(3) textarea {
  width: 95%;
  margin: 5px 0;
  border: solid 1px grey;
  font-family: Arial, Helvetica, sans-serif;
}
form :nth-child(3) input[type="submit"] {
  background-color: var(--azulBoton);
  color: white;
  height: 38px;
  width: 95.5%;
  border-radius: 50px;
}
/*Footer*/
footer {
  text-align: center;
  height: 30px;
  background-color: lightgrey;
}
footer img {
  height: 25px;
  border-radius: 50%;
}
