/* ===========================
   GrowNestHub Custom Styles
   =========================== */

/* Variables (matching inline styles in index.html) */
:root {
    --color-primary: #2563eb; /* blue-600 */
    --color-accent: #10b981; /* emerald-500 */
    --color-secondary: #6366f1; /* indigo-500 */
    --color-slate-100: #f1f5f9;
    --color-slate-500: #64748b;
    --color-slate-800: #1e293b;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus visible for accessibility */
*:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-to-main {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-accent);
    color: white;
    padding: 0.5rem 1rem;
    z-index: 9999;
    transition: top 0.3s ease;
}

.skip-to-main:focus {
    top: 0;
}

/* Swiper customization */
.swiper-pagination-bullet-active {
    background-color: var(--color-accent) !important;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--color-accent) !important;
}

/* Curved section utilities */
.curved-top {
    border-top-left-radius: 50% 20%;
    border-top-right-radius: 50% 20%;
}

.curved-bottom {
    border-bottom-left-radius: 50% 20%;
    border-bottom-right-radius: 50% 20%;
}

/* Mobile menu styles */
#mobileMenu {
    display: none;
}

#mobileMenu.active {
    display: flex;
}

/* Hamburger menu animation */
#hamburger span {
    transition: all 0.3s ease;
}

#hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#hamburger.active span:nth-child(2) {
    opacity: 0;
}

#hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Form validation states */
input:invalid:focus,
textarea:invalid:focus {
    border-color: #ef4444;
    ring-color: #ef4444;
}

input:valid:focus,
textarea:valid:focus {
    border-color: var(--color-accent);
}

/* Loading spinner for form submission */
.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    /* Reduce padding on mobile */
    section {
        padding: 3rem 0;
    }
    
    /* Stack service cards */
    .service-card {
        margin-bottom: 1.5rem;
    }
}

/* Print styles for better PDF generation */
@media print {
    header,
    footer,
    .skip-to-main,
    #mobileMenu {
        display: none;
    }
    
    a {
        text-decoration: underline;
        color: black;
    }
    
    section {
        page-break-inside: avoid;
    }
}

