/**
 * Ucristo Construction Company - Responsive Styles
 * Estilos específicos para melhorar a responsividade em dispositivos móveis
 */

/*--------------------------------------------------------------
# Ajustes Globais para Dispositivos Móveis
--------------------------------------------------------------*/
html, body {
    overflow-x: hidden;
    touch-action: manipulation;
    -webkit-overflow-scrolling: touch;
}

/* Ajuste de texto para melhor legibilidade em telas pequenas */
@media (max-width: 767px) {
    h1 {
        font-size: 2rem !important;
        line-height: 1.3 !important;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
    }
    
    p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }
    
    .container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .section-padding {
        padding: 60px 0 50px;
    }
}

/* Espaço toque maior para elementos interativos em dispositivos móveis */
@media (max-width: 991px) {
    button, 
    .btn, 
    a.nav-link, 
    .form-control, 
    input {
        min-height: 44px;
        padding: 10px 20px;
    }
    
    .nav-link {
        padding: 12px 16px !important;
    }
    
    input[type="checkbox"], 
    input[type="radio"] {
        min-height: auto;
        padding: 0;
    }
}

/*--------------------------------------------------------------
# Header e Menu de Navegação para Móveis
--------------------------------------------------------------*/
@media (max-width: 991px) {
    .header {
        padding: 15px 0;
    }
    
    .navbar-brand img {
        height: 40px;
    }
    
    .navbar-collapse {
        background-color: rgba(18, 18, 18, 0.98);
        border-radius: 10px;
        padding: 20px;
        margin-top: 10px;
        max-height: 80vh;
        overflow-y: auto;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    }
    
    .navbar-nav {
        padding-bottom: 10px;
    }
    
    .navbar-toggler {
        border: none;
        padding: 10px;
    }
    
    .navbar-toggler:focus {
        box-shadow: none;
        outline: none;
    }
    
    .mobile-contact {
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 15px;
        margin-top: 10px;
        text-align: center;
    }
    
    .mobile-contact .btn {
        display: block;
        width: 100%;
    }
}

/*--------------------------------------------------------------
# Hero Section em Dispositivos Móveis
--------------------------------------------------------------*/
@media (max-width: 767px) {
    .hero-section, .hero-slide {
        height: 90vh;
        min-height: 600px;
    }
    
    .hero-slide::before {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.6));
    }
    
    .hero-text {
        text-align: center;
        padding: 0 15px;
        margin-bottom: 30px;
    }
    
    .hero-slide .hero-content {
        padding-top: 80px;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        margin: 0;
    }
    
    .hero-image img, .hero-logo img {
        max-height: 200px;
    }
}

/*--------------------------------------------------------------
# Ajustes de Seções Específicas para Móveis
--------------------------------------------------------------*/
/* About Section */
@media (max-width: 767px) {
    .about-image {
        margin-bottom: 30px;
        max-height: 300px;
        overflow: hidden;
    }
    
    .stats-container {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .stat-item {
        padding: 15px 10px;
    }
    
    .stat-item h3 {
        font-size: 1.8rem;
    }
    
    .stat-item p {
        font-size: 0.8rem !important;
    }
    
    .features-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Services Section */
@media (max-width: 767px) {
    .services-grid {
        gap: 20px;
    }
    
    .service-card {
        padding: 25px 20px;
    }
    
    .service-card .icon {
        width: 60px;
        height: 60px;
    }
}

/* Portfolio Section */
@media (max-width: 767px) {
    .portfolio-filter {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 15px;
        margin-bottom: 30px;
        display: flex;
        justify-content: start;
    }
    
    .portfolio-filter::-webkit-scrollbar {
        height: 5px;
    }
    
    .portfolio-filter::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.2);
        border-radius: 5px;
    }
    
    .portfolio-filter button {
        display: inline-block;
        margin-right: 10px;
        padding: 8px 15px;
        font-size: 0.875rem;
    }
    
    .portfolio-image {
        height: 200px;
    }
    
    .portfolio-content h4 {
        font-size: 1rem;
    }
    
    /* Ajuste no modal de projetos */
    .modal-body {
        padding: 20px;
    }
    
    .project-details h4 {
        margin-top: 15px;
        font-size: 1.25rem;
    }
}

/* Testimonial Section */
@media (max-width: 767px) {
    .testimonial-item {
        padding: 25px 20px;
        min-height: auto;
    }
    
    .slick-custom-arrows {
        position: static;
        transform: none;
        margin-top: 30px;
        justify-content: center;
        gap: 20px;
    }
    
    .slick-custom-arrows button {
        width: 40px;
        height: 40px;
    }
}

