/**
 * Globalne style frontendowe Weblegend Blocks
 * Ten plik zawiera style wspólne dla wszystkich bloków
 */

/* Reset i podstawowe style */
.weblegend-block-wrapper {
    margin: 30px 0;
}

/* Wspólne style dla nagłówków */
.wl-heading {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    font-weight: 700;
}

.wl-subheading {
    font-size: 1.125rem;
    color: #666;
    margin-bottom: 1.5rem;
}

/* Wspólne style dla przycisków */
.wl-button,
.cta-button,
.wl-cta-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: #007cba;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 500;
    text-align: center;
    border: none;
    cursor: pointer;
}

.wl-button:hover,
.cta-button:hover,
.wl-cta-button:hover {
    background-color: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
    color: #fff;
    text-decoration: none;
}

/* Container */
.wl-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Grid system */
.wl-grid {
    display: grid;
    gap: 30px;
}

.wl-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.wl-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.wl-grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* Flexbox utilities */
.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

/* Spacing utilities */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }
.p-5 { padding: 3rem; }

/* Text utilities */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Responsive images */
.wl-image img,
.weblegend-cta__image,
.wl-block-content img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Animacje */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Media queries */
@media (max-width: 768px) {
    .wl-heading {
        font-size: 2rem;
    }
    
    .wl-grid {
        gap: 20px;
    }
    
    .wl-container {
        padding: 0 15px;
    }
    
    /* Mobilny flexbox */
    .d-flex {
        flex-direction: column;
    }
    
    .d-flex.flex-row-mobile {
        flex-direction: row;
    }
}

/* Accessibility */
.screen-reader-text {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Focus styles */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .wl-button,
    .cta-button,
    .wl-cta-button {
        display: none;
    }
}