@font-face {
    font-family: 'rubik';
    src: url('../fonts/Rubik-Regular.ttf') format('truetype');
}

html {
    font-size: 100%;
}

body {
    margin: 0;
    font-family: 'rubik';
    background-color: #161318;
    color: #ffffff;
    text-align: center;
}

/* Header layout */
header {
    position: sticky;
    top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.05rem 2rem;
    color: white;
    background-color: #161318;
    z-index: 999;
    overflow: visible;
}

.mobile-logo {
    display: none;
}

.desktop-logo {
    max-width: 80%;
    display: block;
}

/* Center nav */
.main-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    flex: 1;
    display: flex;
    justify-content: center;
    gap: 3rem;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}
/* Hamburger button */
.hamburger {
    display: none;
    font-size: 2rem;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    width: 20%;
    height: 2em;
}

/* Mobile hearder */
@media (max-width: 768px) {
    header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0.1rem 1rem;
        position: sticky;

    }

    header a {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hamburger {
        display: block;
        margin-bottom: 5%;
    }

    .logo {
        max-width: auto;
        height: 4em;
        order: 1;
    }

    .desktop-logo {
        display: none;
    }

    .mobile-logo {
        display: block;
    }

    .main-nav,
    .auth-nav {
        display: none;
        flex-direction: column;
        align-items: center;
        width: 50%;
        margin: 0;
        gap: 1rem;
        background-color: #161318;
        border-right: 1px solid #9E3DC1;
        padding: 0.75rem 0 1rem;
        align-items: stretch;
        position: absolute;
        top: calc(100%);
        left: 0;
        right: 0;
        z-index: 1000;
    }

    .main-nav.active,
    .auth-nav.active {
        display: flex;
    }

    .main-nav>a,
    .auth-nav>a {
        display: block;
        width: 100%;
        padding: 0.75rem 1rem;
        text-align: center;
    }

    .main-nav>a:first-child,
    .auth-nav>a:first-child {
        padding-top: 1rem;
    }

}

/*footer*/
footer {
    background-color: #161318;
    color: #ffffff;
    padding: 2rem 1rem 1rem 1rem;
    margin-top: 4rem;
    border-top: 1px solid #9E3DC1;
    text-align: center;
}

.footer-container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 2rem;
    max-width: 65em;
    margin: 0 auto 1rem auto;
}

.footer-section h4 {
    margin-bottom: 0.5rem;
}

.footer-section a {
    display: block;
    color: #9E3DC1;
    text-decoration: none;
    margin: 0.2rem 0;
}

.footer-section a:hover {
    text-decoration: underline;
}

.footer-bottom {
    font-size: clamp(0.7rem, 1.5vw, 0.8rem);
    color: #828282;
    margin-top: 1rem;
}

/* Hero */
.hero {
    background: url('../images/background.jpg') no-repeat center center;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: clamp(2rem, 10vw, 6rem);
    padding: 0 10%;
    min-height: 70vh;
    color: white;
    position: relative;
    border-bottom: 1px solid #9E3DC1;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 0;
}

.hero-text {
    text-align: left;
    position: relative;
    z-index: 1;
    font-size: clamp(1rem, 2vw, 1.2rem);
    max-width: 50%;
}

.mainlogo {
    position: relative;
    z-index: 1;
}

.button-saibamais {
    align-items: left;
    background-color: #161318;
    color: white;
    padding: 0.6em 2em;
    border-radius: 0.5em;
    border: solid;
    border-width: 1px;
    border-color: #828282;
    font-size: 1rem;
}

.button-saibamais:hover {
    transform: scale(1.02)
}

.button-contact {
    background-color: #9E3DC1;
    color: white;
    padding: 0.6em 2em;
    border-radius: 0.5em;
    border: solid;
    border-width: 1px;
    border-color: #9E3DC1;
    font-size: 1rem;
}

.button-contact:hover {
    transform: scale(1.02)
}

