/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: Arial, sans-serif;
  color: #3a3a3a;
  background: #fff;
  line-height: 1.6;
}
p{
  color: #484848;
}
h2, h3, h4 {
  color: #484848;
}
/* Logo */
.logo {
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 18px;
    color: #333;
    
}

.logo span {
    background: #e76a2b;
    color: #fff;
    border-radius: 4px;
    padding: 5px 8px;
    margin-right: 8px;    
}
.logo a {
    text-decoration: none;
    color: #333;
}
/* HERO */
.hero {
  text-align: center;
  padding: 4rem 1rem;
  color: #3a3a3a;
}

.hero .badge {
    display: inline-block;
    background: #fff4e5;
    color: #e67e22;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}
.hero h1 {
  /* font-size: 2.5rem; */
  font-weight: bold;
}
.hero .highlight {
  color: #e74c3c;
}
.hero p {
  margin: 1rem auto 2rem;
  max-width: 600px;
}
.cta-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2rem;
}
.btn-primary {
  background: #f25c05 !important;
  color: white;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}
.btn-primary:hover {
  background: #d84d00 !important;
}
.btn-secondary {
  background: #f9f9f9;
  color: #333;
  padding: 0.8rem 1.5rem;
  border: 1px solid #ddd;
  border-radius: 8px;
  cursor: pointer;
}
.btn-secondary:hover {
  background: #eee;
}

.btn-orange {
  background: #f25c05;
  color: white;
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-orange:hover {
  background: #d84d00;
  color: white;
  text-decoration: none;
}

.btn-primary,
.btn-secondary {
  text-decoration: none; /* Quita la línea */
  display: inline-flex;  /* Para que se comporte como los botones */
  align-items: center;
  justify-content: center;
}

/* Stats */
.stats {
  display: flex;
  justify-content: center;
  gap: 2rem;  
  color: #e46212;
  flex-wrap: wrap;
}
.stat {
  background: #fff7e6;
  padding: 1rem;
  border-radius: 12px;
  font-size: 1rem;
  color: #e46212;
  max-width: 15rem;
  min-width: 7rem;
  height: 5rem;
}
.stat p {
  padding: 0;
  color: #484848;
  font-size: 0.875rem;
}
.stat strong {
  font-size: 1.5rem;
}

.fw-bold {
    color: #484848;
}


/* TEMPLATES */
.templates {
  max-width: 1200px;
  margin: auto;
  padding: 4rem 1rem;
  text-align: center;
}
.templates h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.templates p {
  margin-bottom: 0rem;
  color: #666;
}
.categories {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.cat {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  background: #f9f9f9;
  border-radius: 20px;
  cursor: pointer;
}
.cat {
  text-decoration: none; /* Quita el underline azul */
  color: inherit; /* Hereda el color del padre */
  display: inline-block;
}

.cat.active, .cat:hover {
  background: #f25c05;
  color: white;
  border-color: #f25c05;
  text-decoration: none;
}
.template-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Por defecto 2 columnas para móviles */
  gap: 1rem; /* Gap más pequeño en móviles */
  padding: 0 0.5rem; /* Padding para que no toque los bordes */
}

.template-card {
  background: #fffbed;
  border: 1px solid hsl(0, 0%, 93%);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  overflow: hidden;
  text-align: left;
  transition: transform 0.3s ease;
}

.card-image-container {
  position: relative;
  overflow: hidden;
}

.card-image-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0);
  transition: background-color 0.3s ease;
}

.card-image-container img {
  width: 100%;
  display: block;
  transition: transform 0.3s ease;
}

.template-card:hover .card-image-container::after {
  background: rgba(0, 0, 0, 0.4);
}

.template-card:hover .card-image-container img {
  transform: scale(1.05);
}

.hover-buttons {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 10px;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.template-card:hover .hover-buttons {
  opacity: 1;
}

.hover-buttons .btn-view,
.hover-buttons .btn-save {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  transition: all 0.2s ease;
  background-color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  display: inline-block;
}

.hover-buttons .btn-view {
  color: #f25c05;
}

.hover-buttons .btn-save {
  color: #6c757d;
}

.hover-buttons .btn-view:hover {
  background-color: #f25c05;
  color: white;
  transform: translateY(-2px);
}

.hover-buttons .btn-save:hover {
  background-color: #f25c05;
  color: white;
  transform: translateY(-2px);
}

.template-card .title { 
  font-weight: bold;   
    font-size: 0.7rem;   
    padding: 0.2rem 0.4rem;
    white-space: nowrap;
  }
.template-card .meta {
  padding: 0 0.5rem 1rem;
  color: #888;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: space-around;
}
.card-tag {
  position: absolute;
  top: 0;
  left: 0;
  padding: 0.3rem 0.8rem;
  font-size: 0.75rem;
  font-weight: bold;
  color: white;
  border-radius: 12px 0 12px 0;
  z-index: 2;
}

.tag-premium {
  background-color: #e74c3c;
}

.tag-new {
  background-color: #2ecc71;
}

.tag-hot {
  background-color: #f39c12;
}


/* Tablets (768px y mayor) */
/* Desktop */
@media(min-width: 768px) {
    nav {
      display: flex !important;
      position: static;
      flex-direction: row;
      gap: 20px;
      border: none;
    }

    .search-box {
      display: block;
    }

    .search-box input {
      padding: 6px 10px;
      border: 1px solid #ddd;
      border-radius: 4px;
    }

    .auth {
      display: flex;
      align-items: center;
    }

    .hamburger {
      display: none;
    }
    
  
  .template-card .title {
    font-weight: bold;
    padding: 0.8rem;
    font-size: 0.8rem;
    
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
  }
  .template-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    padding: 0;
  }
  .template-card .meta {
    padding: 0 0.8rem 1rem;
    color: #888;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-around;
  }
}



/* Desktop (1024px y mayor) */
@media (min-width: 1024px) {
  .template-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
  }
}
