/**
 * =========================================================
 * PERTECNICA HOMEPAGE ENGINE
 * GLOBAL SECTION FRAMEWORK
 * =========================================================
 *
 * PURPOSE:
 * Shared enterprise layout framework
 *
 * CONTROLS:
 * - section spacing
 * - container widths
 * - typography hierarchy
 * - cards
 * - buttons
 * - responsive behavior
 *
 * =========================================================
 */


/* =========================================================
   GLOBAL SECTION WRAPPER
========================================================= */

.phe-section {
    position: relative;
    padding-top: var(--phe-section-padding-y);
    padding-bottom: var(--phe-section-padding-y);
    overflow: hidden;
}


/* =========================================================
   CONTAINER SYSTEM
========================================================= */

.phe-container {
    width: 100%;
    max-width: var(--phe-container-xl);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--phe-space-xl);
    padding-right: var(--phe-space-xl);
}


/* =========================================================
   SECTION HEADER SYSTEM
========================================================= */

.phe-section-header {
    margin-bottom: var(--phe-space-3xl);
    text-align: center;
}


.phe-section-title {
    margin: 0 0 var(--phe-space-lg);
    font-size: var(--phe-text-4xl);
    font-weight: var(--phe-font-bold);
    line-height: var(--phe-line-tight);
    color: var(--phe-text-primary);
}


.phe-section-subtitle {
    max-width: 760px;
    margin: 0 auto;
    font-size: var(--phe-text-lg);
    line-height: var(--phe-line-relaxed);
    color: var(--phe-text-secondary);
}


/* =========================================================
   GRID SYSTEM
========================================================= */

.phe-grid {
    display: grid;
    gap: var(--phe-space-xl);
}


.phe-grid-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}


.phe-grid-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}


.phe-grid-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}


/* =========================================================
   CARD SYSTEM
========================================================= */

.phe-card {
    position: relative;
    background: var(--phe-bg-white);
    border-radius: var(--phe-card-radius);
    padding: var(--phe-card-padding);
    box-shadow: var(--phe-card-shadow);
    transition: var(--phe-transition-base);
}


.phe-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--phe-shadow-lg);
}


/* =========================================================
   BUTTON SYSTEM
========================================================= */

.phe-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--phe-button-height);
    padding-left: var(--phe-button-padding-x);
    padding-right: var(--phe-button-padding-x);
    border: none;
    border-radius: var(--phe-button-radius);
    text-decoration: none;
    font-weight: var(--phe-font-semibold);
    transition: var(--phe-transition-base);
    cursor: pointer;
}


.phe-btn-primary {
    background: var(--phe-primary);
    color: #ffffff;
}


.phe-btn-primary:hover {
    background: var(--phe-primary-dark);
    transform: translateY(-2px);
}


.phe-btn-outline {
    background: transparent;
    border: 1px solid var(--phe-border-medium);
    color: var(--phe-text-primary);
}


.phe-btn-outline:hover {
    background: var(--phe-bg-soft);
}


/* =========================================================
   IMAGE SYSTEM
========================================================= */

.phe-image-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* =========================================================
   FLEX UTILITIES
========================================================= */

.phe-flex {
    display: flex;
}


.phe-flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}


.phe-flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}


/* =========================================================
   TEXT UTILITIES
========================================================= */

.phe-text-center {
    text-align: center;
}


.phe-text-left {
    text-align: left;
}


.phe-text-right {
    text-align: right;
}


/* =========================================================
   SPACING UTILITIES
========================================================= */

.phe-mb-sm {
    margin-bottom: var(--phe-space-sm);
}

.phe-mb-md {
    margin-bottom: var(--phe-space-md);
}

.phe-mb-lg {
    margin-bottom: var(--phe-space-lg);
}

.phe-mb-xl {
    margin-bottom: var(--phe-space-xl);
}


/* =========================================================
   RESPONSIVE SYSTEM
========================================================= */

@media (max-width: 1024px) {

    .phe-section {
        padding-top: var(--phe-section-padding-y-tablet);
        padding-bottom: var(--phe-section-padding-y-tablet);
    }

    .phe-grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .phe-section-title {
        font-size: var(--phe-text-3xl);
    }
}


@media (max-width: 768px) {

    .phe-container {
        padding-left: var(--phe-space-lg);
        padding-right: var(--phe-space-lg);
    }

    .phe-grid-2,
    .phe-grid-3,
    .phe-grid-4 {
        grid-template-columns: 1fr;
    }

    .phe-section {
        padding-top: var(--phe-section-padding-y-mobile);
        padding-bottom: var(--phe-section-padding-y-mobile);
    }

    .phe-section-header {
        margin-bottom: var(--phe-space-2xl);
    }

    .phe-section-title {
        font-size: var(--phe-text-2xl);
    }

    .phe-section-subtitle {
        font-size: var(--phe-text-md);
    }

    .phe-card {
        padding: var(--phe-card-padding-mobile);
    }
}