/* =========================================================
   BASE RESET & VARIABLES
   ========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Afacad Flux", sans-serif;
    scroll-behavior: smooth;
}

:root {
    --background-color: #0D0C0C;
    --accent-color: #171717;
    --text-color: #f1f1f1;
    --border-color: #3f3f3f;
    --map-filter: invert(90%);
    --logo-filter: none;
}

.light-theme {
    --background-color: #e1e1e1;
    --accent-color: #f3f3f3;
    --text-color: #1a1a1a;
    --border-color: rgb(158, 158, 158);
    --map-filter: none;
    --logo-filter: invert(90%);
}

.dark-theme {
    --background-color: #0D0C0C;
    --accent-color: #171717;
    --text-color: #f1f1f1;
    --border-color: #272727;
    --map-filter: invert(90%);
    --logo-filter: none;
}

/* =========================================================
   BODY
   ========================================================= */

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

/* =========================================================
   HEADER
   ========================================================= */

header {
    position: sticky;
    top: 0;
    z-index: 10;
}

.header-container {
    position: relative;
    width: 100%;
    height: 80px;
    background-color: var(--background-color);
}

.header-logo {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    margin-left: 40px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo img {
    width: 40px;
    height: 40px;
    filter: var(--logo-filter);
    flex-shrink: 0;
}

.nombre {
    color: var(--text-color);
    font-size: 20px;
    line-height: 1;
}

nav {
    position: relative;
    display: flex;
    align-items: center;
    text-align: center;
    width: min-content;
    height: 100%;
    margin: auto;
}

nav ul {
    margin: 0;
    padding: 0;
    display: flex;
}

nav ul li {
    list-style: none;
}

.header-options {
    font-size: 15px;
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 6px;
    font-weight: 500;
}

.header-options:hover {
    background-color: var(--accent-color);
    transition: 0.1s;
}

.burger {
    display: none;
}

/* =========================================================
   LINKS
   ========================================================= */

a {
    z-index: 2;
    text-decoration: none;
    color: var(--accent-color);
}

/* =========================================================
   HERO (first image + text)
   ========================================================= */

.first-img-container {
    display: flex;
    position: relative;
    width: 100%;
    height: 83vh;
    align-items: center;
}

.first-img {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.first-img img {
    opacity: 0.2;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.first-img-text {
    position: relative;
    text-align: center;
    color: var(--text-color);
    font-size: 80px;
    font-weight: 500;
}

.first-img-subtext {
    line-height: 20px;
    position: relative;
    text-align: center;
    color: var(--text-color);
    font-size: 30px;
    font-weight: 100;
}

.button-container {
    display: flex;
}

/* =========================================================
   BUTTONS
   ========================================================= */

.first-button {
    z-index: 2;
    display: inline-flex;
    height: 50px;
    width: auto;
    min-width: 120px;
    padding-inline: 28px;
    background-color: var(--text-color);
    margin: 40px 20px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    transition: 0.2s;
}

.first-button p {
    text-align: center;
    line-height: normal;
    width: 100%;
}

.first-button i {
    position: absolute;
    opacity: 0;
    padding: 0;
    margin: 0;
    transform: translate(-50%, 20%);
    transition: 0.2s;
}

.first-button:hover {
    padding-right: 40px;
    transition: 0.2s;
}

.first-button:hover i {
    margin-left: 20px;
    opacity: 1;
    transition: 0.2s;
    transform: translate(0, 20%);
}

/* =========================================================
   SEPARATOR BAR
   ========================================================= */

.bar {
    position: relative;
    display: flex;
    width: 100%;
    border: 1px solid var(--border-color);
}

/* =========================================================
   SERVICES SECTION
   ========================================================= */

.intro-container {
    width: 100%;
}

.intro-box-disappear {
    opacity: 1;
    transition: all 1s;
    padding: 20px 250px;
    width: 100%;
    height: 500px;
    display: flex;
    position: relative;
}

.intro-box {
    opacity: 1;
    transition: all 1s;
    padding: 20px 250px;
    width: 100%;
    height: 500px;
    display: flex;
    position: relative;
}

.intro-text {
    display: flex;
    width: 50%;
    height: 100%;
    position: relative;
    background-color: var(--accent-color);
    border-radius: 8px 0 0 8px;
    padding: 60px;
    align-items: center;
    text-align: justify;
}

.intro-text-2 {
    display: flex;
    width: 50%;
    height: 100%;
    position: relative;
    background-color: var(--accent-color);
    border-radius: 0 8px 8px 0;
    padding: 60px;
    align-items: center;
    text-align: justify;
}

.intro-text-title {
    font-weight: 500;
    text-align: left;
    position: relative;
    width: 100%;
    font-size: 40px;
    color: var(--text-color);
    padding-block: 20px;
}

.intro-text-content {
    width: 100%;
    font-size: 20px;
    color: var(--text-color);
}

.intro-img {
    width: 50%;
    height: 100%;
    display: flex;
    position: relative;
    border-radius: 0 8px 8px 0;
    overflow: hidden;
}

.intro-img img {
    object-fit: cover;
    width: 100%;
    height: auto;
}

.intro-img-2 {
    width: 50%;
    height: 100%;
    display: flex;
    position: relative;
    border-radius: 8px 0 0 8px;
    overflow: hidden;
}

.intro-img-2 img {
    object-fit: cover;
    width: 100%;
    height: auto;
}

.intro-content {
    width: 100%;
    align-items: center;
    display: flex;
    flex-direction: column;
}

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

/* =========================================================
   CONTACT SECTION
   ========================================================= */

.contact {
    width: 100%;
    height: 500px;
    display: flex;
    margin-block: 20px;
}

#contact-info {
    height: auto;
}

.contact-container {
    margin-inline: 250px;
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    background-color: var(--accent-color);
    border-radius: 8px;
    align-items: center;
}

.contact-title {
    margin-bottom: 20px;
    color: var(--text-color);
    font-size: 40px;
    font-weight: 500;
}

.contact-left {
    color: var(--text-color);
    padding: 50px;
    position: relative;
    width: 50%;
    height: 100%;
}

.contact-right {
    position: relative;
    width: 50%;
    height: 100%;
}

.contact-form {
    margin: auto;
    position: relative;
    width: 500px;
}

.contact-form #name,
.contact-form #mail,
.contact-form #message {
    padding: 10px;
    display: flex;
    width: 100%;
    border-radius: 8px;
    background-color: var(--background-color);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-size: 16px;
}

.contact-form #name,
.contact-form #mail {
    height: 40px;
}

