/* ===== COMPONENTES RESPONSIVOS ESPECÍFICOS ===== */


@media (max-width: 767.98px) {
    .btn-padrao,
    .btn-contato {
        min-height: 44px; /* Tamanho mínimo recomendado para touch */
        padding: 12px 20px;
        font-size: 16px;
    }
}

/* ===== MELHORIAS PARA TIPOGRAFIA ===== */
@media (max-width: 575.98px) {
    h1 { font-size: 1.8rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.3rem; }
    h4 { font-size: 1.1rem; }
    h5 { font-size: 1rem; }
    h6 { font-size: 0.9rem; }
    
    p, li, span {
        font-size: 0.9rem;
        line-height: 1.6;
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.7rem; }
    h3 { font-size: 1.4rem; }
    h4 { font-size: 1.2rem; }
    h5 { font-size: 1.1rem; }
    h6 { font-size: 1rem; }
}

/* ===== MELHORIAS PARA IMAGENS ===== */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

/* ===== GRID RESPONSIVO ===== */
.responsive-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 576px) {
    .responsive-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 768px) {
    .responsive-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

@media (min-width: 992px) {
    .responsive-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2.5rem;
    }
}

/* ===== FLEXBOX RESPONSIVO ===== */
.responsive-flex {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .responsive-flex {
        flex-direction: row;
        gap: 2rem;
    }
}

/* ===== ESPAÇAMENTOS RESPONSIVOS ===== */
.spacing-xs { margin: 0.5rem; }
.spacing-sm { margin: 1rem; }
.spacing-md { margin: 1.5rem; }
.spacing-lg { margin: 2rem; }
.spacing-xl { margin: 3rem; }

@media (max-width: 767.98px) {
    .spacing-xs { margin: 0.25rem; }
    .spacing-sm { margin: 0.5rem; }
    .spacing-md { margin: 1rem; }
    .spacing-lg { margin: 1.5rem; }
    .spacing-xl { margin: 2rem; }
}

/* ===== PADDING RESPONSIVO ===== */
.padding-xs { padding: 0.5rem; }
.padding-sm { padding: 1rem; }
.padding-md { padding: 1.5rem; }
.padding-lg { padding: 2rem; }
.padding-xl { padding: 3rem; }

@media (max-width: 767.98px) {
    .padding-xs { padding: 0.25rem; }
    .padding-sm { padding: 0.5rem; }
    .padding-md { padding: 1rem; }
    .padding-lg { padding: 1.5rem; }
    .padding-xl { padding: 2rem; }
}

/* ===== MELHORIAS PARA FORMULÁRIOS ===== */
.form-responsive {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.form-responsive .form-group {
    margin-bottom: 1rem;
}

.form-responsive input,
.form-responsive textarea,
.form-responsive select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px; /* Evita zoom no iOS */
    transition: border-color 0.3s ease;
}

.form-responsive input:focus,
.form-responsive textarea:focus,
.form-responsive select:focus {
    outline: none;
    border-color: var(--cor-icon);
    box-shadow: 0 0 0 2px rgba(175, 65, 162, 0.2);
}

@media (max-width: 767.98px) {
    .form-responsive input,
    .form-responsive textarea,
    .form-responsive select {
        padding: 1rem;
        font-size: 16px;
    }
}

/* ===== MELHORIAS PARA CARDS ===== */
.card-responsive {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card-responsive:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

@media (max-width: 767.98px) {
    .card-responsive {
        padding: 1rem;
        margin-bottom: 0.5rem;
    }
    
    .card-responsive:hover {
        transform: none; /* Desabilita hover em mobile */
    }
}

/* ===== MELHORIAS PARA MODAIS ===== */
.modal-responsive {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    padding: 1rem;
}

.modal-content-responsive {
    background: white;
    border-radius: 8px;
    padding: 2rem;
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

@media (max-width: 767.98px) {
    .modal-content-responsive {
        padding: 1rem;
        max-width: 95vw;
        max-height: 95vh;
    }
}

/* ===== MELHORIAS PARA TABELAS ===== */
.table-responsive-custom {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive-custom table {
    width: 100%;
    min-width: 600px;
    border-collapse: collapse;
}

.table-responsive-custom th,
.table-responsive-custom td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

@media (max-width: 767.98px) {
    .table-responsive-custom {
        font-size: 0.9rem;
    }
    
    .table-responsive-custom th,
    .table-responsive-custom td {
        padding: 0.5rem;
    }
}

/* ===== MELHORIAS PARA NAVEGAÇÃO ===== */
.nav-responsive {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

@media (max-width: 767.98px) {
    .nav-responsive {
        padding: 0.5rem 1rem;
    }
}

/* ===== MELHORIAS PARA SEÇÕES ===== */
.section-responsive {
    padding: 4rem 0;
}

@media (max-width: 767.98px) {
    .section-responsive {
        padding: 2rem 0;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .section-responsive {
        padding: 3rem 0;
    }
}

/* ===== MELHORIAS PARA CONTAINERS ===== */
.container-responsive {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 576px) {
    .container-responsive {
        padding: 0 1.5rem;
    }
}

@media (min-width: 768px) {
    .container-responsive {
        padding: 0 2rem;
    }
}

@media (min-width: 992px) {
    .container-responsive {
        padding: 0 2.5rem;
    }
}

/* ===== MELHORIAS PARA VÍDEOS ===== */
.video-responsive {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
}

.video-responsive iframe,
.video-responsive video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== MELHORIAS PARA ANIMAÇÕES ===== */
@media (prefers-reduced-motion: reduce) {
    .animated,
    .hover-effect,
    .transition-all {
        animation: none !important;
        transition: none !important;
    }
}

/* ===== MELHORIAS PARA ACESSIBILIDADE ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus-visible:focus {
    outline: 2px solid var(--cor-icon);
    outline-offset: 2px;
}

/* ===== MELHORIAS PARA PERFORMANCE ===== */
.will-change-transform {
    will-change: transform;
}

.will-change-opacity {
    will-change: opacity;
}

.gpu-accelerated {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* ===== UTILITÁRIOS DE DISPLAY ===== */
@media (max-width: 575.98px) {
    .d-xs-none { display: none !important; }
    .d-xs-block { display: block !important; }
    .d-xs-flex { display: flex !important; }
    .d-xs-grid { display: grid !important; }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .d-sm-none { display: none !important; }
    .d-sm-block { display: block !important; }
    .d-sm-flex { display: flex !important; }
    .d-sm-grid { display: grid !important; }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .d-md-none { display: none !important; }
    .d-md-block { display: block !important; }
    .d-md-flex { display: flex !important; }
    .d-md-grid { display: grid !important; }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .d-lg-none { display: none !important; }
    .d-lg-block { display: block !important; }
    .d-lg-flex { display: flex !important; }
    .d-lg-grid { display: grid !important; }
}

@media (min-width: 1200px) {
    .d-xl-none { display: none !important; }
    .d-xl-block { display: block !important; }
    .d-xl-flex { display: flex !important; }
    .d-xl-grid { display: grid !important; }
}

/* ===== MELHORIAS PARA DARK MODE ===== */
@media (prefers-color-scheme: dark) {
    .auto-dark {
        background-color: #1a1a1a;
        color: #ffffff;
    }
    
    .auto-dark .card-responsive {
        background-color: #2a2a2a;
        color: #ffffff;
    }
}

/* ===== MELHORIAS PARA CONTRASTE ===== */
@media (prefers-contrast: high) {
    .high-contrast {
        border: 2px solid currentColor;
    }
    
    .high-contrast .btn-padrao,
    .high-contrast .btn-contato {
        border-width: 3px;
    }
}