* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  background-color: #FDF4E3; /* Fondo beige cálido */
  color: #3E3E3E; /* Gris cálido */
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* NAV BAR SUPERIOR */
.navbar {
  background-color: #E57F4C; /* Naranja tenue */
  color: #fff;
  padding: 1rem 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-nav {
  list-style: none;
  display: flex;
}

.navbar-nav li {
  margin-left: 20px;
}

.navbar-nav a {
  color: #fff;
  text-decoration: none;
  font-weight: bold;
  padding: 8px 15px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.navbar-brand {
  text-decoration: none;
  color: white;
  font-size: 1.5rem;
  font-weight: bold;
}

/*BOTONES DE LA NAV-BAR*/
.navbar-nav a.btn-login {
  background-color: #FFD8A8; /* Crema suave */
  color: #3E3E3E;
}

.navbar-nav a.btn-login:hover {
  background-color: #FFC085;
}

.navbar-nav a:not(.btn-login):hover {
  background-color: rgba(255, 255, 255, 0.15);
}

/* CONTENIDO PRINCIPAL */
.main-content {
  padding: 40px 0;
}

/* LOS TITULOS*/
.main-title {
  text-align: center;
  font-size: 2.8rem;
  color: #D96C2A; /* Naranja cálido */
  margin-bottom: 20px;
}

/* DESCRIPCIÓN */
.description {
  text-align: center;
  font-size: 1.1rem;
  max-width: 800px;
  margin: 0 auto 40px auto;
  color: #5C5C5C;
}

/* SECCIÓN DE GUÍAS (DEL INDEX.HTML*/
.guide-section {
  background-color: #FFF8EF; /* Fondo crema */
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.guide-section h2 {
  text-align: center;
  font-size: 2rem;
  color: #E57F4C;
  margin-bottom: 30px;
}

/* TARJETAS (IMAGENES) */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 25px;
}

.guide-card {
  border: 1px solid #EBDCC3;
  border-radius: 8px;
  overflow: hidden;
  background-color: #FFFFFF;
  box-shadow: 0 2px 4px rgba(0,0,0,0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.guide-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}

.guide-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.card-content {
  padding: 20px;
}

.card-content h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: #C7632A;
}

.card-content ul {
  list-style-position: inside;
  padding-left: 5px;
}

.card-content li {
  margin-bottom: 8px;
}

/* ESTILOSFORMULARIOS DE LOGIN, PERFIL Y REGISTRO */
.form-container {
  max-width: 500px;
  margin: 40px auto;
  padding: 30px;
  background-color: #FFF8EF;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  text-align: center;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
  color: #5C5C5C;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group input[type="email"] {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid #D8C7B0;
  border-radius: 5px;
  font-size: 1rem;
  background-color: #FFF;
}

.form-btn {
  width: 100%;
  padding: 12px 20px;
  font-size: 1.1rem;
  font-weight: bold;
  color: #fff;
  background-color: #E57F4C;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.form-btn:hover {
  background-color: #D36F3E;
}

.form-error {
  background-color: #FEE0E0;
  color: #7B1E1E;
  border: 1px solid #F5C6C6;
  padding: 10px 15px;
  border-radius: 5px;
  margin-bottom: 20px;
}

.form-switch {
  margin-top: 20px;
  font-size: 0.95rem;
}

.form-switch a {
  color: #D96C2A;
  text-decoration: none;
  font-weight: bold;
}

.form-switch a:hover {
  text-decoration: underline;
}

/* ESTILOS CRUD DE CONTACTOS */
.crud-container {
  background: #FFFFFF;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
  margin-top: 20px;
  border: 1px solid #EBDCC3;
}

/* FORMULARIO DE AGREGAR EDITAR DE CONTACTOS*/
.form-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px dashed #EBDCC3;
}

input.crud-input {
  padding: 12px;
  border: 2px solid #D8C7B0;
  border-radius: 6px;
  flex: 1;
  min-width: 220px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.3s;
}

input.crud-input:focus {
  border-color: #E57F4C;
}

/* BOTONES DEL CRUD */
button.btn-action {
  padding: 12px 25px;
  border: none;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  font-weight: bold;
  font-size: 1rem;
  transition: transform 0.2s, background-color 0.2s;
}

button.btn-action:hover {
  transform: translateY(-2px);
}

.btn-add {
  background-color: #E57F4C; /* Naranja principal */
}

.btn-add:hover {
  background-color: #d35400;
}

.btn-cancel {
  background-color: #7f8c8d; /* Gris */
}

.btn-cancel:hover {
  background-color: #2c3e50;
}

/* BOTONES PEQUEÑOS (TABLA) */
.btn-small {
  padding: 6px 12px;
  font-size: 0.9rem;
  margin: 0 2px;
}

.btn-edit {
  background-color: #f39c12; /* Amarillo Naranja */
  color: #fff;
}

.btn-delete {
  background-color: #e74c3c; /* Rojo */
}

/* TABLA DE CONTACTOS */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

thead {
  background-color: #E57F4C;
  color: white;
}

th, td {
  padding: 15px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  font-weight: 700;
  letter-spacing: 0.5px;
}

tbody tr:hover {
  background-color: #FFF8EF; /* Hover suave color crema */
}

/* GOOGLE SIGN-IN BUTTON STYLES */ 
/* SEPARADOR "O" */
.separator {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 20px 0;
    color: #666;
}

.separator::before,
.separator::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #ccc;
}

