/* ===========================================
   MacBurrayLC - División Ciberseguridad
   Estilo Profesional - Moderno - Responsivo
   =========================================== */

:root {
  --primary: #0a1628;
  --primary-light: #152238;
  --accent: #e94560;
  --accent-hover: #c73a52;
  --accent-glow: rgba(233, 69, 96, 0.3);
  --gold: #f0c040;
  --text: #e8e8e8;
  --text-muted: #8899b0;
  --bg-dark: #0d1117;
  --bg-card: #161b22;
  --bg-card-hover: #1c2333;
  --border: #30363d;
  --gradient-1: linear-gradient(135deg, #0a1628 0%, #1a1a3e 50%, #0a1628 100%);
  --gradient-accent: linear-gradient(135deg, #e94560 0%, #c73a52 100%);
  --gradient-gold: linear-gradient(135deg, #f0c040 0%, #d4a017 100%);
  --shadow-card: 0 8px 32px rgba(0,0,0,0.3);
  --shadow-glow: 0 0 40px rgba(233, 69, 96, 0.15);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}

/* ===== ANIMATED BACKGROUND PARTICLES ===== */
#particles-canvas {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== NAVBAR ===== */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 16px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: var(--transition);
  background: rgba(10, 22, 40, 0.0);
}
.navbar.scrolled {
  background: rgba(10, 22, 40, 0.95);
  backdrop-filter: blur(20px);
  padding: 10px 40px;
  box-shadow: 0 2px 20px rgba(0,0,0,0.3);
}
.navbar .logo {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 800;
  color: white;
  text-decoration: none;
  letter-spacing: -0.5px;
}
.navbar .logo .shield-icon {
  width: 38px; height: 38px;
  background: var(--gradient-accent);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.navbar .logo span {
  color: var(--accent);
}
.navbar .logo small {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  display: block;
  letter-spacing: 1px;
  text-transform: uppercase;
}
.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
  list-style: none;
}
.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  transition: var(--transition);
}
.nav-links a:hover {
  color: white;
  background: rgba(255,255,255,0.05);
}
.nav-links a.cta-nav {
  background: var(--gradient-accent);
  color: white;
  font-weight: 600;
}
.nav-links a.cta-nav:hover {
  box-shadow: 0 0 20px var(--accent-glow);
  transform: translateY(-1px);
}
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 40px 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--gradient-1);
  z-index: 0;
}
.hero-bg::before {
  content: '';
  position: absolute;
  top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(ellipse at 30% 50%, rgba(233,69,96,0.06) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 30%, rgba(240,192,64,0.04) 0%, transparent 50%);
  animation: heroPulse 10s ease-in-out infinite;
}
@keyframes heroPulse {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.1); opacity: 1; }
}
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 900px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(233, 69, 96, 0.1);
  border: 1px solid rgba(233, 69, 96, 0.2);
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 20px;
  letter-spacing: -1px;
}
.hero h1 .accent { color: var(--accent); }
.hero h1 .gold { color: var(--gold); }
.hero p {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-muted);
  max-width: 650px;
  margin: 0 auto 36px;
  line-height: 1.8;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--gradient-accent);
  color: white;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(233, 69, 96, 0.3);
}
.btn-secondary {
  background: rgba(255,255,255,0.05);
  color: white;
  border: 1px solid var(--border);
  backdrop-filter: blur(10px);
}
.btn-secondary:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}
.btn-lg {
  padding: 18px 40px;
  font-size: 17px;
}

/* ===== SCROLL INDICATOR ===== */
.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: bounceDown 2s ease-in-out infinite;
}
.scroll-indicator .mouse {
  width: 24px; height: 38px;
  border: 2px solid var(--text-muted);
  border-radius: 12px;
  position: relative;
}
.scroll-indicator .mouse::after {
  content: '';
  position: absolute;
  top: 6px; left: 50%;
  transform: translateX(-50%);
  width: 3px; height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollDot 2s ease-in-out infinite;
}
@keyframes scrollDot {
  0%, 100% { opacity: 1; transform: translateX(-50%) translateY(0); }
  50% { opacity: 0.3; transform: translateX(-50%) translateY(10px); }
}
@keyframes bounceDown {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(5px); }
}

/* ===== SECTION COMMON ===== */
.section {
  position: relative;
  padding: 100px 40px;
  z-index: 1;
}
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}
.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(233, 69, 96, 0.1);
  padding: 4px 14px;
  border-radius: 50px;
  font-size: 11px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}
