:root{
  --bg-page:#f3e8dc; /* fondo general */
  --bg-banner:#c59c7d; /* parte superior */
  --bg-banner-bottom:#e7d2bd; /* parte inferior */
  --card-bg:#ffffff;
  --card-soft:#f3e0c8;
  --accent:#c0865a;
  --accent-dark:#a26b41;
  --text-main:#3d2b1f;
  --text-muted:#8b6d58;
  --border-soft:#f0ddc8;
  --shadow-soft:0 18px 40px rgba(0,0,0,.10);
  --radius-card:28px;
  --font:'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*,
*::before,
*::after{
  box-sizing:border-box;
}

body{
  margin:0;
  padding:0;
  font-family:var(--font);
  background:var(--bg-page);
  color:var(--text-main);
  -webkit-font-smoothing:antialiased;
}

/* Página */
.tg-page{
  min-height:100vh;
  display:flex;
  flex-direction:column;
}

/* Banner superior */
#tg-banner{
  height:260px; /* AUMENTADO para meter el logo */
  background:linear-gradient(to bottom, var(--bg-banner) 0%, var(--bg-banner) 55%, var(--bg-banner-bottom) 100%);
  position:relative;
}

/* Logo rectangular (detrás del avatar) */
#tg-logo{
  position:absolute;
  top:30px; /* más abajo para no chocar menú */
  left:50%;
  transform:translateX(-50%);
  max-width:240px;
  max-height:85px;
  object-fit:contain;
  opacity:0.65;
  display:none;
}

/* Contenido principal */
.tg-main{
  flex:1;
  padding:0 16px 96px;
}

/* Tarjeta principal */
.tg-card{
  position:relative;
  max-width:520px;
  margin:0 auto;
  margin-top:-95px;
  background:var(--card-bg);
  border-radius:var(--radius-card);
  box-shadow:var(--shadow-soft);
  padding:130px 20px 28px;
}

/* Avatar */
#tg-avatar{
  position:absolute;
  top:30px;
  left:50%;
  transform:translate(-50%, -50%);
  width:150px;
  height:150px;
  border-radius:50%;
  border:6px solid #fff;
  object-fit:cover;
  box-shadow:0 12px 28px rgba(0,0,0,.30);
  z-index:5;
}

/* Encabezado de texto */
.tg-header-text{
  text-align:center;
  margin-top:8px;
}

#tg-name{
  font-size:1.9rem;
  margin:6px 0 4px;
  font-weight:800;
}

#tg-role{
  margin:2px 0;
  font-size:1rem;
  font-weight:400;
  color:var(--text-muted);
}

#tg-company{
  margin:0;
  font-size:0.96rem;
  color:var(--text-muted);
}

/* Redes sociales */
.tg-social-row{
  display:flex;
  justify-content:center;
  gap:14px;
  margin:20px 0 18px;
}

.tg-social-btn{
  width:52px;
  height:52px;
  border-radius:50%;
  background-color:var(--card-soft); /* AHORA TOMA EL TEMA */
  background-position:center;
  background-repeat:no-repeat;
  background-size:26px 26px;
  box-shadow:0 4px 16px rgba(0,0,0,.15);
  border:2px solid #fff;
  display:none;
}


/* Iconos PNG */
.tg-social-whatsapp{  background-image:url('img/ico-whatsapp.png'); }
.tg-social-instagram{ background-image:url('img/ico-instagram.png'); }
.tg-social-facebook{  background-image:url('img/ico-facebook.png'); }
.tg-social-twitter{   background-image:url('img/ico-twitter.png'); }
.tg-social-linkedin{  background-image:url('img/ico-linkedin.png'); }
.tg-social-web{       background-image:url('img/ico-web.png'); }

/* Bloques info */
.tg-info-list{
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-top:8px;
}

.tg-info-item{
  background:var(--card-soft);
  border-radius:18px;
  padding:12px 16px 14px;
  border:1px solid var(--border-soft);
}

.tg-label{
  font-size:0.90rem;
  font-weight:600;
  color:var(--text-muted);
  margin-bottom:2px;
}

