@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Inter:wght@300;400;500&display=swap');

:root {
  --bg-paper: #FDFCF8; /* Textured Paper White */
  --card-beige: #F5F0E6; /* Soft Sandy Beige */
  --text-charcoal: #3C3633; /* Deep Charcoal with Brown */
  --accent-lace: #F8F1E1; /* Old Lace */
  --border-stationery: #E6E0D4;
  --primary-color: #A67C52;
  --travel-accent: #5D8AA8; /* Traveler's Blue */
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', sans-serif;
  --shadow-soft: 0 20px 60px rgba(60, 54, 51, 0.05);
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-paper);
  color: var(--text-charcoal);
  line-height: 1.7;
  overflow-x: hidden;
  position: relative;
}

/* Film Grain Overlay */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.04;
  pointer-events: none;
  z-index: 9999;
}

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  color: var(--text-charcoal);
  line-height: 1.2;
}

/* Magazine Header Navigation */
nav {
  padding: 0.6rem 5%;
  border-bottom: 1px solid var(--border-stationery);
  background: var(--bg-paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  z-index: 1000;
  position: sticky;
  top: 0;
}

.logo {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--text-charcoal);
  font-weight: 700;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 3rem;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-charcoal);
  font-size: 0.75rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  transition: opacity 0.3s;
  padding-bottom: 5px;
}

.nav-links a:hover {
  opacity: 0.6;
}

.nav-links a.active {
  border-bottom: 2px solid var(--text-charcoal);
}

section[id] {
  scroll-margin-top: 100px;
}

.lang-switcher a.active {
  border-bottom: none;
  color: var(--text-charcoal);
  font-weight: 500;
}

/* Hero Section */
.hero {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 4rem 5%;
  border-bottom: 1px solid var(--border-stationery);
}

.hero-content {
  max-width: 800px;
  margin-bottom: 3rem;
}

.hero h1 {
  font-size: 4.5rem;
  margin-bottom: 1.5rem;
  font-style: italic;
}

.hero p {
  font-size: 1.1rem;
  color: rgba(60, 54, 51, 0.7);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-image-container {
  width: 100%;
  max-width: 1000px;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  border: 1px solid var(--border-stationery);
}

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

/* Sections */
.recipes-section, .about-section, .follow-section {
  padding: 4rem 5%;
  border-bottom: 1px solid var(--border-stationery);
}

.section-title {
  font-size: 2.8rem;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 40px;
  height: 1px;
  background: var(--text-charcoal);
  margin: 1.5rem auto 0;
}

/* Shared Grid & Section Styles */
.recipes-section, .travel-section, .about-section, .follow-section {
  padding: 4rem 5%;
  border-bottom: 1px solid var(--border-stationery);
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

.travel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* Changed to 4 per row as requested */
  gap: 2.5rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

/* Editorial Blog Cards (Shared between Recipes and Travel) */
.recipe-card, .travel-card {
  min-width: 0; /* Crucial Safari fix for grid calculation */
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-soft);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--border-stationery);
  -webkit-transform: translateZ(0); /* Safari clipping fix */
  backface-visibility: hidden;
}

.recipe-card:hover, .travel-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 30px 60px rgba(60, 54, 51, 0.1);
}

.recipe-image {
  width: 100%;
  height: 380px;
  object-fit: cover;
}

.travel-image {
  width: 100%;
  aspect-ratio: 3 / 4; /* Portrait ratio for vertical phone photos */
  object-fit: cover;
}

.recipe-content, .travel-content {
  padding: 1.5rem; /* Reduced padding for 4-column layout */
  flex-grow: 1; /* Ensures content expands to fill the card height for perfect alignment */
  display: flex;
  flex-direction: column;
}

.recipe-tag, .travel-tag {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  margin-bottom: 0.35rem; /* Tightened further to match recipe look */
  display: block;
  font-weight: 500;
}

.recipe-tag { color: var(--primary-color); }
.travel-tag { color: var(--travel-accent); }

.recipe-title, .travel-title {
  font-size: 1.4rem; /* Reduced font size for 4-column layout */
  margin-bottom: 0.5rem; /* Reduced to match recipe look */
}

