/* 
 * Paloma Recipe Drink - Enhanced Custom Styles & Animations 
 * palomarecipedrink.com
 */

/* Strict Global Mobile Overflow Prevention & Natural Text Wrapping */
html, body {
  overflow-x: hidden !important;
  max-width: 100vw !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

*, *::before, *::after {
  box-sizing: border-box !important;
}

/* Ensure Natural Word Wrapping on Mobile Devices (Prevents Words Cutting Mid-Letter) */
p, span, li, a, h1, h2, h3, h4, h5, h6,
.recipe-card-title, .recipe-card-excerpt, .hero-description, .category-title {
  overflow-wrap: break-word !important;
  word-wrap: break-word !important;
  word-break: normal !important;
  hyphens: manual !important;
}

img, figure, svg, iframe, video {
  max-width: 100% !important;
  height: auto;
}

/* Hide WordPress Core Extra Mobile Navigation Button Overlay (Prevents Double Hamburger Icons) */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close,
.wp-block-navigation-toggle,
button[aria-label="Open menu"],
button[aria-label="Close menu"] {
  display: none !important;
}

.wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) {
  display: block !important;
}

.wp-block-navigation__responsive-container {
  position: static !important;
  background: transparent !important;
  box-shadow: none !important;
  width: auto !important;
  height: auto !important;
}

/* Mobile Hamburger Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 32px;
  height: 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001;
}

.hamburger-bar {
  width: 100%;
  height: 3px;
  background-color: #1e293b;
  border-radius: 3px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav-cta {
  display: none;
}

/* Hide text Site Title & Tagline when Custom Logo is present or Display Site Title is unticked */
.has-custom-logo .wp-block-site-title,
.has-custom-logo .wp-block-site-tagline,
.has-custom-logo .site-title-text,
.has-custom-logo .site-tagline-sub,
.hide-header-text .wp-block-site-title,
.hide-header-text .wp-block-site-tagline,
.hide-header-text .site-title-text,
.hide-header-text .site-tagline-sub {
  display: none !important;
}

/* FIX BLANK GAPS: Collapse Empty Ad Slots, Empty Paragraphs & Large Spacer Blocks */
.single-recipe-main-content p:empty,
.single-recipe-main-content div:empty,
.entry-content p:empty,
.entry-content div:empty,
.code-block:empty,
.ai-viewport-1:empty,
.ai-viewport-2:empty,
.ai-viewport-3:empty,
div[class*="code-block"]:empty,
div[class*="ai-"]:empty,
.adsbygoogle:empty {
  display: none !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* Ensure Post Featured Image & Article Images Have Clean 16px - 20px Spacing */
.single-recipe-main-content .wp-block-post-featured-image,
.wp-block-post-featured-image {
  margin-top: 16px !important;
  margin-bottom: 20px !important;
}

.single-recipe-main-content .wp-block-post-content img,
.single-recipe-main-content .wp-block-post-content figure,
.single-recipe-main-content img,
.single-recipe-main-content figure {
  margin-top: 12px !important;
  margin-bottom: 20px !important;
  border-radius: 16px;
  max-width: 100%;
  height: auto;
}

.single-recipe-main-content figcaption,
.entry-content figcaption,
.wp-block-image figcaption {
  margin-top: -12px !important;
  margin-bottom: 16px !important;
  color: #64748b;
  font-size: 0.875rem;
  text-align: center;
}

/* Minimize Large Spacer Blocks in Single Articles */
.wp-block-spacer {
  height: 16px !important;
  margin: 0 !important;
}

/* Top Announcement Bar */
.top-announcement-bar {
  background: linear-gradient(90deg, #e85d75 0%, #ff6b8b 50%, #ffb703 100%);
  color: #ffffff;
  text-align: center;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  max-width: 100vw;
  box-sizing: border-box;
}

/* Header Navbar Styling */
.site-header-wrapper {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #f1f5f9;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
  max-width: 100vw;
  box-sizing: border-box;
}

.site-header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-sizing: border-box;
}

.site-branding-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

/* Prominent Custom Logo Image Sizing */
.wp-block-site-logo img,
.custom-logo,
.site-branding-logo img {
  max-height: 75px !important;
  width: auto !important;
  max-width: 280px !important;
  border-radius: 10px;
  object-fit: contain !important;
}

.site-logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #e85d75, #ff6b8b);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(232, 93, 117, 0.3);
  flex-shrink: 0;
}

.wp-block-site-title a,
.site-title-text {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  line-height: 1.1;
  text-decoration: none;
}

.site-title-text span {
  color: #e85d75;
}

