/* ==============================
   ESTILOS GENERALES - SAFELINK
   ============================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #ffffff;
    color: #1f2937;
    line-height: 1.6;
}

/* ==============================
   ENCABEZADO Y MENÚ
   ============================== */

header {
    background-color: #0f4c5c;
    color: white;
    padding: 15px 40px;
}

.navbar {
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #ffffff;
}

.logo span {
    color: #52b788;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

.nav-links a:hover {
    color: #52b788;
}

/* ==============================
   SECCIÓN PRINCIPAL
   ============================== */

.hero {
    background: linear-gradient(
        135deg,
        #0f4c5c,
        #176b78
    );

    color: white;
    padding: 100px 40px;
}

.hero-content {
    max-width: 1200px;
    margin: auto;
}

.hero h1 {
    font-size: 48px;
    max-width: 700px;
    margin-bottom: 20px;
}

.hero p {
    font-size: 20px;
    max-width: 650px;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    padding: 13px 25px;
    background-color: #52b788;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: bold;
}

.btn:hover {
    background-color: #40916c;
}

/* ==============================
   SECCIONES
   ============================== */

.section {
    padding: 70px 40px;
}

.section-container {
    max-width: 1200px;
    margin: auto;
}

.section-title {
    text-align: center;
    color: #0f4c5c;
    font-size: 34px;
    margin-bottom: 15px;
}

.section-description {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 45px;
    color: #555;
}

/* ==============================
   TARJETAS
   ============================== */

.cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.card {
    background-color: #f8faf9;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e5e7eb;
}

.card-icon {
    font-size: 45px;
    margin-bottom: 15px;
}

.card h3 {
    color: #0f4c5c;
    margin-bottom: 10px;
}

/* ==============================
   SOBRE NOSOTROS
   ============================== */

.about {
    background-color: #eef8f3;
}

/* ==============================
   CONTACTO
   ============================== */

.contact {
    background-color: #f8fafc;
    text-align: center;
}

/* ==============================
   PIE DE PÁGINA
   ============================== */

footer {
    background-color: #0f4c5c;
    color: white;
    text-align: center;
    padding: 25px;
}

/* ==============================
   RESPONSIVE
   ============================== */

@media (max-width: 768px) {

    .navbar {
        flex-direction: column;
        gap: 15px;
    }

    .nav-links {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .hero h1 {
        font-size: 36px;
    }

    .cards {
        grid-template-columns: 1fr;
    }
}
/* ==============================
   PÁGINA DE LOGIN
   ============================== */

.login-section {
    min-height: calc(100vh - 150px);
    background: linear-gradient(
        135deg,
        #eef8f3,
        #e8f4f8
    );

    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 450px;
    background-color: white;
    padding: 45px;
    border-radius: 18px;

    box-shadow:
        0 10px 30px rgba(15, 76, 92, 0.12);

    border: 1px solid #e1eeee;
}

.login-logo {
    text-align: center;
    margin-bottom: 25px;
}

.login-logo h1 {
    color: #0f4c5c;
    font-size: 36px;
}

.login-logo span {
    color: #52b788;
}

.login-logo p {
    color: #6b7280;
    margin-top: 5px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.form-group label {
    color: #0f4c5c;
    font-weight: bold;
}

.form-group input {
    padding: 13px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: 0.3s;
}

.form-group input:focus {
    border-color: #52b788;

    box-shadow:
        0 0 0 3px rgba(82, 183, 136, 0.15);
}

.login-button {
    width: 100%;
    border: none;
    cursor: pointer;
    font-size: 16px;
    margin-top: 5px;
}

.login-register {
    text-align: center;
    margin-top: 25px;
    color: #6b7280;
}

.login-register a {
    color: #0f4c5c;
    font-weight: bold;
    text-decoration: none;
}

.login-register a:hover {
    color: #52b788;
}
/* ==============================
   MENSAJES DEL FORMULARIO
   ============================== */

.mensaje {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

.mensaje.error {
    background-color: #fee2e2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}

.mensaje.exito {
    background-color: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}
/* ==============================
   FORMULARIO DE PERSONAS
   ============================== */

.persona-form {
    max-width: 700px;
    margin: 40px auto 0;
    background-color: white;
    padding: 40px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(15, 76, 92, 0.10);
    border: 1px solid #e1eeee;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.persona-form input,
.persona-form textarea {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-family: Arial, sans-serif;
    font-size: 16px;
    outline: none;
    transition: 0.3s;
}

.persona-form input:focus,
.persona-form textarea:focus {
    border-color: #52b788;

    box-shadow:
        0 0 0 3px rgba(82, 183, 136, 0.15);
}

.persona-form textarea {
    resize: vertical;
}

.persona-foto {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    margin: 0 auto 15px;
    border: 4px solid #52b788;
}
/* ==============================
   SELECT DE FORMULARIOS
   ============================== */

.persona-form select {
    width: 100%;
    padding: 13px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    background-color: white;
    color: #374151;
    outline: none;
    cursor: pointer;
    transition: 0.3s;
}

.persona-form select:focus {
    border-color: #52b788;

    box-shadow:
        0 0 0 3px rgba(82, 183, 136, 0.15);
}
/* =====================================
   PÁGINA DE IDENTIFICACIÓN
   ===================================== */

.alerta-emergencia {
    text-align: center;
    background: #e8f5e9;
    border-radius: 15px;
    padding: 35px 25px;
    margin-bottom: 30px;
    border: 2px solid #52b788;
}

.alerta-emergencia h1 {
    color: #1b4332;
    margin-bottom: 12px;
}

.alerta-emergencia p {
    color: #344e41;
    font-size: 17px;
}

.alerta-icono {
    font-size: 45px;
    margin-bottom: 10px;
}


.perfil-persona {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}


.foto-persona {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid #52b788;
    margin-bottom: 20px;
}


.foto-persona-placeholder {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: #d8f3dc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 70px;
    margin: 0 auto 20px;
}


.perfil-persona h2 {
    font-size: 32px;
    color: #1b4332;
    margin-bottom: 30px;
}


.info-publica {
    text-align: left;
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 18px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}


.info-publica h3 {
    color: #2d6a4f;
    margin-bottom: 10px;
}


.info-publica p {
    color: #444;
    line-height: 1.6;
}


.alerta-alergias {
    border-left: 5px solid #e63946;
}


.alerta-alergias h3 {
    color: #c1121f;
}


.btn-llamar {
    display: inline-block;
    background: #2d6a4f;
}


.alerta-error {
    max-width: 650px;
    margin: 50px auto;
    text-align: center;
    background: #fff3f3;
    border: 2px solid #e63946;
    border-radius: 15px;
    padding: 40px 25px;
}


.alerta-error h1 {
    color: #c1121f;
    margin-bottom: 15px;
}


.alerta-error p {
    color: #555;
    margin-bottom: 15px;
}


.alerta-error .btn {
    margin-top: 15px;
}
/* =====================================
   CENTRAR CÓDIGO QR
   ===================================== */

.qr-collar {
    text-align: center;
    margin-top: 20px;
}

.qr-imagen {
    width: 180px;
    height: 180px;
    margin: 15px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-imagen img {
    display: block;
    margin: 0 auto;
}

.qr-enlace {
    font-size: 12px;
    word-break: break-all;
    color: #666;
    margin: 15px 0;
}