
/* RESET */

* {
    margin: 0;
    padding: 0;
}

/* VARIABLES */
:root {
    
    /* COLORS */

    /* || BACKGROUNDS */

    --BG-HEADER: hsl(245, 85%, 3%);
    --BG-BODY: hsl(0, 0%, 100%);
    --BG-BODY-DEGRADE-TOP-RIGHT: linear-gradient(to top right, hsl(219, 100%, 58%), hsl(219, 100%, 18%));
    --BG-BODY-DEGRADE-BOTTOM-LEFT: linear-gradient(to bottom left, hsl(219, 100%, 58%), #00205c);

    /* || TEXT COLORS */
    --COLOR: hsl(0, 0%, 100%);
    --COLOR-TITLE: hsl(0, 0%, 95%);
    --COLOR-HIGHLIGHT: hsl(180, 100%, 50%);
    --BG-FOOTER: hsl(245, 85%, 3%);
    --HOVER-LINK: hsl(180, 100%, 50%);

    /* BORDERS */

    --BORDER-RADIUS: 10px;
}

@media (prefers-color-scheme: dark) {
    :root {
        
        /* COLORS */

        /* || BACKGROUNDS */

        --BG-HEADER: hsl(245, 85%, 3%);
        --BG-BODY: hsl(0, 0%, 11%);
        --BG-BODY-DEGRADE-TOP-RIGHT: linear-gradient(to top right, hsl(0, 0%, 34%), #000);
        --BG-BODY-DEGRADE-BOTTOM-LEFT: linear-gradient(to bottom left, hsl(0, 0%, 34%), #000);

        /* || TEXT COLORS */
        --COLOR: hsl(0, 0%, 100%);
        --COLOR-TITLE: hsl(0, 0%, 95%);
        --COLOR-HIGHLIGHT: hsl(180, 100%, 50%);
        --BG-FOOTER: hsl(245, 85%, 3%);
        --HOVER-LINK: hsl(180, 100%, 50%);

        /* BORDERS */

        --BORDER-RADIUS: 10px;
    }
}

body {
    box-sizing: border-box;
    overflow-x: hidden;
   /*  background-color: var(--BG-BODY); */
}

/* HEADER */

header {
  background-image: var(--BG-BODY-DEGRADE-TOP-RIGHT);
  padding: 10px 40px;
}

/* MENU */

.menu {
  display: flex;
  align-items: center;
  color: var(--COLOR);
}

.logo img {
  width: 60px;
  height: auto;
}

.menu h1, a {
  display: flex;  
  font-size: 24px;
  text-decoration: none;
  color: var(--COLOR);
}

/* Hamburger style button */

.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001; /* Garante que fique por cima do menu */
  margin-left: 60px;
}

.hamburger .bar {
  width: 100%;
  height: 3px;
  background-color: hsl(0, 0%, 100%);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.hamburger.active .bar:nth-child(2) {
  opacity: 0;
}

.hamburger.active .bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Links nav */
.nav-links {
  display: flex;
  gap: 30px;
  list-style: none;
  margin-left: auto;
  font-size: 20px;
}

.nav-links li a {
  text-decoration: none;
  color: var(--COLOR);
  font-weight: 500;
  transition: color 0.3s;
}

.nav-links li a:hover {
  color: var(--HOVER-LINK);
}

/* END OF MENU SECTION */

/* SEARCH BAR */

.search-container {
  position: relative;
  margin-left: auto;
  margin-right: 30px;
}

#search-input {
  width: 300px;
  padding: 8px 15px;
  border: none;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.2);
  color: var(--COLOR);
  font-size: 14px;
  outline: none;
  transition: all 0.3s ease;
}

#search-input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

#search-input:focus {
  background-color: rgba(255, 255, 255, 0.3);
  width: 350px;
}

.search-results {
  position: absolute;
  top: 45px;
  left: 0;
  width: 100%;
  max-width: 400px;
  max-height: 400px;
  overflow-y: auto;
  background-color: rgba(0, 0, 0, 0.95);
  border-radius: var(--BORDER-RADIUS);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  display: none;
  z-index: 2000;
}

.search-results.active {
  display: block;
}

