/* assets/css/profile.css */
@import url('https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap');
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Roboto", sans-serif;
}

body {
    background-color: #fafafa;
    color: #171717;
    padding: 80px 16px 16px 16px;
    display: flex;
    justify-content: center;
    min-height: 100vh;
    font-family: "Roboto", sans-serif;
}

/* --- BARRA DE NAVEGACIÓN SUPERIOR FIJA --- */
.main-nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    z-index: 1000;
    display: flex;
    justify-content: center;
}

.nav-bar-container {
    width: 100%;
    max-width: 500px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #171717;
    text-decoration: none;
    letter-spacing: -0.5px;
}

/* Botón Sándwich */
.hamburger-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 24px;
    height: 20px;
    justify-content: center;
    z-index: 1002;
}

.hamburger-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: #171717;
    transition: transform 0.3s, opacity 0.3s;
    border-radius: 2px;
}

.hamburger-btn.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.active span:nth-child(2) { opacity: 0; }
.hamburger-btn.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Desplegable del menú */
.nav-overlay-menu {
    position: absolute;
    top: 60px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 500px;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.03);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
    z-index: 1001;
}

.nav-overlay-menu.active {
    max-height: 320px;
}

.nav-links-list {
    list-style: none;
    padding: 8px 16px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-links-list li a {
    display: block;
    padding: 10px 8px;
    color: #404040;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: 8px;
    transition: background-color 0.2s, color 0.2s;
}

.nav-links-list li a:hover {
    background-color: #f5f5f5;
    color: #171717;
}

.logout-item-container {
    margin-top: 10px;
    border-top: 1px solid #e5e5e5;
    padding-top: 12px;
}

.nav-links-list li .btn-logout-nav {
    display: block;
    background-color: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    text-align: center;
    padding: 10px 8px;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-links-list li .btn-logout-nav:hover {
    background-color: rgba(239, 68, 68, 0.18);
    color: #b91c1c;
}

/* --- PERFIL CONTENEDOR --- */
.profile-container {
    width: 100%;
    max-width: 500px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 40px;
}

.emergency-header {
    background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.02);
}

.sos-badge {
    background-color: #171717;
    color: #ffffff; 
    font-size: 1rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 15px;
    display: inline-block;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.emergency-header .profile-avatar {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: block;
    border: 3px solid #171717; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.emergency-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
}

.profile-status { font-size: 0.9rem; }

.info-card {
    background-color: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.01);
}

.info-card h3 {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.critical-card { border-left: none; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-item { display: flex; flex-direction: column; gap: 4px; }
.label { font-size: 0.9rem; color: #737373; text-transform: uppercase; letter-spacing: 0.5px; }
.value { font-size: 0.9rem; font-weight: 700; color: #171717; }
.value.blood { color: #000000; font-size: 0.9rem; }
.value.highlight { color: #262626; }

/* Controles tipo Tabs Segmentados */
.segmented-control-mini {
    display: flex;
    background: #ededf0;
    padding: 3px;
    border-radius: 10px;
    margin-bottom: 16px;
}

.segment-btn-mini {
    flex: 1;
    background: none;
    border: none;
    padding: 8px;
    font-size: 13px;
    font-weight: 600;
    color: #1d1d1f;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.segment-btn-mini.active {
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* --- ARQUITECTURA DEL MINI SLIDER INTERNO --- */
.slider-viewport-mini {
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
}

.slider-track-mini {
    display: flex;
    width: 200%;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.slide-pane {
    width: 50%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-sub {
    background: #f4f4f5;
    padding: 12px;
    border-radius: 10px;
    border: 1px solid #e4e4e7;
    font-size: 13px;
    margin-top: 5px;
    text-align: left;
}

.secure-card { border: 1px solid #d4d4d4; background-color: #ffffff; }
.secure-notice { font-size: 0.9rem; color: #525252; line-height: 1.4; margin-bottom: 14px; }
.secure-form { display: flex; gap: 8px; margin-bottom: 4px; }
.secure-form input {
    flex: 1;
    background-color: #ffffff;
    border: 1px solid #d4d4d4;
    border-radius: 8px;
    padding: 12px;
    color: #171717;
    font-size: 0.9rem;
}
.secure-form input:focus { outline: none; border-color: #171717; box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05); }

.secure-form button {
    background-color: #a3a3a3; 
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0 10px;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background-color 0.2s;
}
.secure-form button:hover { background-color: #737373; }

.secure-content-box { margin-top: 10px; padding-top: 14px; border-top: 1px solid #e5e5e5; display: flex; flex-direction: column; gap: 12px; }
.secure-item { display: flex; flex-direction: column; gap: 4px; }
.label-secure { font-size: 0.8rem; color: #525252; font-weight: 600; }
.value-secure-text { font-size: 0.95rem; color: #262626; line-height: 1.4; }
.value-text { font-size: 0.9rem; color: #404040; line-height: 1; font-weight: 700;}
.encrypted-text { color: #a3a3a3; font-family: monospace; letter-spacing: 1px; }

.emergency-contact { background-color: #ffffff; border: 1px solid #e5e5e5; }
.contact-box { display: flex; flex-direction: column; gap: 12px; overflow: hidden; }
.contact-name { font-size: 0.9rem; font-weight: 700; color: #171717; }

.btn-call {
    background-color: #000000; 
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 20px 16px;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-call:hover { background-color: #262626; }
.btn-call:active { transform: scale(0.98); }

.btn-whatsapp {
    background-color: #25D366; 
    color: #ffffff;
    border: none;
    border-radius: 12px;
    padding: 16px 16px;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s, transform 0.1s;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}
.btn-whatsapp:hover { background-color: #20ba56; }
.btn-whatsapp:active { transform: scale(0.98); }
.whatsapp-icon { width: 20px !important; height: 20px !important; flex-shrink: 0; }

.error-card { background-color: #ffffff; border: 1px solid #e5e5e5; border-radius: 20px; padding: 40px 24px; text-align: center; }
.error-icon { font-size: 3rem; display: block; margin-bottom: 16px; }
.error-card h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 8px; color: #171717; }
.error-card p { font-size: 0.95rem; color: #737373; line-height: 1.5; margin-bottom: 24px; }
.btn-error-home { display: inline-block; background-color: #000000; color: #ffffff; text-decoration: none; padding: 12px 24px; border-radius: 10px; font-weight: 600; font-size: 0.9rem; transition: background-color 0.2s; }
.btn-error-home:hover { background-color: #262626; }

.profile-footer { text-align: center; padding: 16px 0 8px; }
.profile-footer p { font-size: 0.8rem; color: #737373; }