/* ============================================= */
/* LANDSCAPE MODE ADAPTATIONS */
/* ============================================= */

/* Smartphones in landscape mode */
@media (max-height: 600px) and (orientation: landscape) {
    /* Reduce logo animation for better UX */
    .logo_container__logo {
        animation-duration: 1.5s;
    }
    
    h1 {
        animation-duration: 1.5s;
    }
    
    /* Disable floating animations to save vertical space */
    .about__grid .card {
        animation: none;
    }
    
    /* Compact header */
    .menu__item {
        font-size: max(1.5vw, 12px);
    }
    
    .menu__link, .menu__link_downloader {
        padding: 0.25rem 0.6rem;
    }
    
    header {
        padding: 0.25rem 0.5rem;
    }
}

/* Tablets in landscape mode */
@media (min-width: 768px) and (max-height: 800px) and (orientation: landscape) {
    /* Similar optimizations but less aggressive */
    .about__grid .card {
        animation-duration: 3s; /* Faster animation */
    }
}

/* ============================================= */
/* PORTRAIT MODE ADAPTATIONS (Original) */
/* ============================================= */

/* Mobile screens (768px and below) */
@media (max-width: 767.98px) {
	.logo_container__logo{
		width: 30vh;
		height: auto;
	}

	/* Mobile alternative: subtle continuous tilt animation */
	@keyframes subtle-float {
		0%, 100% { 
			transform: translateY(0) rotate(0deg); 
		}
		25% { 
			transform: translateY(-2px) rotate(0.5deg); 
		}
		50% { 
			transform: translateY(0) rotate(0deg); 
		}
		75% { 
			transform: translateY(-2px) rotate(-0.5deg); 
		}
	}

	/* Apply gentle animation to cards */
	.about__grid .card {
		animation: subtle-float 4s ease-in-out infinite;
	}

	/* Stagger animation for each card */
	.about__grid .card:nth-child(1) { animation-delay: 0s; }
	.about__grid .card:nth-child(2) { animation-delay: 0.3s; }
	.about__grid .card:nth-child(3) { animation-delay: 0.6s; }
	.about__grid .card:nth-child(4) { animation-delay: 0.9s; }
	.about__grid .card:nth-child(5) { animation-delay: 1.2s; }
	.about__grid .card:nth-child(6) { animation-delay: 1.5s; }
	.about__grid .card:nth-child(7) { animation-delay: 1.8s; }

	/* Touch tap effect */
	.about__grid .card:active {
		transform: scale(0.98);
		transition: transform 0.1s ease;
	}

	/* Mobile devices automatically get reduced blur via :root overrides */
	/* These rules are kept for browsers that don't support CSS variables */
	@supports not (backdrop-filter: blur(var(--blur-heavy))) {
		header {
			backdrop-filter: blur(20px);
			-webkit-backdrop-filter: blur(20px);
		}

		.card {
			backdrop-filter: blur(10px);
			-webkit-backdrop-filter: blur(10px);
		}

		.background_canvas {
			filter: blur(4px);
		}
	}

	/* Відключаємо анімації на мобільних для кращої продуктивності */
	@media (prefers-reduced-motion: reduce) {
		.logo_container__logo {
			animation: none;
			opacity: 1;
		}
		
		/* Відключаємо blur для canvas при reduced motion */
		.background_canvas {
			filter: none;
			opacity: 0.3;
		}
		
		h1 {
			animation: none;
			opacity: 1;
		}
	}

	/* Збільшуємо розмір кнопок у header для мобільних */
	.menu__item {
		font-size: max(2vw, 14px);
	}

	.menu__link, .menu__link_downloader {
		padding: 0.4rem 0.8rem;
	}

	header {
		padding: 0.4rem 0.6rem;
	}





    .about__grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 0.7rem;
        padding: max(1.5vw, 16px);
        min-height: auto;
        max-height: none;
    }
    
    .card {
        padding: 0.8rem;
        border-radius: max(1vw, 16px);
    }
    
    .card__main {
        grid-column: span 3;
        grid-row: auto;
        order: 1;
    }
    
    /* .card__main .card__icon {
        width: max(10vh, 60px);
        margin-bottom: max(1vh, 12px);
    } */
    
    /* .card__main h2 {
        font-size: max(2vw, 24px);
        margin-bottom: max(1vh, 12px);
    } */
    
    .card_main__description {
        font-size: max(1vw, 14px);
        line-height: 150%;
        letter-spacing: max(0.5px, 0.4px);
        text-align: center;
    }
    
    .card__location {
        grid-column: 1 / 2;
        grid-row: auto;
        order: 2;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: max(0.8vw, 10px);
        min-height: max(12vh, 100px);
		  font-style: normal;
			font-weight: 300;
			line-height: 24px; /* 75% */
			letter-spacing: 1.92px;
    }

	 .card__location_block_h{
		font-weight: 300;
	 }
    
    .card__location_block:last-child {
        display: none;
    }
    
    .card__location_block {
        gap: max(0.8vw, 10px);
        flex: 1;
        justify-content: center;
    }
    
    
    .card__location .card__icon {
        width: 20px;
        height: auto;
    }
    
    .card__games-created {
		gap: max(0.6vw, 8px);
        grid-column: 2 / 4;
        grid-row: auto;
        order: 2;
        text-align: center;
        /* min-height: max(12vh, 100px); */
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
		  font-style: normal;
			font-weight: 300;
			line-height: 200%;
			letter-spacing: 1.92px;
			color: #FFF;
    }
    
    .card__games-created .card__icon {
        width: max(3vw, 26px);
        height: auto;
    }
    
    .card__games_number {
        font-size: max(2.2vw, 18px);
			font-weight: 400;
        margin: max(0.5vh, 6px) 0;
    }
    
    
    /* Portfolio button - spans full width */
    .card__portfolio {
        order: 3;
        grid-column: span 3;
        text-align: center;
        justify-content: center;
        /* min-height: max(8vh, 60px); */
		gap: 5px;
    }
    
    .card__icon_portfolio {
        width: max(4vw, 32px);
        height: auto;
    }
    
    .card__portfolio h3 {
        font-size: max(1.1vw, 14px);
		font-style: normal;
		font-weight: 350;
		line-height: 160%;
    }
    
    .card__portfolio p {
        font-size: max(0.9vw, 13px);
        line-height: 140%;
        word-break: break-all;
    }
    
    .card__social {
        padding: max(1.2vw, 16px);
        min-height: max(8vh, 60px);
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .card__linkedin {
        grid-column: 1;
        order: 4;
    }
    
    .card__meta-store,
    .card__tumblr {
        grid-column: 2;
        order: 4;
    }
    
    .card__itchio {
        grid-column: 3;
        order: 4;
    }
    
    .card__social .card__icon {
        width: max(2vw, 22px);
        height: auto;
    }
    
    .card__linkedin h3,
    .card__linkedin p,
    .card__meta-store h3,
    .card__meta-store p,
    .card__tumblr h3,
    .card__tumblr p,
    .card__itchio h3,
    .card__itchio p,
	 .card__portfolio p {
        display: none;
    }
    
    .card__linkedin {
        order: 4;
    }
    
    .card__meta-store,
    .card__tumblr {
        order: 4;
    }
    
    .card__itchio {
        order: 4;
    }
}