.search-result-item {
  display: block;
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--COLOR);
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.search-result-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item h4 {
  font-size: 16px;
  margin-bottom: 5px;
  color: var(--COLOR-HIGHLIGHT);
}

.search-result-item p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  margin: 0;
}

.search-no-results {
  padding: 20px;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
}

/* END OF SEARCH BAR */

/*READING TIME*/

#reading-time {
    color: var(--COLOR);
    font-size: 14px; 
    margin: 10px 0;
}

/*END OF READING TIME*/

/* || HERO SECTION */

.hero {
    display: flex;
    align-content: center;
    background-image: var(--BG-BODY-DEGRADE-BOTTOM-LEFT);
    color: var(--COLOR);
    width: 100%;
    height: 400px;
}

.hero img {
    width: 100%;
    height: 400px;
}

/* END OF HERO SECTION */

/* || CONTENT SECTION */

.post {
    /* text-align: justify; */
    max-width: 600px;
    margin-left: 24rem;
    font-size: 24px;
}

.post h2 {
    width: 100%;
    text-align: center;
    margin: 50px 0;
    font-size: 30px;
}

.content {
    display: flex;
    align-content: center;
    background-image: var(--BG-BODY-DEGRADE-BOTTOM-LEFT);
    color: var(--COLOR);
    gap: 84.32px;
}

.content-banner img {
    margin-top: 115px;
    margin-left: 30rem;
    width: 500px;
    height: 500px;
    border-radius: var(--BORDER-RADIUS);
}

.content-banner h3 {
    position: absolute;
    margin-left: 35rem;
    margin-top: 22rem;  
}   

.content-list {
    margin-top: 115px;
    /* margin-left: 73.42rem; */
    gap: 10px;
}

.content-list img {
    width: 296px;
    height: 147px;
    border-radius: var(--BORDER-RADIUS);
    justify-items: center;
}

.content-list h3 a {
    margin-bottom: 10px;
    font-size: 24px;
    width: 296px;
}
.content-list p a {
    margin-bottom: 30px;
    font-size: 16px;
    max-width: 296px;
}

.content-list:first-child {
    margin-top: 70px;
}

.content-list:last-child {
    margin-bottom: 30px;
}

.content1 {
    font-size: 25px;
    margin-left: 55px;
    position: absolute;
    margin-top: 55px;
    z-index: 10;           
}

.content2 {
    font-size: 25px;
    margin-left: 125px;
    position: absolute;
    margin-top: 55px;
    z-index: 10;            
}

.content3 {
    font-size: 25px;
    margin-left: 120px;
    position: absolute;
    margin-top: 55px;
    z-index: 10;            
}

.content4 {
    font-size: 25px;
    margin-left: 120px;
    position: absolute;
    margin-top: 55px;
    z-index: 10;            
}

.contentIten1 {
    transition-duration: 0.4s;
}
.contentIten2 {
    transition-duration: 0.4s;
}
.contentIten3 {
    transition-duration: 0.4s;
}
.contentIten4 {
    transition-duration: 0.4s;
}

.contentIten1:hover {
    /* transform: translateY(-5px); */
    filter: brightness(130%) contrast(100%) saturate(100%);
}
.contentIten2:hover {
    /* transform: translateY(-5px); */
    filter: brightness(130%) contrast(100%) saturate(100%);
}
.contentIten3:hover {
    /* transform: translateY(-5px); */
    filter: brightness(130%) contrast(100%) saturate(100%);
}
.contentIten4:hover {
    /* transform: translateY(-5px); */
    filter: brightness(130%) contrast(100%) saturate(100%);
}

/* END OF CONTENT SECTION */

.content-section-2 {
    display: flex;
    gap: 200px;
    background-image: var(--BG-BODY-DEGRADE-TOP-RIGHT);
    color: var(--COLOR);
}

.content-section-2img1 img {
    width: 500px;
    height: 500px;
    margin-top: 50px;
    margin-left: 10.02rem; 
    border-radius: var(--BORDER-RADIUS);
}

.content-section-2img2 img {
    width: 500px;
    height: 500px;
    margin-top: 50px;
    border-radius: var(--BORDER-RADIUS);
}

.content-section-2 h3 {
    width: 500px;
    text-decoration: none;
    margin-bottom: 10px;
}

