/* 
// ╔╗ ╔═╗╔╗╔╔╦╗╔═╗
// ╠╩╗║╣ ║║║ ║ ║ ║
// ╚═╝╚═╝╝╚╝ ╩ ╚═╝ 
*/

/* V A R I A B L E S */

@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;700&display=swap');

:root {
  --fg-primary: 5rem;
  --fg-secondary: 1.3rem;
  --fg-date: 3rem;
  --fg-list: 1rem;
  --icon: 1.8rem;

  --fg: #3a3a3a;
  --sfg: #494949;

  --accent: #57a0d9;
  --background: #f5f5f5;
  --cards: #e4e6e6;

  --imgbg: url(assets/background.jpg);
  --imgcol: linear-gradient(
    rgba(255, 255, 255, 0.7),
    rgba(255, 255, 255, 0.7)
  );
}

.darktheme {
  --accent: #57a0d9;
  --background: #19171a;
  --cards: #201e21;

  --fg: #d8dee9;
  --sfg: #2c292e;

  --imgcol: linear-gradient(
    rgba(0, 0, 0, 0.85),
    rgba(0, 0, 0, 0.85)
  );
}

/* S T Y L E S */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Open Sans', sans-serif;
  transition: 0.2s ease-in-out;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  width: 100vw;
  min-height: 100vh;

  background-color: var(--background);

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

  overflow-x: hidden;
  overflow-y: auto;
}

.notransition {
  transition: none;
}

.withImageBackground {
  background-image: var(--imgcol), var(--imgbg);
  background-size: cover;
  background-position: center;
}

#themeButton {
  position: absolute;
  margin: 2em 2em 0 0;
  right: 0;
  top: 0;
  color: var(--fg);
  border: none;
  cursor: pointer;
  background-color: transparent;
}

#themeIcon {
  width: 25px;
  height: 25px;
}

.container {
  width: min(1400px, 95vw);
  min-height: min(900px, 95vh);

  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto;

  gap: 30px;
  padding: 20px;
}

.card {
  background-color: var(--cards);
  box-shadow: 0 5px 7px rgba(0, 0, 0, 0.35);
  border-radius: 10px;
}

.card:hover {
  transform: translateY(-0.2rem);
  box-shadow: 0 10px 10px rgba(0, 0, 0, 0.35);
}

/* TIME */

.timeBlock {
  grid-row: 1;
  grid-column: 1 / span 2;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* WEATHER */

.weatherBlock {
  grid-column: 3 / span 2;
  grid-row: 1;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* DATE */

.date {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 30px;
}

.clock {
  display: flex;
  align-items: center;
  justify-content: center;
}

#hour,
#separator,
#minutes {
  font-size: var(--fg-primary);
  font-weight: bolder;
  color: var(--fg);
}

#month,
#day {
  font-size: var(--fg-date);
  font-weight: bold;
  color: var(--fg);
}

#day {
  margin-left: 1.5rem;
}

#greetings {
  font-size: var(--fg-secondary);
  color: var(--fg);
  margin-top: 1rem;
}

/* WEATHER */

.weather {
  display: flex;
  align-items: center;
  justify-content: center;
}

.weatherIcon img {
  width: 70px;
  height: 70px;
}

.weatherValue p {
  font-size: var(--fg-secondary);
  font-weight: bolder;
  margin-left: 15px;
  color: var(--fg);
}

.weatherDescription p {
  font-size: var(--fg-secondary);
  margin-left: 15px;
  color: var(--fg);
}

/* HELPERS */

.reduceGap {
  gap: 2rem !important;
}

.removeGap {
  gap: 0 !important;
}

/* LINKS BLOCK */

.linksBlock {
  grid-row: 2;
  grid-column: 1 / span 4;

  display: grid;
  grid-template-columns: repeat(4, 1fr);

  gap: 1.5rem;

  align-items: start;
}

.linksBlockLeft {
  grid-column: 1 / span 2;

  height: fit-content;
  min-height: 100%;
}

.linksBlockRight {
  grid-column: 3 / span 2;

  height: fit-content;
  min-height: 100%;
}

/* BUTTONS */

.buttonsContainer {
  width: 100%;
  min-height: 100%;

  display: grid;

  grid-template-columns: repeat(3, minmax(160px, 1fr));

  grid-auto-rows: 140px;

  gap: 30px;
  padding: 20px;

  justify-content: center;
  align-content: start;
}

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

  width: 100%;
  height: 100%;
}

.buttonIcon {
  width: var(--icon);
  height: var(--icon);
  color: var(--fg);
}

.custom-icon {
  width: var(--icon);
  height: var(--icon);
  object-fit: contain;
}

.darktheme .custom-icon {
  filter: invert(1);
}

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

.button:hover svg {
  stroke: var(--sfg);
}

/* LISTS */

.listsContainer {
  width: 100%;
  height: 100%;

  display: grid;

  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);

  gap: 3rem;

  padding: 0.4rem;
}

.list {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.list__1 {
  grid-column: 1;
  grid-row: 1 / span 2;
}

.list__2 {
  grid-column: 2;
  grid-row: 1 / span 2;
}

.listIcon {
  margin-bottom: 2vh;
  color: var(--fg);

  width: var(--icon);
  height: var(--icon);
}

.listItem {
  text-decoration: none;
  font-size: var(--fg-list);
  color: var(--fg);

  margin-top: 1vh;

  padding: 8px 12px;

  border-radius: 5px;

  font-weight: bold;
  text-align: center;

  width: 80%;
}

.listItem:hover {
  background-color: var(--accent);
  color: var(--sfg);
}

/* MEDIA QUERIES */

@media only screen and (max-width: 68.75em) {
  .container {
    gap: 20px;
    padding: 20px;
  }

  .timeBlock {
    grid-column: 1 / span 4;
  }

  .weatherBlock {
    display: none;
  }

  .linksBlockRight {
    display: none;
  }

  .linksBlockLeft {
    grid-column: 1 / span 4;
  }

  .buttonsContainer {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .button {
    padding-left: 40px;
    padding-right: 40px;
  }
}

@media only screen and (max-width: 40em) {
  .buttonsContainer {
    grid-template-columns: 1fr;
  }

  #hour,
  #separator,
  #minutes {
    font-size: 3.5rem;
  }

  #month,
  #day {
    font-size: 2rem;
  }
}