.recipe-desc, .travel-desc {
  color: rgba(60, 54, 51, 0.6);
  font-weight: 300;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.travel-btn:hover {
  background: var(--travel-accent);
  border-color: var(--travel-accent);
}

/* About Section */
.about-container {
  display: flex;
  align-items: flex-start;
  gap: 6rem;
  max-width: 1100px;
  margin: 0 auto;
}


.about-image {
  flex: 1;
}

.about-image img {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.about-content {
  flex: 1.2;
}

.about-text p {
  font-size: 1.1rem;
  font-weight: 300;
  margin-bottom: 1.5rem;
  color: rgba(60, 54, 51, 0.8);
}

.about-text p.lead {
  font-size: 1.4rem;
  color: var(--text-charcoal);
  font-family: var(--font-serif);
  font-style: italic;
  margin-bottom: 2.5rem;
  line-height: 1.5;
  opacity: 1;
}

.about-text ul {
  list-style: none;
  padding: 1rem 0;
  margin: 2rem 0;
}

.about-text li {
  margin-bottom: 2rem;
  padding-left: 0;
}

.about-text li strong {
  color: var(--text-charcoal);
  font-family: var(--font-serif);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.about-text blockquote {
  margin: 4rem 0 2rem;
  padding: 3rem 2rem;
  border-top: 1px solid var(--border-stationery);
  border-bottom: 1px solid var(--border-stationery);
  text-align: center;
}

.about-text blockquote p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.4;
  color: var(--text-charcoal);
  margin-bottom: 0;
  max-width: 100%;
}

.about-signature {
  text-align: right;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.3rem;
  margin-top: 1.5rem;
  color: var(--primary-color);
  letter-spacing: 0.05em;
}


/* Social Channel Hub */
.social-hub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  max-width: 1100px;
  margin: 0 auto;
}

.social-card {
  padding: 3rem 2rem;
  background: white;
  border-radius: 4px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  border: 1px solid var(--border-stationery);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
}

.social-card:hover {
  background: var(--bg-paper);
  transform: translateY(-5px);
  border-color: var(--text-charcoal);
  box-shadow: var(--shadow-soft);
}

.social-icon {
  font-size: 1.5rem;
  color: var(--text-charcoal);
  margin-bottom: 1.2rem;
  opacity: 0.8;
}

.social-card h3 {
  font-size: 1.1rem;
  letter-spacing: 0.15em;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
}

.social-card p {
  font-size: 0.85rem;
  color: rgba(60, 54, 51, 0.6);
  max-width: 250px;
}

/* Instagram Feed */
.ig-feed {
    max-width: 1200px;
    margin: 6rem auto 0;
    width: 100%;
}

.ig-feed behold-widget {
    width: 100%;
    display: block;
}

.ig-item {
    width: 250px;
    height: 250px;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    border: 1px solid var(--border-stationery);
}

.ig-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: sepia(0.2);
    transition: filter 0.3s;
}

.ig-item:hover img {
    filter: sepia(0);
}

/* Footer */
footer {
  padding: 6rem 5%;
  text-align: center;
  border-top: 1px solid var(--border-stationery);
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

.footer-rights {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: rgba(60, 54, 51, 0.5);
}

/* Language Switcher */
.lang-switcher {
  display: flex;
  gap: 1rem;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
}

.lang-switcher a {
  text-decoration: none;
  color: rgba(60, 54, 51, 0.5);
}

.lang-switcher a.active {
  color: var(--text-charcoal);
  font-weight: 500;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-paper);
}

::-webkit-scrollbar-thumb {
  background: var(--border-stationery);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-charcoal);
}

@media (max-width: 768px) {
  .logo { font-size: 1.3rem; }
  .nav-links { 
    gap: 1.2rem; 
    flex-wrap: wrap;
    justify-content: center;
  }
  .nav-links a { font-size: 0.65rem; }
  .hero h1 { font-size: 2.8rem; }
  .section-title { font-size: 2.2rem; }
  .about-container { flex-direction: column; gap: 3rem; }
  .recipe-grid, .travel-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .social-hub { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* New UI Elements */
.view-all-container {
  display: flex;
  justify-content: center;
  margin-top: 5rem;
}

.btn-primary {
  display: inline-block;
  padding: 1rem 2.5rem;
  background: transparent;
  color: var(--text-charcoal);
  text-decoration: none;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  border-radius: 50px;
  transition: all 0.3s ease;
  border: 1px solid var(--border-stationery);
  font-family: var(--font-sans);
  font-weight: 400;
}

.btn-primary:hover {
  background: var(--text-charcoal);
  color: white;
  border-color: var(--text-charcoal);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

.search-bar-wrapper input::placeholder {
  color: var(--text-charcoal);
  opacity: 0.3;
}

.explorer-header h1.section-title::after {
    margin: 1.5rem auto 0;
}
