@import "tailwindcss";
@custom-variant dark (&:where(.dark, .dark *));

#app {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

#app .flex-1 {
    flex-grow: 1;
    width: 100%;
}

:root {
    --footer-text-color: #9cffeb;
    --verde-sombra: #1e473b;
    --verde-principal: #006853;
    --blanco: #fff;
    --negro: #1d1d1b;
    --amarillo-principal: #fce200;
    --amarillo-suave: #fff8be;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
}

a {
    text-decoration: underline;
    &:hover {
        opacity: 0.8;
    }
}

.navbar {
    position: relative;
    height: 140px;

    .background {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;

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

    .content {
        display: flex;
        padding: 1rem 2rem;
        align-items: center;
        justify-content: end;
        position: relative;
        z-index: 2;
        height: 100px;

        .logo-container {
            display: flex;
            align-items: center;
            flex-shrink: 0;
            width: 125px;
            position: absolute;
            top: 10px;
            left: 50%;
            transform: translateX(-50%);

            img {
                height: 100%;
            }
        }

        .links-container {
            display: flex;
            align-items: center;
            gap: 1rem;
            font-size: 0.8rem;

            .link {
                color: var(--verde-principal);
            }

            @media (max-width: 1280px) {
                display: none;
            }
        }
    }

    .burguer-menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--amarillo-principal);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        transition: max-height 0.3s ease-in-out, opacity 0.3s ease-in-out,
            visibility 0.3s ease-in-out;

        .container {
            display: flex;
            flex-direction: column;
            padding: 1.5rem 2rem;
            gap: 0.8rem;

            .link {
                color: var(--verde-principal);
            }
        }

        &.active {
            max-height: 300px;
            opacity: 1;
            visibility: visible;
        }

        @media (max-width: 1280px) {
            display: block;
        }
    }
}

.footer {
    display: flex;
    background-color: var(--verde-sombra);
    color: var(--footer-text-color);
    padding: 2rem 4rem;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    width: 100%;

    .left {
        display: flex;
        flex-direction: column;
        flex-grow: 1;

        @media (max-width: 768px) {
            align-items: center;
            text-align: center;
        }
    }

    .right {
        display: flex;
        flex-direction: column;

        .link {
            margin-bottom: 1rem;
        }

        .social-container {
            display: flex;
            align-items: center;
            gap: 1.5rem;
            justify-content: end;

            @media (max-width: 768px) {
                justify-content: center;
            }
        }
    }

    @media (max-width: 768px) {
        flex-direction: column-reverse;
        align-items: center;
        gap: 2rem;
    }
}

/* Bases */

.bases {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Home */

.pizarron {
    display: flex;
    flex-direction: column;
    /* justify-content: center; */
    align-items: center;
    position: relative;

    .background {
        width: 100%;
        height: 100%;
        position: absolute;
        bottom: 0;
        z-index: -1;
    }

    .logo {
        height: 160px;
    }

    p {
        text-align: center;
        color: var(--blanco);
        font-family: "CocogooseProText";
    }

    p:nth-of-type(1),
    p:nth-of-type(3) {
        font-size: 2rem;
        font-weight: 700;
    }

    p:nth-of-type(2) {
        color: var(--amarillo-principal);
        font-size: 4rem;
    }

    p:nth-of-type(4) {
        color: var(--amarillo-principal);
        font-size: 1.5rem;
    }

    p:nth-of-type(5) {
        font-size: 1rem;
        font-weight: 700;
        a {
            text-decoration: underline;
        }
    }

    a.cta {
        background-color: var(--blanco);
        color: var(--verde-principal);
        border-radius: 8px;
        font-size: 2.5rem;
        font-family: "Komu";
        padding: 2rem 4rem;
        margin: 2rem 0;
        text-align: center;
        width: fit-content;
        text-decoration: none;
    }

    .bottom-box {
        border-radius: 0 2rem 2rem 0;
        display: flex;
        width: 75%;
        background-color: var(--verde-sombra);
        opacity: 0.6;
        align-self: start;
        padding: 1rem 2rem;
        margin: 3rem 0;

        p {
            font-family: "Komu";
            text-transform: uppercase;
            font-size: 2.5rem;
            align-self: end;
            opacity: 1;
            text-align: left;
            width: 60%;
            margin-left: auto;
        }
    }
}

.hay-equipo {
    width: 100%;
    padding: 4rem;
    background-color: var(--blanco);
    p {
        color: var(--verde-principal);
        text-align: center;
    }
    p:first-of-type {
        font-family: "Komu";
        font-size: 3rem;
        text-transform: uppercase;
    }
    p:last-of-type {
        font-family: "CocogooseProText";
        font-size: 1.5rem;
    }
}

.pizarron-equipo {
    width: 100%;
    background-color: var(--amarillo-suave);

    img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        clip-path: ellipse(120% 100% at 50% 0%);
    }
}

