/* almok.php oldal stílusai — 2026.10.10-ig a almok.php végén volt <style>-ként; a <head>-ben töltődik ($oldalCss), hogy az első kirajzolásnál már érvényes legyen (CLS) */
/* Almok lista oldal */
.almok-section {
    padding: 3rem 0;
}

.almok-info {
    text-align: center;
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.almok-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.alom-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: bounceIn 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    opacity: 0;
}

.alom-card:nth-child(1) { animation-delay: 0.1s; }
.alom-card:nth-child(2) { animation-delay: 0.2s; }
.alom-card:nth-child(3) { animation-delay: 0.3s; }
.alom-card:nth-child(4) { animation-delay: 0.4s; }
.alom-card:nth-child(5) { animation-delay: 0.5s; }
.alom-card:nth-child(6) { animation-delay: 0.6s; }
.alom-card:nth-child(n+7) { animation-delay: 0.7s; }

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(1.5) translateY(-30px);
    }
    50% {
        opacity: 1;
        transform: scale(0.9) translateY(0);
    }
    70% {
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.alom-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.alom-card-image {
    position: relative;
    height: 300px;
    background: #f0f0f0;
    overflow: hidden;
}

.alom-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.alom-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
}

.alom-card-placeholder i {
    font-size: 4rem;
    color: #ccc;
}

.photo-count {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.8rem;
}

.alom-card-content {
    padding: 1.2rem;
}

.alom-card-title {
    margin: 0 0 0.5rem 0;
    color: #2c3e50;
    font-size: 1.3rem;
}

.alom-card-date {
    color: #666;
    font-size: 0.9rem;
    margin: 0 0 0.8rem 0;
}

