/* ========================================
   MEDIA QUERIES - NGR25 Theme
   Responsive styles for all devices
   ======================================== */

/* ===================================
   STYLE.CSS RESPONSIVE RULES
   =================================== */

/* Desktop Large: min-width 1200px */
@media screen and (min-width: 1200px) {
	body.large-text {
		font-size: 18px;
		line-height: 1.6;
	}
	
	body.large-text .btn,
	body.large-text input,
	body.large-text select {
		font-size: 18px;
		padding: 12px 16px;
	}
}

/* Closing missing brace fixed */
}

/* Desktop: min-width 992px */
@media (min-width: 992px) {
	.page-gallery .col-md-3 {
		width: 25%;
	}
}

/* Tablet: max-width 991px */
@media (max-width: 991px) {
	.archive-content-text {
		padding-right: 0;
		margin-bottom: 15px;
	}
	
	.archive-thumbnail-right {
		height: 180px;
	}
	
	.archive-thumbnail-right img {
		height: 180px;
	}
	
	.no-thumbnail-small {
		height: 180px;
	}

	.archive-content .archive-thumbnail {
		height: 160px;
	}
	
	.archive-content .archive-thumbnail img {
		height: 160px;
	}
}

/* Tablet: min-width 768px */
@media (min-width: 768px) {
	.page-gallery .col-sm-4 {
		width: 33.33333333%;
	}
}

/* ===================================
   Mobile: max-width 768px
   All mobile styles consolidated
   =================================== */
@media screen and (max-width: 768px) {
	/* Typography and content spacing */
	#main-content,
	.entry-content {
		font-size: 16px;
		line-height: 1.6;
		max-width: 100%;
		padding-left: 1rem;
		padding-right: 1rem;
	}
	
	/* Prevent horizontal overflow */
	html, body {
		overflow-x: hidden;
	}

	/* Responsive images */
	#main-content img,
	.entry-content img,
	.featured-image img {
		max-width: 100%;
		height: auto;
		display: block;
	}
	
	/* Gallery layout */
	.page-gallery .col-xs-6 {
		width: 50%;
		padding-left: 7.5px;
		padding-right: 7.5px;
	}
	
	.page-gallery .gall_box {
		margin-bottom: 10px;
	}

	/* Menu and sidebar */
	.menu .element {
		margin-bottom: 10px;
		min-height: 60px;
		padding: 15px;
	}
	
	.sidebar {
		margin-bottom: 20px;
	}
	
	.sidebar-menu {
		display: none;
	}
	
	.sidebar-menu.show {
		display: block;
	}

	/* Featured images */
	.single-featured-image {
		margin-bottom: 20px;
	}
	
	.single-featured-image .featured-image {
		max-height: 250px;
	}
	
	.featured-image-caption {
		font-size: 13px;
		padding: 8px 12px;
	}
	
	/* Accessibility improvements */
	.skip-link:focus {
		left: 4px;
		right: 4px;
		width: auto;
		font-size: 16px;
		padding: 16px 20px;
	}
	
	/* Touch targets for buttons (WCAG 2.2 AA) */
	button,
	.btn,
	input[type="submit"],
	input[type="button"] {
		min-height: 44px;
		min-width: 44px;
		padding: 12px 16px;
	}
}
@media (max-width: 1199px) {
	
	.single-sidebar {
		background: #f8f9fa;
		border: 1px solid #e9ecef;
		border-radius: 6px;
		padding: 20px;
		margin-bottom: 30px;
	}

	.single-sidebar h2 {
		color: #2E7D32;
		font-size: 24px;
		margin: 0 0 20px 0;
		padding-bottom: 10px;
		border-bottom: 2px solid #2E7D32;
	}

	.single-sidebar h3 {
		color: #333;
		font-size: 16px;
		margin: 0 0 10px 0;
		font-weight: 600;
	}
	#page-content-container, #single-content-container{
		padding-top: 40px;
	}
}
/* Mobile: max-width px */
@media (max-width: 767px) {
	
	.single-sidebar {
		background: #f8f9fa;
		border: 1px solid #e9ecef;
		border-radius: 6px;
		padding: 20px;
		margin-bottom: 30px;
	}

	.single-sidebar h2 {
		color: #2E7D32;
		font-size: 24px;
		margin: 0 0 20px 0;
		padding-bottom: 10px;
		border-bottom: 2px solid #2E7D32;
	}

	.single-sidebar h3 {
		color: #333;
		font-size: 16px;
		margin: 0 0 10px 0;
		font-weight: 600;
	}
	
	.archive-section {
		margin-bottom: 20px;
	}

	.archive-content .single {
		margin-bottom: 20px;
	}
	
	.archive-content .archive-thumbnail {
		height: 200px;
	}
	
	.archive-content .archive-thumbnail img {
		height: 200px;
	}
}



