/* Variables y Reset Mobile-First */
:root {
    --avon-pink: #E2136E; 
    --avon-dark: #333333;
    --bg-light: #F9F9F9;
    --white: #FFFFFF;
    --natura-orange: #F47920; /* Añadido para Natura */
    --font-main: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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

body {
    font-family: var(--font-main);
    color: var(--avon-dark);
    background-color: var(--bg-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { color: var(--avon-pink); margin-bottom: 15px; font-weight: 700; }
p { margin-bottom: 15px; font-size: 1rem; }

.container { width: 100%; padding: 20px; max-width: 1200px; margin: 0 auto; }

.btn {
    display: inline-block;
    background-color: var(--avon-pink);
    color: var(--white);
    padding: 14px 24px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    text-align: center;
    border: none;
    cursor: pointer;
    width: 100%; 
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
    box-shadow: 0 4px 6px rgba(226, 19, 110, 0.3);
}

.btn:hover { background-color: #c0105c; transform: translateY(-2px); }

header {
    background-color: var(--white);
    padding: 15px 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: center;
}

/* Hero */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), url('https://aibv-public-assets.prd.naturacloud.com/landing-page/hero-image-pe.jpg') no-repeat center center/cover;
    color: var(--white);
    text-align: center;
    padding: 60px 20px;
}
.hero h1 { color: var(--white); font-size: 2.2rem; margin-bottom: 15px; line-height: 1.2; }
.hero h2 { color: #f8cce0; font-size: 1.2rem; font-weight: 400; margin-bottom: 25px; }

/* Nuevas Secciones Adaptadas de Natura */
.time-profit, .dual-brand {
    background-color: var(--white);
    padding: 40px 20px;
    text-align: center;
    margin-top: 20px;
}

.grid-cards {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 20px;
}

.info-card {
    background: var(--bg-light);
    padding: 25px 20px;
    border-radius: 8px;
    border-top: 4px solid var(--avon-pink);
    text-align: left;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.welfare-banner {
    background-color: #ffe6f0;
    padding: 25px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: left;
    border-left: 5px solid var(--avon-pink);
}

.welfare-banner h3 { color: var(--avon-dark); }

.brand-box {
    background: var(--white);
    padding: 25px;
    border-radius: 8px;
    border: 2px solid #eee;
    text-align: center;
}

.brand-avon { border-top: 5px solid var(--avon-pink); }
.brand-natura { border-top: 5px solid var(--natura-orange); }

/* Formulario */
.form-section {
    background-color: var(--white);
    padding: 40px 20px;
    margin: 40px auto 20px auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    max-width: 700px;
}
.form-section h2 { text-align: center; margin-bottom: 10px; }

.trust-badge {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 25px;
    background: #f1f1f1;
    padding: 10px;
    border-radius: 4px;
}

.form-group { margin-bottom: 18px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: bold; font-size: 0.95rem; }

.form-group input, .form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
    font-family: var(--font-main);
    background-color: var(--bg-light);
}
.form-group input:focus, .form-group select:focus {
    outline: none;
    border-color: var(--avon-pink);
    background-color: var(--white);
}

/* Media Queries (Escritorio) */
@media (min-width: 768px) {
    .hero { padding: 100px 40px; }
    .hero h1 { font-size: 3rem; }
    .hero h2 { font-size: 1.5rem; }
    .grid-cards { flex-direction: row; justify-content: space-between; }
    .info-card, .brand-box { flex: 1; }
    .btn { width: auto; min-width: 300px; }
    header { text-align: left; padding: 20px 40px; }
    .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
    .full-width { grid-column: span 2; }
}

.side-lines {
    display: flex;         /* Enables flexbox layout */
    align-items: center;   /* Vertically centers the lines with the text */
    text-align: center;    /* Keeps text centered if it wraps */
    font-weight: bold;
}

.side-lines::before,
.side-lines::after {
    content: "";           /* Necessary for pseudo-elements to show up */
    flex: 1;               /* Makes lines grow to fill available space */
    height: 1px;           /* Line thickness */
    background: #333;      /* Line color */
    margin: 0 15px;        /* Space between text and lines */
}

.upload-btn-wrapper input[type=file] {
    font-size: 100px !important;
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    opacity: 0 !important;
}

.upload-btn-wrapper {
    position: relative !important;
    overflow: hidden !important;
    display: inline-block ;
}

.upload-btn-wrapper .btn {
    border: 2px solid gray !important;
    color: gray !important;
    background-color: white !important;
    border-radius: 8px !important;
    font-weight: bold !important;
}

/* Contenedor que agrupa los botones */
.toggle-group {
    display: inline-flex;
    border: 1px solid #E2136E; /* Color oscuro similar a 'btn-outline-dark' */
    border-radius: 0.25rem;
    overflow: hidden;
    font-family: system-ui, -apple-system, sans-serif;
}

/* Ocultamos los círculos predeterminados de los radio buttons */
.toggle-group input[type="radio"] {
    display: none;
}

/* Estilos de los botones (etiquetas) */
.toggle-btn {
    padding: 0.375rem 0.75rem;
    cursor: pointer;
    color: #212529;
    background-color: transparent;
    margin: 0;
    font-size: 1rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out;
}

/* Añade una línea divisoria entre los botones */
.toggle-group input[type="radio"] + .toggle-btn {
    border-left: 1px solid #E2136E;
}

/* Eliminamos el borde izquierdo del primer botón para que no se duplique */
.toggle-group input[type="radio"]:first-of-type + .toggle-btn {
    border-left: none;
}

/* Efecto al pasar el cursor por encima */
.toggle-btn:hover {
    background-color: #E2136E;    
    color: #fff;
}

/* Estilo cuando el radio button está seleccionado */
.toggle-group input[type="radio"]:checked + .toggle-btn {
    background-color: #E2136E;
    color: #fff;
}
/* Estado inicial (Oculto) */
.ine-wrapper {
    display: grid;
    grid-template-rows: 0fr; /* Altura colapsada a cero */
    opacity: 0; /* Totalmente transparente */
    transition: grid-template-rows 0.4s ease, opacity 0.4s ease;
    overflow: hidden; /* Evita que el contenido se desborde al achicarse */
}

/* Es necesario para que el truco de Grid funcione correctamente */
.ine-wrapper > div {
    min-height: 0; 
}

/* Estado activo (Visible) */
.ine-wrapper.mostrar {
    grid-template-rows: 1fr; /* Crece hasta su altura natural */
    opacity: 1; /* Totalmente visible */
}
/* 1. MÓVIL PRIMERO (Estilos base para pantallas pequeñas) */
.input-foto-container {
    display: flex;
    flex-direction: column; /* Apila el botón y la miniatura verticalmente en móviles */
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.input-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%; /* El contenedor ocupa todo el ancho disponible */
}

/* Ocultar el input original */
.input-file-oculto {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

/* El botón modernizado */
.btn-subir {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 100%; /* Botón grande y fácil de tocar con el pulgar en móviles */
    background-color: #fff;
    color: #E2136E; /* Tu color rosa Avon */
    border: 2px solid #E2136E;
    padding: 14px 20px; /* Área de toque (touch target) más amplia */
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.1s ease;
}

/* Micro-interacción: ligero hundimiento al presionar */
.btn-subir:active {
    transform: scale(0.98);
}

.btn-subir:hover {
    background-color: #E2136E;
    color: #fff;
}

.icon {
    margin-right: 8px;
}

/* La miniatura fluida y moderna */
.thumbnail-preview {
    width: 100%;
    max-width: 400px; /* Crece en móvil pero tiene un límite prudente */
    aspect-ratio: 3 / 2; 
    border: 2px dashed #cbd5e1;
    border-radius: 12px; /* Bordes más amigables */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: #f8fafc;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

/* Magia de 2026: Si el contenedor TIENE una imagen dentro, cambia sus estilos */
.thumbnail-preview:has(img) {
    border-style: solid;
    border-color: #E2136E; /* Resalta el marco con tu color de marca para indicar éxito */
    background-color: transparent;
}

.thumbnail-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Evita que la foto se deforme o aplaste */
}

/* 2. ADAPTACIÓN A PANTALLAS MÁS GRANDES (Tablets y Desktop) */
@media (min-width: 720px) {
    .input-foto-container {
        flex-direction: row; /* Coloca el botón y la miniatura lado a lado */
        align-items: center;
    }

    .input-col {
        width: auto; /* El contenedor ya no fuerza el 100% */
    }

    .btn-subir {
        width: auto; /* El botón se ajusta a la medida del texto */
    }
    
    .thumbnail-preview {
        width: 240px; /* Tamaño compacto cuando está al lado del botón */
    }
}
