import { useState } from "react";
import { createFileRoute } from "@tanstack/react-router";
import { Section } from "@/components/page-shell";
import { SubPageLayout } from "@/components/sub-page-layout";

export const Route = createFileRoute("/humidification")({
  head: () => ({
    meta: [
      { title: "Humidification — Promist Misting Systems" },
      { name: "description", content: "Commercial and industrial humidification solutions using high-pressure misting technology." },
      { property: "og:title", content: "Humidification" },
      { property: "og:description", content: "Precision humidification for commercial and industrial environments." },
    ],
  }),
  component: ApplicationsHumidification,
});

interface AccordionSection {
  title: string;
  content: React.ReactNode;
}

const sections: AccordionSection[] = [
  {
    title: "Greenhouse Cooling & Humidification with Misting",
    content: (
      <div className="space-y-4">
        <p><strong>Misting systems are used with enormous advantages to keep the right climate inside greenhouses of any dimension.</strong></p>
        <p>Misting systems (or Fog systems) play an important role in the greenhouse climatic control. Misting systems are also used with enormous advantages to keep the right temperature and humidity in the environment, under conditions of forced or natural ventilation. In summertime the quick evaporation of the fog will cool the greenhouse due to the principle of evaporative cooling, meanwhile it humidifies the environment in case of low relative humidity.</p>
        <p>During the wintertime the system keeps the correct humidity rate preventing the dehydration of the crops caused by heating systems. The environment produced by our system is appropriate for the most delicate crops (ex. the growing of young seedings, the cultivation of tropical plants and in bloom plants) where it is not possible to use traditional spraying methods like standard spraying.</p>
        <p>Fog system works on a pressure of 1000 PSI (70 Bar) and it is designed to produce water droplets smaller than 5-10 microns diameter that, for theirs dwarfish size remains suspended in the air for a long time producing the fog effect.</p>
        <p>Typically all growers have the problem of low humidity and high temperatures. Serious problems occur when the humidity in the greenhouse environment drops below 30% RH. Plants will suffer and typically slow or halt the growing process. In fact, many greenhouses in arid conditions close down for the summer months until ambient temperatures will reduce to an acceptable level.</p>
        <h4 className="font-bold text-brand-red text-base">LOW COST SYSTEMS</h4>
        <p>Very low cost of our systems are an important aspect of misting in greenhouse, if compared to other solutions for the climate control. The energy costs are low, simple and fast installations, considering that the systems are supplied in various solutions or D-I-Y Kits, or by the simple solutions of quick couplings. Our systems are designed to operate with very low costs and with a minimum maintenance.</p>
        <h4 className="font-bold text-brand-red text-base">BENEFITS</h4>
        <ul className="list-disc pl-6 space-y-1">
          <li>Increased general productivity of the greenhouse</li>
          <li>Speeds up plants growth</li>
          <li>Keeping of constant humidity levels</li>
          <li>Lower water consumption for the irrigation</li>
          <li>Growing of a reproduction plants stock in the greenhouse</li>
          <li>Suitable for chemical spreading (fertilizers, insecticides)</li>
          <li>Less humidity need</li>
          <li>The correct micro-climate in any season</li>
          <li>Less shading needed</li>
        </ul>
      </div>
    ),
  },
  {
    title: "Supermarket humidification",
    content: (
      <div className="space-y-4">
        <p><strong>Fresh produces humidification with Misting</strong></p>
        <p>Our misting system re-establishes to optimal values the humidity level, blocking dehydration process, keeping the freshness of food for longer time.</p>
        <p>Our misting system periodically emit an ultra light mist of water directly onto the product, usually for 1 to 5 seconds every 10-15 minutes. Due to their teeny dimensions, these small water droplets evaporate without wetting, keeping humidity and coolness in the environment air, <strong>reducing dehydration and maintaining product weight and condition.</strong></p>
        <h4 className="font-bold text-brand-red text-base">FRUIT AND VEGETABLES</h4>
        <p>Fruit and vegetables are largely composed of water. The loss of freshness is mainly due to a quick dehydration of the product, further to the evaporation of the water. Water evaporates, due to a difference between its values contained into the vegetables and in the surrounding air. By means of a misting system, the humidity level in the air re-establishes its optimal values, blocking the dehydration process. Additionally, a misting system, following the adiabatic principle, reduces the temperatures and cools the products displayed at the counters.</p>
        <h4 className="font-bold text-brand-red text-base">FISH PRODUCTS</h4>
        <p>Fish products are also subjects to the loss of freshness by dehydration, as they are composed of water in the measure higher than 70%. Moreover, the misting system can control the spread of smells in the surrounding areas. Misting system can be easily assembled inside refrigerated displays.</p>
        <h4 className="font-bold text-brand-red text-base">MEAT</h4>
        <p>Some types of meat and cold cuts are subjects to dehydration, too: our fog systems can restore naturally their suitable special microclimate, to preserve or keep seasoning them. Misting system can be easily assembled inside refrigerated displays.</p>
        <h4 className="font-bold text-brand-red text-base">BENEFITS</h4>
        <ul className="list-disc pl-6 space-y-1">
          <li>Dehydration block</li>
          <li>Decrease in the weight loss of the product</li>
          <li>Longer freshness</li>
          <li>The temperature cools naturally down</li>
          <li>It facilitates the process of ripeness of some kinds of fruit</li>
          <li>It controls the spread of odors</li>
        </ul>
      </div>
    ),
  },
  {
    title: "Refrigerated storage humidification",
    content: (
      <div className="space-y-4">
        <p><strong>Cold rooms humidification with Misting</strong></p>
        <p>Our misting system re-establishes to optimal values the humidity level in cold rooms and refrigerated warehouses, blocking dehydration process, keeping the freshness of food for longer time.</p>
        <p>Our misting system periodically emit an ultra light mist of water. Due to their teeny dimensions, these small water droplets evaporate without wetting, keeping humidity and coolness in the environment air, <strong>reducing dehydration and maintaining product weight and condition.</strong></p>
        <h4 className="font-bold text-brand-red text-base">FRUIT AND VEGETABLE</h4>
        <p>Fruit and vegetables are largely composed of water. The loss of freshness is mainly due to a quick dehydration of the product, further to the evaporation of the water. Water evaporates, due to a difference between its values contained into the vegetables and in the surrounding air. By means of a misting system, the humidity level in the air re-establishes its optimal values, blocking the dehydration process.</p>
        <h4 className="font-bold text-brand-red text-base">FISH PRODUCTS</h4>
        <p>Fish products are also subjects to the loss of freshness by dehydration, as they are composed of water in the measure higher than 70%.</p>
        <h4 className="font-bold text-brand-red text-base">MEAT</h4>
        <p>Meat is subject to dehydration, too: our misting systems can restore naturally their suitable special microclimate, to preserve or keep seasoning them. Misting system can be easily assembled inside cold rooms.</p>
        <h4 className="font-bold text-brand-red text-base">BENEFITS</h4>
        <ul className="list-disc pl-6 space-y-1">
          <li>Dehydration block</li>
          <li>Decrease in the weight loss of the product</li>
          <li>Longer freshness</li>
          <li>It controls the spread of odors</li>
        </ul>
      </div>
    ),
  },
  {
    title: "Textile industry humidification",
    content: (
      <div className="space-y-4">
        <p><strong>Textile industry humidification with Misting</strong></p>
        <p>The yarns, until the transformation in tissue, must balance their own moisture and that contained in the surrounding air. A lack of moisture in the air is unpleasantly noticeable. Non air-conditioned factories or with a different humidification system frequently encounter production difficulties during embroidery, weaving and spinning yarns due to breakage and high static electricity levels.</p>
        <p>The American Institute of Textile Technology found that wool, by increasing relative humidity from 60 to 70% during storage and processing, shows a 15% increase of its elasticity, which drastically reduces breakage during processing. Adjusting humidity levels with a misting system increases the tensile strength of all natural fibers, removes static electricity improving the workability of the yarns and fibers, controls the suspended residual and improves comfort of work areas.</p>
        <p>Water is sprayed under pressure by special patented nozzles capable of generating very fine droplets, of less than 10 microns, which are immediately absorbed by the air without wetting surfaces and objects below. The results are significant: low cost of installation and operation, immediately effective.</p>
        <h4 className="font-bold text-brand-red text-base">HUMIDITY AND YARN PROPERTIES</h4>
        <p>Water is an important part of yarns weight. About 7% of dry cotton weight is made by water, in a dry synthetic yarn such as Nylon it is 2-3%. The specific weight of wool is made by water up to 18%.</p>
        <h4 className="font-bold text-brand-red text-base">STATIC ELECTRICITY</h4>
        <p>It is well known in the textile industry that the relative humidity, and hence the moisture regain (content) of textile fiber plays a very important role in the reduction of static electricity. Virtually all textile fibers, when completely dry, have very high electrical resistances. However, as the relative humidity increases, the fibers absorb moisture and their electrical resistance decreases with a consequent reduction electrostatic charges generation.</p>
        <h4 className="font-bold text-brand-red text-base">DUST CONTROL</h4>
        <p>Water is an important part of yarns weight. About 7% of dry cotton weight is made by water, in a dry synthetic yarn such as Nylon it is 2-3%. The specific weight of wool is made by water up to 18%.</p>
        <h4 className="font-bold text-brand-red text-base">EFFECTIVE SOLUTION FOR:</h4>
        <ul className="list-disc pl-6 space-y-1">
          <li>Dry nose and eyes, burning irritation, pain</li>
          <li>Danger of infection, dry nostrils are very sensitive</li>
          <li>Creates headache after light dehydration</li>
          <li>Enhances evaporation and suspension of solvents, paints and glues</li>
          <li>High concentration of airborne dust</li>
          <li>Static Electricity</li>
          <li>Frequent stoppages for repeated failure</li>
        </ul>
      </div>
    ),
  },
  {
    title: "Paper and Press industry humidification",
    content: (
      <div className="space-y-4">
        <h4 className="font-bold text-brand-red text-base">Paper and Press industry humidification with Misting</h4>
        <p><strong>Paper production, such as its storage, benefits from environment control.</strong></p>
        <p>The paper-based products gain and lose moisture rapidly: for this reason a properly stabilized humidity level is crucial to obtain an excellent steady quality final product. A proper humidity level is very important to the entire printing process. As far as paper, board and other cellulose-based products, the best climate is 20-21°C and a relative humidity moving from 50% to 55%.</p>
        <h4 className="font-bold text-brand-red text-base">HUMIDITY IN WINTER MONTHS</h4>
        <p>Heating and heat produced by machinery themselves create, during winter months mainly, critical levels of humidity in the environment and consequently serious complications to the manufacturing process.</p>
        <h4 className="font-bold text-brand-red text-base">BENEFITS</h4>
        <ul className="list-disc pl-6 space-y-1">
          <li>Increased output speed</li>
          <li>Removal of static electricity</li>
          <li>Minimization of scraps and downtime</li>
          <li>Reduction in curl and deformations</li>
          <li>Improvement in quality folding mechanical process</li>
          <li>Improvement in flexibility and dimensional stability</li>
          <li>Better ink transfer</li>
          <li>Dust reduction</li>
        </ul>
      </div>
    ),
  },
];

