/* ============================================================
   BASE.CSS — Personal Training Line
   CSS compartido para todas las páginas del sitio.
   Incluye: variables, reset, header, nav, hero-collage, footer,
   sección de título, botón WhatsApp.
   ============================================================ */

/* ── Variables ─────────────────────────────────────────────── */
:root {
  --primary:   #2A3F54;
  --secondary: #F15A24;
  --accent:    #5CB85C;
  --light:     #FFFFFF;
  --dark:      #333333;
  --gray:      #F5F5F5;
  --dark-gray: #777777;

  --shadow-sm: 0 2px 8px rgba(0,0,0,.08);
  --shadow-md: 0 5px 15px rgba(0,0,0,.12);
  --shadow-lg: 0 15px 30px rgba(0,0,0,.16);

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 15px;

  --transition: 0.3s ease;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html { scroll-behavior: smooth; }

body {
  background-color: rgb(174, 214, 241);
  font-family: 'Montserrat', sans-serif;
  color: var(--dark);
  line-height: 1.6;
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

/* ── Main container ─────────────────────────────────────────── */
.main-container {
  background-color: rgba(255,255,255,.9);
  min-height: 100vh;
  box-shadow: 0 0 30px rgba(0,0,0,.12);
}

/* ── Botón genérico ─────────────────────────────────────────── */
.btn {
  display: inline-block;
  background: var(--secondary);
  color: var(--light);
  padding: 12px 30px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}
.btn:hover {
  background: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

/* ═══════════════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════════════ */
header {
  background: var(--light);
  box-shadow: var(--shadow-sm);
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 5%;
  transition: padding var(--transition), box-shadow var(--transition);
}

header.scrolled {
  padding: 8px 5%;
  box-shadow: 0 4px 20px rgba(0,0,0,.15);
}

/* Logo */
.logo-container {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo {
  height: 56px;
  width: auto;
  transition: transform var(--transition);
}
.logo-container:hover .logo { transform: scale(1.04); }

.logo-text h1 {
  color: var(--primary);
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .5px;
}
.logo-text p {
  color: var(--secondary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Nav */
nav ul {
  display: flex;
  list-style: none;
  gap: 8px;
  align-items: center;
}

nav a {
  color: var(--dark);
  text-decoration: none;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  position: relative;
  transition: color var(--transition);
}
nav a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 10px;
  width: 0; height: 2px;
  background: var(--secondary);
  border-radius: 2px;
  transition: width var(--transition);
}
nav a:hover { color: var(--secondary); }
nav a:hover::after,
nav a.active::after { width: calc(100% - 20px); }
nav a.active { color: var(--secondary); }

/* Hamburger (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  z-index: 1100;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: transform .3s, opacity .3s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════════════
   HERO COLLAGE (compartido en todas las páginas internas)
═══════════════════════════════════════════════════════════ */
.team-hero {
  position: relative;
  height: 70vh;
  min-height: 480px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--light);
  text-align: center;
  margin-top: 82px;
}

/* Collage de fondo */
.photo-collage {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(12, 1fr);
  gap: 4px;
  padding: 8px;
}

.collage-photo {
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-md);
  filter: grayscale(80%) brightness(.65);
  transition: filter .5s, transform .5s;
  box-shadow: 0 4px 10px rgba(0,0,0,.3);
}

/* Posicionamiento de las 6 fotos */
.photo-1 { grid-column: 1 / span 3;  grid-row: 1 / span 4; }
.photo-2 { grid-column: 4 / span 3;  grid-row: 3 / span 4; }
.photo-3 { grid-column: 7 / span 3;  grid-row: 1 / span 4; }
.photo-4 { grid-column: 10 / span 3; grid-row: 3 / span 4; }
.photo-5 { grid-column: 2 / span 4;  grid-row: 7 / span 5; }
.photo-6 { grid-column: 7 / span 4;  grid-row: 7 / span 5; }

.photo-collage:hover .collage-photo      { filter: grayscale(30%) brightness(.55); }
.photo-collage .collage-photo:hover      { filter: grayscale(0%) brightness(.65); transform: scale(1.04); z-index: 1; }

/* Overlay */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.62);
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Contenido hero */
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 780px;
  padding: 36px 40px;
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 12px 32px rgba(0,0,0,.3);
}

.title-wrapper { margin-bottom: 18px; }
.title-wrapper h2 {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0,0,0,.35);
  margin-bottom: 14px;
}

