/* Blog Styles - Serrurier Dépannage 24 */

:root {
  /* Использование цветовой палитры из основного сайта */
  --primary-color: #2C3E50;
  --secondary-color: #E67E22;
  --accent-color: #27AE60;
  --dark-color: #1A252F;
  --light-color: #ECF0F1;
  --text-color: #34495E;
  --danger-color: #E74C3C;
  --warning-color: #F39C12;
  --success-color: #27AE60;
  --info-color: #3498DB;

  /* Градиенты */
  --gradient-primary: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
  --gradient-hero: linear-gradient(165deg, #1A252F 0%, #2C3E50 50%, #34495E 100%);
  --gradient-accent: linear-gradient(135deg, #E67E22 0%, #F39C12 100%);

  /* Тени */
  --shadow-sm: 0 2px 4px rgba(44, 62, 80, 0.1);
  --shadow-md: 0 4px 12px rgba(44, 62, 80, 0.15);
  --shadow-lg: 0 8px 24px rgba(44, 62, 80, 0.2);
  --shadow-xl: 0 16px 48px rgba(44, 62, 80, 0.25);
}

/* Reset для блога */
.blog-main * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Header для блога */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(44, 62, 80, 0.08);
  z-index: 1000;
  transition: all 0.3s ease;
}

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

.logo-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-icon {
  width: 48px;
  height: 48px;
  background: var(--gradient-primary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
  box-shadow: var(--shadow-md);
}

.logo-icon svg {
  width: 30px;
  height: 30px;
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--dark-color);
  line-height: 1.2;
}

.logo-subtitle {
  font-size: 0.875rem;
  color: var(--text-color);
  opacity: 0.8;
}

.header-actions {
  display: flex;
  gap: 1rem;
}

.home-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--gradient-accent);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.home-link:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Main Blog Content */
.blog-main {
  padding-top: 100px;
  min-height: 100vh;
  background: linear-gradient(to bottom, #f8f9fa 0%, white 100%);
}

.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

/* Blog Header */
.blog-header {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  padding: 2rem 0;
}

.blog-header::before {
  content: '🔐';
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 3rem;
  opacity: 0.1;
}

.blog-title {
  font-size: 3rem;
  font-weight: 800;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.blog-subtitle {
  font-size: 1.25rem;
  color: var(--text-color);
  max-width: 600px;
  margin: 0 auto;
}

/* Articles Grid */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.blog-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 1px solid rgba(44, 62, 80, 0.08);
  position: relative;
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--secondary-color);
  z-index: 10;
}

.blog-card-image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.blog-card-header.no-image {
  padding-top: 2rem;
}

.blog-card-header {
  padding: 1.5rem 1.5rem 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.blog-category {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.8rem;
  background: var(--gradient-accent);
  color: white;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.category-icon {
  width: 16px;
  height: 16px;
}

.blog-date {
  font-size: 0.8rem;
  color: var(--text-color);
  opacity: 0.7;
  white-space: nowrap;
  flex-shrink: 0;
}

.blog-card-body {
  padding: 1rem 1.5rem 1.5rem;
}

.blog-card-title {
  font-size: 1.35rem;
  font-weight: 700;
  margin-bottom: 1rem;
  line-height: 1.3;
  min-height: 3.5em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-title a {
  color: var(--dark-color);
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-card-title a:hover {
  color: var(--secondary-color);
}

.blog-card-excerpt {
  color: var(--text-color);
  line-height: 1.6;
  opacity: 0.9;
}

.blog-card-footer {
  padding: 0 1.5rem 1.5rem;
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: var(--gradient-primary);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.blog-read-more:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  margin: 3rem 0;
  flex-wrap: wrap;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: white;
  color: var(--dark-color);
  text-decoration: none;
  border: 2px solid var(--primary-color);
  border-radius: 8px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.pagination-btn:hover {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-2px);
}

.pagination-numbers {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.pagination-number,
.pagination-current {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
}

.pagination-number {
  background: white;
  color: var(--dark-color);
  border: 2px solid rgba(44, 62, 80, 0.2);
}

.pagination-number:hover {
  background: var(--gradient-accent);
  color: white;
  border-color: transparent;
}

.pagination-current {
  background: var(--gradient-primary);
  color: white;
  border: 2px solid transparent;
}

.pagination-ellipsis {
  color: var(--text-color);
  opacity: 0.5;
}

/* Popular Articles Section */
.popular-articles {
  background: white;
  border-radius: 20px;
  padding: 3rem;
  margin-top: 4rem;
  box-shadow: var(--shadow-lg);
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 2rem;
  text-align: center;
  position: relative;
  padding-bottom: 1rem;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-accent);
  border-radius: 2px;
}

.popular-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.popular-card {
  background: linear-gradient(to right, #f8f9fa 0%, white 100%);
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 1px solid rgba(44, 62, 80, 0.08);
}

.popular-card:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
  border-color: var(--secondary-color);
}

.popular-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  text-decoration: none;
  color: inherit;
}

.popular-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--gradient-accent);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
}

.popular-content h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.popular-date {
  font-size: 0.875rem;
  color: var(--text-color);
  opacity: 0.7;
}

/* CTA Section */
.blog-cta {
  background: var(--gradient-primary);
  border-radius: 20px;
  padding: 4rem 3rem;
  margin-top: 4rem;
  text-align: center;
  box-shadow: var(--shadow-xl);
  position: relative;
  overflow: hidden;
}

.blog-cta::before {
  content: '🔓';
  position: absolute;
  top: -30px;
  right: -30px;
  font-size: 120px;
  opacity: 0.1;
  transform: rotate(-15deg);
}

.cta-content h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: white;
  margin-bottom: 1rem;
}

