/* ===========================
   Modern Homepage Design System
   Flash Your Tat - Tattoo Inspiration Site
   =========================== */

/* ===========================
   CSS Variables & Design Tokens
   =========================== */
:root {
  /* Colors */
  --primary-color: #E91E63;
  --secondary-color: #2C3E50;
  --accent-color: #FF6B6B;
  --pinterest-red: #e60023;
  --dark-bg: #1a1a1a;
  --light-bg: #f8f9fa;
  --card-bg: #ffffff;
  --text-primary: #2c3e50;
  --text-secondary: #6c757d;
  --text-light: #ffffff;
  --border-color: #e9ecef;
  
  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.12);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.16);
  --shadow-xl: 0 12px 48px rgba(0,0,0,0.24);
  
  /* Layout */
  --max-width: 1400px;
  --gutter: 24px;
  --pinterest-gutter: 16px;
  
  /* Typography */
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-display: 'Playfair Display', Georgia, serif;
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 100px;
  
  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===========================
   Reset & Base Styles
   =========================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  color: var(--text-primary);
  background-color: var(--light-bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

/* ===========================
   Typography System
   =========================== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
}

p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ===========================
   Container & Layout
   =========================== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ===========================
   Header Navigation
   =========================== */
header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: var(--transition);
}

header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-md);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.logo {
  font-size: 1.8rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

.logo span {
  color: var(--text-primary);
  -webkit-text-fill-color: var(--text-primary);
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  font-weight: 500;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 2px;
}

nav a:after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

nav a:hover:after {
  width: 100%;
}

/* Dropdown Menu Styles */
.has-dropdown {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: white;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  padding: 10px 0;
  min-width: 200px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  margin-top: 10px;
  z-index: 1000;
}

.has-dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  margin-top: 5px;
}

.dropdown-menu::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  background: white;
  transform: rotate(45deg);
}

.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: var(--text-primary);
  transition: all 0.2s ease;
  white-space: nowrap;
}

.dropdown-menu a::after {
  display: none !important;
}

.dropdown-menu a:hover {
  background: #f8f9fa;
  color: var(--primary-color);
  padding-left: 25px;
}

.dropdown-menu .view-all {
  border-top: 1px solid #e9ecef;
  margin-top: 5px;
  padding-top: 12px;
  font-weight: 600;
  color: var(--primary-color);
}

.dropdown-menu .view-all:hover {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
}

/* ===========================
   Hero Section
   =========================== */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: -70px;
  padding-top: 70px;
}

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(180deg, 
    rgba(26, 26, 26, 0.7) 0%, 
    rgba(26, 26, 26, 0.85) 50%, 
    rgba(26, 26, 26, 0.9) 100%);
}

.hero-content {
  text-align: center;
  color: white;
  z-index: 1;
  padding: 2rem;
}

.hero-tagline {
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: #ffffff;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  opacity: 0;
  animation: fadeInUp 0.8s ease forwards;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  margin-bottom: 1.5rem;
  line-height: 1.1;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
  color: #ffffff;
}

.hero-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.hero-word.animate-in {
  opacity: 1;
  transform: translateY(0);
}

.hero-subtitle {
  font-size: 1.4rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
  color: #ffffff;
  font-weight: 400;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 4rem;
  margin-bottom: 3rem;
}

