/* Publix - Modern & Mobile-First Styling */

:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary-color: #8b5cf6;
    --accent-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;

    --text-color: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;

    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --border-color: #e2e8f0;

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --header-height: 70px;
    --header-height-mobile: 60px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding-top: var(--header-height);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Header & Navigation - Improved Mobile */
header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    padding: 0.75rem 0;
    box-shadow: var(--shadow-md);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-height);
    transition: transform 0.3s ease;
}

header.header-hidden {
    transform: translateY(-100%);
}

nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

nav h1 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav h1 a {
    text-decoration: none;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
    align-items: center;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem;
    font-size: 0.95rem;
}

nav ul li a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0.5rem;
    right: 0.5rem;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: var(--transition);
}

nav ul li a:hover:after {
    transform: scaleX(1);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.user-name {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.btn-logout {
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius-md);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

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

/* Main Content */
main {
    min-height: calc(100vh - var(--header-height) - 100px);
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    margin-bottom: 2rem;
}

.hero h2 {
    font-size: clamp(1.75rem, 5vw, 3rem);
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    line-height: 1.2;
}

.hero p {
    font-size: clamp(1rem, 3vw, 1.35rem);
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
}

/* Login Page - Mobile Optimized */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - var(--header-height));
    padding: 1.5rem;
}

.login-box {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    padding: 2.5rem 2rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 440px;
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.8);
}

.login-box h2 {
    margin-bottom: 0.5rem;
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-subtitle {
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: clamp(0.95rem, 2.5vw, 1.05rem);
}

.login-form {
    margin-bottom: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 0.9rem;
}

.input-icon {
    color: var(--primary-color);
    flex-shrink: 0;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-primary);
    -webkit-appearance: none;
    appearance: none;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Buttons - Touch Optimized */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-decoration: none;
    box-shadow: var(--shadow-md);
    min-height: 48px;
    touch-action: manipulation;
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-block {
    width: 100%;
    margin-top: 0.5rem;
}

.btn-icon {
    transition: var(--transition);
    flex-shrink: 0;
}

.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    min-height: 44px;
    padding: 0.5rem;
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: var(--radius-md);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    font-size: 0.95rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid rgba(239, 68, 68, 0.3);
    color: #dc2626;
}

.alert-success {
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid rgba(16, 185, 129, 0.3);
    color: #059669;
}