.content-section-2img1 h3 {
    margin-left: 10.02rem;
}

.content-section-2 p {
    width: 246px;
    text-decoration: none;
    margin-bottom: 10px;
}

.content-section-2img1 p {
    text-decoration: none;
    margin-left: 10.02rem;
}

.keepReading {
    font-size: 15px;
}

.content-section-3 {
    display: flex;
    gap: 9.75rem;
    background-image: var(--BG-BODY-DEGRADE-TOP-RIGHT);
    color: var(--COLOR);
}

.content-section-3img1 img {
    width: 296px;
    height: 147px;
    margin-top: 100px;
    margin-left: 10.02rem;
    border-radius: var(--BORDER-RADIUS);
}

.content-section-3img2 img {
    width: 296px;
    height: 147px;
    margin-top: 100px;
    border-radius: var(--BORDER-RADIUS);
}
.content-section-3img3 img {
    width: 296px;
    height: 147px;
    margin-top: 100px;
    border-radius: var(--BORDER-RADIUS);
}

.content-section-3 h3 {
    width: 296px;
    text-decoration: none;
    margin-bottom: 10px;
}

.content-section-3img1 h3 {
    text-decoration: none;
    margin-left: 10.02rem;
}

.content-section-3 p {
    width: 246px;
    text-decoration: none;
    margin-bottom: 10px;
}

.content-section-3img1 p {
    text-decoration: none;
    margin-left: 10.02rem;
}

/* || VISUAL RESOURCES */

.social-media {
    background-image: var(--BG-BODY-DEGRADE-TOP-RIGHT);
}

.social-icons {
    display: flex;
    gap: 16px;
    margin-left: 1159.4px;
}

.social-icons img {
    width: 40px;
    height: 40px;
    margin-bottom: 20px
}

.social-icons img:hover {
    transform: translateY(-5px);
}

/* END OF VISUAL RESOUCES */

/* || FOOTER SECTION */

.contact h3 {
    margin-left: 1159.4px;
    color: var(--COLOR);
}

.contact p {
    margin-left: 1159.4px;
    text-align: unset;
    color: var(--COLOR);
}

footer {
    background-image: var(--BG-BODY-DEGRADE-TOP-RIGHT);
}

footer h2 {
    font-size: 20px;
    padding-top: 50px;
    margin-bottom: 20px;
    color: var(--COLOR);
    margin-left: 1159.4px;
}

footer p {
    text-align: center;
    color: var(--COLOR);
    padding-bottom: 20px;
}

/* END OF FOOTER SECTION */


/* || MOBILE SECTION */

