/* blog.css - ბლოგის სისტემის სტილები */

/* ძირითადი ფერები */
:root {
  --primary-color: #8b0000;
  --secondary-color: #d4af37;
  --bg-light: #f9f5ea;
  --bg-dark: #1a1a1a;
  --text-light: #f9f5ea;
  --text-dark: #333;
  --accent-color: #a67c52;
  --blog-card-bg: #ffffff;
  --blog-border: #e0e0e0;
  --blog-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* ნავიგაცია */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  z-index: 1000;
  padding: 0.8rem 0;
  transition: all 0.3s ease;
}

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

.nav-logo img {
  height: 70px;
  width: auto;
  border-radius: 50%;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  position: relative;
}

.nav-logo img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(139, 0, 0, 0.2);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.2rem;
}

.nav-menu a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s ease;
  position: relative;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: #8B0000;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: -5px;
  left: 0;
  background-color: #8B0000;
  transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: #333;
  margin: 3px 0;
  transition: 0.3s;
}

@media (max-width: 768px) {
  .nav-logo img {
    height: 60px;
  }
  
  .navbar {
    padding: 0.6rem 0;
  }
  
  .hamburger {
    display: flex;
  }
  
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: white;
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
    padding: 2rem 0;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-menu li {
    margin: 0.6rem 0;
  }
}

/* ენების გადამრთველი */
.language-switcher {
  margin-left: 20px;
}

.language-flags {
  display: flex;
  gap: 10px;
}

.flag-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.flag-btn:hover,
.flag-btn.active {
  opacity: 1;
}

.flag {
  font-size: 1.5rem;
}

@media (max-width: 1024px) {
  .language-switcher {
    margin: 15px 0;
  }

  .language-flags {
    justify-content: center;
  }
}

/* ანიმაციები */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* გვერდის ძირითადი სტილები */
body {
  background-color: var(--bg-light);
  color: var(--text-dark);
  font-family: 'BPG Algeti', 'BPG ExtraSquare Mtavruli', sans-serif;
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ბლოგის Header */
.blog-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, #6b0000 100%);
  color: var(--text-light);
  text-align: center;
  padding: 20px 0;
  margin: 120px 0 0px;
}

/* მთავარ ბლოგის გვერდზე დავმალოთ მხოლოდ დესკტოპზე */
@media (min-width: 769px) {
  .blog-listing .blog-header {
    display: none;
  }
}

/* შიდა გვერდზე შევამციროთ დაშორებები */
.blog-post-content {
  margin-top: 5px;
}

/* ქართული ენისთვის ნაკლები დაშორება */
.lang-ka .blog-header + .blog-main .blog-post-content {
  margin-top: 0px;
}

/* რუსული ენისთვის */
.lang-ru .blog-header + .blog-main .blog-post-content {
  margin-top: 0px;
}

.blog-header + .blog-main .blog-post-content {
  margin-top: 0px;
}

.blog-header h1 {
  font-size: 2.5rem;
  margin: 0;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
  font-family: 'BPG Algeti', sans-serif;
}

/* ბლოგის მთავარი კონტენტი */
.blog-main {
  padding: 40px 0 10px 0;
}

/* ბლოგის ბადე */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 100px;
  align-items: stretch;
}

/* ბლოგის ბარათი */
.blog-card {
  background: var(--blog-card-bg);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--blog-shadow);
  transition: all 0.3s ease;
  animation: slideInUp 0.6s ease-out;
  display: flex;
  flex-direction: column;
  height: 100%;
  transform: scale(1);
  will-change: transform;
}

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

/* ბლოგის სურათი */
.blog-image-link {
  display: block;
  text-decoration: none;
}

.blog-image {
  height: 260px;
  overflow: hidden;
  position: relative;
}

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

.blog-card:hover {
  transform: scale(1.03);
  transition: all 0.3s ease;
}

.blog-card:hover .blog-image img {
  transform: none;
}

.no-image {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--accent-color) 0%, var(--secondary-color) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 3rem;
}

/* ბლოგის კონტენტი */
.blog-content {
  padding: 12px;
  text-align: left;
  display: flex;
  flex-direction: column;
  height: 240px;
  justify-content: flex-start;
  gap: 5px;
}

.blog-title {
  margin: 0 0 15px 0;
  font-size: 16px !important;
  line-height: 1.4;
  font-family: 'BPG Algeti', 'Chromatica Medium', sans-serif !important;
  text-align: left;
}

/* ქართული ვერსიისთვის შემცირებული line-height */
.lang-ka .blog-title {
  line-height: 0.8;
}

.blog-title a {
  color: var(--text-dark);
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 16px !important;
  font-family: 'BPG Algeti', 'Chromatica Medium', sans-serif !important;
  line-height: 1.4;
}

