/*
Theme Name: POG Loving Ministry
Theme URI: https://www.thepoglovingministry.com/
Author: Carlou Benedict Luchavez
Description: A WordPress theme for POG Loving Ministry.
Version: 1.0.0
Author URI: https://carlou-benedict-luchavez.vercel.app/
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: poglovingministry
*/

:root {
  --background: 222 47% 6%;
  --foreground: 45 30% 90%;

  --card: 222 40% 10%;
  --card-foreground: 45 30% 90%;

  --popover: 222 40% 10%;
  --popover-foreground: 45 30% 90%;

  --primary: 43 72% 55%;
  --primary-foreground: 222 47% 6%;

  --secondary: 222 30% 16%;
  --secondary-foreground: 45 30% 90%;

  --muted: 222 30% 14%;
  --muted-foreground: 220 15% 55%;

  --accent: 43 72% 55%;
  --accent-foreground: 222 47% 6%;

  --destructive: 0 84.2% 60.2%;
  --destructive-foreground: 210 40% 98%;

  --border: 222 30% 18%;
  --input: 222 30% 18%;
  --ring: 43 72% 55%;

  --radius: 0.5rem;

  --gold: 43 72% 55%;
  --gold-light: 43 80% 70%;
  --gold-dark: 43 65% 40%;
  --navy: 222 47% 6%;
  --navy-light: 222 30% 16%;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  border-color: hsl(var(--border) / 1);
}

body {
  background-color: hsl(var(--background) / 1);
  color: hsl(var(--foreground) / 1);
  font-family: 'Lato', sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
}

/* Gradients */
.text-gradient-gold {
  background: linear-gradient(135deg, hsl(43 80% 70%), hsl(43 72% 55%), hsl(43 65% 40%));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-gold {
  background: linear-gradient(135deg, hsl(43 80% 70%), hsl(43 72% 55%), hsl(43 65% 40%));
}

.bg-gradient-navy {
  background: linear-gradient(180deg, hsl(222 47% 6%), hsl(222 40% 10%));
}

.border-gradient-gold {
  border-image: linear-gradient(135deg, hsl(43 80% 70%), hsl(43 65% 40%)) 1;
}

.shadow-gold {
  box-shadow: 0 0 30px -5px hsl(43 72% 55% / 0.2);
}

/* Layout Classes (Custom Tailwind Replacements) */
.container {
  width: 100%;
  margin-right: auto;
  margin-left: auto;
  padding-right: 1rem;
  padding-left: 1rem;
}

@media (min-width: 640px) {
  .container { max-width: 640px; }
}
@media (min-width: 768px) {
  .container { max-width: 768px; }
}
@media (min-width: 1024px) {
  .container { max-width: 1024px; }
}
@media (min-width: 1280px) {
  .container { max-width: 1280px; }
}
@media (min-width: 1536px) {
  .container { max-width: 1536px; }
}

/* Grid & Layout Utilities */
.grid { display: grid; }
.items-center { align-items: center; }
.gap-8 { gap: 2rem; }
.gap-12 { gap: 3rem; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }

@media (min-width: 768px) {
  .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Visibility Utilities */
.hidden { display: none !important; }
@media (min-width: 768px) {
  .md\:hidden { display: none !important; }
  .md\:flex { display: flex !important; }
}
@media (min-width: 1024px) {
  .lg\:hidden { display: none !important; }
  .lg\:flex { display: flex !important; }
}

/* Navbar */
/* Navbar positioning */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
}

.navbar {
  background-color: hsla(var(--background) / 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid hsl(var(--border) / 1);
  height: 80px;
  display: flex;
  align-items: center;
}

/* Adjust for WordPress Admin Bar */
.admin-bar .site-header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .site-header {
    top: 46px;
  }
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-branding a {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: opacity 0.2s;
}

.site-branding a:hover {
  opacity: 0.8;
}

.site-logo {
  height: 56px;
  width: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid hsl(var(--primary) / 0.5);
}

.site-title {
  font-size: 1.25rem;
  font-weight: bold;
  margin-left: 0.75rem;
  letter-spacing: -0.01em;
}

.nav-links {
  display: none;
  list-style: none;
  gap: 1.5rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .nav-links { display: flex; }
}

@media (max-width: 1023px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    background-color: hsla(var(--background) / 0.98);
    backdrop-filter: blur(16px);
    padding: 2rem;
    gap: 2rem;
    border-bottom: 1px solid hsl(var(--border) / 1);
    align-items: center;
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
    z-index: 100;
  }
  
  .nav-links.is-open {
    display: flex !important;
  }
}

.nav-link {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: hsl(var(--muted-foreground) / 1);
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  padding: 0.5rem 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, hsl(var(--primary) / 1), transparent);
  transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
  width: 100%;
}

