@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@400;700&family=Space+Grotesk:wght@400;600&display=swap');

:root {
  --bg-light: #000;
  --bg-card: #ffffff;
  --border-color: #e0e6ed;
  --text-dark: black;
  --accent-yellow: #ffc400;
  --shadow-color: rgba(0, 0, 0, 0.1);
  --text-gray: #718096;
}

/* === KEYFRAME ANIMATIONS === */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInFromLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% center;
  }
  100% {
    background-position: 200% center;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

body {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.8;
  font-size: 16px;
  padding: 0;
  margin: 0;
  min-height: 100vh;
}

/* === HEADER === */
.header {
  background-color: #000;
  padding: 2rem 1rem 1rem;
  text-align: center;
  border-bottom: 3px solid var(--accent-yellow);
  box-shadow: 0 4px 20px var(--shadow-color);
  position: relative;
  width: 100%;
  margin: 0;
  animation: fadeIn 0.6s ease-out;
}

.header h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 3.5rem;
  color: #ffffff;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
  padding: 0 1rem;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.header p {
  font-size: 1.3rem;
  opacity: 0.9;
  color: #ffffff;
  border-top: 3px solid var(--accent-yellow);
  padding: 1.5rem 0;
  margin: 0 -1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  animation: fadeInUp 0.8s ease-out 0.4s both;
}

.header-nav {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
}

.nav-btn {
  background-color: var(--bg-card);
  color: var(--text-white);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.nav-btn:hover {
  background-color: var(--border-color);
  transform: translateY(-1px);
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
  .header {
    padding: 3.5rem 1rem 1.5rem;
  }

  .header-nav {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
  }

  .nav-btn {
    font-size: 0.75rem;
    padding: 0.4rem 0.7rem;
  }

  .header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.3rem;
    margin-top: 0.5rem;
  }

  .header p {
    font-size: 1.1rem;
  }
}

/* === MAIN CONTENT WRAPPER === */
.main-content {
  background-color: #f8f9fa;
  min-height: calc(100vh - 160px);
  padding: 2rem 0;
  animation: fadeIn 0.8s ease-out 0.3s both;
}

.main-content:has(.blog-detail) {
  background-color: #f8f9fa;
}

/* === BLOG POSTS === */
.blog-container {
  max-width: 1400px;
  margin: 1rem auto;
  padding: 0 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

/* Blog detail page specific container styling */
.blog-container:has(.blog-detail) {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 300px);
  padding: 2rem;
}

/* Center the last blog post when there's an odd number of blogs */
.blog-post:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  justify-self: center;
  width: 100%;
  max-width: 650px;
}

.blog-post {
  background: linear-gradient(135deg, var(--bg-card) 0%, #f7fafc 100%);
  border: 2px solid var(--border-color);
  border-radius: 14px;
  margin-bottom: 2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px var(--shadow-color);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  min-height: 280px;
  height: 280px;
  animation: fadeInUp 0.6s ease-out both;
}

.blog-post:nth-child(1) { animation-delay: 0.1s; }
.blog-post:nth-child(2) { animation-delay: 0.2s; }
.blog-post:nth-child(3) { animation-delay: 0.3s; }
.blog-post:nth-child(4) { animation-delay: 0.4s; }
.blog-post:nth-child(5) { animation-delay: 0.5s; }
.blog-post:nth-child(6) { animation-delay: 0.6s; }

.blog-post:hover {
  box-shadow: 0 12px 40px rgba(255, 196, 0, 0.25);
  transform: translateY(-4px) scale(1.01);
  border-color: var(--accent-yellow);
}

.blog-image-container {
  width: 50%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
  border: 3px solid #e0e6ed;
  flex-shrink: 0;
  order: 2;
  margin: 1rem;
  align-self: center;
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e0 100%);
  transition: border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-post:hover .blog-image-container {
  border-color: var(--accent-yellow);
}


.blog-preview-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: -webkit-optimize-contrast; /* Safari/Chrome sharpen */
  image-rendering: crisp-edges; /* Firefox sharpen */
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}


