/* ==========================================
   VARIABLES Y ESTILOS BASE
=========================================== */
:root {
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --dark: #0f172a;
  --dark-light: #1e293b;
  --text: #334155;
  --text-muted: #64748b;
  --bg-light: #f8fafc;
  --bg-white: #ffffff;
  --border: #e2e8f0;
  --success: #10b981;
  --whatsapp: #25d366;
  --whatsapp-hover: #1da851;
  --radius: 12px;
  --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background-color: var(--bg-white);
  line-height: 1.6;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================
   NAVEGACIÓN
=========================================== */
.navbar {
  position: sticky;
  top: 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  padding: 1rem 0;
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--dark);
  text-decoration: none;
}

.logo span {
  color: var(--primary);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.8rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover {
  color: var(--primary);
}

.nav-admin-link {
  color: var(--text-muted) !important;
  font-size: 0.9rem;
}

.btn-nav {
  background-color: var(--primary);
  color: #fff !important;
  padding: 0.5rem 1.2rem;
  border-radius: var(--radius);
  transition: background-color 0.2s !important;
}

.btn-nav:hover {
  background-color: var(--primary-hover) !important;
}

/* ==========================================
   SECCIONES Y ENCABEZADOS
=========================================== */
.section {
  padding: 5rem 0;
}

.section-alt {
  background-color: var(--bg-light);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 3rem;
}

.badge {
  display: inline-block;
  padding: 0.35rem 0.8rem;
  background-color: rgba(79, 70, 229, 0.1);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: 50px;
  margin-bottom: 0.8rem;
}

.section-header h2 {
  font-size: 2.2rem;
  color: var(--dark);
  margin-bottom: 0.8rem;
}

.section-header p {
  color: var(--text-muted);
  font-size: 1.1rem;
}

/* ==========================================
   HERO
=========================================== */
.hero-section {
  padding: 6rem 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
  color: #fff;
  text-align: center;
}

.hero-container h1 {
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.2rem;
}

.hero-container h1 span {
  color: #818cf8;
}

.hero-container p {
  font-size: 1.2rem;
  color: #cbd5e1;
  max-width: 750px;
  margin: 0 auto 2.5rem;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* ==========================================
   BOTONES
=========================================== */
.btn {
  display: inline-block;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background-color: var(--primary);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.btn-block {
  width: 100%;
}

.btn-whatsapp {
  background-color: var(--whatsapp);
  color: #fff;
}

.btn-whatsapp:hover {
  background-color: var(--whatsapp-hover);
}

/* ==========================================
   TARJETAS
=========================================== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--bg-white);
  padding: 2rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.3rem;
  color: var(--dark);
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--text-muted);
}

/* ==========================================
   STACK TECNOLÓGICO
=========================================== */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.8rem;
}

.tech-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.tech-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.tech-icon {
  font-size: 2.2rem;
  margin-bottom: 0.8rem;
}

.tech-card h3 {
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--dark);
}

.tech-list {
  list-style: none;
}

.tech-list li {
  padding: 0.45rem 0;
  color: var(--text);
  font-size: 0.95rem;
  border-bottom: 1px dashed var(--border);
}

.tech-list li:last-child {
  border-bottom: none;
}

/* ==========================================
   FAQ
=========================================== */
.faq-container {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.faq-question {
  width: 100%;
  padding: 1.2rem 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--dark);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.faq-question:hover {
  background-color: var(--bg-light);
}

.faq-icon {
  font-size: 1.4rem;
  font-weight: 300;
  transition: transform 0.3s ease;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  padding: 0 1.5rem;
  transition: max-height 0.3s ease, padding 0.3s ease;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 250px;
  padding: 0 1.5rem 1.25rem 1.5rem;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

/* ==========================================
   FORMULARIO Y MODAL ADMIN
=========================================== */
.appointment-card {
  max-width: 650px;
  margin: 0 auto;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem;
  box-shadow: var(--shadow-hover);
}

.login-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(5px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  padding: 1.5rem;
}

.login-card {
  width: 100%;
  max-width: 400px;
}

.form-group {
  margin-bottom: 1.2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--dark);
  font-size: 0.9rem;
}

input, select, textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.hidden {
  display: none !important;
}

.confirmation-box {
  text-align: center;
  padding: 1.5rem 0;
}

.success-icon {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.confirmation-box h3 {
  color: var(--dark);
  margin-bottom: 0.5rem;
}

.confirmation-box p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

/* BOTÓN FLOTANTE DE WHATSAPP */
.whatsapp-float {
  position: fixed;
  width: 55px;
  height: 55px;
  bottom: 25px;
  right: 25px;
  background-color: var(--whatsapp);
  color: #fff;
  border-radius: 50px;
  text-align: center;
  font-size: 28px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform 0.2s, background-color 0.2s;
}

.whatsapp-float:hover {
  transform: scale(1.1);
  background-color: var(--whatsapp-hover);
}

/* ==========================================
   FOOTER
=========================================== */
.footer {
  background-color: var(--dark);
  color: #94a3b8;
  padding: 4rem 0 2rem;
}

.footer-container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  color: #fff;
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
}

.footer-brand span {
  color: #818cf8;
}

.footer h4 {
  color: #fff;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer ul {
  list-style: none;
}

.footer ul li {
  margin-bottom: 0.5rem;
}

.footer a {
  color: #94a3b8;
  text-decoration: none;
  transition: color 0.2s;
}

.footer a:hover {
  color: #fff;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--dark-light);
  font-size: 0.9rem;
}

/* ==========================================
   RESPONSIVO
=========================================== */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero-container h1 {
    font-size: 2.1rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-container {
    grid-template-columns: 1fr;
  }
}