/* Responsive Design */

/* Large Desktops */
@media screen and (min-width: 1400px) {
    .container,
    .nav-container,
    .hero-container {
        max-width: 1400px;
    }
    
    .hero-text h1 {
        font-size: 4.5rem;
    }
    
    .section-header h2 {
        font-size: 3.5rem;
    }
}

/* Standard Desktop */
@media screen and (max-width: 1199px) {
    .hero-content {
        gap: 60px;
    }
    
    .hero-stats {
        gap: 40px;
    }
    
    .contact-content {
        gap: 60px;
    }
}

/* Tablets */
@media screen and (max-width: 991px) {
    :root {
        --section-padding: 80px 0;
    }
    
    .container,
    .nav-container,
    .hero-container {
        padding: 0 30px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }
    
    .hero-text {
        order: 1;
        position: relative;
        z-index: 10;
    }
    
    .hero-image {
        order: 2;
        position: relative;
        z-index: 5;
    }
    
    .hero-text h1 {
        font-size: 3.5rem;
    }
    
    .hero-stats {
        justify-content: center;
        gap: 50px;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .albert-photo {
        width: 350px;
        height: 450px;
    }
    
    .image-placeholder {
        width: 350px;
        height: 450px;
    }
    
    .section-header h2 {
        font-size: 2.5rem;
    }
    
    .qualities {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 30px;
    }
    
    .partnership-content {
        grid-template-columns: 1fr;
        gap: 60px;
    }
    
    .partnership-text h3 {
        font-size: 2.2rem;
        text-align: center;
    }
    
    .montcastell-logo {
        width: 250px;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
    }
    
    .tech-benefits {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 30px;
    }
    
    .location-highlights {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
    }
    
    .testimonials-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 30px;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .footer-logo-img {
        height: 40px;
        padding: 6px;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 50px;
        gap: 30px;
        transition: var(--transition);
        box-shadow: var(--shadow-medium);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        font-size: 1.2rem;
        padding: 15px 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .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);
    }
}

