/* ============================================================
   QUORO — Global Stylesheet (styles-global.css)
   Design tokens, reset, tipografía, componentes compartidos.
   ============================================================ */

/* --- TIPOGRAFÍA LOCAL --- */
@font-face {
    font-family: 'Recoleta';
    src: url('./Font/Recoleta SemiBold.woff2') format('woff2'),
         url('./Font/Recoleta SemiBold.otf') format('opentype');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Recoleta';
    src: url('./Font/Recoleta Regular.woff2') format('woff2'),
         url('./Font/Recoleta Regular.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

/* --- DESIGN TOKENS --- */
:root {
    /* Principales */
    --verde-bosque: #3D2C3A;
    --verde-profundo: #3D2C3A;
    --lavanda-humo: #E4AB9B;
    --terracota: #E4AB9B;
    
    /* Fondos y Superficies */
    --marfil: #F4F0EB;
    --blanco-superficie: #FCFAF8;
    --gris-claro: #E0D8DB;
    
    /* Texto */
    --carbon: #3D2C3A;
    --gris-calido: #7A6676;
    
    /* Estados */
    --exito: #5D8A6A;
    --advertencia: #D9A441;
    --error: #C85B5B;
    --info: #6E88A8;
    
    --font-titulos: 'DM Sans', sans-serif;
    --font-interfaz: 'DM Sans', sans-serif;
    --shadow-suave: none;
}

/* --- RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--marfil);
    color: var(--carbon);
    font-family: var(--font-interfaz);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    line-height: 1.5;
}

p {
    line-height: 1.5;
}

/* --- LAYOUT --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

/* --- BOTONES --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--verde-bosque);
    color: var(--marfil);
    border: none;
}

.btn-primary:hover {
    background-color: #4A3546;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: var(--verde-bosque);
    border: 2px solid var(--verde-bosque);
}

.btn-secondary:hover {
    background-color: rgba(72, 105, 92, 0.05);
    transform: translateY(-2px);
}

/* --- HEADER / NAV BASE (páginas internas) --- */
header {
    background-color: var(--blanco-superficie);
    padding: 16px 0;
    border-bottom: 1px solid var(--gris-claro);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.logo-img {
    height: 32px;
    width: auto;
    display: block;
    object-fit: contain;
}

.logo-text {
    font-family: var(--font-titulos);
    font-size: 22px;
    color: var(--verde-bosque);
    font-weight: 600;
}

/* --- FORMULARIOS BASE --- */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--carbon);
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.form-control {
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid var(--gris-claro);
    background-color: var(--marfil);
    font-family: var(--font-interfaz);
    font-size: 14px;
    color: var(--carbon);
    outline: none;
    transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--verde-bosque);
    background-color: var(--blanco-superficie);
    box-shadow: 0 0 0 3px rgba(107, 138, 122, 0.1);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--marfil);
    border-radius: 12px;
    font-family: var(--font-interfaz);
    font-size: 14px;
    margin-bottom: 16px;
    transition: border-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--verde-bosque);
}

/* --- MODALES --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(42, 42, 42, 0.4);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 24px;
}

.modal-overlay.open {
    display: flex;
}

.modal-card {
    background: var(--blanco-superficie);
    padding: 32px;
    border-radius: 24px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    border: 1px solid var(--gris-claro);
}

.modal-overlay.open .modal-card {
    transform: scale(1);
}

.modal-card h3 {
    font-family: var(--font-titulos);
    font-size: 22px;
    color: var(--verde-bosque);
    margin-bottom: 8px;
}

.modal-card p {
    font-size: 13px;
    opacity: 0.7;
    margin-bottom: 20px;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-row {
    display: flex;
    gap: 10px;
}

.btn-modal-cancel {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    border: 1px solid var(--gris-claro);
    background: transparent;
    font-family: var(--font-interfaz);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: var(--carbon);
    transition: background-color 0.3s ease;
}

.btn-modal-cancel:hover {
    background: var(--marfil);
}

.btn-modal-ok {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: var(--verde-bosque);
    font-family: var(--font-interfaz);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    color: white;
    transition: background-color 0.3s ease;
}

.btn-modal-ok:hover {
    background: var(--verde-profundo);
}

.btn-cancel {
    padding: 12px 24px;
    border: 1px solid var(--gris-claro);
    background: white;
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--font-interfaz);
    font-weight: 600;
    font-size: 15px;
    transition: background-color 0.3s ease;
}

.btn-cancel:hover {
    background: var(--marfil);
}

.btn-confirm {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--font-interfaz);
    font-weight: 600;
    font-size: 15px;
    color: white;
    transition: opacity 0.3s ease;
}

.btn-confirm:hover {
    opacity: 0.9;
}

.btn-confirm:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- SKELETON LOADING --- */
@keyframes skeleton-pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}

