*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html{
    scroll-behavior:smooth;
}

html,
body{
    min-width:1200px;
    min-height:100%;
    overflow-x:auto;
}

/* ========================= */
/* MAIN PAGE */
/* ========================= */

.main{
    width:100%;
    min-width:1200px;
    min-height:100vh;
    padding-bottom:60px;

    background:
        linear-gradient(
            rgba(0,0,0,0.45),
            rgba(0,0,0,0.45)
        ),
        url("familytree.png");

    background-position:center;
    background-size:cover;
    background-repeat:no-repeat;
    background-attachment:fixed;

    animation:fadeIn 2s ease-in;
}

/* ========================= */
/* NAVIGATION BAR */
/* ========================= */

.navbar{
    width:100%;
    min-width:1200px;
    height:80px;

    display:flex;
    justify-content:space-between;
    align-items:center;

    padding:0 50px;
    position:relative;
    z-index:2000;
}

.logo{
    color:white;
    font-size:35px;
    font-family:Arial, sans-serif;
}

.menu{
    display:flex;
    align-items:center;
    gap:30px;
    white-space:nowrap;

    position:relative;
    left:-10%;
}

.menu a{
    color:white;
    text-decoration:none;
    font-size:18px;
    font-family:Arial, sans-serif;
    transition:.3s;
}

.menu a:hover{
    color:gold;
}

/* ========================= */
/* DROPDOWN */
/* ========================= */

.dropdown{
    position:relative;
}

.dropdown-content{
    display:none;
    position:absolute;
    top:100%;
    left:0;

    min-width:250px;
    background:white;

    border-radius:8px;
    box-shadow:0 8px 20px rgba(0,0,0,.3);
    overflow:hidden;
    z-index:3000;
}

.dropdown-content a{
    display:block;
    color:black;
    padding:12px 15px;
}

.dropdown-content a:hover{
    background:#ddd;
    color:black;
}

.dropdown:hover .dropdown-content{
    display:block;
}

/* ========================= */
/* WELCOME TEXT */
/* ========================= */

.welcome{
    text-align:center;
    color:white;
    margin-top:40px;
}

.welcome h1{
    font-size:42px;
    margin-bottom:15px;
}

.welcome p{
    font-size:20px;
}

/* ========================= */
/* PHOTO GALLERY */
/* ========================= */

.photo-gallery{
    position:relative;
    width:100%;
    min-width:1200px;
    height:500px;
    margin-top:50px;
}

.person{
    position:absolute;
    text-align:center;
}

.photo{
    display:block;
    width:220px;
    height:280px;
    object-fit:cover;

    border-radius:15px;
    border:5px solid white;
    box-shadow:0 10px 25px rgba(0,0,0,.5);

    transition:.4s;
    animation:float 5s ease-in-out infinite;
}

.photo:hover{
    transform:scale(1.08);
    box-shadow:0 0 30px gold;
}

.person h3{
    color:white;
    margin-top:10px;
    font-family:Arial, sans-serif;
}

/* ========================= */
/* PHOTO POSITIONS */
/* ========================= */

.left{
    left:2%;
    top:50px;
}

.middle{
    right:2%;
    top:50px;
}

/* ========================= */
/* LEGACY BOX */
/* ========================= */

.legacy-box{
    width:45%;
    min-width:500px;
    margin:95px auto 40px;
    padding:20px;

    background:rgba(255,255,255,.88);
    border-radius:15px;
    text-align:center;
    box-shadow:0 10px 25px rgba(0,0,0,.4);
}

.legacy-box h2{
    color:#333;
    margin-bottom:10px;
    font-size:28px;
}

.legacy-box p{
    color:#333;
    font-size:25px;
    line-height:1.6;
}

.legacy-box h3{
    color:#333;
    font-size:21px;
    font-family:Georgia, serif;
}

/* ========================= */
/* MESSAGE FROM THE AUTHOR */
/* ========================= */

