/* Google fonts import */
@import url('https://fonts.googleapis.com/css2?family=Lato:ital,wght@0,100;0,300;0,400;0,700;0,900;1,100;1,300;1,400;1,700;1,900&family=Oswald:wght@200..700&display=swap');

/* Asterisk wilcard selector to ovverride default styles added by the browser */
* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

/* General styles */
body{
    background-color: white;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    /* Generic project styles */
    color: #ffffff;
    font-family: "Segoe UI", sans-serif;
}

 /* Header */
header {
    background-color: beige;
    padding: 0 1rem;
    display: flex;
    position: fixed;
    width: 100%;
    justify-content: space-between;
    align-items: baseline;
    z-index: 99;
}

header a {
     text-decoration: none;
}

#logo {
    text-transform: uppercase;
    color: blueviolet;
}

.nav-links {
    list-style-type: none;
    font-size: 110%;
    gap: 0.5rem;
}

.nav-links > li {
    margin-bottom: 1em;
}

.active {
    border-bottom: 1px solid;
}

/* Navbar styles with dropdown toggle */
nav {
    position: absolute;
    background-color: beige;
    width: 100%;
    left: 0;
    padding: 0 1rem;
    display: none;
    top: 100%;
}

/* Nav toggle */
#nav-toggle:checked~nav {
    display: block;
}

#nav-toggle {
    display: none;
}

.nav-toggle-label {
    font-size: 2rem;
    color: blueviolet;
}


.nav-links a {
    text-decoration: none;
    transition: color 0.3s;
    font-size: 1rem;
}

.nav-links a:hover {
    color: #c084fc;
}

hr {
    box-shadow: 0 2px 4px #3a3a3a;
}

/* Main content*/
main {
    background: linear-gradient(to bottom right, #3c2a87 , #1c1c2b);
    padding: 2rem 1rem;
    text-align: center;
    /* Make main element take up any surplus space to push footer down */
    flex: 1 0 auto;
    margin-top: 47px;
}

/* Hero section */
#hero {
    height: 60vh; /* dynamic height: 60% of viewport height */
    min-height: 400px;
    width: 100%;
    background: url("../images/pexels-alana-sousa-1723789-6707830.jpg") no-repeat center center/cover;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 5%;
}


/* Hero section */

.intro h2 {
    font-size: clamp(1.5rem, 4vw, 2rem); /* Flexible between 1.5rem and 2rem */
    margin: 2rem auto 1rem;
    color: #c084fc;
}

.intro {
    text-align: center;
    padding: 2rem 1rem;
}

.intro p {
    font-size: clamp(0.9rem, 3vw, 1.1rem);
    max-width: 90%;
    margin: 0 auto 1.5rem;
    line-height: 1.5;
}

.cta-button {
    background-color: #c084fc;
    color: #1c1c2b;
    padding: 0.1rem 0.1rem;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.3s;
}

.cta-button:hover {
    background-color: #a35eea;
}

/* Reasons section */

#reasons {
    color: #1c1c2b;
    position: relative;
    overflow: hidden;
    height: 100%;
    width: 100%;
    z-index: 1;
}

#reasons::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url("../images/pexels-n-voitkevich-5426075.jpg") no-repeat center center/cover fixed;
    filter: blur(8px);
    z-index: -1;
    transform: scale(1.05); /* prevents edges from showing */
}

.reasons {
    width: 90%;
    margin: 20px auto;
}

.reasons h2 {
    margin-bottom: 20px;
    text-align: center;
    font-size: 280%;
}

#benefits-social > div,
#benefits-professional > div,
#meetups > div > div {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 8px;
}

#meetups dl {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  padding: 1rem;
}

#meetups dl div {
  background-color: rgba(255, 255, 255, 0.8);
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#meetups dt {
  font-weight: bold;
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
  color: #1c1c2b;
}

#meetups dd {
  margin-left: 0;
  font-size: 1rem;
  color: #333;
}

#benefits-social>div,
#benefits-professional>div {
    line-height: 20px;
    margin-bottom: 20px;
}

#benefits p {
    padding: 0 20px;
}

#benefits hr {
    border-top: 1px solid #3a3a3a;
    margin: 5px 0;
}

#meetups h2 {
    margin: 0 auto 1.5rem;
}

.join {
    margin: 1.5rem auto;
}

/* Sign up section */

main {
    /* Make main element take up any surplus space to push footer down */
    flex: 1 0 auto;
    /* Add margin at the top to prevent content from being covered by the header */
    margin-top: 47px;
    /* Enable flex properties for child elements */
    display: flex;
    flex-direction: column;
}

/* Form */
#signup {
    background-image: url("../images/pexels-ryan-thomas-307183342-29945022.jpg");
    background-size: cover;
    background-position: 50%;
    flex-grow: 1;
    padding: 20px 10% 0 10%;
}

