/**
 * Ei EMS India Pvt. Ltd. - Main Stylesheet
 * Professional Electronics Manufacturing Services Website
 * Modern, Colorful, High-Tech Design
 *
 * Color Scheme:
 * Primary Blue: #0066cc
 * Secondary Blue: #004999
 * Accent Orange: #ff6600
 * Tech Green: #00cc66
 * Dark Gray: #1a1a1a
 * Light Gray: #f5f5f5
 */

/* ========================================
   1. CSS VARIABLES & ROOT SETTINGS
   ======================================== */

:root {
    /* Primary Colors */
    --primary-blue: #0066cc;
    --primary-dark: #004999;
    --primary-light: #3399ff;

    /* Accent Colors */
    --accent-orange: #ff6600;
    --accent-green: #00cc66;
    --accent-purple: #9933ff;
    --accent-cyan: #00ccff;

    /* Neutral Colors - Light Theme */
    --dark-bg: #1a1a1a;
    --gray-dark: #333333;
    --gray-medium: #666666;
    --gray-light: #cccccc;
    --white: #ffffff;
    --light-bg: #f5f5f5;

    /* Dynamic Theme Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #cccccc;
    --card-bg: #ffffff;
    --navbar-bg: rgba(255, 255, 255, 0.98);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #0066cc 0%, #00ccff 100%);
    --gradient-accent: linear-gradient(135deg, #ff6600 0%, #ff9933 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a1a 0%, #333333 100%);

    /* Typography */
    --font-primary: 'Segoe UI', 'Roboto', 'Arial', sans-serif;
    --font-heading: 'Helvetica Neue', 'Arial', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 5rem;

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 16px;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.15);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.2);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Dark Theme Variables */
[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #1a1a1a;
    --text-primary: #e0e0e0;
    --text-secondary: #a0a0a0;
    --border-color: #333333;
    --card-bg: #1a1a1a;
    --navbar-bg: rgba(26, 26, 26, 0.98);

    --light-bg: #1a1a1a;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.5);
}


/* ========================================
   2. RESET & BASE STYLES
   ======================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul, ol {
    list-style: none;
}


/* ========================================
   3. TYPOGRAPHY
   ======================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

h1 {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
}

h2 {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-md);
}

h3 {
    font-size: 2rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: var(--spacing-sm);
    line-height: 1.8;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


/* ========================================
   4. LAYOUT & CONTAINERS
   ======================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.container-full {
    width: 100%;
    padding: 0 var(--spacing-md);
}

section {
    padding: var(--spacing-xl) 0;
}

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

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

.section-gradient {
    background: var(--gradient-primary);
    color: var(--white);
}


/* ========================================
   5. NAVIGATION
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--navbar-bg);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition-normal);
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--gradient-primary);
    border: none;
    border-radius: 50px;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-lg);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem var(--spacing-md);
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    height: 45px;
}

.logo img {
    height: 100%;
    width: auto;
    max-width: 180px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.logo img:hover {
    transform: scale(1.05);
}

/* Logo filter for dark mode visibility */
[data-theme="dark"] .logo img {
    filter: brightness(1.1) contrast(1.1);
}

/* Responsive logo sizing */
@media (max-width: 768px) {
    .logo {
        height: 40px;
    }

    .logo img {
        max-width: 140px;
    }
}

@media (max-width: 480px) {
    .logo {
        height: 35px;
    }

    .logo img {
        max-width: 120px;
    }
}

.nav-menu {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
}

.nav-link {
    color: var(--text-primary);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--primary-blue);
    background-color: var(--light-bg);
}

.nav-link.active {
    color: var(--primary-blue);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}


/* ========================================
   6. BUTTONS
   ======================================== */

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--gradient-accent);
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
}

.btn-outline:hover {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-white {
    background: var(--white);
    color: var(--primary-blue);
    box-shadow: var(--shadow-md);
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}


/* ========================================
   7. HERO SECTION
   ======================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0066cc 0%, #004999 50%, #00ccff 100%);
    color: var(--white);
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: var(--spacing-md);
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.95;
    animation: fadeInUp 1s ease;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
    animation: fadeInUp 1.2s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ========================================
   8. CARDS
   ======================================== */

.card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md);
    box-shadow: var(--shadow-md);
    transition: var(--transition-normal);
    height: 100%;
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
    font-size: 1.5rem;
    color: var(--white);
}

.card-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--text-primary);
}

.card-text {
    color: var(--text-secondary);
    line-height: 1.7;
}


/* ========================================
   9. GRID SYSTEM
   ======================================== */

.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}