@media (max-width: 768px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1rem;
        gap: 2rem;
        min-height: auto;
    }

    .hero-text {
        max-width: 100%;
        font-size: clamp(1rem, 4vw, 1.2rem);
        text-align: center;
    }

    .hero-text h1.maintitle {
        font-size: clamp(1.8rem, 8vw, 3rem);
        margin-bottom: 1rem;
    }

    .hero-text p.maindescription {
        font-size: clamp(1rem, 4vw, 1.2rem);
        margin-bottom: 1.5rem;
    }

    .mainlogo {
        max-width: 60%;
        height: auto;
    }

    .button-saibamais,
    .button-contact {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
}


/*AI logos*/
.ailogos {
    margin-top: 2em;
    padding-bottom: 2em;
    color: #828282;

    border-bottom: 1px solid #9E3DC1;
}

.imglogos {
    display: flex;
    gap: 3em;
    row-gap: 1em;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;

}

.imglogos img {
    max-width: 20%;
    height: auto;
}

/*blog slider*/
#blog-slider {
    position: relative;
    padding: 0 10em;
}

.slider-wrapper .blog-post {
    display: none;
    width: 90%;
    max-width: 600px;
    margin: 0 auto;
    background: #1c1c1c;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.slider-wrapper .blog-post img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;

    background-color: #9E3DC1;
    color: white;
    border: none;
    border-radius: 10%;
    width: 60px;
    height: 60px;
    font-size: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.slider-arrow:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.prev-arrow {
    left: 100px;
}

.next-arrow {
    right: 100px;
}

.slider-dots {
    text-align: center;
    padding: 15px 0;
}

.dot {
    display: inline-block;
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: #ccc;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.dot:hover {
    background-color: #aaa;
}

.dot.active {
    background-color: #333;
}

@media (max-width: 768px) {

    #blog-slider {
        padding: 0 15px;
    }

    .slider-wrapper .blog-post {
        width: 70%; 
    }
    
    .blog-post-content h3 {
        font-size: 1.2rem; 
    }

    .blog-post-content p {
        font-size: 0.9rem;
    }

    .slider-arrow {
        width: 30px;
        height: 50px;
        font-size: 18px;
    }

    .prev-arrow {
        left: 0;
    }

    .next-arrow {
        right: 0;
    }
}

/*Sobre Nos*/
#about {
    scroll-margin-top: 100px;
}

.sobre-nos {
    margin: 10vh auto;
    padding: 1em;
    outline: 1px solid #2f2c33;
    box-shadow: 2px 2px 12px #2f2c33;
    border-radius: 0.5em;
    max-width: 85vw;
    width: 100%;
}

.mainp {
    max-width: 45em;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    margin: 0 auto 2em;
    line-height: 1.6;
}

.info {
    position: relative;
    padding: clamp(2rem, 8vw, 5rem) 10%;
    z-index: 2;
}

.info .infolist {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
}

.infobox {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1em;
    border-radius: 0.5em;
    max-width: 15em;
    outline: 1pt solid #9E3DC1;
    box-shadow: 2px 2px 12px #9E3DC1;
    text-align: center;
    transition: transform 0.2s;
    background-color: #161318;

}

/*what we do*/
.services {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10%;
    min-height: 20vh;
    color: white;
    position: relative;
}

.services-title {
    text-align: right;
    position: relative;
    z-index: 1;
    flex: 0 0 auto;

}

.services-text {
    text-align: left;
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    max-width: 60%;
}

@media (max-width: 768px) {
    .services {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1rem;
        gap: 1.5rem;
    }

    .services-title,
    .services-text {
        text-align: center;
        max-width: 100%;
    }

    .services-title h1 {
        font-size: clamp(1.5rem, 5vw, 2rem);
        margin-bottom: 0.5rem;
    }

    .services-text p {
        font-size: clamp(1rem, 4vw, 1.2rem);
        margin: 0 auto;
    }
}

.serviceslist {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 50px;
}

