@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  color: #444;
  font-family:  sans-serif;
  line-height: 1.5;
}

p {
  margin: 2rem 0 0 0;
}

p:first-child {
  margin-top: 0;
}

ul {
  li {
    margin-top: 1rem;
    margin-left: 1.5rem;
  }

  li:first-child {
    margin-top: 0;
  }

  &.no-style {
    list-style: none;

    li {
      margin-left: 0;
    }
  }
}

hr {
  border: none;
  border-top: 1px solid #bbb;
  border-bottom: 1px solid #eee;
  width: 50%;
  max-width: 700px;
  margin: 2rem auto;
}

a:focus {
  text-decoration: underline;
}

.container {
  p.cta {
    text-align: center;
  }
}

a.cta {
  position: relative;
  overflow: hidden;

  display: inline-block;
  white-space: nowrap;
  padding: 1rem 2rem;
  margin: 1rem auto;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 1.8rem;
  font-weight: 600;
  text-decoration: none;
  text-shadow: 1px 1px 2px #000;
  color: #fff;
  border-radius: 0.75rem;
  background-color: #28a745;
  background-image: linear-gradient(120deg, #28a745 0%, #218838 100%);
  box-shadow: 0 0.375rem 1.125rem rgba(0,0,0,0.12);
  text-transform: uppercase;

  &:hover {
    background:linear-gradient(120deg, #34c759 0%, #218838 100%);
    box-shadow:0 0.375rem 1.125rem rgba(0,0,0,0.32);
    &::after {
      left: 200%;
    }
  }

  &::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.2);
    transform: skewX(-20deg);
    transition: left 0.5s;
  }

  &.alternative {
    background-color: #3757FF;
    background-image: linear-gradient(120deg, #3757FF 0%, #2b45cc 100%);

    &:hover {
      background-color: #3757FF;
      background-image: linear-gradient(120deg, #5A75FF 0%, #2b45cc 100%);
    }
  }
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; /* evita quebra de linha */
  border: 0;
}

.nowrap {
  white-space: nowrap;
}

.external-link {
  position: relative;
  transition: color 0.2s;

  &:hover {
    color: #005fa3;
  }

  &::after {
    content: "↗";
    position: absolute;
    top: -0.5rem;
    right: -1.2rem;
    width: 16px;
    height: 16px;
    font-size: 12px;
    text-align: center;
    line-height: 16px;
    background-color: #0077cc;
    color: white;
    border-radius: 3px;
    opacity: 0;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
    transform: scale(0.8);
  }

  &:hover::after {
    opacity: 1;
    transform: scale(1);
  }
}

/* ========================
   Barra fixa no topo
======================== */
.top-bar {
  color: #fff;
  position: fixed;
  border-bottom: 1px solid #222;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #555;
  color: #fff;
  text-shadow: 1px 1px 2px #333;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem;
  z-index: 1000;
}

.top-bar-text {
  font-size: 0.9rem;
}

.top-bar-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cta-button {
  background-color: #ff6600;
  background:linear-gradient(120deg, #ff6600 0%, #cc5200 100%);
  color: #fff;
  text-decoration: none;
  text-shadow: 1px 1px 2px #000;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-weight: bold;
  text-transform: uppercase;
  transition: background-color 0.3s;
  white-space: nowrap;

  &:hover, &:focus {
    background-color: #e65c00;
    background:linear-gradient(120deg, #ff6600 0%, #e65c00 100%);
    outline: none;
  }
}

.share-container {
  position: relative;
  display: inline-block;

  .share-btn-main {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #555;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;

    &:hover {
      background-color: #333;
      transform: scale(1.1);
    }

    svg {
      width: 24px;
      height: 24px;
      fill: #fff;
    }
  }

  .share-options {
    background-color: rgba(0, 0, 0, 0.3);
    border-radius: 55px;
    width: 58px;
    padding: 5px;
    position: absolute;
    top: 60px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;

    .share-btn {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 48px;
      height: 48px;
      border-radius: 50%;
      color: #fff;
      text-decoration: none;
      transition: transform 0.3s;

      &:hover {
        transform: scale(1.2);
      }

      svg {
        width: 24px;
        height: 24px;
        fill: #fff;
      }

      &.facebook { background: #4267B2; }
      &.x { background: #000000; }
      &.linkedin { background: #0077B5; }
    }
  }

  &.active {
    .share-options {
      opacity: 1;
      pointer-events: auto;
    }
  }
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

/* ========================
   Header / Hero
======================== */
.hero {
  color: #fff;
  text-shadow: 1px 1px 3px #000;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
  height: 50vh;
  background-image: url('./imgs/top-header.png');
  background-size: cover;
  background-position: top right;
  background-repeat: no-repeat;
  margin-top: 50px;
}
@supports (background-image: url('x.webp')) {
  .hero {
    background-image: url('./imgs/top-header.webp');
  }
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 90%;
  padding-left: 1rem;
}

.hero-title {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.hero-subtitle {
  font-size: 0.9rem;
  margin-top: 0.5rem;
  opacity: 0.8;
}

@supports (animation-name: fadeIn) {
  .hero-title {
    opacity: 0;
    animation: fadeIn 3s ease forwards;
  }
  .hero-subtitle {
    opacity: 0;
    animation: fadeIn 2s ease forwards;
    animation-delay: 0.5s;
  }

  @keyframes fadeIn {
    to {
      opacity: 1;
    }
  }
}

.small-title {
  font-size: 1.5rem;
}

.main-title {
  font-size: 2.5rem;
  font-weight: bold;
  margin-top: 0.2rem;
}


/* ========================
   About
======================== */
.about {
  font-size: 1.7rem;
  padding: 2rem 0;
}

/* ========================
   Args
======================== */
.arg-why {
  background-color: #EEE;
  padding: 2rem 0;
  font-size: 1.3rem;

  p.main {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: left;
  }
}

.arg-who {
  padding: 1rem 0;
  font-size: 1.3rem;

  p.main {
    margin: 3rem 0;
    font-size: 1.8rem;
    font-weight: 600;
    text-align: center;
  }

  .cards {
    display: flex;
    flex-direction: column;
    gap: 3rem;
  }

  .card {
    background-color: #fff;
    border-radius: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transform: translateY(0);

    transition: transform 0.5s ease, box-shadow 0.5s ease;

    &:hover {
      transform: translateY(-10px);
      box-shadow: 0 10px 8px rgba(0,0,0,0.1);

      transition: transform 0.15s ease-out, box-shadow 0.15s ease-out;
    }

    picture, img {
      width: 100%;
      height: auto;
      display: block;
    }

    figcaption {
      font-size: 1.5rem;
      font-weight: 600;
      line-height: 1.7;
      color: #333;
      padding: 1rem;
    }

  }

}

.arg-long {
  background-color: rgba(58,58,58,1);
  color: #fff;
  font-size: 1.2rem;
  padding: 2rem;
  margin: 2rem 0 0 0;

  p.main {
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    text-align: left;
  }

  ul {
    margin-top: 2rem;
  }
  li {
    color: #e5e5e5;

    &:hover {
      color: #fff;
    }
  }
}

.arg-modules {
  background-color: rgba(58,58,58,1);
  color: #fff;
  font-size: 1.4rem;
  padding: 2rem;

  p.main {
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
    text-align: left;
  }

  ul {
    margin-top: 2rem;
  }
  li {
    color: #e5e5e5;
    margin-top: 1rem;

    &:hover {
      color: #fff;
    }
  }

}

.arg-content {
  position: relative;
  background-image: url('./imgs/tablet.png');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 4rem 1rem;
  overflow: hidden;
  text-shadow: 0px 0px 5px #fff;

  .overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: 1;
    transition: background-color 1s ease;
  }

  .container {
    position: relative;
    z-index: 2;
    margin: 0 auto;
    text-align: left;
  }

  h2 {
    font-size: 2rem;
    font-weight: 800;
    margin: 2rem 0;
    text-align: left;
  }

  li, p {
    font-size: 1.6rem;
    margin: 3rem 0;
  }

  &:hover {
    .overlay {
      background-color: rgba(255, 255, 255, 0.9);
      transition: background-color 0.5s ease;
    }
  }
}
@supports (background-image: url('x.webp')) {
  .arg-content {
    background-image: url('./imgs/tablet.webp');
  }
}

.arg-price {
  font-size: 1.2rem;
  padding: 2rem;

  .main {
    text-align: center;
  }

  .container {
    max-width: 800px;
  }

  p.main {
    font-size: 2.5rem;
    text-transform: uppercase;

    b {
      color: #dd00dd;
    }
  }

  .price {
    transform: scale(1);
    display: inline-block;
    animation: pulse 1s ease-in-out infinite;
  }
}

/* ========================
   Author
======================== */
.author {
  background-color: #5c7e5c;
  background-image: url('./imgs/iuna-fricke-sm.png');
  background-position: top center;
  background-repeat: no-repeat;
  background-size: cover;
  color: #fff;
  text-shadow: 1px 1px 5px #000;
  padding: 4rem 0;

  h2 {
    font-size: 2.5rem;
    text-transform: uppercase;
  }

  .content {
    font-size: 1.1rem;
  }

  p {
    margin-bottom: 1rem;
  }

  a {
    color: #F5F5FF;
  }

  .heart {
    transform: scale(1);
    display: inline-block;
    transition: transform 0.2s ease;
  }

  &:hover {
    .heart {
      animation: pulse 0.6s ease-in-out infinite;
    }
  }
}
@supports (background-image: url('x.webp')) {
  .author {
    background-image: url('./imgs/iuna-fricke-sm.webp');
  }
}

/* ========================
   Info
======================== */
.info {
  font-size: 1.4rem;
  padding: 4rem 0;
  text-align: center;

  .column {
    padding: 0 3rem;
    margin-top: 3rem;
  }
}

#support:before {
  content: '';
  display: inline-block;
  background-image: url('./imgs/support.png');
  background-position: top center;
  background-repeat: no-repeat;
  background-size: cover;
  width: 200px;
  height: 72px;
}
@supports (background-image: url('x.webp')) {
  #support:before {
    background-image: url('./imgs/support.webp');
  }
}
#access:before {
  content: '';
  display: inline-block;
  background-image: url('./imgs/access.png');
  background-repeat: no-repeat;
  background-size: cover;
  width: 200px;
  height: 72px;
}
@supports (background-image: url('x.webp')) {
  #access:before {
    background-image: url('./imgs/access.webp');
  }
}

/* ========================
   Book details
======================== */
.book-details {
  background-color: #f9f9f9;
  padding: 3rem 1rem;
  color: #333;

  h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    color: #222;
    position: relative;
  }

  dl {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }

  dt {
    font-weight: 600;
    color: #555;
    padding: .2rem 0.7rem;

    &:nth-of-type(2n-1) {
      background-color: #f0f0f0;
    }
  }

  dd {
    margin: 0;
    color: #111;
    padding: .2rem 0.7rem;

    &:nth-of-type(2n-1) {
      background-color: #f0f0f0;
    }
  }
}

/* ========================
   FAQ
======================== */

.faq {
  padding: 4rem 1rem;

  .container {
    max-width: 800px;
    margin: 0 auto;
  }

  h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #333;
  }

  details {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 1rem 1.2rem;
    transition: box-shadow 0.3s ease;

    &[open] {
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);

      summary::before {
        content: "–";
      }
    }
  }

  summary {
    cursor: pointer;
    font-weight: 600;
    color: #3757ff;
    list-style: none;
    outline: none;

    &::-webkit-details-marker {
      display: none;
    }

    &::before {
      content: "+";
      color: #3757ff;
      font-weight: bold;
      margin-right: 0.5rem;
      min-width: 1rem;
      display: inline-block;
      transition: transform 0.3s ease;
    }

    &:hover, &:focus {
      text-decoration: underline;
    }
  }

  p {
    margin: 0.8rem 0 0;
    color: #555;
    line-height: 1.5;
  }
}

@supports (interpolate-size: allow-keywords) {
  ::details-content {
    interpolate-size: allow-keywords;
    transition: height 0.5s ease, content-visibility 0.5s ease allow-discrete;
    height: 0;
    overflow: clip;
  }
  [open]::details-content {
    height: auto;
  }
}

/* ========================
   Footer
======================== */
.pre-footer {
  height: 312px;
  background-image: url('./imgs/footer.png');
  background-size: cover;
  background-position: center top;
  overflow: hidden;
  margin-top: 8rem;
}
@supports (background-image: url('x.webp')) {
  .pre-footer {
    background-image: url('./imgs/footer.webp');
  }
}
footer {
  background-color: #000;
  color: #ccc;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.5rem;
  padding: 0.5rem 1rem;

  p {
    text-align: center;
  }
}

/* ========================
   Breakpoints
======================== */

/* Tablet */
@media (min-width: 600px) {

  .top-bar-buttons {
    gap: 2rem;
  }

  .hero {
    height: 65vh;
  }

  .small-title {
    font-size: 2rem;
  }

  .main-title {
    font-size: 3.5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-content {
    max-width: 80%;
    padding-left: 2rem;
  }

  .overlay {
    background-color: rgba(0, 0, 0, 0.4);
  }

  .arg-who {
    .cards {
      flex-direction: row;
      gap: 2rem;
    }
  }

  .arg-long {
    ul {
      column-count: 2;
    }
    li {
      break-inside: avoid;
    }
  }

  .arg-modules {
    background-image: url('./imgs/iuna-fricke-modules.png');
    background-position: top right;
    background-repeat: no-repeat;
    background-size: cover;
    border-width: 3px 0;
    border-color: #000;
    border-style: solid;
    color: #fff;
    font-size: 1.4rem;
    padding: 1rem;

    .container {
      padding: 0;
    }

    .content {
      background-color: rgba(58, 58, 58, 0.95);
      border: 5px solid #222;
      border-radius: 30px;
      padding: 1.5rem 2rem 2rem 2rem;
      width: 65%;
    }
  }
  @supports (background-image: url('x.webp')) {
    .arg-modules {
      background-image: url('./imgs/iuna-fricke-modules.webp');
    }
  }

  .arg-price {
    p.main {
      font-size: 4rem;
    }
  }

  .author {
    background-image: url('./imgs/iuna-fricke-sm.png');
    background-position: top center;
    background-size: cover;
  }
  @supports (background-image: url('x.webp')) {
    .author {
      background-image: url('./imgs/iuna-fricke-sm.webp');
    }
  }

  .book-details {
    dl {
      grid-template-columns: max-content 1fr;
      gap: 0.2rem;
    }
    dt {
      text-align: right;
    }
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .container {
    p {
      text-align: justify;
    }
  }

  .hero {
    height: 80vh;
  }

  .small-title {
    font-size: 2.2rem;
  }

  .main-title {
    font-size: 4.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .hero-content {
    max-width: 60%;
    padding-left: 1rem;
  }

  .overlay {
    background-color: rgba(0, 0, 0, 0);
  }

  .top-bar {
    padding: 1rem 2rem;
  }

  .top-bar-text {
    font-size: 1rem;
  }

  .cta-button {
    padding: 0.7rem 1.5rem;
    font-size: 1rem;
  }

  .info {
    .columns {
      display: flex;
      gap: 5rem;
      align-items: flex-start;
    }
    .column {
      flex: 1;
    }
    p {
      text-align: center;
    }
  }

  .arg-who {
    .cards {
      flex-direction: row;
      gap: 5rem;
    }
  }

  .arg-modules {
    padding: 6rem 1rem;

    .content {
      width: 50%;
    }
  }

  .author {
    background-image: url('./imgs/iuna-fricke.png');
    background-position: top left;
    background-size: contain;

    .content {
      padding: 0 0 0 50%;
    }
  }
  @supports (background-image: url('x.webp')) {
    .author {
      background-image: url('./imgs/iuna-fricke.webp');
    }
  }
}
