/* Haras Primavera - Frontend Styles */

:root {
    --haras-primary: #590c0c;
    --haras-secondary: #804848;
    --haras-light: #eeeeee;
    --haras-gray: #706f6f;
    --haras-border: #d9d9d9;
}

.haras-cavalo-card {
    background: white;
    border: 2px solid var(--haras-border);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.haras-cavalo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.haras-cavalo-card-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.haras-cavalo-card-content {
    padding: 15px;
}

.haras-cavalo-card-title {
    font-size: 18px;
    font-weight: bold;
    color: #000;
    margin: 0 0 8px 0;
}

.haras-cavalo-card-raca {
    font-size: 14px;
    color: var(--haras-gray);
    margin: 0 0 8px 0;
}

.haras-cavalo-card-pedigree {
    font-size: 12px;
    color: var(--haras-gray);
    margin: 0;
}

.haras-button-primary {
    background: var(--haras-primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.haras-button-primary:hover {
    background: var(--haras-secondary);
    text-decoration: none;
    color: white;
}

.haras-gallery-container {
    margin: 30px 0;
}

.haras-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

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

.haras-gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

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

.haras-pedigree-container {
    margin: 30px 0;
    overflow-x: auto;
}

.haras-pedigree-tree {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    padding: 20px;
}

.haras-pedigree-generation {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    width: 100%;
}

.haras-pedigree-node {
    background: white;
    border: 2px solid var(--haras-primary);
    border-radius: 8px;
    padding: 12px;
    min-width: 150px;
    text-align: center;
    font-weight: bold;
    color: #000;
}

.haras-cavalo-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.haras-cavalo-info-item {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid var(--haras-primary);
}

.haras-cavalo-info-label {
    font-size: 12px;
    color: var(--haras-gray);
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.haras-cavalo-info-value {
    font-size: 16px;
    color: #000;
    font-weight: bold;
}

.haras-cavalo-sobre {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--haras-border);
    margin: 30px 0;
}

.haras-cavalo-sobre h3 {
    color: var(--haras-primary);
    margin-top: 0;
}

.haras-cavalo-sobre p {
    color: #333;
    line-height: 1.6;
}

/* Lightbox Modal */
.haras-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.haras-lightbox.active {
    display: flex;
}

.haras-lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.haras-lightbox-image {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.haras-lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.haras-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.5);
}

.haras-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.3);
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 15px;
    border-radius: 4px;
    transition: background 0.3s ease;
}

.haras-lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.5);
}

.haras-lightbox-prev {
    left: 20px;
}

.haras-lightbox-next {
    right: 20px;
}

/* Responsividade */
@media (max-width: 768px) {
    .haras-cavalo-info {
        grid-template-columns: 1fr;
    }

    .haras-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }

    .haras-pedigree-generation {
        gap: 10px;
    }

    .haras-pedigree-node {
        min-width: 120px;
        font-size: 12px;
        padding: 8px;
    }
}

@media (max-width: 480px) {
    .haras-cavalo-card-image {
        height: 200px;
    }

    .haras-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .haras-button-primary {
        width: 100%;
        text-align: center;
    }
}
