/* Apple-inspired Multi-Tool Platform Design */

:root {
    /* Apple-inspired Color Palette */
    --apple-blue: #007AFF;
    --apple-blue-dark: #0056CC;
    --apple-gray-1: #F2F2F7;
    --apple-gray-2: #E5E5EA;
    --apple-gray-3: #D1D1D6;
    --apple-gray-4: #C7C7CC;
    --apple-gray-5: #AEAEB2;
    --apple-gray-6: #8E8E93;
    --apple-text: #1D1D1F;
    --apple-text-secondary: #86868B;
    --apple-green: #30D158;
    --apple-red: #FF3B30;
    --apple-orange: #FF9500;
    --apple-purple: #AF52DE;
    
    /* Spacing */
    --section-padding: 6rem 0;
    --card-padding: 2rem;
    --border-radius: 12px;
    --button-radius: 24px;
    
    /* Typography */
    --font-weight-light: 300;
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
    
    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 12px 40px rgba(0, 0, 0, 0.12);
    
    /* Transitions */
    --transition-fast: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-medium: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset and Global Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.47059;
    font-weight: var(--font-weight-regular);
    color: var(--apple-text);
    background: #FFFFFF;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1140px;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: var(--font-weight-bold);
    line-height: 1.1;
    margin-bottom: 1rem;
    color: var(--apple-text);
}

h1 { font-size: 3.5rem; font-weight: var(--font-weight-bold); }
h2 { font-size: 2.5rem; font-weight: var(--font-weight-bold); }
h3 { font-size: 1.75rem; font-weight: var(--font-weight-semibold); }
h4 { font-size: 1.5rem; font-weight: var(--font-weight-semibold); }
h5 { font-size: 1.25rem; font-weight: var(--font-weight-medium); }

p {
    font-size: 1.0625rem;
    line-height: 1.52947;
    font-weight: var(--font-weight-regular);
    color: var(--apple-text);
}

.lead {
    font-size: 1.3125rem;
    line-height: 1.4;
    font-weight: var(--font-weight-regular);
    color: var(--apple-text-secondary);
}

/* Navigation */
.navbar {
    backdrop-filter: saturate(180%) blur(20px);
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid var(--apple-gray-2);
    padding: 0.75rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: var(--transition-fast);
}

.navbar-brand {
    font-size: 1.375rem;
    font-weight: var(--font-weight-semibold);
    color: var(--apple-text);
    text-decoration: none;
}

.navbar-brand:hover {
    color: var(--apple-blue);
}

.navbar-nav .nav-link {
    font-size: 1.0625rem;
    font-weight: var(--font-weight-medium);
    color: var(--apple-text);
    padding: 0.6rem 1.2rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid transparent;
}