.stat-item {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.stat-label {
  font-size: 1rem;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

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

.hero-scroll-indicator {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: white;
  animation: bounce 2s infinite;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
  font-weight: 500;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* ===========================
   Buttons
   =========================== */
.btn {
  padding: 12px 28px;
  border-radius: var(--radius-full);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 15px rgba(233, 30, 99, 0.4);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(233, 30, 99, 0.6);
  background: #d91757;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.95);
  color: var(--text-primary);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary:hover {
  background: white;
  border-color: white;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

/* ===========================
   About Section
   =========================== */
.about-section {
  padding: 5rem 0;
  background: white;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.about-lead {
  font-size: 1.3rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  font-weight: 500;
}

.about-features {
  display: grid;
  gap: 2rem;
  margin-top: 2rem;
}

.feature-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: start;
}

.feature-icon {
  font-size: 2rem;
  line-height: 1;
}

.feature-item h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.feature-item p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin: 0;
}

.image-collage {
  position: relative;
  height: 500px;
}

.collage-item {
  position: absolute;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, #667eea, #764ba2);
}

.collage-1 {
  width: 250px;
  height: 350px;
  top: 0;
  left: 0;
  z-index: 3;
}

.collage-2 {
  width: 200px;
  height: 280px;
  top: 50px;
  right: 50px;
  z-index: 2;
}

.collage-3 {
  width: 180px;
  height: 240px;
  bottom: 0;
  right: 0;
  z-index: 1;
}

/* ===========================
   Category Sections
   =========================== */
.category-section {
  padding: 4rem 0;
  background: white;
}

.category-section.alt-bg {
  background: var(--light-bg);
}

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  margin-top: 0.5rem;
}

.tattoo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}

/* ===========================
   Modern Card Design
   =========================== */
.tattoo-card.modern-card {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  position: relative;
  cursor: pointer;
}

.tattoo-card.modern-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-image-wrapper {
  position: relative;
  padding-bottom: 150%;
  overflow: hidden;
  background: var(--light-bg);
}

.card-image-wrapper img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.tattoo-card.modern-card:hover .card-image-wrapper img {
  transform: scale(1.1);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0,0,0,0.7) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 1rem;
}

.tattoo-card.modern-card:hover .card-overlay {
  opacity: 1;
}

.card-category {
  background: var(--primary-color);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.card-info {
  padding: 1.2rem;
}

.card-info h3 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  line-height: 1.4;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.design-count {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.save-btn {
  background: none;
  border: none;
  color: var(--pinterest-red);
  cursor: pointer;
  padding: 4px;
  transition: var(--transition);
}

.save-btn:hover {
  transform: scale(1.2);
}

/* ===========================
   Newsletter Section
   =========================== */
.newsletter-section {
  padding: 5rem 0;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  text-align: center;
}

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

.newsletter-content p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  color: white;
}

.newsletter-form {
  display: flex;
  gap: 1rem;
  justify-content: center;
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form input {
  flex: 1;
  padding: 12px 20px;
  border: none;
  border-radius: var(--radius-full);
  font-size: 1rem;
}

.newsletter-content small {
  display: block;
  margin-top: 1rem;
  opacity: 0.8;
}

/* ===========================
   Browse All Section
   =========================== */
.browse-all-section {
  padding: 4rem 0;
  background: white;
}

.browse-all-section.newsletter-bg {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: white;
  padding: 5rem 0;
}

.browse-all-section.newsletter-bg .section-title {
  color: white;
}

.browse-all-section.newsletter-bg .section-subtitle {
  color: rgba(255, 255, 255, 0.9);
}

.filter-tags {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.filter-tag {
  padding: 8px 20px;
  background: var(--light-bg);
  border: 2px solid transparent;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition);
  font-weight: 500;
}

.filter-tag:hover {
  border-color: var(--primary-color);
}

.filter-tag.active {
  background: var(--primary-color);
  color: white;
}

.newsletter-bg .filter-tag {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.newsletter-bg .filter-tag:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: white;
}

.newsletter-bg .filter-tag.active {
  background: white;
  color: var(--primary-color);
  border-color: white;
}

/* ===========================
   Masonry Grid
   =========================== */
.masonry-grid {
  column-count: 4;
  column-gap: 1.5rem;
  margin-top: 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--light-bg);
}

.masonry-link {
  display: block;
  position: relative;
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.masonry-item:hover img {
  transform: scale(1.05);
}

.masonry-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 50%, transparent 100%);
  color: white;
  padding: 1.25rem 1rem;
  transform: translateY(0);
  transition: all 0.3s ease;
}

.masonry-item:hover .masonry-overlay {
  background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.6) 60%, transparent 100%);
  padding-bottom: 1.5rem;
}

.masonry-overlay h3 {
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
  font-weight: 700;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.9);
  line-height: 1.2;
  color: #ffffff;
  letter-spacing: -0.02em;
}

.masonry-overlay .image-count {
  font-size: 0.9rem;
  color: #ffffff;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.9);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.masonry-overlay .image-count::before {
  content: "🔥";
  font-size: 1rem;
}

.load-more {
  text-align: center;
  margin-top: 3rem;
}

.newsletter-bg .btn-outline {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid white;
}

