/* ========================================
   GWEB SOLUÇÕES - RESPONSIVE STYLES
   Mobile-First Responsive Design
   Author: Gilcimar Martins
   ======================================== */

/* ========== MOBILE FIRST BASE ========== */
/* Base styles are already mobile-friendly in main.css */

/* ========== SMALL DEVICES (Landscape Phones, 576px and up) ========== */
@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }

    .hero-title {
        font-size: 2.75rem;
    }

    .section-title {
        font-size: 2.25rem;
    }
}

/* ========== MEDIUM DEVICES (Tablets, 768px and up) ========== */
@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }

    .hero-title {
        font-size: 3.25rem;
    }

    .section-title {
        font-size: 2.5rem;
    }

    /* Grid improvements */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== LARGE DEVICES (Desktops, 992px and up) ========== */
@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }

    .hero-title {
        font-size: 3.75rem;
    }

    .section-title {
        font-size: 2.75rem;
    }

    /* Grid improvements */
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .portfolio-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========== EXTRA LARGE DEVICES (Large Desktops, 1200px and up) ========== */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }

    .hero-title {
        font-size: 4rem;
    }

    .section-title {
        font-size: 3rem;
    }
}

/* ========== EXTRA EXTRA LARGE DEVICES (1400px and up) ========== */
@media (min-width: 1400px) {
    .container {
        max-width: 1280px;
    }
}

/* ========== MOBILE SPECIFIC (Max-width: 767px) ========== */
@media (max-width: 767px) {

    /* Typography */
    html {
        font-size: 14px;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    /* Navigation */
    .navbar {
        padding: 0.75rem 0;
    }

    .nav-wrapper {
        padding: 0.5rem 0;
    }

    .logo {
        height: 32px;
    }

    .logo-text {
        font-size: 1rem;
    }

    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        gap: 1rem;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        width: 100%;
        padding: 1rem 0;
        border-bottom: 1px solid #f1f5f9;
    }

    .nav-link-special {
        width: 100%;
        text-align: center;
        margin-top: 1rem;
    }

    .mobile-toggle {
        display: flex;
    }

    .btn-contact {
        display: none;
    }

    /* Hero Section */
    .hero {
        min-height: auto;
        padding: 6rem 0 3rem;
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero-visual {
        order: -1;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 0.5rem 1rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .hero-cta {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .trust-badges {
        flex-direction: column;
        gap: 1rem;
    }

    .scroll-indicator {
        display: none;
    }

    /* About Section */
    .about {
        padding: 3rem 0;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        order: -1;
    }

    .floating-card {
        position: static;
        margin-top: 1rem;
    }

    .values-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .about-features {
        grid-template-columns: 1fr;
    }

    /* Services Section */
    .services {
        padding: 3rem 0;
    }

    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .service-card {
        padding: 2rem;
    }

    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    /* Portfolio Section */
    .portfolio {
        padding: 3rem 0;
    }

    .portfolio-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Mentoria Section */
    .mentoria {
        padding: 3rem 0;
    }

    .mentoria-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .mentoria-visual {
        order: -1;
    }

    .mentoria-benefits {
        gap: 1rem;
    }

    .benefit-item {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }

    .benefit-icon {
        margin: 0 auto;
    }

    .mentoria-cta {
        flex-direction: column;
        gap: 1.5rem;
    }

    .mentoria-cta .btn {
        width: 100%;
        justify-content: center;
    }

    .float-card {
        position: static;
        margin-top: 1rem;
    }

    /* Contact Section */
    .contact {
        padding: 3rem 0;
    }

    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-form-wrapper {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .social-links {
        justify-content: center;
    }

    /* Footer */
    .footer {
        padding: 3rem 0 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-logo {
        justify-content: center;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-column ul {
        align-items: center;
    }

    /* Modal */
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-body {
        padding: 1rem;
    }

    .project-modal {
        padding: 1rem;
    }

    .project-title {
        font-size: 1.5rem;
    }

    .gallery-thumbs {
        grid-template-columns: repeat(2, 1fr);
    }

    .project-actions {
        flex-direction: column;
    }

    .project-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* Buttons */
    .btn-large {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    /* Spacing */
    .section-header {
        margin-bottom: 2rem;
    }

    /* WhatsApp Float */
    .whatsapp-float {
        bottom: 70px;
        right: 20px;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .scroll-to-top {
        bottom: 20px !important;
        right: 20px !important;
        width: 45px !important;
        height: 45px !important;
        font-size: 1rem !important;
    }
}

/* ========== TABLET SPECIFIC (768px to 991px) ========== */
@media (min-width: 768px) and (max-width: 991px) {
    .hero .container {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .about-content,
    .mentoria-content,
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .values-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== LANDSCAPE ORIENTATION ========== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 5rem 0 2rem;
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .scroll-indicator {
        display: none;
    }
}

/* ========== PRINT STYLES ========== */
@media print {

    .navbar,
    .hero-cta,
    .contact-form,
    .whatsapp-float,
    .scroll-to-top,
    .footer-social {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    .container {
        max-width: 100%;
    }

    a {
        text-decoration: underline;
    }

    a[href^="http"]:after {
        content: " (" attr(href) ")";
    }
}

/* ========== TOUCH DEVICE OPTIMIZATIONS ========== */
@media (hover: none) and (pointer: coarse) {

    /* Increase touch targets */
    .btn,
    .nav-link,
    .filter-btn {
        min-height: 44px;
        min-width: 44px;
    }

    /* Remove hover effects on touch devices */
    .hover-lift:hover,
    .hover-scale:hover,
    .hover-glow:hover {
        transform: none;
        box-shadow: none;
    }

    /* Simplify animations on touch devices */
    .service-card:hover,
    .portfolio-item:hover {
        transform: none;
    }
}

/* ========== HIGH DPI DISPLAYS ========== */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {

    /* Optimize for retina displays */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ========== DARK MODE SUPPORT ========== */
@media (prefers-color-scheme: dark) {
    /* Optional: Add dark mode styles if needed */
    /* Currently using light theme by default */
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ========== CONTAINER QUERIES (Future-proof) ========== */
@supports (container-type: inline-size) {
    .service-card {
        container-type: inline-size;
    }

    @container (max-width: 300px) {
        .service-features {
            font-size: 0.875rem;
        }
    }
}

/* ========== UTILITY CLASSES FOR RESPONSIVE ========== */

/* Hide on mobile */
.hide-mobile {
    display: none;
}

@media (min-width: 768px) {
    .hide-mobile {
        display: block;
    }
}

/* Hide on desktop */
.hide-desktop {
    display: block;
}

@media (min-width: 768px) {
    .hide-desktop {
        display: none;
    }
}

/* Show only on mobile */
.mobile-only {
    display: block;
}

@media (min-width: 768px) {
    .mobile-only {
        display: none;
    }
}

/* Show only on desktop */
.desktop-only {
    display: none;
}

@media (min-width: 768px) {
    .desktop-only {
        display: block;
    }
}

/* Responsive text alignment */
.text-center-mobile {
    text-align: center;
}

@media (min-width: 768px) {
    .text-center-mobile {
        text-align: left;
    }
}

/* Responsive spacing */
.spacing-mobile {
    padding: 1rem;
}

@media (min-width: 768px) {
    .spacing-mobile {
        padding: 2rem;
    }
}

@media (min-width: 1200px) {
    .spacing-mobile {
        padding: 3rem;
    }
}