/* home-layout.css - Home page layout styles */

/* Main content */
.content-wrapper {
    visibility: hidden;
    flex-grow: 1;
    z-index: 1;
    width: 100%;
    max-width: 100%;
}

.content-wrapper.show {
    visibility: visible;
    display: flex;
    flex-direction: column;
}

/* Content section */
.content-section {
    text-align: center;
    padding: var(--section-padding);
    background: var(--background-primary);
    max-width: var(--content-max-width);
    margin: 0 auto;
    position: relative;
    overflow: visible;
}

.content-section h2 {
    font: 700 1.8rem 'Montserrat', Arial, sans-serif;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.content-section h1::after {
    content: '';
    display: block;
    width: 80%;
    height: 3px;
    background: var(--accent-primary);
    margin: 0.5rem auto 0;
    border-radius: 2px;
    box-shadow: 0 2px 4px var(--element-shadow);
}

/* Banner section */
.page-banner {
    text-align: center;
    padding: var(--section-padding);
    flex-grow: 1;
    max-width: 100%;
    contain: layout;
    position: relative;
}

.banner-logo {
    display: block;
    margin: 0 auto 1rem;
    height: 125px;
    width: auto;
    max-width: 100%;
    filter: drop-shadow(4px 4px 6px var(--glow-green));
    transition: transform 0.5s ease;
}

.banner-logo:hover {
    transform: scale(1.15) rotate(0deg);
}

.page-banner h1 {
    font: 700 1.8rem 'Montserrat', Arial, sans-serif;
    margin-bottom: 0.75rem;
    max-width: 100%;
    white-space: normal;
}

.page-banner h2 {
    color: #BCD89A;
}

.page-banner p {
    font: 1.1rem 'Open Sans', Arial, sans-serif;
    color: #BCD89A;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Card grid */
.card-grid {
    display: flex;
    flex-direction: column;
    gap: var(--card-gap);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    padding: 1rem;
    overflow: visible;
}

.card {
    background: var(--card-background);
    border: 2px solid var(--accent-primary);
    border-radius: 12px;
    padding: var(--card-padding);
    box-shadow: 4px 4px 8px var(--element-shadow);
    filter: drop-shadow(0 4px 12px var(--glow-green));
    transition: transform 0.8s ease, box-shadow 0.3s ease, border-color 0.3s ease, filter 0.3s ease, padding 0.3s ease;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    position: relative;
    margin: 0.5rem auto;
    transform-origin: center center;
    padding-bottom: 1.5rem;
}

.card-highlight {
    transform: scale(1.05);
    box-shadow: 6px 6px 12px var(--element-shadow-hover);
    filter: drop-shadow(0 6px 16px var(--glow-green));
    border-color: #BCD89A;
    border-width: 3px;
    z-index: 6;
}

.card:not(.card-highlight):hover {
    transform: scale(1.03);
    box-shadow: 6px 6px 12px var(--element-shadow-hover);
    filter: drop-shadow(0 6px 16px var(--glow-green));
    border-color: #BCD89A;
    z-index: 5;
}

.card:not(.card-highlight):active {
    transform: scale(1.03);
    box-shadow: 6px 6px 12px var(--element-shadow-hover);
    filter: drop-shadow(0 6px 16px var(--glow-green));
    border-color: #BCD89A;
    z-index: 5;
}

.card img {
    width: 100%;
    max-width: 100%;
    height: 150px;
    object-fit: contain;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.card:hover img {
    transform: scale(1.05);
}

.card h3 {
    font: 700 0.85rem 'Montserrat', Arial, sans-serif;
    margin: 0.5rem 0;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--accent-primary);
}

.card p {
    font: 0.55rem 'Open Sans', Arial, sans-serif;
    margin-bottom: 1rem;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 1;
}

/* Feature box (non-testimonials) */
.feature-box {
    text-align: center;
    padding: var(--section-padding);
    max-width: 600px;
    margin: 2rem auto;
    background: linear-gradient(180deg, rgba(58, 74, 58, 0.8) 0%, rgba(58, 74, 58, 0.6) 100%);
    border-radius: 12px;
    box-shadow: 0 5px 15px var(--element-shadow), 0 0 20px var(--glow-green);
    border: 1px solid rgba(154, 184, 122, 0.3);
    position: relative;
    overflow: hidden;
    width: 90%;
}

.feature-box h2 {
    font: 700 1.8rem 'Montserrat', Arial, sans-serif;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.feature-box h2::after {
    content: '';
    display: block;
    width: 80%;
    height: 3px;
    background: var(--accent-primary);
    margin: 0.5rem auto 0;
    border-radius: 2px;
    box-shadow: 0 2px 4px var(--element-shadow);
}

.feature-box p {
    font: 1rem 'Open Sans', Arial, sans-serif;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* CTA feature box */
.cta-box {
    padding: 1.5rem;
    max-width: 600px;
    margin: 2rem auto;
    width: 90%;
}

.cta-box p {
    font: 1rem 'Open Sans', Arial, sans-serif;
    margin: 0.5rem 0 1rem;
    line-height: 1.6;
    color: #BCD89A;
}

.cta-box .button-primary {
    margin: 0 auto;
    max-width: 300px;
}

/* Media Queries */

/* Media Query 1: Portrait Phone (≤ 767px) */
@media (orientation: portrait) and (max-width: 767px) {
    .card-grid {
        flex-direction: column;
        gap: 1rem;
        padding: 0;
        align-items: center;
        width: 100%;
        max-width: 100%;
    }

    .content-section {
        padding: 0.6rem 0;
    }

    .card {
        width: 85%;
        max-width: 85%;
        margin: 0 auto;
        padding: 1.25rem;
        box-sizing: border-box;
    }

    .card-highlight {
        transform: scale(1.1);
        box-shadow: 6px 6px 12px var(--element-shadow-hover);
        filter: drop-shadow(0 6px 16px var(--glow-green));
        border-color: #BCD89A;
        z-index: 6;
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .card:not(.card-highlight):active {
        transform: none;
    }

    .card img {
        height: 120px;
        object-fit: contain;
    }

    .card h3 {
        font-size: 1.6rem;
        margin: 0.75rem 0;
    }

    .card p {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
    }

    .feature-box {
        padding: var(--section-padding);
        max-width: 600px;
        margin: auto;
        width: 90%;
        transition: transform 0.8s ease, box-shadow 0.3s ease, border-color 0.3s ease, filter 0.3s ease, margin 0.3s ease;
    }

    .feature-box.card-highlight {
        transform: scale(1.1);
        box-shadow: 6px 6px 12px var(--element-shadow-hover);
        filter: drop-shadow(0 6px 16px var(--glow-green));
        border-color: #BCD89A;
        z-index: 6;
        margin-top: 1.5rem;
        margin-bottom: 1.5rem;
        border-width: 3px;
    }

    .page-banner {
        width: 85%;
        max-width: 98%;
        margin: 0 auto;
        padding: 1rem;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .banner-logo {
        height: 100px;
        margin-bottom: 0.5rem;
        max-width: 100%;
    }

    .page-banner h1 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
        margin-top: 0.5rem;
        max-width: 100%;
    }

    .page-banner h2 {
        font-size: 1.32rem;
        margin-bottom: 0.5rem;
        max-width: 100%;
    }

    .page-banner h3 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
        max-width: 100%;
    }

    .page-banner p {
        font-size: 1.1rem;
        max-width: 100%;
    }

    .cta-box {
        padding: 1rem;
        max-width: 90%;
        margin: 1rem auto;
    }

    .cta-box h2 {
        font-size: 1.6rem;
    }

    .cta-box p {
        font-size: 0.9rem;
        margin: 0.5rem 0 0.75rem;
    }

    .cta-box .button-primary {
        max-width: 250px;
        font-size: 1rem;
        padding: 0.75rem 1.5rem;
    }

    .feature-box:not(.cta-box):not(.testimonials) .button-primary {
        max-width: 250px;
    }
}

/* Media Query 2: Small Landscape (≤ 767px) */
@media (orientation: landscape) and (max-width: 767px) {
    .content-section {
        padding: 0.5rem 0;
        width: 100%;
        box-sizing: border-box;
    }

    .content-section h1 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
        line-height: 1.2;
    }

    .card-grid {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        gap: 0.5rem !important;
        padding: 0.5rem;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden !important;
    }

    .card {
        width: 90% !important;
        max-width: 90% !important;
        min-width: 200px !important;
        padding: 0.6rem !important;
        border-width: 1px;
        border-radius: 6px;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        margin: 0 auto;
    }

    .card img {
        height: 55px;
        object-fit: contain;
        margin-bottom: 0.2rem;
    }

    .card h3 {
        font-size: 1rem;
        margin: 0.1rem 0;
        line-height: 1.1;
    }

    .card p {
        font-size: 0.9rem;
        line-height: 1.1;
        margin-bottom: 0.3rem;
        overflow: hidden;
    }

    .card:hover,
    .card:active {
        transform: none;
    }

    .page-banner {
        padding: 0.2rem 0.5rem;
        overflow-x: hidden;
    }

    .banner-logo {
        height: 50px;
        margin-bottom: 0.2rem;
    }

    .page-banner h1 {
        font-size: 1.2rem;
        margin-top: 0.65rem;
        margin-bottom: 0.2rem;
        line-height: 1.2;
    }

    .page-banner h2 {
        font-size: 1rem;
        margin-bottom: 0.3rem;
        line-height: 1.2;
    }

    .page-banner h3 {
        font-size: 0.8rem;
        margin-bottom: 0.1rem;
        line-height: 1.2;
    }

    .page-banner p {
        font-size: 0.8rem;
        line-height: 1.3;
    }

    .feature-box {
        padding: 0.75rem;
        margin: 0.75rem auto;
        max-width: 80%;
        border-width: 3px;
        border-color: #BCD89A;
        box-shadow: 6px 6px 12px var(--element-shadow-hover);
        filter: drop-shadow(0 6px 16px var(--glow-green));
        z-index: 6;
        transform: none;
    }

    .feature-box h2 {
        font-size: 1.1rem;
        margin-bottom: 0.3rem;
    }

    .feature-box p {
        font-size: 0.7rem;
        margin-bottom: 0.4rem;
    }

    .cta-box {
        padding: 0.75rem;
        max-width: 80%;
        margin: 0.75rem auto;
    }

    .cta-box h2 {
        font-size: 1.2rem;
    }

    .cta-box p {
        font-size: 0.8rem;
        margin: 0.3rem 0 0.5rem;
    }

    .cta-box .button-primary {
        max-width: 200px;
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .feature-box:not(.cta-box):not(.testimonials) .button-primary {
        max-width: 200px;
    }
}

/* Media Query 3: Tablets and Medium Screens (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .content-section {
        padding: 1rem 0.5rem;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .card-grid {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: stretch;
        gap: 1rem;
        padding: 0.5rem;
        width: calc(100% - 1rem);
        max-width: 100%;
        box-sizing: border-box;
        margin: 0 auto;
    }

    .card {
        flex: 0 0 calc(50% - 1rem);
        width: calc(50% - 1rem);
        min-width: 0;
        max-width: calc(50% - 1rem);
        margin: 0;
        padding: 0.8rem;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
    }

    .card img {
        width: auto;
        height: 80px;
        object-fit: contain;
        margin: 0 auto 0.5rem;
    }

    .card h3 {
        font-size: 1.1rem;
        margin: 0.3rem 0;
        line-height: 1.2;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
    }

    .card p {
        font-size: 0.85rem;
        line-height: 1.3;
        margin-bottom: 0.7rem;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        max-height: 2.6rem;
    }

    .page-banner {
        width: 85%;
        max-width: 98%;
        margin: 0 auto;
        padding: 1rem;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .banner-logo {
        height: 100px;
        margin-bottom: 0.5rem;
        max-width: 100%;
    }

    .page-banner h1 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
        margin-top: 0.5rem;
        max-width: 100%;
    }

    .page-banner h2 {
        font-size: 1.32rem;
        margin-bottom: 0.5rem;
        max-width: 100%;
    }

    .page-banner h3 {
        font-size: 1.2rem;
        margin-bottom: 0.5rem;
        max-width: 100%;
    }

    .page-banner p {
        font-size: 1.1rem;
        max-width: 100%;
    }

    .feature-box {
        padding: 1.5rem 1rem;
        margin: 1.5rem auto;
        max-width: 85%;
        border-width: 3px;
        border-color: #BCD89A;
        box-shadow: 6px 6px 12px var(--element-shadow-hover);
        filter: drop-shadow(0 6px 16px var(--glow-green));
        z-index: 6;
        transform: none;
    }

    .feature-box h2 {
        font-size: 1.5rem;
    }

    .feature-box p {
        font-size: 0.95rem;
    }

    .cta-box {
        padding: 1.5rem 1rem;
        max-width: 85%;
        margin: 1.5rem auto;
    }

    .cta-box h2 {
        font-size: 1.5rem;
    }

    .cta-box p {
        font-size: 0.95rem;
        margin: 0.5rem 0 1rem;
    }

    .cta-box .button-primary {
        max-width: 250px;
        font-size: 1rem;
    }

    .feature-box:not(.cta-box):not(.testimonials) .button-primary {
        max-width: 250px;
    }
}

/* Media Query 4: Tablet Landscape (768px - 1023px) */
@media (orientation: landscape) and (min-width: 768px) and (max-width: 1023px) {
    .content-section {
        padding: 1rem 0.5rem;
        width: 100%;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .card-grid {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: stretch;
        gap: 1rem;
        padding: 0.5rem;
        width: calc(100% - 1rem);
        max-width: 100%;
        box-sizing: border-box;
        margin: 0 auto;
    }

    .card {
        flex: 0 0 calc(50% - 1rem);
        width: calc(50% - 1rem);
        min-width: 0;
        max-width: calc(50% - 1rem);
        margin: 0;
        padding: 0.8rem;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
    }

    .card img {
        width: auto;
        height: 80px;
        object-fit: contain;
        margin: 0 auto 0.5rem;
    }

    .card h3 {
        font-size: 1.1rem;
        margin: 0.3rem 0;
        line-height: 1.2;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
    }

    .card p {
        font-size: 0.85rem;
        line-height: 1.3;
        margin-bottom: 0.7rem;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        max-height: 2.6rem;
    }

    .page-banner {
        padding: 0.3rem 0.75rem;
    }

    .banner-logo {
        height: 80px;
        margin-bottom: 0.65rem;
    }

    .page-banner h1 {
        font-size: 1.6rem;
        margin-bottom: 0.0rem;
    }

    .page-banner h2 {
        font-size: 1.3rem;
        margin-bottom: 0.6rem;
    }

    .page-banner h3 {
        font-size: 1.3rem;
        margin-bottom: 0.2rem;
    }

    .page-banner p {
        font-size: 1rem;
    }

    .feature-box {
        padding: 1rem 1rem;
        margin: 1.5rem auto;
        max-width: 85%;
        border-width: 3px;
        border-color: #BCD89A;
        box-shadow: 6px 6px 12px var(--element-shadow-hover);
        filter: drop-shadow(0 6px 16px var(--glow-green));
        z-index: 6;
        transform: none;
    }

    .feature-box h2 {
        font-size: 1.5rem;
        margin-bottom: 0.5rem;
    }

    .feature-box p {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
    }

    .cta-box {
        padding: 1rem;
        max-width: 85%;
        margin: 1.5rem auto;
    }

    .cta-box h2 {
        font-size: 1.5rem;
    }

    .cta-box p {
        font-size: 0.95rem;
        margin: 0.5rem 0 0.75rem;
    }

    .cta-box .button-primary {
        max-width: 250px;
        font-size: 1rem;
    }

    .feature-box:not(.cta-box):not(.testimonials) .button-primary {
        max-width: 250px;
    }
}

/* Media Query 5: Larger Screens (≥ 1024px) */
@media (min-width: 1024px) {
    .content-section {
        padding: 2rem 1rem;
        width: 100%;
        max-width: 1800px;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .content-section h1 {
        font-size: 2.2rem;
    }

    .card-grid {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: stretch;
        gap: 1.5rem;
        padding: 0.5rem;
        width: calc(100% - 1rem);
        max-width: 100%;
        box-sizing: border-box;
        margin: 0 auto;
    }

    .card {
        flex: 0 0 calc(33.333% - 1rem);
        width: calc(33.333% - 1rem);
        min-width: 300px;
        max-width: 580px;
        min-height: 480px;
        margin: 0;
        padding: 2rem;
        display: flex;
        flex-direction: column;
        box-sizing: border-box;
    }

    .card:not(.card-highlight):hover {
        transform: scale(1.05);
        box-shadow: 6px 6px 12px var(--element-shadow-hover);
        filter: drop-shadow(0 6px 16px var(--glow-green));
        border-color: #BCD89A;
        z-index: 5;
    }

    .card img {
        width: auto;
        height: 180px;
        object-fit: contain;
        margin: 0 auto 0.5rem;
    }

    .card h3 {
        font-size: 1.5rem;
        margin: 0.3rem 0;
        line-height: 1.4;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
    }

    .card p {
        font: 1.2rem 'Open Sans', Arial, sans-serif;
        line-height: 1.3;
        margin-bottom: 0.7rem;
        overflow: hidden;
        display: block;
    }

    .page-banner {
        width: 85%;
        max-width: 98%;
        margin: 0 auto;
        padding: 1rem;
        box-sizing: border-box;
        overflow-x: hidden;
    }

    .banner-logo {
        height: 140px;
        margin-bottom: 0.5rem;
        max-width: 100%;
    }

    .page-banner h1 {
        font-size: 2.2rem;
        margin-bottom: 0.5rem;
        margin-top: 0.5rem;
        max-width: 100%;
    }

    .page-banner h2 {
        font-size: 1.8rem;
        margin-bottom: 0.5rem;
        max-width: 100%;
    }

    .page-banner h3 {
        font-size: 1.4rem;
        margin-bottom: 0.5rem;
        max-width: 100%;
    }

    .page-banner p {
        font-size: 1.3rem;
        max-width: 100%;
    }

    .feature-box {
        padding: 2rem 1.5rem;
        margin: 1.5rem auto;
        max-width: 1000px;
        border-width: 3px;
        border-color: #BCD89A;
        box-shadow: 6px 6px 12px var(--element-shadow-hover);
        filter: drop-shadow(0 6px 16px var(--glow-green));
        z-index: 6;
        transform: none;
    }

    .feature-box h1 {
        font-size: 2.2rem;
    }

    .feature-box h2 {
        font-size: 1.8rem;
    }

    .feature-box p {
        font-size: 1.2rem;
    }

    .cta-box {
        padding: 2rem 1.5rem;
        max-width: 1000px;
        margin: 1.5rem auto;
    }

    .cta-box h2 {
        font-size: 1.8rem;
    }

    .cta-box p {
        font-size: 1.2rem;
        margin: 0.5rem 0 1rem;
    }

    .cta-box .button-primary {
        max-width: 300px;
        font-size: 1.2rem;
        padding: 0.8rem 1.5rem;
    }
}