/*
Theme Name: HD Consultores Theme
Theme URI: https://hdconsultores.com.mx/
Author: HD Consultores
Author URI: https://hdconsultores.com.mx/
Description: Tema corporativo tecnológico para HD Consultores con formularios, pop-ups y contenido administrable desde WordPress.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
Text Domain: hd-consultores-theme
*/

:root {
  --hd-blue: #0a6ed1;
  --hd-purple: #4b2ca3;
  --hd-pink: #d80f7d;
  --hd-dark: #111827;
  --hd-text: #1f2937;
  --hd-light: #f5f8ff;
  --hd-white: #ffffff;
  --hd-gradient: linear-gradient(135deg, var(--hd-blue) 0%, var(--hd-purple) 55%, var(--hd-pink) 100%);
  --hd-radius: 14px;
  --hd-shadow: 0 12px 30px rgba(17, 24, 39, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Inter", Roboto, sans-serif;
  color: var(--hd-text);
  background-color: #f7f9ff;
  line-height: 1.6;
}

a {
  color: var(--hd-blue);
  text-decoration: none;
}

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

.hd-container {
  width: min(1150px, 92%);
  margin: 0 auto;
}

.hd-site-header {
  position: sticky;
  top: 0;
  z-index: 99;
  backdrop-filter: blur(10px);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(10, 110, 209, 0.1);
}

.hd-header-inner {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.hd-logo-wrap img {
  width: 52px;
  height: 52px;
  border-radius: 8px;
}

.hd-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--hd-dark);
  font-weight: 700;
  font-size: 1.05rem;
}

.hd-main-menu {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.hd-main-menu ul {
  list-style: none;
  display: flex;
  gap: 1.2rem;
  margin: 0;
  padding: 0;
}

.hd-main-menu li {
  margin: 0;
}

.hd-main-menu a {
  color: var(--hd-dark);
  font-weight: 600;
}

.hd-main-menu a:hover,
.hd-main-menu .current-menu-item > a {
  color: var(--hd-blue);
}

.hd-hero {
  background: var(--hd-gradient);
  color: var(--hd-white);
  padding: 78px 0;
}

.hd-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.hd-hero h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
  margin: 0 0 14px;
}

.hd-hero p {
  margin-top: 0;
}

.hd-video-box iframe,
.hd-video-box video {
  width: 100%;
  min-height: 320px;
  border: 0;
  border-radius: var(--hd-radius);
  box-shadow: var(--hd-shadow);
}

.hd-responsive-video {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: var(--hd-shadow);
  background: #0f172a;
}

.hd-responsive-video iframe,
.hd-responsive-video object,
.hd-responsive-video embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.hd-section {
  padding: 56px 0;
}

.hd-section-title {
  font-size: 1.8rem;
  margin-top: 0;
  margin-bottom: 10px;
  color: var(--hd-dark);
}

.hd-section-subtitle {
  margin-top: 0;
  margin-bottom: 28px;
  color: #5a6578;
}

.hd-grid {
  display: grid;
  gap: 1.2rem;
}

.hd-grid-5,
.hd-grid-4,
.hd-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.hd-card {
  background: var(--hd-white);
  border-radius: var(--hd-radius);
  overflow: hidden;
  box-shadow: var(--hd-shadow);
  border: 1px solid rgba(75, 44, 163, 0.08);
}

.hd-card-content {
  padding: 20px;
}

.hd-card h3 {
  margin-top: 0;
  margin-bottom: 8px;
  color: var(--hd-dark);
}

.hd-button,
button,
input[type="submit"] {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  background: var(--hd-gradient);
  color: var(--hd-white);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 8px 20px rgba(75, 44, 163, 0.3);
}

.hd-button:hover,
button:hover,
input[type="submit"]:hover {
  transform: translateY(-2px);
}

.hd-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: #5a6578;
  margin-bottom: 1rem;
}

.hd-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.hd-form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.hd-form-field.full {
  grid-column: 1 / -1;
}

.hd-form-field input,
.hd-form-field textarea,
.hd-form-field select {
  width: 100%;
  border: 1px solid #cdd7f0;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}

.hd-form-field textarea {
  min-height: 120px;
}

.hd-popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(17, 24, 39, 0.75);
  padding: 16px;
  overflow-y: auto;
}

.hd-popup.is-active {
  display: block;
}

.hd-popup-dialog {
  background: var(--hd-white);
  width: min(680px, 100%);
  margin: 38px auto;
  border-radius: var(--hd-radius);
  box-shadow: var(--hd-shadow);
  padding: 24px;
  position: relative;
}

.hd-popup-close {
  position: absolute;
  right: 12px;
  top: 12px;
  border: 0;
  border-radius: 50%;
  width: 34px;
  height: 34px;
  font-size: 1.2rem;
  background: #eff2ff;
  color: var(--hd-dark);
  box-shadow: none;
}

.hd-alert {
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 18px;
}

.hd-alert-success {
  background: #ecfdf5;
  border: 1px solid #16a34a;
  color: #14532d;
}

.hd-alert-error {
  background: #fff1f2;
  border: 1px solid #e11d48;
  color: #881337;
}

.hd-site-footer {
  background: var(--hd-dark);
  color: #cfd7eb;
  padding: 32px 0;
  margin-top: 40px;
}

.hd-site-footer a {
  color: #dbeafe;
}

.hd-mobile-toggle {
  display: none;
}

@media (max-width: 900px) {
  .hd-hero-grid {
    grid-template-columns: 1fr;
  }

  .hd-form-grid {
    grid-template-columns: 1fr;
  }

  .hd-main-menu {
    display: none;
    position: absolute;
    top: 78px;
    right: 12px;
    left: 12px;
    flex-direction: column;
    background: #fff;
    padding: 16px;
    border-radius: 12px;
    box-shadow: var(--hd-shadow);
  }

  .hd-main-menu ul {
    flex-direction: column;
    gap: 0.8rem;
  }

  .hd-main-menu.is-open {
    display: flex;
  }

  .hd-mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: #eef2ff;
    color: var(--hd-dark);
    border: 1px solid #d8e1fb;
  }
}