/* FAQ Section */
@media (max-width: 767px) {
    .faq-header {
        padding: 15px 20px;
    }
    
    .faq-header h3 {
        font-size: 1rem !important;
        padding-right: 30px;
    }
    
    .faq-icon {
        right: 15px;
    }
    
    .faq-body {
        padding: 0 20px;
    }
    
    .faq-item.active .faq-body {
        padding-bottom: 20px;
    }
}

/* Contact Section */
@media (max-width: 767px) {
    .contact-form-container, 
    .contact-info {
        padding: 25px 20px;
        margin-bottom: 30px;
    }
    
    .contact-info-item {
        margin-bottom: 20px;
    }
    
    .contact-info-item .icon {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
}

/* Footer */
@media (max-width: 767px) {
    .footer-top {
        padding: 60px 0 30px;
    }
    
    .footer-widget {
        margin-bottom: 30px;
        text-align: center;
    }
    
    .footer-widget .social-links {
        justify-content: center;
    }
    
    .widget-title {
        margin-bottom: 20px;
    }
    
    .widget-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .footer-links li {
        text-align: center;
        padding-left: 0;
    }
    
    .footer-links li::before {
        display: none;
    }
    
    .newsletter-form input {
        margin-bottom: 10px;
    }
}

/*--------------------------------------------------------------
# Ajustes para o WhatsApp Float Button
--------------------------------------------------------------*/
@media (max-width: 767px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 24px;
        bottom: 20px;
        right: 20px;
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        right: 20px;
        bottom: 85px;
    }
}

/*--------------------------------------------------------------
# Melhorias de Performance em Dispositivos Móveis
--------------------------------------------------------------*/
@media (max-width: 767px) {
    /* Desativa animações complexas em dispositivos móveis para melhor performance */
    .fade-in, 
    .slide-up, 
    .slide-right, 
    .slide-left, 
    .scale-up {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    /* Simplifica efeitos hover em dispositivos táteis */
    .service-card:hover,
    .portfolio-item:hover,
    .testimonial-item:hover,
    .faq-item:hover {
        transform: none;
    }
    
    /* Fix para o problema de 100vh em navegadores móveis */
    .hero-section, .hero-slide {
        height: calc(100vh - 60px);
    }
    
    /* Ajustes de formulários para melhor usabilidade em telas touch */
    select, input, textarea {
        font-size: 16px !important; /* Previne zoom automático em iOS */
    }
}

/*--------------------------------------------------------------
# Otimizações de Acessibilidade e Usabilidade
--------------------------------------------------------------*/
/* Melhorar contraste de texto para elementos interativos */
@media (max-width: 767px) {
    .btn, 
    .nav-link, 
    .service-link, 
    .portfolio-filter button {
        font-weight: 600;
    }
    
    /* Aumentar contrastes para melhor legibilidade */
    .section-header p,
    .testimonial-text,
    .faq-body p {
        color: rgba(255, 255, 255, 0.9) !important;
    }
}

/* Ajustes para tablets */
@media (min-width: 768px) and (max-width: 991px) {
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .hero-text p {
        font-size: 1.1rem;
    }
    
    .services-grid,
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .hero-slide .hero-content {
        padding: 0 20px;
    }
}

/* Ajustes para telas menores que 380px (smartphones pequenos) */
@media (max-width: 379px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .section-padding {
        padding: 50px 0 40px;
    }
    
    h1 {
        font-size: 1.75rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    .stats-container {
        display: flex;
        flex-direction: column;
    }
    
    .hero-slide .hero-content {
        padding-top: 70px;
    }
    
    .hero-image img, .hero-logo img {
        max-height: 150px;
    }
}

/* Orientação Paisagem em Smartphones */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section, .hero-slide {
        height: auto;
        min-height: 450px;
    }
    
    .hero-text h1 {
        font-size: 1.75rem !important;
    }
    
    .hero-image img, .hero-logo img {
        max-height: 120px;
    }
    
    .navbar-collapse {
        max-height: 60vh;
    }
}

/* Correções de bugs específicos para iOS Safari */
@supports (-webkit-touch-callout: none) {
    .hero-section, .hero-slide {
        height: 90vh; /* Ajuste para iOS Safari */
    }
    
    /* Fix para comportamento indesejado em inputs no iOS */
    input, textarea {
        -webkit-appearance: none;
        border-radius: var(--border-radius-md);
    }
} 