/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  html, body {
    height: 100%;
    font-family: 'Segoe UI', sans-serif;
    background: #f4f6f8;
    color: #333;
    display: flex;
    flex-direction: column;
  }
  
  /* Navigation */
  nav {
    background-color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    padding: 1rem 0;
  }
  
  .nav-center {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
  }
  
  .nav-item {
    font-size: 1rem;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
  }
  
  .nav-item:hover {
    color: #2c3e50;
  }
  
  .nav-item.active {
    color: #1a73e8;
    border-bottom: 3px solid #1a73e8;
  }
  
  /* Main */
  main#content {
    flex: 1;
    padding: 1rem;
    display: flex;
    justify-content: center;
    align-items: flex-start;
  }
  
  .fade-in {
    animation: fadeIn 0.3s ease-in;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
  }
  
  iframe#pdf-frame {
    width: 794px; /* A4 width in px at 96dpi*/
    height: 1123px; /* A4 height in px at 96dpi */
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  }
  

 /*   Update the media query
@media (max-width: 850px) {
    iframe#pdf-frame {
      width: 100%;
      height: 100vh; Fill the mobile screen height
    }
  } */

  @media (max-width: 850px) {
    main#content {
      justify-content: center;
      align-items: center; /* vertically center */
      padding: 0; /* optional: reduce padding to use more space */
    }
  
    iframe#pdf-frame {
      width: 100%;
      height: 100vh;
      display: block;
      margin: auto;
    }
  }  
  
  
  /* Section Text */
  .section {
    max-width: 800px;
    margin: auto;
    padding: 1rem;
    font-size: 1.05rem;
    line-height: 1.6;
  }
  
  /* Footer */
  footer#footer {
    background-color: #ffffff;
    text-align: center;
    padding: 1rem;
    font-size: 0.95rem;
    color: #777;
    border-top: 1px solid #ddd;
  }

  /* PDF LISTING FOR 'RECEPT' SECTION ADDED RECENTLY */

/* PDF List Styling */
.pdf-list {
    width: 100%;
    max-width: 800px;
  }
  
  .recipe-list {
    list-style: none;
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .pdf-item {
    padding: 8px 14px;
    background-color: white;
    border-radius: 4px;
    border-left: 4px solid #ddd;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
  }
  
  .pdf-item::before {
    content: "📄";
    margin-right: 10px;
    font-size: 18px;
  }
  
  .pdf-item:hover {
    background-color: #f9f9f9;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateX(2px);
  }
  
  /* Color categories for PDF items */
  .category-meat {
    border-left-color: #e74c3c;
    color: #c0392b;
  }
  
  .category-dessert {
    border-left-color: #252525; /* 9b59b6 */
    color: #1f1f1f; /* 8e44ad */
  }
  
  .category-bread {
    border-left-color: #f39c12;
    color: #d35400;
  }
  
  /* Add more categories as needed */
  .category-soup {
    border-left-color: #3498db;
    color: #2980b9;
  }
  
  .category-salad {
    border-left-color: #2ecc71;
    color: #27ae60;
  }
  
  
/* PDF Viewer - A4 sizing and improved close button */
#pdf-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
  } 
  
  .pdf-viewer {
    width: 794px; /* A4 width in px at 96dpi, matching your schema PDF */
    height: 90vh; /* Height fills most of the viewport while maintaining some margin */
    position: relative;
  }
  
  .pdf-frame {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 4px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  }
  
  .close-pdf {
    position: absolute;
    top: -30px; /* Moved closer to the PDF */
    right: 0;
    background-color: rgba(255, 255, 255, 0.8); /* More transparent */
    border: none;
    border-radius: 50%;
    width: 28px; /* Smaller */
    height: 28px; /* Smaller */
    font-size: 18px; /* Smaller font */
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    z-index: 101;
    transition: all 0.2s ease;
  }
  
  .close-pdf:hover {
    background-color: rgba(255, 255, 255, 1);
    transform: scale(1.1);
  }
  
 /* Mobile-specific adjustments for PDF viewer */
@media (max-width: 850px) {
    /* More subtle close button */
    .close-pdf {
      top: 10px;
      right: 10px;
      background-color: rgba(255, 255, 255, 0.3); /* Very transparent background */
      width: 28px; /* Slightly smaller */
      height: 28px;
      font-size: 18px;
      /* Subtle shadow */
      box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1);
      /* Add transition for smooth appearance */
      transition: background-color 0.2s ease;
    }
    
    /* Make button more visible when touched/active */
    .close-pdf:active {
      background-color: rgba(255, 255, 255, 0.9);
    }
  }
    
  
  .hidden {
    display: none !important;
  } 


  /* --------------------------------------------- latest addition------------------- */
/* SEARCH BAR */
.search-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
  }
  
  .search-input {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border-radius: 20px;
    border: 1px solid #ccc;
    outline: none;
    width: 100%;
    max-width: 300px;
    transition: box-shadow 0.2s ease;
  }
  
  .search-input:focus {
    box-shadow: 0 0 0 2px #1a73e87a;
  }
  
  .suggestions {
    position: absolute;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-top: 4px;
    width: 100%;
    max-width: 300px;
    z-index: 10;
  }
  
  .suggestion-item {
    padding: 8px 12px;
    cursor: pointer;
  }
  
  .suggestion-item:hover {
    background-color: #f1f1f1;
  }
  
  /* PAGINATION */
  .pagination {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
  }
  
  .pagination button {
    padding: 0.5rem 1rem;
    border: none;
    background-color: #1a73e8;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: background-color 0.2s ease;
  }
  
  .pagination button:hover {
    background-color: #155ab6;
  }
  
  .pagination button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
  }
  