/* 
 * SAMEX Premium Client Styles
 * Vanilla CSS implementation with dark mode, glassmorphism, and micro-animations
 */

:root {
    --samex-red: #dc2626;
    --samex-red-hover: #ef4444;
    --samex-red-dark: #b91c1c;
    --dark-bg: #0a0a0a;
    --card-bg: rgba(26, 26, 26, 0.75);
    --text-main: #ffffff;
    --text-muted: #a3a3a3;
    --border-color: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.05);
}

.client-body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #171717 0%, #0a0a0a 100%);
    background-attachment: fixed;
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

/* TOPBAR CLIENTE */
.client-topbar {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.client-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0.6rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo img {
    height: 2rem;
    width: auto;
    transition: transform 0.3s ease;
}

.brand-logo:hover img {
    transform: scale(1.05);
}

.client-nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.client-nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

.client-nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--samex-red);
    transition: width 0.3s ease;
}

.client-nav-links a:hover {
    color: var(--samex-red-hover);
}

.client-nav-links a:hover::after,
.client-nav-links a.active::after {
    width: 100%;
}

.btn-admin-link {
    background-color: var(--samex-red);
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(220, 38, 38, 0.3);
}

.btn-admin-link:hover {
    background-color: var(--samex-red-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(220, 38, 38, 0.4);
}

/* MAIN CONTENT (INICIO) */
.client-main {
    flex-grow: 1;
}

.inicio-wrapper {
    min-height: calc(100vh - 4.7rem);
    /* Restando la altura del header aprox */
    background-image: linear-gradient(to bottom, rgba(10, 10, 10, 0.5), rgba(10, 10, 10, 0.9)), url('../img/fondo.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.inicio-split-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3rem;
    width: 100%;
    max-width: 96%;
    margin: 2rem auto;
}

@media (min-width: 900px) {
    .inicio-split-layout {
        flex-direction: row;
        align-items: stretch;
        justify-content: space-between;
        gap: 4rem;
        margin: 4rem auto;
    }

    .inicio-hero {
        flex: 1.2;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .inicio-hero .titulo-destacado {
        align-items: flex-start;
    }

    .inicio-form-container {
        flex: 1;
        display: flex;
        justify-content: flex-end;
    }
}

.hero-features {
    list-style: none;
    padding: 0;
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hero-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
}

.hero-features i {
    color: var(--samex-red);
    font-size: 1.25rem;
}

.inicio-card {
    background: var(--card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-top: 3px solid var(--samex-red);
    border-radius: 24px;
    position: relative;
    animation: slideUpFade 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.inicio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
    pointer-events: none;
}

.titulo-destacado {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 0 0.5rem 0;
    line-height: 1;
}

.eyebrow-text {
    font-size: 0.8rem;
    letter-spacing: 0.15em;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
}

.txt-blanco {
    color: var(--text-main);
    font-size: 2.25rem;
    font-weight: 900;
    letter-spacing: -0.02em;
}

.txt-rojo {
    color: var(--samex-red);
    font-size: 2.5rem;
    font-weight: 900;
    letter-spacing: -0.02em;
    text-shadow: 0 0 20px rgba(220, 38, 38, 0.3);
}

.subtitulo-italico {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 2.5rem;
    font-size: 0.95rem;
    font-weight: 400;
}

.floating-label-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.floating-input,
.floating-select {
    width: 100%;
    padding: 1.1rem 1rem 0.4rem 2.7rem !important;
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 12px !important;
    color: var(--text-main) !important;
    font-size: 0.9rem !important;
    transition: all 0.3s ease !important;
    height: 3.5rem;
}

.floating-input:focus,
.floating-select:focus {
    border-color: var(--samex-red) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2) !important;
    outline: none;
}

.icon-input {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1.25rem;
    z-index: 1;
    pointer-events: none;
    transition: color 0.3s ease;
}

.floating-label-group label {
    position: absolute;
    left: 2.7rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
    pointer-events: none;
    transition: all 0.3s ease;
    margin: 0 !important;
    text-transform: none !important;
    font-weight: 500 !important;
}

/* Float condition */
.floating-input:focus~label,
.floating-input:not(:placeholder-shown)~label,
.floating-select:focus~label,
.floating-select:valid~label,
.floating-input:-webkit-autofill~label {
    top: 0.7rem;
    font-size: 0.65rem;
    color: var(--samex-red);
    font-weight: 700 !important;
    text-transform: uppercase !important;
}

.floating-input:focus~.icon-input,
.floating-select:focus~.icon-input {
    color: var(--samex-red);
}

.floating-select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%239ca3af%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 1rem center !important;
    background-size: 0.65em auto !important;
    cursor: pointer;
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-main);
    font-size: 0.875rem;
    font-family: inherit;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--samex-red);
    background: rgba(0, 0, 0, 0.6);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.2);
}