/* (reverted section-specific overrides) */

/* ===================================
   MAIN.CSS RESPONSIVE RULES
   =================================== */

/* Large Desktop: 1200px - 1340px */
@media (max-width: 1340px) {
	.owl-carousel .owl-nav .owl-prev {
		left: -40px;
	}

	.owl-carousel .owl-nav .owl-next {
		right: -40px;
	}
}

/* Desktop: 991px - 1260px */
@media (max-width: 1260px) {
	.owl-carousel .owl-nav .owl-prev,
	.owl-carousel .owl-nav .owl-next {
		top: 14px;
		width: 20px;
		height: 20px;
		border: none;
	}

	.owl-carousel .owl-nav .owl-prev::after,
	.owl-carousel .owl-nav .owl-next::after {
		content: "";
		background: #fff;
		width: 30px;
		height: 30px;
		display: block;
		position: absolute;
		top: 0px;
		left: 0;
		-webkit-border-radius: 50px;
		-moz-border-radius: 50px;
		border-radius: 50px;
	}

	.owl-carousel .owl-nav .owl-prev::before,
	.owl-carousel .owl-nav .owl-next::before {
		content: "";
		width: 13px;
		height: 13px;
		display: block;
		position: absolute;
		top: 0px;
		left: 0;
		z-index: 15;
	}

	.owl-carousel .owl-nav .owl-prev::before {
		border-left: 2px solid #ddd;
		border-top: 2px solid #ddd;
		left: 10px;
		top: 10px;
	}

	.owl-carousel .owl-nav .owl-next::before {
		border-right: 2px solid #ddd;
		border-bottom: 2px solid #ddd;
		left: 7px;
		top: 7px;
	}

	.owl-carousel .owl-nav .owl-prev {
		left: calc(50% - 30px);
	}

	.owl-carousel .owl-nav .owl-next {
		right: calc(50% - 30px);
	}
}

/* Desktop: max-width 1200px */
@media (max-width: 1200px) {
	.menu1,
	.menu2,
	.menu3 {
		width: 616px;
	}

	.gminy .herby a {
		margin: 0 25px;
	}
}

/* Tablet: max-width 991px */
@media (max-width: 991px) {
	.element {
		font-size: 16px;
	}

	.contact-top .phone,
	.contact-top .mail {
		margin-right: 13px;
	}

	.menu1,
	.menu2,
	.menu3 {
		width: 720px;
	}

	.menu2 {
		left: -250px;
	}

	.home {
		display: none;
	}
}

/* Tablet: 768px - 991px */
@media (min-width: 768px) and (max-width: 991px) {
	/* Delikatnie zmniejszone odstępy */
	.homepage-section {
		margin-bottom: 2rem;
	}
	
	.homepage-section .col-img {
		min-height: 260px;
	}
	
	.homepage-list li {
		margin-bottom: 0.9em !important;
	}
	
	.homepage-section .col-img .caption h1 {
		font-size: 1.5rem;
	}
}

/* Tablet/Mobile: min-width 768px */
@media (min-width: 768px) {
	.tiles .min100:nth-of-type(4n+1) {
		clear: none;
	}

	.tiles .min100:nth-of-type(3n+1) {
		clear: left;
	}
}

