/* style.css - Digitsolve Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    /* Light Mode Colors */
    --bg-primary: 220 20% 97%;
    --bg-secondary: 0 0% 100%;
    --bg-tertiary: 220 14% 92%;
    --bg-glass: 0 0% 100%;
    --bg-glass-alpha: 0.7;
    
    --text-primary: 222 47% 11%;
    --text-secondary: 215 16% 47%;
    --border: 214 32% 91%;
    --input: 0 0% 100%;
    --ring: 243 75% 59%;
    
    --primary: 243 75% 59%;
    --primary-foreground: 210 40% 98%;
    --primary-container: 250 89% 65%;
    
    --secondary: 217 19% 27%;
    --secondary-foreground: 210 40% 98%;
    
    --success: 142.1 70.6% 45.3%;
    --success-container: 142.8 71.8% 37.3%;
    
    --warning: 45 89.8% 51.8%;
    --warning-container: 46.7 80.5% 44.1%;
    
    --error: 346 87% 60%;
    --error-container: 19 84.3% 56.3%;

    --border-gradient: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-container)));
    
    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    --shadow-glow: 0 0 20px hsl(var(--primary) / 0.4);
    
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-4: 1rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-12: 3rem;
    
    --container: min(100% - 2rem, 1280px);
    
    /* Animations */
    --animate-spin: spin 1s linear infinite;
    --transition-snappy: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Dark mode */
[data-theme="dark"] {
    --bg-primary: 226 45% 4%;
    --bg-secondary: 226 31% 9%;
    --bg-tertiary: 226 31% 13%;
    --bg-glass: 226 31% 9%;
    --bg-glass-alpha: 0.5;
    
    --text-primary: 210 40% 98%;
    --text-secondary: 215 20% 65%;
    --border: 226 25% 18%;
    --input: 226 31% 9%;
    
    --primary: 250 89% 65%;
    --primary-container: 255 92% 75%;
    --shadow-glow: 0 0 30px hsl(var(--primary) / 0.3);
}

/* Advanced Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
}

* {
    margin: 0;
}

html {
    scroll-behavior: smooth;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

body {
    font-feature-settings: "rlig" 1, "calt" 1;
    font-variant-numeric: oldstyle-nums proportional-nums;
    font-variation-settings: normal;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    font-size: 16px;
    line-height: 1.5;
    color: hsl(var(--text-primary));
    background-color: hsl(var(--bg-primary));
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-smooth), color var(--transition-smooth);
}

h1, h2, h3, h4, h5 {
    font-weight: 600;
    line-height: 1.2;
}

h1 { font-size: clamp(1.875rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }

.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--space-sm);
}

/* Header */
.navbar {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: hsl(var(--bg-glass) / var(--bg-glass-alpha));
    border-bottom: 1px solid hsl(var(--border) / 0.5);
    box-shadow: var(--shadow-sm);
    transition: background-color var(--transition-smooth), border-color var(--transition-smooth);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    height: 70px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo a {
    font-size: clamp(1.25rem, 2.5vw, 1.75rem);
    font-weight: 800;
    color: hsl(var(--text-primary));
    text-decoration: none;
    letter-spacing: -0.025em;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}
/* --- Logo Styles --- */
.logo-wrapper {
    display: flex;
    align-items: center;
    text-decoration: none;
    gap: 12px;
}

.logo-icon-container {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #007bff, #0056b3);
    border-radius: 8px; /* Smooth rounded square background */
    padding: 6px;
    gap: 3px;
    box-shadow: 0 4px 6px rgba(0, 123, 255, 0.2);
}

.bar {
    width: 5px;
    background-color: #ffffff;
    border-radius: 10px;
    display: inline-block;
}

.bar-1 { height: 40%; }
.bar-2 { height: 85%; }
.bar-3 { height: 60%; }

.logo-text {
    font-size: 24px;
    font-weight: 800;
    color: #1a1a1a;
    letter-spacing: -1px;
}

.logo-text span {
    color: #007bff; /* Highlights the 'solves' part */
}

/* --- Dark Mode Support --- */
[data-theme="dark"] .logo-text {
    color: #ffffff;
}

[data-theme="dark"] .logo-icon-container {
    background: linear-gradient(135deg, #3399ff, #007bff);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Hover Effect */
.logo-wrapper:hover .bar-2 {
    height: 100%;
    transition: height 0.3s ease;
}
.nav-links a {
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--primary);
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 180px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: var(--radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s;
    list-style: none;
    padding: var(--space-sm);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero */
.hero {
    min-height: 60vh;
    display: flex;
    align-items: center;
    background: radial-gradient(circle at top right, hsl(var(--primary) / 0.15), transparent 40%),
                radial-gradient(circle at bottom left, hsl(var(--primary-container) / 0.15), transparent 40%),
                hsl(var(--bg-primary));
    position: relative;
    overflow: hidden;
    color: hsl(var(--text-primary));
}

/* float animation removed */

.hero > .container {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding-left: 2rem;
    padding-right: 2rem;
}

.hero h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    margin-bottom: var(--space-4);
    letter-spacing: -0.02em;
    color: hsl(var(--text-primary));
    line-height: 1.1;
}

.hero-subtitle {
    font-size: clamp(1.125rem, 3vw, 1.25rem);
    opacity: 0.95;
    margin-bottom: var(--space-8);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    color: hsl(var(--text-secondary));
}

.search-bar {
    position: relative;
    max-width: 32rem;
    margin: 0 auto;
}

.search-bar input {
    width: 100%;
    padding: 1.25rem 5rem 1.25rem 1.5rem;
    font-size: 1rem;
    background: hsl(var(--bg-glass) / var(--bg-glass-alpha));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid hsl(var(--border) / 0.5);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-snappy);
    color: hsl(var(--text-primary));
}

.search-bar input:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 4px hsl(var(--primary) / 0.2), var(--shadow-xl);
    transform: translateY(-2px);
}

.search-bar input::placeholder {
    color: hsl(var(--text-secondary) / 0.8);
}

.search-bar::after {
    content: '🔍';
    position: absolute;
    right: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.25rem;
    pointer-events: none;
    color: hsl(var(--text-secondary));
}

/* Calculator Grid */
.calculators-grid {
    padding: var(--space-xl) 0;
}

.category-group {
    margin-bottom: var(--space-xl);
}

.category-group h3 {
    font-size: 1.5rem;
    margin-bottom: var(--space-lg);
    color: var(--gray-800);
}

.cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
    gap: var(--space-8);
}