.form-group input::placeholder {
    color: #6b7280;
}

/* Fix para el fondo blanco del autocompletado en navegadores webkit */
.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus,
.form-group input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #1c1c1c inset !important;
    -webkit-text-fill-color: var(--text-main) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.input-readonly {
    background: rgba(255, 255, 255, 0.05) !important;
    color: #9ca3af !important;
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

.select-wrapper {
    position: relative;
}

.select-wrapper::after {
    content: '\25BC';
    position: absolute;
    right: 1.2rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    font-size: 0.75rem;
}

.form-group select {
    appearance: none;
    cursor: pointer;
    padding-right: 3rem;
}

.form-group select option {
    background: var(--dark-bg);
    color: var(--text-main);
    padding: 10px;
}

.btn-primary {
    width: 100%;
    padding: 0.875rem;
    background: var(--samex-red);
    color: white;
    border: 2px solid var(--samex-red);
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover {
    background: #ffffff;
    color: var(--samex-red);
    border-color: var(--samex-red);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.4);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:active {
    transform: translateY(0);
}

/* MODAL */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    padding: 1.75rem;
    transform: translateY(20px) scale(0.95);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.modal-header h3 {
    margin: 0;
    color: var(--samex-red);
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 800;
}

.close-modal {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 0;
    line-height: 1;
}

.close-modal:hover {
    color: var(--text-main);
}

.modal-body {
    color: var(--text-main);
    line-height: 1.5;
    font-size: 0.85rem;
}

.modal-body ul {
    list-style: none;
    padding: 0;
    margin-top: 1.25rem;
}

.modal-body li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.6rem 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.02);
}

.modal-body li i {
    color: var(--samex-red);
    font-size: 1.1rem;
}

.modal-footer {
    margin-top: 1.5rem;
}

.btn-animated {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.btn-animated i {
    transition: transform 0.3s ease;
}

.btn-animated:hover i {
    transform: translateX(5px);
}

/* ANIMATIONS */
@keyframes slideUpFade {
    0% {
        opacity: 0;
        transform: translateY(40px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .client-nav-links {
        display: none;
        /* Se podría implementar un menú hamburguesa luego */
    }

    .inicio-card {
        padding: 2rem;
    }

    .txt-blanco {
        font-size: 2rem;
    }

    .txt-rojo {
        font-size: 2.2rem;
    }

    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .footer-separator {
        display: none;
    }

    .footer-contact {
        flex-direction: column;
        align-items: center;
    }
}

/* FOOTER CLIENTE */
.client-footer {
    background-color: var(--samex-red-dark);
    color: white;
    padding: 0.4rem 0;
    margin-top: auto;
    font-family: 'Inter', sans-serif;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.footer-left {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.footer-center {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: center;
    flex: 0 0 auto;
    font-size: 0.75rem;
    font-weight: 700;
}

.footer-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
}

.footer-brand {
    display: flex;
    align-items: center;
}

.footer-logo-text {
    font-size: 1.25rem;
    font-weight: 900;
    font-style: italic;
    letter-spacing: -0.05em;
    color: #ffffff;
}

.footer-separator {
    width: 1px;
    min-height: 2rem;
    background-color: rgba(255, 255, 255, 0.3);
}

.footer-info {
    font-size: 0.75rem;
    line-height: 1.4;
    font-weight: 600;
}

.footer-info p {
    margin: 0;
}

.copyright {
    font-size: 0.75rem;
    opacity: 0.8;
    margin-left: 1rem;
    font-weight: 500;
}


.contact-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-item i {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

/* WhatsApp Floating Button */
.floating-whatsapp {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: #25D366;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 10px 30px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    text-decoration: none;
    transition: 0.3s;
    animation: pulse-green 2s infinite;
}

.floating-whatsapp:hover {
    transform: scale(1.1);
    color: #fff;
}

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}