/* ===== RESPONSIVIDADE AVANÇADA PARA TODAS AS TELAS ===== */
/* Arquivo dedicado para garantir perfeita adaptação em todos os dispositivos */

/* ===== BREAKPOINTS CUSTOMIZADOS ===== */
/* 
- xs: 0-575px (Smartphones pequenos)
- sm: 576-767px (Smartphones grandes)
- md: 768-991px (Tablets)
- lg: 992-1199px (Desktops pequenos)
- xl: 1200-1399px (Desktops médios)
- xxl: 1400px+ (Desktops grandes)
*/

/* ===== CONTAINER E GRID RESPONSIVO ===== */
.container-fluid {
    padding-left: 15px;
    padding-right: 15px;
}

@media (max-width: 575px) {
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* ===== TIPOGRAFIA RESPONSIVA ===== */
/* Títulos principais */
.hero-title,
.section-title,
h1 {
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    line-height: 1.2;
}

.hero-subtitle,
.lead {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    line-height: 1.4;
}

h2 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.3rem, 3vw, 2rem);
}

h4 {
    font-size: clamp(1.2rem, 2.5vw, 1.5rem);
}

h5 {
    font-size: clamp(1.1rem, 2vw, 1.25rem);
}

/* ===== NAVEGAÇÃO RESPONSIVA ===== */
.navbar {
    padding: 0.5rem 0;
}

.navbar-brand img {
    height: clamp(35px, 8vw, 50px);
    width: auto;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    font-size: clamp(0.9rem, 2vw, 1rem);
}

/* Dropdown melhorado para mobile */
@media (max-width: 991px) {
    .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        margin-top: 0;
        background-color: rgba(255, 255, 255, 0.98);
        border: none;
        border-radius: 0;
        box-shadow: inset 0 1px 0 rgba(25, 118, 210, 0.1);
    }
    
    .dropdown-item {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
    
    .navbar-toggler {
        border: none;
        padding: 0.25rem 0.5rem;
    }
    
    .navbar-collapse {
        margin-top: 1rem;
        border-top: 1px solid rgba(25, 118, 210, 0.1);
        padding-top: 1rem;
    }
}

/* ===== HERO SECTION RESPONSIVA ===== */
.hero-section {
    min-height: 100vh;
    padding: 2rem 0;
    background-attachment: scroll; /* Melhor performance em mobile */
}

@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
        padding: 1rem 0;
        background-attachment: scroll;
    }
    
    .hero-overlay {
        background: rgba(0, 0, 0, 0.4) !important;
    }
}

@media (max-width: 480px) {
    .hero-section {
        min-height: 70vh;
        text-align: center;
    }
}

/* ===== CARDS E COMPONENTES RESPONSIVOS ===== */
.service-card,
.testimonial-card,
.feature-item,
.blog-card,
.event-card,
.destination-card,
.vehicle-card,
.sustainability-card,
.security-card {
    margin-bottom: 2rem;
    padding: clamp(1.5rem, 4vw, 2.5rem);
    border-radius: clamp(16px, 3vw, 24px);
}

/* Ícones responsivos */
.service-icon i,
.feature-icon,
.security-icon i,
.sustainability-icon i,
.type-icon {
    font-size: clamp(2.5rem, 6vw, 4rem);
    width: clamp(70px, 15vw, 120px);
    height: clamp(70px, 15vw, 120px);
    padding: clamp(1rem, 2vw, 1.5rem);
}

/* ===== FORMULÁRIOS RESPONSIVOS ===== */
.form-control,
.form-select {
    padding: clamp(10px, 2vw, 14px) clamp(15px, 3vw, 18px);
    font-size: clamp(0.9rem, 2vw, 1rem);
    border-radius: clamp(8px, 2vw, 12px);
}

.form-label {
    font-size: clamp(0.9rem, 2vw, 1rem);
    margin-bottom: clamp(0.5rem, 1vw, 0.75rem);
}