.wp-block-site-tagline,
.site-tagline-sub {
  font-size: 0.75rem;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  margin-top: 2px;
}

/* Image Fallbacks & Styling */
.hero-image-wrapper img, .recipe-card-thumb img {
  background: linear-gradient(135deg, #e85d75 0%, #ff6b8b 50%, #ffb703 100%);
  min-height: 200px;
  object-fit: cover;
  max-width: 100%;
}

/* Slideable Hero Carousel */
.hero-slider-section {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, #fff0f3 0%, #ffffff 100%);
  padding: 60px 0;
  max-width: 100vw;
}

.hero-slider-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.hero-slide {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  animation: fadeIn 0.5s ease-in-out forwards;
}

.hero-slide.active {
  display: grid;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-content h1 {
  font-size: 3rem;
  line-height: 1.15;
  color: #1e293b;
  margin-bottom: 20px;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

.hero-content h1 span {
  color: #e85d75;
  background: linear-gradient(135deg, #e85d75, #ff6b8b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-description {
  font-size: 1.125rem;
  color: #64748b;
  margin-bottom: 28px;
}

.hero-meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

.hero-pill {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 600;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}

.hero-image-wrapper {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(232, 93, 117, 0.2);
  max-width: 100%;
}

.hero-image-wrapper img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.hero-image-wrapper:hover img {
  transform: scale(1.03);
}

.hero-slider-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 32px;
}

.slider-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
  transition: all 0.2s ease;
}

.slider-btn:hover {
  background: #e85d75;
  color: #ffffff;
  border-color: #e85d75;
}

.slider-dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #cbd5e1;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dot.active {
  width: 32px;
  border-radius: 6px;
  background: #e85d75;
}

/* Category Grid Section */
.categories-section {
  padding: 80px 0;
  background: #ffffff;
  max-width: 100vw;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 50px auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.section-subtitle {
  color: #e85d75;
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.section-title {
  font-size: 2.25rem;
  margin-bottom: 12px;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 24px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.category-card {
  background: #f8fafc;
  border: 1px solid #f1f5f9;
  border-radius: 20px;
  padding: 28px 20px;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.category-card:hover {
  transform: translateY(-6px);
  background: #ffffff;
  box-shadow: 0 16px 32px rgba(232, 93, 117, 0.12);
  border-color: #fde8ed;
}

.category-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  margin: 0 auto 16px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: #fff0f3;
  color: #e85d75;
  transition: all 0.3s ease;
}

.category-card:hover .category-icon {
  background: #e85d75;
  color: #ffffff;
  transform: scale(1.1);
}

.category-title {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 6px;
  color: #1e293b;
}

.category-count {
  font-size: 0.8125rem;
  color: #64748b;
  font-weight: 500;
}

/* Recipes Card Grid */
.recipes-section {
  padding: 80px 0;
  background: #f8fafc;
  max-width: 100vw;
}

.recipe-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

.recipe-card {
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.recipe-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 36px rgba(30, 41, 59, 0.1);
}

.recipe-card-thumb {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.recipe-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.recipe-card:hover .recipe-card-thumb img {
  transform: scale(1.06);
}

.recipe-card-badge {
  position: absolute;
  top: 16px;
  left: 16px;
}

.recipe-card-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.recipe-card-title {
  font-size: 1.35rem;
  margin-bottom: 10px;
  line-height: 1.3;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

.recipe-card-excerpt {
  color: #64748b;
  font-size: 0.9375rem;
  margin-bottom: 20px;
  flex-grow: 1;
}

.recipe-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 1px solid #f1f5f9;
  font-size: 0.84rem;
  color: #64748b;
}

/* CTA Newsletter Banner */
.cta-banner-section {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  color: #ffffff;
  padding: 80px 0;
  position: relative;
  overflow: hidden;
  max-width: 100vw;
  box-sizing: border-box;
}

.cta-banner-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
  box-sizing: border-box;
}

.cta-banner-container h2 {
  font-size: 2.5rem;
  color: #ffffff;
  margin-bottom: 16px;
  line-height: 1.2;
  word-break: normal !important;
  overflow-wrap: break-word !important;
}

.cta-form-box {
  display: flex;
  gap: 12px;
  margin-top: 24px;
  max-width: 100%;
  box-sizing: border-box;
}

.cta-input {
  flex: 1;
  min-width: 0;
  padding: 14px 20px;
  border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.2);
  outline: none;
  font-size: 0.95rem;
  box-sizing: border-box;
  max-width: 100%;
}

/* Single Recipe 70/30 Split Layout */
.single-recipe-container {
  max-width: 1240px;
  margin: 40px auto 80px auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 7fr 3fr;
  gap: 40px;
  box-sizing: border-box;
}

.recipe-card-interactive {
  background: #ffffff;
  border: 2px solid #fde8ed;
  border-radius: 24px;
  padding: 36px;
  box-shadow: 0 12px 32px rgba(232, 93, 117, 0.08);
  margin: 32px 0;
  box-sizing: border-box;
}

.interactive-ingredients-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.ingredient-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 1.05rem;
  cursor: pointer;
}

.ingredient-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: #e85d75;
}

.ingredient-item.checked span {
  text-decoration: line-through;
  color: #94a3b8;
}

/* Servings Multiplier */
.servings-controller {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff0f3;
  padding: 8px 16px;
  border-radius: 9999px;
  width: fit-content;
}

.servings-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid #e85d75;
  color: #e85d75;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sidebar Widgets */
.sidebar-widget {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 28px;
  margin-bottom: 32px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.03);
  box-sizing: border-box;
}

