/*
Theme Name: Square Buttons Full Showcase
Theme URI: https://pestlinks.cy
Author: Custom Theme Generator
Description: A clean WordPress theme displaying 3 square site buttons side-by-side on desktop and fully visible stacked buttons on mobile with zero clipping or cut-offs.
Version: 5.1.0
License: GNU General Public License v2 or later
Text Domain: square-buttons-full
*/

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    background-color: #f4f6f9;
    color: #333333;
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem 1rem;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

header.site-header h1 {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

header.site-header p {
    font-size: 1rem;
    color: #64748b;
}

main.site-content {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

/* Square Buttons Layout: Side-by-side on Desktop */
.buttons-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    width: 100%;
    align-items: stretch;
}

.square-button-card {
    width: 100%;
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.square-button-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 30px -10px rgba(0, 0, 0, 0.18), 0 10px 15px -5px rgba(0, 0, 0, 0.1);
}

.square-button-card a.button-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
}

.square-button-card .button-img-wrapper {
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
    overflow: hidden;
    background-color: #ffffff;
}

.square-button-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain; /* Ensures complete image visibility without clipping */
    padding: 0.5rem;
    transition: transform 0.5s ease;
}

.square-button-card:hover img {
    transform: scale(1.03);
}

.square-button-card .button-info {
    width: 100%;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
    margin-top: auto;
}

.square-button-card .button-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.2rem;
    width: 100%;
}

.square-button-card .button-url {
    font-size: 0.85rem;
    color: #2563eb;
    font-weight: 600;
    display: block;
    width: 100%;
}

footer.site-footer {
    background-color: #1e293b;
    color: #94a3b8;
    text-align: center;
    padding: 1.5rem 1rem;
    margin-top: auto;
    font-size: 0.9rem;
}

/* Medium Tablets Breakpoint */
@media (max-width: 900px) {
    main.site-content {
        padding: 1.5rem 1rem;
    }

    .buttons-container {
        gap: 1.25rem;
    }
}

/* Mobile Devices: Stacked Vertically with full image visibility */
@media (max-width: 680px) {
    main.site-content {
        padding: 1rem;
        max-width: 420px;
    }

    .buttons-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .square-button-card {
        border-radius: 16px;
    }

    .square-button-card .button-info {
        padding: 0.85rem 0.5rem;
    }

    .square-button-card .button-title {
        font-size: 1.1rem;
    }

    .square-button-card .button-url {
        font-size: 0.8rem;
    }
}