/* ქართული ვერსიისთვის შემცირებული line-height ბმულებზეც */
.lang-ka .blog-title a {
  line-height: 0.8;
}

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

.blog-excerpt {
  color: #666;
  margin: 0;
  line-height: 1.4;
  font-size: 0.9rem;
  min-height: 85px;
}

/* ბლოგის მეტა ინფორმაცია */
.blog-meta {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  margin: 0;
  padding: 10px 0;
  border-top: 1px solid var(--blog-border);
  width: 100%;
}

.blog-category {
  background: var(--primary-color);
  color: var(--text-light);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  font-family: 'BPG Algeti', sans-serif;
  margin-left: 0;
  margin-right: auto;
}

.blog-date {
  color: #888;
  font-size: 0.9rem;
}

/* ფუტერი */
.footer {
  background: #222;
  color: white;
  padding: 3rem 0 1rem;
}

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

.footer-logo img {
  height: 60px;
  border-radius: 50%;
  margin-bottom: 1rem;
}

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

.footer-section a,
.footer-section a:link,
.footer-section a:visited,
.footer-section a:active,
.social-links a,
.social-links a:link,
.social-links a:visited,
.social-links a:active {
  color: #ccc !important;
  text-decoration: none !important;
  transition: color 0.3s ease;
}

.footer-section a:hover,
.social-links a:hover {
  color: #ffffff !important;
}

.social-links {
  display: flex;
  gap: 0.8rem;
}

.social-links a {
  font-size: 1.2rem;
  padding: 0.3rem;
  transition: all 0.3s ease;
}

.social-links a:hover {
  transform: scale(1.1);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid #444;
  color: #999;
}

@media (max-width: 768px) {
  .footer {
    padding: 30px 0 15px;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 0 15px;
  }
  
  .footer-section h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .social-link {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
  }
}

/* არ არის პოსტები */
.no-posts {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 1.1rem;
}

/* რესპონსიული დიზაინი */
@media (max-width: 768px) {
  /* ზოგადი სტილები */
  .container {
    padding: 0 15px;
  }

  /* ჰედერი */
  .blog-header {
    display: flex;
    padding: 15px 0;
    margin: 100px 0 0;
    align-items: center;
    justify-content: center;
    min-height: 30px;
  }

  .blog-header h1 {
    font-size: 2rem;
    line-height: 1.3;
    margin: 0;
  }
  
  .blog-header p {
    font-size: 1rem;
    line-height: 1.4;
  }

  /* ბლოგის ბადე */
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 15px;
    margin-top: 0;
  }

  /* ბლოგის ბარათი */
  .blog-card {
    border-radius: 8px;
  }

  .blog-image {
    height: 200px;
  }

  .blog-image img {
    height: 200px;
  }

  .blog-content {
    padding: 15px;
  }

  .blog-title {
    font-size: 14px !important;
    line-height: 1.4;
    margin-bottom: 8px;
    min-height: auto;
  }

  .blog-title a {
    font-size: 14px !important;
  }

  .blog-excerpt {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 12px;
    min-height: auto;
  }

  .blog-meta {
    padding: 12px 0;
    margin: 0;
    gap: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-direction: row !important;
    width: 100%;
  }

  .blog-category {
    font-size: 0.8rem;
    padding: 4px 10px;
    order: 1;
  }

  .blog-date {
    font-size: 0.8rem;
    order: 2;
    margin-left: auto;
  }

  /* ბლოგის პოსტის გვერდი */
  .blog-post-content {
    padding: 20px;
    margin: 20px 0;
  }

  .blog-post-title {
    font-size: 1.8rem;
    margin-bottom: 15px;
  }

  .blog-post-meta {
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    flex-wrap: wrap;
  }

  .blog-post-image {
    margin: 15px -20px;
  }

  .blog-post-text {
    font-size: 1rem;
    line-height: 1.6;
  }

  .blog-post-footer {
  margin-top: 30px;
}

  .btn {
    width: 100%;
    text-align: center;
    padding: 12px;
  }
}

/* პატარა მობილურები */
@media (max-width: 480px) {
  .blog-header h1 {
    font-size: 1.8rem;
  }

  .blog-image {
    height: 180px;
  }

  .blog-image img {
    height: 180px;
  }

  .blog-meta {
    gap: 8px;
  }

  .blog-category {
    font-size: 0.75rem;
    padding: 3px 8px;
  }

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

  .blog-post-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

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

  .blog-views {
    margin-top: 5px;
  }

  .facebook-share-btn {
    font-size: 0.75rem;
    padding: 5px 8px;
    gap: 3px;
  }

  .facebook-share-btn i {
    font-size: 0.8rem;
  }
}

/* ბლოგის პოსტის დეტალური გვერდის სტილები */
.blog-post-content {
  background: var(--blog-card-bg);
  border-radius: 12px;
  padding: 40px;
  margin: 20px 0;
  box-shadow: var(--blog-shadow);
  text-align: left;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  box-sizing: border-box;
}

