/* ============================================
   MSTF Graphics Portfolio - Responsive Styles
   ============================================ */

/* Large Screens (max-width: 1200px) */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .about-content {
        gap: 60px;
    }
}

/* Medium Screens - Tablets (max-width: 992px) */
@media (max-width: 992px) {
    :root {
        --header-height: 70px;
    }

    .container {
        max-width: 720px;
    }

    section {
        padding: 80px 0;
    }

    .section-title {
        font-size: 2.2rem;
    }

    /* Header */
    .nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background: var(--secondary);
        display: flex;
        align-items: center;
        justify-content: center;
        transform: translateX(100%);
        transition: var(--transition);
    }

    .nav.active {
        transform: translateX(0);
    }

    .nav-list {
        flex-direction: column;
        gap: 30px;
    }

    .nav-link {
        font-size: 1.3rem;
    }

    .hamburger {
        display: flex;
    }

    .lang-selector {
        gap: 3px;
    }

    .lang-btn {
        padding: 5px 8px;
        font-size: 0.7rem;
    }

    /* Hero */
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }

    /* Services */
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    /* Portfolio */
    .portfolio-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .portfolio-filter {
        gap: 10px;
    }

    .filter-btn {
        padding: 8px 20px;
        font-size: 0.9rem;
    }

    /* About */
    .about-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .about-image {
        order: 2;
    }

    .about-text {
        order: 1;
    }

    .about-img-wrapper {
        max-width: 450px;
        margin: 0 auto;
    }

    .about-badge {
        bottom: -20px;
        right: -10px;
        padding: 20px;
    }

    .badge-number {
        font-size: 2rem;
    }

    .about-text .section-title,
    .about-text .section-title::after {
        text-align: center;
        left: 50%;
        transform: translateX(-50%);
    }

    .about-name,
    .about-role {
        text-align: center;
    }

    .about-stats {
        justify-content: center;
    }

    .about-store {
        justify-content: center;
    }

    .about-text {
        text-align: center;
    }

    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .contact-info {
        align-items: center;
    }

    .contact-item {
        justify-content: flex-start;
        width: 100%;
        max-width: 350px;
    }
}

