/* Blog Styles - DEXCOM */

:root {
  --primary-color: #00FF84; /* Verde Neon solicitado */
  --primary-dark: #00cc6a;
  --secondary-color: #9966FF;
  --dark-color: #000000;
  --light-color: #FFFFFF;
  --gray-color: #F5F5F5;
  --gray-medium: #E0E0E0;
  --gray-dark: #666666;
  --text-color: #333333;
  --border-color: #E0E0E0;
  --success-color: #28a745;
  --warning-color: #ffc107;
  --error-color: #dc3545;
}

/* Blog Hero Section */
.blog-hero {
  background: linear-gradient(135deg, var(--dark-color) 0%, #1a1a1a 100%);
  color: var(--light-color);
  padding: 80px 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.blog-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/blog/hero-pattern.svg');
  background-size: cover;
  opacity: 0.1;
}

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

.blog-hero h1 {
  font-size: 3.5rem;
  margin-bottom: 20px;
  font-weight: 700;
}

.hero-description {
  font-size: 1.2rem;
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.blog-search {
  max-width: 600px;
  margin: 0 auto;
}

.search-form {
  display: flex;
  position: relative;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border-radius: 50px;
  overflow: hidden;
}

.search-input {
  flex: 1;
  padding: 18px 25px;
  border: none;
  font-size: 1.1rem;
  border-radius: 50px 0 0 50px;
}

.search-button {
  background-color: var(--primary-color);
  color: var(--dark-color);
  border: none;
  padding: 0 30px;
  font-size: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 0 50px 50px 0;
}

.search-button:hover {
  background-color: var(--primary-dark);
}

/* Blog Categories Tabs */
.blog-categories-tabs {
  background-color: var(--light-color);
  padding: 20px 0;
  position: sticky;
  top: 80px;
  z-index: 100;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.tabs-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}

.tab-button {
  background: none;
  border: none;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tab-button i {
  font-size: 1.1rem;
}

.tab-button:hover {
  background-color: var(--gray-color);
}

.tab-button.active {
  background-color: var(--primary-color);
  color: var(--dark-color);
}

/* Featured Carousel */
.featured-carousel {
  padding: 60px 0;
  background-color: var(--gray-color);
}

.carousel-container {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
  background-color: var(--light-color);
}

.carousel-slide {
  display: none;
}

.carousel-slide.active {
  display: block;
}

.carousel-content {
  display: flex;
  flex-direction: row;
  min-height: 500px;
}

.carousel-image {
  flex: 1;
  overflow: hidden;
}

.carousel-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.carousel-text {
  flex: 1;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.carousel-text h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  line-height: 1.3;
}

.carousel-text p {
  font-size: 1.1rem;
  margin-bottom: 30px;
  color: var(--gray-dark);
}

.carousel-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
}

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

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--gray-medium);
  cursor: pointer;
  transition: all 0.3s ease;
}

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

.carousel-arrows {
  display: flex;
  gap: 15px;
}

.carousel-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--light-color);
  border: 1px solid var(--gray-medium);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.carousel-arrow:hover {
  background-color: var(--primary-color);
  color: var(--dark-color);
  border-color: var(--primary-color);
}

.post-category {
  display: inline-block;
  background-color: rgba(0, 255, 132, 0.2);
  color: var(--dark-color);
  padding: 6px 15px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 15px;
}

.post-category i {
  margin-right: 5px;
}

.post-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  color: var(--gray-dark);
  font-size: 0.9rem;
}

.post-meta span {
  display: flex;
  align-items: center;
  gap: 5px;
}

