/* ============================================
   MiConexionMX.com - Professional Tech Website
   Modern, Clean, Responsive Design
   ============================================ */

/* === ROOT VARIABLES === */
:root {
  /* Colors */
  --primary-color: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #3b82f6;
  --secondary-color: #f97316;
  --secondary-dark: #ea580c;

  --text-dark: #1f2937;
  --text-medium: #4b5563;
  --text-light: #6b7280;
  --bg-light: #f9fafb;
  --bg-white: #ffffff;
  --border-color: #e5e7eb;

  /* Spacing */
  --container-width: 1200px;
  --section-padding: 5rem 2rem;
  --card-radius: 12px;
  --btn-radius: 8px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);

  /* Transitions */
  --transition: all 0.3s ease;
}

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

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

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

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* === CONTAINER === */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 2rem;
}

/* === HEADER & NAVIGATION === */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: var(--transition);
}

header.scrolled {
  box-shadow: var(--shadow-md);
}

nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  max-width: var(--container-width);
  margin: 0 auto;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.nav-links a {
  color: var(--text-medium);
  font-weight: 500;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
  pointer-events: none;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links a.active {
  color: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: var(--text-dark);
  border-radius: 3px;
  transition: var(--transition);
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(7px, 7px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* === HERO SECTION === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.95), rgba(249, 115, 22, 0.85)),
              url('../img/img_hero.jpg') center/cover no-repeat;
  color: white;
  text-align: center;
  padding: 8rem 2rem 4rem;
  margin-top: 70px;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.3));
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  margin-bottom: 1.5rem;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero p {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  margin-bottom: 2.5rem;
  opacity: 0.95;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* === BUTTONS === */
.btn {
  display: inline-block;
  padding: 1rem 2.5rem;
  border-radius: var(--btn-radius);
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
  cursor: pointer;
  text-align: center;
}

.btn-primary {
  background: var(--secondary-color);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background: var(--secondary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

.btn-outline {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.btn-outline:hover {
  background: white;
  color: var(--primary-color);
}

.btn-secondary {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
  background: var(--primary-color);
  color: white;
}

/* === SECTIONS === */
section {
  padding: var(--section-padding);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  color: var(--text-dark);
  margin-bottom: 1rem;
  font-weight: 700;
}

.section-header p {
  font-size: 1.2rem;
  color: var(--text-medium);
  max-width: 700px;
  margin: 0 auto;
}

.section-alt {
  background: var(--bg-light);
}

/* === CARDS === */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--bg-white);
  border-radius: var(--card-radius);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transform: scaleX(0);
  transition: var(--transition);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card:hover::before {
  transform: scaleX(1);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  color: white;
}

.card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

.card p {
  color: var(--text-medium);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

/* === SERVICE CARDS === */
.service-card {
  position: relative;
  overflow: hidden;
}

.service-card img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: var(--card-radius);
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.service-card:hover img {
  transform: scale(1.05);
}

/* === TEAM SECTION === */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2.5rem;
}

.team-member {
  text-align: center;
}

.team-member img {
  width: 100%;
  max-width: 250px;
  height: 250px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.team-member:hover img {
  box-shadow: var(--shadow-lg);
  transform: scale(1.05);
}

.team-member h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.team-member .role {
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.team-member p {
  color: var(--text-medium);
  font-size: 0.95rem;
}

/* === BLOG CARDS === */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
}

.blog-card {
  background: var(--bg-white);
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
}

.blog-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-5px);
}

.blog-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: var(--transition);
}

.blog-card:hover img {
  transform: scale(1.05);
}

.blog-content {
  padding: 2rem;
}

.blog-meta {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

.blog-content h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: var(--text-dark);
  line-height: 1.4;
}

.blog-content p {
  color: var(--text-medium);
  margin-bottom: 1.5rem;
  line-height: 1.7;
}

/* === ARTICLE PAGE === */
.article-header {
  padding: 8rem 2rem 3rem;
  background: var(--bg-light);
  margin-top: 70px;
}

.article-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 900px;
  margin: 0 auto 1.5rem;
  text-align: center;
}

.article-meta {
  text-align: center;
  color: var(--text-medium);
  margin-bottom: 2rem;
}

.article-featured-image {
  max-width: 1200px;
  margin: 0 auto;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.article-featured-image img {
  width: 100%;
  height: auto;
}

.article-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 2rem;
}

