/* FriVision Laravel - Layout fixes */

/* Ensure row containers are centered with proper padding */
.row1440, .row1380, .row {
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
    padding-left: 20px;
    padding-right: 20px;
}

/* Images should be responsive by default */
.wys img,
.content-row img,
.staff-thumbnail img,
.flexible-text img {
    max-width: 100%;
    height: auto;
}

/* Ensure wys content images are centered like WordPress */
.wys img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Staff grid alignment */
.cat-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.staff-item {
    text-align: center;
}

.staff-thumbnail img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

/* Border style box (used in soins content) */
.border-style {
    border: 2px solid #003652;
    padding: 20px 30px;
    border-radius: 8px;
    margin: 20px 0;
}

/* Partners section */
.partners-logo--wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 40px;
}

.partners-logo--title {
    text-align: center;
    margin-bottom: 30px;
}

/* Contact form spacing */
.top-contact-section .form-group {
    margin-bottom: 15px;
}

/* Fix section spacing consistency */
section + section,
section + div[class*="--section"],
div[class*="--section"] + div[class*="--section"] {
    margin-top: 0; /* Let m-space classes handle spacing */
}

/* Fluid images full width */
.fluid-image--section img,
.new-hp-fluid-image--section img {
    width: 100%;
    height: auto;
    display: block;
}

/* Content rows in left-right sections */
.left-right-content--section .content-row {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 40px;
}

.left-right-content--section .content-row .image,
.left-right-content--section .content-row .text {
    flex: 1;
}

.left-right-content--section .content-row .image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Access page gallery */
.access-gallery--section .gallery-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.access-gallery--section .gallery-wrapper img {
    flex: 1;
    min-width: 200px;
    max-width: calc(25% - 12px);
    height: auto;
    border-radius: 8px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .row1440, .row1380, .row {
        padding-left: 15px;
        padding-right: 15px;
    }

    .left-right-content--section .content-row {
        flex-direction: column;
        gap: 20px;
    }

    .cat-cards {
        gap: 20px;
    }

    .access-gallery--section .gallery-wrapper img {
        max-width: calc(50% - 8px);
    }

    /* Reduce section spacing on mobile */
    .m-space-lg {
        margin: 40px 0;
    }

    .m-space-md {
        margin: 30px 0;
    }

    .m-space {
        margin: 20px 0;
    }

    #top {
        min-height: 250px;
    }

    /* Full width images in content */
    .wys img {
        max-width: 100%;
    }

    .border-style {
        padding: 15px 20px;
    }
}

@media (max-width: 480px) {
    .access-gallery--section .gallery-wrapper img {
        max-width: 100%;
    }

    .cat-cards {
        flex-direction: column;
        align-items: center;
    }

    .staff-item {
        max-width: 280px;
    }
}
