/* Custom Styles for John's Supermarket */

/* Primary brand colors */
:root {
  --primary-green: #28a745;
  --secondary-green: #20c997;
  --accent-orange: #fd7e14;
  --text-dark: #343a40;
  --text-light: #6c757d;
}

/* Custom primary color override for Bulma */
.has-background-primary {
  background-color: var(--primary-green) !important;
}

.is-primary {
  background-color: var(--primary-green) !important;
  border-color: var(--primary-green) !important;
  color: white !important;
}

.button.is-primary {
  background-color: var(--primary-green);
  border-color: var(--primary-green);
}

.button.is-primary:hover {
  background-color: #218838;
  border-color: #1e7e34;
}

.navbar.is-primary {
  background-color: var(--primary-green);
  min-height: 5.5rem;
}

.navbar.is-primary .navbar-brand,
.navbar.is-primary .navbar-menu {
  min-height: 5.5rem;
}

/* Logo container */
.navbar.is-primary .navbar-logo-item {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  color: white;
  font-weight: 600;
}

.navbar-logo {
  height: 10rem; /* Adjust logo height */
  width: auto;
  max-width: 250px;
  object-fit: contain;
}

.navbar-item .navbar-logo {
  max-height: none;
}

/* Menu items alignment - stays consistent regardless of logo size */
.navbar.is-primary .navbar-item {
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  color: white;
}

.navbar.is-primary .navbar-end .navbar-item {
  color: white;
}

.navbar.is-primary .navbar-end .navbar-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

.navbar.is-primary .navbar-start .navbar-item {
  color: white;
}

.navbar.is-primary .navbar-start .navbar-item:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: white;
}

/* Hero section enhancements */
.hero.is-primary {
  background-color: var(--primary-green);
}

/* Hero Section Styles */
.hero-image {
  background: transparent;
}

.hero-image-img {
  background: white;
}

/* PDF container styling */
#pdf-container {
  min-height: 400px;
  position: relative;
}

#pdf-canvas {
  border: 1px solid #dbdbdb;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  max-width: 100%;
  height: auto;
}

#pdf-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: auto;
}

/* Hide PDF Full Viewer by default */
.pdf-full-viewer-hidden {
  display: none;
}

/* PDF Viewer Styles */
#pdf-canvas {
  max-width: 100%;
  height: auto;
  border: 1px solid #dbdbdb;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  display: block;
  margin: 0 auto;
}

/* Hide PDF Controls by default */
.pdf-controls-hidden {
  display: none;
}

/* Hide PDF Fallback by default */
.pdf-fallback-hidden {
  display: none;
}

.pdf-full-viewer-hidden {
  display: none;
}

.pdf-controls-hidden {
  display: none;
}

/* Feature icons styling */
.icon.is-large {
  display: inline-block;
}

/* Responsive improvements */
@media screen and (max-width: 768px) {
  .hero.is-medium .hero-body {
    padding: 3rem 1.5rem;
  }

  .title.is-1 {
    font-size: 2.5rem !important;
  }

  .subtitle.is-3 {
    font-size: 1.5rem !important;
  }

  #pdf-canvas {
    width: 100%;
    height: auto;
  }

  .columns.is-vcentered {
    flex-direction: column-reverse;
  }

  /* Adjust logo size for mobile */
  .navbar-logo {
    height: 5rem;
    max-width: 180px;
  }

  .navbar.is-primary {
    min-height: 4rem;
  }

  .navbar.is-primary .navbar-brand,
  .navbar.is-primary .navbar-menu {
    min-height: 4rem;
  }
}

/* Contact form styling */
.box {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  padding: 1.5rem;
}

/* Bistro South hours container specific styling */
.box.has-background-white-bis {
  background-color: #fafafa !important;
  border: 1px solid #e8e8e8;
}

.box .title.is-6 {
  margin-bottom: 1rem;
  line-height: 1.3;
}

.box .content {
  margin-bottom: 0;
}

.box .content p {
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.box hr {
  margin: 1.5rem 0;
  background-color: #dbdbdb;
  height: 1px;
}

/* Ensure proper column spacing on mobile */
@media screen and (max-width: 768px) {
  .box .columns {
    margin: 0;
  }

  .box .column {
    padding: 0.75rem 0.5rem;
  }

  .box .title.is-6 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
  }

  .box .content p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
  }
}

/* Footer enhancements */
.footer {
  background-color: #f8f9fa;
  border-top: 1px solid #dee2e6;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Loading animation */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.fa-spin {
  animation: spin 2s linear infinite;
}

/* PDF controls styling */
#pdf-controls .field {
  margin-bottom: 0.5rem;
}

#page-info {
  line-height: 2.25rem;
  color: var(--text-dark);
}

/* Store hours and contact info */
.content p {
  margin-bottom: 1rem;
}

.content .icon {
  margin-right: 0.5rem;
  color: var(--accent-orange);
}

/* Newsletter signup */
.box .title.is-4 {
  color: var(--text-dark);
  margin-bottom: 1rem;
}

/* Image placeholders - only for remaining placeholder images */
img[src*="placeholder"] {
  background-color: #f8f9fa;
  border: 2px dashed #dee2e6;
  opacity: 0.7;
}

/* Mobile navigation */
.navbar-burger {
  color: white;
}

.navbar-burger:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Accessibility improvements */
.button:focus,
.input:focus,
.textarea:focus {
  box-shadow: 0 0 0 0.125em rgba(40, 167, 69, 0.25);
}

/* Print styles */
@media print {
  .navbar,
  .footer,
  #pdf-controls {
    display: none !important;
  }

  .section {
    padding: 1rem 0;
  }

  .hero {
    background: white !important;
    color: black !important;
  }
}
