/* FoliageGrowHub - Custom Styles */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Hide scrollbar for horizontal scroll sections */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

/* Diagonal Clip Path */
.clip-diagonal {
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0 100%);
}

/* Header Navigation Styles */
#headerNav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: #1a3a2f;
    z-index: 50;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

#headerNav.scrolled {
    background: rgba(26, 58, 47, 0.98);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #7db8a5;
    transition: width 0.3s ease;
}

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

/* Mobile Menu */
#mobileMenuBtn {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    gap: 6px;
}

#mobileMenuBtn span {
    display: block;
    width: 24px;
    height: 2px;
    background: #f5f7f2;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#mobileMenuBtn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

#mobileMenuBtn.active span:nth-child(2) {
    opacity: 0;
}

#mobileMenuBtn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

#mobileMenu {
    display: none;
    position: fixed;
    top: 80px;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1a3a2f;
    z-index: 45;
    overflow-y: auto;
}

#mobileMenu.active {
    display: block;
}

body.menu-open {
    overflow: hidden;
}

/* Plant Cards Hover Effect */
.plant-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.plant-card:hover {
    box-shadow: 0 20px 40px rgba(26, 58, 47, 0.15);
}

/* Care Cards Animation */
.care-card {
    transition: transform 0.3s ease;
}

.care-card:hover {
    transform: translateY(-5px);
}

/* Accordion Styles */
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordion-content.active {
    max-height: 1000px;
}

.accordion-icon {
    transition: transform 0.3s ease;
}

.accordion-icon.rotated {
    transform: rotate(45deg);
}

/* Form Styles */
select, input, textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

select:focus, input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(77, 124, 111, 0.2);
}

/* Button Hover Effects */
button, .btn {
    transition: all 0.3s ease;
}

/* Link Underline Animation */
.animated-link {
    position: relative;
}

.animated-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transition: width 0.3s ease;
}

.animated-link:hover::after {
    width: 100%;
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.loading {
    animation: pulse 2s ease-in-out infinite;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease forwards;
}

/* Stagger Animation for Cards */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .desktop-nav {
        display: none !important;
    }
    
    #mobileMenuBtn {
        display: flex;
    }
}

@media (max-width: 768px) {
    #headerNav {
        height: 70px;
    }
    
    #mobileMenu {
        top: 70px;
    }
    
    main {
        padding-top: 70px;
    }
    
    .clip-diagonal {
        display: none;
    }
}

/* Custom Selection */
::selection {
    background-color: rgba(125, 184, 165, 0.3);
    color: #1a3a2f;
}

/* Focus States for Accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #7db8a5;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    #headerNav {
        display: none;
    }
    
    main {
        padding-top: 0;
    }
    
    .hide-scrollbar {
        overflow: visible;
    }
    
    .care-card {
        break-inside: avoid;
    }
}

/* Glassmorphism effect */
.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Text Balance for Better Typography */
h1, h2, h3, h4 {
    text-wrap: balance;
}

/* Smooth Image Loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[loading] {
    opacity: 0;
}

/* Contact Form Specific Styles */
.contact-form input:valid,
.contact-form textarea:valid {
    border-color: #4a7c6f;
}

/* Result Card Animation */
#calculatorResult {
    animation: fadeIn 0.4s ease forwards;
}

/* Mobile Menu Toggle */
.mobile-menu-open {
    overflow: hidden;
}

/* Tooltip Styles */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background-color: #1a3a2f;
    color: #f5f7f2;
    font-size: 12px;
    white-space: nowrap;
    border-radius: 6px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Page Transition */
.page-transition {
    animation: fadeIn 0.5s ease forwards;
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(90deg, #e0e0e0 25%, #f0f0f0 50%, #e0e0e0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}
