/* ============================================
   Blog Styles - Udawalawa.com Safari Blog
   Shared CSS for all blog pages
   ============================================ */

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

:root {
  --primary-green: #2d6a4f;
  --primary-dark: #1b4332;
  --accent-gold: #d4a03c;
  --accent-orange: #e07b39;
  --text-light: #ffffff;
  --text-dark: #1a1a1a;
  --bg-dark: #0d1b2a;
  --bg-card: rgba(255, 255, 255, 0.95);
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  --shadow-sm: 0 4px 15px rgba(0, 0, 0, 0.1);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: all 0.3s ease;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, sans-serif;
  background: linear-gradient(
    135deg,
    var(--bg-dark) 0%,
    #1b4332 50%,
    var(--primary-dark) 100%
  );
  min-height: 100vh;
  color: var(--text-light);
  line-height: 1.8;
  overflow-x: hidden;
  max-width: 100vw;
}

/* Prevent horizontal overflow */
img, video, iframe, table, pre, code {
  max-width: 100%;
}

/* Force all containers to respect viewport */
.blog-container,
.blog-content,
.blog-hero,
.header,
.footer,
.breadcrumb {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Header Styles */
.header {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.logo {
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-text {
  font-family: "Playfair Display", serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-light);
}

.logo-text span {
  color: var(--accent-gold);
}

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

.nav-menu a {
  color: var(--text-light);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
  padding: 0.5rem 0;
  position: relative;
}

.nav-menu a:hover {
  color: var(--accent-gold);
}

.nav-menu a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-gold);
  transition: var(--transition);
}

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

/* Hero Blog Section */
.blog-hero {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 500px;
  max-height: 800px;
  overflow: hidden;
}

.blog-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.blog-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.2) 40%,
    rgba(27, 67, 50, 0.8) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 4rem 2rem;
}

.blog-hero-content {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.blog-hero h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: #ffffff;
  text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.5);
  margin-bottom: 1rem;
  font-weight: 700;
  max-width: 900px;
}

.blog-hero-meta {
  display: flex;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}

.blog-hero-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.breadcrumb {
  background: rgba(0, 0, 0, 0.2);
  padding: 1rem 2rem;
}

.breadcrumb-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumb a:hover {
  text-decoration: underline;
}

.breadcrumb span {
  color: rgba(255, 255, 255, 0.7);
}

/* Main Content Area */
.blog-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 3rem 2rem;
  display: grid;
  grid-template-columns: 1fr 350px;
  gap: 3rem;
}

.blog-content {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 3rem;
  color: var(--text-dark);
}

.blog-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
}

/* Typography */
.blog-content h2 {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  color: var(--primary-dark);
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 3px solid var(--accent-gold);
}

.blog-content h2:first-child {
  margin-top: 0;
}

.blog-content h3 {
  font-family: "Playfair Display", serif;
  font-size: 1.5rem;
  color: var(--primary-green);
  margin: 2rem 0 0.75rem;
}

.blog-content h4 {
  font-size: 1.2rem;
  color: var(--primary-dark);
  margin: 1.5rem 0 0.5rem;
}

.blog-content p {
  margin-bottom: 1.25rem;
  color: #444;
  font-size: 1.05rem;
}

.blog-content ul,
.blog-content ol {
  margin: 1rem 0 1.5rem 1.5rem;
  color: #444;
}

.blog-content li {
  margin-bottom: 0.5rem;
}

.blog-content a {
  color: var(--primary-green);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: var(--transition);
}

.blog-content a:hover {
  color: var(--accent-gold);
  border-bottom-color: var(--accent-gold);
}

/* Ticket Prices Table */
.ticket-prices-section {
  margin: 2rem 0 3rem;
}

/* Table Wrapper for Mobile Scroll */
.table-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 0 -0.5rem;
  padding: 0 0.5rem;
}

.table-wrapper table {
  min-width: 500px;
}

.ticket-prices-header {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-dark) 100%);
  color: var(--text-light);
  padding: 1.5rem 2rem;
  border-radius: var(--radius) var(--radius) 0 0;
  text-align: center;
}

.ticket-prices-header h2 {
  color: var(--text-light) !important;
  border: none !important;
  margin: 0 !important;
  padding: 0 !important;
  font-size: 1.75rem;
}

.ticket-prices-header p {
  color: rgba(255, 255, 255, 0.9) !important;
  margin: 0.5rem 0 0 !important;
  font-size: 0.95rem;
}