.nav-link:hover, .nav-link.active {
  color: hsl(var(--primary) / 1);
}

/* Dropdown Styles */
.nav-item-dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
}

.dropdown-icon {
  width: 14px;
  height: 14px;
  transition: transform 0.3s ease;
}

.nav-item-dropdown:hover .dropdown-icon {
  transform: rotate(180deg);
}

/* Highly specific overrides to fix "broken" dropdown */
#primary-menu .dropdown-menu,
#primary-menu ul.dropdown-menu,
.nav-item-dropdown .dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  transform: translateY(10px);
  background: hsla(var(--card) / 0.98) !important;
  backdrop-filter: blur(16px);
  border: 1px solid hsla(var(--gold) / 0.3) !important;
  border-radius: 0.75rem;
  padding: 0.5rem !important;
  min-width: 200px;
  list-style: none !important;
  list-style-type: none !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0.125rem !important;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 20px 40px -15px rgba(0,0,0,0.6) !important;
  z-index: 10000 !important;
  margin: 0 !important;
}

#primary-menu .dropdown-menu li,
#primary-menu .dropdown-menu li::before,
#primary-menu .dropdown-menu li::after,
.nav-item-dropdown .dropdown-menu li {
  list-style: none !important;
  list-style-type: none !important;
  margin: 0 !important;
  padding: 0 !important;
  content: none !important;
  display: block !important;
  background: none !important;
}

.nav-item-dropdown:hover .dropdown-menu {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateX(-50%) translateY(0) !important;
}

#primary-menu .dropdown-menu li a.dropdown-link,
#primary-menu .dropdown-menu li a.dropdown-link:link,
#primary-menu .dropdown-menu li a.dropdown-link:visited,
.dropdown-link {
  display: block !important;
  padding: 0.75rem 1rem !important;
  color: hsl(var(--muted-foreground) / 1) !important;
  text-decoration: none !important;
  font-size: 0.7rem !important;
  text-transform: uppercase !important;
  letter-spacing: 0.15em !important;
  border-radius: 0.5rem !important;
  transition: all 0.2s ease !important;
  white-space: nowrap !important;
  text-align: center !important;
  background: transparent !important;
}

#primary-menu .dropdown-menu li a.dropdown-link:hover {
  background: hsla(var(--primary) / 0.1) !important;
  color: hsl(var(--primary) / 1) !important;
}

.dropdown-link:hover {
  background: hsla(var(--primary) / 0.1);
  color: hsl(var(--primary) / 1);
}

@media (max-width: 1023px) {
  .nav-item-dropdown {
    width: 100%;
    text-align: center;
  }
  
  .dropdown-toggle {
    justify-content: center;
  }
  
  .dropdown-menu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0.5rem 0 0 0;
    display: none;
  }
  
  .nav-item-dropdown.is-open .dropdown-menu {
    display: flex;
  }
  
  .nav-item-dropdown.is-open .dropdown-icon {
    transform: rotate(180deg);
  }
}

/* Button style for the last menu item */
.nav-cta {
  background: linear-gradient(135deg, hsl(var(--gold-light)), hsl(var(--gold)), hsl(var(--gold-dark)));
  color: hsl(var(--primary-foreground) / 1) !important;
  padding: 0.5rem 1.25rem;
  border-radius: 0.375rem;
  font-weight: bold;
  box-shadow: 0 0 20px -5px hsl(var(--gold) / 0.4);
  transition: all 0.3s ease;
}

.nav-cta:hover {
  opacity: 0.9;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px -5px hsl(var(--gold) / 0.6);
}