.newsletter-bg .btn-outline:hover {
  background: white;
  color: var(--primary-color);
}

/* ===========================
   Legacy Pinterest Grid Support
   =========================== */
.pinterest-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: var(--pinterest-gutter);
  padding: 2rem 0;
}

.tattoo-card {
  background: #fff;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.tattoo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-image-container {
  position: relative;
  overflow: hidden;
  background: var(--light-bg);
}

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

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

.save-button {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--pinterest-red);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 24px;
  font-weight: 600;
  cursor: pointer;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  font-size: 14px;
}

.tattoo-card:hover .save-button {
  opacity: 1;
  transform: translateY(0);
}

.save-button:hover {
  background: #c70019;
}

.card-content {
  padding: 1rem;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.image-count::before {
  content: "📌";
  font-size: 1rem;
  margin-right: 0.25rem;
}

/* ===========================
   Category Pills (Legacy)
   =========================== */
.category-filters {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 2rem 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
  justify-content: center;
  flex-wrap: wrap;
}

.category-filters::-webkit-scrollbar {
  display: none;
}

.category-pill {
  background: #fff;
  border: 2px solid var(--border-color);
  padding: 0.5rem 1.5rem;
  border-radius: 24px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s ease;
  cursor: pointer;
}

.category-pill:hover,
.category-pill.active {
  background: var(--text-primary);
  color: white;
  border-color: var(--text-primary);
}

/* ===========================
   Single Post Styles
   =========================== */
.post-container {
  max-width: 900px;
  margin: 100px auto 0;
  padding: 0 var(--gutter);
}

.post-header {
  text-align: center;
  margin-bottom: 3rem;
}

.post-categories {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.category-tag {
  background: var(--primary-color);
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
}

.post-header h1 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.post-header time {
  color: var(--text-secondary);
}

.post-content {
  font-size: 1.125rem;
}

.post-content img {
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-md);
  margin: 2rem 0;
  box-shadow: var(--shadow-md);
}

.post-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin: 3rem 0;
}

