/* =================================================================== */
/* === WORKLIVE - ESTILO MODERNO PROFESIONAL (v5 - Final Corregido) ==== */
/* =================================================================== */

/* --- 1. Variables Globales y Reseteo --- */
:root {
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    --color-text: #1d1d1f;
    --color-text-secondary: #515154;
    --color-link: #0066cc;
    --color-link-hover: #0077ed;
    --color-background: #f5f5f7;
    --color-surface: #ffffff;
    --color-border: #d2d2d7;
    --border-radius: 8px;
    --header-height: auto; /* Altura automática para header de varias líneas */
}

html {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.65;
    color: var(--color-text);
    background-color: var(--color-background);
}

/* --- 2. Tipografía y Estilos de Texto --- */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
    margin: 1.5em 0 0.8em 0;
}
h1 { font-size: 2.2rem; }
h2 { font-size: 1.75rem; border-bottom: 1px solid var(--color-border); padding-bottom: 0.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1.1rem; }
p { margin: 0 0 1em 0; }
a { color: var(--color-link); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--color-link-hover); text-decoration: underline; }

/* --- 3. Layout Principal --- */
.page-container {
	/* position: relative; */
    max-width: 960px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}
main {
/*
    background-color: var(--color-surface);
    padding: 2rem 2.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
*/
}
hr {
    border: 0;
    border-top: 1px solid var(--color-border);
    margin: 2.5em 0;
}