.author-message{
    width:75%;
    min-width:800px;
    max-width:1000px;
    margin:60px auto 0;
    padding:35px 45px;
    text-align:left;
    scroll-margin-top:30px;
}

.author-message h2:first-child{
    text-align:center;
    margin-bottom:25px;
}

.author-message p{
    margin-bottom:20px;
    font-size:19px;
    line-height:1.7;
}

.author-message h3,
.author-message h2:last-of-type{
    text-align:center;
}

.back-top{
    display:block;
    width:max-content;
    margin:25px auto 0;
    padding:10px 18px;

    background:#333;
    color:white;
    text-decoration:none;
    border-radius:8px;
    font-family:Arial, sans-serif;
    transition:.3s;
}

.back-top:hover{
    background:gold;
    color:black;
}

/* ========================= */
/* AUTHOR INFORMATION */
/* ========================= */

.author-info{
    width:80%;
    margin:40px auto;

    display:flex;
    justify-content:center;
    gap:40px;
}

.author-card{
    width:350px;
    padding:25px;

    background:rgba(255,255,255,.85);
    border-radius:15px;
    text-align:center;
    box-shadow:0 10px 25px rgba(0,0,0,.4);
}

.author-card h2{
    color:#333;
    margin-bottom:15px;
}

.author-card p{
    color:#333;
    font-size:17px;
    line-height:1.5;
}

/* ========================= */
/* ANIMATIONS */
/* ========================= */

@keyframes fadeIn{
    from{
        opacity:0;
    }

    to{
        opacity:1;
    }
}

@keyframes float{
    0%{
        transform:translateY(0);
    }

    50%{
        transform:translateY(-12px);
    }

    100%{
        transform:translateY(0);
    }
}

/* ========================= */
/* AUTHOR POPUP */
/* ========================= */

.popup{
    display:none;
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,.75);
    justify-content:center;
    align-items:center;
    z-index:99999;
}

.popup-box{
    background:#fff;
    width:70%;
    max-width:900px;
    max-height:85vh;
    overflow-y:auto;
    padding:40px;
    border-radius:15px;
    position:relative;
    box-shadow:0 0 30px rgba(0,0,0,.6);
}

.popup-box h2{
    text-align:center;
    color:#333;
    margin-bottom:20px;
}

.popup-box h3{
    text-align:center;
    margin-top:25px;
    color:#333;
}

.popup-box p{
    color:#333;
    font-size:19px;
    line-height:1.8;
    margin-bottom:18px;
}

.close{
    position:absolute;
    top:15px;
    right:25px;
    font-size:40px;
    font-weight:bold;
    cursor:pointer;
    color:#333;
}

.close:hover{
    color:red;
}
.dropdown-title{
    display:block;
    padding:12px 16px;
    font-weight:bold;
    color:#fff;
    background:#8B0000;
    text-align:center;
    border-bottom:1px solid rgba(255,255,255,0.2);
    cursor:default;
}
.books-popup-box{
    width:85%;
    max-width:1100px;
}

.featured-books-layout{
    display:flex;
    align-items:flex-start;
    justify-content:center;
    gap:30px;
}

.featured-books-image{
    width:60%;
    border-radius:12px;
}

.featured-author{
    width:40%;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:flex-start;
    text-align:center;
    padding-top:10px;
}

.featured-author-image{
    width:220px;
    height:220px;
    object-fit:cover;
    object-position:center top;   /* Shows more of the top */
    border-radius:50%;
    display:block;
    margin:0 auto 15px auto;
    border:5px solid #8B0000;
    box-shadow:0 8px 25px rgba(0,0,0,.35);
}

.amazon-button{
    display:block;
    margin:12px auto;
    padding:12px;
    background:#ff9900;
    color:#111;
    text-decoration:none;
    font-weight:bold;
    border-radius:8px;
}

.amazon-button:hover{
    background:#e68a00;
}

@media (max-width:768px){

    .featured-books-layout{
        flex-direction:column;
    }

    .featured-books-image,
    .featured-author{
        width:100%;
    }

}