/**
 * Responsive Styles for Proem Abogados y Asesores
 * Mobile-first approach with optimized breakpoints
 */

/* Tablet Landscape and Desktop (1024px and up) */
@media (min-width: 1024px) {
    .container {
        max-width: 1200px;
    }
    
    .hero-section {
        min-height: 100vh;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet Portrait (768px to 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    .container {
        max-width: 750px;
    }
    
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-content {
        gap: 3rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile Landscape and Tablet Portrait (768px and down) */
@media (max-width: 767px) {
    /* Header Mobile */
    .site-header {
        padding: 0.5rem 0;
    }
    
    .header-inner {
        padding: 0.5rem 0;
    }
    
    .site-logo {
        font-size: 1.25rem;
    }
    
    .logo-icon {
        width: 35px;
        height: 35px;
    }
    
    /* Mobile Navigation */
    .menu-toggle {
        display: block;
        z-index: 1001;
    }
    
    .main-navigation {
        position: fixed;
        top: 60px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 60px);
        background: #ffffff; /* var(--color-white) */
        transition: left 0.3s ease;
        overflow-y: auto;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .main-navigation.active {
        left: 0;
    }
    
    .main-navigation ul {
        flex-direction: column;
        padding: 2rem;
        gap: 0;
    }
    
    .main-navigation li {
        width: 100%;
        border-bottom: 1px solid #f0f0f0;
    }
    
    .main-navigation a {
        display: block;
        padding: 1rem 0;
    }
    
    .cta-button {
        margin-top: 1rem;
    }
    
    /* Hero Mobile */
    .hero-section {
        min-height: 80vh;
        padding: 2rem 0;
        margin-top: 60px;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn {
        width: 100%;
        text-align: center;
    }
    
    /* Services Mobile */
    .services-section {
        padding: 60px 0;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    /* About Mobile */
    .about-section {
        padding: 60px 0;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-image {
        order: -1;
    }
    
    .experience-badge {
        bottom: 10px;
        right: 10px;
        width: 100px;
        height: 100px;
    }
    
    /* Contact Mobile */
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        padding: 2rem;
    }
    
    .contact-form-wrapper {
        padding: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Footer Mobile */
    .site-footer {
        padding: 40px 0 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Mobile Portrait (480px and down) */
@media (max-width: 480px) {
    /* Typography adjustments */
    body {
        font-size: 14px;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* Header adjustments */
    .site-logo {
        font-size: 1.1rem;
    }
    
    .logo-icon {
        width: 30px;
        height: 30px;
        margin-right: 8px;
    }
    
    /* Hero adjustments */
    .hero-section {
        min-height: 70vh;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-description {
        font-size: 0.95rem;
    }
    
    /* Service cards */
    .service-card {
        padding: 1.25rem;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
    }
    
    /* About section */
    .experience-badge {
        width: 80px;
        height: 80px;
        padding: 1rem;
    }
    
    .experience-number {
        font-size: 1.5rem;
    }
    
    /* Forms */
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Small Mobile (375px and down) */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
    
    .service-title {
        font-size: 1.2rem;
    }
    
    .footer-column h3 {
        font-size: 1.1rem;
    }
}

/* Landscape orientation adjustments */
@media (orientation: landscape) and (max-height: 600px) {
    .hero-section {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .site-header {
        position: relative;
    }
    
    .hero-content {
        padding: 1rem 0;
    }
}

/* High resolution displays */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    /* Use higher quality images for retina displays */
    .logo-icon,
    .service-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .menu-toggle,
    .hero-buttons,
    .social-links {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    h1, h2, h3 {
        page-break-after: avoid;
    }
    
    .service-card {
        page-break-inside: avoid;
    }
}

/* Accessibility - 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;
    }
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    /* Add dark mode styles here if needed */
}