.post-gallery img {
  width: 100%;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.post-gallery img:hover {
  transform: scale(1.02);
}

/* ===========================
   CTA Section
   =========================== */
.cta-section {
  background: var(--text-primary);
  color: white;
  padding: 4rem 0;
  text-align: center;
  margin-top: 4rem;
  border-radius: var(--radius-md);
}

.cta-section h2 {
  color: white;
  margin-bottom: 1rem;
}

.cta-section p {
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.pinterest-follow-btn {
  background: var(--pinterest-red);
  color: white;
  padding: 1rem 2rem;
  border-radius: 24px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: transform 0.2s ease;
}

.pinterest-follow-btn:hover {
  transform: scale(1.05);
  color: white;
}

/* ===========================
   Pinterest Share Button
   =========================== */
.pinterest-share {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  background: var(--pinterest-red);
  color: white;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: transform 0.2s ease;
  z-index: 90;
}

.pinterest-share:hover {
  transform: scale(1.1);
}

/* ===========================
   Footer
   =========================== */
footer {
  background: var(--dark-bg);
  color: var(--text-light);
  padding: 3rem 0 2rem;
  margin-top: 4rem;
}

.footer-content {
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-links a {
  color: var(--text-light);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer-links a:hover {
  opacity: 1;
}

footer p {
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

/* ===========================
   Responsive Design
   =========================== */
@media (max-width: 1024px) {
  .masonry-grid {
    column-count: 3;
  }
}

@media (max-width: 768px) {
  :root {
    --gutter: 16px;
    --pinterest-gutter: 10px;
  }
  
  nav ul {
    display: none;
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-stats {
    gap: 2rem;
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .about-text {
    padding-right: 0;
  }
  
  .image-collage {
    height: 300px;
    display: none;
  }
  
  .tattoo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .pinterest-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--pinterest-gutter);
  }
  
  .masonry-grid {
    column-count: 2;
  }
  
  .masonry-overlay h3 {
    font-size: 1rem;
  }
  
  .masonry-overlay .image-count {
    font-size: 0.85rem;
  }
  
  .newsletter-form {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .tattoo-grid {
    grid-template-columns: 1fr;
  }
  
  .masonry-grid {
    column-count: 1;
  }
  
  .filter-tags {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 10px;
  }
}

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

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

/* ===========================
   Loading States
   =========================== */
.skeleton {
  background: linear-gradient(90deg, var(--border-color) 25%, var(--light-bg) 50%, var(--border-color) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

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

/* ===========================
   Masonry Layout Enhancement
   =========================== */
@supports (grid-template-rows: masonry) {
  .pinterest-grid {
    grid-template-rows: masonry;
  }
}

/* ===========================
   Post Layout Styles
   =========================== */
.post-hero {
  position: relative;
  height: 50vh;
  min-height: 400px;
  overflow: hidden;
  margin-bottom: 60px;
}

.post-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(3px);
  transform: scale(1.1);
}

.post-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(26, 26, 26, 0.4), rgba(26, 26, 26, 0.9));
}

.post-hero-content {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  align-items: flex-end;
  padding: 60px 0;
}

.post-breadcrumb {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.post-breadcrumb a {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.post-breadcrumb a:hover {
  color: var(--primary-color);
}

.post-breadcrumb span {
  margin: 0 10px;
}

.post-title {
  color: white;
  margin-bottom: 15px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.post-meta {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 15px;
}

.meta-separator {
  color: rgba(255, 255, 255, 0.5);
}

/* Quick Actions Bar */
.quick-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 40px;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}

.action-btn:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.pinterest-btn {
  background: var(--pinterest-red);
  color: white;
  border-color: var(--pinterest-red);
}

.pinterest-btn:hover {
  background: #c6001c;
  border-color: #c6001c;
  color: white;
}

.view-count {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
}

/* Post Content */
.post-content-modern {
  font-size: 1.125rem;
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.post-content-modern p {
  margin-bottom: 1.8rem;
  text-align: justify;
  hyphens: auto;
}

/* Drop Cap for First Paragraph */
.post-content-modern > p:first-of-type::first-letter {
  float: left;
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 4rem;
  line-height: 3.2rem;
  padding-right: 8px;
  margin-top: 6px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Content Images Grid Layout */
.post-content-modern {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-start;
  justify-content: flex-start; /* Align to start, not stretch */
}

/* Clear float after every 4th image to ensure proper rows */
.post-content-modern > figure:nth-of-type(4n)::after,
.post-content-modern .wp-block-image:nth-of-type(4n)::after {
  content: '';
  width: 100%;
  display: block;
}

/* Ensure all text elements remain full width */
.post-content-modern > p,
.post-content-modern > h1,
.post-content-modern > h2,
.post-content-modern > h3,
.post-content-modern > h4,
.post-content-modern > h5,
.post-content-modern > h6,
.post-content-modern > ul,
.post-content-modern > ol,
.post-content-modern > blockquote,
.post-content-modern > div:not(.wp-block-image) {
  width: 100%;
  flex-shrink: 0;
}

/* Enhanced Typography for Headings */
.post-content-modern > h1,
.post-content-modern > h2,
.post-content-modern > h3,
.post-content-modern > h4,
.post-content-modern > h5,
.post-content-modern > h6 {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  clear: both;
  font-family: 'Playfair Display', Georgia, serif;
  color: var(--text-primary);
  position: relative;
  padding-bottom: 0.5rem;
}

.post-content-modern > h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-align: center;
  margin: 3rem 0 2rem;
}

.post-content-modern > h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

.post-content-modern > h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--secondary-color);
}

/* Only images should be in grid - 5 columns on desktop */
.post-content-modern > figure,
.post-content-modern .wp-block-image {
  width: calc(20% - 13px); /* Exactly 5 columns on desktop */
  max-width: calc(20% - 13px);
  flex: 0 0 calc(20% - 13px); /* Prevent flex growing/shrinking */
  margin: 0 !important;
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: #fff;
  aspect-ratio: 1; /* Keep images square for consistent grid */
}

.post-content-modern > figure:hover,
.post-content-modern .wp-block-image:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
  z-index: 10;
}

.post-content-modern > figure img,
.post-content-modern .wp-block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures images fill the container properly */
  display: block;
  border-radius: var(--radius-md);
  transition: transform 0.3s ease;
}

.post-content-modern > figure:hover img,
.post-content-modern .wp-block-image:hover img {
  transform: scale(1.05);
}

/* Content Image Wrapper for Pinterest buttons */
.content-image-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  margin: 0;
}

.content-image-wrapper img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-md);
}

/* Tag Pills */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 60px;
}