.title-decoration {
  width: 70px;
  height: 4px;
  background: var(--secondary);
  margin: 0 auto;
  border-radius: 2px;
  box-shadow: 0 2px 6px rgba(0,0,0,.2);
}

.hero-subtitle {
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto 28px;
  line-height: 1.65;
  padding: 12px 18px;
  background: rgba(255,255,255,.08);
  border-radius: var(--radius-md);
}

.icon-certified {
  color: var(--secondary);
  margin-right: 8px;
  font-size: 1.3rem;
  vertical-align: middle;
}

/* Scroll prompt */
.scroll-prompt {
  position: absolute;
  bottom: -72px;
  left: 50%;
  transform: translateX(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounce 2s infinite;
  cursor: pointer;
  transition: background var(--transition);
}
.scroll-prompt:hover { background: var(--secondary); transform: translateX(-50%) scale(1.1); }
.scroll-prompt i { font-size: 1.3rem; }

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
  40% { transform: translateY(-16px) translateX(-50%); }
  60% { transform: translateY(-8px) translateX(-50%); }
}

/* ═══════════════════════════════════════════════════════════
   SECTION TITLE (compartido)
═══════════════════════════════════════════════════════════ */
.section-title {
  text-align: center;
  margin-bottom: 48px;
  padding: 0 20px;
}
.section-title h2 {
  color: var(--primary);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 700;
  display: inline-block;
  position: relative;
  margin-bottom: 14px;
}
.section-title h2::after {
  content: '';
  position: absolute;
  width: 48px; height: 3px;
  background: var(--secondary);
  bottom: -10px; left: 50%;
  transform: translateX(-50%);
  border-radius: 2px;
}
.section-title p {
  color: var(--dark-gray);
  font-size: 17px;
  margin-top: 18px;
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════════════ */
footer {
  background: var(--primary);
  color: var(--light);
  padding: 56px 5% 24px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 0 auto 40px;
}

.footer-column h3 {
  color: var(--light);
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 20px;
  padding-bottom: 10px;
  position: relative;
}
.footer-column h3::after {
  content: '';
  position: absolute;
  width: 36px; height: 2px;
  background: var(--secondary);
  bottom: 0; left: 0;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.contact-item .contact-icon,
.contact-item > i {
  color: var(--secondary);
  font-size: 15px;
  width: 18px;
  flex-shrink: 0;
}

.footer-column p,
.footer-column a {
  color: #cccccc;
  font-size: 14px;
  line-height: 1.7;
  text-decoration: none;
  transition: color var(--transition);
}
.footer-column a:hover { color: var(--secondary); }

/* Redes sociales */
.social-icons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.social-icons a {
  color: var(--light);
  width: 42px; height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition), box-shadow var(--transition);
  position: relative;
  overflow: hidden;
  box-shadow: 0 3px 8px rgba(0,0,0,.2);
}
.social-icons a.facebook  { background: linear-gradient(135deg, #3b5998, #2d4373); }
.social-icons a.instagram { background: linear-gradient(135deg, #405de6, #833ab4, #e1306c, #fd1d1d); }
.social-icons a.twitter   { background: linear-gradient(135deg, #1da1f2, #0d8ecf); }
.social-icons a.youtube   { background: linear-gradient(135deg, #ff0000, #cc0000); }
.social-icons a.linkedin  { background: linear-gradient(135deg, #0077b5, #005582); }

.social-icons a::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(45deg, rgba(255,255,255,.25) 0%, rgba(255,255,255,0) 55%);
}
.social-icons a:hover { transform: translateY(-4px); box-shadow: 0 8px 16px rgba(0,0,0,.25); }
.social-icons a:active { transform: scale(.95); }
.social-icons a i { font-size: 18px; position: relative; z-index: 1; }

/* Newsletter */
.newsletter input {
  width: 100%;
  padding: 11px 16px;
  border-radius: 30px;
  border: none;
  margin-bottom: 10px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  outline: none;
}
.newsletter button {
  width: 100%;
  padding: 11px 16px;
  border-radius: 30px;
  background: var(--secondary);
  color: var(--light);
  border: none;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: background var(--transition);
}
.newsletter button:hover { background: var(--accent); }

/* Copyright */
.copyright {
  text-align: center;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  color: #aaa;
  font-size: 13px;
  max-width: 1200px;
  margin: 0 auto;
}

/* ═══════════════════════════════════════════════════════════
   WHATSAPP FLOTANTE
═══════════════════════════════════════════════════════════ */
.whatsapp-float {
  position: fixed;
  width: 62px; height: 62px;
  bottom: 28px; right: 28px;
  background: radial-gradient(circle at 30% 30%, #5df277, #25d366 50%, #128C7E);
  border-radius: 50%;
  box-shadow: 0 6px 16px rgba(0,0,0,.22), inset 0 -3px 6px rgba(0,0,0,.25), inset 0 3px 6px rgba(255,255,255,.2);
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255,255,255,.28);
  text-decoration: none;
  transition: transform var(--transition), box-shadow var(--transition);
  overflow: hidden;
}
.whatsapp-float::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 70%, rgba(255,255,255,.7) 0%, rgba(255,255,255,0) 65%);
}
.whatsapp-float i {
  font-size: 32px;
  color: white;
  position: relative;
  z-index: 2;
  transition: transform var(--transition);
}
.whatsapp-float:hover {
  transform: translateY(-4px) scale(1.06);
  box-shadow: 0 10px 24px rgba(0,0,0,.28), inset 0 -4px 8px rgba(0,0,0,.2);
}
.whatsapp-float:hover i { transform: scale(1.12) rotate(-5deg); }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════════════ */
@media (max-width: 1200px) {
  .photo-1 { grid-column: 1 / span 4;  grid-row: 1 / span 4; }
  .photo-2 { grid-column: 5 / span 4;  grid-row: 1 / span 4; }
  .photo-3 { grid-column: 9 / span 4;  grid-row: 1 / span 4; }
  .photo-4 { grid-column: 1 / span 4;  grid-row: 5 / span 4; }
  .photo-5 { grid-column: 5 / span 4;  grid-row: 5 / span 4; }
  .photo-6 { grid-column: 9 / span 4;  grid-row: 5 / span 4; }
}

@media (max-width: 992px) {
  .photo-collage { display: none; }
  .hero-overlay { background: linear-gradient(135deg, var(--primary), #1A2A3A); }
  .team-hero { height: 58vh; }
}

@media (max-width: 768px) {
  /* Header responsive */
  header { padding: 12px 5%; flex-wrap: wrap; }
  .nav-toggle { display: flex; }

  nav {
    width: 100%;
    max-height: 0;
    overflow: hidden;
    transition: max-height .35s ease;
  }
  nav.open { max-height: 400px; }
  nav ul {
    flex-direction: column;
    align-items: flex-start;
    padding: 12px 0 4px;
    gap: 2px;
  }
  nav li { width: 100%; }
  nav a { display: block; padding: 10px 4px; }
  nav a::after { left: 4px; }

  .team-hero { height: 50vh; min-height: 400px; }
  .hero-content { padding: 24px 18px; }
  .hero-subtitle { font-size: .95rem; }
}

@media (max-width: 576px) {
  .footer-content { grid-template-columns: 1fr; }
  .team-hero { height: 60vh; }
  .whatsapp-float { width: 54px; height: 54px; bottom: 20px; right: 20px; }
  .whatsapp-float i { font-size: 26px; }
}
