/* General styles */
body {
    background-color: var(--color-background);
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Ensure body takes full height */
}

/* Main content area */
main {
    flex: 1; /* Allows the content to take up remaining space */
    padding: 80px 20px 80px; /* Top padding to account for header and bottom padding for footer */
    background-color: var(--color-background);
    box-sizing: border-box;
    /* Ensure the content can scroll */
    overflow: auto;
    min-height: calc(100vh - 140px); /* Adjust based on header and footer height (80px header + 60px footer) */
}

/* Content section for pages like About */
.content-section {
    flex: 1; /* Allows the content to take up the remaining space */
    display: flex;
    justify-content: center; /* Center horizontally */
    align-items: center;     /* Center vertically */
    background-color: var(--color-background);
    box-sizing: border-box;
    text-align: center;
    margin-top: 75px; /* Offset for the header */
    min-height: auto; /* Ensure body takes full height */
}

/* Three columns layout */
.three-columns {
    display: flex;
    flex-wrap: wrap;
    margin-top: 50px; /* Offset for fixed header */
    padding: 50px 20px 90px; /* Increased top and bottom padding */
    background-color: var(--color-background);
    flex: 1; /* Allow it to grow and fill the available space */
    box-sizing: border-box; /* Ensure padding is included in the width */
    gap: 20px; /* Add consistent spacing between columns */
}

.column-link {
    flex: 1;
    text-decoration: none;
    min-width: 300px; /* Ensure minimum width for columns */
    display: flex; /* Add flex display to ensure full height */
}

.column {
    position: relative;
    text-align: center;
    color: var(--color-text);
    min-height: 300px;
    width: 100%; /* Ensure column takes full width of its container */
    overflow: hidden;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
    padding: 20px;
    box-sizing: border-box;
    display: flex; /* Add flex display */
    flex-direction: column; /* Stack content vertically */
    justify-content: flex-end; /* Align content to bottom */
}

.column-link:hover .column {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.column-racing {
    background-image: url('../media/racing/Racing_slide10.jpeg');
    background-size: cover;
    background-position: center;
}

.column-fixing {
    background-image: url('../media/fixing/fixing_hp.jpeg');
    background-size: cover;
    background-position: center;
}

.column-travelling {
    background-image: url('../media/travelling/travellinghp.jpeg');
    background-size: cover;
    background-position: center;
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background-color: var(--color-overlay-background); /* Darker Overlay for Better Contrast */
    color: var(--color-overlay-text); /* White Text on Overlay */
    text-align: center;
}

h2 {
    margin: 0;
    font-size: var(--font-size-heading);
    color: var(--color-overlay-text); /* Ensure heading color is white */
}

/* Responsive Design */
@media (max-width: 768px) {
    main {
        padding: 80px 20px 0px;
    }
}