:root {
    --font-base: 'Inter', sans-serif;
    --font-heading: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    font-family: var(--font-base);
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background: var(--bg-color);
    color: var(--text-color);
}

p {
    color: var(--text-color);
}

a {
    text-decoration: none;
    color: var(--second-color);
}

img {
    width: 80px;
}

:root {
    --bg-color: #020312;
    --text-color: #fff;
    --main-color: #eb4a4a;
    --second-color: gray;
    --other-color: #12141c;
    --h1-font: 5.2rem;
    --h2-font: 3.5rem;
    --p-font: 1.1rem;
}


/*-----------------Header--------------*/

header {
    position: fixed;
    width: 100%;
    top: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    padding: 22px 16%;
    background: transparent;
    border-bottom: 1px solid transparent;
    transition: all .40s ease;
}

nav {
    flex: 1;
    text-align: right;
}

nav ul {
    display: inline-block;
    list-style-type: none;
    left: 3px;
}

nav ul li {
    display: inline-block;
}

header a {
    font-size: 600;
    font-weight: var(--p-font);
    padding: 10px 25px;
    border-radius: 0.5rem;
    transition: all .70s ease;
}

header.sticky {
    padding: 10px 16%;
    background: var(--bg-color);
    border-bottom: 1px solid #0e1630;
}

header a:hover {
    background: var(--main-color);
    color: var(--text-color);
}

.container {
    max-width: 2400px;
    margin: auto;
    padding: 10px 5px;
}

section {
    padding: 160px 16% 90px;
}


/*--------------Home---------------*/

.home {
    height: 100vh;
    width: 100%;
    background: url(../Imgs/class.jpeg);
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.home-text h1 {
    margin: 20px 0;
    font-size: var(--h1-font);
    font-weight: bold;
    line-height: 0.9;
    letter-spacing: 2px;
}

span {
    color: var(--main-color);
}

.home-text h4 {
    font-size: 24px;
    font-weight: 600;
    color: var(--main-color);
}

.home-text h3 {
    font-weight: 600;
    color: var(---text-color);
    margin-bottom: 3rem;
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 14px 40px;
    border-radius: 0.5rem;
    font-size: 17px;
    font-weight: 500;
    background: var(--main-color);
    color: var(--text-color);
    border: 1px solid var(--main-color);
    transition: all .50s ease;
}

.btn:hover {
    transform: scale(1.01) translateY(-5px);
    background: transparent;
    border: 1px solid var(--main-color);
}

.btn.outline {
    background: transparent;
    color: var(--text-color);
}

.btn.outline:hover {
    background: var(--main-color);
    color: var(--text-color);
}

.about {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    gap: 10rem;
}

.about-text h4 {
    margin: 10px 0;
    color: var(--main-color);
    font-size: 20px;
    font-weight: 600;
}

.about-text h2 {
    font-size: var(--h2-font);
}

.about-text p {
    font-size: var(--p-font);
    color: var(--second-color);
    line-height: 30px;
    margin-bottom: 2rem;
}

.about-gri {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, auto));
    align-items: center;
    gap: 1rem;
    margin-bottom: 3rem;
}

.about-in h5 {
    font-size: 22px;
    font-weight: 600;
}

.about-img img {
    height: auto;
    width: 100%;
    max-width: 450px;
}

.main-text {
    text-align: center;
}

.main-text h2 {
    font-size: var(--h2-font);
    margin-bottom: 10px;
}

.main-text h4 {
    color: var(--main-color);
    font-size: 24px;
    font-weight: 600;
}

.services-slider {
    position: relative;
    margin-top: 5rem;
    --service-gap: 1.5rem;
    --services-visible: 3;
}

.services-window {
    overflow: hidden;
    width: 100%;
}

.services-track {
    display: flex;
    gap: var(--service-gap);
    align-items: stretch;
    will-change: transform;
}

.service-slide {
    flex: 0 0 calc((100% - (var(--service-gap) * (var(--services-visible) - 1))) / var(--services-visible));
    display: flex;
    justify-content: center;
    flex-shrink: 0;
    padding: 0.5rem 0;
}

.service-slide img {
    width: 100%;
    height: auto;
    object-fit: contain;
}

.service-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: #fff;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    cursor: pointer;
    z-index: 2;
    transition: background 0.3s ease, transform 0.3s ease;
}

.service-nav:hover {
    background: var(--main-color);
    transform: translateY(-50%) scale(1.05);
}

.service-nav.prev {
    left: 10px;
}

.service-nav.next {
    right: 10px;
}

.service-nav {
    display: none;
}

.box {
    padding: 45px;
    background: #12141c;
    border-top: 5px solid transparent;
    border-radius: 0.5rem;
    transition: all .40s ease;
    cursor: pointer;
    width: 100%;
    max-width: none;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.box h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 15px 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    transition: all .40s ease;
}

.box p {
    color: var(--second-color);
    font-size: var(--p-font);
    line-height: 30px;
}

.box:hover {
    transform: scale(1.01) translateY(-5px);
    border-top: 5px solid var(--main-color);
}

.box:hover h3 {
    color: var(--main-color);
}