.btn {
    padding: clamp(10px, 2vw, 14px) clamp(20px, 4vw, 32px);
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    border-radius: clamp(20px, 4vw, 25px);
}

.btn-lg {
    padding: clamp(12px, 3vw, 16px) clamp(24px, 5vw, 32px);
    font-size: clamp(1rem, 2.5vw, 1.1rem);
}

/* ===== TABELAS RESPONSIVAS ===== */
.table-responsive {
    border-radius: clamp(12px, 2vw, 16px);
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .table {
        font-size: 0.85rem;
    }
    
    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        white-space: nowrap;
    }
}

@media (max-width: 576px) {
    .table {
        font-size: 0.8rem;
    }
    
    .table th,
    .table td {
        padding: 0.4rem 0.2rem;
    }
}

/* ===== IMAGENS RESPONSIVAS ===== */
.hero-image,
.service-image,
.blog-image,
.event-image,
.destination-image,
.vehicle-image,
.timeline-image,
.featured-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: clamp(12px, 2vw, 16px);
}

/* Alturas específicas para diferentes tamanhos */
@media (min-width: 1200px) {
    .blog-image,
    .event-image,
    .destination-image,
    .vehicle-image {
        height: 250px;
    }
    
    .service-image,
    .featured-image {
        height: 400px;
    }
}

@media (max-width: 1199px) and (min-width: 768px) {
    .blog-image,
    .event-image,
    .destination-image,
    .vehicle-image {
        height: 220px;
    }
    
    .service-image,
    .featured-image {
        height: 350px;
    }
}

