Tailwind CSS Setup
The project uses Tailwind CSS v4 with an inline theme configuration:app/globals.css
Dark Mode Support
app/globals.css
Brand Colors
The application uses a professional blue color palette:Primary Dark
#001f3d - Main brand color for headers and primary elements
Primary Blue
#163594 - Interactive elements, buttons, links, and accents
Navy Background
#061e3d - Background for hero sections and cards
Blue Hover
#1e40af / blue-700 - Hover states for buttons and interactive elements
Color Usage Examples
Custom CSS Classes
Input Style
A reusable input style is defined using Tailwind’s@apply directive:
app/globals.css
Usage
app/components/CotizacionForm.tsx
Logo Styles
app/globals.css
Custom Animations
Float Animation
Used for hero section elements:app/globals.css
Bounce Slow
Subtle bouncing effect:app/globals.css
Scroll Animation
For the insurance provider carousel:app/globals.css
Responsive Design Patterns
Mobile-First Grid
- Default: Single column on mobile
md:breakpoint: Two columns on tablets and desktop
Responsive Navigation
app/components/Header.tsx
Responsive Typography
Component Styling Patterns
Cards with Shadow
Section Containers
Buttons with States
Form Field with Error State
app/components/CotizacionForm.tsx
Smooth Scroll Behavior
app/globals.css
Header Transitions
The header changes appearance on scroll:app/components/Header.tsx
Transparent State
Transparent State
- Background: Transparent
- Padding:
py-5(more vertical space) - Used on hero section of homepage
Scrolled State
Scrolled State
- Background:
#001f3dwith 95% opacity - Backdrop blur for glassmorphism effect
- Shadow for depth
- Padding:
py-3(compact)
Dynamic Form Animations
app/components/CotizacionForm.tsx
- Height expands from 0 to auto
- Opacity fades in
- Scale grows slightly
- Translates into position
Loading Spinner
app/components/CotizacionForm.tsx
Best Practices
Use Brand Colors Consistently
Stick to
#001f3d and #163594 for all primary branding elements to maintain visual consistency.Leverage Tailwind Utilities
Use Tailwind’s utility classes instead of writing custom CSS whenever possible.
Create Reusable Classes
Extract commonly repeated patterns (like
.inputStyle) using @apply for maintainability.Maintain Accessibility
Ensure sufficient color contrast and use semantic HTML elements with proper ARIA labels.
SweetAlert2 Toast Styling
The application uses SweetAlert2 for toast notifications with custom styling:app/components/CotizacionForm.tsx