/**
 * WordPress Core Alignment Classes - Migration Compatibility Layer
 *
 * The ufl-main-uni theme is missing standard WordPress alignment CSS classes.
 * This causes images with alignright/alignleft to display incorrectly after migration.
 *
 * These are standard WordPress classes that should work in all themes per WordPress standards.
 * This file adds them back to maintain visual consistency after migration.
 *
 * @package UFCLAS_Theme_Migrator
 * @see https://developer.wordpress.org/themes/functionality/css/#wordpress-generated-classes
 */

/* ==========================================================================
   IMAGE ALIGNMENTS
   ========================================================================== */

/**
 * Float image to the left with right/bottom margin
 * Used by: Classic Editor alignment, Gutenberg align left
 */
.alignleft {
    float: left;
    margin: 0 20px 20px 0;
    max-width: 100%;
}

/**
 * Float image to the right with left/bottom margin
 * Used by: Classic Editor alignment, Gutenberg align right
 */
.alignright {
    float: right;
    margin: 0 0 20px 20px;
    max-width: 100%;
}

/**
 * Center alignment
 * Used by: Classic Editor alignment, Gutenberg align center
 */
.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: 100%;
}

/* ==========================================================================
   WORDPRESS IMAGE CAPTIONS
   ========================================================================== */

/**
 * WordPress caption container
 * Applied to <figure> elements with captions
 */
.wp-caption {
    max-width: 100%;
}

.wp-caption img {
    display: block;
    max-width: 100%;
    height: auto;
}

/**
 * Caption text styling
 * Applied to <figcaption> or .wp-caption-text
 */
.wp-caption-text,
.wp-caption figcaption,
figcaption.wp-caption-text {
    text-align: center;
    font-size: 0.875rem; /* 14px */
    color: #666;
    padding: 0.5rem 0.25rem;
    margin-top: 0.5rem;
}

/* ==========================================================================
   CLEARFIX FOR FLOATED ELEMENTS
   ========================================================================== */

/**
 * Ensure floated images don't break layout
 * Clear floats after content blocks
 */
.entry-content::after,
.fullwidth-text-block .col-12::after,
article::after {
    content: "";
    display: table;
    clear: both;
}

/* ==========================================================================
   RESPONSIVE BEHAVIOR
   ========================================================================== */

/**
 * On mobile devices, remove floats for better readability
 */
@media (max-width: 768px) {
    .alignleft,
    .alignright {
        float: none;
        display: block;
        margin-left: auto;
        margin-right: auto;
        margin-bottom: 20px;
    }
}

/* ==========================================================================
   ADDITIONAL WORDPRESS ALIGNMENT CLASSES
   ========================================================================== */

/**
 * No alignment (full width)
 */
.alignnone {
    max-width: 100%;
}

/**
 * Wide alignment (Gutenberg)
 * Extends beyond content width
 */
.alignwide {
    max-width: 100%;
}

/**
 * Full alignment (Gutenberg)
 * Full viewport width
 */
.alignfull {
    max-width: 100%;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* ==========================================================================
   FOOTER WIDGET SPACING COMPATIBILITY
   ========================================================================== */

/**
 * Fix nav_menu widget title spacing to match block widget headings
 *
 * Nav menu widgets use .widget-title.h4 which has default spacing of 24px.
 * Block widgets use .wp-block-heading.footer-title with 10px spacing.
 * This override ensures consistent spacing across all footer widgets.
 */
.footer-col .widget_nav_menu .widget-title {
    margin-bottom: 10px !important;
    padding-bottom: 10px !important;
}
