/* MrKottu.lk - The Ultimate Kottu Resource | Modern CSS */
:root {
  --primary: #D35400;
  --primary-dark: #A04000;
  --primary-light: #E67E22;
  --secondary: #4E342E;
  --secondary-light: #6D4C41;
  --accent: #F5A623;
  --accent-light: #FFD54F;
  --gold: #FFB300;
  --bg: #FFFAF5;
  --bg-warm: #FFF3E0;
  --bg-card: #FFFFFF;
  --text: #2D2D2D;
  --text-light: #666666;
  --text-muted: #999999;
  --border: #E0D6CC;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1200px;
  --header-height: 70px;
  --transition: 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }
ul, ol { list-style: none; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.3;
  color: var(--secondary);
}
h1 { font-size: clamp(2rem, 5vw, 3.2rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.6rem, 4vw, 2.4rem); margin-bottom: 0.8rem; }
h3 { font-size: clamp(1.2rem, 3vw, 1.6rem); margin-bottom: 0.6rem; }
p { margin-bottom: 1rem; color: var(--text-light); }

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: box-shadow var(--transition);
}
.site-header.scrolled { box-shadow: var(--shadow); }

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
}
.logo span { color: var(--secondary); }
.logo:hover { color: var(--primary-dark); }

.nav-links {
  display: flex;
  gap: 8px;
  align-items: center;
}
.nav-links a {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text);
  font-weight: 500;
  font-size: 0.92rem;
  transition: all var(--transition);
  white-space: nowrap;
}
.nav-links a:hover, .nav-links a.active {
  background: var(--bg-warm);
  color: var(--primary);
}

/* Mobile Nav Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 6px 0;
  transition: all var(--transition);
  border-radius: 2px;
}
.nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

/* Hero Section */
.hero {
  margin-top: var(--header-height);
  padding: 80px 20px;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary-dark) 50%, var(--primary) 100%);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.5;
}
.hero-content { position: relative; z-index: 1; max-width: 800px; margin: 0 auto; }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 6vw, 4rem); margin-bottom: 1.2rem; text-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.hero p { color: rgba(255,255,255,0.9); font-size: clamp(1rem, 2.5vw, 1.25rem); max-width: 600px; margin: 0 auto 2rem; }
.hero-sub { font-size: clamp(1.1rem, 2.5vw, 1.4rem); color: var(--accent-light); font-weight: 600; margin-bottom: 0.5rem; }

.hero-page {
  margin-top: var(--header-height);
  padding: 60px 20px 50px;
  background: linear-gradient(135deg, var(--secondary) 0%, var(--primary-dark) 100%);
  color: #fff;
  text-align: center;
}
.hero-page h1 { color: #fff; margin-bottom: 0.5rem; }
.hero-page p { color: rgba(255,255,255,0.85); margin: 0 auto; max-width: 600px; }

/* Breadcrumbs */
.breadcrumbs {
  padding: 15px 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.breadcrumbs a { color: var(--primary); }
.breadcrumbs span { margin: 0 8px; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-align: center;
}
.btn-primary {
  background: var(--accent);
  color: var(--secondary);
  box-shadow: 0 4px 15px rgba(245,166,35,0.4);
}
.btn-primary:hover {
  background: var(--gold);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245,166,35,0.5);
  color: var(--secondary);
}
.btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.6);
}
.btn-outline:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
  color: #fff;
}
.btn-sm { padding: 10px 24px; font-size: 0.9rem; }

/* Sections */
.section {
  padding: 80px 0;
}
.section-alt { background: var(--bg-warm); }
.section-title {
  text-align: center;
  margin-bottom: 3rem;
}
.section-title h2 { margin-bottom: 0.5rem; }
.section-title p { max-width: 600px; margin: 0 auto; }
.section-title .underline {
  width: 60px;
  height: 4px;
  background: var(--primary);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* Card Grid */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}
.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.card-grid-2 { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); }