/* Дуже малі екрани (480px і менше) */
@media (max-width: 480px) {
    .about__grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 0.5rem;
        padding: max(1vw, 12px);
    }
    
    .card__main {
        grid-column: span 3;
        order: 1;
    }
    
    .card__location {
        grid-column: 1;
        order: 2;
    }
    
    .card__games-created {
        grid-column: 2 / 4;
        order: 2;
    }
    
    .card__portfolio {
        grid-column: span 3;
        order: 3;
    }
    
    .card__linkedin {
        grid-column: 1;
        order: 4;
    }
    
    .card__meta-store,
    .card__tumblr {
        grid-column: 2;
        order: 4;
    }
    
    .card__itchio {
        grid-column: 3;
        order: 4;
    }
}

/* ============================================= */
/* LANDSCAPE MODE - Mobile Specific */
/* ============================================= */

/* Mobile portrait devices rotated to landscape */
@media (max-width: 767.98px) and (orientation: landscape) {
    /* Override portrait settings for landscape */
    .logo_container__logo {
        width: auto;
        height: 50vh;
        max-height: 250px;
    }
    
    /* Compact grid for landscape phones */
    .about__grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.4rem;
        padding: max(1vw, 12px);
    }
    
    .card {
        padding: 0.5rem;
    }
    
    .card__main {
        grid-column: span 2;
        grid-row: span 1;
        order: 1;
    }
    
    .card__location {
        grid-column: 1;
        grid-row: auto;
        order: 2;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .card__games-created {
        grid-column: 2;
        grid-row: auto;
        order: 2;
        gap: 0.3rem;
    }
    
    .card__portfolio {
        grid-column: span 2;
        order: 3;
        gap: 0.3rem;
    }
    
    .card__linkedin {
        grid-column: 1;
        order: 4;
    }
    
    .card__meta-store,
    .card__tumblr {
        grid-column: 2;
        order: 4;
    }
    
    .card__itchio {
        grid-column: 3;
        order: 4;
    }
    
    /* Game sections in landscape mobile */
    .game__container {
        width: 85vw;
        height: auto;
        max-height: 80vh;
    }
    
    .game__header {
        font-size: max(5vw, 24px);
    }
    
    .game__sub_header {
        font-size: max(3.5vw, 16px);
    }
    
    .game__description {
        font-size: max(3vw, 13px);
    }
}

/* Small mobile screens (480px and below) */
/* @media (max-width: 480px) {
    .about__grid {
        gap: max(1.2vw, 12px);
        padding: max(1vw, 12px);
    }
    
    .card {
        padding: max(1.2vw, 16px);
    }
    
    .card__main .card__icon {
        width: max(8vh, 48px);
    }
    
    .card__main h2 {
        font-size: max(1.8vw, 20px);
    }
    
    .card_main p {
        font-size: max(0.7vw, 10px);
        line-height: 145%;
    }
    
    .card__location {
        gap: max(1.5vw, 16px);
        min-height: max(10vh, 80px);
    }
    
    .card__location_block_h {
        font-size: max(1.4vw, 16px);
    }
    
    .card__location_block_p {
        font-size: max(1vw, 14px);
    }
    
    .card__location .card__icon {
        width: max(4vh, 32px);
    }
    
    .card__social .card__icon {
        width: max(2.5vw, 28px);
    }
    
    .card__social h3,
    .card__social p {
        display: none;
    }
    
    .card__games-created {
        min-height: max(10vh, 80px);
    }
    
    .card__games-created .card__icon {
        width: max(2.5vw, 20px);
    }
    
    .card__games_number {
        font-size: max(2vw, 24px);
    }
    
    .card__games-created p {
        font-size: max(1.2vw, 16px);
    }
    
    .card__portfolio {
        min-height: max(6vh, 50px);
    }
    
    .card__icon_portfolio {
        width: max(3.5vw, 28px);
    }
    
    .card__portfolio h3 {
        font-size: max(1vw, 14px);
    }
    
    .card__portfolio p {
        font-size: max(0.8vw, 11px);
    }
} */