.tag-pill {
  padding: 8px 20px;
  background: var(--light-bg);
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition);
}

.tag-pill:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* Gallery Section - Enhanced Visual Design */
.gallery-section {
  margin: 60px -40px 80px;
  padding: 80px 40px;
  background: linear-gradient(180deg, #fafbfc 0%, #ffffff 50%, #fafbfc 100%);
  position: relative;
}

.gallery-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(233, 30, 99, 0.2), transparent);
}

.gallery-header {
  text-align: center;
  margin-bottom: 50px;
  position: relative;
}

.gallery-title {
  font-size: 2.8rem;
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  font-weight: 700;
  font-family: 'Playfair Display', Georgia, serif;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-color) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.title-icon {
  font-size: 2rem;
  animation: sparkle 3s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { transform: translateY(0) scale(1); opacity: 1; }
  50% { transform: translateY(-3px) scale(1.1); opacity: 0.9; }
}

.gallery-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  font-style: italic;
  opacity: 0.85;
}

/* Gallery Filters */
.gallery-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 40px;
}

.filter-btn {
  padding: 10px 25px;
  background: white;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  color: var(--text-primary);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

/* Post Gallery Masonry */
.post-gallery-masonry {
  column-count: 4;
  column-gap: var(--pinterest-gutter);
  margin-bottom: 40px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}

.gallery-item {
  position: relative;
  margin-bottom: var(--pinterest-gutter);
  break-inside: avoid;
  cursor: pointer;
  overflow: hidden;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.gallery-item img {
  width: 100%;
  display: block;
  border-radius: var(--radius-md);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.6));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 20px;
  opacity: 1;
  transition: var(--transition);
  pointer-events: none;
}

.gallery-item-overlay > * {
  pointer-events: auto;
}

.gallery-item:hover .gallery-item-overlay {
  background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.8));
}

.pin-save-btn {
  background: var(--pinterest-red);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  position: relative;
  z-index: 10;
}

