/* Premium Family Heritage Website Custom Styles */

/* Loading animations */
@keyframes loading {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(300%);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #FDFBF7; /* Warm Cream */
}
::-webkit-scrollbar-thumb {
    background: #C5A059; /* Antique Gold */
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6B1F2F; /* Burgundy */
}

/* Base resets & styles */
body {
    -webkit-tap-highlight-color: transparent;
}

/* SVG Line Connections for Family Tree */
.tree-connection-line {
    stroke: #C5A059; /* Antique Gold */
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.3s, stroke-width 0.3s;
}

.tree-connection-line.highlighted {
    stroke: #6B1F2F; /* Burgundy */
    stroke-width: 4;
    filter: drop-shadow(0px 0px 4px rgba(107, 31, 47, 0.4));
}

.spouse-connector-dot {
    fill: #FDFBF7;
    stroke: #C5A059;
    stroke-width: 2;
}

.spouse-connector-dot.highlighted {
    stroke: #6B1F2F;
    fill: #FAF5F6;
}

/* Zoom and Pan container styles */
.tree-viewport-container {
    cursor: grab;
    user-select: none;
}

.tree-viewport-container:active {
    cursor: grabbing;
}

.tree-zoom-content {
    transform-origin: 0 0;
    transition: transform 0.1s cubic-bezier(0.1, 0.8, 0.3, 1);
}

/* Custom transition animations */
.transition-all-300 {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Profile drawer sliding styles */
.drawer-backdrop {
    opacity: 0;
    transition: opacity 0.4s ease-out;
}
.drawer-backdrop.active {
    opacity: 1;
}

.drawer-content {
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.drawer-content.active {
    transform: translateX(0);
}

/* Modal fade scale styles */
.modal-backdrop {
    opacity: 0;
    transition: opacity 0.3s ease-out;
}
.modal-backdrop.active {
    opacity: 1;
}
.modal-content {
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease-out;
}
.modal-content.active {
    transform: scale(1);
    opacity: 1;
}

/* Card details styling */
.premium-card {
    background: #FDFBF7;
    border: 1px solid rgba(197, 160, 89, 0.15); /* Light gold border */
    box-shadow: 0 4px 20px -2px rgba(42, 39, 37, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.premium-card:hover {
    border-color: rgba(107, 31, 47, 0.3); /* Burgundy hover border */
    box-shadow: 0 10px 30px -10px rgba(107, 31, 47, 0.08);
}

/* Text overlay effects */
.editorial-text {
    line-height: 1.8;
    letter-spacing: 0.01em;
}

/* Node styles */
.node-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.node-card.highlighted {
    border-color: #6B1F2F;
    box-shadow: 0 0 0 3px rgba(107, 31, 47, 0.15), 0 10px 20px -5px rgba(107, 31, 47, 0.1);
}

/* Line connectors helper classes */
.parent-connector-line {
    position: absolute;
    background-color: #C5A059;
}

/* Masonry grid item */
.masonry-item {
    break-inside: avoid;
    margin-bottom: 1.5rem;
}