@media (max-width: 1023px) {
    .services-slider {
        --services-visible: 2;
    }
}

@media (max-width: 768px) {
    .services-slider {
        --services-visible: 1;
    }
}

.portfolio-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, auto));
    align-items: center;
    gap: 2rem;
    margin-top: 5rem;
}

.row img {
    height: 200px;
    width: 100%;
    border-radius: 0.5rem;
    margin-bottom: 10px;

}

.row {
    padding: 25px;
    background: #12141c;
    border-radius: 0.5rem;
    transition: all .40s ease;
}

.main-row {
    margin-bottom: 1rem;
}

.main-row h3 {
    color: #fff;
}

.row h3 {
    font-size: 25px;
    font-weight: 700;
}

.row h6 {
    color: var(--main-color);
    font-size: 16px;
    font-weight: 500;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    letter-spacing: 1px;
}

.row:hover {
    transform: scale(1.01) translateY(-5px);
    cursor: pointer;
}

.contact {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    align-items: center;
    gap: 3rem;
}

.contact-text h4 {
    margin: 15px 0;
    color: var(--main-color);
    font-size: 20px;
    font-weight: 600;
}

.contact-text h2 {
    font-size: var(--h2-font);
}

.contact-text p {
    color: var(--second-color);
    font-size: var(--p-font);
    line-height: 30px;
    margin-bottom: 2rem;
}

.contact-list {
    margin-bottom: 3rem;
}

.contact-list li {
    margin-bottom: 10px;
    display: block;
}

.contact-list li a {
    display: block;
    color: var(--second-color) !important;
    font-size: var(--p-font);
    font-weight: 600;
    transition: all .40s ease;
}

.contact-list li a:hover {
    transform: scale(1.01) translateY(-5px);
    color: var(--main-color) !important;
}

.contact-icons i {
    height: 40px;
    width: 40px;
    background: #12141c;
    border-radius: 0.5rem;
    color: var(--main-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 18px;
    margin-right: 10px;
    padding: 2px 0;
    transition: all .40s ease;
}

.fa-brands:hover {
    transform: scale(1.01) translateY(-5px);
    cursor: pointer;
    color: var(--text-color);
    background: var(--main-color);
}

.contact-form form {
    position: relative;
}

.contact-form form input,
.contact-form form textarea {
    border: none;
    outline: none;
    width: 100%;
    padding: 14px 16px;
    background: #12141c;
    color: var(--text-color);
    font-size: 1rem;
    font-weight: 600;
    margin-top: 6px;
    border-radius: 0.5rem;
}

.contact-form textarea {
    resize: vertical;
    min-height: 180px;
}

.contact-form form .send {
    display: inline-block;
    font-size: 17px;
    font-weight: 500;
    background: var(--main-color);
    color: var(--text-color);
    width: 190px;
    cursor: pointer;
    transition: all .40s ease;
    border: 2px solid var(--main-color);
}

.contact-form form .send:hover {
    transform: scale(1.01) translateY(-5px);
}

.contact-form form label {
    font-weight: 600;
    color: var(--text-color);
}

.contact-form .field {
    margin-bottom: 1rem;
}

.contact-form .field.hp {
    display: none;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.form-status {
    min-height: 1.2rem;
    color: var(--text-color);
    font-size: 0.95rem;
}

.send[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-status.error {
    color: #ff6b6b;
}

.form-status.success {
    color: #6ef59a;
}

.toggle {
    font-size: 30px;
    color: var(--text-color);
    z-index: 10001;
    cursor: pointer;
    display: none;
    transition: all 5s ease;
}

@media (max-width: 1325px) {
    header {
        padding: 16px 3%;
    }

    header.sticky {
        padding: 6px 3%;
    }

    header a {
        padding: 5px 15px;
    }

    section {
        padding: 130px 3% 60px;
    }
}

@media (max-width: 970px) {
    :root {
        --h1-font: 4.2rem;
        --h2-font: 2.9rem;
        --p-font: 1rem;
    }

    section {
        padding: 70px 3% 60px;
    }

    .home {
        height: 85vh;
    }

    .about {
        grid-template-columns: 1fr;
    }

    .about-img {
        text-align: center;
    }

    .contact {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 870px) {
    header {
        height: 4rem;
        width: 100%;
    }

    .toggle {
        display: block;
        transition: all 5s ease;
    }

    .navbar {
        position: absolute;
        top: -600px;
        left: 0;
        right: 0;
        display: flex;
        flex-direction: column;
        background: #12141c;
        text-align: left;
        transition: all .90s ease;
    }

    .navbar a {
        display: block;
        padding: 1rem;
        margin: 1rem;
    }

    .navbar ul {
        display: flex;
        flex-direction: column;
        text-align: left;
    }

    header img {
        width: 35%;
        height: auto;
        line-height: auto;
        top: 0.5rem;
    }

    .logo {
        height: 1.5rem;
    }

    .navbar.active {
        top: 100%;
        transition: all .90s ease;
    }

    :root {
        --h1-font: 3.2rem;
        --h2-font: 2.2rem;
    }
}
