:root {
    --primary: #17a2b8;
    --primary-hover: #3a56d4;
    --secondary: #2b2d42;
    --background: #f8f9fa;
    --white: #ffffff;
    --error: #e63946;
    --success: #2a9d8f;
    --border: #e0e0e0;
    --gray-light: #f4f6f8;
    --transition: all 0.3s ease;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Nunito', sans-serif;
}

body {
    background-image: var(--background);
    color: var(--secondary);
    min-height: 100vh;
}


/* Contenedor principal */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.form-header {
    text-align: center;
    margin-bottom: 2rem;
}

.form-header h1 {
    font-size: 2.2rem;
    color: var(--secondary);
    margin-bottom: 1rem;
}

.form-header p {
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
}

.progress-container {
    margin: 2rem auto;
    max-width: 800px;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 30px;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: #e2e8f0;
    z-index: 1;
}

.progress-bar {
    position: absolute;
    top: 15px;
    left: 0;
    height: 4px;
    background-color: var(--primary);
    width: 0%;
    transition: 0.4s ease;
    z-index: 2;
}

.step {
    position: relative;
    z-index: 3;
    text-align: center;
}

.step-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background-color: white;
    border: 4px solid #e2e8f0;
    margin: 0 auto 8px;
    transition: var(--transition);
}

.step.active .step-circle {
    border-color: #17a2b8);
    background-color: #17a2b8;
    color: white;
}

.step.completed .step-circle {
    background-color: var(--primary);
    border-color: var(--primary);
    color: white;
}

.step-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #64748b;
}

.step.active .step-label,
.step.completed .step-label {
    color: var(--secondary);
}

/* Tarjeta de formulario */
.form-card {
    background-color: var(--white);
    border-radius: 16px;
    box-shadow: 10px 10px 30px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeIn 0.6s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-container {
    padding: 2rem;
}

.section {
    display: none;
}

.section.active {
    display: block;
    animation: slideIn 0.5s forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.section-title {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #17a2b8;
    color: #17a2b8;
    display: flex;
    align-items: center;
}

.section-title i {
    margin-right: 10px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: #475569;
}

.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

input,
select {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
    background-color: var(--gray-light);
}

input:focus,
select:focus {
    outline: none;
    border-color: #17a2b8;
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.15);
    background-color: white;
}

.error-message {
    color: var(--error);
    font-size: 0.8rem;
    margin-top: 0.5rem;
    display: none;
}

.error-message.visible {
    display: block;
    animation: shake 0.4s;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    75% {
        transform: translateX(5px);
    }
}

input.error,
select.error {
    border-color: var(--error);
    background-color: rgba(230, 57, 70, 0.05);
}

.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
}

button {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

button i {
    margin-right: 8px;
}

.btn-primary {
    background-color: var(--primary);
    color: white;
}

.btn-primary:hover {
    filter:brightness(1.05);
    background-color: #3cb5c8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.2);
}

.btn-secondary {
    background-color: #f1f5f9;
    color: #64748b;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
    color: var(--secondary);
}

.btn-outline {
    background-color: transparent;
    border: 1px solid #cbd5e1;
    color: #64748b;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-icon-only {
    padding: 0.75rem;
    border-radius: 50%;
    min-width: 44px;
}

.btn-icon-only i {
    margin: 0;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: 0.3s ease;
    z-index: 1001;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background-color: white;
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    transform: scale(0.8);
    opacity: 0;
    transition: 0.3s ease;
}

.modal-overlay.active .modal {
    transform: scale(1);
    opacity: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.modal-title {
    font-size: 1.5rem;
    color: var(--secondary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #94a3b8;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--error);
}

.modal-body {
    margin-bottom: 1.5rem;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Tooltip */
.tooltip {
    position: relative;
    display: inline-block;
    margin-left: 6px;
}

.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: #e2e8f0;
    color: #64748b;
    font-size: 12px;
    cursor: pointer;
}

.tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: var(--secondary);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.8rem;
    font-weight: normal;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: var(--secondary) transparent transparent transparent;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Success animation */
.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    margin-bottom: 1rem;
}

.check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid var(--success);
}

.check-icon::before {
    top: 3px;
    left: -2px;
    width: 30px;
    transform-origin: 100% 50%;
    border-radius: 100px 0 0 100px;
}

.check-icon::after {
    top: 0;
    left: 30px;
    width: 60px;
    transform-origin: 0 50%;
    border-radius: 0 100px 100px 0;
    animation: rotate-circle 4.25s ease-in;
}

.check-icon::before,
.check-icon::after {
    content: '';
    height: 100px;
    position: absolute;
    background: white;
    transform: rotate(-45deg);
}

.check-icon .icon-line {
    height: 5px;
    background-color: var(--success);
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 10;
}

.check-icon .icon-line.line-tip {
    top: 46px;
    left: 14px;
    width: 25px;
    transform: rotate(45deg);
    animation: icon-line-tip 0.75s;
}

.check-icon .icon-line.line-long {
    top: 38px;
    right: 8px;
    width: 47px;
    transform: rotate(-45deg);
    animation: icon-line-long 0.75s;
}

.check-icon .icon-circle {
    top: -4px;
    left: -4px;
    z-index: 10;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: absolute;
    box-sizing: content-box;
    border: 4px solid rgba(42, 157, 143, 0.5);
}

.check-icon .icon-fix {
    top: 8px;
    width: 5px;
    left: 26px;
    z-index: 1;
    height: 85px;
    position: absolute;
    transform: rotate(-45deg);
    background-color: white;
}

@keyframes rotate-circle {
    0% {
        transform: rotate(-45deg);
    }

    5% {
        transform: rotate(-45deg);
    }

    12% {
        transform: rotate(-405deg);
    }

    100% {
        transform: rotate(-405deg);
    }
}

@keyframes icon-line-tip {
    0% {
        width: 0;
        left: 1px;
        top: 19px;
    }

    54% {
        width: 0;
        left: 1px;
        top: 19px;
    }

    70% {
        width: 50px;
        left: -8px;
        top: 37px;
    }

    84% {
        width: 17px;
        left: 21px;
        top: 48px;
    }

    100% {
        width: 25px;
        left: 14px;
        top: 45px;
    }
}

@keyframes icon-line-long {
    0% {
        width: 0;
        right: 46px;
        top: 54px;
    }

    65% {
        width: 0;
        right: 46px;
        top: 54px;
    }

    84% {
        width: 55px;
        right: 0px;
        top: 35px;
    }

    100% {
        width: 47px;
        right: 8px;
        top: 38px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        padding: 1rem;
    }

    .nav {
        position: fixed;
        top: 71px;
        left: -100%;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        height: calc(100vh - 71px);
        transition: 0.3s ease;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        z-index: 999;
        padding: 2rem;
    }

    .nav.active {
        left: 0;
    }

    .nav li {
        margin: 1.5rem 0;
        text-align: center;
    }

    .nav a {
        font-size: 1.2rem;
    }

    .menu-toggle {
        display: flex;
    }

    .progress-steps::before {
        display: none;
    }

    .progress-bar {
        display: none;
    }

    .progress-steps {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .step {
        display: flex;
        align-items: center;
    }

    .step-circle {
        margin: 0 1rem 0 0;
    }

    .form-container {
        padding: 1.5rem;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-navigation {
        flex-direction: column;
        gap: 1rem;
    }

    .form-navigation button {
        width: 100%;
    }
}