.servicesbox {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    flex-direction: row;
    justify-content: space-between;
    padding: 2rem;
    border-radius: 8px;
    max-width: 80%;
    outline: 1pt solid #9E3DC1;
    box-shadow: 2px 2px 12px #9E3DC1;
    text-align: left;
    transition: transform 0.2s;
    background-color: #161318;
}

.services-item h1 {
    margin: 0.5rem 0 0.25rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.services-item p {
    margin: 0 0 4rem;
    font-size: clamp(.9rem, 2vw, 1rem);
}

.service-item {
    flex: 1 1 45%;
    min-width: 40%;
    margin-bottom: 0.5rem;
}

@media (max-width: 768px) {
    .servicesbox {
        display: flex;
        flex-wrap: wrap;
        gap: 2rem;
        flex-direction: row;
        justify-content: space-between;
        padding: 2rem;
        border-radius: 8px;
        max-width: 70%;
        outline: 1pt solid #9E3DC1;
        box-shadow: 2px 2px 12px #9E3DC1;
        text-align: left;
        transition: transform 0.2s;
        background-color: #161318;
    }
}

/*Form*/
#contact {
    scroll-margin-top: 100px;
}

.contact-form {
    margin: 10vh auto;
    padding: 1rem;
    background-color: #ececec;
    outline: 1px solid #9E3DC1;
    box-shadow: 2px 2px 12px #9E3DC1;
    border-radius: 0.5em;
    max-width: 85vw;
    width: 100%;
    font-family: sans-serif;
}

.contact-form h1 {
    color: #161318;
    text-align: center;
    margin-bottom: 1.5rem;
}

.formbox {
    margin-bottom: 1rem;
}

.formbox input,
.formbox textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #161318;
    border-radius: 0.5em;
    font-size: 1rem;
    background-color: #fff;
    color: #161318;
    outline: none;
    box-sizing: border-box;
}

.formbox input:focus,
.formbox textarea:focus {
    border-color: #c86ff2;
    box-shadow: 0 0 5px #c86ff2;
}

.formBox {
    margin-bottom: 1rem;
}

.formBox textarea {
    width: 100%;
    padding: 1rem;
    min-height: 150px;
    border: 1px solid #9E3DC1;
    border-radius: 0.5em;
    font-size: 1rem;
    background-color: #fff;
    color: #161318;
    outline: none;
    box-sizing: border-box;
}

.formBox textarea:focus {
    border-color: #c86ff2;
    box-shadow: 0 0 5px #c86ff2;
}

button {
    display: block;
    width: 100%;
    padding: 0.75rem;
    margin-top: 1rem;
    border: none;
    border-radius: 0.5em;
    background-color: #9E3DC1;
    color: #fff;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #c86ff2;
}

#success-dialog {
    border: 1px solid #9E3DC1;
    border-radius: 0.5em;
    box-shadow: 0 0 2em rgba(0, 0, 0, 0.3);
    padding: 2rem;
    max-width: 500px;
    text-align: center;
}

#success-dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

#success-dialog h2 {
    color: #28a745;
    margin-top: 0;
}

#success-dialog button {
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background-color: #9E3DC1;
    color: white;
    border: none;
    border-radius: 0.5em;
    cursor: pointer;
}

/* Blog Page */
.blog-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.blog-description {
    font-style: italic;
    color: #FFFFFF;
    margin-bottom: 2rem;
}

.blog-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.blog-post {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 2rem;
    min-height: 250px;
    border-radius: 8px;
    outline: 1pt solid #9E3DC1;
    box-shadow: 2px 2px 12px #9E3DC1;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
}

.blog-post:hover {
    transform: scale(1.02);
}

.blog-post h3 {
    margin: 0 0 0.5rem 0;
}

.blog-post a {
    color: #FFFFFF;
    text-decoration: none;
}

.blog-post p {
    margin-top: 0.5rem;
    color: #bfbfbf;
    line-height: 1.4;
    font-size: 0.95rem;
}

.blog-post img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 1rem;
}