.blog-post:hover .blog-preview-image {
  transform: scale(1.08) rotate(1deg);
}

.blog-content {
  padding: 2rem;
  flex: 1;
  order: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 50%;
}

.blog-list-content {
  padding: 2rem 1rem 2rem 1rem;
  flex: 1;
  order: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 50%;
}

.blog-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  gap: 1rem;
}

.blog-title-date-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  flex: 1;
  min-height: 120px;
}

.blog-post h2 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(1.2rem, 3vw, 2rem);
  color: var(--text-dark);
  margin: 0 0 0.5rem 0;
  letter-spacing: 1.5px;
  flex: 1;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  word-wrap: break-word;
  overflow-wrap: break-word;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  line-height: 1.1;
  width: 100%;
  text-align: justify;
  text-align-last: left;
  hyphens: auto;
}

.blog-post h2:hover {
  color: var(--accent-yellow);
  transform: translateX(4px);
  text-shadow: 0 2px 8px rgba(255, 196, 0, 0.3);
}

.blog-post .date {
  font-size: 1rem;
  color: var(--accent-yellow);
  margin-bottom: 1.5rem;
  opacity: 0.95;
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(255, 196, 0, 0.3);
  background: linear-gradient(135deg, var(--accent-yellow), #ffcc00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
}

.blog-post .date::before {
  font-size: 0.9rem;
  margin-right: 0.5rem;
  -webkit-text-fill-color: var(--accent-yellow);
}

.blog-post p {
  font-size: 1.1rem;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text-gray);
  opacity: 0.95;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.delete-btn {
  background-color: #dc3545;
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.4rem 0.8rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.delete-btn:hover {
  background-color: #c82333;
  transform: translateY(-1px);
}

.delete-btn:active {
  transform: translateY(0);
}

.blog-actions {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 10;
  margin: 0;
  padding: 0;
}

.read-btn {
  background-color: var(--accent-yellow);
  color: #000;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 1.2rem;
  border: 2px solid #000;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin: 0;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.read-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.read-btn:hover::before {
  width: 300px;
  height: 300px;
}

.read-btn:hover {
  background-color: #ffe066;
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 196, 0, 0.4);
}

.read-btn:active {
  transform: translateY(0);
}

/* === DEV PANEL === */
.dev-panel {
  max-width: 960px;
  margin: 4rem auto;
  background-color: #131313;
  padding: 2.5rem;
  border-radius: 16px;
  box-shadow: 0 6px 24px var(--shadow-color);
  border: 1px solid var(--border-color);
}

.dev-panel h2 {
  font-family: 'Bebas Neue', sans-serif;
  margin-bottom: 1.5rem;
  color: var(--accent-yellow);
  font-size: 2rem;
}

#blogForm {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

#blogForm input,
#blogForm textarea {
  background: #1f1f1f;
  color: var(--text-white);
  border: 1px solid var(--border-color);
  padding: 1rem;
  font-size: 1rem;
  font-family: 'Inter', sans-serif;
  border-radius: 10px;
  transition: border-color 0.3s ease;
}

#blogForm input:focus,
#blogForm textarea:focus {
  border-color: var(--accent-yellow);
  outline: none;
}

#blogForm button {
  background-color: var(--accent-yellow);
  color: #000;
  font-family: 'Bebas Neue', sans-serif;
  font-weight: bold;
  font-size: 1.1rem;
  padding: 0.9rem 1.5rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  align-self: flex-start;
  transition: background-color 0.3s ease;
  letter-spacing: 1px;
}

#blogForm button:hover {
  background-color: #ffe066;
}

.preview-actions {
  display: flex;
  gap: 1rem;
  margin-top: 1.5rem;
}