.calc-card {
    display: flex;
    flex-direction: column;
    background: hsl(var(--bg-glass) / var(--bg-glass-alpha));
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid hsl(var(--border) / 0.5);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow);
    transition: all var(--transition-snappy);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.calc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border-gradient);
    opacity: 0;
    transition: opacity var(--transition-smooth);
}

.calc-card:hover::before {
    opacity: 1;
}

.calc-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-glow), var(--shadow-xl);
    border-color: hsl(var(--primary) / 0.5);
}

.calc-card:active {
    transform: translateY(-4px) scale(0.98);
}

.calc-card.highlight-card {
    border-color: hsl(var(--primary) / 0.7);
    box-shadow: 0 0 15px hsl(var(--primary) / 0.15), var(--shadow);
    background: linear-gradient(145deg, hsl(var(--bg-glass) / var(--bg-glass-alpha)) 0%, hsl(var(--primary) / 0.05) 100%);
}

.calc-card.highlight-card::after {
    content: '⭐';
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.25rem;
    opacity: 0.8;
}

.calc-icon {
    font-size: 2.5rem;
    margin-bottom: var(--space-4);
    display: inline-block;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.calc-card h4 {
    font-size: 1.125rem;
    margin-bottom: var(--space-2);
    color: hsl(var(--text-primary));
}

.calc-card p {
    color: hsl(var(--text-secondary));
    margin-bottom: var(--space-4);
    flex-grow: 1;
    font-size: 0.875rem;
}

.open-btn {
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-container)));
    color: hsl(var(--primary-foreground));
    border: none;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-smooth);
    text-align: center;
    width: fit-content;
    box-shadow: var(--shadow);
}

.open-btn:hover {
    box-shadow: var(--shadow-glow);
    transform: scale(1.05);
}

/* Why Us Section */
.why-us {
    background: hsl(var(--bg-tertiary));
    padding: var(--space-12) 0;
}

.why-us h2 {
    text-align: center;
    font-size: 2.25rem;
    margin-bottom: var(--space-8);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-8);
}

.feature-card {
    text-align: center;
    padding: var(--space-8);
    background: hsl(var(--bg-secondary));
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card p {
    color: hsl(var(--text-secondary));
    opacity: 0.9;
    line-height: 1.6;
}

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

.feature-card h3 {
    color: hsl(var(--primary));
    font-size: 1.5rem;
    margin-bottom: var(--space-2);
}

/* Footer */
footer {
    background: hsl(var(--bg-secondary));
    color: hsl(var(--text-secondary));
    padding: clamp(3rem, 8vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
    position: relative;
    border-top: 1px solid hsl(var(--border));
}

footer::before {
    content: '';
    position: absolute;
    top: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--border-gradient);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: clamp(2rem, 5vw, 4rem);
    margin-bottom: clamp(2rem, 4vw, 3rem);
}

.footer-section h4 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: var(--space-4);
    font-size: 1rem;
    font-weight: 700;
    color: hsl(var(--text-primary));
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section a {
    color: hsl(var(--text-secondary));
    text-decoration: none;
    display: block;
    padding: 0.5rem 0;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    position: relative;
}

.footer-section a:hover {
    color: hsl(var(--primary));
    transform: translateX(4px);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-6);
    border-top: 1px solid hsl(var(--border));
    color: hsl(var(--text-secondary));
    font-size: 0.875rem;
}

