/*
BuzónSeguro.org - Estilos CSS Mejorados
Versión: 1.4.1
Fecha: 22 de Junio 2025
Archivo: styles.css v1.4.1
Descripción: Fixes para banner verde y disposición de pasos 2x2
*/

/* Reset y configuración base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    scroll-behavior: smooth;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Leyenda flotante de garantía - MEJORADA */
.guarantee-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    z-index: 1001;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.5s ease-out;
}

.guarantee-content {
    padding: 0.7rem 1rem;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    max-width: 1200px;
    margin: 0 auto;
    line-height: 1.3;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Header - MEJORADO */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 45px; /* Aumentado para dar más espacio */
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    min-height: 60px; /* Altura mínima garantizada */
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: bold;
    color: #4a5568;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    color: white;
    font-weight: bold;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

nav a:hover {
    color: #667eea;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: linear-gradient(135deg, #667eea, #764ba2);
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Main Content - MEJORADO */
main {
    margin-top: 130px; /* Aumentado para acomodar banner + header */
}

section {
    padding: 4rem 0;
    margin-bottom: 2rem;
}

.hero {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin: 2rem 0;
    padding: 4rem 2rem;
    text-align: center;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff, #e2e8f0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Content Sections */
.content-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 3rem;
    margin: 2rem 0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.section-title {
    font-size: 2.5rem;
    color: #2d3748;
    margin-bottom: 2rem;
    text-align: center;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 4px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
}

/* Usage Steps - MEJORADO PARA 2x2 */
.usage-steps {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Forzar exactamente 2 columnas */
    gap: 2rem;
    margin-top: 2rem;
    max-width: 800px; /* Limitar el ancho para mejor apariencia */
    margin-left: auto;
    margin-right: auto;
}

.step {
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    position: relative;
    transition: transform 0.3s ease;
    min-height: 220px; /* Altura mínima consistente */
}

.step:hover {
    transform: translateY(-5px);
}

.step-number {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.step h3 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.step p {
    color: #4a5568;
    line-height: 1.5;
}

/* Form Styles */
.form-container {
    max-width: 800px;
    margin: 0 auto;
}

.anonymity-selector {
    background: #f7fafc;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    border: 2px solid #e2e8f0;
}

.anonymity-title {
    font-size: 1.3rem;
    color: #2d3748;
    margin-bottom: 1rem;
    font-weight: 600;
}

.anonymity-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.anonymity-option {
    background: white;
    border: 3px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    min-height: 120px;
}

.anonymity-option:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.2);
}

.anonymity-option.selected {
    border-color: #667eea;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.anonymity-option h4 {
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.anonymity-option p {
    font-size: 0.9rem;
    line-height: 1.4;
    opacity: 0.9;
}

.anonymity-option input[type="radio"] {
    display: none;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2d3748;
}

.required {
    color: #e53e3e;
}

.optional {
    color: #718096;
    font-size: 0.9rem;
    font-weight: normal;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.contact-fields {
    background: #fef5e7;
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-left: 4px solid #ed8936;
}

.contact-fields-title {
    font-size: 1.1rem;
    color: #c05621;
    margin-bottom: 1rem;
    font-weight: 600;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 1rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

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

/* Privacy Section */
.privacy-content {
    line-height: 1.8;
    color: #4a5568;
}

.privacy-content h3 {
    color: #2d3748;
    margin: 2rem 0 1rem;
    font-size: 1.3rem;
}

.privacy-content ul {
    padding-left: 2rem;
    margin: 1rem 0;
}

.privacy-content li {
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background: rgba(0, 0, 0, 0.8);
    color: white;
    text-align: center;
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-content {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
}

/* Información de versión en el footer */
.version-info {
    margin-top: 1rem;
    opacity: 0.7;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Notificaciones de éxito y error */
.notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    animation: slideInNotification 0.3s ease-out;
}

.notification.success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.notification.error {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
}

.notification-content h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.notification-content p {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

@keyframes slideInNotification {
    from {
        opacity: 0;
        transform: translate(-50%, -60%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

/* Estados del botón de envío */
.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.btn-loader {
    animation: spin 1s linear infinite;
}

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

/* Sección de archivos adjuntos */
.files-section {
    background: #f8fafc;
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    border: 2px dashed #e2e8f0;
    transition: all 0.3s ease;
}

.files-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

.files-title h3 {
    color: #2d3748;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.files-title p {
    color: #718096;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

/* Área de upload */
.file-upload-area {
    border: 3px dashed #cbd5e0;
    border-radius: 12px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
    position: relative;
    overflow: hidden;
}

.file-upload-area:hover {
    border-color: #667eea;
    background: #f7fafc;
    transform: translateY(-2px);
}

.file-upload-area.drag-over {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1), rgba(118, 75, 162, 0.1));
    transform: scale(1.02);
}

.upload-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.6;
}

.upload-text strong {
    color: #2d3748;
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.upload-text p {
    color: #718096;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

#fileInput {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

/* Preview de archivos */
.files-preview {
    margin-top: 1.5rem;
    display: none;
}

.files-list {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.files-list h4 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1rem;
    border-bottom: 1px solid #e2e8f0;
    padding-bottom: 0.5rem;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f7fafc;
    border-radius: 6px;
    border-left: 3px solid #667eea;
}

.file-info {
    flex: 1;
}

.file-name {
    display: block;
    color: #2d3748;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.file-size {
    color: #718096;
    font-size: 0.8rem;
}

.remove-file {
    background: #e53e3e;
    color: white;
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.remove-file:hover {
    background: #c53030;
    transform: scale(1.1);
}

.files-total {
    text-align: right;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e2e8f0;
    color: #4a5568;
    font-weight: 500;
}

/* Notificaciones mejoradas */
.notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 2000;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    animation: slideInNotification 0.4s ease-out;
    cursor: pointer;
    backdrop-filter: blur(10px);
}

.notification.success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.notification.error {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.notification-content h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notification-content p {
    margin-bottom: 0.5rem;
    line-height: 1.5;
    opacity: 0.95;
}

.notification-content p:last-child {
    margin-bottom: 0;
}

@keyframes slideInNotification {
    from {
        opacity: 0;
        transform: translate(-50%, -60%) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Tooltip de validación mejorado */
.validation-tooltip {
    position: absolute !important;
    background: #e53e3e !important;
    color: white !important;
    padding: 0.5rem !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    z-index: 1000 !important;
    margin-top: 5px !important;
    white-space: nowrap !important;
    box-shadow: 0 2px 8px rgba(229, 62, 62, 0.3) !important;
    animation: fadeInTooltip 0.2s ease-out !important;
}

.validation-tooltip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 10px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #e53e3e;
}

@keyframes fadeInTooltip {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Contador de caracteres mejorado */
.char-counter {
    text-align: right;
    font-size: 0.8rem;
    margin-top: 0.5rem;
    transition: color 0.3s ease;
}

/* Mejoras en campos de formulario */
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.form-group input.valid {
    border-color: #48bb78;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2348bb78' d='m6.564.75-3.59 3.612-1.538-1.55L0 4.26 2.974 7.25 8 2.193z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

.form-group input.invalid {
    border-color: #e53e3e;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23e53e3e'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.5 5.5 1 1m0-1-1 1'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
}

/* Animaciones de progreso */
.progress-bar {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin-top: 1rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 2px;
    transition: width 0.3s ease;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.notification.info {
    background: linear-gradient(135deg, #3182ce, #2c5282);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

/* Mobile Responsiveness - MEJORADO */
@media (max-width: 768px) {
    /* Banner más compacto en móvil */
    .guarantee-content {
        font-size: 0.8rem;
        padding: 0.5rem 0.5rem;
        line-height: 1.2;
    }
    
    /* Header ajustado para móvil */
    header {
        top: 60px; /* Reducido para móvil */
    }
    
    .header-content {
        flex-direction: column;
        gap: 1rem;
        padding: 0.8rem 0;
    }

    .logo {
        font-size: 1.5rem;
    }

    .logo-icon {
        width: 35px;
        height: 35px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    nav a {
        font-size: 0.9rem;
    }

    /* Main con margen ajustado para móvil */
    main {
        margin-top: 160px; /* Reducido pero suficiente para móvil */
    }

    .hero h1 {
        font-size: 1.7rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .content-section {
        padding: 2rem 1rem;
    }

    /* Steps ajustados para móvil - en columna */
    .usage-steps {
        grid-template-columns: 1fr; /* Una sola columna en móvil */
        gap: 1.5rem;
        max-width: none;
    }

    .step {
        min-height: auto;
        padding: 1.5rem;
    }

    .step h3 {
        font-size: 1.1rem;
    }

    .anonymity-options {
        grid-template-columns: 1fr;
    }
    
    /* Archivos mejorados para móvil */
    .files-section {
        padding: 1.5rem 1rem;
    }
    
    .file-upload-area {
        padding: 2rem 1rem;
    }
    
    .upload-icon {
        font-size: 2rem;
    }
    
    .upload-text strong {
        font-size: 1rem;
    }
    
    .file-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .remove-file {
        align-self: flex-end;
    }
    
    .notification {
        padding: 1.5rem;
        margin: 1rem;
        width: auto;
        left: 1rem;
        right: 1rem;
        transform: translateY(-50%);
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .usage-steps {
        grid-template-columns: repeat(2, 1fr); /* Mantener 2x2 en tablet */
        gap: 1.8rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-section {
    animation: fadeInUp 0.6s ease-out;
}

/* Fin del archivo styles.css v1.4.1 - MEJORADO */