.preview-actions button {
  font-family: 'Bebas Neue', sans-serif;
  font-weight: bold;
  font-size: 1rem;
  padding: 0.7rem 1.3rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.preview-actions button:hover {
  transform: translateY(-1px);
}

/* === BLOG DETAIL PAGE === */
body:has(.blog-detail) {
  background-color: #f8f9fa;
}

body:has(.blog-detail) .header {
  background-color: #000;
}

.blog-detail-container {
  position: relative;
  min-height: calc(100vh - 200px);
  padding: 6rem auto 2rem auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  overflow: hidden;
  background-color: #f8f9fa;
}

.back-nav {
  position: fixed;
  top: 1rem;
  left: 2rem;
  z-index: 1000;
  padding: 0;
}

.back-btn {
  background-color: #000;
  color: var(--accent-yellow);
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.6rem 0.6rem;
  border: 2px solid #000;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 0.5px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  animation: slideInFromLeft 0.6s ease-out;
}

.back-btn:hover {
  background-color: var(--accent-yellow);
  color: #000;
  border-color: var(--accent-yellow);
  transform: translateX(-4px);
  box-shadow: 0 4px 12px rgba(255, 196, 0, 0.4);
}

.blog-detail {
  background-color: #f8f9fa;
  border: 3px solid var(--accent-yellow);
  padding: 4rem;
  border-radius: 14px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  max-width: 80vw;
  width: 100%;
  margin: 6rem auto 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: center;
  overflow: hidden;
  animation: scaleIn 0.7s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.blog-detail h1 {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--text-dark);
  margin-bottom: 1.5rem;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  text-align: center;
  border-bottom: 3px solid var(--accent-yellow);
  padding-bottom: 1rem;
  line-height: 1.1;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  width: 100%;
}

.blog-detail .date {
  font-size: 1.4rem;
  color: var(--accent-yellow);
  margin-bottom: 3rem;
  opacity: 0.95;
  font-family: 'Bebas Neue', sans-serif;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 2px 4px rgba(255, 196, 0, 0.3);
  background: linear-gradient(135deg, var(--accent-yellow), #ffcc00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  text-align: center;
  border-top: 3px solid var(--accent-yellow);
  padding-top: 1.5rem;
  width: 100%;
}

.blog-detail .date::before {
  font-size: 1.2rem;
  margin-right: 0.5rem;
  -webkit-text-fill-color: var(--accent-yellow);
}

.blog-content {
  font-size: 1.3rem;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text-dark);
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
  padding: 0 2rem;
  width: 100%;
  text-align: left;
  max-width: none;
}

.blog-content h1, .blog-content h2, .blog-content h3 {
  font-family: 'Bebas Neue', sans-serif !important;
  letter-spacing: 0.5px;
  margin: 1rem 0 0.5rem 0;
  color: var(--accent-yellow) !important;
}

.blog-content h1 { 
  font-size: 2.2rem !important; 
  font-weight: bold !important;
  color: var(--accent-yellow) !important;
}

.blog-content h2 { 
  font-size: 1.8rem !important; 
  font-weight: bold !important;
  color: var(--accent-yellow) !important;
}

.blog-content h3 { 
  font-size: 1.4rem !important; 
  font-weight: bold !important;
  color: var(--accent-yellow) !important;
}

.blog-content strong {
  font-weight: 700 !important;
}

.blog-content em {
  font-style: italic !important;
}

.blog-content u {
  text-decoration: underline !important;
}

.blog-content p {
  margin-bottom: 2rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Bare <img> in blog content (legacy posts before resizable container existed) */
.blog-content > img,
.blog-content p > img {
  max-width: 60%;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  border: 3px solid var(--accent-yellow);
  margin: 0.5rem 1.5rem 0.5rem 0;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  float: left;
  opacity: 1 !important;
}

.blog-content > img.float-right,
.blog-content p > img.float-right {
  float: right;
  margin: 0.5rem 0 0.5rem 1.5rem;
}

.blog-content > img.float-none,
.blog-content p > img.float-none {
  float: none;
  display: block;
  margin: 1.5rem auto;
  max-width: 100%;
  clear: both;
}

@media (max-width: 768px) {
  .blog-content > img,
  .blog-content p > img {
    float: none !important;
    display: block !important;
    margin: 1rem auto !important;
    max-width: 100% !important;
    clear: both !important;
  }
}

/* Resizable image container styles */
.resizable-image-container {
  position: relative;
  display: block;
  margin: 0.5rem 1.5rem 0.5rem 0;
  float: left;
  width: 320px;
  max-width: 60%;
  height: auto;
  min-width: 120px;
  opacity: 1 !important;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  border: 2px solid var(--accent-yellow);
  cursor: pointer;
  transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.resizable-image-container.float-right {
  float: right;
  margin: 0.5rem 0 0.5rem 1.5rem;
  clear: none;
}

.resizable-image-container.float-none {
  float: none;
  display: block;
  margin: 1.5rem auto;
  max-width: 80%;
  clear: both;
}

/* Clear floats after centered images to prevent text wrapping */
.resizable-image-container.float-none + p,
.resizable-image-container.float-none + div,
.resizable-image-container.float-none + * {
  clear: both;
}

.resizable-image-container img {
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  margin: 0 !important;
  float: none !important;
  display: block;
  opacity: 1 !important;
  object-fit: contain;
}

/* Mobile: full-width, no float — text-wrap on a phone is unreadable */
@media (max-width: 768px) {
  .resizable-image-container,
  .resizable-image-container.float-right,
  .resizable-image-container.float-none {
    float: none !important;
    display: block !important;
    margin: 1rem auto !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    clear: both !important;
  }
  .resizable-image-container img {
    width: 100% !important;
    height: auto !important;
  }
}

/* Clear float after images to prevent layout issues */
.blog-content::after {
  content: "";
  display: table;
  clear: both;
}

/* Ensure text wraps around resized containers properly */
.blog-content p {
  overflow: visible;
  text-align: justify;
  margin-bottom: 1.5rem;
  line-height: 1.8;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Add spacing after floating elements */
.resizable-image-container + p,
.blog-content img + p {
  margin-top: 1rem;
}

/* Prevent text from getting too close to floating images */
.blog-content {
  overflow: visible;
}

.blog-content * {
  box-sizing: border-box;
}

.blog-content video {
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
  border-radius: 8px;
  border: 3px solid var(--accent-yellow);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  background-color: #000;
}



@media (max-width: 768px) {
  /* Center the blog container - ONLY for blog detail page */
  .blog-container:has(.blog-detail) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0 auto;
  }

  /* Position back button at top, outside the blog box */
  .back-nav {
    position: relative;
    top: auto;
    left: auto;
    margin: 1rem auto 0.5rem auto;
    padding: 0;
    text-align: center;
    width: 100%;
    order: -1;
  }

  .back-btn {
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
    margin: 0 auto;
    display: inline-block;
    width: auto;
    min-width: 100px;
  }

  /* Center the blog detail box */
  .blog-detail {
    max-width: 95vw;
    width: 95vw;
    padding: 1.5rem 0.75rem;
    margin: 1rem auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .blog-detail h1 {
    font-size: 2rem;
    text-align: center;
  }

  .blog-detail .date {
    font-size: 1.2rem;
    text-align: center;
  }

  /* Center align the content container but keep text left-aligned for readability */
  .blog-detail .blog-content {
    font-size: 1.1rem;
    padding: 0rem;
    text-align: left;
    width: 100%;
    margin: 0 auto;
  }

  /* Mobile image restrictions - no text wrapping and size limits */
  .blog-content img,
  .resizable-image-container {
    float: none !important;
    display: block !important;
    margin: 1rem auto !important;
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
    max-height: 300px !important;
    border: 2px solid var(--accent-yellow) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    clear: both !important;
  }

  .resizable-image-container {
    position: relative !important;
    min-width: auto !important;
    min-height: auto !important;
    overflow: hidden !important;
  }

  .resizable-image-container img {
    width: 100% !important;
    height: auto !important;
    max-height: 300px !important;
    object-fit: contain !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
  }

  /* Hide resize handles on mobile */
  .resize-handle {
    display: none !important;
  }
}

/* === INSTAGRAM SECTION === */
.instagram-section {
  background-color: var(--bg-card);
  padding: 4rem 0;
  border-top: 2px solid var(--border-color);
}

.instagram-title {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 2.5rem;
  color: var(--text-dark);
  text-align: center;
  margin-bottom: 2rem;
  letter-spacing: 1.5px;
}

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

.instagram-post {
  background-color: var(--bg-card);
  border: 2px solid var(--border-color);
  border-radius: 12px;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.instagram-post:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
  border-color: var(--accent-yellow);
}

.instagram-media {
  width: 100%;
  height: 300px;
  object-fit: cover;
  background-color: #000;
}

.instagram-content {
  padding: 1.25rem;
}

.instagram-caption {
  font-size: 0.95rem;
  color: var(--text-dark);
  line-height: 1.6;
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.instagram-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--accent-yellow);
  opacity: 0.8;
}

.instagram-date {
  font-family: 'Inter', sans-serif;
}

.instagram-link {
  color: var(--accent-yellow);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.instagram-link:hover {
  color: #ffe066;
}

.instagram-loading,
.instagram-error {
  text-align: center;
  padding: 2rem;
  color: var(--text-white);
  opacity: 0.7;
  font-style: italic;
}

@media (max-width: 768px) {
  .instagram-feed {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

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

/* === NAVIGATION BANNER === */
.nav-banner {
  width: 100%;
  background: linear-gradient(135deg, var(--accent-yellow), #ffb000);
  padding: 1rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
  margin-bottom: 2rem;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  animation: shimmer 3s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

.nav-banner-buttons {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.nav-banner-btn {
  background: rgba(0, 0, 0, 0.8);
  color: var(--accent-yellow);
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.1rem;
  font-weight: bold;
  padding: 0.7rem 1.5rem;
  border: 2px solid rgba(0, 0, 0, 0.8);
  border-radius: 8px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: inline-block;
  position: relative;
  overflow: hidden;
}

.nav-banner-btn:hover {
  background: var(--accent-yellow);
  color: #000;
  border-color: var(--accent-yellow);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 6px 15px rgba(255, 196, 0, 0.3);
}

.nav-banner-btn.active {
  background: #000;
  color: var(--accent-yellow);
  border-color: #000;
}

@media (max-width: 768px) {
  .nav-banner-buttons {
    gap: 1rem;
  }

  .nav-banner-btn {
    font-size: 1rem;
    padding: 0.6rem 1.2rem;
  }

  /* Blog Container Mobile Fix - for blog list view only */
  .blog-container:not(:has(.blog-detail)) {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 0 1rem;
    margin: 1rem auto;
    max-width: 100%;
  }

  /* Blog Post Mobile Layout */
  .blog-post {
    flex-direction: column;
    height: auto;
    min-height: auto;
    padding: 0;
    position: relative;
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: left;
    justify-content: left;
  }

  .blog-image-container {
    width: 100%;
    height: 200px;
    border-radius: 0;
    margin: 0;
    order: 1;
    align-self: stretch;
    border: none;
    border-bottom: 3px solid var(--accent-yellow);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  }

  .blog-content {
    order: 2;
    max-width: 100%;
    padding: 1.5rem;
    padding-bottom: 4rem;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    width: 100%;
  }

  .blog-list-content {
    padding: 1.5rem;
    padding-bottom: 4rem;
    order: 2;
    max-width: 100%;
  }

  .blog-preview-image {
    border-radius: 0;
    height: 100%;
    width: 100%;
    object-fit: cover;
  }

  /* Mobile Blog Header Layout */
  .blog-header {
    margin-bottom: 1rem;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }

  .blog-title-date-container {
    padding-right: 0;
    min-height: auto;
    width: 100%;
  }

  .blog-post h2 {
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 0.5rem;
    text-align: left;
    width: 100%;
  }

  .blog-post .date {
    font-size: 0.9rem;
    margin-bottom: 1rem;
    text-align: left;
    width: 100%;
  }

  .blog-post p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    text-align: left;
    width: 100%;
  }

  .delete-btn {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    font-size: 0.7rem;
    padding: 0.3rem 0.6rem;
    z-index: 20;
    background-color: #dc3545;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  }

  /* Mobile Read More Button */
  .blog-actions {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    left: auto;
    top: auto;
    transform: none;
    text-align: right;
    z-index: 10;
    padding: 0;
    margin: 0;
  }

  .read-btn {
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
    width: auto;
    display: inline-block;
    margin: 0;
    box-sizing: border-box;
    border-radius: 6px;
    font-weight: 600;
  }

  /* Blog Detail Mobile Layout */
  .blog-detail-container {
    padding: 2rem 0;
    min-height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
  }

  .blog-detail {
    max-width: 90vw;
    width: 90vw;
    padding: 2.5rem 2rem;
    margin: 0 auto;
    border-radius: 12px;
    position: relative;
    overflow: visible;
    background: #f8f9fa;
    border: 3px solid var(--accent-yellow);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .blog-detail h1 {
    font-size: 2rem;
    line-height: 1.1;
    margin-bottom: 1rem;
    padding-bottom: 0.8rem;
    text-align: center;
    width: 100%;
  }

  .blog-detail .date {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    padding-top: 1rem;
    text-align: center;
    width: 100%;
  }

  .blog-detail .blog-content {
    font-size: 1.1rem;
    padding: 0 1rem;
    width: 100%;
    text-align: left;
    line-height: 1.7;
    max-width: 100%;
  }

  .blog-detail .blog-content h1 { 
    font-size: 1.8rem !important; 
    text-align: center !important;
    width: 100% !important;
    margin: 1.5rem 0 1rem 0 !important;
  }
  .blog-detail .blog-content h2 { 
    font-size: 1.5rem !important; 
    text-align: center !important;
    width: 100% !important;
    margin: 1.5rem 0 1rem 0 !important;
  }
  .blog-detail .blog-content h3 { 
    font-size: 1.3rem !important; 
    text-align: center !important;
    width: 100% !important;
    margin: 1.5rem 0 1rem 0 !important;
  }

  .blog-detail .blog-content p {
    margin-bottom: 1.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    text-align: left !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 0.5rem !important;
  }

  /* Mobile Back Button */
  .blog-container:has(.blog-detail) {
    padding: 1rem;
    min-height: auto;
  }

  /* Mobile Image Restrictions */
  .blog-content img,
  .resizable-image-container {
    float: none !important;
    display: block !important;
    margin: 1.5rem auto !important;
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    border: 2px solid var(--accent-yellow) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
    clear: both !important;
    position: relative !important;
  }

  .resizable-image-container {
    min-width: auto !important;
    min-height: auto !important;
    overflow: hidden !important;
    cursor: default !important;
  }

  .resizable-image-container img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    cursor: default !important;
    display: block !important;
  }

  /* Hide resize handles on mobile */
  .resize-handle {
    display: none !important;
  }

  /* Mobile video styling */
  .blog-content video {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    margin: 1.5rem auto !important;
    border-radius: 8px !important;
    border: 2px solid var(--accent-yellow) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2) !important;
  }

  /* Ensure proper text flow on mobile */
  .blog-content::after {
    content: "";
    display: table;
    clear: both;
  }
}

/* === FOOTER === */
footer {
  background: #000;
  text-align: center;
  padding: 1.5rem 0;
  color: white;
  border-top: 3px solid var(--accent-yellow);
  font-size: 0.95rem;
  font-family: 'Inter', sans-serif;
  width: 100%;
  margin: 0;
  margin-top: auto;
}

footer p {
  color: white;
  margin: 0.25rem 0;
}

footer p.footer-credit {
  font-size: 11px;
  opacity: 0.4;
  margin-top: 0.5rem;
  letter-spacing: 0.02em;
}
/* === FOOTER MOBILE === */
@media (max-width: 768px) {
  footer {
    padding: 1rem 0.75rem;
    font-size: 0.8rem;
  }
  footer p {
    margin: 0.15rem 0;
    line-height: 1.4;
  }
  footer p.footer-credit {
    font-size: 10px;
  }
}