.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  border: 1px solid var(--border);
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.card-img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  background: var(--bg-warm);
}
.card-body { padding: 24px; }
.card-body h3 { margin-bottom: 0.5rem; }
.card-body h3 a { color: var(--secondary); }
.card-body h3 a:hover { color: var(--primary); }
.card-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}
.card-tag {
  display: inline-block;
  background: var(--bg-warm);
  color: var(--primary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Feature Cards */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 24px;
}
.feature-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 30px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: all var(--transition);
}
.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}
.feature-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.feature-card p { font-size: 0.9rem; margin-bottom: 0; }

/* Recipe Page Styles */
.recipe-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin-bottom: 3rem;
}
.recipe-img-wrap {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.recipe-img-wrap img {
  width: 100%;
  height: 400px;
  object-fit: cover;
}
.recipe-meta-box {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.recipe-meta-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}
.recipe-meta-row:last-child { border-bottom: none; }
.recipe-meta-label { color: var(--text-muted); font-weight: 500; }
.recipe-meta-value { font-weight: 600; color: var(--secondary); }

.recipe-content { max-width: 800px; }
.recipe-content h2 { margin-top: 2.5rem; margin-bottom: 1rem; color: var(--primary-dark); }
.recipe-content h3 { margin-top: 1.5rem; margin-bottom: 0.8rem; }
.recipe-content ul, .recipe-content ol {
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}
.recipe-content li {
  list-style: disc;
  margin-bottom: 0.5rem;
  color: var(--text-light);
  line-height: 1.8;
}
.recipe-content ol li { list-style: decimal; }
.recipe-content p { line-height: 1.8; }

/* Nutrition Table */
.nutrition-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 2rem;
}
.nutrition-table th, .nutrition-table td {
  padding: 10px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.nutrition-table th {
  background: var(--bg-warm);
  font-weight: 600;
  color: var(--secondary);
}

/* Video Grid */
.video-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
}
.video-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}
.video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.video-card .card-body { padding: 20px; }
.video-card h3 { font-size: 1.05rem; }

/* Restaurant Listing */
.restaurant-card {
  display: flex;
  gap: 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 24px;
  transition: all var(--transition);
}
.restaurant-card:hover { box-shadow: var(--shadow-lg); }
.restaurant-rank {
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  min-width: 50px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 5px;
}
.restaurant-info { flex: 1; }
.restaurant-info h3 { margin-bottom: 0.3rem; }
.restaurant-location { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 0.5rem; }
.restaurant-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 0.8rem; }

/* Stats Row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin: 2rem 0;
}
.stat-item {
  text-align: center;
  padding: 20px;
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--primary);
  display: block;
}
.stat-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Content Page */
.content-page {
  margin-top: var(--header-height);
  padding: 40px 0 80px;
}
.content-body {
  max-width: 800px;
  margin: 0 auto;
}
.content-body h2 { margin-top: 2rem; color: var(--primary-dark); }
.content-body h3 { margin-top: 1.5rem; }
.content-body p { line-height: 1.8; }
.content-body ul, .content-body ol { padding-left: 1.5rem; margin-bottom: 1.5rem; }
.content-body li { list-style: disc; margin-bottom: 0.5rem; color: var(--text-light); }
.content-body ol li { list-style: decimal; }
.content-body a { text-decoration: underline; }

/* Sidebar layout */
.layout-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 40px;
  align-items: start;
}
.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 20px);
}
.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  margin-bottom: 24px;
}
.sidebar-widget h3 {
  font-size: 1.05rem;
  margin-bottom: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--border);
}
.sidebar-widget ul { margin: 0; }
.sidebar-widget li { margin-bottom: 0.6rem; }
.sidebar-widget li a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  padding: 6px 0;
}
.sidebar-widget li a:hover { color: var(--primary); }

/* Contact Form */
.contact-form {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 40px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  max-width: 600px;
  margin: 0 auto;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--secondary);
  font-size: 0.95rem;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color var(--transition);
  background: #fff;
}
.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
}
.form-group textarea { min-height: 150px; resize: vertical; }

/* Table of Contents */
.toc {
  background: var(--bg-warm);
  border-radius: var(--radius);
  padding: 24px 30px;
  margin: 2rem 0;
  border-left: 4px solid var(--primary);
}
.toc h3 { font-size: 1rem; margin-bottom: 0.8rem; }
.toc ul { padding-left: 1.2rem; }
.toc li { list-style: decimal; margin-bottom: 0.4rem; }
.toc a { color: var(--primary); font-size: 0.95rem; }