/* Recent Posts */
.recent-posts {
  padding: 80px 0;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.section-title {
  font-size: 2.2rem;
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 80px;
  height: 4px;
  background-color: var(--primary-color);
}

.section-view-options {
  display: flex;
  gap: 10px;
}

.view-option {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background-color: var(--light-color);
  border: 1px solid var(--gray-medium);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.view-option:hover,
.view-option.active {
  background-color: var(--primary-color);
  color: var(--dark-color);
  border-color: var(--primary-color);
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.post-card {
  background-color: var(--light-color);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
}

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

.post-image {
  height: 220px;
  overflow: hidden;
  position: relative;
}

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

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

.post-image .post-category {
  position: absolute;
  bottom: 15px;
  left: 15px;
  margin-bottom: 0;
}

.post-content {
  padding: 25px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-title {
  font-size: 1.3rem;
  margin-bottom: 15px;
  line-height: 1.4;
}

.post-excerpt {
  color: var(--gray-dark);
  margin-bottom: 20px;
  flex: 1;
}

.read-more {
  color: var(--primary-color);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  transition: all 0.3s ease;
}

.read-more i {
  transition: transform 0.3s ease;
}

.read-more:hover {
  color: var(--primary-dark);
}

.read-more:hover i {
  transform: translateX(5px);
}

.load-more-container {
  text-align: center;
}

.load-more {
  padding: 15px 30px;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.load-more i {
  transition: transform 0.3s ease;
}

.load-more:hover i {
  transform: rotate(180deg);
}

/* Rich Materials */
.rich-materials {
  padding: 80px 0;
  background-color: var(--gray-color);
}

.view-all {
  color: var(--primary-color);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.view-all i {
  transition: transform 0.3s ease;
}

.view-all:hover i {
  transform: translateX(5px);
}

.materials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}

.material-card {
  background-color: var(--light-color);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

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

.material-image {
  height: 200px;
  overflow: hidden;
  position: relative;
}

.material-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.material-type {
  position: absolute;
  top: 15px;
  right: 15px;
  padding: 8px 15px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.material-type.pdf {
  background-color: rgba(220, 53, 69, 0.2);
  color: #dc3545;
}

.material-type.video {
  background-color: rgba(0, 123, 255, 0.2);
  color: #007bff;
}

.material-type.excel {
  background-color: rgba(40, 167, 69, 0.2);
  color: #28a745;
}

.material-content {
  padding: 25px;
}

.material-category {
  font-size: 0.9rem;
  color: var(--gray-dark);
  margin-bottom: 10px;
}

.material-title {
  font-size: 1.3rem;
  margin-bottom: 15px;
  line-height: 1.4;
}

.material-description {
  color: var(--gray-dark);
  margin-bottom: 20px;
}

/* Newsletter */
.blog-newsletter {
  padding: 80px 0;
}

.newsletter-container {
  background: linear-gradient(135deg, var(--dark-color) 0%, #1a1a1a 100%);
  border-radius: 20px;
  padding: 60px;
  color: var(--light-color);
  display: flex;
  gap: 50px;
  position: relative;
  overflow: hidden;
}

.newsletter-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../images/blog/newsletter-pattern.svg');
  background-size: cover;
  opacity: 0.05;
}

.newsletter-content {
  flex: 1;
  position: relative;
  z-index: 2;
}

.newsletter-icon {
  width: 60px;
  height: 60px;
  background-color: var(--primary-color);
  color: var(--dark-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.5rem;
  margin-bottom: 20px;
}

.newsletter-content h2 {
  font-size: 2rem;
  margin-bottom: 20px;
}

.newsletter-content p {
  margin-bottom: 30px;
  font-size: 1.1rem;
}

.newsletter-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.newsletter-form .form-group:last-of-type,
.newsletter-form button {
  grid-column: span 2;
}

.newsletter-form input,
.newsletter-form select {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
}

.newsletter-form button {
  margin-top: 10px;
}

.newsletter-privacy {
  margin-top: 20px;
  font-size: 0.9rem;
  opacity: 0.7;
}

.newsletter-privacy a {
  color: var(--primary-color);
  text-decoration: underline;
}

.newsletter-image {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.newsletter-image img {
  max-width: 100%;
  max-height: 300px;
}

/* Footer Enhancements */
.footer {
  background-color: var(--dark-color);
  color: var(--light-color);
  padding-top: 80px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 50px;
  margin-bottom: 50px;
}

.footer h3 {
  font-size: 1.3rem;
  margin-bottom: 25px;
  position: relative;
  padding-bottom: 15px;
}

.footer h3::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 3px;
  background-color: var(--primary-color);
}

.footer-about p {
  margin-bottom: 20px;
  opacity: 0.7;
}

.social-links {
  display: flex;
  gap: 15px;
}

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

.social-link:hover {
  background-color: var(--primary-color);
  color: var(--dark-color);
  transform: translateY(-5px);
}

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

.footer ul li {
  margin-bottom: 15px;
}

.footer ul li a {
  color: var(--light-color);
  opacity: 0.7;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
}

.footer ul li a:hover {
  opacity: 1;
  color: var(--primary-color);
  transform: translateX(5px);
}

.footer-contact ul li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  opacity: 0.7;
}

.footer-contact ul li i {
  margin-top: 5px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 30px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  opacity: 0.7;
}

.footer-legal {
  display: flex;
  gap: 20px;
}

.footer-legal a {
  color: var(--light-color);
}

.footer-legal a:hover {
  color: var(--primary-color);
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}

@media (max-width: 992px) {
  .blog-hero h1 {
    font-size: 2.8rem;
  }
  
  .carousel-content {
    flex-direction: column;
    min-height: auto;
  }
  
  .carousel-image {
    height: 300px;
  }
  
  .newsletter-container {
    flex-direction: column;
    padding: 40px;
  }
  
  .posts-grid,
  .materials-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 768px) {
  .blog-hero {
    padding: 60px 0;
  }
  
  .blog-hero h1 {
    font-size: 2.2rem;
  }
  
  .hero-description {
    font-size: 1rem;
  }
  
  .search-input {
    padding: 15px 20px;
    font-size: 1rem;
  }
  
  .search-button {
    padding: 0 20px;
  }
  
  .tabs-container {
    overflow-x: auto;
    padding-bottom: 10px;
    justify-content: flex-start;
  }
  
  .tab-button {
    white-space: nowrap;
  }
  
  .carousel-text {
    padding: 30px 20px;
  }
  
  .carousel-text h2 {
    font-size: 1.5rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
  
  .posts-grid,
  .materials-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .footer-bottom {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
  
  .newsletter-form {
    grid-template-columns: 1fr;
  }
  
  .newsletter-form .form-group:last-of-type,
  .newsletter-form button {
    grid-column: span 1;
  }
}

@media (max-width: 576px) {
  .blog-hero h1 {
    font-size: 1.8rem;
  }
  
  .post-card {
    margin-left: -15px;
    margin-right: -15px;
    border-radius: 0;
  }
  
  .newsletter-container {
    padding: 30px 20px;
    border-radius: 15px;
  }
  
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
}
