/**
 * Responsive CSS - Escola + Segura
 * @package Escola_Mais_Segura
 * @version 2.0.0
 */

/* ==========================================================================
   EXTRA LARGE DEVICES (≥1200px)
   ========================================================================== */

@media (min-width: 1200px) {
    .ems-container {
        max-width: 1140px;
    }
    
    .ems-hero-title {
        font-size: 3.5rem;
    }
}

/* ==========================================================================
   LARGE DEVICES (992px - 1199px)
   ========================================================================== */

@media (min-width: 992px) and (max-width: 1199px) {
    .ems-container {
        max-width: 960px;
    }
    
    h1 { font-size: 2.3rem; }
    h2 { font-size: 1.9rem; }
    
    .ems-grid-4 {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .ems-discrimination-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================================================
   MEDIUM DEVICES (768px - 991px)
   ========================================================================== */

@media (min-width: 768px) and (max-width: 991px) {
    .ems-container {
        max-width: 720px;
    }
    
    h1 { font-size: 2rem; }
    h2 { font-size: 1.7rem; }
    h3 { font-size: 1.4rem; }
    
    .ems-grid-3,
    .ems-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ems-hero-title {
        font-size: 2.5rem;
    }
    
    .ems-hero-subtitle {
        font-size: 1.1rem;
    }
    
    .ems-posts-grid {
        --posts-per-row: 2;
    }
    
    .ems-discrimination-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ==========================================================================
   SMALL DEVICES (576px - 767px)
   ========================================================================== */

@media (min-width: 576px) and (max-width: 767px) {
    .ems-container {
        max-width: 540px;
    }
    
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }
    
    .ems-grid-2,
    .ems-grid-3,
    .ems-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .ems-hero-section {
        padding: 60px 0;
        min-height: 400px;
    }
    
    .ems-hero-title {
        font-size: 2rem;
    }
    
    .ems-hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .ems-hero-buttons .btn {
        width: 100%;
        max-width: 250px;
    }
    
    .ems-posts-grid {
        --posts-per-row: 1;
    }
    
    .ems-discrimination-grid {
        grid-template-columns: 1fr;
    }
    
    .ems-form-row {
        grid-template-columns: 1fr;
    }
    
    .ems-form-navigation {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .ems-form-navigation button {
        width: 100%;
    }
    
    .ems-tickets-list {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   EXTRA SMALL DEVICES (<576px)
   ========================================================================== */

@media (max-width: 575px) {
    .ems-container {
        padding: 0 var(--spacing-sm);
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.3rem; }
    h3 { font-size: 1.2rem; }
    
    .site-logo img {
        max-height: 40px;
    }
    
    .site-title {
        font-size: 1.2rem;
    }
    
    .user-greeting {
        display: none;
    }
    
    .ems-hero-section {
        padding: 40px 0;
        min-height: 350px;
    }
    
    .ems-hero-title {
        font-size: 1.8rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .ems-post-card .post-thumbnail {
        height: 160px;
    }
    
    .post-content {
        padding: var(--spacing-md);
    }
    
    .entry-title {
        font-size: 1.1rem;
    }
    
    .ems-discrimination-card {
        padding: var(--spacing-lg);
    }
    
    .card-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    .step-label {
        display: none;
    }
    
    .ems-form-group label {
        font-size: 0.9rem;
    }
    
    .ems-form-group input,
    .ems-form-group select,
    .ems-form-group textarea {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.95rem;
    }
    
    .ems-option-card .ems-radio {
        padding: var(--spacing-md);
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ems-login-prompt .ems-buttons {
        flex-direction: column;
    }
    
    .single-title {
        font-size: 1.5rem;
    }
    
    .single-meta {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .share-buttons {
        flex-wrap: wrap;
    }
    
    .footer-wave svg {
        height: 40px;
    }
    
    .partners-logos {
        flex-direction: column;
        align-items: center;
    }
    
    .partner-logo {
        width: 100%;
        text-align: center;
    }
}

/* ==========================================================================
   ORIENTAÇÃO PAISAGEM EM MOBILE
   ========================================================================== */

@media (max-height: 500px) and (orientation: landscape) {
    .ems-modal .modal-container {
        max-height: 80vh;
    }
    
    .ems-hero-section {
        min-height: 300px;
        padding: 40px 0;
    }
    
    .ems-hero-title {
        font-size: 1.8rem;
    }
}

/* ==========================================================================
   IMPRESSÃO
   ========================================================================== */

@media print {
    @page {
        margin: 2cm;
    }
    
    body {
        font-size: 11pt;
        line-height: 1.4;
    }
    
    h1 { font-size: 18pt; }
    h2 { font-size: 16pt; }
    h3 { font-size: 14pt; }
    
    .ems-container {
        max-width: 100%;
        padding: 0;
    }
    
    .ems-ticket-card,
    .ems-post-card,
    .ems-discrimination-card {
        page-break-inside: avoid;
        border: 1px solid #ccc;
        margin-bottom: 10px;
    }
    
    .ems-progress-steps,
    .ems-form-navigation,
    .btn,
    .header-actions,
    .menu-toggle,
    .ems-accessibility-bar,
    .ems-support-button {
        display: none !important;
    }
}