/* Desktop: min-width 992px */
@media (min-width: 992px) {
	.tiles .min100:nth-of-type(4n+1) {
		clear: left;
	}

	.tiles .min100:nth-of-type(3n+1) {
		clear: none;
	}
}

/* Tablet/Mobile: max-width 991px */
@media (max-width: 991px) {
	.homepage-fullwidth .row {
		flex-direction: column !important;
	}
	
	.homepage-section img {
		margin-bottom: 24px;
	}
}

/* Mobile: max-width 800px */
@media (max-width: 800px) {
	.hero-header {
		min-height: 60vh;
	}
	
	.hero-menu ul {
		gap: 16px;
	}
	
	.hero-btn {
		padding: 10px 18px;
		font-size: 1em;
	}
	
	.hero-content {
		padding-top: 8vw;
	}
	
	.hero-mask {
		height: 18vw;
	}

	.news-header,
	#main-content.text {
		padding: 1.2em 0.7em;
	}
}

/* Mobile: max-width 767px */
@media (max-width: 767px) {
	.hero .baner {
		margin-bottom: 25px;
	}

	.hero .baner img {
		width: 100%;
	}

	.menu1,
	.menu2,
	.menu3,
	.menu4 {
		width: 100%;
        padding: 20px 20px 20px 20px;
	}

	.menu2 {
		left: 0;
	}

	.element.em1 {
		z-index: 101;
	}

	.element.em2 {
		z-index: 100;
		    line-height: 50px;
	}

	/* (reverted mobile vertical-centering for .menu2/.menu3) */

	.element.em3 {
		z-index: 99;
		    line-height: 50px;
	}

	.logo_one,
	.logo_three,
	.logo_two,
	.logo_four {
		width: 33%;
		text-align: center;
	}

	.logo_one img,
	.logo_three img,
	.logo_two img,
	.logo_four img {
		margin-left: auto;
		margin-right: auto;
	}

	.contact-top {
		text-align: center;
	}

	.contact-top .searching {
		width: 100%;
		margin: 15px 0 0;
	}

	.searching .in-search {
		width: calc(100% - 23px);
		padding-left: 15px;
	}

	.searching .show-search {
		display: none;
	}

	.show-mobile {
		display: inline-block;
	}

	.hide-mobile {
		display: none;
	}

	.sidebar ul.submenu {
		display: none;
	}

	.hamburger {
		display: block;
		width: 100%;
		text-align: center;
		background: #FFF;
		line-height: 44px;
		font-size: 17px;
		height: 44px;
		min-height: 44px;
		cursor: pointer;
	}

	.men1 .hamburger {
		color: #87c832;
	}

	.men2 .hamburger {
		color: #005696;
	}

	.men3 .hamburger {
		color: #898989;
	}

	#fb {
		display: none;
	}

	.tiles .min100:nth-of-type(3n+1) {
		clear: none;
	}

.tiles .min100:nth-of-type(2n+1) {
	clear: left;
	}

	.search-again .btn-primary{
		width: auto;
		min-width: 100px;
		text-align: left;
		padding-left: 10px;
	}
