/* ==========================================================================
   Ankalima FCI - Elegant Dark Theme
   Luksusowy design: ciemne tło, złote akcenty, duże zdjęcia
   ========================================================================== */

:root {
    --gold: #c9a96e;
    --gold-light: #e2cfa0;
    --gold-dark: #a07d3f;
    --dark: #1a1a1a;
    --dark-card: #222222;
    --dark-surface: #2a2a2a;
    --dark-border: #333333;
    --dark-muted: #999999;
    --text: #e0e0e0;
    --text-secondary: #aaaaaa;
    --white: #ffffff;
    --font-heading: 'Cormorant Garamond', 'Georgia', serif;
    --font-body: 'Raleway', 'Segoe UI', sans-serif;
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 400;
    color: var(--text);
    background: var(--dark);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--gold);
    font-weight: 600;
    letter-spacing: 0.02em;
}

h1 { font-size: 2.6rem; font-weight: 700; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

a {
    color: var(--gold);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover { color: var(--gold-light); }

img { max-width: 100%; height: auto; }

::selection {
    background: var(--gold);
    color: var(--dark);
}

/* --- Navbar (sticky, glass) --- */
.navbar-ankalima {
    background: rgba(26, 26, 26, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 169, 110, 0.15);
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: background 0.3s;
}

.navbar-ankalima .navbar-brand {
    color: var(--white);
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 12px 0;
    text-decoration: none;
}

.navbar-ankalima .navbar-brand:hover {
    color: var(--white);
}

.brand-name {
    font-family: 'Cinzel', var(--font-heading), serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    color: var(--white);
    text-transform: uppercase;
}

.brand-sub {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 400;
    font-style: italic;
    color: var(--gold);
    letter-spacing: 0.06em;
    opacity: 0.9;
}

.navbar-ankalima .nav-link {
    color: rgba(255,255,255,0.7);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.82rem;
    padding: 18px 16px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: color 0.3s;
    position: relative;
}

.navbar-ankalima .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gold);
    transition: all 0.3s;
    transform: translateX(-50%);
}

.navbar-ankalima .nav-link:hover,
.navbar-ankalima .nav-link.active {
    color: var(--gold);
}

.navbar-ankalima .nav-link.active::after,
.navbar-ankalima .nav-link:hover::after {
    width: 60%;
}

.navbar-ankalima .navbar-toggler {
    border: 1px solid rgba(201, 169, 110, 0.4);
    padding: 6px 10px;
}

.navbar-ankalima .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28201,169,110,0.9%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

body { padding-top: 56px; }

/* --- Hero (fullscreen) --- */
.hero {
    position: relative;
    height: 100vh;
    min-height: 500px;
    margin-top: -56px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-bg img,
.hero-bg .swiper,
.hero-bg .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0,0,0,0.3) 0%,
        rgba(0,0,0,0.15) 40%,
        rgba(0,0,0,0.5) 80%,
        rgba(26,26,26,1) 100%
    );
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
    padding: 0 2rem;
}

.hero-content h1 {
    font-size: 4rem;
    color: var(--white);
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 40px rgba(0,0,0,0.5);
}

.hero-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
}

.hero-logo-name {
    font-family: 'Cinzel', var(--font-heading), serif;
    font-size: 5rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    color: var(--white);
    display: block;
    text-shadow: 0 2px 40px rgba(0,0,0,0.5);
}

.hero-logo-sub {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 400;
    font-style: italic;
    color: var(--gold-light);
    letter-spacing: 0.12em;
    display: block;
    margin-top: -0.2rem;
    margin-bottom: 1.5rem;
}

.hero-content .hero-divider {
    width: 80px;
    height: 2px;
    background: var(--gold);
    margin: 0 auto 2rem;
}

.hero-scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    color: var(--gold);
    font-size: 1.5rem;
    animation: bounce 2s infinite;
    opacity: 0.7;
}

@keyframes bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(10px); }
}

/* --- Page Hero (podstrony) --- */
.page-hero {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-surface) 100%);
    padding: 5rem 0 3rem;
    text-align: center;
    border-bottom: 1px solid var(--dark-border);
    margin-top: -56px;
    padding-top: calc(56px + 3rem);
}