.widget-title {
  font-size: 1.25rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid #fff0f3;
  position: relative;
}

.widget-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 40px;
  height: 2px;
  background: #e85d75;
}

/* Comprehensive Responsive Media Queries */
@media (max-width: 992px) {
  .hero-slide { grid-template-columns: 1fr; gap: 24px; }
  .single-recipe-container { grid-template-columns: 1fr; gap: 32px; }
  .cta-banner-container { grid-template-columns: 1fr; gap: 32px; text-align: center; }
  .cta-banner-container h2 { font-size: 2rem !important; }
}

@media (max-width: 768px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  .site-header-container {
    padding: 12px 16px;
    position: relative;
  }

  .wp-block-site-logo img,
  .custom-logo,
  .site-branding-logo img {
    max-height: 55px !important;
    max-width: 180px !important;
  }

  /* Hamburger Toggle Display */
  .mobile-menu-toggle {
    display: flex !important;
  }

  .desktop-header-cta {
    display: none !important;
  }

  /* Mobile Slide-Out Drawer Navigation */
  .site-navigation-menu {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    width: 280px !important;
    height: 100vh !important;
    background: #ffffff !important;
    box-shadow: -10px 0 30px rgba(0,0,0,0.15) !important;
    padding: 80px 24px 40px 24px !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 9999 !important;
  }

  .site-navigation-menu.active {
    right: 0 !important;
  }

  .primary-menu-nav {
    flex-direction: column !important;
    gap: 16px !important;
    align-items: flex-start !important;
  }

  .primary-menu-nav a {
    font-size: 1.15rem !important;
    padding: 8px 0 !important;
    width: 100% !important;
    border-bottom: 1px dashed #f1f5f9 !important;
  }

  .mobile-nav-cta {
    display: block !important;
    margin-top: auto !important;
    width: 100% !important;
  }

  /* Animated X Close Button Transformation */
  .mobile-menu-toggle.active .hamburger-bar:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
  }

  .mobile-menu-toggle.active .hamburger-bar:nth-child(2) {
    opacity: 0;
  }

  .mobile-menu-toggle.active .hamburger-bar:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
  }

  .hero-slider-section {
    padding: 36px 0;
  }

  .hero-slider-container {
    padding: 0 16px;
  }

  .hero-content h1 {
    font-size: 1.85rem !important;
    margin-bottom: 14px;
  }

  .hero-description {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .hero-meta-pills {
    gap: 8px;
    margin-bottom: 20px;
  }

  .hero-pill {
    padding: 4px 12px;
    font-size: 0.8rem;
  }

  .hero-image-wrapper img {
    height: 260px;
  }

  .categories-section, .recipes-section, .cta-banner-section {
    padding: 48px 0;
  }

  .categories-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)) !important;
    gap: 16px !important;
    padding: 0 16px !important;
  }

  .recipe-cards-grid {
    grid-template-columns: 1fr !important;
    padding: 0 16px !important;
    gap: 24px !important;
  }

  .cta-banner-container {
    padding: 0 16px !important;
    grid-template-columns: 1fr !important;
  }

  .cta-banner-container h2 {
    font-size: 1.65rem !important;
    line-height: 1.25 !important;
  }

  .cta-banner-container p {
    font-size: 0.95rem !important;
  }

  /* Fix Form Box Side-by-Side Overflow on Mobile */
  .cta-form-box {
    flex-direction: column !important;
    width: 100% !important;
    gap: 10px !important;
  }

  .cta-input {
    width: 100% !important;
    font-size: 0.9rem !important;
  }

  .cta-form-box button {
    width: 100% !important;
    justify-content: center !important;
  }

  .site-footer-wrapper {
    padding: 48px 16px 24px 16px !important;
  }
}