.search-again span {
	height: 43px;
	line-height: 43px;
}
.no-results-content {
	text-align: center;
	padding: 0px 20px;
}
	/* Mobile homepage: mniejsze marginesy i padding dla list */
	.entry-content ul,
	.entry-content ol,
	#main-content ul,
	#main-content ol {
		margin-top: 0.5rem !important;
		margin-bottom: 0.5rem !important;
		padding-left: 1rem !important;
	}
	
	/* Kolejność kolumn na mobile - ZAWSZE zdjęcie na górze */
	.homepage-section .row {
		flex-direction: column !important;
	}
	
	/* Domyślnie - zachowaj naturalną kolejność HTML (sekcje 1,3,5 mają img przed text) */
	.homepage-section .col-img {
		order: 0;
		width: 100%;
	}
	
	/* WSZYSTKIE sekcje - tekst wyrównany do lewej na mobile */
	.homepage-section .col-homepage-text {
		order: 0;
		width: 100%;
		justify-content: flex-start !important;
		text-align: left !important;
		align-items: flex-start !important;
		display: flex;
		flex-direction: column;
		padding-left: 15px !important;
		padding-right: 15px !important;
	}

	/* On mobile, ensure odd homepage rows keep text after image (if desktop used reverse layout) */
	.homepage-section .row:nth-child(odd) .col-homepage-text {
		order: 2 !important;
		/* Force left alignment and reset any inline justify */
		justify-content: flex-start !important;
		-webkit-justify-content: flex-start !important;
		-ms-flex-pack: start !important;
		align-items: flex-start !important;
		/* Reduce padding on mobile if needed */
		padding-top: 20px !important;
		padding-bottom: 20px !important;
	}

	/* Also target elements with inline styles to ensure override */
	.homepage-section .row:nth-child(odd) > .col-homepage-text[style] {
		order: 2 !important;
		justify-content: flex-start !important;
		align-items: flex-start !important;
	}

	/* EXTRA: bardzo specyficzne nadpisanie aby przebić inline styles */
	.homepage-section .row > .col-homepage-text[style],
	.homepage-section .row > .col-homepage-text {
		/* force left alignment and reset justify-content */
		justify-content: flex-start !important;
		-webkit-justify-content: flex-start !important;
		-ms-flex-pack: start !important;
		text-align: left !important;
		align-items: flex-start !important;
		padding-left: 15px !important;
		padding-right: 15px !important;
	}

	/* Ensure direct child lists also align left */
	.homepage-section .row > .col-homepage-text > .nav,
	.homepage-section .row > .col-homepage-text > ul,
	.homepage-section .row > .col-homepage-text > .homepage-list {
		text-align: left !important;
		padding-left: 0 !important;
	}
	
	/* Sekcje 2 i 4 mają odwrotną kolejność w HTML (text przed img) - wymuszamy img najpierw */
	.homepage-stowarzyszenie .col-img,
	.homepage-nabory .col-img {
		order: -1 !important; /* Zdjęcie na początku */
	}
	
	.homepage-stowarzyszenie .col-homepage-text,
	.homepage-nabory .col-homepage-text {
		order: 1 !important; /* Tekst po zdjęciu */
		justify-content: flex-start !important;
		text-align: left !important;
	}
	.homepage-stowarzyszenie .row:nth-child(odd) .col-homepage-text .homepage-list> li > a, .homepage-nabory .row:nth-child(odd) .col-homepage-text .homepage-list> li > a {
    /* padding-right: 40px !important; */
     padding-left: 40px !important; 
    /* text-align: right; */
	}

	/* Wszystkie listy homepage - wyrównane do lewej */
	.homepage-section .homepage-list,
	.homepage-section .homepage-submenu {
		text-align: left !important;
		width: 100%;
		padding-left: 0 !important;
	}
	
	.homepage-section .homepage-list li,
	.homepage-section .homepage-submenu li {
		text-align: left !important;
	}
	
	.homepage-section .homepage-list li a,
	.homepage-section .homepage-submenu li a {
		text-align: left !important;
		justify-content: flex-start !important;
		display: flex;
		align-items: center;
	}
	
	/* Zmniejszone odstępy między sekcjami */
	.homepage-section {
		margin-bottom: 1rem; /* Minimalny margines dla separacji */
		padding: 0;
	}
	
	/* Mniejsze paddingi w kolumnach */
	.homepage-section .col-img,
	.homepage-section .col-homepage-text {
		padding-left: 15px;
		padding-right: 15px;
	}
	
	/* Mniejsza wysokość zdjęć na mobile */
	.homepage-section .col-img {
		min-height: 180px; /* Zmniejszona wysokość */
		background-size: cover;
		background-position: center;
	}
	
	/* Caption w obrazach - mniejszy tekst */
	.homepage-section .col-img .caption h1, 	.homepage-section .col-img .caption h2 {
		font-size: 2rem; /* Zmniejszona czcionka na mobile */
		padding: 8px 12px;
		line-height: 1.3;
		color:#FFF !important;
	}
	
	.homepage-section .col-img .caption i {
		font-size: 2rem;
	}
	
	/* Menu lista - mniejsze odstępy */
	.homepage-list li {
		margin-bottom: 0px !important; /* Zmniejszone */
		padding: 3px 0 !important;
	}
	
	/* Linki w listach - zachowanie klikalności */
	.homepage-list a {
		padding: 8px 6px !important;
		font-size: 0.95rem;
		min-height: 44px;
		display: inline-flex;
		align-items: center;
	}

	.homepage-list .submenu a {	
		margin-left: 50px;
		white-space: normal;
		word-break: break-word;
		padding-left: 20px;
		display: inline-flex;
		align-content: flex-start;
		align-items: center;
		margin-bottom: -10px;
	}
	
	/* Blog date - mniejsza */
	.blog-date {
		font-size: 0.85em !important;
	}
	
	/* Blog title - mniejsza */
	.blog-title {
		font-size: 0.98em !important;
	}
	
	/* Submenu na homepage - mniejsze wcięcie */
	.homepage-submenu {
		padding-left: 12px !important;
		margin-top: 0.4em !important;
	}
	
	.homepage-submenu li {
		margin-bottom: 0.5em !important;
	}
	
	/* Container główny - mniejsze paddingi */
	.homepage-main {
		padding-left: 10px;
		padding-right: 10px;
	}
	
	/* Sekcja newsletter */
	.newsletter {
		margin-top: 0;
		margin-bottom: 0;
		max-height: 100px;
		padding: 12px;
	}
	
	/* Ikona w linku blog - mniejsza */
	.blog-link-row .icon i {
		font-size: 0.9rem !important;
	}

	#menu-menu-stowarzyszenie-ngr .submenu,
	#menu-menu-lsr-2021-2027 .submenu {
		text-align: left !important;
		padding-right: 0px;
		padding-left: 0px !important;
	}

	#menu-menu-stowarzyszenie-ngr > .homepage-list > li,
	#menu-menu-lsr-2021-2027 > .homepage-list > li {
		margin-bottom: 0px !important;
		padding: 2px 0 !important;
	}

	/* Wszystkie linki w menu homepage - wyrównane do lewej bez wcięć */
	.homepage-section .homepage-list > li > a {
		padding-left: 0px !important;
		margin-left: 0 !important;
		text-align: left !important;
		justify-content: flex-start !important;
	}

	.homepage-lsr .homepage-list > li > a,
	.homepage-skroty .homepage-list > li > a,
	.homepage-blog .homepage-list > li > a {
		margin-left: 0 !important;
		margin-right: 0px;
		padding-right: 40px !important;
		padding-left: 0 !important;
		position: relative;
		font-weight: 500;
		text-transform: none;
		text-align: left !important;
	}

	#menu-menu-stowarzyszenie-ngr .fa.fa-angle-right {
		font-size: xx-small !important;
		margin-left: -5px;
	}

	#menu-menu-lsr-2021-2027 .submenu {
		text-align: left;
		padding-right: 0px; 
	}

	.entry-content ul,
	.entry-content ol,
	#main-content ul,
	#main-content ol {
		margin-top: 0rem !important;
		margin-bottom: 0rem !important;
		padding-left: 0rem !important;
	}

	/* Jeszcze mniejsze odstępy i wcięcia dla list na homepage */
	.homepage-list li,
	.homepage-list .homepage-submenu li,
	.homepage-section .homepage-list li,
	.homepage-section .homepage-submenu li {
		margin-bottom: 0.3em !important;
		padding: 2px 0 !important;
		line-height: 1.2 !important;
	}

	.homepage-list,
	.homepage-section .homepage-list,
	.homepage-section .homepage-submenu {
		padding-left: 0.7rem !important;
	}

	.homepage-list li ul,
	.homepage-section .homepage-list li ul,
	.homepage-section .homepage-submenu li ul {
		padding-left: 0.7rem !important;
	}

	.homepage-section .caption, .homepage-nabory .row:nth-child(odd) .caption {
		top: 10%;
		left: 10%;
		right: auto;
		max-width: 80%;
	}
}


