/* ============================================
   COLOR SCHEME - Jyoti Enterprise
   ============================================ */
:root {
    --color-primary: #2563EB;      /* Royal Blue - Headers, key elements */
    --color-secondary: #1E3A8A;   /* Navy Blue - Gradients, footer */
    --color-accent: #F97316;      /* Bright Orange - CTA buttons, highlights */
    --color-bg-light: #FFFFFF;    /* Pure White - Main sections */
    --color-bg-dark: #F3F4F6;     /* Soft Gray - Alternate sections */
    --color-text-dark: #1F2937;   /* Charcoal - Body text */
    --color-text-light: #000000;  /* Cool Gray - Secondary text */
    --color-text-on-dark: #FFFFFF;/* White - Text on blue backgrounds */
    --color-border: #DBEAFE;      /* Light Blue - Borders, dividers */
    --color-success: #10B981;     /* Green - Positive indicators */
}

/* Utility classes mirroring Tailwind-style names, backed by our palette */
.bg-primary { background-color: var(--color-primary); }
.text-primary { color: var(--color-primary); }

.bg-secondary { background-color: var(--color-secondary); }
.text-secondary { color: var(--color-secondary); }

.bg-accent { background-color: var(--color-accent); }
.text-accent { color: var(--color-accent); }

.bg-alt { background-color: var(--color-bg-dark); }

.text-text-dark,
.text-body { color: var(--color-text-dark); }

.text-text-light,
.text-muted { color: var(--color-text-light); }

.text-on-dark { color: var(--color-text-on-dark); }

.bg-success { background-color: var(--color-success); }

.border-border,
.border-brand { border-color: var(--color-border); }

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

body {
    font-family: 'Rajdhani', sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--color-text-dark);
    background-color: var(--color-bg-light);
}

/* Mobile typography & layout tweaks */
@media (max-width: 640px) {
    body {
        font-size: 0.9rem;
    }

    /* So headings don’t feel oversized on small screens */
    h1.font-display {
        font-size: 2.25rem; /* approx Tailwind text-3xl */
        line-height: 1.1;
    }
}

/* Typography - Premium hierarchy */
.font-display {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 2px;
}

/* Section backgrounds - from palette */
.section-bg-light {
    background-color: var(--color-bg-light);
}

.section-bg-dark {
    background-color: var(--color-bg-dark);
}

/* Text utilities - from palette */
.text-body { color: var(--color-text-dark); }
.text-muted { color: var(--color-text-light); }
.text-on-dark { color: var(--color-text-on-dark); }

/* Border color - Light Blue (#DBEAFE) for borders, dividers */
.border-brand {
    border-color: var(--color-border);
}

.divider-brand {
    height: 1px;
    background: var(--color-border);
    margin: 0;
}

/* Card with brand border - premium look */
.card-premium {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.06), 0 2px 4px -2px rgba(37, 99, 235, 0.04);
    transition: box-shadow 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}

.card-premium:hover {
    border-color: var(--color-primary);
    box-shadow: 0 20px 25px -5px rgba(37, 99, 235, 0.08), 0 8px 10px -6px rgba(37, 99, 235, 0.04);
}

/* Success badge / positive indicator */
.badge-success {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    background: rgba(16, 185, 129, 0.12);
    color: var(--color-success);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Section divider using border color */
.section-divider {
    width: 100%;
    height: 0;
    border: none;
    border-top: 1px solid var(--color-border);
    margin: 0;
}

/* Background Gradients - Navy Blue (Secondary) + Royal Blue (Primary) */
.gradient-bg {
    background: linear-gradient(135deg, var(--color-secondary) 0%, var(--color-primary) 50%, var(--color-secondary) 100%);
}

/* Hero background - light, minimal, premium */
.hero-bg {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 55%),
        radial-gradient(circle at bottom right, rgba(30, 58, 138, 0.18), transparent 55%),
        var(--color-bg-light);
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Reduce animation on mobile for performance */
@media (max-width: 768px) {
    .animate-float {
        animation: none;
    }
}

/* Card Hover Effects - premium lift */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 50px -12px rgba(37, 99, 235, 0.15), 0 0 0 1px rgba(219, 234, 254, 0.5);
}

/* Disable hover effects on touch devices */
@media (hover: none) {
    .card-hover:hover {
        transform: none;
        box-shadow: 0 10px 20px rgba(249, 115, 22, 0.15);
    }
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    animation: float 3s ease-in-out infinite;
}

@media (max-width: 640px) {
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
    }
}

/* CTA Button - Accent, premium */
.btn-cta {
    background: var(--color-accent);
    color: var(--color-text-on-dark);
    padding: 0.875rem 1.75rem;
    border-radius: 0.5rem;
    font-weight: 700;
    transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.btn-cta:hover {
    background: #ea580c;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.3);
}

/* Navigation Link Underline Effect - Accent */
.nav-link {
    position: relative;
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s ease;
}

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

/* Section Spacing for Anchor Links */
.section-spacing {
    scroll-margin-top: 80px;
}

@media (max-width: 768px) {
    .section-spacing {
        scroll-margin-top: 60px;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--color-primary);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-secondary);
}

/* Mobile: Hide scrollbar for cleaner look */
@media (max-width: 640px) {
    ::-webkit-scrollbar {
        width: 5px;
    }
}

/* Text Truncation Utilities */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile Touch Improvements */
@media (max-width: 768px) {
    /* Larger tap targets */
    button, a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better spacing for mobile */
    .space-y-1 > * + * {
        margin-top: 0.5rem;
    }
    
    .space-y-2 > * + * {
        margin-top: 0.75rem;
    }
}

/* Prevent text selection on buttons */
button {
    -webkit-user-select: none;
    user-select: none;
}

/* Improve image rendering */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Focus styles for accessibility */
a:focus, button:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Mobile-friendly table */
@media (max-width: 640px) {
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Print Styles */
@media print {
    .whatsapp-float,
    header,
    footer {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}
