/* Variables de colores */
:root {
  --primary-color: #1a2a3a;
  --secondary-color: #25D366;
  --accent-color: #FF6B6B;
  --light-color: #ffffff;
  --dark-color: #333333;
  --gray-color: #f4f4f4;
  --text-color: #333333;
  --text-light: #777777;
}

/* Reset y estilos base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--gray-color);
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  margin-bottom: 1rem;
  line-height: 1.2;
}

p {
  margin-bottom: 1rem;
}

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

ul {
  list-style: none;
}

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

/* Estructura principal */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 2rem;
  background-color: var(--light-color);
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Header */
header {
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('assets/ImagenGrande.png');
  background-size: cover;
  background-position: center;
  height: 100vh;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: var(--light-color);
  position: relative;
}

.header-content {
  max-width: 800px;
  padding: 0 20px;
  animation: fadeIn 1.5s ease-in-out;
}

header h1 {
  font-size: 4rem;
  margin-bottom: 1rem;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.tagline {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.cta-button {
  display: inline-block;
  background-color: var(--secondary-color);
  color: var(--light-color);
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: bold;
  transition: all 0.3s ease;
  font-size: 1.1rem;
}

.cta-button:hover {
  background-color: #128C7E;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Estilos para el contenedor del logo y texto */
.logo-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-img {
  height: 40px;
  width: auto;
  transition: all 0.3s ease;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  transition: all 0.3s ease;
}

/* Ajustes cuando se hace scroll */
#navbar.scrolled .logo-img {
  height: 35px;
}

#navbar.scrolled .logo-text {
  font-size: 1.3rem;
}

/* Responsive */
@media (max-width: 992px) {
  .logo-text {
    font-size: 1.3rem;
  }
}

@media (max-width: 768px) {
  .logo-container {
    gap: 8px;
  }
  .logo-img {
    height: 35px;
  }
  .logo-text {
    font-size: 1.2rem;
  }
}

@media (max-width: 576px) {
  .logo-img {
    height: 30px;
  }
  .logo-text {
    font-size: 1.1rem;
  }
}

/* Navegación */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: var(--light-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  transition: all 0.3s ease;
}

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

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

.nav-links {
  display: flex;
}

.nav-links li {
  margin-left: 2rem;
}

.nav-links a {
  color: var(--text-color);
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

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

.nav-links a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  background: var(--secondary-color);
  bottom: -5px;
  left: 0;
  transition: width 0.3s ease;
}

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

.menu-toggle {
  display: none;
  cursor: pointer;
  font-size: 1.5rem;
}

/* Sección Features */
.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.feature {
  text-align: center;
  padding: 2rem;
  border-radius: 10px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: var(--light-color);
}

.feature:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.feature i {
  font-size: 3rem;
  color: var(--secondary-color);
  margin-bottom: 1.5rem;
}

.feature h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

/* Sección Servicios */
.services h2 {
  text-align: center;
  margin-bottom: 3rem;
}

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

.service-card {
  background-color: var(--light-color);
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  border: 1px solid #eee;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-icon {
  width: 80px;
  height: 80px;
  background-color: rgba(37, 211, 102, 0.1);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 1.5rem;
}

.service-icon i {
  font-size: 2rem;
  color: var(--secondary-color);
}

.service-card h3 {
  font-size: 1.3rem;
  margin-bottom: 1rem;
}

/* Sección Portafolio */
.portfolio h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.portfolio-container {
  position: relative;
  width: 100%;
  margin: 0 auto;
  padding: 0 1rem;
  overflow: hidden;
}

.portfolio-carousel {
  display: flex;
  transition: transform 0.5s ease;
  will-change: transform;
  position: relative;
  height: 500px;
}

.portfolio-item {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
  transform: scale(0.9);
}

.portfolio-item.active {
  opacity: 1;
  transform: scale(1);
  z-index: 1;
}

.portfolio-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 42, 58, 0.8);
  color: var(--light-color);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  text-align: center;
  border-radius: 10px;
}

.portfolio-overlay h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.portfolio-overlay p {
  margin-bottom: 1.5rem;
  max-width: 600px;
}

.portfolio-link {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--secondary-color);
  color: var(--light-color);
  border-radius: 5px;
  transition: all 0.3s ease;
}

.portfolio-link:hover {
  background-color: #128C7E;
  transform: translateY(-3px);
}

.carousel-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  gap: 20px;
}

.carousel-prev, .carousel-next {
  background-color: var(--primary-color);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  font-size: 1.2rem;
}

.carousel-prev:hover, .carousel-next:hover {
  background-color: var(--secondary-color);
  transform: scale(1.1);
}

.carousel-prev:disabled, .carousel-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.carousel-indicators {
  display: flex;
  gap: 10px;
}

.carousel-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ccc;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-indicator.active {
  background-color: var(--secondary-color);
  transform: scale(1.2);
}

/* Sección Catálogo */
.catalog {
  text-align: center;
}

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