.page-hero h1 {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.page-hero .page-hero-sub {
    color: var(--gold);
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-style: italic;
}

/* --- Main Content --- */
.site-content {
    background: var(--dark);
    min-height: 60vh;
}

.content-section {
    padding: 5rem 0;
}

.content-section + .content-section {
    border-top: 1px solid var(--dark-border);
}

.content-section.alt {
    background: var(--dark-card);
}

.section-heading {
    text-align: center;
    margin-bottom: 3rem;
}

.section-heading h2 {
    font-size: 2.4rem;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.section-heading p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.section-heading .heading-line {
    width: 60px;
    height: 2px;
    background: var(--gold);
    margin: 1rem auto 0;
}

/* --- Dog Cards --- */
.dog-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    height: 100%;
}

.dog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.4), 0 0 0 1px var(--gold-dark);
}

.dog-card .card-img-wrap {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
}

.dog-card .card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.dog-card:hover .card-img-wrap img {
    transform: scale(1.05);
}

.dog-card .card-img-overlay-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    pointer-events: none;
}

.dog-card .card-body {
    padding: 1.2rem;
    text-align: center;
}

.dog-card .card-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--gold);
    margin-bottom: 0.3rem;
}

.dog-card .card-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.dog-card.deceased { opacity: 0.6; }
.dog-card.deceased .card-img-wrap img { filter: grayscale(80%); }
.dog-card.deceased:hover { opacity: 0.85; }

/* --- Dog Profile --- */
.dog-profile-photo {
    border-radius: 12px;
    border: 2px solid var(--dark-border);
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    transition: border-color 0.3s;
}

.dog-profile-photo:hover {
    border-color: var(--gold-dark);
}

.dog-info-label {
    color: var(--gold);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.2rem;
}

.dog-info-value {
    color: var(--text);
    margin-bottom: 1.2rem;
}

.dog-achievements li {
    padding: 8px 0;
    border-bottom: 1px solid var(--dark-border);
    color: var(--text);
}
.dog-achievements li:last-child { border-bottom: none; }
.dog-achievements i { color: var(--gold); margin-right: 8px; }

/* --- Gallery --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, filter 0.5s ease;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    transition: background 0.3s;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item:hover::after {
    background: rgba(201, 169, 110, 0.15);
}

/* --- Litter Cards --- */
.litter-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 12px;
    padding: 1.8rem;
    margin-bottom: 1.2rem;
    transition: border-color 0.3s, transform 0.3s;
}

.litter-card:hover {
    border-color: var(--gold-dark);
    transform: translateX(6px);
}

.litter-letter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    border-radius: 50%;
    margin-right: 1.2rem;
    flex-shrink: 0;
}

/* --- Puppy Cards --- */
.puppy-card {
    background: var(--dark-surface);
    border: 1px solid var(--dark-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.puppy-card h4, .puppy-card h5 {
    color: var(--gold);
    margin-bottom: 0.3rem;
}

/* --- Parent Card --- */
.parent-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    transition: border-color 0.3s;
}
.parent-card:hover { border-color: var(--gold-dark); }
.parent-card h4 { color: var(--gold-light); }

/* --- Videos --- */
.video-card {
    margin-bottom: 1.5rem;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    border: 1px solid var(--dark-border);
}

.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border: none;
}

/* --- Contact --- */
.contact-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 12px;
    padding: 2rem;
}

.contact-card i {
    color: var(--gold);
    font-size: 1.3rem;
    width: 35px;
}

.contact-card a { color: var(--text); }
.contact-card a:hover { color: var(--gold); }

.contact-map {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--dark-border);
}

.contact-map iframe {
    width: 100%;
    height: 400px;
    border: none;
    filter: grayscale(60%) invert(92%) contrast(83%);
}

/* --- Pedigree Table --- */
.pedigree-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin: 1.5rem 0;
}

.pedigree-table td {
    border: 1px solid var(--dark-border);
    padding: 8px 12px;
    vertical-align: middle;
    text-align: center;
    color: var(--text);
}

.pedigree-table td.male { background: rgba(59, 130, 246, 0.1); }
.pedigree-table td.female { background: rgba(236, 72, 153, 0.1); }