@media (max-width: 767px) {
    .blog-image,
    .event-image,
    .destination-image,
    .vehicle-image {
        height: 200px;
    }
    
    .service-image,
    .featured-image {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .blog-image,
    .event-image,
    .destination-image,
    .vehicle-image {
        height: 180px;
    }
    
    .service-image,
    .featured-image {
        height: 200px;
    }
}

/* ===== TIMELINE RESPONSIVA ===== */
.timeline::before {
    left: clamp(1rem, 5vw, 50%);
}

.timeline-content {
    width: clamp(100%, 90%, 45%);
    margin-left: clamp(2rem, 8vw, auto) !important;
    margin-right: clamp(0, 2vw, auto) !important;
}

.timeline-marker {
    left: clamp(1rem, 5vw, 50%);
    width: clamp(15px, 3vw, 20px);
    height: clamp(15px, 3vw, 20px);
}

@media (max-width: 768px) {
    .timeline::before {
        left: 1.5rem;
    }
    
    .timeline-marker {
        left: 1.5rem;
    }
    
    .timeline-content {
        width: calc(100% - 3rem);
        margin-left: 3rem !important;
        margin-right: 0 !important;
    }
}

/* ===== ACCORDION RESPONSIVO ===== */
.accordion-button {
    padding: clamp(1rem, 2vw, 1.25rem) clamp(1.25rem, 3vw, 1.5rem);
    font-size: clamp(0.9rem, 2vw, 1rem);
}

.accordion-body {
    padding: clamp(1.25rem, 3vw, 1.5rem);
    font-size: clamp(0.9rem, 2vw, 1rem);
    line-height: 1.6;
}

/* ===== MODAL RESPONSIVO ===== */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-content {
        border-radius: 16px;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
    
    .modal-title {
        font-size: 1.1rem;
    }
}

/* ===== CAROUSEL RESPONSIVO ===== */
.carousel-control-prev,
.carousel-control-next {
    width: clamp(8%, 10%, 5%);
}

.carousel-indicators {
    margin-bottom: clamp(1rem, 2vw, 2rem);
}

@media (max-width: 768px) {
    .carousel-control-prev,
    .carousel-control-next {
        width: 12%;
    }
    
    .carousel-caption {
        padding-bottom: 2rem;
    }
    
    .carousel-caption h4 {
        font-size: 1.1rem;
    }
    
    .carousel-caption p {
        font-size: 0.9rem;
        display: none; /* Oculta texto longo em telas pequenas */
    }
}

/* ===== FOOTER RESPONSIVO ===== */
.footer {
    padding: clamp(2rem, 5vw, 3rem) 0;
}

.footer-title {
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
}

.footer-links a,
.footer-contact p {
    font-size: clamp(0.85rem, 2vw, 1rem);
}

.social-link {
    width: clamp(40px, 8vw, 50px);
    height: clamp(40px, 8vw, 50px);
    font-size: clamp(1rem, 2vw, 1.2rem);
    margin: clamp(0.25rem, 1vw, 0.5rem);
}

/* ===== PUBLICIDADE RESPONSIVA ===== */
.ad-banner {
    margin: clamp(1rem, 3vw, 2rem) 0;
    border-radius: clamp(12px, 2vw, 16px);
}

.ad-728x90 {
    max-width: 100%;
    height: clamp(60px, 12vw, 90px);
}

.ad-800x500 {
    max-width: 100%;
    height: clamp(200px, 40vw, 500px);
}

@media (max-width: 480px) {
    .ad-728x90 {
        height: 50px;
    }
    
    .ad-800x500 {
        height: 180px;
    }
}

/* ===== SIDEBAR RESPONSIVO ===== */
.sidebar {
    margin-top: clamp(2rem, 4vw, 0);
}

.sidebar-widget {
    padding: clamp(1.5rem, 3vw, 2rem);
    margin-bottom: clamp(1.5rem, 3vw, 2rem);
    border-radius: clamp(16px, 3vw, 20px);
}

.recent-post {
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
    padding-bottom: clamp(0.75rem, 1.5vw, 1rem);
}

.recent-post-image {
    width: clamp(60px, 12vw, 80px);
    height: clamp(45px, 9vw, 60px);
    border-radius: clamp(6px, 1vw, 8px);
}

/* ===== UTILITÁRIOS RESPONSIVOS ===== */
/* Espaçamentos responsivos */
.py-responsive {
    padding-top: clamp(2rem, 5vw, 5rem);
    padding-bottom: clamp(2rem, 5vw, 5rem);
}

.my-responsive {
    margin-top: clamp(1rem, 3vw, 3rem);
    margin-bottom: clamp(1rem, 3vw, 3rem);
}

/* Texto responsivo */
.text-responsive {
    font-size: clamp(0.9rem, 2vw, 1rem);
    line-height: 1.6;
}

/* ===== MELHORIAS DE PERFORMANCE ===== */
/* Otimizações para dispositivos móveis */
@media (max-width: 768px) {
    * {
        -webkit-tap-highlight-color: transparent;
    }
    
    .hover-lift:hover,
    .hover-bounce:hover {
        transform: none; /* Remove animações complexas em mobile */
    }
    
    .service-card:hover,
    .blog-card:hover,
    .event-card:hover {
        transform: translateY(-5px) scale(1.01); /* Animações mais leves */
    }
}

/* ===== ACESSIBILIDADE RESPONSIVA ===== */
/* Melhor contraste em telas pequenas */
@media (max-width: 576px) {
    .text-muted {
        color: #495057 !important; /* Contraste melhorado */
    }
    
    .btn {
        min-height: 44px; /* Área de toque mínima */
        min-width: 44px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}

/* ===== ORIENTAÇÃO LANDSCAPE ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 0.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    
    .modal-dialog {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .footer,
    .btn,
    .ad-banner,
    .social-links {
        display: none !important;
    }
    
    .hero-section {
        background: none !important;
        color: #000 !important;
        min-height: auto !important;
    }
    
    .hero-title,
    .hero-subtitle {
        color: #000 !important;
        text-shadow: none !important;
    }
    
    .container {
        max-width: 100% !important;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    /* Preparação para futuro suporte ao modo escuro */
    .bg-light {
        background-color: #f8f9fa !important; /* Mantém claro por enquanto */
    }
}

/* ===== HIGH DPI DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .navbar-brand img,
    .logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hover-lift:hover,
    .hover-bounce:hover {
        transform: none !important;
    }
}