* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Barlow', sans-serif;
    height: 100vh;
    overflow: hidden;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    position: relative;
    background: 
        url('imgs/bg_lines.svg') no-repeat center center,
        url('imgs/bg_miner.png') no-repeat center center,
        url('imgs/bg_gradient.jpg') no-repeat center center;
    background-size: cover, cover, cover;
}

.content-wrapper {
    display: flex;
    max-width: 1200px;
    width: 90%;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
    position: relative;
    z-index: 2;
}


.left-section {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
}

.experience-text {
    text-align: left;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.experience-text .experience {
    font-size: 2.2rem;
    font-weight: 500;
    margin-bottom: 1rem;
    letter-spacing: 2px;
    text-align: center;
    margin-bottom: 3rem;
}

.we-are-miners {
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 300;
}

.miners {
    font-weight: bold;
    font-size: 8rem;
}

.en-text {
    font-size: 1.5rem;
    text-align: left;
    align-self: flex-start;
}

.slogan-desktop {
    display: block;
    text-align: center;
    margin-bottom: 2rem;
}

.slogan-mobile {
    display: none;
}

.perumin-logo {
    text-align: center;
}

.perumin-logo img {
    height: auto;
    margin-bottom: 1rem;
}

.convention-text {
    font-size: 1.2rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.right-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 2rem;
    position: relative;
}

.form-container {
    width: 100%;
    max-width: 450px;
}

.form-container h2 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.form-container p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    font-size: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-row:has(select),
.form-row:has(#telefono),
.form-row:has(#email) {
    flex-direction: column;
}

/* Keep nombre and apellido side by side on desktop */
.form-row:has(#nombre) {
    flex-direction: row;
}

/* Ensure nombre and apellido have equal width */
.form-row:has(#nombre) input {
    flex: 1;
    width: 0; /* Reset width to allow flex to work properly */
}

input, select {
    flex: 1;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

input:focus, select:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: #4a9eff;
    transform: translateY(-2px);
}

input.error, select.error {
    border-color: #ff4757;
    background: rgba(255, 71, 87, 0.1);
}

input.success, select.success {
    border-color: #2ed573;
    background: rgba(46, 213, 115, 0.1);
}

.error-message {
    color: #ff4757;
    font-size: 0.875rem;
    margin-top: 0.1rem;
    margin-left: 0.5rem;
    display: none;
}

.centralized-error-container {
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid #ff4757;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    color: #ff4757;
    font-size: 0.875rem;
    line-height: 1.4;
    display: none;
}

.centralized-error-container.show {
    display: block;
}

.centralized-error-container ul {
    margin: 0;
    padding-left: 1.2rem;
}

.centralized-error-container li {
    margin-bottom: 0.3rem;
}

.success-message {
    color: #2ed573;
    font-size: 0.875rem;
    margin-top: 1rem;
    text-align: center;
    display: none;
}

.loading {
    opacity: 0.7;
    pointer-events: none;
}

.submit-btn.loading {
    background: #666;
    cursor: not-allowed;
}

.submit-btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    display: inline-block;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23ffffff' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.75rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

select option {
    background: #2b6b8a;
    color: white;
}

.submit-btn {
    width: 100%;
    padding: 1rem;
    background: #005AED;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.submit-btn:hover {
    background: #0048C7;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(74, 158, 255, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.ms4m-logo {
    position: absolute;
    top: 2rem;
    left: 2rem;
}

.ms4m-logo img {
    width: 120px;
    height: auto;
}

.date-image-desktop {
    position: absolute;
    right: 2rem;
    top: 2rem;
    z-index: 3;
}

.date-image-desktop img {
    height: 545px;
    width: auto;
}

.date-image-mobile {
    display: none;
}

@media (max-width: 768px) {
    body {
        overflow: visible;
        height: auto;
        min-height: 100vh;
    }
    
    .container {
        align-items: flex-start;
        overflow-y: visible;
        padding: 1rem;
        height: auto;
        min-height: 100vh;
    }
    
    .content-wrapper {
        flex-direction: column;
        width: 100%;
        max-width: none;
        border: none;
        background: none;
        box-shadow: none;
        backdrop-filter: none;
    }
    
    .left-section {
        flex: 0 0 auto;
        padding: 2rem 1.5rem;
        text-align: center;
    }
    
    .experience-text .experience{
        font-size: 1rem;
        margin-bottom: 1rem;
    }

    .we-are-miners{
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }

    .en-text{
        align-self: center;
        font-size: 1rem;
    }

    .perumin-logo img{
        width: 100%;
    }
    
    .right-section {
        flex: 1;
        border-left: none;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding: 2rem 1.5rem;
    }
    
    .form-container {
        max-width: none;
    }
    
    .slogan-desktop {
        display: none;
    }
    
    .slogan-mobile {
        display: block;
    }
    
    .form-row {
        flex-direction: row;
    }

    .form-row:has(#nombre) {
        flex-direction: column;
    }

    .form-row:has(#nombre) input {
        flex: 1;
        width: 100%;
    }
    
    .date-image {
        right: 1rem;
        top: 1rem;
    }
    
    .date-image img {
        height: 40px;
    }

    .date-image-desktop {
        display: none;
    }

    .date-image-mobile {
        display: block;
        color: white;
        margin-top: 2rem;
        font-size: 1.5rem;
        text-align: center;
        letter-spacing: 4px;
    }
    
    .date-image-mobile img {
        height: 545px;
        width: auto;
    }
    
    .ms4m-logo {
        position: relative;
        display: block;
        margin: 0 auto;
        top: 0;
        left: 0;
    }
}