.alom-card-parents {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.parent-thumb {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.heart-small {
    color: #e74c3c;
    font-size: 1rem;
}

.alom-card-parent-names {
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    margin: 0;
}

/* Részletes nézet */
.alom-detail-section {
    padding: 3rem 0;
}

.back-link-container {
    margin-bottom: 2rem;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.3s ease;
}

.btn-secondary:hover {
    background-color: #5a6268;
    color: white;
}

/* Szülők szekció */
.parents-section {
    margin-bottom: 3rem;
}

.parents-section .section-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

.parents-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.parent-card {
    text-align: center;
}

.parent-label {
    font-size: 0.9rem;
    color: #888;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.parent-link {
    display: block;
    text-decoration: none;
    color: inherit;
    transition: transform 0.3s ease;
}

.parent-link:hover {
    transform: scale(1.05);
}

.parent-image-wrapper {
    position: relative;
    display: inline-block;
}

.parent-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid #fff;
    box-shadow: 0 8px 25px rgba(0,0,0,0.18);
}

.parent-image-placeholder {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 5px solid #fff;
    box-shadow: 0 8px 25px rgba(0,0,0,0.18);
}

.parent-flag {
    position: absolute;
    bottom: 15px;
    right: 15px;
    font-size: 2.5rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.parent-image-placeholder i {
    font-size: 5rem;
    color: #ccc;
}

.parent-name {
    display: block;
    margin-top: 1rem;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.4rem;
}

.heart-icon {
    font-size: 4.5rem;
    color: #e74c3c;
}

/* Leírás */
.alom-description {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 12px;
    margin-bottom: 3rem;
}

.alom-description h2 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.alom-description p {
    color: #555;
    line-height: 1.8;
    margin: 0;
}

/* Galéria */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Galéria Lightbox */
.gallery-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.gallery-lightbox.active {
    display: flex;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: white;
    font-size: 3rem;
    cursor: pointer;
    z-index: 10001;
    transition: transform 0.3s ease;
}

.lightbox-close:hover {
    transform: scale(1.2);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 2rem;
    padding: 1rem;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s ease;
    z-index: 10001;
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 60px 80px;
    box-sizing: border-box;
}

.lightbox-content img {
    max-width: 100%;
    max-height: calc(100vh - 140px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 5px;
}

.lightbox-counter {
    color: white;
    margin-top: 1rem;
    font-size: 1rem;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .lightbox-content {
        padding: 70px 50px;
    }

    .lightbox-content img {
        max-height: calc(100vh - 160px);
    }

    .lightbox-nav {
        font-size: 1.2rem;
        padding: 0.6rem;
    }

    .lightbox-prev {
        left: 5px;
    }

    .lightbox-next {
        right: 5px;
    }

    .lightbox-close {
        top: 10px;
        right: 15px;
        font-size: 2.5rem;
    }
}

@media (max-width: 480px) {
    .lightbox-content {
        padding: 60px 15px;
    }

    .lightbox-content img {
        max-height: calc(100vh - 140px);
    }

    .lightbox-nav {
        font-size: 1rem;
        padding: 0.5rem;
        top: auto;
        bottom: 20px;
        transform: none;
    }

    .lightbox-prev {
        left: 30%;
    }

    .lightbox-next {
        right: 30%;
    }

    .lightbox-counter {
        font-size: 0.9rem;
    }
}

/* Alomhoz tartozó kutyák */
.alom-puppies {
    margin-top: 3rem;
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #eee;
}

.parents-section .section-title::after,
.alom-puppies .section-title::after,
.alom-pedigree .section-title::after,
.alom-gallery .section-title::after {
    display: none;
}

/* Családfa - Pedigree */
.alom-pedigree {
    background: linear-gradient(180deg, #f5f5f5 0%, #e8e8e8 100%);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 3rem;
    overflow: hidden;
}

.alom-pedigree .section-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

.pedigree {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr 1.5fr;
    gap: 1.5rem;
    padding: 2rem;
    min-height: 500px;
    align-items: center;
}

/* SVG vonalak */
.pedigree-lines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.pedigree-lines .line-main {
    stroke: #8B4513;
    stroke-width: 2;
    fill: none;
}

/* Az alom (bal oldal) */
.pedigree-subject {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

/* Szülők (közép - függőlegesen) */
.pedigree-parents {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
    z-index: 2;
    gap: 0.5rem;
    padding-left: 6rem;
}

.pedigree-parent {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Szívek */
.pedigree-heart {
    color: #E91E63;
    font-size: 1.8rem;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2));
    animation: heartbeat 1.5s ease-in-out infinite;
}

.pedigree-heart.vertical {
    margin: 0.3rem 0;
}

.pedigree-heart.small {
    font-size: 1.2rem;
}

@keyframes heartbeat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Nagyszülők (jobb oldal - függőlegesen elválasztva) */
.pedigree-grandparents {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    height: 100%;
    z-index: 2;
}

.pedigree-gp-pair {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: center;
    gap: 0.5rem;
}

/* A szív a fotók magasságához igazodjon, ne a nevekkel együtt vett blokkhoz */
.pedigree-gp-pair .pedigree-heart.small {
    height: 150px;
    display: flex;
    align-items: center;
}

.pedigree-gp {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Kártyák */
.pedigree-card {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #ccc;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    transition: transform 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.pedigree-card:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.pedigree-card.main {
    width: 280px;
    height: 280px;
    border-width: 6px;
    border-color: #8B4513;
}

.pedigree-card.parent {
    width: 150px;
    height: 150px;
}

.pedigree-card.gp {
    width: 150px;
    height: 150px;
}

.pedigree-card.male {
    border-color: #42A5F5;
}

.pedigree-card.female {
    border-color: #EC407A;
}

.pedigree-card.empty {
    border-color: #ccc;
    background: #f5f5f5;
}

.pedigree-card.empty i {
    font-size: 1.5rem;
    color: #aaa;
}

.pedigree-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pedigree-card img.placeholder-img {
    object-fit: contain;
    padding: 5px;
}

.pedigree-card .no-photo {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: #ccc;
}

/* Kártya wrapper a zászlóhoz */
.pedigree-card-wrapper {
    position: relative;
    display: inline-block;
}

.pedigree-flag {
    position: absolute;
    bottom: 5px;
    right: 5px;
    font-size: 1.2rem;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.3));
    z-index: 3;
}

.pedigree-flag.small {
    font-size: 1.2rem;
}

/* Nevek */
.pedigree-name {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #2c3e50;
    text-decoration: none;
    text-align: center;
    max-width: 140px;
    word-wrap: break-word;
    line-height: 1.2;
}

.pedigree-name.main {
    font-size: 0.85rem;
    color: var(--primary-color);
    max-width: 200px;
}

.pedigree-name.small {
    font-size: 0.75rem;
    max-width: 140px;
}

a.pedigree-name:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

.pedigree-role {
    font-size: 0.55rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 0.1rem;
}


.puppies-stats {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.puppies-stats .male-count {
    color: #3498db;
}

.puppies-stats .female-count {
    color: #e91e8c;
}

.puppies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 2.5rem;
}

.puppy-card {
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.puppy-card:hover {
    transform: scale(1.05);
}

.puppy-card.deceased .puppy-image img {
    filter: grayscale(100%);
    opacity: 0.85;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.puppy-card.deceased:hover .puppy-image img {
    filter: grayscale(0%);
    opacity: 1;
}

.puppy-image {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    background: #f0f0f0;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    border: 5px solid #fff;
}

.puppy-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.puppy-image .no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4.5rem;
    color: #ccc;
}

.puppy-info {
    padding: 0.75rem 0.5rem 0;
    text-align: center;
}

.puppy-info h3 {
    margin: 0 0 0.4rem 0;
    font-size: 1.2rem;
    color: #2c3e50;
}

.puppy-info h3 .gender-icon {
    margin-left: 0.4rem;
    font-size: 1.1rem;
}

.puppy-info h3 .gender-icon.male {
    color: #3498db;
}

.puppy-info h3 .gender-icon.female {
    color: #e91e8c;
}

.puppy-info .registry-name {
    margin: 0;
    font-size: 0.85rem;
    color: #7f8c8d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 220px;
}

/* Responsive */
@media (max-width: 768px) {
    .almok-grid {
        grid-template-columns: 1fr;
    }

    .parents-grid {
        gap: 1.5rem;
    }

    .parent-image,
    .parent-image-placeholder {
        width: 180px;
        height: 180px;
    }

    .parent-name {
        font-size: 1.2rem;
    }

    .parent-flag {
        font-size: 2rem;
        bottom: 10px;
        right: 10px;
    }

    .heart-icon {
        font-size: 3rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .puppies-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .puppy-image {
        width: 150px;
        height: 150px;
    }

    .alom-puppies {
        margin-bottom: 2rem;
        padding-bottom: 2rem;
    }

    /* Családfa mobil */
    .alom-pedigree {
        padding: 1.5rem 0.5rem;
    }

    .pedigree {
        padding: 1rem 0.5rem;
        min-height: 400px;
        gap: 0.5rem;
    }

    .pedigree-parents {
        padding-left: 3rem;
    }

    .pedigree-card.main {
        width: 120px;
        height: 120px;
    }

    .pedigree-card.parent {
        width: 90px;
        height: 90px;
    }

    .pedigree-card.gp {
        width: 90px;
        height: 90px;
    }

    .pedigree-card .no-photo {
        font-size: 2rem;
    }

    .pedigree-name {
        font-size: 0.55rem;
        max-width: 80px;
    }

    .pedigree-name.main {
        font-size: 0.65rem;
        max-width: 100px;
    }

    .pedigree-name.small {
        font-size: 0.55rem;
        max-width: 80px;
    }

    .pedigree-role {
        font-size: 0.5rem;
    }

    .pedigree-gp-pair {
        gap: 0.3rem;
    }

    .pedigree-gp-pair .pedigree-heart.small {
        height: 90px;
    }

    .pedigree-heart {
        font-size: 1.2rem;
    }

    .pedigree-heart.small {
        font-size: 0.9rem;
    }
}