function AccordionGroup({ section, defaultOpen = false }: { section: AccordionSection; defaultOpen?: boolean }) {
  const [open, setOpen] = useState(defaultOpen);

  return (
    <div className="border rounded-lg overflow-hidden">
      <button
        onClick={() => setOpen(!open)}
        className="flex items-center justify-between w-full px-6 py-4 text-left font-bold text-lg bg-white hover:bg-gray-50 transition-colors"
      >
        <span>{section.title}</span>
        <svg
          className={`w-4 h-4 transition-transform ${open ? "rotate-90" : ""}`}
          fill="none" stroke="currentColor" viewBox="0 0 24 24"
        >
          <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M9 5l7 7-7 7" />
        </svg>
      </button>
      {open && (
        <div className="px-6 py-4 border-t text-muted-foreground prose-sm max-w-none">
          {section.content}
        </div>
      )}
    </div>
  );
}

function ApplicationsHumidification() {
  return (
    <SubPageLayout
      eyebrow="Applications"
      title="Humidification"
      lede="Commercial and industrial environments where controlling humidity or temperature provides enhanced profitability, product quality and process reliability."
    >
      <Section>
        <div className="grid lg:grid-cols-2 gap-10 items-start">
          <div className="prose max-w-none text-muted-foreground space-y-4">
            <p>High pressure misting systems offer the simplest and most effective method of air cooling and humidity control. The Promist high-pressure misting system can be used for a wide range of applications including commercial, industrial and residential outdoor cooling, greenhouses and agricultural, zoos and wild life parks, theme parks, bird and poultry farms, events and crowd cooling, prevention of energy loss and many more.</p>
          </div>
          <img src="/wp-uploads/2017/04/humidification.jpg" alt="Humidification" className="w-full h-[300px] object-cover rounded-lg" />
        </div>
      </Section>
      <Section className="bg-muted/50">
        <h2 className="font-display text-3xl font-black mb-6">Applications</h2>
        <div className="space-y-4">
          {sections.map((section, i) => (
            <AccordionGroup key={section.title} section={section} defaultOpen={i === 0} />
          ))}
        </div>
      </Section>
    </SubPageLayout>
  );
}