.como-participar {
    background-color: var(--amarillo-suave);
    padding: 3rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;

    p {
        color: var(--verde-principal);
        text-align: center;
        font-family: "CocogooseProText";
        max-width: 768px;
    }

    p:first-of-type {
        font-size: 2rem;
    }

    img {
        margin: 2rem 0;
        height: 6rem;
    }

    h2 {
        position: relative;
        text-align: center;
        text-shadow: -4px 4px 1px #f7cb46;
        font-family: "Komu";
        text-transform: uppercase;
        font-size: 4rem;
    }

    .cards-container {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
        max-width: 800px;
        color: var(--verde-principal);
        margin-top: 4rem;
        margin-bottom: 2rem;

        @media (max-width: 768px) {
            grid-template-columns: 1fr;
            gap: 4rem;
            margin-top: 6rem;
        }

        .card {
            border: 3px solid var(--verde-principal);
            border-radius: 20px;
            padding: 3rem 1.5rem 2rem 1.5rem;
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            position: relative;
            min-height: 220px;
            transition: transform 0.3s ease, box-shadow 0.3s ease;

            &:hover {
                transform: translateY(-5px);
                box-shadow: 0 8px 16px rgba(0, 104, 83, 0.15);
            }

            .card-number {
                width: 60px;
                height: 60px;
                border-radius: 50%;
                border: 3px solid var(--verde-principal);
                background-color: var(--amarillo-suave);
                display: flex;
                align-items: center;
                justify-content: center;
                font-size: 1.5rem;
                font-weight: bold;
                font-family: "Komu";
                position: absolute;
                top: -30px;
                left: 50%;
                transform: translateX(-50%);
            }

            .card-content {
                flex: 1;
                display: flex;
                flex-direction: column;
                justify-content: center;

                h3 {
                    font-size: 1rem;
                    font-weight: bold;
                    margin: 0 0 0.5rem 0;
                    font-family: Arial, Helvetica, sans-serif;
                }

                p {
                    font-size: 0.85rem;
                    margin: 0;
                    line-height: 1.4;
                }
            }
        }
    }
}