/* --- About section (home) --- */
.about-text {
    font-size: 1.05rem;
    line-height: 1.9;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.about-text p { margin-bottom: 1.2rem; }

/* --- Breadcrumb --- */
.breadcrumb-dark {
    padding: 0;
    margin-bottom: 2rem;
    font-size: 0.85rem;
    background: none;
}

.breadcrumb-dark .breadcrumb-item a {
    color: var(--gold);
}

.breadcrumb-dark .breadcrumb-item.active {
    color: var(--text-secondary);
}

.breadcrumb-dark .breadcrumb-item + .breadcrumb-item::before {
    color: var(--dark-muted);
}

/* --- Buttons --- */
.btn-gold {
    background: transparent;
    border: 2px solid var(--gold);
    color: var(--gold);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 12px 32px;
    border-radius: 0;
    transition: all 0.3s;
}

.btn-gold:hover {
    background: var(--gold);
    color: var(--dark);
}

.btn-gold-solid {
    background: var(--gold);
    border: 2px solid var(--gold);
    color: var(--dark);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 12px 32px;
    border-radius: 0;
    transition: all 0.3s;
}

.btn-gold-solid:hover {
    background: var(--gold-light);
    border-color: var(--gold-light);
    color: var(--dark);
}

/* btn-ankalima compatibility for admin links */
.btn-ankalima {
    background-color: var(--gold);
    border-color: var(--gold);
    color: var(--dark);
}
.btn-ankalima:hover {
    background-color: var(--gold-dark);
    border-color: var(--gold-dark);
    color: var(--white);
}

/* --- 404 --- */
.error-page {
    text-align: center;
    padding: 6rem 0;
}

.error-page h1 {
    font-size: 8rem;
    color: var(--gold);
    line-height: 1;
    margin-bottom: 1rem;
}

.error-page p {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* --- Footer --- */
.site-footer {
    background: #111111;
    color: var(--text-secondary);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--dark-border);
}

.site-footer h5 {
    color: var(--gold);
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.site-footer a { color: var(--text-secondary); }
.site-footer a:hover { color: var(--gold); }

.site-footer hr {
    border-color: var(--dark-border);
    margin: 2rem 0 1.5rem;
}

.site-footer .footer-bottom {
    font-size: 0.8rem;
    color: var(--dark-muted);
}

.footer-brand {
    font-family: 'Cinzel', var(--font-heading), serif;
    font-size: 1.6rem;
    color: var(--white);
    font-weight: 700;
    letter-spacing: 0.15em;
    display: block;
    margin-bottom: 0.2rem;
}

.footer-brand-sub {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-style: italic;
    color: var(--gold);
    letter-spacing: 0.06em;
    display: block;
    margin-bottom: 0.5rem;
}

/* --- Flash messages (dark theme) --- */
.alert { border-radius: 8px; }

/* --- Responsive --- */
@media (max-width: 991.98px) {
    .hero-logo-name { font-size: 3.5rem; }
    .hero-logo-sub { font-size: 1.2rem; }
    .hero-content h1 { font-size: 2.5rem; }
    .page-hero h1 { font-size: 2.2rem; }
    .section-heading h2 { font-size: 2rem; }
    .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
    .navbar-ankalima .collapse { background: rgba(26,26,26,0.98); }
    .brand-sub { display: none; }
}

@media (max-width: 575.98px) {
    .hero { min-height: 400px; }
    .hero-logo-name { font-size: 2.2rem; letter-spacing: 0.12em; }
    .hero-logo-sub { font-size: 0.9rem; }
    .hero-content h1 { font-size: 1.8rem; letter-spacing: 0.08em; }
    .page-hero h1 { font-size: 1.8rem; }
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.4rem; }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 4px;
    }
    .dog-card .card-title { font-size: 1.1rem; }
    .content-section { padding: 3rem 0; }
    .litter-letter { width: 44px; height: 44px; font-size: 1.5rem; }
    .brand-name { font-size: 1.2rem; }
}

/* ==========================================================================
   Admin Panel (light theme override)
   ========================================================================== */