@media (max-width: 600px) {

    /* || HEADER MOBILE SECTION */

    header {
        padding-bottom: 70px; /* Cria espaço extra embaixo para a barra */
        position: relative;   /* Garante o posicionamento correto */
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        margin-top: 300px;
        right: -100%;
        background: rgba(0, 0, 0, 0.95);;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 200px;
        height: 100vh;
        transition: transform 0.3s ease;
        z-index: 1000;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links li {
        margin: 10px 0;
    }

    .nav-links a {
        color: white;
        font-size: 18px;
        text-decoration: none;
    }

    /* SEARCH BAR MOBILE */

    /* SUBSTITUA O .SEARCH-CONTAINER ANTERIOR POR ESTE */
    .search-container {
        display: block;
        position: absolute;
        bottom: 15px; /* Fixa a barra na parte inferior do cabeçalho */
        left: 50%;
        transform: translateX(-50%);
        width: 90%;
        max-width: 350px;
        z-index: 999;
    }

    #search-input {
        width: 75%; /* Ocupa todo o espaço container definido acima */
    }

    #search-input:focus {
        width: 75%; /* Mantém a largura fixa ao clicar */
    }

    /* END OF SEARCH BAR MOBILE */

    /* END OF HEADER MOBILE SECTION */

    /* || HERO MOBILE SECTION */

    .hero {
        flex-direction: column;
        height: 250px;
    }

    .hero img {
        height: 250px;
        object-fit: cover;
    }

    /* END OF HERO MOBILE SECTION */

    /* || POST MOBILE SECTION */

    .post {
        max-width: 100%;
        margin-left: 0;
        font-size: 20px;
    }

    .post h2 {
        margin: 10px 0 20px 0;
        font-size: 25px;
    }

    /* END OF POST MOBILE SECTION */

    /* || CONTENT MOBILE SECTION */

    .content {
        flex-direction: column;
        padding: 40px;
        gap: 20px;
        align-items: center;
    }

    .content-banner {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .content-banner img {
        width: 100%;
        max-width: 350px;
        height: auto;
        margin-top: 20px;
        margin-left: 0;
    }

    .content-banner h3 {
        position: static;
        margin: 15px 0;
        text-align: center;
        font-size: 20px;
    }

    .content-list {
        width: 100%;
        margin-top: 20px;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 25px;
        padding: 0;
    }

    .content-list img {
        width: 100%;
        max-width: 350px;
        height: auto;
        margin-top: 0;
    }

    .content-list h3 a {
        /* font-size: 18px; */
        display: block;
        margin-top: 10px;
        /* text-align: center; */
    }

    .content-list p a {
        font-size: 20px;
        max-width: 100%;
        display: block;
        /* text-align: center; */
    }

    .content-list:first-child {
        margin-top: 0;
    }

    .content1,
    .content2,
    .content3,
    .content4 {
        position: static;
        margin: 10px 0;
        font-size: 18px;
        text-align: center;
    }

    /* END OF CONTENT MOBILE SECTION */

    /* || CONTENT SECTION 2 MOBILE */

    .content-section-2 {
        flex-direction: column;
        gap: 30px;
        padding: 30px 20px;
        align-items: center;
    }

    .content-section-2 p {
        font-size: 20px;
    }

    .content-section-2img1,
    .content-section-2img2 {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .content-section-2img1 img,
    .content-section-2img2 img {
        width: 100%;
        max-width: 350px;
        height: auto;
        margin-top: 0;
        margin-left: 0;
    }

    .content-section-2 h3 {
        width: 100%;
        max-width: 350px;
        /* text-align: center; */
        margin: 15px 0 10px 0;
        font-size: 20px;
    }

    .content-section-2img1 h3 {
        margin-left: 0;
    }

    .content-section-2 p {
        width: 100%;
        max-width: 350px;
        /* text-align: center; */
        margin-bottom: 10px;
    }

    .content-section-2img1 p {
        margin-left: 0;
    }

    /* END OF CONTENT SECTION 2 MOBILE */

    /* || CONTENT SECTION 3 MOBILE */

    .content-section-3 {
        flex-direction: column;
        gap: 30px;
        padding: 30px 20px;
        align-items: center;
    }

    .content-section-3img1,
    .content-section-3img2,
    .content-section-3img3 {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .content-section-3img1 img,
    .content-section-3img2 img,
    .content-section-3img3 img {
        width: 100%;
        max-width: 350px;
        height: auto;
        margin-top: 0;
        margin-left: 0;
    }

    .content-section-3 h3 {
        width: 100%;
        max-width: 350px;
        /* text-align: center; */
        margin: 15px 0 10px 0;
        font-size: 18px;
    }

    .content-section-3img1 h3 {
        margin-left: 0;
    }

    .content-section-3 p {
        width: 100%;
        max-width: 350px;
        /* text-align: center; */
        margin-bottom: 10px;
        font-size: 20px;
    }

    .content-section-3img1 p {
        margin-left: 0;
    }

    /* END OF CONTENT SECTION 3 MOBILE */

    /* || VISUAL MOBILE SECTION RESOURCES */

    .social-media {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 30px 20px;
    }

    .social-icons {
        margin-left: 0;
        justify-content: center;
        order: 2;
    }

   /*  END OF MOBILE SECTION RESOURCES */

    /* || FOOTER MOBILE SECTION */

    .contact {
        order: 1;
        margin-bottom: 20px;
        padding: 0 20px;
    }

    .contact h3,
    .contact p,
    footer h2 {
        margin-left: 0;
        text-align: center;
    }

    footer {
        padding: 20px 10px;
    }

    footer p {
        text-align: center;
        padding-top: 20px;
    }

    /* END OF FOOTER MOBILE SECTION */
}