.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: hsl(var(--bg-tertiary));
    color: hsl(var(--text-secondary));
    font-size: 1.125rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    transform: translateY(-3px) scale(1.1);
    box-shadow: var(--shadow-md);
}

/* Calculator Page Components */
.calc-page {
    max-width: 800px;
    margin: var(--space-8) auto;
}

.input-group {
    background: hsl(var(--bg-secondary));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    margin-bottom: var(--space-6);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.input-group:hover {
    box-shadow: var(--shadow-md);
    border-color: hsl(var(--border) / 0.8);
}

.input-group label {
    display: block;
    margin-bottom: var(--space-2);
    font-weight: 600;
    color: hsl(var(--text-primary));
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: var(--space-2) var(--space-4);
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s;
    resize: vertical;
    background: hsl(var(--bg-primary));
    color: hsl(var(--text-primary));
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-color: hsl(var(--primary));
    box-shadow: 0 0 0 2px hsla(var(--primary), 0.1);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid hsl(var(--border));
}

.result-item:last-child {
    border-bottom: none;
}

.result-item strong {
    font-weight: 600;
    color: hsl(var(--text-primary));
}

.result-box {
    background: linear-gradient(135deg, 
        hsla(var(--primary), 0.05) 0%, 
        hsla(var(--bg-secondary), 0) 100%);
    border: 1px solid hsl(var(--primary) / 0.2);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-top: var(--space-4);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}

.result-box::before {
    content: '✨';
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    opacity: 0.3;
}

.result-box h3 {
    color: hsl(var(--primary));
    margin-bottom: var(--space-4);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.result-box h3::before {
    content: '📊';
}

/* Contact Form */
#contact-form .input-group {
    margin-bottom: var(--space-4);
}


/* Breadcrumbs */
.breadcrumbs {
    padding: var(--space-md) 0;
    font-size: 0.9rem;
}

.breadcrumb-link {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb-current {
    color: var(--gray-600);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, hsl(var(--primary)), hsl(var(--primary-container)));
    color: hsl(var(--primary-foreground));
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, hsla(var(--primary-foreground), 0.1), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

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

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    background: hsl(var(--bg-secondary));
    color: hsl(var(--text-primary));
    border: 2px solid hsl(var(--border));
}

.btn-secondary:hover {
    border-color: hsl(var(--secondary));
    box-shadow: var(--shadow-lg);
}

.theme-btn {
    background: none;
    border: none;
    font-size: 1.25rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.theme-btn:hover {
    transform: scale(1.1) rotate(180deg);
    box-shadow: var(--shadow-md);
}

/* Enhanced Responsive Design */
@media (max-width: 1024px) {
    .cards-row {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: var(--space-md);
    }
}

@media (max-width: 768px) {
    :root {
        --space-lg: 1.75rem;
        --space-xl: 2.5rem;
    }
    
    .navbar .container {
        padding: var(--space-xs) var(--space-sm);
    }
    
    .menu-toggle {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: var(--space-lg);
        transition: left 0.3s;
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .nav-links a {
        padding: 1rem;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        background: var(--gray-100);
        margin-top: 0.5rem;
    }
    
    .dropdown:hover .dropdown-menu {
        display: block;
    }
    
    .cards-row {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .hero {
        padding: var(--space-xl) var(--space-sm);
    }
    
    .input-group {
        padding: var(--space-md);
    }
    
    textarea {
        min-height: 120px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-xs);
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    h1 {
        font-size: 1.75rem !important;
    }
    
    .btn,
    .case-btn {
        flex: 1;
        min-width: 120px;
        padding: var(--space-sm);
        font-size: 0.875rem;
    }
    
    .input-group input,
    .input-group select,
    .input-group textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Specific page fixes */
    #qr-container canvas {
        max-width: 100%;
        height: auto;
    }
    
    .result-box {
        padding: var(--space-md);
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    .calc-card:active {
        transform: scale(0.98);
    }
    
    .btn:active {
        transform: scale(0.96);
    }
}

/* Print Styles */
@media print {
    .navbar,
    footer,
    .menu-toggle {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .calc-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

