/* ==========================================================================
   Master Option Grid Layout (Horizontal on PC, Squares on Mobile)
   ========================================================================== */

/* 1. Desktop Mode: Forces cards left-to-right */
.option-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    /* Forces exactly 4 columns side-by-side */
    gap: 20px !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 20px auto !important;
    box-sizing: border-box !important;
}

/* Ensure cards don't have broken heights on PC */
.option-grid .option-card {
    height: 220px !important;
    /* Clean height for desktop view */
    width: 100% !important;
}

/* 2. Mobile Mode: Switches to vertical stack with perfect squares */
@media (max-width: 768px) {
    .option-grid {
        grid-template-columns: 1fr !important;
        /* Switches layout to 1 single column */
        gap: 15px !important;
        padding: 0 10px !important;
    }

    .option-grid .option-card {
        width: 100% !important;
        max-width: 340px !important;
        /* Keeps squares from getting too huge on big phones */
        margin: 0 auto !important;
        /* Centers the squares on the screen */

        /* THE MAGIC SQUARE LINES */
        aspect-ratio: 1 / 1 !important;
        height: auto !important;
        /* Overrides the PC desktop height */
    }
}

/* ==========================================================================
   Base Layout & Grid Configuration (Forces cards left-to-right)
   ========================================================================== */
body {
    background-color: #f9fafb;
    color: #333333;
    margin: 0;
    padding: 0;
}

/* This targets the container and forces cards to align side-by-side */
.simple-page {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)) !important;
    grid-auto-flow: row !important;
    /* Explicitly forces cards left-to-right first */
    gap: 20px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Ensure child elements behave correctly inside the grid row */
.simple-page>div,
.simple-page>a {
    width: 100%;
    box-sizing: border-box;
}

/* Add spacing between text elements if any exist */
.simple-page h1,
.simple-page h2,
.simple-page h3,
.simple-page p,
.simple-page ul,
.simple-page ol {
    margin-bottom: 1rem;
}

/* ==========================================================================
   Section backgrounds & Headings
   ========================================================================== */
.section-white {
    background: #ffffff;
    padding: var(--section-padding);
}

.section-gray {
    background: #f2f2f2;
    padding: var(--section-padding);
}

.section-header h2,
.section-header h3,
h2,
h3 {
    color: #2c3e50;
    margin: 0;
}

/* ==========================================================================
   Option Cards Base Styles
   ========================================================================== */
.option-card {
    position: relative;
    background: transparent;
    overflow: hidden;
    border-radius: 12px;
    border: none;
    height: 200px;
    /* original button height */
    display: flex;
    align-items: flex-end;
    padding: 20px;
    color: #fff;
    background-size: cover;
    background-position: center;
    transition: transform .3s ease, background-size .3s ease, box-shadow .3s ease;
    text-decoration: none;
    /* Removes link underline */
    box-sizing: border-box;
}

/* Dark overlay for better text contrast */
.option-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 12px;
    z-index: 0;
}

/* Ensure card content appears above overlay */
.option-card .card-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    text-align: left;
}

/* Hover animation – subtle lift and scale */
.option-card:hover {
    background-size: 115%;
    /* subtle zoom of background image */
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   Card Image Exception (Built-in Gradients)
   ========================================================================== */
.swim-card {
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0) 100%), url('images/swim.jpg') !important;
}

.physical-card {
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0) 100%), url('images/physical_activities.jpg') !important;
}

.travels-card {
    background-image: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.2) 60%, rgba(0, 0, 0, 0) 100%), url('images/travels.jpg') !important;
}

.boardgames-card {
    background-image: url('images/boardgames.jpg') !important;
}

/* Text styles inside the option cards */
.option-card h3 {
    color: #ffffff !important;
    font-size: 1.3rem;
    margin: 0 0 4px 0;
    font-weight: 600;
    text-shadow: 0 3px 6px rgba(0, 0, 0, 0.7);
}

.option-card p {
    color: #e0e0e0;
    font-size: 0.9rem;
    margin: 0;
    font-weight: 400;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7);
}

/* ==========================================================================
   Link Cards & Image styles
   ========================================================================== */
.opt.link-card {
    background: #fff;
    border: 1px solid #eaeaea;
    padding: 25px;
    border-radius: 8px;
    text-align: center;
}

.link-card:hover {
    border-color: var(--clr-accent);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 245, 212, 0.05);
}

.link-card:hover .card-image img {
    opacity: 1;
}

.link-card h4 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--clr-dark-bg);
}

.link-card p {
    font-size: 0.9rem;
    color: #666;
}

.section-light img {
    max-width: 100%;
    height: auto;
    max-height: 300px;
    object-fit: cover;
}

.link-card .card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 10px;
}

.link-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.back-btn {
    margin-top: 20px;
    display: inline-block;
    padding: 8px 16px;
    background: var(--clr-accent);
    color: #fff;
    border-radius: 4px;
    text-decoration: none;
}

.simple-page ul {
    list-style-type: disc;
    padding-left: 25px;
}

.simple-page li {
    display: list-item;
    margin-bottom: 0.35rem;
}

.personal-bottom {
    background-color: #f0f2f5;
    padding: 40px 5%;
    text-align: center;
    color: #555;
    border-top: 1px solid #e2e4e8;
}