/* --- 4. Encabezado (Header) - CORREGIDO PARA TU HTML --- */
.site-header.multi-line {
    padding: 0.8rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
}
.header-top-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: grey;
}
.header-logo h1 {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 100;
    margin: 0rem;
    color: grey;
    border: none;
    padding: 0;
}
.header-name h1 {
    font-family: var(--font-sans);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--color-text);
    border: none;
    padding: 0;
}
.header-right-controls {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.language-switcher {
    font-size: 0.9rem;
    font-weight: 100;
}
.language-switcher a {
    color: var(--color-text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}
.language-switcher a:hover,
.language-switcher a[style*="font-weight:bold"] {
    color: var(--color-text);
}
.header-subtitle-line {
    text-align: center; /* <-- CORREGIDO: Subtítulo centrado */
    margin-top: 0rem;
}
.header-subtitle-line p {
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin: 0;
}

/* --- 5. Formularios --- */
form { margin-top: 2rem; }
form div { margin-bottom: 1.5rem; }
form label { display: block; font-weight: 500; margin-bottom: 0.5rem; color: var(--color-text); font-size: 0.95rem; }
form input[type="text"], form input[type="email"], form input[type="password"], form input[type="tel"], form input[type="url"], form input[type="date"], form input[type="number"], form select, form textarea { width: 100%; padding: 0.75rem 1rem; font-family: var(--font-sans); font-size: 1rem; border: 1px solid var(--color-border); border-radius: var(--border-radius); background-color: #fcfcfc; box-sizing: border-box; transition: border-color 0.2s ease, box-shadow 0.2s ease; }
form input:focus, form select:focus, form textarea:focus { outline: none; border-color: var(--color-link); box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2); }
form textarea { resize: vertical; min-height: 120px; }
form button[type="submit"], .button-primary { display: inline-block; background-color: var(--color-link); color: white; font-family: var(--font-sans); font-size: 1rem; font-weight: 500; padding: 0.8rem 1.75rem; border: none; border-radius: var(--border-radius); cursor: pointer; text-align: center; text-decoration: none; transition: background-color 0.2s ease; }
form button[type="submit"]:hover, .button-primary:hover { background-color: var(--color-link-hover); }

/* --- 6. Elementos Específicos --- */
.nav-links a { display: block; padding: 1rem; background-color: var(--color-surface); margin-bottom: 0.75rem; text-decoration: none; color: var(--color-link); font-weight: 500; border-radius: var(--border-radius); border: 1px solid var(--color-border); transition: all 0.2s ease; }
.nav-links a:hover { border-color: var(--color-link); background-color: #f0f8ff; transform: translateY(-2px); }
.share-container { display: flex; gap: 0.5rem; align-items: center; }
.share-container input { flex-grow: 1; background-color: var(--color-background); color: var(--color-text-secondary); }
#profile-nav-menu { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.75rem; background-color: var(--color-background); border: 1px solid var(--color-border); margin: 2.5rem 0; border-radius: 99px; justify-content: center; }
#profile-nav-menu button { padding: 0.5rem 1rem; cursor: pointer; border: 1px solid transparent; background-color: transparent; color: var(--color-text-secondary); font-weight: 500; border-radius: 99px; transition: all 0.2s ease; }
#profile-nav-menu button:hover { background-color: rgba(0,0,0,0.05); color: var(--color-text); }
#profile-nav-menu button.active { background-color: var(--color-link); color: white; }
.profile-section { display: none; margin-bottom: 3rem; }
.profile-section.visible { display: block; }
.details-container { display: flex; gap: 2.5rem; align-items: flex-start; }
.profile-photo { width: 150px; height: auto; object-fit: cover; box-shadow: 0 4px 12px rgba(0,0,0,0.1); border-radius: var(--border-radius); }
article { padding-bottom: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid #e8e8ed; }
article:last-child { border-bottom: none; margin-bottom: 0; }

/* --- 7. Menú Móvil (Hamburguesa) --- */
.hamburger-btn { display: flex; background: none; border: none; padding: 0; cursor: pointer; z-index: 1002; width: 28px; height: 22px; flex-direction: column; justify-content: space-between; }
.hamburger-btn span { display: block; width: 100%; height: 3px; background-color: var(--color-text); transition: transform 0.3s ease, opacity 0.3s ease; border-radius: 99px; }
.hamburger-btn.active span:nth-child(1) { transform: translateY(9.5px) rotate(45deg); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; }
.hamburger-btn.active span:nth-child(3) { transform: translateY(-9.5px) rotate(-45deg); }
.mobile-nav { display: none; position: fixed; top: 0; right: 0; width: 320px; max-width: 85%; height: 100vh; background-color: var(--color-surface); box-shadow: -5px 0 15px rgba(0,0,0,0.1); padding: 1.5rem; box-sizing: border-box; overflow-y: auto; z-index: 1001; }
.mobile-nav.visible { display: block; }
.mobile-nav h2 { margin-top: 0; font-family: var(--font-sans); }
.mobile-nav ul { list-style: none; padding: 0; margin: 0; }
.mobile-nav ul li a { display: block; padding: 0.75rem 0; color: var(--color-text); font-size: 1.1rem; font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--color-border); }

/* --- 8. Media Queries (Responsive) --- */
@media (max-width: 768px) {
    main { padding: 1.5rem; }
    .details-container { flex-direction: column; align-items: flex-start; }
}

/* === ESTILOS PARA TABLAS RESPONSIVE (Management) === */
.management-table { width: 100%; border-collapse: collapse; margin-top: 2rem; font-size: 0.95rem; }
.management-table th, .management-table td { border: 1px solid var(--color-border); padding: 0.75rem 1rem; text-align: left; vertical-align: middle; }
.management-table th { background-color: var(--color-background); font-weight: 500; }
.management-table .actions-cell { white-space: nowrap; }

@media (max-width: 768px) {
    .management-table { border: 0; }
    .management-table thead { border: none; clip: rect(0 0 0 0); height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; }
    .management-table tr { display: block; margin-bottom: 1rem; border-radius: var(--border-radius); box-shadow: 0 2px 4px rgba(0,0,0,0.05); padding: 1rem; box-sizing: border-box; background-color: var(--color-surface); }
    .management-table td { display: block; border: none; padding: 0.75rem 0; text-align: left; border-bottom: 1px dotted var(--color-border); }
    .management-table tr td:last-child { border-bottom: none; }
    .management-table td::before { content: attr(data-label); display: block; font-weight: 600; color: var(--color-text-secondary); text-transform: uppercase; font-size: 0.8em; margin-bottom: 0.25em; }
    .management-table td.actions-cell { text-align: center; padding-top: 1rem; margin-top: 0.5rem; border-top: 1px dotted var(--color-border); }
    .management-table td.actions-cell::before { content: ""; }
}

/* === ESTILOS PARA BOTONES ADICIONALES === */
.button-secondary { 
background-color: transparent;
color: var(--color-link);
border: 1px solid var(--color-link);
font-family: var(--font-sans);
font-size: 1rem;
font-weight: 500;
padding: 0.8rem 1.75rem;
border-radius: var(--border-radius);
cursor: pointer;
text-align: center;
transition: all 0.2s ease;
}
.button-secondary:hover { background-color: var(--color-link); color: white; }

/* ======================================================= */
/* === CORRECCIÓN DE ESPECIFICIDAD PARA BOTONES EN FORMS === */
/* ======================================================= */

/* Esta regla es más específica y fuerza a los botones de formulario
  con la clase .button-secondary a usar el estilo correcto.
*/
form button.button-secondary {
  background-color: transparent;    /* Fondo blanco */
  color: var(--color-link);     /* Letra azul */
  border: 1px solid var(--color-link);
  
    /* ¡LÍNEAS AÑADIDAS PARA UNIFICAR LA ALTURA! */
  /* min-height: 36px; */
  padding: 0.8rem 1.75rem;
}

/* Y su estado hover correspondiente */
form button.button-secondary:hover {
  background-color: var(--color-link);    /* Fondo azul */
  color: white;              /* Letra blanca */
}

.button-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; background-color: transparent; color: var(--color-text-secondary); border: 1px solid var(--color-border); border-radius: 50%; cursor: pointer; padding: 0; transition: all 0.2s ease; }
.button-icon:hover { background-color: var(--color-background); color: var(--color-link); border-color: var(--color-link); }
.button-icon .fa { font-size: 1.5rem; line-height: 1; }
.button-icon i.fa { display: block; font-size: 1.5rem; line-height: 1; text-align: center; }




/* === ESTILOS PARA EL BOTÓN 'VOLVER ARRIBA' === */
#back-to-top-btn {
    position: fixed; /* Fija el botón en la pantalla */
    bottom: 20px;    /* 20px desde el borde inferior */
    right: 20px;     /* 20px desde el borde derecho */
    z-index: 100;    /* Se asegura de que esté por encima de otro contenido */
    
    /* Estilos de apariencia */
    background-color: var(--color-link);
    color: white;
    border: none;
    border-radius: 50%; /* Lo hace circular */
    width: 50px;       /* Ancho */
    height: 50px;      /* Alto */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);

    /* Transición para el efecto de fundido */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

#back-to-top-btn.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ================================================= */
/* === Estilos Responsivos para el QR Superpuesto === */
/* ================================================= */

.presentation-media-container {
    position: relative;
    margin-bottom: 1.5em;
}

.presentation-media-container video,
.presentation-media-container img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
}