.contact-form #mail,
.contact-form #message {
    margin-top: 10px;
}

.contact-form #message {
    height: 150px;
    resize: vertical;
}

#submit {
    width: 100%;
    margin: 10px 0 0 0;
    font-size: 16px;
    color: var(--accent-color);
    border: none;
    display: flex;
}

.map {
    position: relative;
    display: flex;
    margin: auto;
    width: 100%;
    height: 100%;
}

.map iframe {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    filter: var(--map-filter);
}

/* =========================================================
   CONTACT INFO (manual)
   ========================================================= */

.contacto_manual {
    width: 100%;
    height: auto;
    display: flex;
}

.contacto_manual ul {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    width: 100%;
    padding: 0;
    margin: 0;
}

.contacto_manual li {
    list-style: none;
    padding: 8px 20px;
    width: fit-content;
    display: flex;
    position: relative;
    color: var(--text-color);
    align-items: center;
    font-size: 14px;
}

.contacto_manual li i {
    padding-inline: 8px;
    color: var(--text-color);
    font-size: 13px;
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer-container {
    display: flex;
    position: relative;
    margin: auto;
    width: 100%;
    height: 80px;
    align-items: center;
    margin-top: 20px;
    background-color: var(--accent-color);
}

#footer-text {
    margin: auto;
    position: relative;
    color: var(--text-color);
    font-weight: 200;
    letter-spacing: 0.75px;
}

#footer-text2 {
    margin: auto;
    position: relative;
    color: var(--text-color);
    font-weight: 100;
    letter-spacing: 0.75px;
    font-size: 12px;
    padding: 1px;
}

#footer-text2 a {
    color: var(--text-color);
}

#footer-text2 a:hover {
    color: var(--background-color);
}