#signup-form {
    color: #ffffff;
    background-color: rgba(60, 60, 60, 0.9);
    padding: 30px;
}

.text-input {
    background: transparent;
    color: #fafafa;
    width: 100%;
    height: 25px;
    margin: 5px 0 20px 0;
    border: 1px solid #fafafa;
    border-radius: 2px;
    padding: 0 5px;
}

.radio-buttons {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.join-button {
    margin-top: 20px;
    border-radius: 10px;
    padding: 15px 32px;
    font-size: 100%;
    background-color: #1c1c2b;
    color: #fafafa;
}


/* Footer */
footer {
    background-color: #1c1c2b;
}

#social-media {
    text-align: center;
    padding: 20px 0;
    display: flex;
    justify-content: space-evenly;
    list-style-type: none;
}

#social-media i {
    font-size: 150%;
    padding: 5%;  
    color: whitesmoke;
}

.footer p {
    font-size: 0.75rem;
    text-align: center;
    padding: 1rem;
    margin: 0 auto;
    max-width: 90%;
    line-height: 1.5;
}

/* Media query: tablets and larger (768px and up) */
@media screen and (min-width: 768px) {
    /* Header */
    nav {
        display: block;
        position: relative;
        box-shadow: none;
        width: fit-content;
        padding-right: 1rem;
    }

    .nav-links {
        display: flex;
    }

    .nav-links > li {
        padding-left: 1rem;
    }

    .nav-toggle-label {
        display: none;
    }

    #logo {
        font-size: 280%;
        line-height: 75px;
        margin: 0 0.5rem;
    }

    /* Main content */
    main {
        /* Push main content down to accommodate larger header */
        margin-top: 79px;
    }

    /* Hero section */
     #hero {
        height: 50vh;
        padding: 40px 10%;
    }

    /* Intro section */
    .intro {
        padding: 3rem 2rem;
    }

    .intro h2 {
        font-size: 2.2rem;
    }

    .intro p {
        font-size: 1.2rem;
        max-width: 80%;
    }

    .cta-button {
    background-color: #c084fc;
    color: #1c1c2b;
    padding: 0.5rem 0.5rem;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s;
    }

    /* Reasons section */
    
    .reasons h2 {
    margin-bottom: 20px;
    text-align: center;
    font-size: 400%;
    }

    #benefits p {
    padding: 0 20px;
    }

    #benefits hr {
    border-top: 1px solid #3a3a3a;
    margin: 5px 0;
    }

    #meetups h2 {
    margin: 0 auto 1.5rem;
    }

    #benefits-social,
    #benefits-professional {
        display: flex;
        gap: 1.5rem;
        justify-content: space-around;
        flex-wrap: wrap;
    }

    #benefits-social > div,
    #benefits-professional > div {
        flex: 1 1 45%;
        padding: 2rem;
        margin-bottom: 2rem;
    }
     

    #meetups > div {
        display: flex;
        gap: 1.5rem;
        justify-content: space-around;
        flex-wrap: wrap;
    }

    #meetups > div > div {
        flex: 1 1 30%;
        padding: 2rem;
        margin-bottom: 2rem;
    }
      
    #meetups dl {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
    padding: 2rem 1rem;
    }

    #meetups dl div {
    flex: 1 1 45%;
    max-width: 45%;
    padding: 1.5rem;
    }

    .join {
    margin: 1.5rem auto;
    }

    .reasons {
    width: 90%;
    margin: 20px auto;
    }

    /* Form */
    #signup {
        background-position: center;
        position: relative;
    }

    #signup-form {
        max-width: 400px;
        position: absolute;
        left: 10%;
        top: 150px;
    }

    .text-input:hover {
        border-color: #f16c6b;
    }

    .join-button:hover {
        background-color: #fafafa;
        color: #454b1b;
    }

     .footer p {
        font-size: 0.9rem;
        max-width: 70%;
    }
}

/* Large devices (laptops and desktops, 992px and up) */
@media screen and (min-width: 992px) {
    .nav-links a:hover{
        border-bottom: 1px solid;
    }
    
    /* Hero section */
    #hero {
        height: 50vh;
    }

    .intro {
        padding: 4rem 4rem;
    }

    .intro h2 {
        font-size: 2.6rem;
    }

    .intro p {
        font-size: 1.3rem;
        max-width: 70%;
    }

    #meetups dl {
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
    padding: 3rem;
    }

    #meetups dl div {
    flex: 1 1 30%;
    max-width: 30%;
    padding: 2rem;
    border-radius: 12px;
    }

    #meetups dt {
    font-size: 1.4rem;
    }

    #meetups dd {
    font-size: 1.1rem;
    }
    
    /* Footer section */
    .footer p {
        font-size: 1rem;
        max-width: 50%;
    }
}