.presentation-media-container .qr-code-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 120px;
    height: 120px;
    z-index: 10;
    border: 3px solid white;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* Media query para hacer el QR más pequeño en móviles */
@media (max-width: 1024px) {
    .presentation-media-container .qr-code-overlay {
        width:100px;
        height: 100px;
        top: 8px;
        right: 8px;
    }
}

/* Media query para hacer el QR más pequeño en móviles */
@media (max-width: 768px) {
    .presentation-media-container .qr-code-overlay {
        width:80px;
        height: 80px;
        top: 7px;
        right: 7px;
    }
}

/* Media query para hacer el QR más pequeño en móviles */
@media (max-width: 600px) {
    .presentation-media-container .qr-code-overlay {
        width:60px;
        height: 60px;
        top: 5px;
        right: 5px;
    }
}

/* === Estilos para el Acordeón Legal === */
.accordion-item {
    background-color: #fdfdfd;
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
    border-radius: 5px;
}

.accordion-title {
    padding: 15px 50px 15px 15px; /* Arriba, Derecha, Abajo, Izquierda */
    cursor: pointer;
    position: relative;
    user-select: none; /* Evita que el texto del título se seleccione al hacer clic */
}

.accordion-title h4 {
    margin: 0;
    font-size: 1em;
    font-weight: 600;
    color: grey;
}

