/* Karkonosze24.com – główny arkusz stylów */

/* ============================================================
   RESET & BASE
   ============================================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: #f5f7f2;
    color: #2c3e2d;
    line-height: 1.7;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: #2e7d32;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ============================================================
   LAYOUT HELPERS
   ============================================================ */

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================================
   SITE HEADER
   ============================================================ */

.site-header {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 60%, #388e3c 100%);
    color: #fff;
    padding: 24px 0 20px;
    text-align: center;
    box-shadow: 0 3px 12px rgba(0,0,0,0.18);
}

.site-header .site-title {
    font-size: clamp(1.8rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.site-header .site-tagline {
    font-size: 1rem;
    opacity: .85;
    margin-top: 6px;
}

.site-nav {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.site-nav a {
    color: #c8e6c9;
    font-weight: 600;
    font-size: .95rem;
    padding: 4px 10px;
    border-radius: 4px;
    transition: background .2s, color .2s;
}

.site-nav a:hover {
    background: rgba(255,255,255,.15);
    color: #fff;
    text-decoration: none;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */

main {
    padding-bottom: 60px;
}

/* ============================================================
   SECTION HEADINGS
   ============================================================ */

.section-heading {
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 700;
    color: #1b5e20;
    border-left: 5px solid #43a047;
    padding: 8px 0 8px 16px;
    margin-bottom: 28px;
}

/* ============================================================
   LINKS SECTION
   ============================================================ */

.links-section {
    padding: 48px 0 36px;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 22px;
}

.link-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s, box-shadow .2s;
}

.link-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.13);
}

.link-card__img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.link-card__img-placeholder {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, #c8e6c9, #a5d6a7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.link-card__body {
    padding: 18px 20px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.link-card__title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1b5e20;
    margin-bottom: 8px;
}

.link-card__desc {
    font-size: .92rem;
    color: #555;
    flex: 1;
    margin-bottom: 16px;
}

.link-card__btn {
    display: inline-block;
    padding: 9px 18px;
    background: #2e7d32;
    color: #fff;
    border-radius: 6px;
    font-weight: 600;
    font-size: .9rem;
    align-self: flex-start;
    transition: background .2s;
}

.link-card__btn:hover {
    background: #1b5e20;
    text-decoration: none;
}

/* ============================================================
   BANNER BLOCK
   ============================================================ */

.banner-block {
    background: #e8f5e9;
    padding: 28px 0;
    text-align: center;
}

.banner-block__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.banner-item {
    display: inline-block;
    border-radius: 8px;
    overflow: hidden;
    max-width: 100%;
}

.banner-item img {
    max-width: 100%;
    height: auto;
    max-height: 150px;
    object-fit: contain;
    border-radius: 8px;
}

.banner-placeholder {
    background: #c8e6c9;
    border: 2px dashed #81c784;
    border-radius: 8px;
    padding: 30px 60px;
    color: #388e3c;
    font-weight: 600;
    display: inline-block;
}

/* ============================================================
   REGION INFO SECTION
   ============================================================ */

.region-section {
    padding: 56px 0 48px;
}

.region-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 3px 16px rgba(0,0,0,0.09);
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    margin-bottom: 36px;
}

.region-card:last-child {
    margin-bottom: 0;
}

.region-card__img {
    width: 100%;
    height: 340px;
    object-fit: cover;
}

.region-card__img-placeholder {
    width: 100%;
    height: 340px;
    background: linear-gradient(135deg, #a5d6a7, #66bb6a);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 5rem;
}

.region-card__body {
    padding: 40px 44px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.region-card__heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1b5e20;
    margin-bottom: 18px;
}

.region-card__text {
    color: #444;
    font-size: .97rem;
    line-height: 1.8;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
    background: #1b5e20;
    color: #c8e6c9;
    text-align: center;
    padding: 28px 20px;
    font-size: .9rem;
}

.site-footer a {
    color: #a5d6a7;
}

/* ============================================================
   ADMIN PANEL
   ============================================================ */

.admin-wrap {
    max-width: 960px;
    margin: 40px auto;
    padding: 0 20px;
}

.admin-header {
    background: #1b5e20;
    color: #fff;
    padding: 18px 28px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
}

.admin-header h1 {
    font-size: 1.4rem;
}

.admin-header a {
    color: #c8e6c9;
    font-size: .9rem;
}

.admin-nav {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.admin-nav a {
    padding: 9px 20px;
    border-radius: 6px;
    background: #e8f5e9;
    color: #1b5e20;
    font-weight: 600;
    font-size: .92rem;
    transition: background .2s;
}

.admin-nav a:hover,
.admin-nav a.active {
    background: #2e7d32;
    color: #fff;
    text-decoration: none;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    margin-bottom: 28px;
}

.admin-table th,
.admin-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
    font-size: .92rem;
}

.admin-table th {
    background: #f1f8e9;
    color: #2e7d32;
    font-weight: 700;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: #fafff8;
}

.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: .87rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background .2s;
    text-decoration: none;
}

.btn-primary  { background: #2e7d32; color: #fff; }
.btn-primary:hover { background: #1b5e20; text-decoration: none; }
.btn-warning  { background: #f57c00; color: #fff; }
.btn-warning:hover { background: #e65100; text-decoration: none; }
.btn-danger   { background: #c62828; color: #fff; }
.btn-danger:hover { background: #b71c1c; text-decoration: none; }
.btn-secondary { background: #757575; color: #fff; }
.btn-secondary:hover { background: #424242; text-decoration: none; }

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    font-size: .93rem;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: .95rem;
    font-family: inherit;
    transition: border-color .2s;
}

.form-control:focus {
    outline: none;
    border-color: #43a047;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-check input[type=checkbox] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.card-form {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 28px;
}

.alert {
    padding: 12px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: .93rem;
}

.alert-success { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.alert-error   { background: #ffebee; color: #c62828; border: 1px solid #ef9a9a; }

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f8e9;
}

.login-box {
    background: #fff;
    border-radius: 14px;
    padding: 48px 44px;
    box-shadow: 0 6px 32px rgba(0,0,0,0.10);
    width: 100%;
    max-width: 400px;
}

.login-box h1 {
    color: #1b5e20;
    font-size: 1.6rem;
    margin-bottom: 8px;
}

.login-box .sub {
    color: #777;
    font-size: .9rem;
    margin-bottom: 28px;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .region-card {
        grid-template-columns: 1fr;
    }

    .region-card__img,
    .region-card__img-placeholder {
        height: 220px;
    }

    .region-card__body {
        padding: 24px 22px;
    }

    .admin-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .links-grid {
        grid-template-columns: 1fr;
    }
}
