/* 1. Reset defaults to remove unwanted spacing */
* {
    box-sizing: border-box; /* Prevents padding from adding to total width/height */
    margin: 0;
    padding: 0;
}

body, html {
    /* Changed from height: 100% to min-height */
    min-height: 100%;
    /* Allow scrolling if content is larger than the screen (scaling/zoom) */
    overflow-y: auto; 
    font-family: 'Segoe UI', serif;
    color: #f4e7d3;
    background-color: #1a120b; /* Fallback color */
}

.bg-image {
    /* Replace with your image URL */
    background-image: linear-gradient(rgba(48, 27, 0, 0.0), rgba(48,27,0,0.4)), url('thandoriabg1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center; /* Centers items vertically */
    padding: 40px 20px;
}

/* 2. Pull the content up slightly */
h1 {
    font-size: 3rem;
    text-shadow: 2px 2px 8px #000;
    margin-top: -5vh; /* Shifts the whole layout up slightly for better visual balance */
    margin-bottom: 10px;
    text-align: center;
}

<!--.subtitle {
    font-style: italic;
    margin-bottom: 40px;
    text-align: center;
}-->
.subtitle {
    font-style: italic;
    margin-bottom: 40px;
    text-align: center;
    text-shadow: 0px 0px 10px rgba(0, 0, 0, 0.8), 
                 0px 0px 5px rgba(0, 0, 0, 1);
    font-weight: 500;
}

/* 3. Responsive Card Grid */
.container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 1100px;
    width: 100%;
}

.card {
    background: rgba(45, 30, 20, 0.85);
    border: 1px solid #c5a059;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.card:hover {
    transform: translateY(-5px);
    background: rgba(60, 40, 30, 0.95);
}

.card h2 {
    color: #c5a059;
    margin-bottom: 10px;
}

/* 4. Mobile Fixes */
@media (max-width: 600px) {
    body, html {
        overflow: auto; /* Re-enable scrolling on mobile so content isn't cut off */
    }
    h1 { 
        font-size: 2.2rem; 
        margin-top: 20px;
    }
    .bg-image {
        height: auto;
        min-height: 100vh;
    }
}

/* Icon CSS */
/* Card Icon Styling */
.card-icon {
    width: 120px;       /* Adjust this size based on your preference */
    height: auto;
    margin-bottom: 15px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.5)); /* Adds depth to your icons */
}

/* Ensure the card content stacks vertically */
.card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.underline {
  text-decoration: underline;
}
.animated-rainbow {
    font-family: Arial Black, Gadget, sans-serif;
    background: linear-gradient(to left, #f00, #ff2b00, #f50, #ff8000, #fa0, #ffd500, #ff0, #d4ff00, #af0, #80ff00, #5f0, #2bff00, #0f0, #00ff2a, #0f5, #00ff80, #0fa, #00ffd5, #0ff, #00d5ff, #0af, #0080ff, #05f, #002aff, #00f, #2b00ff, #50f, #8000ff, #a0f, #d400ff, #f0f, #ff00d4, #f0a, #ff0080, #f05, #ff002b, #f00);
    animation: rainbow-move-left-right 5s linear infinite alternate;
    -webkit-background-clip: text;
    background-clip: text;
   -webkit-text-fill-color: transparent;
}
@keyframes rainbow-move-left-right {
    0% {background-position: 0 0    }
    100% {background-position: -500px 0}
}