/* Registro Styles */

.registro-container {
    width: 100%;
    min-height: 100vh;
    padding: 70px 20px 30px;
    position: relative;
    z-index: 2;
    overflow-x: hidden;
    box-sizing: border-box;
}

.registro-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    gap: clamp(30px, 4vw, 50px);
    align-items: center; /* Centered vertically */
    justify-content: center;
}

/* Imagen de campaña - Lado izquierdo */
.registro-imagen {
    flex: 0 1 55%;
    max-width: 900px;
    display: flex;
    flex-direction: column; /* Stack image and button */
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.imagen-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.campana-image {
    top: 0;
    width: 100%;
    max-width: 125%; /* Significantly increased size */
    height: auto;
    display: block;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.3));
    transform: scale(1.15);
    transition: transform 0.3s ease;
}

.campana-image:hover {
    transform: scale(1.12);
}

.avion-papel {
    position: absolute;
    top: 45%; 
    left: -2%; 
    width: clamp(150px, 27vw, 350px); 
    height: auto;
    transform: rotate(5deg); 
    pointer-events: none;
    user-select: none;
    z-index: -10;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.4));
    animation: planeFloat 5s ease-in-out infinite;
}

@keyframes planeFloat {
    0% {
        transform: translate3d(0, 0, 0) rotate(-6deg);
    }
    50% {
        transform: translate3d(10px, -15px, 0) rotate(-8deg);
    }
    100% {
        transform: translate3d(0, 0, 0) rotate(-6deg);
    }
}

/* Formulario - Lado derecho */
.registro-form-wrapper {
    flex: 0 1 50%;
    max-width: 520px;
    width: 100%;
    margin-top: 0px; /* Removed top margin */
}

