/* 🌿 Global Styles */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #F0F7EE; /* Light Sage Green */
    color: #4B382A; /* Dark Brown */
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* 🌳 Header */
header {
    background-color: #2C5F2D; /* Deep Forest Green */
    color: white;
    padding: 10px;
    text-align: center;
    font-size: 14px;
    font-weight: bold;
}

/* 📜 Main Content Wrapper - Removed position: sticky; */
.responsive-container {
    width: 600px; /* Default width for larger screens */
    margin: 0 auto; /* Centers the element horizontally */
    text-align: left; /* Ensures normal text alignment */
}

/* 🎯 Scroll Indicator (Fixed at the bottom, disappears on scroll) */
.scroll-indicator {
    visibility: visible;
    position: fixed !important;
    bottom: 100px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    opacity: 1;
    display: block;
    transition: opacity 0.5s ease-in-out;
    z-index: 9999 ;
    width: 50px !important;
    height: 50px !important;
}

/* Scroll-down text */
.scroll-indicator .scroll-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 5px;
}

/* Downward Arrow */
.scroll-indicator .scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 4px solid red;
    border-bottom: 4px solid red;
    transform: rotate(45deg);
    animation: bounce 1.5s infinite;
    display: inline-block;
}

/* Bounce Animation */
@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) rotate(45deg);
    }
    40% {
        transform: translateY(10px) rotate(45deg);
    }
    60% {
        transform: translateY(5px) rotate(45deg);
    }
}

/* Hide scroll indicator when the user scrolls */
@media (min-height: 600px) {
    .scroll-indicator {
      opacity: 1;
      pointer-events: auto;
    }
}

/* 📜 Main Content Container */
.container {
    width: 80%;
    max-width: 1200px;
    margin: 20px auto;
    padding: 10px;
    background: #E8DAB2; /* Warm Beige */
    border-radius: 10px;
    box-shadow: 2px 4px 10px rgba(0, 0, 0, 0.1);
}

/* 🎨 Buttons */
.button-container {
    display: flex;
    flex-wrap: wrap; /* Allows buttons to adjust and wrap on small screens */
    justify-content: space-between; /* Distributes buttons evenly */
    width: 96%;
    padding: 5px;
}

.button-container button {
    flex: 1;
    margin: 5px;
    padding: 12px 10px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    background-color: #a3b18a;
    color: white;
    cursor: pointer;
    transition: 0.3s;
    text-align: center;
    width: 80px;
}

.button-container button:hover {
   background-color: #52796f;
   opacity: 1;
}

/* 📝 Tooltip Buttons */
.button-container .tooltip-button {
    position: relative;
    background-color: #a3b18a;
    color: white;
    border: none;
    padding: 12px 10px;
    font-size: 16px;
    cursor: pointer;
    border-radius: 5px;
    margin: 5px;
}

.button-container .tooltip-button::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    pointer-events: none;
}

/* Show tooltip on hover */
.button-container .tooltip-button:hover::after {
   background-color: rgba(0, 0, 0, 0.9);
   opacity: 1;
}

/* 🎨 Secondary Buttons */
.secondary-btn {
    background-color: #E07A5F; /* Soft Orange */
}

.secondary-btn:hover {
    background-color: #B85042; /* Deeper Red */
}

/* 🌱 Links */
a {
    color: #547AA5; /* Muted Blue */
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #1F4E79; /* Deep Blue */
}

/* 📌 Alerts */
.alert {
    padding: 10px;
    color: white;
    text-align: center;
    border-radius: 5px;
    margin: 10px 0;
}

.alert.success {
    background-color: #2C5F2D; /* Deep Forest Green */
}

.alert.error {
    background-color: #D72638; /* Soft Red */
}

/* 🌳 Family Tree Structure */
.tree-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 30px;
}

.tree-node {
    padding: 15px;
    background: #A3B18A; /* Olive Green */
    color: white;
    border-radius: 10px;
    margin: 10px;
    font-weight: bold;
    text-align: center;
}

/* 🏠 User Information */
.user-info {
    display: flex;
	align-items: center;
    gap: 10px;
}

.username {
    font-weight: bold;
    color: #333;
}

/* 🗂️ Table Styling */
.datagrid table { 
	border-collapse: collapse; 
	text-align: left; 
	width: 100%; 
} 

.datagrid {
	font: normal 12px/150% Verdana, Arial, Helvetica, sans-serif;
	background: #fff;
	overflow: hidden;
	border: 3px solid #991821;
	border-radius: 5px;
}
	
.datagrid table td, .datagrid table th { 
	padding: 4px 10px; 
}
	
.datagrid table thead th {
	background: #991821;
	color: #FFFFFF;
	font-size: 15px;
	font-weight: bold;
	border-left: 1px solid #B01C26;
} 

.datagrid table tbody td { 
	color: #80141C;
	border-left: 1px solid #F7CDCD;
	font-size: 16px;
	font-weight: normal;
}

/* 🖼️ Image Handling */
.image-container {
    display: grid;
    place-items: center;
    height: 100vh;
    padding: 20px;
}

.image-container img {
    max-width: 50%;
    height: auto;
}

img {
    display: block;
    margin: auto;
    padding: 20px;
    max-width: 80%;
}

/* 📱 Mobile Responsiveness */
@media (max-width: 768px) {
    .responsive-container {
        width: 94%;
        margin: 0 auto;
        padding: 10px;
    }

    .scroll-indicator {
        bottom: 10px;
    }

    .button-container {
        flex-direction: column;
    }

    .button-container button {
        width: 100%;
    }
}