.pin-save-btn:hover {
  background: #c6001c;
  transform: scale(1.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.pin-save-btn:active {
  transform: scale(1.02);
}

/* Corner Pinterest Button */
.pin-save-corner {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  color: var(--pinterest-red);
  border: 1px solid rgba(230, 0, 35, 0.12);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  z-index: 15;
  opacity: 0;
  transform: scale(0.9) translateY(4px);
}

.gallery-item:hover .pin-save-corner,
.content-image-wrapper:hover .pin-save-corner,
.post-content-modern > figure:hover .pin-save-corner,
.post-content-modern .wp-block-image:hover .pin-save-corner {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.pin-save-corner:hover {
  background: var(--pinterest-red);
  color: white;
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 4px 12px rgba(230, 0, 35, 0.25);
  border-color: var(--pinterest-red);
}

.pin-save-corner:active {
  transform: scale(0.95);
}

.pin-save-corner svg {
  width: 16px;
  height: 16px;
}

/* Hide bottom save button on mobile to avoid duplication */
@media (max-width: 768px) {
  .gallery-item-overlay .pin-save-btn {
    display: none;
  }
  
  .pin-save-corner {
    width: 36px;
    height: 36px;
    opacity: 1; /* Always visible on mobile */
    transform: scale(1) translateY(0);
    background: rgba(255, 255, 255, 0.98);
  }
  
  .pin-save-corner svg {
    width: 18px;
    height: 18px;
  }
}

.view-btn {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text-primary);
  border: none;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer;
  transition: var(--transition);
}

.view-btn:hover {
  background: white;
  transform: scale(1.1);
}

.design-number {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
}

.gallery-load-more {
  text-align: center;
  margin-top: 40px;
}

/* Pinterest CTA Card */
.pinterest-cta-card {
  background: linear-gradient(135deg, #e60023, #ff4458);
  color: white;
  padding: 60px;
  border-radius: var(--radius-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 80px;
  box-shadow: var(--shadow-xl);
}

.cta-content h3 {
  color: white;
  font-size: 2rem;
  margin-bottom: 15px;
}

.cta-content p {
  font-size: 1.1rem;
  margin-bottom: 25px;
  opacity: 0.95;
}

.cta-stats {
  display: flex;
  gap: 40px;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2.5rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  opacity: 0.9;
}

/* Related Posts */
.related-section {
  margin-bottom: 80px;
}

.related-title {
  text-align: center;
  margin-bottom: 40px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 0 1rem;
}

.related-card {
  background: white;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.related-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.related-link {
  display: block;
}

.related-image {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.related-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.related-card:hover .related-image img {
  transform: scale(1.1);
}

.related-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.related-category {
  background: var(--primary-color);
  color: white;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  display: inline-block;
}

.related-content {
  padding: 20px;
}

.related-content h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text-primary);
}

.related-count {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Lightbox Styles */
.lightbox-modern {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: none;
  flex-direction: column;
}

.lightbox-modern.active {
  display: flex;
}

.lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background: rgba(0, 0, 0, 0.5);
}

.lightbox-info h3 {
  color: white;
  font-size: 1.2rem;
  margin-bottom: 5px;
}

#lightbox-counter {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9rem;
}

.lightbox-close {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 10px;
  transition: var(--transition);
}

.lightbox-close:hover {
  transform: scale(1.1);
}

.lightbox-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 40px;
}

#lightbox-img {
  max-width: 90%;
  max-height: 80vh;
  object-fit: contain;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: white;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
  left: 40px;
}

.lightbox-next {
  right: 40px;
}

.lightbox-footer {
  padding: 20px 40px;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  gap: 20px;
}

/* Post Layout Responsive - Tablet */
@media (max-width: 1024px) {
  /* Content images - 3 columns on tablet */
  .post-content-modern > figure,
  .post-content-modern .wp-block-image {
    width: calc(33.333% - 11px); /* 3 columns on tablet */
    max-width: calc(33.333% - 11px);
    flex: 0 0 calc(33.333% - 11px);
  }
}

/* Post Layout Responsive - Mobile */
@media (max-width: 768px) {
  .post-hero {
    height: 40vh;
    min-height: 300px;
  }
  
  .post-gallery-masonry {
    column-count: 2;
    column-gap: 12px;
  }
  
  /* Content images - 2 columns on mobile */
  .post-content-modern > figure,
  .post-content-modern .wp-block-image {
    width: calc(50% - 8px); /* 2 columns on mobile */
    max-width: calc(50% - 8px);
    flex: 0 0 calc(50% - 8px);
  }
  
  .quick-actions {
    flex-wrap: wrap;
  }
  
  .view-count {
    width: 100%;
    margin-left: 0;
    margin-top: 10px;
  }
  
  .pinterest-cta-card {
    flex-direction: column;
    text-align: center;
    padding: 40px;
  }
  
  .cta-stats {
    margin-top: 30px;
  }
  
  .related-grid {
    grid-template-columns: 1fr;
  }
  
  .lightbox-nav {
    width: 50px;
    height: 50px;
  }
  
  .lightbox-prev {
    left: 20px;
  }
  
  .lightbox-next {
    right: 20px;
  }
}

@media (max-width: 480px) {
  .post-gallery-masonry {
    column-count: 2;
    column-gap: 10px;
  }
  
  /* Content images stay 2 columns on small screens */
  .post-content-modern > figure,
  .post-content-modern .wp-block-image {
    width: calc(50% - 6px); /* 2 columns with smaller gap */
    max-width: calc(50% - 6px);
    flex: 0 0 calc(50% - 6px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  }
  
  .post-content-modern {
    gap: 12px; /* Smaller gap on mobile */
  }
  
  /* Adjust drop cap for mobile */
  .post-content-modern > p:first-of-type::first-letter {
    font-size: 3rem;
    line-height: 2.5rem;
    padding-right: 6px;
    margin-top: 4px;
  }
  
  /* Simplify headings on mobile */
  .post-content-modern > h2 {
    font-size: 1.5rem;
    margin: 2rem 0 1.5rem;
  }
  
  /* Gallery section mobile adjustments */
  .gallery-section {
    margin: 40px -20px 60px;
    padding: 60px 20px;
  }
  
  .gallery-title {
    font-size: 1.8rem;
  }
  
  .gallery-filters {
    gap: 10px;
  }
  
  .filter-btn {
    padding: 8px 18px;
    font-size: 0.85rem;
  }
}