/* ========================================
   HERM&HERM Service-Tools - Modern Design
   ======================================== */

/* CSS Variables */
:root {
    --primary-dark: #1e3a8a;
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-lighter: #60a5fa;
    --accent: #0ea5e9;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    
    --bg-dark: #0f172a;
    --bg-gradient: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #0ea5e9 100%);
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --text-light: #94a3b8;
    --text-white: #ffffff;
    
    --border: #e2e8f0;
    --border-hover: #cbd5e1;
    
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
    
    --radius-sm: 6px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    
    --transition: all 0.2s ease;
    --transition-slow: all 0.3s ease;
    
    --container-width: 1280px;
    --header-height: 70px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    color: var(--text-primary);
    line-height: 1.6;
}

/* Container */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   Header
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: var(--shadow);
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-dark);
}

.logo-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 400;
}

.nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary);
    background: rgba(37, 99, 235, 0.1);
}

.nav-cta {
    background: var(--primary);
    color: var(--text-white) !important;
}

.nav-cta:hover {
    background: var(--primary-dark);
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 10px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    padding: calc(var(--header-height) + 60px) 0 40px;
    text-align: center;
    color: var(--text-white);
}

.hero h1 {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 700;
    margin-bottom: 16px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.hero p {
    font-size: clamp(16px, 2.5vw, 20px);
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Search Box */
.search-container {
    max-width: 600px;
    margin: 0 auto;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.search-icon {
    position: absolute;
    left: 20px;
    width: 20px;
    height: 20px;
    color: var(--text-light);
    pointer-events: none;
}

.search-box input {
    flex: 1;
    padding: 18px 50px 18px 52px;
    border: none;
    background: transparent;
    font-size: 16px;
    color: var(--text-primary);
    outline: none;
}

.search-box input::placeholder {
    color: var(--text-light);
}

.search-clear {
    position: absolute;
    right: 16px;
    width: 28px;
    height: 28px;
    background: var(--border);
    border: none;
    border-radius: 50%;
    font-size: 18px;
    color: var(--text-secondary);
    cursor: pointer;
    opacity: 0;
    transition: var(--transition);
}

.search-clear.visible {
    opacity: 1;
}

.search-clear:hover {
    background: var(--text-light);
    color: var(--text-white);
}

/* ========================================
   Filter Section
   ======================================== */
.filters {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: var(--header-height);
    z-index: 100;
}

.filter-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    min-width: 80px;
}

.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-btn {
    padding: 8px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}

.filter-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary);
}

.filter-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-white);
}

.results-info {
    margin-top: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

.results-info span {
    font-weight: 600;
    color: var(--primary);
}

/* ========================================
   Main Content
   ======================================== */
.main-content {
    padding: 40px 0 80px;
}

/* Quick Categories */
.quick-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 40px;
}

.quick-cat {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 14px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.quick-cat:hover {
    background: var(--bg-card);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.quick-cat-icon {
    font-size: 20px;
}

/* Tools Grid */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

/* Tool Card */
.tool-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-card);
    transition: var(--transition-slow);
    display: flex;
    flex-direction: column;
    border: 1px solid transparent;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-lighter);
}

.tool-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 16px;
}

.tool-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary-light), var(--accent));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.tool-icon.exe { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.tool-icon.msi { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.tool-icon.zip { background: linear-gradient(135deg, #f59e0b, #d97706); }
.tool-icon.script { background: linear-gradient(135deg, #10b981, #059669); }
.tool-icon.reg { background: linear-gradient(135deg, #ef4444, #dc2626); }
.tool-icon.txt { background: linear-gradient(135deg, #64748b, #475569); }
.tool-icon.url { background: linear-gradient(135deg, #0ea5e9, #0284c7); }
.tool-icon.folder { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.tool-icon.lnk { background: linear-gradient(135deg, #a855f7, #7c3aed); }

.tool-info {
    flex: 1;
    min-width: 0;
}

.tool-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    word-break: break-word;
}

.tool-version {
    display: inline-block;
    padding: 2px 8px;
    background: var(--primary-lighter);
    color: var(--text-white);
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    margin-left: 8px;
}

.tool-category {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 4px;
}

.tool-description {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 16px;
    flex: 1;
}

.tool-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.tool-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-light);
}

.tool-actions {
    display: flex;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--text-white);
    flex: 1;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

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

.btn-secondary:hover {
    background: var(--border-hover);
}

.btn-icon {
    padding: 10px;
}

/* Type Badge */
.type-badge {
    display: inline-block;
    padding: 4px 10px;
    background: var(--border);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
}

/* ========================================
   Folders Section
   ======================================== */
.folders-section {
    margin-top: 60px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 24px;
}

.section-icon {
    font-size: 28px;
}

.folders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.folder-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid transparent;
}

.folder-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.folder-icon {
    font-size: 36px;
}

.folder-info h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 4px;
}

.folder-info p {
    font-size: 13px;
    color: var(--text-secondary);
}

.folder-info .folder-count {
    display: inline-block;
    margin-top: 6px;
    padding: 3px 10px;
    background: var(--primary-light);
    color: var(--text-white);
    font-size: 11px;
    font-weight: 600;
    border-radius: 12px;
}

/* ========================================
   Empty State
   ======================================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 20px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--bg-dark);
    color: var(--text-white);
    padding: 40px 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.footer-info p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--text-white);
}

.footer-bottom {
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 13px;
}

/* ========================================
   Responsive Design
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    .quick-categories {
        justify-content: center;
    }
    
    .tools-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }
    
    .nav {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--bg-card);
        padding: 20px;
        flex-direction: column;
        gap: 10px;
        box-shadow: var(--shadow-lg);
    }
    
    .nav.active {
        display: flex;
    }
    
    .nav-link {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .hero {
        padding: calc(var(--header-height) + 40px) 0 30px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .search-box input {
        padding: 14px 45px 14px 48px;
        font-size: 15px;
    }
    
    .filters {
        padding: 16px 0;
    }
    
    .filter-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .filter-group label {
        min-width: auto;
    }
    
    .filter-buttons {
        width: 100%;
        overflow-x: auto;
        flex-wrap: nowrap;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
    }
    
    .filter-btn {
        flex-shrink: 0;
    }
    
    .quick-categories {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
        margin: 0 -20px 30px;
        padding: 0 20px 8px;
        -webkit-overflow-scrolling: touch;
    }
    
    .quick-cat {
        flex-shrink: 0;
    }
    
    .tools-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .tool-card {
        padding: 20px;
    }
    
    .tool-card-header {
        gap: 12px;
    }
    
    .tool-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
    
    .folders-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        justify-content: center;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero h1 {
        font-size: 24px;
    }
    
    .hero p {
        font-size: 15px;
    }
    
    .tool-name {
        font-size: 15px;
    }
    
    .tool-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tool-card {
    animation: fadeIn 0.3s ease forwards;
}

.tool-card:nth-child(1) { animation-delay: 0.05s; }
.tool-card:nth-child(2) { animation-delay: 0.1s; }
.tool-card:nth-child(3) { animation-delay: 0.15s; }
.tool-card:nth-child(4) { animation-delay: 0.2s; }
.tool-card:nth-child(5) { animation-delay: 0.25s; }
.tool-card:nth-child(6) { animation-delay: 0.3s; }

/* Print Styles */
@media print {
    .header,
    .filters,
    .quick-categories,
    .search-container,
    .footer {
        display: none;
    }
    
    .hero {
        padding: 20px 0;
        background: none;
        color: #000;
    }
    
    .main-content {
        padding: 0;
    }
    
    .tool-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}