/* =========================================================
   FLOATING BUTTONS (go up / theme toggle)
   ========================================================= */

#goUpButton {
    transition: 0.3s;
    background-color: var(--accent-color);
    display: flex;
    align-items: center;
    text-align: center;
    width: 60px;
    height: 60px;
    position: fixed;
    border-radius: 50px;
    z-index: 5;
    bottom: 80px;
    right: 0;
    margin: 20px;
    cursor: pointer;
    overflow: hidden;
}

#goUpButton i {
    margin: auto;
    text-align: center;
    color: var(--text-color);
    font-size: 30px;
    transition: 0.3s;
}

#goUpButton:hover {
    transition: 0.3s;
    filter: invert(90%);
}

#goUpButton:hover i {
    animation: moveArrow ease-out 0.3s;
}

.upButton {
    transition: 0.3s;
    background-color: var(--accent-color);
    display: flex;
    align-items: center;
    text-align: center;
    width: 60px;
    height: 60px;
    position: fixed;
    border-radius: 50px;
    z-index: 5;
    bottom: 0;
    right: 0;
    margin: 20px;
    cursor: pointer;
}

.upButton i {
    margin: auto;
    text-align: center;
    color: var(--text-color);
    font-size: 30px;
}

.upButton:hover {
    transition: 0.3s;
    filter: invert(90%);
    rotate: -45deg;
}

@keyframes moveArrow {
    0%   { translate: 0 0; }
    50%  { translate: 0 -40px; }
    51%  { translate: 0 40px; }
    100% { translate: 0 0; }
}

/* =========================================================
   GALLERY
   ========================================================= */

.gallery-container {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 8%;
}

.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gallery img {
    width: 100%;
}

.gallery img:hover {
    transition: 0.2s;
    border: 8px solid var(--background-color);
}

/* =========================================================
   MACHINES PAGE
   ========================================================= */

.machines-container {
    margin-block: 40px;
    display: flex;
    position: relative;
    margin-inline: auto;
    border-radius: 8px;
    width: 1000px;
    height: auto;
    background-color: var(--accent-color);
}

.machines-left {
    width: 50%;
    height: 100%;
}

.machines-right {
    width: 50%;
    height: auto;
    border-left: 1px solid var(--border-color);
}

.machine-image {
    height: 100%;
    display: flex;
}

.machine-image img {
    width: 400px;
    margin: auto;
    height: auto;
}

.machine-title {
    font-size: 40px;
    font-weight: 500;
    padding-inline: 40px;
    padding-block: 20px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.machine-content {
    margin-block: 40px;
    font-size: 20px;
    padding-inline: 40px;
    height: 85%;
    width: 100%;
    color: var(--text-color);
    font-weight: 200;
}

.machine-content i {
    margin-right: 10px;
    font-size: 15px;
    color: #006d21;
}

.machine-content ul {
    margin-block: 10px;
}

.machines-ul {
    font-weight: 400;
}

/* =========================================================
   MISC IDs used in subpages
   ========================================================= */

#titles_new {
    border: none;
    padding-inline: 0;
}

#textMac {
    text-align: justify;
}

#machine_2 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 20px;
}

#backImgServices {
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    position: fixed;
    display: flex;
    object-fit: cover;
}

#backImgServices img {
    top: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    position: fixed;
    display: flex;
    object-fit: cover;
    filter: blur(50px);
}

/* =========================================================
   ANIMATIONS
   ========================================================= */