.tg-value{
  font-size:1rem;
  font-weight:500;
  word-wrap:break-word;
}

/* Email */
#tg-email{
  color:var(--accent-dark);
  text-decoration:none;
}
#tg-email:hover{
  text-decoration:underline;
}

/* Secciones */
.tg-section{
  margin-top:22px;
  padding-top:18px;
  border-top:1px dashed #e1cdb8;
}

.tg-section h2{
  margin:0 0 6px;
  font-size:1.1rem;
}

.tg-contact-sub{
  margin:0 0 12px;
  font-size:0.92rem;
  color:var(--text-muted);
}

/* Formulario */
#tg-contact-form{
  display:flex;
  flex-direction:column;
  gap:10px;
}

#tg-contact-form label{
  display:flex;
  flex-direction:column;
  font-size:0.9rem;
  font-weight:600;
  color:var(--text-muted);
}

#tg-contact-form input,
#tg-contact-form textarea{
  margin-top:4px;
  padding:9px 11px;
  border-radius:10px;
  border:1px solid #e1cdb8;
  font-family:inherit;
  font-size:0.95rem;
}

#tg-contact-submit{
  margin-top:6px;
  padding:11px 14px;
  border-radius:999px;
  border:none;
  background:var(--accent);
  color:#fff;
  font-weight:700;
  font-size:1rem;
  cursor:pointer;
}
#tg-contact-submit:hover{
  background:var(--accent-dark);
}

/* Mapa */
.tg-map-frame{
  border-radius:20px;
  overflow:hidden;
  box-shadow:0 10px 26px rgba(0,0,0,.15);
}
.tg-map-frame iframe{
  width:100%;
  height:260px;
  border:0;
}

/* Footer */
.tg-footer{
  margin-top:22px;
  text-align:center;
  font-size:0.85rem;
  color:var(--text-muted);
}
.tg-footer a{
  color:var(--accent-dark);
  text-decoration:none;
}
.tg-footer a:hover{
  text-decoration:underline;
}

/* Botón flotante vCard */
.tg-floating-btn{
  position:fixed;
  left:50%;
  bottom:18px;
  transform:translateX(-50%);
  background:var(--accent);
  color:#fff;
  border-radius:999px;
  padding:8px 20px 8px 10px;
  display:flex;
  align-items:center;
  gap:8px;
  text-decoration:none;
  font-weight:700;
  box-shadow:0 14px 30px rgba(0,0,0,.35);
  z-index:30;
}

#tg-floating-avatar{
  width:40px;
  height:40px;
  border-radius:50%;
  object-fit:cover;
  border:3px solid #fff;
}

/* utilidades */
.tg-hidden{
  display:none !important;
}

/* Responsive */
@media (max-width:600px){
  .tg-card{
    margin-top:-120px;
    padding:110px 14px 24px;
  }

  #tg-name{
    font-size:1.6rem;
  }

  #tg-avatar{
    width:136px;
    height:136px;
  }

  .tg-floating-btn{
    bottom:14px;
  }
}

/* ========================================================= */
/* ===============   LOADER NUEVO (AÑADIDO)   =============== */
/* ========================================================= */

.tg-loader{
  position:fixed;
  inset:0;

  /* SE CAMBIA ESTO: antes usaba SOLO var(--bg-page) al iniciar */
  background:linear-gradient(
    to bottom,
    var(--bg-banner) 0%,
    var(--bg-banner-bottom) 100%
  ) !important;

  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:center;
  z-index:9999;
  opacity:1;

  /* TRANSICIÓN DEL FADE */
  transition:opacity .9s ease;
}



.tg-loader-logo{
  width:160px;
  filter:drop-shadow(0 6px 14px rgba(0,0,0,.35));
}

.tg-loader-text{
  margin-top:18px;
  font-size:1.1rem;
  color:#fff;
  text-shadow:0 2px 6px rgba(0,0,0,.35);
  font-weight:600;
}

#tg-main.tg-main--hidden{
  opacity:0;
}

#tg-main{
  transition:opacity 1.6s ease;
}