/* Dropdown hover functionality */
.navbar-nav .dropdown:hover .dropdown-menu {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.navbar-nav .dropdown-menu {
    display: block;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    margin-top: 0;
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: var(--border-radius);
    padding: 0.5rem 0;
    min-width: 280px;
}

.navbar-nav .dropdown:hover .dropdown-toggle::after {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: var(--apple-text);
    background: linear-gradient(135deg, rgba(248, 249, 250, 0.8) 0%, rgba(233, 236, 239, 0.9) 100%);
    border: 1px solid rgba(0, 123, 255, 0.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.navbar-nav .nav-link:hover i {
    color: var(--apple-blue);
    transform: scale(1.1);
    transition: all 0.3s ease;
}

.dropdown-menu {
    border: 1px solid var(--apple-gray-2);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    padding: 0.75rem 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
}

.dropdown-item {
    padding: 0.75rem 1.25rem;
    border-radius: 0;
    font-weight: var(--font-weight-medium);
    color: var(--apple-text);
    transition: all 0.2s ease;
    border: none;
    margin: 0 0.5rem;
    border-radius: 8px;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--apple-text);
    transform: translateX(4px);
}

.dropdown-item:focus {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--apple-text);
    box-shadow: none;
}

.dropdown-item i {
    color: var(--apple-blue);
    margin-right: 0.75rem;
    width: 16px;
    text-align: center;
}

.dropdown-header {
    font-size: 0.875rem;
    font-weight: var(--font-weight-semibold);
    color: var(--apple-blue);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 1.25rem 0.25rem;
    margin-bottom: 0.25rem;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 8rem 0;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-size: 4.5rem;
    font-weight: var(--font-weight-bold);
    margin-bottom: 1.5rem;
    line-height: 1.05;
}

.hero-section .lead {
    font-size: 1.5rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Buttons */
.btn {
    font-family: inherit;
    font-weight: var(--font-weight-semibold);
    border-radius: var(--button-radius);
    padding: 0.875rem 2rem;
    font-size: 1.0625rem;
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
}

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

.btn-primary:hover {
    background: var(--apple-blue-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-lg {
    padding: 1.125rem 2.5rem;
    font-size: 1.1875rem;
    min-height: 56px;
}

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

.btn-outline-primary:hover {
    background: var(--apple-blue);
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--apple-green);
    color: white;
}

.btn-outline-success {
    color: var(--apple-green);
    border: 2px solid var(--apple-green);
}

.btn-outline-success:hover {
    background: var(--apple-green);
    color: white;
}

.btn-outline-danger {
    color: var(--apple-red);
    border: 2px solid var(--apple-red);
}

.btn-outline-danger:hover {
    background: var(--apple-red);
    color: white;
}

.btn-outline-warning {
    color: var(--apple-orange);
    border: 2px solid var(--apple-orange);
}

.btn-outline-warning:hover {
    background: var(--apple-orange);
    color: white;
}

.btn-outline-info {
    color: var(--apple-purple);
    border: 2px solid var(--apple-purple);
}

.btn-outline-info:hover {
    background: var(--apple-purple);
    color: white;
}

/* Sections */
section {
    padding: var(--section-padding);
}

section h2 {
    text-align: center;
    margin-bottom: 4rem;
}

section h3 {
    margin-bottom: 2rem;
    color: var(--apple-text);
}

.bg-light {
    background: var(--apple-gray-1) !important;
}

/* Cards */
.card {
    border: 1px solid var(--apple-gray-2);
    border-radius: var(--border-radius);
    background: white;
    transition: var(--transition-medium);
    box-shadow: var(--shadow-sm);
}

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

.card-header {
    background: var(--apple-gray-1);
    border-bottom: 1px solid var(--apple-gray-2);
    padding: 1.5rem var(--card-padding);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.card-body {
    padding: var(--card-padding);
}

.tool-card {
    height: 100%;
    border: none;
    transition: var(--transition-medium);
    background: white;
    box-shadow: var(--shadow-sm);
}

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

.tool-card .card-body {
    text-align: center;
    padding: 2.5rem 1.5rem;
}

.tool-card i {
    margin-bottom: 1.5rem;
    font-size: 3rem;
}

.tool-card h5 {
    font-weight: var(--font-weight-semibold);
    margin-bottom: 1rem;
}

.tool-card p {
    color: var(--apple-text-secondary);
    margin-bottom: 2rem;
}

/* Forms */
.form-control, .form-select {
    border: 1px solid var(--apple-gray-3);
    border-radius: 10px;
    padding: 0.875rem 1rem;
    font-size: 1.0625rem;
    font-family: inherit;
    transition: var(--transition-fast);
    background: white;
}

.form-control:focus, .form-select:focus {
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 3px rgba(0, 122, 255, 0.1);
    outline: none;
}

.form-label {
    font-weight: var(--font-weight-medium);
    margin-bottom: 0.5rem;
    color: var(--apple-text);
}

.form-text {
    color: var(--apple-text-secondary);
    font-size: 0.9375rem;
    margin-top: 0.5rem;
}

/* Feature Highlights */
.feature-highlight {
    margin-bottom: 2rem;
}

.feature-highlight h5 {
    font-weight: var(--font-weight-semibold);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.feature-highlight h5 i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
}

.feature-highlight p {
    color: var(--apple-text-secondary);
    margin-bottom: 0;
}

/* DPI Standards */
.dpi-standards {
    background: var(--apple-gray-1);
    padding: 2rem;
    border-radius: var(--border-radius);
    margin-top: 2rem;
}

.dpi-standard {
    padding: 1rem;
    text-align: center;
}

.dpi-standard strong {
    display: block;
    font-weight: var(--font-weight-semibold);
    font-size: 1.125rem;
    color: var(--apple-blue);
    margin-bottom: 0.25rem;
}

.dpi-standard small {
    font-size: 0.9375rem;
    color: var(--apple-text-secondary);
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1.25rem 1.5rem;
    font-weight: var(--font-weight-medium);
}

.alert-success {
    background: rgba(48, 209, 88, 0.1);
    color: #1B5E20;
}

.alert-danger {
    background: rgba(255, 59, 48, 0.1);
    color: #C62828;
}

/* Custom DPI Input Styling */
#customDpiDiv {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 120px;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 4rem 0;
    }
    
    .hero-section h1 {
        font-size: 3rem;
    }
    
    .hero-section .lead {
        font-size: 1.25rem;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    section {
        padding: 4rem 0;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .btn-lg {
        padding: 1rem 2rem;
        font-size: 1.0625rem;
    }
}

/* Utility Classes */
.text-muted {
    color: var(--apple-text-secondary) !important;
}

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

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }
.mb-5 { margin-bottom: 3rem !important; }

.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }

/* Footer */
footer {
    background: var(--apple-text);
    color: white;
    padding: 3rem 0 2rem;
}

footer h5 {
    color: white;
    font-weight: var(--font-weight-semibold);
    margin-bottom: 1rem;
}

footer a {
    color: var(--apple-text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

footer a:hover {
    color: white;
}

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

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid var(--apple-blue);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

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

/* Focus States */
*:focus {
    outline: 2px solid var(--apple-blue);
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: rgba(0, 122, 255, 0.2);
    color: var(--apple-text);
}