@keyframes appear {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* =========================================================
   RESPONSIVE — tablets (601px – 992px)
   ========================================================= */

@media only screen and (max-width: 992px) and (min-width: 601px) {

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

    .header-container {
        display: flex;
        width: 100%;
    }

    .burger {
        transition: 0.3s;
        display: flex;
        position: absolute;
        right: 0;
        margin: 20px;
        font-size: 25px;
        color: var(--text-color);
    }

    .burger:hover {
        transform: rotate(20deg);
        transition: 0.3s;
    }

    .bur {
        z-index: 100;
        position: fixed;
        right: -100%;
        top: 70px;
        gap: 0;
        flex-direction: column;
        width: 100%;
        transition: 0.3s;
    }

    .bur.active {
        right: 0;
    }

    .header-container nav ul {
        z-index: 100;
        position: fixed;
        gap: 0;
        flex-direction: column;
        width: 100%;
        background-color: var(--background-color);
    }

    .header-container nav ul li {
        padding: 10px;
    }

    .first-img-container {
        height: 30vh;
    }

    .first-img-text {
        font-size: 40px;
        margin-inline: 20px;
    }

    .first-img-subtext {
        opacity: 0;
    }

    .intro-box,
    .intro-box-disappear {
        height: 100%;
        padding: 20px;
        width: 100%;
    }

    .intro-text,
    .intro-text-2 {
        width: 50%;
        height: 300px;
        padding: 10px;
        text-align: center;
        justify-content: center;
        align-items: center;
    }

    .intro-text-title {
        font-size: 32px;
        padding-block: 25px;
        text-align: center;
        line-height: 1.2;
    }

    .intro-text-content {
        font-size: 0;
    }

    .intro-img {
        width: 50%;
        height: 300px;
    }

    .intro-img-2 {
        width: 50%;
        height: 300px;
    }

    .contact {
        height: auto;
        margin-block: 20px;
    }

    .contact-container {
        margin-inline: 20px;
        flex-wrap: wrap;
        flex-direction: row;
        background-color: transparent;
    }

    .contact-title {
        font-size: 25px;
        padding: 20px;
    }

    .contact-left,
    .contact-right {
        width: 100%;
        padding: 20px;
    }

    .contact-form {
        width: 100%;
    }

    .contact-form #name,
    .contact-form #mail,
    .contact-form #message {
        width: 90%;
        margin-inline: auto;
    }

    #submit {
        width: 90%;
        margin-inline: auto;
        margin-top: 30px;
    }

    .machines-container {
        width: 80vw;
        flex-wrap: wrap;
    }

    .machines-left {
        width: 100%;
    }

    .machines-right {
        width: 100%;
        border-top: 1px solid var(--border-color);
        border-left: none;
    }

    .machine-image img {
        width: 100%;
        padding: 20px;
    }

    .machine-title {
        font-size: 30px;
        padding-inline: 20px;
        padding-block: 10px;
        text-align: center;
    }

    .machine-content {
        line-height: 25px;
        margin-block: 20px;
        font-size: 20px;
        width: 100%;
    }

    .contacto_manual ul {
        flex-direction: column;
        align-items: center;
    }

    .contacto_manual li {
        width: 100%;
        justify-content: center;
    }

    .footer-container {
        display: grid;
    }
}

/* =========================================================
   RESPONSIVE — mobile (≤ 600px)
   ========================================================= */