.nav-cta i,
.btn-animated-icon i {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-cta:hover i[data-lucide="arrow-right"],
.btn-animated-icon:hover i[data-lucide="arrow-right"],
.nav-cta:hover i[data-lucide="send"],
.btn-animated-icon:hover i[data-lucide="send"] {
  transform: translateX(4px);
}

.nav-cta:hover i[data-lucide="arrow-left"],
.btn-animated-icon:hover i[data-lucide="arrow-left"] {
  transform: translateX(-4px);
}

.nav-cta:hover i[data-lucide="arrow-up"],
.nav-cta:hover i[data-lucide="arrow-up-right"],
.btn-animated-icon:hover i[data-lucide="arrow-up"],
.btn-animated-icon:hover i[data-lucide="arrow-up-right"] {
  transform: translate(2px, -2px);
}

.nav-cta:hover i[data-lucide="arrow-down"],
.btn-animated-icon:hover i[data-lucide="arrow-down"] {
  transform: translateY(4px);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: none; /* Hidden by default (desktop) */
  background: none;
  border: none;
  color: hsl(var(--foreground) / 1);
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s;
  z-index: 101;
}

@media (max-width: 1023px) {
  .menu-toggle {
    display: block; /* Show only on mobile */
  }
}

.menu-toggle:hover {
  color: hsl(var(--primary) / 1);
}

/* Simple classes to replace @apply */
.text-primary { color: hsl(var(--primary) / 1); }
.text-muted-foreground { color: hsl(var(--muted-foreground) / 1); }
.font-display { font-family: 'Playfair Display', serif; }
.font-body { font-family: 'Lato', sans-serif; }

/* Premium 3D Book Experience */
.book-wrapper {
  position: relative;
  perspective: 1500px; /* Increased for deeper 3D feel */
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  animation: bookFloat 6s ease-in-out infinite;
}

.book-3d {
  width: 100%;
  max-width: 310px;
  border-radius: 4px 8px 8px 4px;
  box-shadow: 
    2px 5px 15px rgba(0,0,0,0.4),
    -2px 0 5px rgba(255,255,255,0.05);
  transform: rotateY(-20deg) rotateX(5deg);
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
  position: relative;
  z-index: 2;
}

.book-shadow {
  position: absolute;
  width: 90%;
  height: 30px;
  background: radial-gradient(ellipse, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0) 70%);
  bottom: -40px;
  border-radius: 50%;
  filter: blur(20px);
  transform: rotateX(70deg);
  transition: all 0.6s ease;
  z-index: 1;
}

.book-wrapper:hover .book-3d {
  transform: rotateY(-5deg) rotateX(2deg) scale(1.05);
}

.book-wrapper:hover .book-shadow {
  transform: rotateX(70deg) scale(1.1);
  opacity: 0.8;
  filter: blur(25px);
}

@keyframes bookFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-15px); }
}

/* Enhanced Glow */
.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150%;
  height: 150%;
  background: radial-gradient(circle at center, hsla(var(--gold) / 0.15), transparent 60%);
  transform: translate(-50%, -50%);
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: screen;
  animation: glowPulse 8s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.4; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.7; transform: translate(-50%, -50%) scale(1.1); }
}

.hero-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-20%, -50%);
  width: 120%;
  height: 120%;
  background: radial-gradient(circle, hsla(var(--primary) / 0.15), transparent 70%);
  z-index: -1;
  pointer-events: none;
}

/* Scroll Reveal Animations */
.reveal {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
}

.reveal.reveal-up { transform: translateY(40px); }
.reveal.reveal-down { transform: translateY(-40px); }
.reveal.reveal-left { transform: translateX(40px); }
.reveal.reveal-right { transform: translateX(-40px); }

.reveal.active {
  opacity: 1;
  transform: translate(0, 0) !important;
}

/* Staggered Delays */
.reveal-delay-100 { transition-delay: 0.1s; }
.reveal-delay-200 { transition-delay: 0.2s; }
.reveal-delay-300 { transition-delay: 0.3s; }
.reveal-delay-400 { transition-delay: 0.4s; }
.reveal-delay-500 { transition-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Scroll Snap Slider Utilities */
.hide-scrollbar {
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}
.hide-scrollbar::-webkit-scrollbar {
  display: none; /* Chrome, Safari and Opera */
}

/* Premium Card Hover Lift */
.hover-lift {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
}
.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px -15px hsla(var(--gold) / 0.2);
  border-color: hsla(var(--gold) / 0.4);
}

/* Contact Form 7 Custom Styles */
.cf7-contact-wrapper .wpcf7 {
  width: 100%;
}

.cf7-contact-wrapper p {
  margin: 0;
  padding: 0;
}

.cf7-contact-wrapper .wpcf7-form {
  padding: 2.5rem;
  background-color: hsl(var(--secondary) / 1);
  border-radius: 1.5rem;
  border: 1px solid hsl(var(--border) / 1);
  display: flex !important;
  flex-direction: column;
  gap: 1.5rem;
}

.cf7-contact-wrapper .wpcf7-form .cf7-input,
.cf7-contact-wrapper .wpcf7-form .cf7-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  background-color: hsl(var(--card) / 1);
  border: 1px solid hsl(var(--border) / 1);
  border-radius: 0.5rem;
  color: white;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.cf7-contact-wrapper .wpcf7-form .cf7-input:focus,
.cf7-contact-wrapper .wpcf7-form .cf7-textarea:focus {
  border-color: hsl(var(--primary) / 1);
}

.cf7-contact-wrapper .wpcf7-form .cf7-textarea {
  resize: none;
}

.cf7-contact-wrapper .wpcf7-form span.wpcf7-form-control-wrap {
  display: block;
}

.cf7-contact-wrapper .wpcf7-form .wpcf7-submit {
  width: 100%;
  padding: 1rem;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
