<?php
/**
 * Template for Master Trainer - Manage Announcements
 */

// Prevent direct access
if (!defined('ABSPATH')) {
    exit;
}

// Define template constant
define('HVAC_IN_PAGE_TEMPLATE', true);

get_header(); ?>

<div class="hvac-master-announcements-page">
    <div class="container">
        <?php
        // Get breadcrumbs
        if (class_exists('HVAC_Breadcrumbs')) {
            echo HVAC_Breadcrumbs::instance()->render_breadcrumbs();
        }
        
        // Get navigation
        if (class_exists('HVAC_Menu_System')) {
            echo HVAC_Menu_System::render_navigation();
        }
        ?>
        
        <div class="hvac-page-content">
            <div class="hvac-page-header">
                <h1 class="hvac-page-title">
                    <i class="fas fa-bullhorn"></i>
                    Manage Announcements
                </h1>
                <p class="hvac-page-subtitle">Create and manage announcements for HVAC trainers</p>
            </div>
            
            <div class="hvac-announcements-manager-wrapper">
                <?php
                while (have_posts()) :
                    the_post();
                    ?>
                    <div class="hvac-announcements-content">
                        <?php the_content(); ?>
                    </div>
                    <?php
                endwhile;
                ?>
            </div>
        </div>
    </div>
</div>

<style>
.hvac-master-announcements-page {
    background: #f8f9fa;
    min-height: 100vh;
    padding: 2rem 0;
}

.hvac-master-announcements-page .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hvac-page-header {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 2rem;
    text-align: center;
}

.hvac-page-title {
    color: #2c3e50;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.hvac-page-title i {
    color: #3498db;
    margin-right: 1rem;
}

.hvac-page-subtitle {
    color: #7f8c8d;
    font-size: 1.2rem;
    margin: 0;
}

.hvac-announcements-manager-wrapper {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    min-height: 600px;
}

/* Responsive design */
@media (max-width: 768px) {
    .hvac-master-announcements-page {
        padding: 1rem 0;
    }
    
    .hvac-master-announcements-page .container {
        padding: 0 15px;
    }
    
    .hvac-page-header,
    .hvac-announcements-manager-wrapper {
        padding: 1.5rem;
    }
    
    .hvac-page-title {
        font-size: 2rem;
    }
}
</style>

<?php get_footer(); ?>