/* ========================================
   DECA Soluciones - Responsive Styles
   ======================================== */

/* Mobile First Approach - Base styles for mobile */
@media (max-width: 480px) {
    /* Typography adjustments */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    h4 { font-size: 1.25rem; }
    
    .section-title {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-description {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    /* Container adjustments */
    .container {
        padding: 0 1rem;
        max-width: 100%;
    }
    
    /* Navigation mobile */
    .navbar {
        padding: 0;
    }
    
    .nav-container {
        padding: 0 1rem;
        height: 60px;
    }
    
    .logo {
        font-size: 1.25rem;
    }
    
    .nav-toggle {
        display: flex;
        flex-direction: column;
        background: none;
        border: none;
        cursor: pointer;
        padding: 5px;
    }
    
    .nav-toggle span {
        width: 25px;
        height: 3px;
        background: var(--text-dark);
        margin: 3px 0;
        transition: var(--transition-base);
        border-radius: 2px;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem 1rem;
        gap: 0;
        transition: left 0.3s ease;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin-bottom: 1rem;
    }
    
    .nav-link {
        display: block;
        padding: 1rem;
        font-size: 1.125rem;
        text-align: center;
        border-bottom: 1px solid var(--border-light);
    }
    
    .nav-cta {
        margin: 1rem 0;
        text-align: center;
    }
    
    /* Hero section mobile */
    .hero {
        padding-top: 60px;
        min-height: 90vh;
        text-align: center;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        padding: 2rem 1rem;
    }
    
    .hero-image {
        display: none; /* Hide complex hero image on mobile */
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        margin-top: 2rem;
    }
    
    .stat-item {
        padding: 1rem;
        background: rgba(255,255,255,0.1);
        border-radius: var(--border-radius);
        backdrop-filter: blur(5px);
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .stat-label {
        font-size: 0.75rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
        margin-bottom: 2rem;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }
    
    /* Sections mobile */
    section {
        padding: 3rem 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
        text-align: center;
    }
    
    .section-badge {
        font-size: 0.75rem;
    }
    
    /* Services mobile */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
        text-align: center;
    }
    
    .service-icon-wrapper {
        width: 60px;
        height: 60px;
        margin: 0 auto 1rem;
        font-size: 1.5rem;
    }
    
    .service-features {
        text-align: left;
    }
    
    /* Team mobile */
    .team-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .team-card {
        max-width: 100%;
    }
    
    .team-image {
        height: 200px;
    }
    
    .team-avatar {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .team-content {
        padding: 1.5rem 1rem;
    }
    
    .team-social {
        gap: 0.75rem;
    }
    
    .social-icon {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    /* FAQ mobile */
    .faq-categories {
        gap: 0.5rem;
        margin-bottom: 2rem;
    }
    
    .faq-category-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .faq-question {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
    
    .faq-answer-content {
        padding: 0 1.5rem 1rem;
        font-size: 0.9rem;
    }
    
    /* Gallery mobile */
    .gallery-filters {
        gap: 0.5rem;
        margin-bottom: 2rem;
    }
    
    .gallery-filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .gallery-item {
        aspect-ratio: 16/9;
    }
    
    .gallery-overlay {
        padding: 1rem;
    }
    
    .gallery-title {
        font-size: 1.25rem;
    }
    
    .gallery-description {
        font-size: 0.9rem;
    }
    
    .gallery-zoom {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    /* About section mobile */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-image {
        order: -1;
    }
    
    .about-experience {
        position: static;
        margin-top: 1rem;
        padding: 1rem;
        text-align: center;
    }
    
    .about-features {
        gap: 1rem;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .feature-item i {
        margin: 0 auto;
    }
    
    /* Process mobile */
    .process-timeline::before {
        left: 20px;
    }
    
    .timeline-item {
        flex-direction: column;
        gap: 1rem;
        margin-left: 2rem;
    }
    
    .timeline-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
        position: absolute;
        left: -2rem;
    }
    
    .timeline-content {
        padding: 1rem;
        margin-left: 1rem;
    }
    
    /* Testimonials mobile */
    .testimonials-slider {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .testimonial-author {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    /* Contact mobile */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-form-wrapper {
        order: 2;
        padding: 2rem 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .contact-info {
        order: 1;
        gap: 1rem;
    }
    
    .info-card {
        padding: 1rem;
        text-align: left;
        display: flex;
        align-items: center;
        gap: 1rem;
    }
    
    .info-card i {
        font-size: 1.5rem;
        margin: 0;
        flex-shrink: 0;
    }
    
    /* Footer mobile */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-links {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }
    
    .social-links {
        justify-content: center;
    }
    
    .newsletter-form {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .newsletter-form input,
    .newsletter-form button {
        border-radius: var(--border-radius);
    }
    
    /* WhatsApp button mobile */
    .whatsapp-float {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

/* Small tablets and large phones */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonials-slider {
        grid-template-columns: 1fr;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        padding: 2rem;
        gap: 0;
        transition: left 0.3s ease;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu li {
        margin-bottom: 1.5rem;
    }
    
    .nav-link {
        display: block;
        padding: 1rem;
        font-size: 1.125rem;
        text-align: center;
        border-bottom: 1px solid var(--border-light);
    }
}

/* Tablets */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .testimonials-slider {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-menu {
        display: flex;
    }
    
    .nav-toggle {
        display: none;
    }
}

/* Large tablets and small desktops */
@media (min-width: 1025px) and (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .testimonials-slider {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Large screens */
@media (min-width: 1201px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .testimonials-slider {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Extra large screens */
@media (min-width: 1400px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-content {
        max-width: 1400px;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
    
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
    
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 3rem;
    }
}

/* Height-based media queries for better mobile experience */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding-top: 60px;
    }
    
    .hero-content {
        padding: 1rem;
    }
    
    .hero-stats {
        display: none;
    }
    
    .nav-menu.active {
        height: calc(100vh - 60px);
        overflow-y: auto;
    }
}

/* Print styles */
@media print {
    .navbar,
    .whatsapp-float,
    .hero-particles,
    .floating-card {
        display: none;
    }
    
    .hero {
        padding-top: 0;
        min-height: auto;
        background: white;
        color: black;
    }
    
    .hero-title,
    .hero-description {
        color: black;
    }
    
    .btn {
        display: none;
    }
    
    section {
        padding: 2rem 0;
        page-break-inside: avoid;
    }
    
    .service-card,
    .testimonial-card,
    .info-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-card {
        animation: none;
    }
    
    .loader div {
        animation: none;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000080;
        --secondary-color: #008000;
        --text-dark: #000000;
        --text-gray: #333333;
        --border-color: #000000;
    }
    
    .btn-primary,
    .btn-secondary {
        border: 2px solid currentColor;
    }
    
    .service-card,
    .testimonial-card,
    .info-card {
        border: 2px solid var(--border-color);
    }
}