.ticket-prices-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.ticket-prices-table thead {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.ticket-prices-table th {
  padding: 1rem;
  text-align: center;
  font-weight: 600;
  color: var(--primary-dark);
  border: 1px solid #dee2e6;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.ticket-prices-table td {
  padding: 0.85rem 1rem;
  text-align: center;
  border: 1px solid #dee2e6;
  color: #444;
}

.ticket-prices-table tbody tr:nth-child(even) {
  background: #f8f9fa;
}

.ticket-prices-table tbody tr:hover {
  background: rgba(45, 106, 79, 0.08);
}

.ticket-prices-table .price-highlight {
  font-weight: 600;
  color: var(--primary-green);
  font-size: 1.1rem;
}

.ticket-prices-table .best-value {
  background: linear-gradient(135deg, rgba(212, 160, 60, 0.15) 0%, rgba(224, 123, 57, 0.15) 100%) !important;
  position: relative;
}

.ticket-prices-table .best-value::after {
  content: "Best Value";
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--accent-gold);
  color: white;
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  font-weight: 600;
  text-transform: uppercase;
}

.ticket-notes {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
  border: 1px solid #ffc107;
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 1.25rem;
}

.ticket-notes ul {
  margin: 0;
  padding-left: 1.25rem;
  color: #856404;
}

.ticket-notes li {
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

/* CTA Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-dark) 100%);
  color: var(--text-light);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(45, 106, 79, 0.4);
}

.btn-cta {
  background: linear-gradient(135deg, var(--accent-gold) 0%, var(--accent-orange) 100%);
  color: var(--text-light);
  font-size: 1.1rem;
  padding: 1.25rem 2.5rem;
}

.btn-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(212, 160, 60, 0.5);
}

.cta-box {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-dark) 100%);
  border-radius: var(--radius);
  padding: 2.5rem;
  text-align: center;
  margin: 3rem 0;
}

.cta-box h3 {
  color: var(--text-light) !important;
  font-size: 1.75rem;
  margin-bottom: 1rem;
}

.cta-box p {
  color: rgba(255, 255, 255, 0.9) !important;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

/* Info Cards */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.info-card {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  border-left: 4px solid var(--accent-gold);
}

.info-card h4 {
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.info-card p {
  color: #555;
  font-size: 0.95rem;
  margin: 0;
}

/* Wildlife Highlight Boxes */
.wildlife-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.wildlife-card {
  background: #fff;
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  border: 2px solid transparent;
}

.wildlife-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent-gold);
  box-shadow: var(--shadow);
}

.wildlife-card .icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.wildlife-card h4 {
  color: var(--primary-dark);
  margin-bottom: 0.5rem;
}

.wildlife-card p {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
}

/* Sidebar Styles */
.sidebar-widget {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  color: var(--text-dark);
}

.sidebar-widget h3 {
  font-family: "Playfair Display", serif;
  color: var(--primary-dark);
  font-size: 1.25rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--accent-gold);
}

.sidebar-cta {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-dark) 100%);
  color: var(--text-light);
  text-align: center;
}

.sidebar-cta h3 {
  color: var(--text-light);
  border-bottom-color: var(--accent-gold);
}

.sidebar-cta p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.sidebar-cta .price-tag {
  font-size: 2.5rem;
  font-family: "Playfair Display", serif;
  font-weight: 700;
  color: var(--accent-gold);
  margin: 1rem 0;
}

.sidebar-cta .btn {
  width: 100%;
  margin-top: 0.5rem;
}

.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-list li {
  margin-bottom: 0.5rem;
}

.toc-list a {
  color: #555;
  text-decoration: none;
  font-size: 0.9rem;
  display: block;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.toc-list a:hover {
  background: rgba(45, 106, 79, 0.1);
  color: var(--primary-green);
}

/* FAQ Section */
.faq-section {
  margin: 3rem 0;
}

.faq-section > h2 {
  text-align: center;
  margin-bottom: 2rem;
}

.faq-category {
  margin-bottom: 2rem;
}

.faq-category-title {
  background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-dark) 100%);
  color: var(--text-light);
  padding: 1rem 1.5rem;
  border-radius: var(--radius-sm);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.faq-item {
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: var(--radius-sm);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover {
  border-color: var(--primary-green);
  box-shadow: var(--shadow-sm);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--primary-dark);
  background: #fff;
  transition: var(--transition);
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  font-size: 1rem;
}

.faq-question:hover {
  background: rgba(45, 106, 79, 0.05);
}