/* Search Form */
.search-form {
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.search-input {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    transition: var(--transition);
    background: var(--bg-secondary);
    -webkit-appearance: none;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    background: var(--bg-primary);
}

.filters {
    margin: 1.25rem 0;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    background: var(--bg-secondary);
    transition: var(--transition);
}

.filters summary {
    cursor: pointer;
    font-weight: 600;
    padding: 0.5rem;
    color: var(--primary-color);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    min-height: 44px;
}

.filters summary::-webkit-details-marker {
    display: none;
}

.filters summary:before {
    content: '▶';
    transition: var(--transition);
    display: inline-block;
    font-size: 0.8rem;
}

.filters[open] summary:before {
    transform: rotate(90deg);
}

.filter-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

/* Stats Section */
.stats {
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.stats h3 {
    margin-bottom: 1.5rem;
    text-align: center;
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    color: var(--text-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.stat-card {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    padding: 1.5rem 1rem;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.stat-card:active {
    transform: scale(0.98);
}

.stat-value {
    font-size: clamp(2rem, 8vw, 3rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-label {
    color: var(--text-light);
    margin-top: 0.5rem;
    text-transform: capitalize;
    font-weight: 500;
    font-size: clamp(0.85rem, 2.5vw, 1.05rem);
}

.stats-update {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 1rem;
}

/* Info Section */
.info-section {
    margin: 2rem 0;
}

.info-section h3 {
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--text-color);
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.info-card {
    padding: 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 2px solid transparent;
}

.info-card:active {
    transform: scale(0.98);
}

.info-card h4 {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.info-card p {
    color: var(--text-light);
    line-height: 1.7;
    font-size: 0.95rem;
}

/* Results Page */
.search-header {
    margin-bottom: 1.5rem;
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
}

.search-header h2 {
    margin-bottom: 1rem;
    font-size: clamp(1.5rem, 4vw, 2rem);
}

.search-form-compact {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.search-form-compact .search-input {
    margin-bottom: 0;
}

.active-filters {
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-weight: 500;
    font-size: 0.9rem;
}

.filter-tag {
    background: var(--bg-primary);
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--primary-light);
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 600;
}

.clear-filters {
    color: var(--danger-color);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition);
    padding: 0.4rem 0.5rem;
}

.results-info {
    margin-bottom: 1rem;
    color: var(--text-light);
    font-weight: 500;
    font-size: 0.95rem;
}

.results-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.result-card {
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

.result-card:active {
    transform: scale(0.99);
}

.result-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.result-header h3 {
    font-size: clamp(1.1rem, 3vw, 1.35rem);
    line-height: 1.4;
    color: var(--text-color);
}

.source-badge {
    padding: 0.4rem 0.75rem;
    border-radius: var(--radius-md);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
}

.source-tenderned {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #1e40af;
}

.source-openraads {
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    color: #065f46;
}

.source-bekendmakingen {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #92400e;
}

.result-description {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.7;
    font-size: 0.95rem;
}

.result-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.meta-item {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.result-footer {
    display: flex;
    justify-content: flex-end;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 2rem;
    padding: 1.5rem 1rem;
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    flex-wrap: wrap;
}

.btn-pagination {
    padding: 0.75rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
    font-weight: 600;
    background: var(--bg-primary);
    font-size: 0.9rem;
    min-height: 44px;
    display: flex;
    align-items: center;
}

.btn-pagination:active {
    transform: scale(0.95);
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-info {
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.95rem;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 3rem 1.5rem;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.no-results p {
    font-size: clamp(1rem, 3vw, 1.25rem);
    margin-bottom: 1rem;
    color: var(--text-color);
}

.no-results ul {
    list-style: none;
    margin: 1.5rem 0;
}

.no-results li {
    margin: 0.75rem 0;
    color: var(--text-light);
    font-size: 0.95rem;
}

/* About Page */
.about-page {
    max-width: 900px;
    margin: 0 auto;
}

.about-section {
    margin-bottom: 2rem;
    background: var(--bg-primary);
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.about-section h3 {
    margin-bottom: 1rem;
    font-size: clamp(1.25rem, 4vw, 1.75rem);
    color: var(--text-color);
}

.about-section p {
    margin-bottom: 1rem;
    color: var(--text-light);
    line-height: 1.8;
    font-size: 0.95rem;
}

.about-section ul {
    margin-left: 1.5rem;
    color: var(--text-light);
}

.about-section ul li {
    margin: 0.5rem 0;
    line-height: 1.7;
    font-size: 0.95rem;
}

.source-info {
    background: var(--bg-secondary);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    border: 2px solid var(--border-color);
    transition: var(--transition);
}

.source-info h4 {
    margin-bottom: 0.75rem;
    font-size: clamp(1.1rem, 3vw, 1.35rem);
    color: var(--text-color);
}

.source-info p {
    color: var(--text-light);
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.source-info a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    word-break: break-word;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    padding: 2rem 0;
    margin-top: 3rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: var(--text-light);
}

footer p {
    margin: 0.5rem 0;
    font-size: 0.85rem;
}

/* Desktop Improvements */
@media (min-width: 768px) {
    body {
        padding-top: var(--header-height);
    }

    header {
        height: var(--header-height);
    }

    .login-box {
        padding: 3rem 2.5rem;
    }

    .search-form {
        padding: 2rem;
    }

    .search-form-compact {
        flex-direction: row;
    }

    .filter-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .info-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }

    .result-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: flex-start;
    }

    .source-badge {
        align-self: auto;
    }

    .stat-card:hover,
    .info-card:hover,
    .result-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-xl);
        border-color: var(--primary-light);
    }

    .btn-pagination:hover {
        background: var(--primary-color);
        color: white;
        border-color: var(--primary-color);
        transform: translateY(-2px);
        box-shadow: var(--shadow-md);
    }

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

    .btn-primary:hover .btn-icon {
        transform: translateX(3px);
    }
}

/* Mobile Specific */
@media (max-width: 767px) {
    body {
        padding-top: var(--header-height-mobile);
    }

    header {
        height: var(--header-height-mobile);
        padding: 0.5rem 0;
    }

    nav h1 {
        font-size: 1.25rem;
    }

    nav ul {
        font-size: 0.85rem;
        gap: 0.75rem;
    }

    nav ul li a {
        padding: 0.5rem 0.25rem;
    }

    .user-name {
        display: none;
    }

    .user-info {
        padding: 0;
        background: transparent;
    }

    main {
        padding: 1.5rem 0;
    }
}

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

.result-card,
.stat-card,
.info-card {
    animation: fadeIn 0.4s ease-out;
}

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

/* Better Focus Styles for Accessibility */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}
