/* insure_flat_frontend/css/style.css */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #fff6f9;
    margin: 0;
    padding: 0;
    color: #4a2c36;
}
header {
    background: #2a7de1;
    color: #fff;
    padding: 2rem 0 1rem 0;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.main-header {
    background: linear-gradient(90deg, #2b5876 0%, #4e4376 100%);
    color: #fff;
    padding: 2.5rem 0 1.5rem 0;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 4px 24px rgba(46, 54, 80, 0.10);
    margin-bottom: 2.5rem;
}
.header-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 1.5rem;
}
.header-logo {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    background: #fff;
    object-fit: cover;
}
.main-header h1 {
    font-family: 'Montserrat', 'Inter', Arial, sans-serif;
    font-size: 2.6rem;
    font-weight: 800;
    margin: 0 0 0.3rem 0;
    letter-spacing: -1px;
}
.subtitle {
    font-size: 1.1rem;
    font-weight: 400;
    color: #e0e0e0;
    margin: 0;
    letter-spacing: 0.2px;
}
main {
    max-width: 900px;
    margin: 2rem auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.07);
    padding: 2rem;
}
.offer-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}
.offer-card {
    background: #f2f6fa;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.04);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: box-shadow 0.2s;
}
.offer-card:hover {
    box-shadow: 0 4px 16px rgba(42,125,225,0.12);
}
.offer-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2a7de1;
}
.offer-desc {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: #444;
}
.offer-meta {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 0.5rem;
}
.affiliate-link {
    display: inline-block;
    background: #2a7de1;
    color: #fff;
    padding: 0.5rem 1.2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    margin-top: auto;
    transition: background 0.2s;
}
.affiliate-link:hover {
    background: #1a5bb8;
}
.views {
    font-size: 0.9rem;
    color: #888;
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
}
.views svg {
    margin-right: 0.3rem;
    fill: #2a7de1;
}
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    background: #eaf2fb;
    padding: 1.2rem 1.5rem;
    border-radius: 10px;
    box-shadow: 0 1px 6px rgba(42,125,225,0.06);
    align-items: center;
}
.filters input[type="text"],
.filters select {
    padding: 0.6rem 1rem;
    border: 1px solid #b5c9e3;
    border-radius: 6px;
    font-size: 1rem;
    outline: none;
    transition: border 0.2s;
    background: #fff;
    min-width: 180px;
}
.filters input[type="text"]:focus,
.filters select:focus {
    border: 1.5px solid #2a7de1;
}
#filterBtn {
    background: #2a7de1;
    color: #fff;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 4px rgba(42,125,225,0.08);
}
#filterBtn:hover {
    background: #1a5bb8;
}
.offer-type-switch {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}
.offer-type-switch button {
    background: #eaf2fb;
    color: #2a7de1;
    border: none;
    padding: 0.7rem 2.2rem;
    border-radius: 24px;
    font-size: 1.08rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.18s, color 0.18s, box-shadow 0.18s;
    box-shadow: 0 1px 4px rgba(42,125,225,0.07);
    outline: none;
}
.offer-type-switch button.active {
    background: linear-gradient(90deg, #2a7de1 60%, #1a5bb8 100%);
    color: #fff;
    box-shadow: 0 2px 8px rgba(42,125,225,0.13);
}
.offer-type-switch button:not(.active):hover {
    background: #d2e3fa;
    color: #1a5bb8;
}
.professional-header {
    background: linear-gradient(90deg, #1e3c72 0%, #2a5298 100%);
    color: #fff;
    padding: 2.2rem 0 1.2rem 0;
    box-shadow: 0 2px 12px 0 rgba(30,60,114,0.07);
    border-bottom: 1.5px solid #e3e8f0;
}
.professional-header-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0 2rem;
}
.header-logo-text {
    font-family: 'Segoe UI', 'Montserrat', 'Arial', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    margin-bottom: 0.2rem;
}
.brand-main {
    color: #fff;
    text-shadow: 0 2px 8px rgba(30,60,114,0.10);
}
.brand-accent {
    color: #e75480 !important;
    margin-left: 0.15em;
    text-shadow: 0 2px 8px rgba(255,179,71,0.10);
}
.header-subtitle .subtitle {
    font-size: 1.08rem;
    font-weight: 400;
    color: #e3e8f0;
    margin: 0 0 0 2px;
    letter-spacing: 0.2px;
}
/* --- ULTRA MINIMALISTIC, PROFESSIONAL HEADER --- */
.ultra-modern-header {
    background: #fff;
    border-bottom: 1.5px solid #e3e8f0;
    box-shadow: 0 2px 12px 0 rgba(30,60,114,0.04);
    border-radius: 0 0 18px 18px;
    min-height: 80px;
    position: relative;
    z-index: 1;
}
.header-glass-bg {
    display: none !important;
}
.ultra-modern-header-content {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 80px;
    padding: 0 2rem;
}
.ultra-modern-logo {
    font-family: 'Montserrat', 'Segoe UI', Arial, sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: 1.2px;
    color: #222;
    background: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    text-shadow: none;
    display: flex;
    align-items: center;
}
.brand-main {
    color: #222;
}
.brand-accent {
    color: #2a7de1;
    margin-left: 0.18em;
    font-weight: 900;
}
.ultra-modern-subtitle {
    margin-left: 2.5rem;
    background: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    color: #555;
    font-size: 1.08rem;
    font-weight: 400;
    letter-spacing: 0.2px;
    display: flex;
    align-items: center;
}
.ultra-modern-subtitle .subtitle {
    color: #555;
    font-size: 1.08rem;
    font-weight: 400;
    letter-spacing: 0.2px;
    text-shadow: none;
}
@media (max-width: 900px) {
    .ultra-modern-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0 1rem;
    }
    .ultra-modern-subtitle {
        margin-left: 0;
        width: 100%;
        padding: 0;
    }
}
@media (max-width: 600px) {
    .ultra-modern-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
        padding: 0 0.7rem;
    }
    .ultra-modern-logo {
        font-size: 1.3rem;
    }
    .ultra-modern-subtitle {
        font-size: 0.98rem;
        padding: 0;
        display: none !important;
    }
}
@media (max-width: 900px) {
    .ultra-modern-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.7rem;
        padding: 0 1.2rem;
    }
    .ultra-modern-subtitle {
        margin-left: 0;
        width: 100%;
        padding: 0.7rem 1rem;
    }
}
@media (max-width: 600px) {
    .ultra-modern-header-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0 0.7rem;
    }
    .ultra-modern-logo {
        font-size: 1.5rem;
        padding: 0.2rem 0.7rem 0.2rem 0.5rem;
    }
    .ultra-modern-subtitle {
        font-size: 0.98rem;
        padding: 0.5rem 0.7rem;
        display: none !important;
    }
}
@media (max-width: 600px) {
    .filters {
        flex-direction: column;
        gap: 0.7rem;
        padding: 1rem;
    }
    .filters input[type="text"],
    .filters select {
        min-width: 100%;
    }
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .main-header {
        padding: 1.2rem 0 1rem 0;
    }
    .header-logo {
        width: 48px;
        height: 48px;
    }
    .main-header h1 {
        font-size: 2rem;
    }
    .offer-type-switch {
        flex-direction: row;
        gap: 0.2rem;
    }
    .offer-type-switch button {
        padding: 0.6rem 1.2rem;
        font-size: 1rem;
    }
    .professional-header-content {
        padding: 0 0.7rem;
    }
    .header-logo-text {
        font-size: 1.5rem;
    }
    .header-subtitle .subtitle {
        font-size: 0.98rem;
    }
}
/* --- RESPONSIVE IMPROVEMENTS FOR MOBILE --- */
@media (max-width: 480px) {
    html, body {
        max-width: 100vw;
        overflow-x: hidden;
        overscroll-behavior-x: contain;
        background: #f7f9fb;
    }
    main {
        box-sizing: border-box;
        padding: 0.5rem 0.5rem;
        border-radius: 0;
        box-shadow: none;
        margin: 0 auto;
        max-width: 100vw;
        min-width: 0;
        width: 100%; /* changed from 100vw to 100% */
        left: unset;
        transform: none;
        position: static;
    }
    .filters, .offer-list, .compliance-info {
        box-sizing: border-box;
        width: 100%; /* changed from 100vw to 100% */
        max-width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    .offer-card {
        box-sizing: border-box;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    .main-header {
        padding: 0.7rem 0 0.5rem 0;
        border-radius: 0 0 12px 12px;
        margin-bottom: 1.2rem;
    }
    .header-content {
        flex-direction: column;
        gap: 0.5rem;
        padding: 0 0.5rem;
        text-align: center;
    }
    .header-logo {
        width: 38px;
        height: 38px;
        border-radius: 8px;
    }
    .main-header h1 {
        font-size: 1.2rem;
    }
    .subtitle {
        font-size: 0.95rem;
    }
    .filters {
        flex-direction: column;
        align-items: stretch;
        padding: 0.5rem 0.2rem;
        gap: 0.4rem;
        border-radius: 8px;
        box-shadow: none;
        margin-bottom: 1.2rem;
    }
    .filters input[type="text"],
    .filters select {
        font-size: 1rem;
        padding: 0.5rem 0.7rem;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }
    #filterBtn {
        padding: 0.6rem 0.7rem;
        font-size: 1rem;
        border-radius: 6px;
        width: 100%;
        margin-top: 0.2rem;
        margin-bottom: 0.2rem;
    }
    .offer-list {
        grid-template-columns: 1fr;
        gap: 0.7rem;
    }
    .offer-card {
        padding: 0.7rem;
        border-radius: 7px;
        box-shadow: 0 1px 4px rgba(42,125,225,0.07);
    }
    .offer-title {
        font-size: 1.05rem;
    }
    .offer-desc {
        font-size: 0.97rem;
    }
    .offer-meta {
        font-size: 0.93rem;
    }
    .affiliate-link {
        font-size: 0.97rem;
        padding: 0.5rem 1rem;
        border-radius: 6px;
        width: 100%;
        text-align: center;
        margin-top: 0.5rem;
    }
    .compliance-info {
        font-size: 0.93rem;
        margin-top: 1.2rem;
        padding: 0 0.2rem;
    }
}

/* GLOBAL: Zapobiegaj wychodzeniu elementów poza ekran na mobile */
html, body, *, *:before, *:after {
    box-sizing: border-box;
}

/* Złam długie teksty/linki na mobile */
@media (max-width: 600px) {
    .offer-card, .affiliate-link, .offer-title, .offer-desc, .offer-meta {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}
@media (max-width: 480px) {
    .offer-card, .affiliate-link, .offer-title, .offer-desc, .offer-meta {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}
::-webkit-scrollbar-thumb {
    background: #ffd6e0;
}
::-webkit-scrollbar-track {
    background: #fff6f9;
}
h1, h2, h3, h4, h5, h6 {
    color: #e75480;
}

.compliance-info {
    background: #fff0f6;
    border-radius: 10px;
    border: 1px solid #ffd6e0;
    color: #4a2c36;
}

/* Ensure .offer-img is visually dominant in all card contexts */
.offer-img {
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    display: block;
    margin-bottom: 1.1rem;
    background: #eaf2fb;
    box-shadow: 0 2px 12px rgba(42,125,225,0.07);
    max-height: 300px;
    min-height: 180px;
}

@media (max-width: 700px) {
    .offer-img {
        height: 180px;
        min-height: 120px;
        border-radius: 10px 10px 0 0;
    }
}
@media (max-width: 480px) {
    .offer-img {
        height: 140px !important;
        min-height: 90px !important;
        border-radius: 7px 7px 0 0 !important;
        margin-bottom: 0.7rem !important;
    }
}
