/* ===========================
   ANCESTOR PAGE STANDALONE
=========================== */

/* ===========================
   GLOBAL RESETS & DEFAULTS
=========================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    scroll-behavior: smooth;
    font-family: Verdana, sans-serif;
    color: #fff;
    background-color: #000;
    line-height: 1.6;
}

/* ===========================
   SAFE OVERLAY
=========================== */
.overlay {
    position: fixed;
    inset: 0;
    z-index: 1;
    background: transparent;
    pointer-events: none;
    animation: bgFadeIn 1.5s ease forwards;
}

/* ===========================
   BACKGROUND
=========================== */
.mythology-bg {
    min-height: 100vh;
    width: 100%;
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    animation: bgFadeIn 1.5s ease forwards;
    background-image: linear-gradient(rgba(0,0,0,0.35), rgba(0,0,0,0.35)), url('https://i.imgur.com/M6FKg5S.png');
}

/* ===========================
   NAVIGATION
=========================== */
.world-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    z-index: 1000;
    background: rgba(0,0,0,0.65);
    padding: 10px 20px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
}

.world-nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: bold;
    transition: 0.25s ease;
    white-space: nowrap;
}

.world-nav a:hover,
.world-nav a.active {
    background: rgba(255,255,255,0.9);
    color: #000;
}

/* ===========================
   FADE-IN ANIMATION
=========================== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.9s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

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

@keyframes bgFadeIn {
    to { opacity: 1; }
}

/* ===========================
   HERO / HERO TEXT
=========================== */
.hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    max-width: 1100px;
    margin: 90px auto 40px;
    padding: 2rem 1.5rem;
    background: rgba(0,0,0,0.55);
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.6);
    z-index: 2;
}

/* ===========================
   ANCESTOR CARDS
=========================== */
.ancestor-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(0,0,0,0.65);
    border-radius: 18px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.5);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.ancestor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
}

.ancestor-image img {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
    border: 3px solid #fff;
}

.ancestor-text h2 {
    font-size: 1.5rem;
    margin-bottom: 0.8rem;
    color: #ffe680;
}

.ancestor-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #fff;
}

/* ===========================
   PLACEHOLDER ANCESTOR CARDS
=========================== */
.placeholder-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    height: 220px;
    background: rgba(50, 50, 50, 0.55);
    border: 2px dashed #888;
    border-radius: 18px;
    color: #ccc;
    font-size: 1.1rem;
    font-style: italic;
    text-align: center;
    padding: 1rem;
    transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.35s ease;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(255,255,255,0.02),
        rgba(255,255,255,0.02) 10px,
        transparent 10px,
        transparent 20px
    );
}

.placeholder-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    background: rgba(70, 70, 70, 0.7);
    color: #fff;
}

.placeholder-card::before {
    content: "👤";
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* ===========================
   BUTTONS
=========================== */
.btn {
    display: inline-block;
    margin-top: 1rem;
    padding: 10px 26px;
    border: 2px solid #fff;
    text-decoration: none;
    font-weight: bold;
    border-radius: 28px;
    text-transform: uppercase;
    transition: all 0.25s ease;
}
.btn:hover {
    background: rgba(255,255,255,0.9);
    color: #000;
    transform: translateY(-3px);
}

/* ===========================
   RESPONSIVE
=========================== */
@media (max-width: 980px) {
    .ancestor-card {
        flex-direction: column;
        text-align: center;
    }
    .hero-text {
        margin-top: 70px;
    }
}

@media (max-width: 520px) {
    .hero-text {
        margin: 90px 12px 40px;
        padding: 1rem;
    }
}
