:root {
	--primary-color: #2c5aa0;
	--secondary-color: #3498db;
	--text-color: #333;
	--light-bg: #f8f9fa;
	--spacing: 1.5rem;
}

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

body {
	font-family: 'Times New Roman', serif;
	line-height: 1.4;
	color: var(--text-color);
	font-size: 14px;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* Header & Navigation */
header {
	background-color: white;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
	position: fixed;
	width: 100%;
	top: 0;
	z-index: 1000;
	transition: background-color 0.3s, box-shadow 0.3s;
}

header.scrolled {
	background-color: rgba(255, 255, 255, 0.95);
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav {
	padding: 1rem 0;
}

nav .container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	position: relative;
}

.logo {
	font-size: 1.5rem;
	color: var(--primary-color);
	white-space: nowrap;
	font-weight: 600;
	/* No overflow/ellipsis - we hide completely instead */
}

nav ul {
	display: flex;
	list-style: none;
	gap: 2rem;
	flex-shrink: 0; /* Menu items don't shrink */
}

nav a {
	text-decoration: none;
	color: var(--primary-color);
	font-weight: 600;
	transition: color 0.3s;
}

nav a:hover {
	color: var(--secondary-color);
}

/* Hero Section */
.hero {
	position: relative;
	overflow: hidden;
	background: linear-gradient(to bottom right, var(--light-bg), #e9ecef);
	padding: calc(var(--spacing) * 5) 0;
	margin-top: 60px;
	text-align: center;
}

.hero-image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 0;
}

.hero-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: brightness(0.7);
}

.hero .container {
	position: relative;
	z-index: 1;
	color: white;
	text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero h2 {
	font-size: 2.5rem;
	margin-bottom: 1rem;
}

.hero p {
	font-size: 1.2rem;
	max-width: 600px;
	margin: 0 auto;
}

p {
	text-align: justify;
	hyphens: manual;
	-webkit-hyphens: manual;
	-ms-hyphens: auto;
	word-wrap: break-word;
	overflow-wrap: break-word;
	hyphenate-limit-chars: 16 3 2;
	hyphenate-limit-lines: 2;
	-webkit-hyphenate-limit-chars: 16 3 2;
	-webkit-hyphenate-limit-lines: 2;
}

.hero p {
	text-align: center;
}

/* Sections */
.section {
	padding: var(--spacing) 0;
	margin: 1.5rem 0;
}

.section-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 3rem;
	align-items: center;
	margin: 2rem 0;
}

.section-grid.reverse {
	grid-template-columns: 1fr 1fr;
	direction: rtl;
}

.section-grid.reverse > * {
	direction: ltr;
}

