/*! HTML5 Boilerplate v9.0.1 | MIT License | https://html5boilerplate.com/ */

/* main.css 3.0.0 | MIT License | https://github.com/h5bp/main.css#readme */
/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html {
  color: #222;
  font-size: 1em;
  line-height: 1.4;
  font-family: 'Inter', sans-serif;
}

/*
 * Remove text-shadow in selection highlight:
 * https://twitter.com/miketaylr/status/12228805301
 *
 * Customize the background color to match your design.
 */

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
  display: block;
  height: 1px;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

/*
 * Remove the gap between audio, canvas, iframes,
 * images, videos and the bottom of their containers:
 * https://github.com/h5bp/html5-boilerplate/issues/440
 */

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
  resize: vertical;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Hide visually and from screen readers
 */

.hidden,
[hidden] {
  display: none !important;
}

/*
 * Hide only visually, but have it available for screen readers:
 * https://snook.ca/archives/html_and_css/hiding-content-for-accessibility
 *
 * 1. For long content, line feeds are not interpreted as spaces and small width
 *    causes content to wrap 1 word per line:
 *    https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe
 */

.visually-hidden {
  border: 0;
  clip: rect(0, 0, 0, 0);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
  /* 1 */
}

/*
 * Extends the .visually-hidden class to allow the element
 * to be focusable when navigated to via the keyboard:
 * https://www.drupal.org/node/897638
 */

.visually-hidden.focusable:active,
.visually-hidden.focusable:focus {
  clip: auto;
  height: auto;
  margin: 0;
  overflow: visible;
  position: static;
  white-space: inherit;
  width: auto;
}

/*
 * Hide visually and from screen readers, but maintain layout
 */

.invisible {
  visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * The use of `table` rather than `block` is only necessary if using
 * `::before` to contain the top-margins of child elements.
 */

.clearfix::before,
.clearfix::after {
  content: "";
  display: table;
}

.clearfix::after {
  clear: both;
}

html {
  scroll-padding-top: 10vh;
  background-color: #000;
  color: #fff;
}

body {
  margin: 0;
  padding: 0;
  min-width: 375px;
  max-width: 2400px;
  margin: 0 auto;
}

nav {
  width: 100%;
  height: 10vh;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  margin: 0;
  background-color: #000;
  color: #fff;
  box-sizing: border-box;
  position: sticky;
  top: 0;
  left: 0;
  z-index: 100;
  border: 1px solid #000;
}

nav menu {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
}

nav a {
  color: #fff;
  text-decoration: none;
  padding: 0 20px;
  font-size: 3vh;
}

nav .logo {
  height: 6vh;
}

.hero {
  width: 100%;
  display: flex;
  justify-content: left;
  align-items: center;
  background-image: url('../img/hero.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 80vh;
  color: #000;
}

h1, h2, h3, menu {
  font-family: "Ropa Sans", sans-serif;
}

.hero h1 {
  width: 30%;
  font-size: 2rem;
  text-align: left;
  padding: 0 5%;
  margin: 0;
}

section {
  padding: 2% 5%;
  box-sizing: border-box;
  font-size: 1.5rem;
}

section h2 {
  width: 100%;
}

section {
  background-color: #C4FDE8;
  color: #000;
  text-align: center;
}

section .content img {
  width: 100%;
  height: 10rem;
  margin: 1rem 0;
}

section p {
  display: block;
  width: 100%;
}

section#news .content {
  font-size: 1rem;
  text-align: left;
}

section#about {
  background-color: #5B4087;
  color: #fff;
}

section#contact {
  background-color: #EA589F;
  color: #fff;
}

section#contact a, section#footer a {
  color: #fff;
}

section#contact img {
  width: 2rem;
  height: 2rem;
  vertical-align: baseline;
  margin-left: 0.5rem;
}

section#footer {
  background-color: #333;
  color: #fff;
  font-size: 1rem;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media(max-width: 799px) {
  nav menu.active {
    display: block;
    position: absolute;
    top: 10vh;
    right: 0;
    width: 50vw;
    background-color: #000;
    z-index: 100;
  }
}

@media(min-width: 800px) {
  nav menu {
    display: flex;
  }

  nav #menu-btn {
    display: none;
  }

  .hero h1 {
    font-size: 5vw;
  }

  section {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
  }
  
  section .content {
    background-color: #fff;
    color: #000;
    width: 40%;
    border-radius: 1rem;
    padding: 0 1rem;
    margin: 1rem;
    align-self: stretch;
  }

  section .content h3 {
    margin-top: 1rem;
  }
}

@media(min-width: 1200px) {
  section .content {
    width: 27%;
  }
}

@media(min-width: 2400px) {
  nav {
    width: 100.1%;
  }

  .hero h1 {
    font-size: 7.5rem;
  }
}

/* Closure banner */
.banner {
  background-color: #5B4087;
  color: #fff;
  padding: 0.75rem 2rem;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  font-size: 1rem;
}

.banner p {
  margin: 0;
}

.banner a {
  color: #fff;
  font-weight: bold;
}

.banner button {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 0.5rem;
  line-height: 1;
}

.banner button:hover {
  opacity: 0.7;
}

.banner.hidden {
  display: none;
}