.cta-content p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

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

.cta-phone,
.cta-form {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-lg);
}

.cta-phone {
  background: white;
  color: var(--primary-color);
}

.cta-phone:hover {
  background: var(--light-color);
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
}

.cta-form {
  background: var(--gradient-accent);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.cta-form:hover {
  background: var(--secondary-color);
  transform: translateY(-3px);
  box-shadow: var(--shadow-xl);
  border-color: white;
}

/* Fixed Call Button */
.fixed-call-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 65px;
  height: 65px;
  background: var(--gradient-accent);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 25px rgba(230, 126, 34, 0.4);
  z-index: 9999;
  transition: all 0.3s ease;
  animation: pulse 2s infinite;
}

.fixed-call-button:hover {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 8px 35px rgba(230, 126, 34, 0.6);
}

.fixed-call-button svg {
  width: 30px;
  height: 30px;
}

@keyframes pulse {
  0% {
    box-shadow: 0 5px 25px rgba(230, 126, 34, 0.4);
  }
  50% {
    box-shadow: 0 5px 35px rgba(230, 126, 34, 0.6);
  }
  100% {
    box-shadow: 0 5px 25px rgba(230, 126, 34, 0.4);
  }
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .header-container {
    padding: 0.75rem 1rem;
  }

  .logo-icon {
    width: 40px;
    height: 40px;
  }

  .logo-title {
    font-size: 1.1rem;
  }

  .logo-subtitle {
    font-size: 0.75rem;
  }

  .home-link {
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
  }

  .home-link span {
    display: none;
  }

  .blog-main {
    padding-top: 80px;
  }

  .blog-container {
    padding: 1.5rem;
  }

  .blog-title {
    font-size: 2rem;
  }

  .blog-subtitle {
    font-size: 1rem;
  }

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .blog-card-header {
    padding: 1rem;
    flex-wrap: nowrap;
  }

  .blog-category {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
  }

  .blog-date {
    font-size: 0.75rem;
  }

  .blog-card-title {
    font-size: 1.25rem;
  }

  .popular-articles {
    padding: 2rem 1.5rem;
  }

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

  .blog-cta {
    padding: 3rem 2rem;
  }

  .cta-content h2 {
    font-size: 1.75rem;
  }

  .cta-content p {
    font-size: 1rem;
  }

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

  .cta-phone,
  .cta-form {
    width: 100%;
    justify-content: center;
  }

  .fixed-call-button {
    bottom: 20px;
    right: 20px;
    width: 55px;
    height: 55px;
  }

  .fixed-call-button svg {
    width: 25px;
    height: 25px;
  }
}

@media (max-width: 480px) {
  .blog-title {
    font-size: 1.75rem;
  }

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

  .pagination {
    gap: 0.5rem;
  }

  .pagination-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  .pagination-number,
  .pagination-current {
    width: 35px;
    height: 35px;
    font-size: 0.875rem;
  }
}

/* Минимальные экраны (375px) */
@media (max-width: 375px) {
  .blog-container {
    padding: 1rem;
  }

  .blog-title {
    font-size: 1.5rem;
  }

  .blog-subtitle {
    font-size: 0.9rem;
  }

  .blog-card {
    margin: 0 -0.5rem;
  }

  .popular-articles {
    padding: 1.5rem 1rem;
  }

  .blog-cta {
    padding: 2rem 1rem;
    border-radius: 0;
    margin: 2rem -1rem 0;
  }
}