.section h2 {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -0.5px;
}
.section h2 .accent { color: var(--accent); }
.section h2 .gold { color: var(--gold); }
.section > .subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ===== SECTION: SCANNER (Analiza tu Sitio) ===== */
#scanner {
  background: var(--primary);
}
.scanner-container {
  max-width: 800px;
  margin: 0 auto;
}
.scanner-input-group {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}
.scanner-input-group input {
  flex: 1;
  padding: 16px 20px;
  border-radius: 12px;
  border: 2px solid var(--border);
  background: var(--bg-card);
  color: white;
  font-size: 16px;
  outline: none;
  transition: var(--transition);
}
.scanner-input-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 20px var(--accent-glow);
}
.scanner-input-group input::placeholder {
  color: var(--text-muted);
}
.scanner-input-group button {
  padding: 16px 36px;
  border-radius: 12px;
  background: var(--gradient-accent);
  color: white;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.scanner-input-group button:hover {
  box-shadow: 0 0 30px var(--accent-glow);
  transform: translateY(-1px);
}
.scanner-input-group button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Visitor info */
.visitor-info {
  text-align: center;
  color: white;
  font-size: 0.85rem;
  margin-bottom: 20px;
  opacity: 0.8;
  font-family: 'Courier New', monospace;
}
.visitor-info span {
  display: inline;
}

/* Scanner site info */
.scan-site-info {
  background: rgba(59,130,246,0.1);
  border: 1px solid rgba(59,130,246,0.2);
  border-radius: 8px;
  padding: 10px 16px;
  margin: 12px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
  text-align: center;
}
.scan-site-info span {
  color: #94a3b8;
}

/* Scanner loading */
.scanner-loading {
  display: none;
  text-align: center;
  padding: 40px;
}
.scanner-loading.active { display: block; }
.scanner-spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.scanner-loading p {
  color: var(--text-muted);
  font-size: 14px;
}

/* Scanner results */
.scanner-result {
  display: none;
  margin-top: 30px;
}
.scanner-result.active { display: block; }
.result-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 30px;
  border: 1px solid var(--border);
  margin-bottom: 20px;
}
.result-card .domain {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
  word-break: break-all;
}
.vuln-item {
  display: flex;
  gap: 16px;
  padding: 18px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  background: rgba(255,255,255,0.02);
  border: 1px solid rgba(255,255,255,0.05);
  transition: var(--transition);
}
.vuln-item:hover {
  background: var(--bg-card-hover);
  transform: translateX(4px);
}
.vuln-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.vuln-icon.critical {
  background: rgba(233, 69, 96, 0.15);
  color: var(--accent);
}
.vuln-icon.medium {
  background: rgba(240, 192, 64, 0.15);
  color: var(--gold);
}
.vuln-info h4 {
  font-size: 15px;
  margin-bottom: 4px;
}
.vuln-info p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
.vuln-info .tag {
  display: inline-block;
  font-size: 10px;
  padding: 2px 10px;
  border-radius: 6px;
  margin-top: 6px;
}
.tag-critical { background: rgba(233, 69, 96, 0.15); color: var(--accent); }
.tag-medium { background: rgba(240, 192, 64, 0.15); color: var(--gold); }
.vuln-detail { font-size: 13px; margin: 8px 0; line-height: 1.5; }
.vuln-solution { border-left: 3px solid var(--accent); padding-left: 12px; background: rgba(59,130,246,0.05); border-radius: 0 6px 6px 0; }
.vuln-normative { border-left: 3px solid #8b5cf6; padding-left: 12px; background: rgba(139,92,246,0.05); border-radius: 0 6px 6px 0; font-size: 12px; color: var(--text-muted); }

.result-cta {
  text-align: center;
  padding: 30px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid rgba(233, 69, 96, 0.2);
  margin-top: 20px;
}
.result-cta h3 {
  font-size: 18px;
  margin-bottom: 8px;
}
.result-cta p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

.scanner-error {
  display: none;
  background: rgba(233, 69, 96, 0.1);
  border: 1px solid rgba(233, 69, 96, 0.2);
  padding: 20px;
  border-radius: var(--radius-sm);
  margin-top: 20px;
  color: var(--accent);
  font-size: 14px;
}
.scanner-error.active { display: block; }

/* ===== SECTION: ABOUT / PROFILE ===== */
#about {
  background: var(--bg-dark);
}
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  max-width: 1100px;
  margin: 0 auto;
  align-items: center;
}
.about-image {
  position: relative;
}
.about-image .img-frame {
  width: 100%;
  aspect-ratio: 4/5;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}
.about-image .img-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-image .img-frame::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(10,22,40,0.8));
}
.about-image .exp-badge {
  position: absolute;
  bottom: -20px; right: -20px;
  background: var(--gradient-accent);
  color: white;
  width: 100px; height: 100px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 30px var(--accent-glow);
  z-index: 2;
}
.about-image .exp-badge .number {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}
.about-image .exp-badge .label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
}
.about-text h2 {
  font-size: clamp(1.8rem, 3vw, 2.5rem);
  margin-bottom: 8px;
}
.about-text .title-role {
  color: var(--accent);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 16px;
}
.about-text p {
  color: var(--text-muted);
  font-size: 15px;
  margin-bottom: 16px;
  line-height: 1.8;
}
.about-credentials {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}
.cred-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  font-size: 13px;
  border: 1px solid rgba(255,255,255,0.05);
}
.cred-item .icon {
  font-size: 18px;
}

