/* Custom Styles for BalconyVegGuide */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}


iframe {
    margin: 0 auto;
}

/* Navbar Background on Scroll */
#navbar {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Hero Visual Animation */
.hero-visual {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* Stat Counter Animation */
.stat-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.stat-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Vegetable Card Hover Effect */
.vegetable-card {
    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vegetable-card:hover {
    transform: translateY(-5px);
}

/* Category Tab Active State */
.category-tab {
    background-color: transparent;
    color: #6b7280;
    border: 2px solid transparent;
}

.category-tab.active,
.category-tab:hover {
    background-color: #dcfce7;
    color: #16a34a;
    border-color: #86efac;
}

/* Season Tab Active State */
.season-tab {
    background-color: white;
    color: #6b7280;
    border: 2px solid #e5e7eb;
}

.season-tab.active {
    background-color: #22c55e;
    color: white;
    border-color: #22c55e;
    transform: scale(1.05);
}

/* Accordion Animation */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
}

.accordion-content.open {
    max-height: 2000px;
    padding-top: 1rem;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-icon.rotated {
    transform: rotate(45deg);
}

/* FAQ Animation */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease;
}

.faq-answer.open {
    max-height: 500px;
    padding-top: 0.5rem;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-icon.rotated {
    transform: rotate(45deg);
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Mobile Menu Animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

#mobile-menu.open {
    max-height: 500px;
}

/* Page Transition */
.page-content {
    animation: fadeIn 0.5s ease-out;
}

/* Unique Diagonal Split Effect */
.diagonal-split {
    position: relative;
    overflow: hidden;
}

.diagonal-split::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: white;
    clip-path: polygon(0 0, 100% 100%, 100% 0);
    z-index: 1;
}

/* Zigzag Layout Animation */
.zigzag-item {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.zigzag-item:nth-child(even) {
    transform: translateX(50px);
}

.zigzag-item.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Contact Form Styles */
.contact-form input,
.contact-form textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

/* Button Hover Effect */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Topic pill buttons (homepage hero + topic pages) */
.topic-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.85rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 600;
    white-space: nowrap;
    background: rgba(255, 255, 255, 0.92);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.35);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: blur(6px);
}

.topic-pill:hover {
    background: #dcfce7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.topic-pill-active {
    background: #16a34a;
    color: #fff;
    border-color: #15803d;
}

.topic-pill-emoji {
    font-size: 1rem;
    line-height: 1;
}

#hero-topic-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.topic-card-active {
    cursor: default;
    box-shadow: inset 0 0 0 2px #22c55e;
}

.topic-hero-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero-visual {
        margin-bottom: 2rem;
    }

    .stat-card {
        margin-bottom: 1rem;
    }

    /* Topic pills: 1/4/7 full row; 2+3 and 5+6 half row each */
    #hero-topic-pills,
    .topic-hero-pills {
        width: 100%;
        justify-content: flex-start;
    }

    #hero-topic-pills .topic-pill,
    .topic-hero-pills .topic-pill {
        display: flex;
        justify-content: center;
        box-sizing: border-box;
    }

    #hero-topic-pills .topic-pill:nth-child(1),
    #hero-topic-pills .topic-pill:nth-child(4),
    #hero-topic-pills .topic-pill:nth-child(7),
    .topic-hero-pills .topic-pill:nth-child(1),
    .topic-hero-pills .topic-pill:nth-child(4),
    .topic-hero-pills .topic-pill:nth-child(7) {
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
    }

    #hero-topic-pills .topic-pill:nth-child(2),
    #hero-topic-pills .topic-pill:nth-child(3),
    #hero-topic-pills .topic-pill:nth-child(5),
    #hero-topic-pills .topic-pill:nth-child(6),
    .topic-hero-pills .topic-pill:nth-child(2),
    .topic-hero-pills .topic-pill:nth-child(3),
    .topic-hero-pills .topic-pill:nth-child(5),
    .topic-hero-pills .topic-pill:nth-child(6) {
        flex: 0 0 calc(50% - 0.25rem);
        width: calc(50% - 0.25rem);
        max-width: calc(50% - 0.25rem);
    }
}

/* Print Styles */
@media print {
    nav,
    footer,
    .btn,
    button {
        display: none;
    }
}