/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .tile-button:hover {
        box-shadow: 0 10px 20px rgba(243, 156, 18, 0.4);
    }
    
    
    .tile:hover {
        transform: translateY(0) scale(1) !important;
    }
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: url('szte-background.jpg') center center/cover no-repeat fixed;
    background-color: #2c3e50;
    min-height: 100vh;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 62, 80, 0.7);
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.hero {
    text-align: center;
    color: white;
    margin-bottom: 60px;
    padding: 40px 0;
    position: relative;
}

.language-switch {
    position: absolute;
    top: 20px;
    right: 20px;
}

.lang-button {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.lang-button:hover {
    background: linear-gradient(45deg, #f39c12, #e67e22);
    border-color: rgba(255, 255, 255, 0.5);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease-out;
    padding-top: 100px;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Csempe megjelenítési osztályok */
.tiles-container {
    display: grid;
    gap: 40px;
    width: 100%;
    transition: all 0.5s ease;
}

/* 3 csempe megjelenítése */
.tiles-container.show-3-tiles {
    grid-template-columns: repeat(3, 1fr);
    max-width: 1200px;
}

/* 2 csempe megjelenítése */
.tiles-container.show-2-tiles {
    grid-template-columns: repeat(2, 1fr);
    max-width: 800px;
}

.tiles-container.show-2-tiles .tile:nth-child(3) {
    display: none;
}

/* 1 csempe megjelenítése */
.tiles-container.show-1-tiles {
    grid-template-columns: 1fr;
    max-width: 450px;
}

.tiles-container.show-1-tiles .tile:nth-child(2),
.tiles-container.show-1-tiles .tile:nth-child(3) {
    display: none;
}

.tile {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    padding: 40px 35px 50px 35px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    min-height: 380px;
    min-width: 300px;
    display: block;
}

.tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s;
}

.tile:hover::before {
    left: 100%;
}

.tile:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.tile-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #2c3e50;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.2;
}

.tile-description {
    font-size: 1rem;
    color: #666;
    margin-bottom: 30px;
    line-height: 1.7;
	min-height: 5em;
}

a {
   color: #e67e22;
}

.tile-button {
    background: #e67e22;
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    overflow: hidden;
}

.tile-description-extra {
    font-size: 0.9rem;
    color: #666;
    text-align: center;
    line-height: 1.4;
    margin-bottom: 15px;
    padding-top: 35px;
}

.tile p:last-child {
    font-size: 0.9rem;
    margin: 0;
}

.tile p:last-child a {
    text-decoration: none;
    font-weight: 500;
}

.tile-button:hover {
    box-shadow: 0 10px 20px rgba(243, 156, 18, 0.4);
}

.tile-button:active {
    transform: none;
}

.footer {
    text-align: center;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 60px;
    padding: 20px 0;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* Responsive design */
@media (max-width: 1024px) {
    .tiles-container {
        grid-template-columns: repeat(2, 1fr);
        max-width: 900px;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .language-switch {
        top: 15px;
        right: 15px;
    }
    
    .lang-button {
        padding: 8px 16px;
        font-size: 0.8rem;
    }
    
    .tiles-container {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 100%;
    }
    
    .tile {
        padding: 30px 25px 120px 25px;
        min-height: 360px;
        min-width: 250px;
    }
    
    .container {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .tile-title {
        font-size: 1.4rem;
        line-height: 1.3;
    }
    
    .tile-button:hover {
        box-shadow: 0 10px 20px rgba(243, 156, 18, 0.4);
    }
}