/* FAQ Accordion */
.faq-item {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  border: 1px solid var(--border);
  overflow: hidden;
}
.faq-question {
  padding: 18px 24px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--transition);
}
.faq-question:hover { background: var(--bg-warm); }
.faq-question::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--primary);
  transition: transform var(--transition);
}
.faq-item.open .faq-question::after { content: '−'; }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
.faq-item.open .faq-answer { max-height: 500px; }
.faq-answer-inner { padding: 0 24px 18px; color: var(--text-light); line-height: 1.8; }

/* CTA Banner */
.cta-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 60px 20px;
  text-align: center;
  border-radius: var(--radius);
  margin: 2rem 0;
}
.cta-banner h2 { color: #fff; }
.cta-banner p { color: rgba(255,255,255,0.9); max-width: 500px; margin: 0 auto 1.5rem; }

/* Ad Placeholder */
.ad-space {
  background: var(--bg-warm);
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 2rem 0;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Footer */
.site-footer {
  background: var(--secondary);
  color: rgba(255,255,255,0.8);
  padding: 60px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}
.footer-brand p { font-size: 0.9rem; margin-top: 1rem; line-height: 1.7; }
.footer-col h4 {
  color: #fff;
  font-size: 1rem;
  margin-bottom: 1.2rem;
  font-weight: 600;
}
.footer-col a {
  display: block;
  color: rgba(255,255,255,0.7);
  padding: 4px 0;
  font-size: 0.9rem;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--accent); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 20px 0;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
}

/* Scroll to top */
.scroll-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 45px;
  height: 45px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  transition: all var(--transition);
  z-index: 999;
}
.scroll-top.visible { display: flex; }
.scroll-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* Cookie Consent */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--secondary);
  color: #fff;
  padding: 20px;
  z-index: 9999;
  display: none;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}
.cookie-banner.show { display: block; }
.cookie-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.cookie-inner p { margin: 0; font-size: 0.9rem; flex: 1; min-width: 250px; }
.cookie-inner a { color: var(--accent); text-decoration: underline; }
.cookie-btn {
  background: var(--accent);
  color: var(--secondary);
  border: none;
  padding: 10px 24px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  font-size: 0.9rem;
}

/* Schema / Structured Data Badge (for recipe pages) */
.rating-stars { color: var(--accent); font-size: 1.1rem; letter-spacing: 2px; }

/* Tags */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-cloud a {
  display: inline-block;
  background: var(--bg-warm);
  color: var(--text-light);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all var(--transition);
}
.tag-cloud a:hover { background: var(--primary); color: #fff; }

/* Image placeholder */
.img-placeholder {
  width: 100%;
  height: 220px;
  background: linear-gradient(135deg, var(--bg-warm) 0%, #FFE0B2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .layout-sidebar {
    grid-template-columns: 1fr;
  }
  .sidebar { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .recipe-header { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: #fff;
    flex-direction: column;
    padding: 30px;
    gap: 5px;
    transform: translateX(100%);
    transition: transform var(--transition);
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a {
    font-size: 1.1rem;
    padding: 12px 16px;
    width: 100%;
  }

  .hero { padding: 50px 20px; }
  .section { padding: 50px 0; }
  .card-grid, .card-grid-2, .card-grid-3 { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 30px; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .restaurant-card { flex-direction: column; gap: 12px; }
  .restaurant-rank { font-size: 1.5rem; }
  .contact-form { padding: 24px; }
}

@media (max-width: 480px) {
  .feature-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr; }
  .hero h1 { font-size: 1.8rem; }
  .btn { padding: 12px 24px; font-size: 0.9rem; }
}

/* Print */
@media print {
  .site-header, .site-footer, .cookie-banner, .scroll-top, .ad-space, .nav-toggle { display: none !important; }
  body { background: #fff; }
  .hero, .hero-page { background: #eee !important; color: #333 !important; -webkit-print-color-adjust: exact; }
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.animate-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Lazy load images */
img[data-src] {
  opacity: 0;
  transition: opacity 0.4s ease;
}
img[data-src].loaded { opacity: 1; }
