/* GLOBAL STYLES */
/* Normalizer */
@import "node_modules/modern-normalize/modern-normalize.css";
*,
p,
h1,
h2,
h3,
h4,
h5,
h6,
address {
  margin: 0;
  margin-block-end: 0;
  margin-inline-end: 0;
  margin-block-start: 0;
  margin-inline-start: 0;
  padding: 0;
}
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
/* SVG sprite class - INACTIVE */
/* .icon {
  width: 50px;
  height: 50px;
  margin: 0.5em;
}
.hidden path {
  display: none;
} */
/* Variables */
:root {
  /* Brand colors */
  --brand-blue: #2196f3;
  --brand-gray: #2f303a;

  /* Font colors */
  --text-default: #212121;
  --text-secondary: #757575;
  --text-white: #fff;
  --text-black: #000;

  /* SVG fill colors */
  --svg-inactive: #afb1b8;

  /* Background colors */
  --background-white: #fff;
  --background-primary: #e5e5e5;
  --background-secondary: #f5f4fa;

  /* Transitions */
  --transition-default: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Body defaults */
body {
  color: var(--text-default);
  font-family: "Roboto", sans-serif, serif;
}

/* Reusables */
.font__size--14 {
  font-size: 14px;
}
.font__size--16 {
  font-size: 16px;
}
.font__size--18 {
  font-size: 18px;
}
.font__size--32 {
  font-size: 32px;
}

.font__weight--500 {
  font-weight: 500;
}
.font__weight--700 {
  font-weight: 700;
}
.font__weight--900 {
  font-weight: 900;
}

.font__color--default {
  color: var(--text-default);
}
.font__color--secondary {
  color: var(--text-secondary);
}
.font__color--white {
  color: var(--text-white);
}
.font__color--brand-blue {
  color: var(--brand-blue);
}

/* Logo */
.logo,
.logo:active,
.logo:visited {
  font-size: 26px;
  line-height: 1;
  font-family: "Raleway", sans-serif, serif;
  text-decoration: none;
  color: var(--text-black);
}
.logo--light,
.logo--light:active,
.logo--light:visited {
  color: var(--text-white);
}
.logo--blue,
.logo--blue:active,
.logo--blue:visited {
  color: var(--brand-blue);
}

/* Flex Containers */
.container {
  display: flex;
  flex-direction: column;
  align-content: center;
  justify-content: center;
  flex-wrap: wrap;

  width: 100%;
  min-width: 1200px;
  height: 100%;

  margin: 0;
}

.section {
  display: flex;
  max-width: 1600px;

  padding: 94px 0 94px 0;

  margin: 0;
}
.section--top {
  display: flex;
  max-width: 1600px;

  padding: 94px 0 0 0;

  margin: 0;
}

/* Header */
.header {
  max-width: 1600px;

  display: flex;
  align-items: center;
  justify-content: center;

  background-color: var(--background-white);

  padding: 24px 0 24px 0;

  border-bottom: 1px solid #ececec;

  margin-right: 10px;
}

.header__navigation {
  list-style: none;

  display: flex;
  align-items: center;

  gap: 0 50px;

  margin: 0 330px 0 94px;
}
.header__contacts {
  list-style: none;

  display: flex;
  align-items: center;

  gap: 0 40px;
}

.header__navigation__element a,
.header__navigation__element:active,
.header__navigation__element:visited {
  cursor: pointer;

  position: relative;

  color: var(--text-default);
  line-height: 1;

  text-decoration: none;
}

/* Underline effect */

/* underline effect on hover only - inactive */
/* .header__navigation__element:hover .header__navigation__underline {
  display: block;
}*/
.header__navigation__element--active a,
.header__navigation__element--active a:visited {
  color: var(--brand-blue);
}
.header__navigation__element--active ::after {
  pointer-events: none;

  position: absolute;
  top: 41.8px;

  display: block;
  content: "";
  width: 100%;
  height: 4px;

  background-color: var(--brand-blue);

  border-radius: 2px;
}

.header__navigation__element a:hover,
.header__navigation__element a:focus,
.contacts:hover,
.contacts:focus {
  color: var(--brand-blue);
}

/* Footer */
.footer {
  max-width: 1600px;

  display: flex;

  background-color: var(--brand-gray);
}

.footer__header {
  width: 100%;

  align-self: end;
}

.footer__wrapper-1 {
  display: flex;
  flex-direction: column;

  row-gap: 12px;

  margin: 60px 0 60px 215px;
}
.footer__wrapper-1 .logo {
  margin-bottom: 16px;
}

.footer__wrapper-2 {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;

  margin: 60px 0 60px 94px;
}

.footer__social-links {
  display: flex;

  justify-content: center;
  align-items: center;
  gap: 10px;
}

.footer__social-links svg {
  overflow: visible;
  color: var(--text-white);

  background: #ffffff1a;

  padding: 12px;
  border-radius: 100%;
}

.footer__social-links svg:hover,
.footer-links svg:focus {
  background-color: var(--brand-blue);
  color: var(--background-white);
}

/* Contacts */
.contacts {
  display: flex;

  cursor: pointer;
  line-height: 1;
  text-decoration: none;
}
.contacts svg {
  margin-right: 10px;
}
.contacts__address {
  color: var(--text-white);
  font-style: normal;
  line-height: 1;
}

/* INDEX.HTML */
.main {
  max-width: 1600px;
}
/* Hero Section */
.main__hero-section {
  width: 1600px;
  height: 100%;

  text-align: center;

  background: url(../images/hero-background.jpg) var(--brand-gray);
  color: var(--text-white);
}

.main__hero-section__container {
  display: flex;
  flex-direction: column;

  align-items: center;
  justify-content: center;

  gap: 30px 0;

  /* hero-section gradient filter */
  background: #2f3030;
  background: -moz-linear-gradient(138deg, #2f303066 0%, #2f303065 100%);
  background: -webkit-linear-gradient(138deg, #2f303066 0%, #2f303065 100%);
  background: linear-gradient(138deg, #2f303066 0%, #2f303065 100%);
  filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#2f3030",endColorstr="#2f3030",GradientType=1);
}

.main__hero-section__heading {
  font-size: 44px;
  line-height: 1.4;

  margin: 200px 0 0 0;
}
.main__hero-section__button,
.main__hero-section__button:active {
  cursor: pointer;
  background-color: var(--brand-blue);
  color: var(--text-white);
  line-height: 1.9;

  padding: 10px 20px;

  border-radius: 4px;
  border: none;

  margin: 0 0 200px 0;
}
.main__hero-section__button:hover,
.main__hero-section__button:focus {
  background-color: #1489e9;
  box-shadow: 0px 3px 1px #0000001a, 0px 1px 2px #00000014,
    0px 2px 2px #0000001f;
}

/* Why us */
.main__why-us {
  display: flex;
  justify-content: center;

  gap: 30px;

  background-color: var(--background-white);
}
.main__why-us__element {
  max-width: 270px;
}
.main__why-us__element svg {
  max-width: 270px;

  background-color: var(--background-secondary);

  padding: 25px 100px;
}
.main__why-us__element__heading {
  line-height: 1;

  margin: 30px 0 10px 0;
}
.main__why-us__element__paragraph {
  text-align: left;

  line-height: 1.5;
}

/* What we do */
.main__what-we-do {
  display: flex;
  flex-wrap: wrap;

  align-items: center;
  justify-content: center;
  flex-direction: row;

  gap: 50px 30px;

  background-color: var(--background-white);
}

.main__what-we-do__heading {
  width: 100%; /* width so elements wrap under the heading */

  text-align: center;
  line-height: 1.5;
}

.main__what-we-do__figure {
  position: relative;
}
.main__what-we-do__figure__caption {
  position: absolute;
  bottom: 4px;
  text-align: center;

  width: 100%;

  background: #2f303acc;

  padding: 27px 0;
}

/* Our team */
.main__our-team {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;

  align-items: center;
  justify-content: center;

  gap: 50px 30px;

  text-align: center;

  background-color: var(--background-secondary);
}
.main__our-team__heading {
  width: 100%; /* width so elements wrap under the heading */

  line-height: 1.5;
}
.main__our-team__figure {
  background-color: var(--background-white);
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.12), 0px 1px 1px rgba(0, 0, 0, 0.14),
    0px 2px 1px rgba(0, 0, 0, 0.2);
  border-radius: 0px 0px 4px 4px;
}

.main__our-team__figure__caption {
  line-height: 2;
  margin: 30px 0;
}

.main__our-team__figure__caption__social-links {
  display: flex;

  justify-content: center;
  align-items: center;
  gap: 10px;

  color: var(--svg-inactive);

  margin-top: 12px;
}

.main__our-team__figure__caption__social-links svg {
  color: var(--svg-inactive);
  padding: 12px;
  overflow: visible;
}

.main__our-team__figure__caption__social-links a:hover svg,
.main__our-team__figure__caption__social-links a:focus svg {
  background-color: var(--brand-blue);
  color: var(--background-white);
  border-radius: 100%;
}

/* Regular Customers */
.main__regular-customers {
  display: flex;
  flex-wrap: wrap;

  justify-content: center;
  align-items: center;

  gap: 50px 30px;
}

.main__regular-customers__heading {
  width: 100%;

  text-align: center;
}

.main__regular-customers__element,
.main__regular-customers__element:active {
  display: flex;

  justify-content: center;
  align-items: center;

  width: 170px;
  height: 92px;

  color: var(--svg-inactive);

  border: 1px solid var(--svg-inactive);
  border-radius: 4px;
}

.main__regular-customers__element:hover,
.main__regular-customers__element:focus {
  color: var(--brand-blue);

  border: 1px solid var(--brand-blue);
}

/* MODAL(s) */
/* Global */
div.is-hidden {
  display: none;
}
.modal__container {
  transition: backround-color var(--transition-default);

  position: fixed;
  top: 0;

  display: flex;

  justify-content: center;

  width: 100vw;
  height: 100vh;

  background-color: #00000033;
}

/* Request a service */
.modal__request-a-service {
  width: 528px;
  height: 581px;

  background-color: var(--background-white);

  margin-top: 221px;

  padding: 8px;

  border-radius: 4px;
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.12), 0px 1px 1px rgba(0, 0, 0, 0.14),
    0px 2px 1px rgba(0, 0, 0, 0.2);
}

.modal__request-a-service__button {
  float: right;
  cursor: pointer;

  width: 30px;
  height: 30px;

  background-color: var(--background-white);
  font-size: 22px;
  color: var(--text-black);

  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 30px;
}
.modal__request-a-service__button:hover,
.modal__request-a-service__button:focus {
  background-color: var(--brand-blue);
  color: var(--text-white);

  border: none;
}

/* PORTFOLIO.HTML */
/* Our Products */
.main__our-products {
  display: flex;
  flex-direction: column;
}
/* Filters */
.main__filters {
  margin-bottom: 50px;
}
.main__filters ul:first-child {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
}
.main__filters__button,
.main__filters__button:active {
  cursor: pointer;
  background-color: var(--background-secondary);
  line-height: 1.6;

  background-color: var(--background-secondary);

  padding: 6px 22px;

  border: none;
  border-radius: 4px;
}
.main__filters ul {
  gap: 8px;
}
.main__filters__button:hover,
.main__filters__button:focus {
  background-color: var(--brand-blue);
  color: var(--text-white);
  box-shadow: 0px 3px 1px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.08),
    0px 2px 2px rgba(0, 0, 0, 0.12);
}

/* Listings */
.main__listings {
  display: flex;
  flex-wrap: wrap;
  width: 80%;
  flex-basis: calc(100% / 3);

  align-self: center;
  justify-content: center;

  gap: 30px;

  background-color: var(--background-white);
}

.main__listings__element,
.main__listings__element:active,
.main__listings__element:visited {
  color: var(--text-default);
  text-decoration: none;

  box-shadow: 0px 1px 1px transparent, 0px 4px 4px transparent,
    1px 4px 6px transparent; /* adding invisible borders so size is consistent on hover */
}

.main__listings__element:hover,
.main__listings__element:focus {
  background: var(--background-white);
  box-shadow: 0px 1px 1px #0000001f, 0px 4px 4px #0000000f,
    1px 4px 6px #00000029;
}

.main__listings__element__figure {
  /* border: 1px solid #eee; Setting an inset border with box-shadow instead */
  height: 100%;

  -webkit-box-shadow: inset 0px 0px 0px 1px #eee;
  -moz-box-shadow: inset 0px 0px 0px 1px #eee;
  box-shadow: inset 0px 0px 0px 1px #eee;
}

.main__listings__element__figure__overlay-container {
  position: relative;
  overflow-y: clip;

  text-align: left;
  letter-spacing: 0.03em;

  height: 295px;
}

.main__listings__element__figure__overlay-container img {
  border: 1px solid #eee;
  border-bottom: none;
}

.main__listings__element__figure__overlay {
  transition: top var(--transition-default);

  position: absolute;
  top: 100%;

  width: 100%;
  height: 100%;

  background: #2196f3e6;
}
.main__listings__element__figure:hover
  .main__listings__element__figure__overlay,
.main__listings__element__figure:focus
  .main__listings__element__figure__overlay {
  top: 0;
  height: 100%;
}

.main__listings__element__figure__overlay p {
  line-height: 1.6;
  padding: 63px 24px 0 24px;
}

.main__listings__element__figure figcaption {
  margin: 20px 24px;
}
.main__listings__element__figure figcaption strong {
  margin-bottom: 4px;
}

.main__listings__element__figure__heading {
  line-height: 2.25;
}

.main__listings__element__figure__paragraph {
  line-height: 1.9;
}