/* El icono de flecha 'chevron' */
.accordion-title::after {
    content: '\f078'; /* Código del icono fa-chevron-down de FontAwesome */
    font-family: 'FontAwesome';
    font-size: 0.9em;
    color: grey;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg); /* Estado inicial: apunta hacia abajo */
    transition: transform 0.4s ease; /* Transición suave para la rotación */
}

/* Cuando está activo, la flecha rota para apuntar hacia arriba */
.accordion-title.active::after {
    transform: translateY(-50%) rotate(180deg);
}

/* El contenido está oculto por defecto */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out, padding 0.4s ease-out;
    padding: 0 15px;
    font-size: 0.9em;
    color: grey;
}

.legal-accordion {
    max-width: 960px;  /* El mismo max-width que page-container */
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;   /* El mismo padding */
    padding-right: 20px;  /* El mismo padding */
    box-sizing: border-box; /* Importante para que el padding no añada ancho extra */
}


/* Compartir documentos */
.link-button {
    background: none;
    border: none;
    color: #0056b3; /* Color de enlace */
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    font-size: inherit; /* Hereda el tamaño de fuente de la tabla */
    font-family: inherit; /* Hereda la fuente */
}
.link-button:hover {
    color: #0077ed;
}



/* ======================================================= */
/* === ESTILOS ESPECÍFICOS PARA EL HEADER DE PROFILE.PHP === */
/* ======================================================= */

/* Por defecto, en escritorio, el logo en el perfil puede tener un tamaño diferente si quieres,
   o simplemente heredar el que ya tenga. Vamos a definirlo para ser claros. */
.header-logo-profile .logo img {
    height: 40px; /* Tamaño del logo en el header del perfil en escritorio */
}


/* --- Estilos para el logo del perfil SÓLO en vista móvil --- */
@media (max-width: 768px) {
    .header-logo-profile .logo img {
        /* Aquí pones el tamaño que quieres para el logo en móviles en la página de perfil */
        height: 22px; /* Por ejemplo, lo hacemos más pequeño */
    }

    /* Opcional: ajustar márgenes si es necesario en móvil */
    .header-logo-profile {
        margin-left: 0; /* O cualquier ajuste que necesites */
    }
}



.qr-code-text {
    display: block;
    width: 150px; /* Un tamaño fijo y legible para ordenadores */
    height: 150px;
    margin-top: 1.5em;
    margin-bottom: 1.5em; /* Añadimos también un margen inferior */
}

/* === Media Query para Tablets y Móviles === */
@media (max-width: 768px) {
    .qr-code-text {
        width: 50%;   /* Ocupará el 50% del ancho en pantallas pequeñas */
        height: auto; /* La altura se ajusta automáticamente para no deformar el QR */
    }
}


/* ===== ESTILOS PARA VISUALIZAR CONTRASEÑA ===== */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input[type="password"],
.password-wrapper input[type="text"] {
    width: 100%;
    padding-right: 40px; /* Deja espacio para el icono */
    box-sizing: border-box;
}

.password-wrapper .fa-eye,
.password-wrapper .fa-eye-slash {
    position: absolute;
    right: 15px;
    cursor: pointer;
    color: #aaa;
    transition: color 0.2s;
}

.password-wrapper .fa-eye:hover,
.password-wrapper .fa-eye-slash:hover {
    color: #333;
}