/* Variables de color */
:root {
    --primary-color: #00ff66;
    --secondary-color: #00cc52;
    --dark-bg: #1a1a1a;
    --light-text: #ffffff;
    --card-bg: #2a2a2a;
    --border-color: #333;
}

/* General Reset y tipografía */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  color: var(--light-text);
  background-color: var(--dark-bg);
  line-height: 1.6;
}

/* Encabezado (header) */
.header {
  width: 100%;
  background-color: var(--dark-bg);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 0;
  position: fixed;
  top: 0;
  z-index: 1000;
}

.navbar {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
}

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

.nav-links a {
  text-decoration: none;
  color: var(--light-text);
  transition: color 0.3s ease;
}

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

.btn-language {
  padding: 0.5rem 1rem;
  border: 2px solid var(--primary-color);
  border-radius: 5px;
  transition: all 0.3s ease;
}

.btn-language:hover {
  background-color: var(--primary-color);
  color: var(--dark-bg) !important;
}

/* Sección Hero */
.hero {
  padding: 8rem 2rem 4rem;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-content {
  max-width: 600px;
}

.hero-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-bottom: 2rem;
  border: 3px solid var(--primary-color);
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  color: var(--primary-color);
}

.hero p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
}

.hero strong {
  color: var(--primary-color);
}

.hero-illustration img {
  width: 100%;
  max-width: 500px;
  height: auto;
}

/* Botón CTA y Dropdown */
.contact-button-group {
  position: relative;
  display: inline-block;
}

.btn-cta {
  display: inline-block;
  padding: 1rem 2rem;
  background-color: var(--primary-color);
  color: var(--dark-bg);
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-cta:hover {
  background-color: var(--secondary-color);
  transform: translateY(-2px);
}

.contact-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 5px;
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  min-width: 150px;
  z-index: 1000;
}

.contact-dropdown.show {
  display: block;
}

.contact-dropdown a {
  display: block;
  padding: 0.5rem 1rem;
  color: var(--light-text);
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-dropdown a:hover {
  background-color: var(--primary-color);
  color: var(--dark-bg);
}

/* Sección Sobre mí */
.about-section {
  padding: 4rem 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.about-section h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
  text-align: center;
}

.about-section p {
  margin-bottom: 1.5rem;
  line-height: 1.8;
}

/* Sección de Proyectos */
.projects-section {
  padding: 4rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
  background-color: #4CAF50;
  border-radius: 15px;
}

.projects-section h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 3rem;
  text-align: center;
}

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

.project-card {
  background-color: #fff;
  color: #000;
  padding: 1.5rem;
  border-radius: 8px;
  transition: transform 0.3s ease;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.2);
}

.project-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.project-content {
  padding: 1.5rem;
}

.project-content h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.project-content p {
  color: var(--light-text);
  margin-bottom: 1.5rem;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.project-tag {
  background-color: var(--primary-color);
  color: var(--dark-bg);
  padding: 0.3rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: bold;
}

/* Sección de Contacto */
.contact-section {
  padding: 4rem 2rem;
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact-section h2 {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: 2rem;
}

.contact-section p {
  margin-bottom: 2rem;
}

.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.contact-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background-color: #4CAF50;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  border: 1px solid #4CAF50;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.contact-button:hover {
  background-color: #45a049;
  color: white;
  border-color: #45a049;
}

.contact-button i {
  font-size: 1.2rem;
}

/* Pie de página */
.footer {
  background-color: #f1f1f1;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
  color: #555;
}

/* ===== Menú desplegable (WhatsApp / Mail) ===== */

/* Contenedor relativo para el botón y dropdown */
.contact-button-group {
  position: relative;
  display: inline-block;
}

/* Dropdown de contacto */
.contact-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  background-color: #fff;
  border: 1px solid #eee;
  border-radius: 5px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  padding: 0.5rem 1rem;
  display: none;
  z-index: 999;
}

.contact-dropdown.show {
  display: block;
}

.contact-dropdown a {
  display: block;
  color: #333;
  text-decoration: none;
  font-weight: 600;
  margin: 0.5rem 0;
}

.contact-dropdown a:hover {
  color: var(--primary-color);
}

.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: var(--primary-color);
  color: var(--dark-bg);
  border-radius: 50px;
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 15px 30px;
  font-weight: bold;
  font-size: 1.2rem;
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  z-index: 1000;
}

.whatsapp-float:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.4);
  background-color: var(--secondary-color);
}

.whatsapp-float i {
  font-size: 24px;
  margin-right: 8px;
}

@media (max-width: 768px) {
  .whatsapp-float {
    bottom: 20px;
    right: 20px;
    padding: 8px 20px;
    font-size: 14px;
  }
  
  .whatsapp-float i {
    font-size: 20px;
  }
}

/* Sección de Blogs */
.blogs-section {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 2rem 1rem;
}

.blogs-section h2 {
  font-size: 2rem;
  text-align: center;
  margin-bottom: 2rem;
  color: #333;
}

.blogs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2.5rem;
  margin-top: 2rem;
}

.blog-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.blog-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid #eee;
}

.blog-content {
  padding: 1.5rem;
}

.blog-category {
  display: inline-block;
  padding: 0.3rem 1rem;
  background: var(--primary-color);
  color: white;
  border-radius: 20px;
  font-size: 0.8rem;
  margin-bottom: 1rem;
}

.blog-card h3 {
  font-size: 1.4rem;
  margin-bottom: 1rem;
  color: #333;
  line-height: 1.4;
}

.blog-card p {
  color: #666;
  margin-bottom: 1rem;
  line-height: 1.6;
}

.blog-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #888;
  font-size: 0.9rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #eee;
}

.read-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}

.read-more:hover {
  text-decoration: underline;
}

/* Estilos para la página individual del blog */
.blog-post {
  max-width: 800px;
  margin: 4rem auto;
  padding: 2rem 1rem;
}

.blog-post img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 2rem 0;
}

.blog-post h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.blog-post-meta {
  color: #666;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.blog-post-content {
  line-height: 1.8;
  font-size: 1.1rem;
}

.blog-post-content p {
  margin-bottom: 1.5rem;
}

.blog-post-content h2 {
  margin: 2rem 0 1rem;
}

.blog-post-content ul,
.blog-post-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

/* Media Queries */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
    padding-top: 6rem;
  }

  .hero-content {
    margin: 0 auto;
  }

  .hero-avatar {
    margin: 0 auto 2rem;
  }

  .nav-links {
    display: none;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-buttons {
    flex-direction: column;
  }
}

/* Menú hamburguesa (móvil) */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 30px;
  height: 21px;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  height: 3px;
  width: 100%;
  background-color: var(--primary-color);
  border-radius: 3px;
  transition: all 0.3s ease;
}

.mobile-nav-active .menu-toggle span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

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

.mobile-nav-active .menu-toggle span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* Media Queries */
@media (max-width: 768px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
    padding-top: 6rem;
  }

  .hero-content {
    margin: 0 auto;
  }

  .hero-avatar {
    margin: 0 auto 2rem;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(26, 26, 26, 0.95);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 2rem;
  }

  .mobile-nav-active .nav-links {
    display: flex;
  }

  .nav-links a {
    font-size: 1.2rem;
    padding: 1rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-buttons {
    flex-direction: column;
  }
  
  .blogs-grid {
    grid-template-columns: 1fr;
  }
}