.skeleton {
    animation: skeleton-pulse 1.4s infinite ease-in-out;
    background-color: var(--gris-claro);
    border-radius: 12px;
}

/* --- EMPTY STATE --- */
.empty-state {
    text-align: center;
    grid-column: 1 / -1;
    padding: 60px 20px;
    color: var(--carbon);
    opacity: 0.6;
}

.empty-state p {
    font-size: 15px;
    line-height: 1.6;
}

/* --- ERROR MESSAGE --- */
.error-msg {
    background-color: rgba(199, 119, 82, 0.08);
    border: 1px solid rgba(199, 119, 82, 0.3);
    color: var(--terracota);
    font-size: 13px;
    font-weight: 600;
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: none;
    text-align: left;
    line-height: 1.4;
}

.error-msg.visible {
    display: block;
}

/* --- BADGE/CHIPS --- */
.chip {
    background-color: rgba(72, 105, 92, 0.08);
    color: var(--verde-bosque);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.disponibilidad-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* --- SISTEMA DE RESEÑAS (compartido entre perfil y dashboard-cuidador) --- */
.opiniones-section {
    margin-top: 40px;
}

.opinion-card {
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 16px;
    border-left: 4px solid var(--gris-claro);
    background: white;
    border: 1px solid var(--gris-claro);
}

.opinion-card.excelente {
    border-left-color: #4CAF50;
}

.opinion-card.regular {
    border-left-color: #FFB300;
}

.opinion-card.mala {
    border-left-color: #F44336;
}

.opinion-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    align-items: center;
}

.opinion-estrellas {
    font-size: 16px;
    color: #FFB300;
    letter-spacing: 2px;
}

.opinion-etiqueta {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 12px;
}

.etiqueta-excelente {
    background: #E8F5E9;
    color: #2E7D32;
}

.etiqueta-regular {
    background: #FFF3E0;
    color: #E65100;
}

.etiqueta-mala {
    background: #FFEBEE;
    color: #C62828;
}

.opinion-texto {
    font-size: 14px;
    opacity: 0.8;
    font-style: italic;
    line-height: 1.5;
}

.opinion-fecha {
    font-size: 12px;
    opacity: 0.5;
    margin-top: 12px;
}

/* --- BOTÓN DE ACCIÓN EN CARD --- */
.btn-action-card {
    display: block;
    width: 100%;
    text-align: center;
    padding: 14px;
    background-color: var(--verde-bosque);
    color: var(--marfil);
    text-decoration: none;
    font-size: 14px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-family: var(--font-interfaz);
    font-weight: 600;
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
}

.btn-action-card:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* --- INICIO: Estilos Splash Screen Quoro --- */
#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #3d2c3a;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  transition: opacity 0.5s ease;
}

.escena-3d {
  perspective: 1000px;
  width: 60vw;
  max-width: 410px;
  aspect-ratio: 1 / 1;
}

.tarjeta-giratoria {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: caidaYGiro 2.5s forwards cubic-bezier(0.25, 1, 0.5, 1);
}

.cara-frente, .cara-dorso {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cara-frente img {
  width: 100%;
  height: auto;
}

.cara-dorso {
  transform: rotateY(180deg);
}

.cara-dorso img {
  width: 100%;
  max-width: 410px;
  height: auto;
}

@keyframes caidaYGiro {
  0% { transform: translateY(-100vh) rotateY(0deg); }
  40% { transform: translateY(0) rotateY(0deg); }
  55% { transform: translateY(0) rotateY(0deg); }
  100% { transform: translateY(0) rotateY(180deg); }
}
/* --- FIN: Estilos Splash Screen Quoro --- */
