/* Portal Firm Gminy Świecie - Main Styles */

/* ===== VARIABLES ===== */
:root {
    --primary-color: #2563eb;
    --secondary-color: #1d4ed8;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --text-color: #374151;
    --text-muted: #6b7280;
    --border-color: #e5e7eb;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --border-radius: 0.5rem;
    --transition: all 0.3s ease;
}

/* ===== GLOBAL STYLES ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #ffffff;
}

.text-primary { color: var(--primary-color) !important; }
.bg-primary { background-color: var(--primary-color) !important; }
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transition: var(--transition);
}
.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="60" height="60" viewBox="0 0 60 60" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><g fill="%23ffffff" fill-opacity="0.05"><circle cx="30" cy="30" r="1"/></g></svg>');
    pointer-events: none;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.search-box {
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 5px;
}

.suggestion-logo {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 50%;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-color);
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    cursor: pointer;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* ===== SECTIONS ===== */
.categories-section,
.featured-section,
.top-rated-section,
.reviews-section {
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 3rem;
}

/* ===== CARDS ===== */
.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

/* Category Cards */
.category-card {
    display: block;
    text-decoration: none;
    color: inherit;
}

.category-card:hover {
    color: inherit;
    text-decoration: none;
}

.category-icon {
    transition: var(--transition);
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

/* Company Cards */
.company-card .card-img-top-container {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.company-card .card-img-top {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.company-card:hover .card-img-top {
    transform: scale(1.05);
}

.company-avatar {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--border-color);
}

.company-avatar-placeholder {
    width: 50px;
    height: 50px;
    background: var(--light-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    border: 2px solid var(--border-color);
}

/* ===== RATINGS ===== */
.rating-stars {
    display: inline-flex;
    gap: 2px;
}

.rating-stars i {
    font-size: 0.875rem;
}

.rating-display {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rating-value {
    font-weight: 600;
    color: var(--text-color);
}

.rating-info {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* ===== BADGES ===== */
.badge {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 2rem;
}

/* ===== NEWSLETTER SECTION ===== */
.newsletter-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
}

.newsletter-section .form-control {
    border: none;
    padding: 0.75rem 1rem;
    border-radius: var(--border-radius);
}

.newsletter-section .btn-light {
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
}

.newsletter-section .btn-light:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .hero-section {
        min-height: 90vh;
        padding: 2rem 0;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .search-box {
        padding: 1.5rem !important;
    }

    .stat-number {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .company-card .card-img-top-container {
        height: 150px;
    }
}

@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 1.75rem;
    }

    .search-box .row > div {
        margin-bottom: 0.5rem;
    }

    .newsletter-section .d-flex {
        flex-direction: column;
        gap: 1rem;
    }

    .newsletter-section .form-control,
    .newsletter-section .btn {
        width: 100%;
    }
}

/* ===== UTILITIES ===== */
.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--primary-color), var(--accent-color)) 1;
}

/* ===== LOADING STATES ===== */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4),
        transparent
    );
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in-up.animate {
    opacity: 1;
    transform: translateY(0);
}

/* ===== CUSTOM SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-color);
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-color);
}

/* ===== PRINT STYLES ===== */
@media print {
    .hero-section,
    .newsletter-section,
    .scroll-indicator {
        display: none;
    }

    .container {
        max-width: 100%;
        padding: 0;
    }

    .card {
        border: 1px solid var(--border-color);
        break-inside: avoid;
    }
}