.section-image {
	overflow: hidden;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.section-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

/* Profile image floating */
.profile-image-float {
	float: right;
	width: 200px;
	height: auto;
	margin-left: 20px;
	margin-bottom: 10px;
	object-fit: cover;
}

.section-image:hover img {
	transform: scale(1.05);
}

.section h2 {
	color: var(--primary-color);
	margin-bottom: 1rem;
	font-size: 1.4rem;
}

.section ul {
	margin: 1rem 0;
	list-style: none;
}

.section ul li {
	margin: 0.5rem 0;
	padding-left: 1.5rem;
	position: relative;
	font-size: 14px;
}

.section ul li:before {
	content: "•";
	color: var(--secondary-color);
	position: absolute;
	left: 0;
	font-size: 1.2em;
}

/* Contact Section */
.contact-info {
	text-align: center;
	background-color: var(--light-bg);
	padding: 2rem;
	border-radius: 8px;
	margin: 2rem auto;
	max-width: 600px;
}

.button {
	display: block;
	width: fit-content;
	margin: 1rem auto 0 auto; /* Center the button */
	padding: 0.8rem 1.5rem;
	background-color: var(--secondary-color);
	color: white;
	text-decoration: none;
	border-radius: 5px;
	transition: all 0.3s;
	font-weight: 600;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
	text-align: center;
}

.button:hover {
	background-color: #2980b9;
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Form styling */
.jelentkezes-form {
	max-width: 500px;
	margin: 2rem auto;
	padding: 2rem;
	background-color: var(--light-bg);
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
	margin-bottom: 1.5rem;
}

.form-group label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
	color: var(--primary-color);
}

.form-group input,
.form-group textarea {
	width: 100%;
	padding: 0.8rem;
	border: 2px solid #ddd;
	border-radius: 5px;
	font-size: 1rem;
	transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
	outline: none;
	border-color: var(--secondary-color);
}

.form-group textarea {
	resize: vertical;
	min-height: 100px;
}

/* Additional section styling */
.section p {
	text-align: justify;
	margin-bottom: 0.8rem;
	font-size: 14px;
}

.section h3 {
	color: #444;
	font-size: 1.1rem;
	margin-top: 1.2rem;
	margin-bottom: 0.6rem;
}

/* Footer */
footer {
	background-color: var(--primary-color);
	color: white;
	padding: var(--spacing) 0;
	text-align: center;
}

footer a {
	color: white;
	text-decoration: underline;
}

@media (max-width: 480px) {
	footer p {
		text-align: center;
	}
}

/* Responsive Design */

/* Responsive header - hide title when it would get truncated */
nav .container {
	gap: 2rem; /* Minimum space between title and menu */
}

/* Hide title when it would need ellipsis - better to show nothing than truncated text */
@media (max-width: 850px) {
	.logo {
		display: none;
	}
	
	nav .container {
		justify-content: center;
	}
	
	/* Consistent smaller margin when title is hidden */
	.hero {
		margin-top: 30px; /* Consistent space when no title */
	}
}

/* iPhone 12 and similar (390px-414px) */
@media (max-width: 414px) {
	/* Typography adjustments for small screens */
	body {
		font-size: 16px; /* Larger base size for mobile */
	}
	
	.section p {
		font-size: 16px; /* Larger text for readability */
	}
	
	.section ul li {
		font-size: 16px;
		margin: 0.6rem 0;
	}

	/* Header adjustments */
	nav {
		padding: 0.5rem 0;
	}
	
	/* Title already hidden by 600px media query above */
	nav .container {
		flex-direction: row; /* Keep horizontal */
		text-align: center;
		padding: 0 15px;
		justify-content: center; /* Menu centered */
	}

	nav ul {
		margin-top: 0;
		flex-direction: row;
		gap: 1rem;
		flex-wrap: wrap;
		justify-content: center;
	}

	/* Hero section fixes - keep inherited margin from 850px rule */
	.hero {
		/* margin-top already set by 850px rule to 30px - keep it consistent */
		padding: calc(var(--spacing) * 2) 0;
		text-align: center;
	}

	.hero h2 {
		font-size: 1.6rem; /* Smaller but readable */
		line-height: 1.2;
		margin-bottom: 0.8rem;
	}

	.hero p {
		font-size: 1rem;
	}

	/* Profile image - no float on mobile */
	.profile-image-float {
		float: none;
		display: block;
		margin: 0 auto 1rem auto;
		width: 150px;
	}

	/* Container padding for mobile */
	.container {
		padding: 0 15px;
	}

	/* Section spacing */
	.section {
		padding: 1rem 0;
		margin: 1rem 0;
	}

	.section h2 {
		font-size: 1.3rem;
		text-align: center;
		margin-bottom: 1rem;
	}

	.section h3 {
		font-size: 1.1rem;
		margin-top: 1.5rem;
		margin-bottom: 0.8rem;
	}

	/* Form improvements */
	.jelentkezes-form {
		margin: 1.5rem auto;
		padding: 1.5rem;
	}

	.form-group input,
	.form-group textarea {
		padding: 1rem;
		font-size: 16px; /* Prevents zoom on iOS */
	}

	.button {
		padding: 1rem 1.5rem;
		font-size: 16px;
		width: 100%;
	}

	/* Lists better spacing */
	.section ul {
		padding-left: 0;
		margin: 1rem 0;
	}

	.section ul li {
		padding-left: 1.2rem;
	}
}

/* Tablet and larger mobile (415px-768px) */
@media (min-width: 415px) and (max-width: 768px) {
	/* Header already handled by 850px rule above - title hidden, menu centered */
	
	.hero h2 {
		font-size: 1.8rem; /* Medium size for tablets */
	}

	.profile-image-float {
		width: 180px;
	}
}

/* General mobile styles (all mobile devices) */
@media (max-width: 768px) {
	.section-grid {
		grid-template-columns: 1fr;
		gap: 2rem;
	}

	.section-grid.reverse {
		grid-template-columns: 1fr;
	}
}