.blog-post-title {
  font-size: 2.5rem;
  margin: 0 0 20px 0;
  color: var(--primary-color);
  text-align: left;
}

.blog-post-meta {
  display: flex;
  gap: 20px;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--blog-border);
  justify-content: space-between;
  align-items: center;
}

.blog-meta-right {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-left: auto;
}

.facebook-share-btn {
  background: #1877f2;
  color: white;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.facebook-share-btn:hover {
  background: #166fe5;
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(24, 119, 242, 0.3);
}

.facebook-share-btn i {
  font-size: 1rem;
}

.blog-post-content-wrapper {
  margin-bottom: 30px;
  width: 100%;
}

.blog-post-inner {
  width: 100%;
  display: block;
}

.blog-post-image {
  width: 450px;
  margin-right: 30px;
  margin-bottom: 20px;
  margin-top: 0;
  float: left;
  padding-top: 0;
}

.blog-post-image img {
  display: block;
  width: 450px;
  height: 300px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-top: 0;
  padding-top: 0;
}

.blog-post-text {
  overflow: visible;
  font-size: 16px;
  line-height: 1.5;
  margin-top: -20px;
  padding-top: 0;
  margin-left: 0;
  padding-left: 0;
  margin-bottom: 0;
  padding-bottom: 0;
}

.blog-post-text p {
  margin-bottom: 10px;
  width: 100%;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
}

.blog-post-text p:first-child {
  margin-top: 0;
  padding-top: 0;
  margin-bottom: 10px;
}

@media (max-width: 768px) {
  .blog-post-content {
    padding: 15px;
  }

  .blog-post-meta {
    display: none;
  }

  .blog-post-image {
    float: none;
    width: 100%;
    margin: 0 0 20px 0;
  }

  .blog-post-image img {
    width: 100%;
    height: 300px;
    border-radius: 8px;
  }

  .blog-post-text {
    font-size: 16px;
    line-height: 1.5;
    padding: 0;
  }

  .blog-category {
    font-size: 14px;
    padding: 5px 12px;
    margin: 0;
    margin-right: auto;
  }

  .blog-meta-right {
    font-size: 14px;
    margin-left: auto;
  }

  .facebook-share-btn {
    font-size: 0.8rem;
    padding: 6px 10px;
    gap: 4px;
  }

  .facebook-share-btn i {
    font-size: 0.9rem;
  }

  .blog-date {
    display: none;
  }

  .blog-views {
    margin: 0;
  }
}

/* ადმინ პანელის სტილები */
.admin-panel {
  background: var(--blog-card-bg);
  border-radius: 12px;
  padding: 30px;
  margin: 40px 0;
  box-shadow: var(--blog-shadow);
}

.admin-panel h2 {
  color: var(--primary-color);
  margin-bottom: 20px;
}

.admin-form {
  display: grid;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text-dark);
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px;
  border: 2px solid var(--blog-border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group textarea {
  min-height: 150px;
  resize: vertical;
}

.btn {
  background: var(--primary-color);
  color: var(--text-light);
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
  text-decoration: none;
  display: inline-block;
  text-align: center;
}

.btn:hover {
  background: #6b0000;
}

.btn-secondary {
  background: #8b0000;
  transition: all 0.3s ease;
  color: #f9f5ea;
}

.btn-secondary:hover {
  background: #970b0b;
  color: rgba(255, 255, 255, 0.9);
}

.btn-danger {
  background: #dc3545;
}

.btn-danger:hover {
  background: #c82333;
}

/* ადმინ ცხრილის სტილები */
.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

.admin-table th,
.admin-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid var(--blog-border);
}

.admin-table th {
  background: var(--primary-color);
  color: var(--text-light);
  font-weight: 600;
}

.admin-table tr:hover {
  background: #f8f9fa;
}

.action-buttons {
  display: flex;
  gap: 10px;
}

/* ზარის და "ზემოთ" ღილაკები */
.call-desktop-btn,
.call-mobile-btn,
.scroll-to-top {
  position: fixed;
  right: 20px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 999;
}

.call-desktop-btn {
  bottom: 160px;
}

.call-mobile-btn {
  bottom: 90px;
  display: none;
  text-decoration: none;
}

.scroll-to-top {
  bottom: 20px;
  opacity: 0;
  visibility: hidden;
}

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

.scroll-arrow {
  font-size: 1.5rem;
  line-height: 1;
}

@media (max-width: 768px) {
  .call-desktop-btn {
    display: none;
  }

  .call-mobile-btn {
    display: flex;
  }
}

/* შეტყობინებების სტილები */
.message {
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
}

.message.success {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.message.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.message.info {
  background: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}