/* Mobile override - captions slightly inset and wider */
@media (max-width: 768px) {
	.homepage-section .caption {
		top: 10% !important;
		left: 10% !important;
		right: auto !important;
		max-width: 80% !important;
		padding: 6px 10px !important;
	}
	.logo_all {
	width: 100%;
	margin: 0 auto 0 auto;
	display: block;
	align-self: flex-start;
	text-align: left;
	padding-bottom: 60px;
}
	.hero-header {
		min-height: 61vh;
	}
	
}

/* Mobile: max-width 600px */
@media (max-width: 600px) {
	.footer {
		padding: 16px 0 0 0;
		border-radius: 0 0 8px 8px;
	}

	.footer .copy {
		text-align: center;
		width: 100%;
		display: block;
		margin-bottom: 5px;
	}

	.footer .sungroup {
		float: none;
		display: block;
		margin: 0 auto;
	}

	.newsletter br {
		display: none;
	}

	.logo_four img {
		margin-top: 17px;
	}

	.homepage-fullwidth {
		padding: 0px;
	}

	/*.homepage-section h2 {
		font-size: 1.4rem;
		margin-bottom: 16px;
	}   */

	.homepage-list a {
		font-size: 1rem;
		padding: 4px 4px;
	}

	.homepage-stowarzyszenie-content {
		padding: 24px 8px 0 8px;
	}

    .homepage-blog .row:nth-child(odd) .caption {
    text-align: left;
    /* right: 20px; */
    left: 20px;
}


/* Mobile: max-width 520px */
@media (max-width: 520px) {
	.show-mobile {
		display: none;
	}

	.hide-mobile {
		display: inline-block;
	}

	.contact-top .searching {
		width: auto;
		margin: 0;
	}

	.searching .in-search {
		width: calc(100% - 23px);
		padding-left: 15px;
	}
}

/* Mobile: max-width 500px */
@media (max-width: 500px) {
	.hero-header {
		min-height: 61vh;
	}
.hero-header .menu {
    margin: auto;
    margin-bottom: 0px;
	            margin-top: 40px;
}
	.hero-menu ul {
		flex-direction: column;
		gap: 10px;
	}

	.hero-btn {
		width: 100%;
	}

	.hero-mask {
		height: 40vw;
        clip-path: none;
            position: static;
	}

	.hero-content {
		padding-top: 2vw;
		top: 0px;
		
	}

	.logo_all {
		width: 100%;
		padding-bottom: 60px;
	
	}

		/* Force logos above menus on small screens — try high specificity and !important */
		.logo_all {
			position: relative !important;
			z-index: 99999 !important;
		}

		/* Lower menu stacking on small devices so logos remain visible */
		.menu1,
		.menu2,
		.menu3,
		.menu4 {
			z-index: 800 !important;
		}

		.element.opened,
		.element.em1.opened + .menu1,
		.element.em2.opened + .menu2,
		.element.em3.opened + .menu3,
		.element.em4.opened + .menu4 {
			z-index: 900 !important;
		}

	/* Ensure logos are visible above menus on small devices (iPhone) */
	.logo_all {
		position: relative;
		z-index: 1250;
	}

	.homepage-fullwidth .col-img {
		background-size: auto;
		background-attachment: unset;
	}

      button, .btn, input[type="submit"], input[type="button"], a {
        min-height: auto;
        min-width: auto;
        padding: 0px;
    
}
}

/* Mobile: max-width 460px */
@media (max-width: 460px) {
	.min100 {
		width: 100%;
	}

	.contact .phone {
		display: block;
		height: 36px;
	}

	.contact .mail {
		display: block;
		height: 36px;
	}

	.cookiepolicy {
		background: #FFF;
		bottom: 0px;
		right: 0;
		left: 0;
		max-width: 100%;
		padding: 10px 15px;
	}

	.cookiepolicy .button {
		font-size: 12px;
		line-height: 30px;
		height: 30px;
	}
}