/* Small Screens - Landscape Phones (max-width: 768px) */
@media (max-width: 768px) {
    .container {
        max-width: 540px;
        padding: 0 15px;
    }

    section {
        padding: 60px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .section-header {
        margin-bottom: 40px;
    }

    /* Hero */
    .hero {
        min-height: 100vh;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 30px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .btn {
        width: 100%;
        max-width: 280px;
    }

    .scroll-indicator {
        bottom: 25px;
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .service-card {
        padding: 30px 25px;
    }

    .service-icon {
        width: 70px;
        height: 70px;
    }

    .service-icon i {
        font-size: 1.8rem;
    }

    /* Portfolio */
    .portfolio-filter {
        gap: 8px;
        margin-bottom: 35px;
    }

    .filter-btn {
        padding: 7px 15px;
        font-size: 0.85rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .portfolio-overlay h4 {
        font-size: 1.1rem;
    }

    .portfolio-overlay p {
        font-size: 0.85rem;
    }

    /* About */
    .about-stats {
        gap: 25px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stat-plus {
        font-size: 1.2rem;
    }

    .about-store {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    /* Contact */
    .contact-cta {
        padding: 30px 20px;
    }

    .cta-box h3 {
        font-size: 1.3rem;
    }

    .btn-whatsapp {
        padding: 14px 30px;
        font-size: 1rem;
    }

    .social-links {
        gap: 12px;
    }

    .social-link {
        width: 45px;
        height: 45px;
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    /* Lightbox */
    .lightbox-close {
        top: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }

    /* Back to Top */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Extra Small Screens - Portrait Phones (max-width: 480px) */
@media (max-width: 480px) {
    :root {
        --header-height: 65px;
    }

    .container {
        padding: 0 15px;
    }

    section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .section-subtitle {
        font-size: 0.95rem;
    }

    /* Header */
    .logo-text {
        font-size: 1.5rem;
    }

    .logo-sub {
        font-size: 0.65rem;
    }

    .lang-selector {
        display: none;
    }

    .nav .lang-selector-mobile {
        display: flex;
        margin-top: 30px;
    }

    /* Hero */
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
    }

    .btn {
        padding: 12px 25px;
        font-size: 0.95rem;
    }

    /* Services */
    .service-card {
        padding: 25px 20px;
    }

    .service-title {
        font-size: 1.1rem;
    }

    .service-desc {
        font-size: 0.9rem;
    }

    /* Portfolio */
    .filter-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .portfolio-zoom {
        width: 40px;
        height: 40px;
    }

    /* About */
    .about-img-wrapper {
        max-width: 100%;
    }

    .about-badge {
        position: relative;
        bottom: auto;
        right: auto;
        margin-top: 20px;
        display: inline-block;
    }

    .about-image {
        text-align: center;
    }

    .about-name {
        font-size: 1.5rem;
    }

    .about-role {
        font-size: 1rem;
    }

    .about-stats {
        flex-wrap: wrap;
        gap: 20px;
    }

    .stat-item {
        flex: 1;
        min-width: 80px;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    /* Contact */
    .contact-item {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
    }

    .contact-icon {
        width: 50px;
        height: 50px;
    }

    .contact-icon i {
        font-size: 1.2rem;
    }

    .contact-text h4 {
        font-size: 0.95rem;
    }

    .contact-text a,
    .contact-text p {
        font-size: 0.9rem;
    }

    .cta-box h3 {
        font-size: 1.2rem;
    }

    .cta-box p {
        font-size: 0.9rem;
    }

    .btn-whatsapp {
        padding: 12px 25px;
        font-size: 0.95rem;
    }

    /* Footer */
    .footer {
        padding: 25px 0;
    }

    .footer-text {
        font-size: 0.85rem;
    }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 80px 0 40px;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 20px;
    }

    .hero-buttons {
        flex-direction: row;
        gap: 15px;
    }

    .btn {
        max-width: none;
        width: auto;
    }

    .scroll-indicator {
        display: none;
    }
}

/* Hover effects only for devices with hover capability */
@media (hover: hover) {
    .nav-link:hover::after {
        width: 100%;
    }

    .service-card:hover {
        transform: translateY(-10px);
    }

    .portfolio-item:hover .portfolio-img img {
        transform: scale(1.1);
    }

    .portfolio-item:hover .portfolio-overlay {
        opacity: 1;
    }
}

/* Touch devices - always show overlay */
@media (hover: none) {
    .portfolio-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(26, 26, 26, 0.9) 0%, transparent 60%);
    }

    .portfolio-zoom {
        opacity: 1;
        transform: translateY(0);
    }
}

/* High DPI screens */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-text,
    .section-title {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Print styles */
@media print {
    .header,
    .scroll-indicator,
    .back-to-top,
    .lightbox,
    .hamburger {
        display: none !important;
    }

    section {
        padding: 30px 0;
        page-break-inside: avoid;
    }

    .hero {
        min-height: auto;
        padding: 50px 0;
    }

    .hero-bg,
    .hero-overlay {
        background: var(--background-alt) !important;
    }

    .hero-title,
    .hero-subtitle {
        color: var(--text-dark) !important;
    }

    .portfolio-grid,
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    a {
        text-decoration: underline;
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}

/* Dark mode preference (optional enhancement) */
@media (prefers-color-scheme: dark) {
    /* Users can uncomment this if they want automatic dark mode
    :root {
        --background: #1a1a1a;
        --background-alt: #252525;
        --text-dark: #ffffff;
        --text-muted: #aaaaaa;
        --border-color: #333333;
    }
    */
}