/* Mobile Landscape & Small Tablets */
@media screen and (max-width: 767px) {
    :root {
        --section-padding: 60px 0;
    }
    
    .container,
    .nav-container,
    .hero-container {
        padding: 0 20px;
    }
    
    .nav-container {
        height: 70px;
    }
    
    .logo-img {
        height: 50px;
    }
    
    .hero {
        padding-top: 70px;
        min-height: 90vh;
    }
    
    .hero-text {
        position: relative;
        z-index: 20;
        background: rgba(255, 255, 255, 0.95);
        padding: 20px;
        border-radius: var(--border-radius);
        margin-bottom: 20px;
    }
    
    .hero-image {
        position: relative;
        z-index: 10;
        transform: none !important;
    }
    
    .hero-text h1 {
        font-size: 3rem;
        margin-bottom: 15px;
    }
    
    .hero-subtitle {
        font-size: 1.3rem;
        margin-bottom: 25px;
    }
    
    .hero-description {
        font-size: 1.1rem;
        margin-bottom: 30px;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 30px;
        align-items: center;
        margin-bottom: 40px;
    }
    
    .stat {
        display: flex;
        align-items: center;
        gap: 20px;
        text-align: left;
    }
    
    .stat h3 {
        font-size: 2.5rem;
        margin-bottom: 0;
        min-width: 80px;
    }
    
    .stat p {
        margin: 0;
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 20px;
        align-items: center;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        max-width: 280px;
        text-align: center;
        padding: 18px 24px;
    }
    
    .albert-photo {
        width: 300px;
        height: 380px;
    }
    
    .image-placeholder {
        width: 300px;
        height: 380px;
    }
    
    .section-header {
        margin-bottom: 50px;
    }
    
    .section-header h2 {
        font-size: 2.2rem;
    }
    
    .section-header p {
        font-size: 1.1rem;
    }
    
    .about-text h3 {
        font-size: 2rem;
        margin-bottom: 25px;
    }
    
    .about-text p {
        font-size: 1.1rem;
        margin-bottom: 25px;
    }
    
    .qualities {
        grid-template-columns: 1fr;
        gap: 25px;
        margin-top: 40px;
    }
    
    .quality {
        padding: 30px 20px;
    }
    
    .quality i {
        font-size: 2.5rem;
    }
    
    .quality h4 {
        font-size: 1.3rem;
    }
    
    .partnership-content {
        gap: 40px;
    }
    
    .partnership-text h3 {
        font-size: 2rem;
    }
    
    .partnership-text p {
        font-size: 1.1rem;
    }
    
    .benefit {
        padding: 20px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
        transform: none !important;
    }
    
    .benefit:hover {
        transform: translateY(-5px) !important;
    }
    
    .montcastell-logo {
        width: 220px;
    }
    
    .logo-container {
        padding: 30px 20px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .service-card {
        padding: 40px 25px;
    }
    
    .service-card h3 {
        font-size: 1.6rem;
    }
    
    .advantage-text h3 {
        font-size: 2rem;
        margin-bottom: 25px;
    }
    
    .advantage-text p {
        font-size: 1.1rem;
        margin-bottom: 40px;
    }
    
    .tech-benefits {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .benefit {
        padding: 25px 20px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .benefit i {
        font-size: 2.5rem;
        margin-top: 0;
    }
    
    .location-text h3 {
        font-size: 2rem;
        margin-bottom: 25px;
    }
    
    .location-text p {
        font-size: 1.1rem;
        margin-bottom: 40px;
    }
    
    .location-highlights {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .highlight {
        padding: 25px 20px;
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .highlight i {
        font-size: 2.5rem;
        margin-top: 0;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .testimonial-card {
        padding: 30px 25px;
    }
    
    .contact-info h3,
    .contact-form h3 {
        font-size: 1.8rem;
        margin-bottom: 30px;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        margin-bottom: 35px;
    }
    
    .contact-item i {
        font-size: 2rem;
        margin-top: 0;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-logo-img {
        height: 35px;
        padding: 5px;
    }
    
    .footer-section h3 {
        font-size: 1.6rem;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Mobile Portrait */
@media screen and (max-width: 479px) {
    :root {
        --section-padding: 50px 0;
    }
    
    .container,
    .nav-container,
    .hero-container {
        padding: 0 15px;
    }
    
    .nav-container {
        height: 65px;
    }
    
    .logo-img {
        height: 45px;
    }
    
    .hero {
        padding-top: 65px;
    }
    
    .hero-text {
        background: rgba(255, 255, 255, 0.98);
        padding: 15px;
        border-radius: var(--border-radius);
        margin-bottom: 20px;
        position: relative;
        z-index: 25;
    }
    
    .hero-image {
        position: relative;
        z-index: 5;
        transform: none !important;
        margin-top: 20px;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .stat h3 {
        font-size: 2rem;
        min-width: 60px;
    }
    
    .stat p {
        font-size: 0.9rem;
    }
    
    .albert-photo {
        width: 280px;
        height: 350px;
    }
    
    .image-placeholder {
        width: 280px;
        height: 350px;
    }
    
    .image-placeholder i {
        font-size: 3rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .about-text h3 {
        font-size: 1.8rem;
    }
    
    .about-text p {
        font-size: 1rem;
    }
    
    .quality {
        padding: 25px 15px;
    }
    
    .quality i {
        font-size: 2rem;
    }
    
    .quality h4 {
        font-size: 1.2rem;
    }
    
    .service-card {
        padding: 30px 20px;
    }
    
    .service-icon {
        width: 70px;
        height: 70px;
    }
    
    .service-icon i {
        font-size: 1.8rem;
    }
    
    .service-card h3 {
        font-size: 1.5rem;
    }
    
    .location-text h3 {
        font-size: 1.8rem;
    }
    
    .highlight {
        padding: 20px 15px;
    }
    
    .highlight i {
        font-size: 2rem;
    }
    
    .highlight h4 {
        font-size: 1.2rem;
    }
    
    .testimonial-card {
        padding: 25px 20px;
    }
    
    .testimonial-card p {
        font-size: 1rem;
    }
    
    .contact-info h3,
    .contact-form h3 {
        font-size: 1.6rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 14px 16px;
        font-size: 16px; /* Previene zoom en iOS */
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 16px 20px;
        font-size: 15px;
    }
    
    .footer {
        padding: 60px 0 20px;
    }
    
    .footer-content {
        gap: 30px;
        margin-bottom: 30px;
    }
    
    .footer-section h3 {
        font-size: 1.4rem;
    }
    
    .footer-section h4 {
        font-size: 1.1rem;
    }
    
    .social-links a {
        width: 40px;
        height: 40px;
    }
}

/* Extra Small Devices */
@media screen and (max-width: 359px) {
    .hero-text h1 {
        font-size: 2.2rem;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .stat {
        gap: 15px;
    }
    
    .stat h3 {
        font-size: 1.8rem;
    }
    
    .albert-photo {
        width: 260px;
        height: 320px;
    }
    
    .image-placeholder {
        width: 260px;
        height: 320px;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .btn-primary,
    .btn-secondary {
        max-width: 240px;
        padding: 14px 18px;
    }
}

/* Landscape orientation adjustments */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding-top: 60px;
    }
    
    .hero-content {
        gap: 40px;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
    
    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }
    
    .hero-stats {
        flex-direction: row;
        gap: 30px;
        margin-bottom: 25px;
    }
    
    .stat {
        flex-direction: column;
        text-align: center;
    }
    
    .stat h3 {
        font-size: 1.8rem;
        min-width: auto;
    }
    
    .hero-buttons {
        flex-direction: row;
        gap: 20px;
    }
    
    .btn-primary,
    .btn-secondary {
        width: auto;
        padding: 12px 24px;
    }
    
    .albert-photo {
        width: 250px;
        height: 300px;
    }
    
    .image-placeholder {
        width: 250px;
        height: 300px;
    }
    
    .hero-scroll {
        display: none;
    }
}

/* Print styles */
@media print {
    .navbar,
    .hero-scroll,
    .nav-toggle,
    .btn-primary,
    .btn-secondary,
    .contact-form {
        display: none !important;
    }
    
    .hero {
        padding-top: 0;
        min-height: auto;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .section-header h2 {
        font-size: 18pt;
        color: #000;
    }
    
    .hero-text h1 {
        font-size: 24pt;
        color: #000;
    }
    
    a {
        color: #000;
        text-decoration: underline;
    }
    
    .service-card,
    .testimonial-card,
    .quality,
    .highlight {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000080;
        --secondary-color: #000066;
        --accent-color: #8B4513;
        --text-dark: #000000;
        --text-light: #333333;
        --border-light: #666666;
    }
    
    .btn-primary,
    .btn-secondary {
        border: 2px solid currentColor;
    }
    
    .service-card,
    .testimonial-card,
    .quality,
    .highlight {
        border: 2px solid var(--border-light);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .scroll-indicator::before {
        animation: none;
    }
    
    .hero-scroll {
        display: none;
    }
}

/* WhatsApp Button Responsive Styles */
@media screen and (max-width: 767px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-btn {
        width: 55px;
        height: 55px;
        font-size: 1.6rem;
    }
    
    .whatsapp-tooltip {
        font-size: 0.8rem;
        padding: 8px 12px;
        right: 65px;
    }
    
    .whatsapp-btn:hover .whatsapp-tooltip {
        right: 70px;
    }
}

@media screen and (max-width: 479px) {
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-btn {
        width: 50px;
        height: 50px;
        font-size: 1.4rem;
    }
    
    .whatsapp-tooltip {
        font-size: 0.75rem;
        padding: 6px 10px;
        right: 60px;
    }
    
    .whatsapp-btn:hover .whatsapp-tooltip {
        right: 65px;
    }
}