/* =========================================================
   KELLIE HUCKER TECH ART PORTFOLIO
   HOME PAGE STYLES
   November 2026
   ========================================================= */

/* =========================================================
   HOME PAGE LAYOUT
   ========================================================= */
.home-main {
    width: min(1200px, 100%); /* Allows Home page content to be slightly wider than default main content */
}

/* =========================================================
   HOME CATEGORY CARD GRID
   ========================================================= */
.specialties {
    width: 100%; /* Uses full available page width */
    max-width: 1140px; /* Fits four 270px cards plus three 20px gaps */
    display: flex; /* Allows incomplete rows to center automatically */
    flex-wrap: wrap; /* Moves cards onto additional rows as needed */
    justify-content: center; /* Centers every row, including incomplete rows */
    gap: 20px; /* Adds consistent spacing between cards */
    margin: 0 auto 60px; /* Centers card area and adds space below grid */
}

.specialty-card {
    width: 270px; /* Keeps consistent card width */
    flex: 0 0 270px; /* Prevents cards from stretching or shrinking */
    height: 310px; /* Gives Home/category cards a consistent height */
    display: flex; /* Uses Flexbox inside each card */
    flex-direction: column; /* Stacks image and text vertically */
    overflow: hidden; /* Prevents child content from spilling outside rounded edges */
    border-radius: 12px; /* Rounds card corners */
    color: var(--text); /* Uses shared site text color */
    text-decoration: none; /* Removes default underline when whole card is a link */
}

/* =========================================================
   HOME CARD IMAGE
   ========================================================= */
.card-image {
    width: 100%; /* Allows image area to use full card width */
    height: 230px; /* Gives category images a consistent display area */
    object-fit: contain; /* Fits entire image inside area without cropping */
    display: block; /* Removes inline-image baseline spacing */
    padding: 28px 32px 8px; /* Adds breathing room around image */
    background: transparent; /* Keeps image area transparent */
    transition: filter 0.2s ease; /* Smoothly animates image filter effects */
}

/* =========================================================
   HOME CARD CONTENT
   ========================================================= */
.card-content {
    flex: 1; /* Allows content area to fill remaining card height */
    display: flex; /* Uses Flexbox for content alignment */
    align-items: flex-start; /* Aligns content toward top of available area */
    justify-content: center; /* Centers content horizontally */
    padding: 4px 20px 16px; /* Adds spacing around card text */
}

/* Card title */
.card-content h3 {
    margin: 0; /* Removes browser default heading margin */
    color: var(--accent-strong); /* Uses bright shared accent color for card titles */
    text-align: center; /* Centers card title text */
    font-size: 1.5rem; /* Sets card title size */
    line-height: 1.25; /* Controls spacing for multi-line titles */
}

/* =========================================================
   PORTFOLIO MIGRATION NOTICE
   TEMPORARY - REMOVE WHEN MIGRATION IS COMPLETE
   ========================================================= */
.migration-box {
    max-width: 850px; /* Limits notice width so text stays easy to read */
    margin: 0 auto; /* Centers notice horizontally */
    padding: 24px; /* Adds space between content and box edges */
    background: rgba(8, 12, 22, 0.72); /* Adds dark semi-transparent background */
    border-left: 4px solid var(--accent-blue-light); /* Adds blue accent bar on left side */
    border-radius: 8px; /* Rounds box corners */
    line-height: 1.6; /* Adds comfortable spacing between text lines */
}

.migration-box h2 {
    margin-top: 0; /* Removes default top margin from heading */
}

/* =========================================================
   HOME CATEGORY CARD GRID
   ========================================================= */
.specialties {
    width: 100%; /* Uses full available page width */
    max-width: 1140px; /* Fits four desktop cards plus gaps */
    display: flex; /* Allows cards to wrap naturally */
    flex-wrap: wrap; /* Moves cards onto additional rows as needed */
    justify-content: center; /* Centers every row, including incomplete rows */
    gap: 20px; /* Adds consistent spacing between cards */
    margin: 0 auto 60px; /* Centers card area and adds space below grid */
}

.specialty-card {
    width: 270px; /* Sets desktop card width */
    flex: 0 0 270px; /* Prevents desktop cards from stretching or shrinking */
    height: 310px; /* Sets consistent desktop card height */
}

/* =========================================================
   TABLETS
   ========================================================= */
@media (max-width: 950px) {
    .specialty-card {
        width: 220px; /* Reduces card width on tablets */
        flex-basis: 220px; /* Keeps tablet cards at consistent width */
        height: 255px; /* Reduces card height on tablets */
    }
}

/* =========================================================
   PHONES
   ========================================================= */
@media (max-width: 620px) {
    .specialties {
        display: grid; /* Switches mobile layout to a true grid */
        grid-template-columns: repeat(2, minmax(0, 1fr)); /* Creates two equal-width columns */
        gap: 12px; /* Tightens spacing between mobile cards */
        padding: 0 12px; /* Keeps cards away from screen edges */
        margin-bottom: 40px; /* Reduces space below mobile card grid */
    }

    .specialty-card {
        width: 100%; /* Fills each mobile grid column */
        max-width: none; /* Removes desktop width restriction */
        height: 210px; /* Keeps mobile cards compact */
        flex: none; /* Removes desktop Flexbox sizing */
    }

    .card-image {
        height: 140px; /* Reduces image area on phones */
        padding: 12px 14px 6px; /* Tightens image spacing */
    }

    .card-content {
        padding: 4px 8px 12px; /* Keeps text area compact */
    }

    .card-content h3 {
        font-size: 0.95rem; /* Keeps card titles readable on narrow screens */
        line-height: 1.2; /* Controls wrapped title spacing */
    }
}

/* =========================================================
   VERY NARROW PHONES
   ========================================================= */
@media (max-width: 340px) {
    .specialties {
        grid-template-columns: 1fr; /* Falls back to one column when two become too narrow */
    }

    .specialty-card {
        max-width: 230px; /* Prevents single-column cards from becoming oversized */
        justify-self: center; /* Centers card inside mobile grid */
    }
}