.admin-wrapper { min-height: 100vh; background: #f5f6fa; color: #414141; }

.admin-sidebar {
    background: #1a1a1a;
    min-height: 100vh;
    width: 250px;
    position: fixed;
    left: 0; top: 0;
    padding-top: 1rem;
    z-index: 100;
    transition: transform 0.3s;
}

.admin-sidebar .brand {
    color: var(--gold);
    font-family: var(--font-heading);
    font-size: 1.3rem;
    padding: 0.5rem 1rem 1.5rem;
    border-bottom: 1px solid #333;
    display: block;
    text-decoration: none;
}

.admin-sidebar .nav-link {
    color: #aaa;
    padding: 10px 20px;
    font-size: 0.9rem;
    border-left: 3px solid transparent;
    transition: all 0.3s;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(201,169,110,0.15);
    color: var(--gold);
    border-left-color: var(--gold);
}

.admin-sidebar .nav-link i { width: 24px; margin-right: 8px; }

.admin-content {
    margin-left: 250px;
    padding: 1.5rem;
    color: #414141;
}

.admin-header {
    background: #fff;
    padding: 1rem 1.5rem;
    margin: -1.5rem -1.5rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #414141;
}

.admin-card {
    background: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    margin-bottom: 1.5rem;
    color: #414141;
}

.admin-stat {
    text-align: center;
    padding: 1.5rem;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
    color: #414141;
}

.admin-stat .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold);
    font-family: var(--font-heading);
}

.admin-stat .stat-label {
    font-size: 0.9rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.admin-card .form-label { font-weight: 500; color: #414141; }
.admin-card .form-control:focus,
.admin-card .form-select:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 0.2rem rgba(201,169,110,0.25);
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark);
}

.login-card {
    max-width: 400px;
    width: 100%;
    padding: 2.5rem;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    color: var(--text);
}

.login-card h2 { text-align: center; margin-bottom: 1.5rem; }
.login-card .form-control {
    background: var(--dark-surface);
    border-color: var(--dark-border);
    color: var(--text);
}
.login-card .form-control:focus {
    background: var(--dark-surface);
    border-color: var(--gold);
    color: var(--text);
    box-shadow: 0 0 0 0.2rem rgba(201,169,110,0.2);
}
.login-card .form-label { color: var(--text-secondary); }

.admin-table {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.admin-table th {
    background: #fafafa;
    color: #414141;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #eee;
}

.admin-table td { vertical-align: middle; color: #414141; }
.admin-table .thumb-preview { width: 60px; height: 45px; object-fit: cover; border-radius: 4px; }

@media (max-width: 991.98px) {
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.show { transform: translateX(0); }
    .admin-content { margin-left: 0; }
}

/* ==========================================================================
   Rodowód (Pedigree)
   ========================================================================== */
.pedigree-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.75rem;
    padding: 0 0.75rem;
}

.pedigree-table {
    width: 100%;
    min-width: 700px;
    border-collapse: collapse;
    font-size: 13px;
    line-height: 1.4;
    table-layout: fixed;
}

.pedigree-table td {
    border: 1px solid var(--dark-border);
    padding: 8px 10px;
    vertical-align: middle;
    text-align: center;
    color: var(--text);
    background: var(--dark-card);
}

.pedigree-table .pedigree-parent {
    width: 22%;
    font-weight: 600;
    font-size: 14px;
    background: var(--dark-surface);
}

.pedigree-table .pedigree-gp {
    width: 22%;
    background: var(--dark-card);
}

.pedigree-table .pedigree-ggp {
    width: 26%;
    background: var(--dark-card);
    font-size: 12.5px;
}

.pedigree-table .pedigree-gggp {
    width: 30%;
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--dark);
}

.pedigree-dam-row td {
    background: rgba(201, 169, 110, 0.05) !important;
}

.pedigree-dam-row .pedigree-parent {
    background: rgba(201, 169, 110, 0.1) !important;
}

.pedigree-dam-row .pedigree-gggp {
    background: rgba(201, 169, 110, 0.03) !important;
}

.pedigree-table .ch-title {
    color: var(--gold);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
}

.pedigree-table strong {
    color: var(--white);
}

@media (max-width: 575.98px) {
    .pedigree-table { font-size: 11px; min-width: 600px; }
    .pedigree-table td { padding: 5px 6px; }
    .pedigree-table .ch-title { font-size: 10px; }
}