.separator span {
    padding: 0 10px;
    font-weight: bold;
    font-size: 14px;
}

/* AJUSTE PARA QUE GOOGLE LLENE EL ESPACIO EN EL CONTENEDOR */
.g_id_signin {
    margin-bottom: 15px;
    width: 100%;
}

/* CENTRAR EL BOTÓN DE GOOGLE */
.google-btn-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-bottom: 20px;
}

/* ASEGURAR QUE EL BOTÓN DE GOOGLE RESPONDA AL FLEXBOX */
.g_id_signin {
    display: block;
}



















/* Contenedor principal para centrar la tarjeta */
.profile-page {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 60px 20px;
    background-color: #FDF8F3; /* Color crema de fondo */
}

.profile-card {
    background: #ffffff;
    width: 100%;
    max-width: 600px;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    text-align: center; /* Centra textos por defecto */
}

.brand-title {
    font-family: 'Lilita One', cursive;
    color: #E57F4C;
    font-size: 2.2rem;
    margin-bottom: 5px;
}

/* Fix para la Foto: Evita que el círculo se mueva */
.photo-container {
    margin: 20px auto 30px;
    width: fit-content;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.avatar-frame {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid #E57F4C;
    overflow: hidden;
    margin-bottom: 10px;
}

.avatar-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.custom-file-upload {
    color: #E57F4C;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

/* Fix para la cuadrícula: 2 columnas exactas */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    text-align: left; /* Alinea etiquetas a la izquierda */
    margin-bottom: 20px;
}

.field-box {
    display: flex;
    flex-direction: column;
}

.field-box label {
    font-size: 0.7rem;
    font-weight: 800;
    color: #777;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.field-box input {
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 8px;
    font-family: 'Roboto Slab', serif;
    background: #fafafa;
}

.full-width {
    grid-column: span 2;
}

.info-text {
    font-size: 0.75rem;
    color: #999;
    margin-top: 5px;
}

/* Botones alineados */
.form-footer {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.btn-main {
    background: #E57F4C;
    color: white;
    border: none;
    padding: 15px;
    border-radius: 10px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.btn-main:hover {
    background: #D96C2A;
}

.btn-secondary {
    color: #aaa;
    text-decoration: none;
    font-size: 0.9rem;
}




















/* Incremento de tamaños para mejor legibilidad */
.brand-title {
    font-family: 'Lilita One', cursive;
    color: #E57F4C;
    font-size: 3rem; /* Título más imponente */
    margin-bottom: 10px;
}

.brand-subtitle {
    font-size: 1.2rem; /* Subtítulo más claro */
    color: #666;
    margin-bottom: 35px;
}

.field-box label {
    font-size: 0.95rem; /* Etiquetas más visibles */
    font-weight: 800;
    color: #555;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.field-box input {
    padding: 15px; /* Más espacio interno para el texto */
    font-size: 1.1rem; /* Texto de entrada más grande */
    border: 1px solid #ddd;
    border-radius: 10px;
    font-family: 'Roboto Slab', serif;
    background: #fafafa;
}

.info-text {
    font-size: 0.9rem; /* Nota al pie más legible */
    color: #888;
    margin-top: 8px;
}

.btn-main {
    background: #E57F4C;
    color: white;
    border: none;
    padding: 18px; /* Botón más robusto */
    border-radius: 12px;
    font-weight: bold;
    font-size: 1.2rem; /* Texto del botón más grande */
    cursor: pointer;
    transition: 0.3s;
    text-transform: uppercase;
}

.btn-secondary {
    color: #888;
    text-decoration: none;
    font-size: 1.05rem; /* Enlace de cancelar más visible */
    font-weight: 500;
}

.custom-file-upload {
    color: #E57F4C;
    font-size: 1.1rem; /* Texto de "Cambiar foto" más grande */
    font-weight: 600;
    margin-top: 10px;
}




/* --- ESTILOS DEL ENCABEZADO CENTRADO --- */
.navbar-sos {
    background-color: #E57F4C; /* Color naranja de SOS Calor */
    padding: 15px 0;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.container-nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 40px;
}

/* Base para los lados y el centro para forzar el equilibrio */
.nav-spacer, .nav-actions {
    flex: 1;
    display: flex;
}

.nav-actions {
    justify-content: flex-end; /* Mueve el botón a la derecha */
}

.nav-center {
    flex: 2; /* Espacio prioritario para el logo */
    text-align: center;
}

.navbar-brand {
    color: white;
    text-decoration: none;
    font-family: 'Lilita One', cursive; /* Tu tipografía de marca */
    font-size: 2.8rem; /* Letras más grandes como solicitaste */
    margin: 0;
    letter-spacing: 1px;
}

/* --- BOTÓN VOLVER AL PANEL MEJORADO --- */
.btn-back {
    background-color: rgba(255, 255, 255, 0.2); /* Fondo semi-transparente elegante */
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 50px; /* Estilo cápsula moderno */
    font-size: 1.1rem; /* Texto más grande y legible */
    font-weight: 700;
    border: 2px solid white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn-back:hover {
    background-color: white;
    color: #E57F4C; /* Invierte colores al pasar el mouse */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-back span {
    font-size: 1.4rem; /* Flecha más visible */
}

/* Ajuste para dispositivos móviles */
@media (max-width: 768px) {
    .navbar-brand { font-size: 1.8rem; }
    .btn-back { padding: 8px 15px; font-size: 0.9rem; }
    .nav-spacer { display: none; } /* En móvil simplificamos el espacio */
}