.catalog-item {
  background-color: var(--light-color);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.catalog-item:hover {
  transform: translateY(-10px);
}

.catalog-img-container {
  position: relative;
  height: 200px;
  overflow: hidden;
}

.catalog-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.catalog-item:hover .catalog-img {
  transform: scale(1.05);
}

.catalog-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(26, 42, 58, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.catalog-item:hover .catalog-overlay {
  opacity: 1;
}

.catalog-link {
  display: inline-block;
  padding: 10px 20px;
  background-color: var(--secondary-color);
  color: var(--light-color);
  border-radius: 5px;
  font-weight: bold;
  transition: all 0.3s ease;
}

.catalog-link:hover {
  background-color: #128C7E;
  transform: translateY(-3px);
}

.catalog-info {
  padding: 1.5rem;
  text-align: left;
}

.catalog-info h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: var(--primary-color);
}

.catalog-desc {
  color: var(--text-light);
  margin-bottom: 1rem;
  font-size: 0.95rem;
}

.catalog-price {
  font-weight: bold;
  color: var(--secondary-color);
  font-size: 1.2rem;
}

/* Sección Nosotros */
.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.about-image img {
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-list {
  margin-top: 1.5rem;
}

.about-list li {
  margin-bottom: 0.8rem;
  display: flex;
  align-items: center;
}

.about-list i {
  color: var(--secondary-color);
  margin-right: 10px;
}

/* Sección Contacto */
.contact h2 {
  text-align: center;
  margin-bottom: 3rem;
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}

.contact-info {
  background-color: var(--primary-color);
  color: var(--light-color);
  padding: 2rem;
  border-radius: 10px;
  text-align: center;
}

.contact-info h3 {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--light-color);
}

.contact-info p {
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-info i {
  margin-right: 10px;
  color: var(--secondary-color);
}

.social-links {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-top: 2rem;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 5px;
  color: var(--light-color);
  transition: all 0.3s ease;
}

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

.social-links i {
  margin-right: 10px;
  font-size: 1.2rem;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  color: var(--light-color);
  padding: 4rem 0 0;
}

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

.footer-logo {
  font-size: 1.8rem;
  font-weight: bold;
  margin-bottom: 1rem;
  color: var(--light-color);
}

.footer-links {
  display: flex;
  flex-direction: column;
}

.footer-links a {
  color: var(--light-color);
  margin-bottom: 0.8rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--secondary-color);
}

.footer-social {
  display: flex;
  gap: 1rem;
}

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

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

.footer-bottom {
  text-align: center;
  padding: 1.5rem 0;
  margin-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Botón volver arriba */
.back-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background-color: var(--secondary-color);
  color: var(--light-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 999;
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  background-color: #128C7E;
  transform: translateY(-5px);
}

/* Panel lateral del blog */
.blog-sidebar-container {
  position: fixed;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  z-index: 900;
  display: flex;
  transition: all 0.3s ease;
}
.blog-sidebar-container.hidden {
  transform: translateY(-50%) translateX(calc(100% - 30px));
}
.toggle-blog-btn {
  background-color: #1a2a3a;
  color: white;
  border: none;
  width: 30px;
  height: 60px;
  border-radius: 5px 0 0 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 901;
  position: relative;
}
.toggle-blog-btn:hover {
  background-color: #25D366;
}

.blog-sidebar {
  background: #f8f9fa;
  border-radius: 8px 0 0 8px;
  padding: 0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  overflow: hidden;
  font-family: 'Segoe UI', sans-serif;
  width: 250px;
  transition: transform 0.3s ease;
}
.blog-sidebar-container.hidden .blog-sidebar {
  transform: translateX(100%);
}
.blog-sidebar.hidden {
  transform: translateX(100%);
}

.blog-sidebar h3 {
  background: #1a2a3a;
  color: white;
  padding: 12px 15px;
  margin: 0;
  font-size: 1.1rem;
  border-bottom: 2px solid #25D366;
}

.blog-sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.blog-sidebar li {
  border-bottom: 1px solid #eaeaea;
  transition: all 0.3s ease;
}

.blog-sidebar li:last-child {
  border-bottom: none;
}

.blog-sidebar a {
  display: block;
  padding: 12px 15px;
  color: #333;
  text-decoration: none;
  transition: all 0.2s ease;
}

.blog-sidebar a:hover {
  background: #e9f7ef;
  color: #1a2a3a;
  padding-left: 20px;
}

.blog-sidebar a::before {
  content: "•";
  color: #25D366;
  margin-right: 10px;
}

.blog-sidebar a.active {
  background: #25D366;
  color: white;
}

.toggle-blog-btn {
  background-color: #1a2a3a;
  color: white;
  border: none;
  width: 30px;
  height: 60px;
  border-radius: 5px 0 0 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  margin-right: -5px;
  z-index: 901;
}

.toggle-blog-btn:hover {
  background-color: #25D366;
}

/* Animaciones */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive */
@media (max-width: 1200px) {
  .blog-sidebar-container {
    display: none;
  }
}

@media (max-width: 992px) {
  .about-content,
  .contact-container {
    grid-template-columns: 1fr;
  }
  
  .about-image {
    order: -1;
  }
  
  .portfolio-item {
    height: 350px;
  }
}

@media (max-width: 768px) {
  header h1 {
    font-size: 3rem;
  }
  
  .tagline {
    font-size: 1.2rem;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background-color: var(--light-color);
    flex-direction: column;
    align-items: center;
    padding-top: 2rem;
    transition: left 0.3s ease;
  }
  
  .nav-links.active {
    left: 0;
  }
  
  .nav-links li {
    margin: 1rem 0;
  }
  
  .portfolio-item {
    height: 300px;
  }

  .catalog-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}

@media (max-width: 576px) {
  header h1 {
    font-size: 2.5rem;
  }
  
  .container {
    padding: 1.5rem;
  }
  
  .social-links a {
    padding: 10px 15px;
    font-size: 0.9rem;
  }
  
  .portfolio-overlay h3 {
    font-size: 1.5rem;
  }
  
  .portfolio-overlay p {
    font-size: 0.9rem;
  }
  
  .portfolio-item {
    height: 250px;
  }
}