/* Reset default styles */
body, h1, h2, h3, p, ul, li {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body styling */
body {
    font-family: Arial, sans-serif;
    color: #020202 !important; /* Set default text color to dark grey */
}

/* Navigation bar */
nav {
    background-color: #333;
    overflow: hidden;
    height: 63px;
    min-height: 56px;
    max-height: 56px;
}

nav a {
    float: left;
    display: block;
    color: white;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
}

nav a:hover {
    background-color: #ddd;
    color: black;
}

/* Card container */
.card-container {
    display: inline-block;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 20px;
}

/* Nav left */
nav .nav-left {
    min-height: 62px;
    position: relative;
}

/* Link */
nav .nav-left a {
    padding-bottom: 1px;
    min-height: 57px;
    max-height: 57px;
    padding-top: 21px;
}

/* Hero card */
.card-container .item .hero-card {
    left: 36px;
}

/* Item */
.card-container .item {
    position: relative;
    padding-left: 16px;
}

/* Individual hero card */
.hero-card {
    background-color: #ADD8E6;
    color: #000;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 250px;
    padding: 10px 20px;
    text-align: center;
    transition: transform 0.2s;
    margin-bottom: 20px;
    position: relative;
    z-index: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: auto; /* Adjust height to fit content dynamically */
}

/* Hero card hover effect */
.hero-card:hover {
    transform: scale(1.05);
}

/* Hero image (Upper half) */
.hero-card img.hero-icon {
    width: 100%;
    height: 50%; /* Make the image take up the upper half */
    object-fit: contain; /* Ensure image fits within the area without clipping */
    border-radius: 8px 8px 0 0;
    margin-bottom: 10px;
}

.hero-card p {
    font-size: clamp(1em, 3vw, 1.5em); /* Responsive with min size 1em, preferred size 3vw, and max size 1.5em */
    margin-bottom: 10px;
    color: #000;
    flex-grow: 1;
    overflow-wrap: normal;
    white-space: normal;
    text-overflow: ellipsis;
    word-break: normal;
}

.hero-card h3 {
    font-size: clamp(1.2em, 4vw, 2em); /* Responsive with min size 1.2em, preferred size 4vw, and max size 2em */
    margin-bottom: 5px;
    color: #000;
    flex-grow: 1;
    overflow-wrap: normal;
    white-space: normal;
    text-overflow: ellipsis;
    word-break: normal;
}


/* Trash icon */
.trash-container {
    text-align: center;
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.hero-card .trash-icon {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Edit and Delete buttons */
.edit-delete-buttons {
    display: flex;
}

.power .edit-delete-buttons {
    display: none;
}

.power:hover .edit-delete-buttons {
    display: flex;
}

.edit-delete-buttons a {
    margin-right: 5px;
}

.edit-button,
.delete-button {
    padding: 5px 10px;
    text-decoration: none;
    border-radius: 5px;
}

.edit-button {
    background-color: #3498db; /* Blue color */
    color: white;
}

.delete-button {
    background-color: #e74c3c; /* Red color */
    color: white;
}

.edit-button-hero {
    position: fixed;
    top: 60px;
    left: 10px;
    z-index: 1000;
}

.edit-button-hero.hidden,
.edit-delete-buttons.hidden {
    display: none;
}

/* Span Tag */
.nav-right span {
    color: #f9f9f9;
}

/* Hero info */
.container .hero-info {
    width: 92% !important;
}

/* Image */
.hero-bio h3 img {
    height: 250px;
    width: 250px;
}

/* Additional Image styling */
.hero-bio .power img {
    height: 210px;
    position: relative;
}

/* List Item */
.hero-bio ul li {
    list-style-type: none;
}

.hero-icon {
    width: 250px;
    height: 250px;
    object-fit: contain; /* Prevent clipping */
}

/* Infobox */
.container .hero-info .infobox{
    left:170px;
    padding-top:13px;
    top:26px;
}

/* Hero bio */
.container .hero-info .hero-bio{
    width:100px !important;
}

/* Responsive layout */
@media (max-width: 768px) {
    .hero-card {
        width: 100%;
    }

    nav a {
        float: none;
        display: block;
        text-align: left;
    }

    /* Adjust hero icon size for smaller screens */
    .hero-card img.hero-icon {
        width: 100%;  /* Make image take full width of card */
        height: 50%;  /* Maintain 50% height ratio */
        max-width: none;
    }

    /* Adjust text size for smaller screens */
    .hero-card h3 {
        font-size: 1.1em;
    }

    .hero-card p {
        font-size: 0.9em;
    }
}

@media (max-width: 480px) {
    .hero-card img.hero-icon {
        width: 100%; /* Full width for small devices */
        height: 50%; /* Maintain the upper half image rule */
    }

    .hero-card {
        width: 100%; /* Full width for small screens */
        padding: 10px;
    }

    /* Adjust text size for small devices */
    .hero-card h3 {
        font-size: 1em;
    }

    .hero-card p {
        font-size: 0.8em;
    }
}

@media (max-width: 768px) {

    /* Hero info */
    .container .hero-info {
        transform:translatex(0px) translatey(0px);
    }

    /* Infobox */
    .container .hero-info .infobox {
        left: 61px;
    }

    /* Hero card */
    .card-container .item .hero-card {
        height: 245px;
    }

    /* Card container */
    .card-container {
        position: relative;
        left: -44px;
    }
}
