/*
 * Responsive fixes (18.11.2026, Caroline task 2): mobile 360-430 px, tablet 768-1024 px.
 * Loaded after every other theme stylesheet (see da_spain_register_styles in functions.php),
 * so only the rules that differ from the base styles are here.
 */

/* ---- 2. Photos fill their frame (no grey bands): property cards, catalog cards, gallery ---- */
#prop-slider-sec #slider .photo-slide img,
.one-result .thumb img,
#main-prop-slider .main-slider .slide > div > img,
#main-prop-slider .second-slider .slide > div > img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	object-fit: cover;
	transform: none;
	-ms-transform: none;
}
#prop-slider-sec #slider .photo-slide img {
	cursor: pointer;
}

/* ---- 6/7. Property gallery: readable counter and arrows ---- */
#main-prop-slider .slick-dots,
#main-prop-slider .number-of-slides {
	background: rgba(20, 22, 28, .62);
	color: #fff;
	font-size: 13px;
	line-height: 1;
	height: auto;
	padding: 6px 0 6px 8px;
	top: 12px;
	text-shadow: none;
}
#main-prop-slider .slick-dots li {
	padding: 6px 0 6px 8px;
	height: auto;
	top: 0;
}
#main-prop-slider .number-of-slides {
	padding-right: 8px;
	border-radius: 0 3px 3px 0;
}
#main-prop-slider .slick-dots {
	border-radius: 3px 0 0 3px;
	padding-left: 0;
}
#main-prop-slider .slick-arrow {
	background-color: rgba(20, 22, 28, .55);
	border-radius: 50%;
}
@media (max-width: 767px) {
	#main-prop-slider .slick-arrow {
		width: 40px;
		height: 40px;
		background-size: 14px;
	}
	#main-prop-slider .slick-prev {
		left: 8px;
	}
	#main-prop-slider .slick-next {
		right: 8px;
	}
}

/* ---- 1. Home: hero title and the "Premium new-build properties" block must not overlap the logo ---- */
@media (max-width: 767px) {
	#top-sec {
		padding-top: 100px;
	}
	#top-sec .page-title {
		margin-top: 14px;
	}
	/* the golden logo drawn in the background of the block sits right on its title */
	#investments-slider-sec {
		background-image: none;
	}
	#investments-slider > .slick-arrow {
		top: 130px;
		width: 36px;
		height: 36px;
		border-radius: 50%;
		background-color: rgba(20, 22, 28, .6);
		background-size: 14px;
		background-position: center;
		background-repeat: no-repeat;
		z-index: 3;
	}
	#investments-slider > .slick-prev {
		left: 4px;
	}
	#investments-slider > .slick-next {
		right: 4px;
	}
}

/* ---- 4. Home: property type tabs in one horizontally scrolling row on mobile ---- */
@media (max-width: 767px) {
	#prop-slider-sec .select-type-list {
		display: flex;
		flex-wrap: nowrap;
		gap: 8px;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x proximity;
		padding: 0 15px 8px;
		margin-bottom: 18px;
		text-align: left;
		scrollbar-width: none;
	}
	#prop-slider-sec .select-type-list::-webkit-scrollbar {
		display: none;
	}
	#prop-slider-sec .select-type-list li {
		display: block;
		flex: 0 0 auto;
		scroll-snap-align: start;
	}
	#prop-slider-sec .select-type-list li span {
		white-space: nowrap;
		padding: 0 14px;
	}
}

/* ---- 5. Tablet 768-991: the hero text clears the logo too (listings are already in two columns there) ---- */
@media (min-width: 768px) and (max-width: 991px) {
	#top-sec {
		padding-top: 115px;
	}
}

/* ---- 3. Chat widget (JivoChat): a small round icon on mobile, offset so CTAs stay visible ---- */
@media (max-width: 767px) {
	#jvLabelWrap {
		width: 52px !important;
		height: 52px !important;
		min-width: 0 !important;
		max-width: 52px !important;
		border-radius: 50% !important;
		right: 12px !important;
		left: auto !important;
		bottom: 84px !important;
		overflow: hidden !important;
	}
	#jvLabelWrap [class*="text__"],
	#jvLabelWrap [class*="logo__"],
	#jvLabelWrap [class*="menu__"] {
		display: none !important;
	}
	#jvLabelWrap [class*="icon__"] {
		position: absolute !important;
		inset: 0 !important;
		margin: auto !important;
		width: 24px !important;
		height: 24px !important;
	}
	jdiv[class*="tooltipWrapper"] {
		display: none !important;
	}
}

/* ---- 6. Pinch zoom is allowed now (maximum-scale removed from the viewport meta): inputs at 16 px stop iOS Safari from zooming the page on focus ---- */
@media (max-width: 767px) {
	input[type="text"],
	input[type="email"],
	input[type="tel"],
	input[type="search"],
	input[type="number"],
	input[type="password"],
	textarea,
	select {
		font-size: 16px;
	}
}

/* ---- 5. Tablet 768-991: the property page keeps text and the request card side by side (it was the stretched mobile column) ---- */
@media (min-width: 768px) and (max-width: 991px) {
	#content-sec .content-col {
		flex: 0 0 61%;
		max-width: 61%;
	}
	#content-sec .sidebar-col {
		flex: 0 0 39%;
		max-width: 39%;
	}
}