.registro-title {
    text-align: center;
    font-size: clamp(28px, 4vw, 42px); /* Reduced font size */
    font-weight: 900;
    color: #ffffff;
    text-transform: uppercase;
    margin: 0 0 10px; /* Reduced margin */
    text-shadow:
        0 4px 8px rgba(0, 0, 0, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 1.5px;
}

.registro-form {
    display: flex;
    flex-direction: column;
    gap: 2px; /* Tighter gap */
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px; /* Reduced gap */
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.registro-form .form-control {
    width: 100%;
    height: 38px; 
    padding: 0 15px;
    font-size: 14px;
    border: none !important;
    border-radius: 6px !important;
    background: #ffffff;
    color: #4E2E04; /* Color Café */
    outline: none;
    transition: box-shadow 0.2s ease;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 700;
}

.registro-form .form-control::placeholder {
    color: #999999;
}

.registro-form .form-control:focus {
    box-shadow: 0 0 0 2px #4E2E04; /* Brown focus ring for accessibility */
}

.registro-form select.form-control {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23FC4511' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 12px;
    padding: 0 35px 0 10px !important;
    cursor: pointer;
    border: none;
    width: 100%;
    border-radius: 6px !important;
    line-height: 38px;
    height: 38px; /* Strict height match */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    text-align-last: center; /* Try to center text in select */
    -moz-text-align-last: center;
}


/* Date input special styling */
.form-group-date {
    position: relative;
    grid-column: 1 / -1;
}

.form-label,
.form-label-date {
    color: #ffffff;
    font-size: 13px; /* Fixed smaller size */
    font-weight: 600;
    margin-bottom: 2px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    display: block;
}

.required-asterisk {
    color: #622E1A;
    font-weight: 900;
    margin-left: 4px;
    font-size: 16px;
    display: inline;
    line-height: 0;
    vertical-align: middle;
}

.form-group-date input[type="date"] {
    position: relative;
    color: #999999;
}

.form-group-date input[type="date"]::-webkit-calendar-picker-indicator {
    position: absolute;
    right: 14px;
    cursor: pointer;
    opacity: 1;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="%23FC4511" viewBox="0 0 16 16"><path d="M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z"/></svg>'); 
    background-position: center;
    background-repeat: no-repeat;
    background-size: 16px;
    width: 20px; /* Ensure clickable area */
    height: 20px;
}

.form-group-date input[type="date"]:valid {
    color: #333333;
}

/* Checkboxes */
.form-checkboxes {
    display: flex;
    flex-direction: column;
    padding-left: clamp(0px, 5%, 5%);
    gap: 4px;
    margin-top: 4px;
}


.checkbox-label {
    display: flex;
    align-items: center;
    gap: 7px;
    cursor: default; /* Changed to default as only box is clickable for check */
    user-select: none;
    justify-content: center; /* Center the checkbox area */
    padding: 8px;
    background: rgba(0, 0, 0, 0.1); /* Subtle background to frame it */
    border-radius: 12px;
    transition: background 0.2s ease;
}

.checkbox-label:hover {
    background: rgba(0, 0, 0, 0.15);
}

.checkbox-label input[type="checkbox"] {
    width: 22px; /* Larger checkbox */
    height: 22px;
    cursor: pointer;
    accent-color: #F3C302;
    flex-shrink: 0;
    border-radius: 4px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.checkbox-text {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.checkbox-text a {
    color: #F3C302; /* Yellow color for the link */
    text-decoration: underline;
    text-decoration-thickness: 2px;
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.checkbox-text a:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(243, 195, 2, 0.8);
}

/* Yellow Brush Button Styles */
.btn-yellow {
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url('assets/img/TrazadoAmarillo.webp');
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent !important;
    color: #E63312; /* Red/Orange text */
    font-weight: 900;
    text-transform: uppercase;
    text-decoration: none;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
    font-family: inherit;
    padding: 10px 30px 15px; /* Compact padding */
}

.btn-yellow:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
}

.btn-yellow:active {
    transform: scale(0.98);
}

.btn-mecanica {
    width: 60%;
    min-width: 250px;
    max-width: 350px;
    font-size: 18px;
    margin-top: 0px; /* Moved up significantly */
    z-index: 5;
    text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.4);
}

.form-submit {
    margin-top: 8px;
    display: flex;
    justify-content: center;
    width: 100%;
}

.btn-submit {
    width: 90%;
    max-width: 450px;
    font-size: 18px;
    padding: 12px 30px 18px;
}


/* Responsive Design */

/* Medium desktop */
@media (max-width: 1350px) and (min-width: 1025px) {
    .registro-imagen {
        flex: 0 1 45%;
        max-width: 550px;
    }
    .campana-image {
        max-width: 100%;
        transform: scale(1.05);
    }
}

/* Tablet */
@media (max-width: 1024px) {
    .registro-content {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .registro-imagen {
        flex: 0 0 auto;
        max-width: 600px;
        width: 90%;
        margin-bottom: 20px;
    }

    .btn-mecanica {
        margin-top: -10px;
    }

    .registro-form-wrapper {
        width: 100%;
        max-width: 520px;
    }

    .registro-container {
        padding: 90px 20px 50px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .registro-container {
        padding: 80px 16px 40px;
    }

    .registro-imagen {
        max-width: 100%;
        width: 100%;
        padding: 0 10px;
        box-sizing: border-box;
    }
    
    .imagen-wrapper {
        margin-bottom: 15px;
    }

    .avion-papel {
        width: 150px;
        bottom: -15px;
        left: 0%;
    }

    .btn-mecanica {
        width: 100%;
        max-width: 320px;
        margin-top: 0;
    }

    .form-row {
        grid-template-columns: 1fr; /* Switch to column on mobile */
    }
}

/* Small screens */
@media (max-width: 600px) {
    .registro-container {
        padding: 80px 10px 40px;
    }

    .btn-submit {
        width: 100%;
        padding: 12px 20px 16px;
        font-size: 16px;
    }
}

/* Validation Styles */
.registro-form .form-control.is-invalid,
.registro-form input.is-invalid {
    border: 2px solid #ff0000 !important;
    background-color: #fac8c8 !important;
}

.registro-form .form-control.is-invalid:focus {
    box-shadow: 0 0 0 3px rgb(82, 1, 1) !important;
}

.invalid-feedback {
    display: none;
    color: #ffffff;
    font-size: 12px;
    margin-top: 4px;
    font-weight: 700;
    text-align: left;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.form-group.has-error .invalid-feedback {
    display: block;
}

/* Image Buttons Styles */
.btn-img-wrapper {
    display: inline-block;
    transition: transform 0.2s ease;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    text-decoration: none;
}

.btn-img-wrapper:hover {
    transform: scale(1.05);
}

.btn-img-wrapper img {
    width: 100%;
    height: auto;
    display: block;
}

.btn-mecanica-link {
    width: 90%;
    max-width: 450px;
    margin-top: 10px;
    display: flex;
    justify-content: center;
}

.btn-submit-button {
    width: 90%;
    max-width: 450px;
    display: flex;
    justify-content: center;
    background: transparent;
}

/* Processing Button Styles */
.btn-processing {
    width: 90%;
    max-width: 450px;
    height: 70px; /* Approximate height of the original button image */
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url("/public/assets/img/TrazadoAmarillo.webp");
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
    background-color: transparent !important;
    color: #E63312; /* Red/Orange text to match theme */
    font-weight: 900;
    text-transform: uppercase;
    font-size: 20px;
    border: none !important;
    outline: none !important;
    cursor: not-allowed;
    opacity: 0.9;
    padding-bottom: 5px;
    margin: 0 auto;
    text-shadow: 0px 1px 0px rgba(255, 255, 255, 0.4);
}