.article-content h2 {
  font-size: 2rem;
  margin: 2.5rem 0 1.5rem;
  color: var(--text-dark);
}

.article-content h3 {
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  color: var(--text-dark);
}

.article-content p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
  color: var(--text-medium);
  font-size: 1.1rem;
}

.article-content ul,
.article-content ol {
  margin: 1.5rem 0 1.5rem 2rem;
  color: var(--text-medium);
}

.article-content li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
  list-style: disc;
}

.article-author {
  background: var(--bg-light);
  padding: 2rem;
  border-radius: var(--card-radius);
  margin: 3rem 0;
  display: flex;
  gap: 2rem;
  align-items: center;
}

.author-image {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* === CONTACT FORM === */
.contact-section {
  background: var(--bg-light);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
}

.contact-info {
  background: var(--bg-white);
  padding: 2.5rem;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-sm);
}

.contact-item {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2rem;
  align-items: flex-start;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.3rem;
  flex-shrink: 0;
}

.contact-item h4 {
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.contact-item p {
  color: var(--text-medium);
}

.contact-form {
  background: var(--bg-white);
  padding: 2.5rem;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-sm);
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 2px solid var(--border-color);
  border-radius: var(--btn-radius);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 150px;
}

.form-error {
  color: #dc2626;
  font-size: 0.875rem;
  margin-top: 0.5rem;
  display: none;
}

.form-group.error input,
.form-group.error textarea {
  border-color: #dc2626;
}

.form-group.error .form-error {
  display: block;
}

/* === MAP === */
.map-container {
  margin-top: 3rem;
  height: 450px;
  border-radius: var(--card-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* === FOOTER === */
footer {
  background: var(--text-dark);
  color: white;
  padding: 4rem 2rem 2rem;
}

.footer-content {
  max-width: var(--container-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-section h3 {
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.footer-section p {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.7;
  margin-bottom: 1rem;
}

.footer-section ul li {
  margin-bottom: 0.75rem;
}

.footer-section ul li a {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.footer-section ul li a:hover {
  color: var(--secondary-color);
  padding-left: 5px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.footer-logo img {
  width: 40px;
  height: 40px;
}

.footer-logo span {
  font-size: 1.5rem;
  font-weight: 700;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.social-links a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
}

.footer-bottom {
  max-width: var(--container-width);
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

/* === COOKIE BANNER === */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--text-dark);
  color: white;
  padding: 1.5rem 2rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
  z-index: 9999;
  display: none;
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.cookie-banner.show {
  display: block;
}

.cookie-content {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.cookie-banner p {
  margin: 0;
  flex: 1;
  min-width: 250px;
}

.cookie-buttons {
  display: flex;
  gap: 1rem;
}

.cookie-banner .btn {
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
}

/* === STATS SECTION === */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 2rem;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 1.1rem;
  color: var(--text-medium);
}

/* === ABOUT PAGE === */
.about-intro {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
}

.about-intro img {
  width: 100%;
  border-radius: var(--card-radius);
  box-shadow: var(--shadow-lg);
}

/* === RESPONSIVE DESIGN === */
@media (max-width: 768px) {
  .menu-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transform: translateX(-100%);
    transition: var(--transition);
  }

  .nav-links.active {
    transform: translateX(0);
  }

  .hero {
    min-height: 80vh;
    padding: 6rem 1.5rem 3rem;
  }

  section {
    padding: 3rem 1.5rem;
  }

  .section-header {
    margin-bottom: 2.5rem;
  }

  .cards-grid,
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .team-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
  }

  .contact-wrapper {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .cookie-content {
    flex-direction: column;
    text-align: center;
  }

  .cookie-buttons {
    width: 100%;
    justify-content: center;
  }

  .about-intro {
    grid-template-columns: 1fr;
  }

  .article-author {
    flex-direction: column;
    text-align: center;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .hero-buttons .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .btn {
    padding: 0.875rem 2rem;
    font-size: 0.95rem;
  }

  nav {
    padding: 1rem 1.5rem;
  }

  .logo {
    font-size: 1.25rem;
  }

  .logo img {
    width: 40px;
    height: 40px;
  }
}

/* === UTILITY CLASSES === */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mt-4 { margin-top: 4rem; }

.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.mb-4 { margin-bottom: 4rem; }

.hidden {
  display: none;
}