.comparti-section {
    padding-bottom: 8rem;

    .content {
        position: relative;
        display: flex;
        gap: 4rem;
        justify-content: center;
        align-items: center;
        padding: 0 4rem 4rem 4rem;
        width: 100%;
        z-index: 2;

        .hero-bg {
            position: absolute;
            inset: 0;
            background-color: var(--amarillo-principal);
            clip-path: ellipse(120% 100% at 50% 0%);
            z-index: 1;
        }

        .img-container {
            width: 100%;
            transform: translateY(7rem);
            z-index: 2;
            img {
                border-radius: 40px;
                border: 6px solid var(--verde-principal);
                box-shadow: -4px 4px 4px 4px #f7cb46;
                width: 100%;
                height: 100%;
                object-fit: cover;
            }
        }

        .text-container {
            z-index: 2;
            width: 100%;
            color: var(--negro);
            align-self: end;

            > p {
                font-size: 3rem;
                width: 80%;
                text-shadow: -4px 4px 1px #f7cb46;
                font-family: "Komu";
            }

            .desc {
                font-size: 1.5rem;
                font-family: "CocogooseProText;";
            }
        }

        @media (max-width: 768px) {
            flex-direction: column;
            align-items: center;

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

.form-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    padding-top: 4rem;

    h2 {
        color: var(--verde-principal);
        font-size: 4rem;
        text-align: center;
        text-shadow: -4px 4px 1px #dadada;
        font-family: "Komu";
    }

    > p {
        color: var(--verde-principal);
        text-align: center;
        font-family: "CocogooseProText";
        font-size: 2rem;
    }

    @media (max-width: 768px) {
        h2 {
            font-size: 2rem;
        }
        > p {
            font-size: 1.5rem;
        }
    }
}

/* Form */

.form-container {
    max-width: 600px;
    width: 100%;
    margin: 3rem auto;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;

    @media (max-width: 768px) {
        padding: 1.5rem 1rem;
        margin: 2rem auto;
    }
}

.participando {
    text-align: center;
    font-size: 2rem;
    color: var(--verde-principal);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;

    label {
        color: var(--verde-principal);
        font-size: 0.85rem;
        font-weight: 500;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    input[type="date"] {
        padding: 0.75rem 1rem;
        border: 2px solid var(--verde-principal);
        border-radius: 8px;
        font-size: 1rem;
        font-family: Arial, Helvetica, sans-serif;
        transition: border-color 0.3s ease, box-shadow 0.3s ease;

        &:focus {
            outline: none;
            border-color: var(--verde-sombra);
            box-shadow: 0 0 0 3px rgba(0, 104, 83, 0.1);
        }

        &::placeholder {
            color: #ccc;
        }

        &.input-error {
            border-color: #e74c3c;
            box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);

            &:focus {
                box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
            }
        }
    }

    .error-message {
        color: #e74c3c;
        font-size: 0.75rem;
        font-weight: 500;
        margin-top: -0.3rem;
    }
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-direction: row;
    flex-wrap: wrap;

    input[type="checkbox"] {
        width: 20px;
        height: 20px;
        accent-color: var(--verde-principal);
        cursor: pointer;
        flex-shrink: 0;
    }

    label {
        margin: 0;
        cursor: pointer;
    }

    .error-message {
        color: #e74c3c;
        font-size: 0.75rem;
        font-weight: 500;
        width: 100%;
        order: 3;
    }
}

.upload-area {
    border: 2px dashed var(--verde-principal);
    border-radius: 8px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    min-height: 180px;
    position: relative;
    transition: background-color 0.3s ease, border-color 0.3s ease;

    &:hover {
        background-color: rgba(0, 104, 83, 0.05);
    }

    &.drag-over {
        background-color: rgba(0, 104, 83, 0.1);
        border-color: var(--verde-sombra);
    }

    .upload-icon {
        width: 3rem;
        height: 3rem;
        color: var(--verde-principal);
        margin-bottom: 0.5rem;
    }

    .upload-title {
        color: var(--verde-principal);
        font-size: 0.95rem;
        font-weight: 500;
        margin: 0.5rem 0;
    }

    .upload-subtitle {
        color: var(--verde-principal);
        font-size: 0.85rem;
        margin: 0;
    }

    .file-input {
        position: absolute;
        width: 100%;
        height: 100%;
        cursor: pointer;
        opacity: 0;
    }

    .preview-image {
        width: 100%;
        height: 100%;
        object-fit: contain;
        max-height: 250px;
    }
}

.upload-hint {
    color: var(--verde-principal);
    font-size: 0.75rem;
    text-align: center;
    margin: 0.5rem 0 0;
    line-height: 1.4;
}

.submit-button {
    padding: 1rem;
    background-color: var(--verde-principal);
    color: var(--amarillo-principal);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-family: Arial, Helvetica, sans-serif;

    &:hover {
        background-color: var(--verde-sombra);
        transform: translateY(-2px);
    }

    &:active {
        transform: translateY(0);
    }
}

.supra-footer {
    width: 100%;
    position: relative;
    height: 160px;
    display: flex;
    justify-content: center;
    align-items: center;

    .background {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 100%;
        z-index: -1;

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

    p {
        color: var(--blanco);
        font-family: "Komu";
        font-size: 4rem;
        text-align: center;

        @media (max-width: 768px) {
            font-size: 2rem;
        }
    }
}

/* Scroll to Top Button */

.scroll-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 50px;
    height: 50px;
    background-color: var(--verde-principal);
    color: var(--amarillo-principal);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.2s ease,
        background-color 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 104, 83, 0.3);

    svg {
        width: 24px;
        height: 24px;
        fill: currentColor;
    }

    &:hover {
        background-color: var(--verde-sombra);
        transform: translateY(-3px);
        box-shadow: 0 6px 16px rgba(0, 104, 83, 0.4);
    }

    &:active {
        transform: translateY(-1px);
    }

    &.visible {
        opacity: 1;
        visibility: visible;
    }

    @media (max-width: 768px) {
        width: 45px;
        height: 45px;
        bottom: 1.5rem;
        right: 1.5rem;

        svg {
            width: 20px;
            height: 20px;
        }
    }
}
