/* Responsive CSS - Diseño adaptativo */

/* Tablet (768px y abajo) */
@media (max-width: 768px) {
    /* Navigation */
    .nav__logo {
        height: var(--logo-height-mobile);
    }

    .nav__menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--bg-primary);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: var(--space-3xl);
        transition: left var(--transition-normal);
        box-shadow: var(--shadow-lg);
    }

    .nav__menu.show {
        left: 0;
    }

    .nav__list {
        flex-direction: column;
        gap: var(--space-2xl);
        text-align: center;
    }

    .nav__link {
        font-size: var(--font-size-lg);
    }

    .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);
    }

    /* Hero */
    .hero {
        padding: calc(70px + var(--space-2xl)) 0 var(--space-2xl);
        min-height: auto;
    }

    .hero::before {
        opacity: 0.2;
    }

    .hero__container {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
        text-align: center;
    }

    .hero__title {
        font-size: var(--font-size-4xl);
    }

    .hero__buttons {
        justify-content: center;
    }

    .hero__tech-stack {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* Sections */
    .services,
    .projects {
        padding: var(--space-2xl) 0;
    }

    .section__title {
        font-size: var(--font-size-2xl);
    }

    /* Services Grid */
    .services__grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    /* Projects Grid */
    .projects__grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    /* Contact */
    .contact {
        padding: var(--space-2xl) 0;
    }

    .contact__content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    /* Footer */
    .footer__logo {
        height: var(--logo-height-mobile);
    }

    .footer__content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-lg);
    }

    .footer__links {
        justify-content: center;
    }
}

/* Mobile (480px y abajo) */
@media (max-width: 480px) {
    /* Container */
    .container {
        padding: 0 var(--space-md);
    }

    /* Typography */
    .hero__title {
        font-size: var(--font-size-3xl);
    }

    .section__title {
        font-size: var(--font-size-xl);
    }

    .hero__description,
    .section__subtitle {
        font-size: var(--font-size-base);
    }

    /* Buttons */
    .hero__buttons {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    /* Hero Tech Stack */
    .hero__tech-stack {
        flex-direction: column;
        align-items: center;
        gap: var(--space-md);
    }

    /* Hero watermark for mobile */
    .hero::before {
        opacity: 0.15;
    }

    /* Cards */
    .card {
        padding: var(--space-lg);
    }

    .card__title {
        font-size: var(--font-size-lg);
    }

    /* Project Cards */
    .project-card__image {
        height: 150px;
        font-size: var(--font-size-lg);
    }

    .project-card__content {
        padding: var(--space-lg);
    }

    /* Contact Form */
    .contact__form {
        padding: var(--space-lg);
    }

    /* Footer */
    .footer__links {
        flex-direction: column;
        gap: var(--space-md);
    }

    .footer {
        padding: var(--space-xl) 0 var(--space-md);
    }
}

/* Large Desktop (1200px y arriba) */
@media (min-width: 1200px) {
    .hero__title {
        font-size: var(--font-size-5xl);
    }

    .hero__tech-stack {
        max-width: none;
    }

    .services__grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .projects__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Utilities Responsive */
@media (max-width: 768px) {
    .text-center-mobile {
        text-align: center;
    }

    .hide-mobile {
        display: none;
    }

    .full-width-mobile {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .nav__toggle,
    .hero__buttons,
    .contact__form {
        display: none;
    }

    .header {
        position: relative;
        background: white;
        box-shadow: none;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
    }

    .hero,
    .services,
    .projects,
    .contact {
        padding: 20pt 0;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .tech-item {
        animation: none;
    }
}

/* High Contrast */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #000000;
        --text-secondary: #333333;
        --bg-primary: #ffffff;
        --bg-secondary: #f5f5f5;
        --primary-600: #0066cc;
        --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.3);
    }
} 