/* ===== SECTION: SERVICES ===== */
#services {
  background: var(--primary);
}
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  max-width: 1100px;
  margin: 0 auto;
}
.service-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 36px 30px;
  border: 1px solid var(--border);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--gradient-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover {
  border-color: rgba(233, 69, 96, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
}
.service-icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  display: flex;
  align-items: center; justify-content: center;
  font-size: 26px;
  margin-bottom: 20px;
}
.service-card h3 {
  font-size: 18px;
  margin-bottom: 10px;
}
.service-card p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

/* ===== SECTION: CONTACT / CONSULTATION ===== */
#contact {
  background: var(--bg-dark);
}
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  max-width: 1000px;
  margin: 0 auto;
}
.contact-info-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 40px;
  border: 1px solid var(--border);
}
.contact-info-card h3 {
  font-size: 20px;
  margin-bottom: 20px;
}
.contact-info-card .info-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}
.contact-info-card .info-item .icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: rgba(233, 69, 96, 0.1);
  display: flex;
  align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.contact-info-card .info-item h4 {
  font-size: 14px;
  margin-bottom: 2px;
}
.contact-info-card .info-item p {
  color: var(--text-muted);
  font-size: 13px;
}
.contact-form {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 40px;
  border: 1px solid var(--border);
}
.contact-form h3 {
  font-size: 20px;
  margin-bottom: 8px;
}
.contact-form .form-subtitle {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 24px;
}
.form-group {
  margin-bottom: 16px;
}
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text);
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--primary);
  color: white;
  font-size: 14px;
  outline: none;
  transition: var(--transition);
  font-family: inherit;
}
.form-group textarea {
  min-height: 120px;
  resize: vertical;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
}
.form-group select option {
  background: var(--primary);
  color: white;
}
.contact-form button[type="submit"] {
  width: 100%;
  padding: 16px;
  border-radius: 10px;
  background: var(--gradient-accent);
  color: white;
  border: none;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}
.contact-form button[type="submit"]:hover {
  box-shadow: 0 0 30px var(--accent-glow);
  transform: translateY(-1px);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--primary);
  padding: 60px 40px 30px;
  text-align: center;
  border-top: 1px solid var(--border);
}
.footer .logo-bottom {
  font-size: 24px;
  font-weight: 800;
  color: white;
  margin-bottom: 20px;
}
.footer .logo-bottom span { color: var(--accent); }
.footer .links {
  display: flex;
  justify-content: center;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.footer .links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 13px;
  transition: var(--transition);
}
.footer .links a:hover { color: var(--accent); }
.footer .copy {
  color: var(--text-muted);
  font-size: 12px;
  opacity: 0.6;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; gap: 30px; }
  .about-image .exp-badge { right: 10px; bottom: -10px; }
}

@media (max-width: 768px) {
  .navbar { padding: 12px 20px; }
  .nav-links { 
    display: none;
    position: fixed;
    top: 70px; left: 0; right: 0;
    background: rgba(10,22,40,0.98);
    flex-direction: column;
    padding: 20px;
    gap: 4px;
  }
  .nav-links.open { display: flex; }
  .mobile-menu-btn { display: block; }
  .nav-links a { padding: 12px 16px; width: 100%; border-radius: 8px; }
  
  .section { padding: 60px 20px; }
  .hero { padding: 100px 20px 60px; }
  
  .scanner-input-group { flex-direction: column; }
  .scanner-input-group button { width: 100%; }
  
  .about-credentials { grid-template-columns: 1fr; }
  .services-grid { grid-template-columns: 1fr; }
  
  .contact-form,
  .contact-info-card { padding: 24px; }
  
  .hero-actions { flex-direction: column; align-items: center; }
  .btn-lg { width: 100%; justify-content: center; }
}


/* ===== PHONE INPUT WITH COUNTRY SELECTOR ===== */
.phone-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

.phone-country-select {
  flex: 0 0 200px;
  min-width: 180px;
  appearance: auto;
  cursor: pointer;
}

.phone-prefix {
  flex: 0 0 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.5px;
  transition: all 0.3s;
}

.phone-input {
  flex: 1;
}

.phone-hint {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.phone-hint.valid { color: #2ecc71; }
.phone-hint.error { color: var(--accent); }

@media (max-width: 600px) {
  .phone-row {
    flex-wrap: wrap;
  }
  .phone-country-select {
    flex: 1 1 100%;
  }
  .phone-prefix {
    flex: 0 0 50px;
  }
  .phone-input {
    flex: 1;
  }
}

@media (max-width: 480px) {
  .navbar .logo { font-size: 18px; }
  .navbar .logo .shield-icon { width: 32px; height: 32px; font-size: 14px; }
}

/* Logo imagen (escudo McBarri) */
.navbar .logo img.shield-icon {
  background: transparent;
  border-radius: 0;
  width: 38px; height: 38px;
  object-fit: contain;
}
.footer .logo-bottom img.footer-logo-img {
  width: 30px; height: 30px;
  vertical-align: middle;
  margin-right: 8px;
}
@media (max-width: 768px) {
  .navbar .logo img.shield-icon { width: 32px; height: 32px; }
}