/* ========================================
   10. FOOTER
   ======================================== */

.footer {
    background: var(--dark-bg);
    color: var(--white);
    padding: var(--spacing-xl) 0 var(--spacing-md);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

.footer-section h3 {
    color: var(--white);
    margin-bottom: var(--spacing-sm);
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: var(--gray-light);
    transition: var(--transition-fast);
}

.footer-section a:hover {
    color: var(--primary-light);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--spacing-md);
    text-align: center;
    color: var(--gray-light);
}


/* ========================================
   11. FORMS
   ======================================== */

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-family: var(--font-primary);
    background-color: var(--card-bg);
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}


/* ========================================
   12. UTILITY CLASSES
   ======================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-sm { margin-bottom: var(--spacing-sm); }
.mb-md { margin-bottom: var(--spacing-md); }
.mb-lg { margin-bottom: var(--spacing-lg); }
.mb-xl { margin-bottom: var(--spacing-xl); }

.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mt-lg { margin-top: var(--spacing-lg); }
.mt-xl { margin-top: var(--spacing-xl); }

.hidden { display: none; }
.visible { display: block; }

.color-primary { color: var(--primary-blue); }
.color-accent { color: var(--accent-orange); }
.color-white { color: var(--white); }

.bg-primary { background-color: var(--primary-blue); }
.bg-dark { background-color: var(--dark-bg); }
.bg-light { background-color: var(--light-bg); }


/* ========================================
   13. RESPONSIVE DESIGN
   ======================================== */

/* Tablet */
@media (max-width: 968px) {
    html {
        font-size: 15px;
    }

    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }

    .hero h1 { font-size: 2.75rem; }

    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-menu {
        gap: var(--spacing-sm);
    }
}

/* Mobile */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    section {
        padding: var(--spacing-lg) 0;
    }

    .container,
    .container-wide {
        padding: 0 var(--spacing-sm);
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }

    .hero {
        min-height: 80vh;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        text-align: center;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-primary);
        flex-direction: column;
        padding: var(--spacing-md);
        box-shadow: var(--shadow-lg);
        transition: var(--transition-normal);
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        width: 100%;
        padding: var(--spacing-sm);
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    html {
        font-size: 13px;
    }

    .hero h1 {
        font-size: 1.75rem;
    }

    .card-icon {
        width: 50px;
        height: 50px;
    }

    .theme-toggle {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}


/* ========================================
   14. ADVANCED ANIMATIONS
   ======================================== */

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

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

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

/* Slide In From Left */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-left {
    animation: slideInLeft 0.8s ease;
}

/* Slide In From Right */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.animate-slide-right {
    animation: slideInRight 0.8s ease;
}

/* Zoom In */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-zoom {
    animation: zoomIn 0.6s ease;
}

/* Fade In */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.animate-fade {
    animation: fadeIn 1s ease;
}

/* Glow Effect */
@keyframes glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(0, 102, 204, 0.5),
                    0 0 10px rgba(0, 102, 204, 0.3);
    }
    50% {
        box-shadow: 0 0 20px rgba(0, 102, 204, 0.8),
                    0 0 30px rgba(0, 102, 204, 0.5),
                    0 0 40px rgba(0, 102, 204, 0.3);
    }
}

.animate-glow {
    animation: glow 2s ease-in-out infinite;
}

/* Gradient Animation */
@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradientShift 5s ease infinite;
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-15px);
    }
    60% {
        transform: translateY(-7px);
    }
}

.animate-bounce {
    animation: bounce 2s infinite;
}

/* Rotate Animation */
@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.animate-rotate {
    animation: rotate 20s linear infinite;
}

/* Hero Background Animation */
.hero {
    background: linear-gradient(135deg, #0066cc 0%, #004999 25%, #0066cc 50%, #00ccff 75%, #0066cc 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
}

/* Scroll Reveal Classes */
.scroll-reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

.stat-number {
    animation: countUp 1s ease;
}

/* Card Tilt Effect */
.card-tilt {
    transition: transform 0.3s ease;
}

.card-tilt:hover {
    transform: perspective(1000px) rotateX(5deg) rotateY(5deg) scale(1.02);
}

/* Loading Spinner */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-spinner {
    border: 4px solid rgba(0, 102, 204, 0.1);
    border-top: 4px solid var(--primary-blue);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

/* Text Shimmer Effect */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.text-shimmer {
    background: linear-gradient(90deg,
        var(--primary-blue) 0%,
        var(--accent-cyan) 50%,
        var(--primary-blue) 100%);
    background-size: 1000px 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s linear infinite;
}