@media only screen and (max-width: 600px) {

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

    .header-container {
        display: flex;
        width: 100%;
    }

    .burger {
        transition: 0.3s;
        display: flex;
        position: absolute;
        right: 0;
        margin: 20px;
        font-size: 25px;
        color: var(--text-color);
    }

    .burger:hover {
        transform: rotate(20deg);
        transition: 0.3s;
    }

    .bur {
        z-index: 100;
        position: fixed;
        right: -100%;
        top: 70px;
        gap: 0;
        flex-direction: column;
        width: 100%;
        transition: 0.3s;
    }

    .bur.active {
        right: 0;
    }

    .header-container nav ul {
        z-index: 100;
        position: fixed;
        gap: 0;
        flex-direction: column;
        width: 100%;
        background-color: var(--background-color);
    }

    .header-container nav ul li {
        padding: 10px;
    }

    .first-img-container {
        height: 30vh;
    }

    .first-img {
        display: none;
    }

    .first-img-text {
        font-size: 40px;
        margin-inline: 20px;
    }

    .first-img-subtext {
        opacity: 0;
    }

    .button-container a {
        padding: 10px;
    }

    .first-button {
        margin: auto;
        margin-block: 20px;
    }

    .intro-box,
    .intro-box-disappear {
        height: 100%;
        padding: 20px;
        width: 100%;
    }

    .intro-text {
        width: 50%;
        height: 50%;
        border-radius: 8px 0 0 8px;
        padding: 10px;
        text-align: center;
        justify-content: center;
        align-items: center;
    }

    .intro-text-2 {
        width: 100%;
        border-radius: 0 8px 8px 0;
        padding: 10px;
        text-align: center;
        justify-content: center;
        align-items: center;
    }

    .intro-text-title {
        font-size: 28px;
        padding-block: 20px;
        text-align: center;
        line-height: 1.2;
    }

    .intro-text-content {
        font-size: 0;
    }

    .intro-img {
        width: 50%;
        height: auto;
        border-radius: 0 8px 8px 0;
    }

    .intro-img-2 {
        width: 100%;
        height: auto;
        border-radius: 8px 0 0 8px;
    }

    .intro-content a {
        display: flex;
        align-items: center;
    }

    .contact {
        height: auto;
        margin-block: 20px;
    }

    .contact-container {
        margin-inline: 20px;
        flex-wrap: wrap;
        flex-direction: row;
        background-color: transparent;
    }

    .contact-title {
        margin-top: 20px;
        font-size: 25px;
        padding: 20px;
        width: 100%;
    }

    .contact-left,
    .contact-right {
        width: 100%;
        padding: 20px;
    }

    .contact-form {
        width: 100%;
    }

    .contact-form #name,
    .contact-form #mail,
    .contact-form #message {
        width: 90%;
        margin-inline: auto;
    }

    #submit {
        width: 90%;
        margin-inline: auto;
        margin-top: 30px;
    }

    .machines-container {
        width: 80vw;
        flex-wrap: wrap;
    }

    .machines-left {
        width: 100%;
    }

    .machines-right {
        width: 100%;
        border-top: 1px solid var(--border-color);
        border-left: none;
    }

    .machine-image img {
        width: 100%;
        padding: 20px;
    }

    .machine-title {
        font-size: 30px;
        padding-inline: 20px;
        padding-block: 10px;
        text-align: center;
    }

    .machine-content {
        line-height: 25px;
        margin-block: 20px;
        font-size: 20px;
        width: 100%;
    }

    .contacto_manual ul {
        flex-direction: column;
        align-items: center;
    }

    .contacto_manual li {
        width: 100%;
        justify-content: center;
    }

    .footer-container {
        display: grid;
    }
}

/* =========================================================
   RESPONSIVE — large screens (993px – 1500px)
   ========================================================= */

@media only screen and (max-width: 1500px) and (min-width: 993px) {

    .first-img-container {
        height: 40vh;
    }

    .first-img img {
        height: auto;
        width: 100%;
        aspect-ratio: 16 / 9;
    }

    .first-img-text {
        font-size: 40px;
        margin-inline: 20px;
    }

    .first-img-subtext {
        opacity: 0;
    }

    .intro-box,
    .intro-box-disappear {
        height: 100%;
        padding: 20px;
        width: 100%;
    }

    .intro-text {
        display: flex;
        align-items: center;
        width: 50%;
        height: 400px;
        padding: 30px;
        text-align: left;
    }

    .intro-text-2 {
        display: flex;
        align-items: center;
        width: 50%;
        height: 400px;
        padding: 30px;
    }

    .intro-text-title {
        font-size: 30px;
        padding-block: 25px;
        text-align: center;
        line-height: 1.2;
    }

    .intro-text-content {
        font-size: 16px;
        text-align: left;
        padding: 20px;
    }

    .intro-img {
        width: 50%;
        height: 400px;
    }

    .intro-img-2 {
        width: 50%;
        height: 400px;
    }

    .contact {
        height: auto;
        margin-block: 20px;
    }

    .contact-container {
        margin-inline: 20px;
        flex-wrap: wrap;
        flex-direction: row;
        background-color: transparent;
    }

    .contact-title {
        font-size: 25px;
        padding: 20px;
        width: 100%;
    }

    .contact-left,
    .contact-right {
        width: 100%;
        padding: 20px;
    }

    .contact-form {
        width: 100%;
    }

    .contact-form #name,
    .contact-form #mail,
    .contact-form #message {
        width: 90%;
        margin-inline: auto;
    }

    #submit {
        width: 90%;
        margin-inline: auto;
        margin-top: 30px;
    }
}
