/*
Theme Name: Healthy Food Theme
Theme URI: 
Author: Your Name
Author URI: 
Description: A custom WordPress theme converted from the Healthy Food HTML template.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: healthy-food
*/

/* ========================================
   Sticky Header with Glassmorphism Effect
   ======================================== */

/* Base header: relative positioning for normal flow */
.th-header.header-layout1 {
    position: relative;
    width: 100%;
    z-index: 999;
}

/* Sticky wrapper — transitions smoothly when scrolled */
.sticky-wrapper {
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    z-index: 999;
}

/* When scrolled: fixed + glassmorphism */
.sticky-wrapper.is-sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999;
    animation: slideDown 0.5s ease forwards;

    /* ---- Glassmorphism ---- */
    background: rgba(255, 255, 255, 0.15);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

/* Slide-down entrance animation */
@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Menu area adjustments when sticky */
.sticky-wrapper.is-sticky .menu-area {
    padding: 10px 0;
    transition: padding 0.3s ease;
}

/* Normal menu area padding */
.menu-area {
    padding: 15px 0;
    transition: padding 0.3s ease;
}

/* Navigation link styling on glass background */
.sticky-wrapper.is-sticky .main-menu ul>li>a {
    color: #1b261b;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
}

.sticky-wrapper.is-sticky .main-menu ul>li>a:hover {
    color: #008000;
}

/* Logo adjustments when sticky */
.sticky-wrapper.is-sticky .header-logo img {
    max-height: 50px;
    transition: max-height 0.3s ease;
}

.header-logo img {
    transition: max-height 0.3s ease;
}

/* Header top bar hides when scrolled (optional interaction) */
.th-header.header-layout1 .header-top {
    transition: all 0.3s ease;
}

/* Button styling adjustments on glass */
.sticky-wrapper.is-sticky .th-btn.style4 {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Mobile menu toggle on glass */
.sticky-wrapper.is-sticky .th-menu-toggle {
    color: #1b261b;
}

/* Spacer element to prevent content jump */
.sticky-spacer {
    display: none;
}

.sticky-spacer.active {
    display: block;
}

/* ========================================
   Home Page Sections & CSS Hover Effects
   ======================================== */

/* Counter Section */
.counter-card-wrap {
    position: relative;
    overflow: hidden;
}

.counter-card-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #008000, #00a000, #66cc66, #00a000, #008000);
    border-radius: 20px 20px 0 0;
}

/* Process Cards */
.process-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 25px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.05);
    height: 100%;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.process-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1) !important;
}

.process-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #008000, #00a000);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.process-card:hover::after {
    transform: scaleX(1);
}

/* Gallery Cards (CSS replacement for inline JS) */
.gallery-card {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease-in-out !important;
}

.gallery-card:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
}

.gallery-card img {
    transition: transform 0.5s ease;
}

.gallery-card:hover img {
    transform: scale(1.05);
}

/* Testimonial Cards (CSS replacement for inline JS) */
.testimonial-card {
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), box-shadow 0.3s ease-in-out !important;
}

.testimonial-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08) !important;
}

/* Hero Text */
.hero-text {
    font-family: 'DM Sans', sans-serif;
}

/* Button Group */
.btn-group {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.th-btn.style3 {
    background: transparent;
    border: 2px solid #008000;
    color: #008000;
}

.th-btn.style3:hover {
    background: #008000;
    color: #fff;
}

/* FAQ Accordion */
.accordion-button:not(.collapsed) {
    color: #008000;
    background: transparent;
}

.accordion-button:focus {
    box-shadow: none;
}

.accordion-card:has(.accordion-button:not(.collapsed)) {
    border-color: #008000 !important;
}

/* CTA section pulsing button */
#buy-now .th-btn.style4 {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(255, 255, 255, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}

/* Section smooth reveal */
section,
.overflow-hidden {
    opacity: 1;
}

/* ========================================
   Accessibility, Touch Targets & Mobile
   ======================================== */

/* Ensure dark gray for text descriptions for WCAG AA compliance (4.5:1 ratio) */
.gallery-card p,
.process-card p,
.sec-text,
.about-desc {
    color: #555 !important;
}

.footer-widget .about-text {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Touch Targets: minimum 44px clickable target size */
.social-links a,
.th-social a {
    min-width: 44px !important;
    min-height: 44px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 10px !important;
    transition: transform 0.2s ease;
}

.social-links a:hover,
.th-social a:hover {
    transform: scale(1.15);
}

.th-menu-toggle {
    min-width: 44px !important;
    min-height: 44px !important;
}

/* Sticky Mobile CTA Bar */
.sticky-mobile-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 -4px 15px rgba(0,0,0,0.1);
    padding: 12px 20px;
    z-index: 9999;
    display: none;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(0,128,0,0.1);
}

.sticky-mobile-cta-price {
    font-size: 16px;
    font-weight: 700;
    color: #008000;
}

.sticky-mobile-cta-btn {
    background: #008000;
    color: #fff;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,128,0,0.2);
}

/* About Section Year Counter styling */
.year-counter_text {
    color: #008000 !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 1px;
}

.year-counter_number {
    color: #008000 !important;
    font-weight: 700;
}

/* Keep individual small leaves opaque, but make the main large branch on the left (hero-shape4) soft and translucent so it doesn't block text readability */
.hero-1 .hero-shape1 img,
.hero-1 .hero-shape2 img,
.hero-1 .hero-shape3 img {
    opacity: 1 !important;
}

.hero-1 .hero-shape4 img {
    opacity: 0.25 !important;
}

/* Mobile Header Book Title styling */
.header-title-col {
    padding: 0 0.5rem;
}

.header-book-title {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    font-size: clamp(0.75rem, 3.2vw, 1.1rem);
    color: #008000;
    line-height: 1.15;
    text-transform: uppercase;
    letter-spacing: 0.03rem;
    text-align: center;
    display: inline-block;
    transition: color 0.3s ease, transform 0.2s ease;
}

.header-book-title:hover {
    color: #00a000;
    transform: scale(1.02);
}

/* Responsive Media Queries */
@media (max-width: 767px) {
    /* Show sticky mobile CTA bar only on small screens */
    .sticky-mobile-cta {
        display: flex;
    }
    
    /* Extra padding at bottom of main to prevent sticky bar overlap */
    main {
        padding-bottom: 75px !important;
    }

    .counter-card-wrap {
        padding: 25px 15px !important;
        gap: 15px !important;
    }

    .counter-card {
        min-width: 120px !important;
    }

    .counter-card div:first-child {
        font-size: 32px !important;
    }

    .sec-title {
        font-size: 28px !important;
    }

    #buy-now .sec-title {
        font-size: 28px !important;
    }

    .choose-feature {
        margin-bottom: 15px;
    }

    .gallery-card img {
        height: 250px !important;
    }
}

/* ========================================
   Font Awesome Free Icon Compatibility Fix
   ======================================== */
:root {
    --icon-font: "Font Awesome 6 Free" !important;
}

/* Ensure CSS pseudo-elements using Font Awesome Free render correctly as solid icons */
.scroll-top::after,
.th-mobile-menu ul .th-item-has-children > a::after,
.th-mobile-menu ul .th-item-has-children > a .th-mean-expand::before {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
}