.faq-question span {
  flex: 1;
  padding-right: 1rem;
}

.faq-icon {
  font-size: 1.5rem;
  color: var(--accent-gold);
  transition: var(--transition);
  flex-shrink: 0;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  background: #f8f9fa;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 1.25rem 1.5rem;
}

.faq-answer p {
  margin: 0;
  color: #555;
  line-height: 1.7;
  font-size: 0.95rem;
}

/* Footer */
.footer {
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(10px);
  padding: 3rem 2rem 1.5rem;
  margin-top: 3rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.footer-section h4 {
  color: var(--accent-gold);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-section p,
.footer-section a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  line-height: 1.8;
  text-decoration: none;
  display: block;
  transition: var(--transition);
}

.footer-section a:hover {
  color: var(--accent-gold);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
}

/* WhatsApp Button */
.whatsapp-btn {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 60px;
  height: 60px;
  background: #25d366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
  transition: var(--transition);
  z-index: 1000;
}

.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-btn img {
  width: 32px;
  height: 32px;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .blog-container {
    grid-template-columns: 1fr;
  }

  .blog-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
  }

  .sidebar-widget {
    margin-bottom: 0;
  }
}

@media (max-width: 768px) {
  .blog-hero {
    height: 60vh;
    min-height: 400px;
  }

  .blog-hero h1 {
    font-size: 2rem;
  }

  .blog-hero-overlay {
    padding: 2rem 1rem;
  }

  .blog-content {
    padding: 2rem 1.5rem;
  }

  .blog-content h2 {
    font-size: 1.5rem;
  }

  .ticket-prices-table {
    font-size: 0.8rem;
  }

  .ticket-prices-table th,
  .ticket-prices-table td {
    padding: 0.6rem 0.5rem;
  }

  .nav-menu {
    display: none;
  }

  .header-content {
    justify-content: center;
  }

  .blog-hero-meta {
    font-size: 0.85rem;
    gap: 1rem;
  }

  .faq-question {
    font-size: 0.9rem;
    padding: 1rem;
  }

  .faq-question span {
    word-break: break-word;
  }

  .info-grid,
  .wildlife-grid {
    grid-template-columns: 1fr;
  }

  .breadcrumb {
    padding: 0.75rem 1rem;
  }

  .breadcrumb-content {
    font-size: 0.8rem;
    flex-wrap: wrap;
  }
}

@media (max-width: 480px) {
  .blog-container {
    padding: 1.5rem 0.75rem;
  }

  .blog-content {
    padding: 1.25rem 1rem;
    border-radius: var(--radius-sm);
  }

  .blog-content h2 {
    font-size: 1.3rem;
    word-break: break-word;
  }

  .blog-content h3 {
    font-size: 1.2rem;
  }

  .blog-content p {
    font-size: 1rem;
  }

  .cta-box {
    padding: 1.25rem;
    margin: 2rem -0.5rem;
    border-radius: var(--radius-sm);
  }

  .cta-box h3 {
    font-size: 1.3rem;
  }

  .cta-box p {
    font-size: 0.95rem;
  }

  .btn-cta {
    font-size: 0.9rem;
    padding: 0.9rem 1.5rem;
    width: 100%;
  }

  .faq-category-title {
    font-size: 1rem;
    padding: 0.85rem 1rem;
  }

  .faq-question {
    font-size: 0.85rem;
    padding: 0.85rem;
  }

  .faq-item.active .faq-answer {
    padding: 1rem;
  }

  .faq-answer p {
    font-size: 0.9rem;
  }

  .sidebar-widget {
    padding: 1.25rem;
  }

  .whatsapp-btn {
    bottom: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
  }

  .whatsapp-btn img {
    width: 26px;
    height: 26px;
  }

  .header {
    padding: 0.75rem 1rem;
  }

  .logo-text {
    font-size: 1.5rem;
  }

  .blog-hero {
    height: 50vh;
    min-height: 350px;
  }

  .blog-hero h1 {
    font-size: 1.6rem;
    line-height: 1.3;
  }

  .blog-hero-meta {
    font-size: 0.75rem;
    gap: 0.75rem;
  }

  .footer {
    padding: 2rem 1rem 1rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Schema & SEO Enhancement Styles */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Print Styles */
@media print {
  .header,
  .footer,
  .blog-sidebar,
  .whatsapp-btn,
  .cta-box {
    display: none;
  }

  .blog-container {
    grid-template-columns: 1fr;
  }

  .blog-content {
    padding: 0;
    box-shadow: none;
  }
}
