/**
 * Theme Name: NAFFCO
 * Theme URI: https://www.naffco.com/
 * Description: NAFFCO Fire & Safety Theme
 * Author: NAFFCO
 * Author URI: https://www.naffco.com/
 * Version: 1.0.0
 * Text Domain: naffco
 */
/**/


/* 轮播样式 - Markets 轮播 */
.custom-carousel {
	position: relative;
	overflow: hidden;
}
.carousel-wrapper {
	overflow: hidden;
	width: 100%;
}
.carousel-track {
	display: flex;
	transition: transform 0.5s ease;
	width: 100%;
}
.carousel-item {
	flex: 0 0 calc(50% - 15px);
	margin-right: 30px;
	box-sizing: border-box;
}
@media (max-width: 999px) {
	.carousel-item {
		flex: 0 0 100%;
		margin-right: 0;
	}
}
.carousel-dots {
	display: flex;
	justify-content: center;
	margin-top: 20px;
	gap: 10px;
}
.carousel-dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background-color: #ccc;
	cursor: pointer;
	transition: all 0.3s ease;
	border: 2px solid transparent;
}
.carousel-dot:hover {
	background-color: #999;
	transform: scale(1.2);
}
.carousel-dot.active {
	background-color: #b01c12;
	transform: scale(1.3);
}
.carousel-dot.active:hover {
	background-color: #b01c12;
}

/* 轮播样式 - 博客轮播 */
.custom-carousel-blog.off {
	display: block;
}
.custom-carousel-blog.off .carousel-wrapper-blog {
	overflow: visible;
}
.carousel-wrapper-blog {
	overflow: hidden;
	width: 100%;
}
.carousel-track-blog {
	display: flex;
	transition: transform 0.5s ease;
	width: 100%;
}
.carousel-item-blog {
	flex: 0 0 100%;
	margin-right: 10px;
	box-sizing: border-box;
}

/* 博客相关样式 */
.post-description a, .post-description a:hover, .post-description a:focus {
	color: #b01c12;
}
.home-page-products-title {
	min-height: 90px;
}




/* 自定义滑块样式*/
			.naffco-slider-wrapper {
				position: relative;
				width: 100%;
				height: 100vh;
				min-height: 980px;
				overflow: hidden;
				background: transparent;
			}
			.naffco-slider-container {
				position: relative;
				width: 100%;
				height: 100%;
			}
			.naffco-slide {
				position: absolute;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				opacity: 0;
				transition: opacity 0.5s ease-in-out;
				z-index: 1;
			}
			.naffco-slide.active {
				opacity: 1;
				z-index: 2;
			}
			.naffco-slide-bg {
				position: absolute;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				overflow: hidden;
			}
			.naffco-slide-img {
				position: absolute;
				top: 50%;
				left: 50%;
				transform: translate(-50%, -50%);
				min-width: 100%;
				min-height: 100%;
				width: auto;
				height: auto;
				object-fit: cover;
				opacity: 0;
				transition: opacity 0.3s;
			}
			.naffco-slide-img.loaded {
				opacity: 1;
			}
			.naffco-slide-video {
				position: absolute;
				top: 50%;
				left: 50%;
				transform: translate(-50%, -50%);
				min-width: 100%;
				min-height: 100%;
				width: auto;
				height: auto;
				object-fit: cover;
			}
			.naffco-slide-content {
				position: absolute;
				bottom: 0;
				left: 0;
				width: 100%;
				z-index: 10;
			}
			.naffco-text-layer {
				position: absolute;
				left: 200px;
				bottom: 300px;
				font-family: 'Ubuntu', sans-serif;
				color: #ffffff;
				opacity: 0;
				transform: translateY(20px);
				transition: opacity 0.6s ease-out, transform 0.6s ease-out;
				z-index: 5;
			}
			.naffco-text-layer.layer-1 {
				font-size: 64px;
				font-weight: 700;
				line-height: 1.15;
				max-width: 1200px;
				z-index: 5;
				letter-spacing: 0.5px;
			}
			.naffco-text-layer.layer-2 {
				bottom: 250px;
				font-size: 38px;
				font-weight: 300;
				line-height: 1.25;
				z-index: 6;
				letter-spacing: 0.3px;
			}
			.naffco-text-layer.visible {
				opacity: 1;
				transform: translateY(0);
			}
			/* Navigation Arrows */
			.naffco-arrow {
				position: absolute;
				top: 50%;
				transform: translateY(-50%);
				width: 70px;
				height: 70px;
				min-width: 70px;
				min-height: 70px;
				border: none;
				border-radius: 50%;
				background: rgba(0, 0, 0, 0.1);
				cursor: pointer;
				z-index: 1000;
				overflow: hidden;
				transition: all 0.3s ease;
				touch-action: manipulation;
				padding: 0;
				display: flex;
				align-items: center;
				justify-content: center;
			}
			.naffco-arrow-left {
				left: 0;
				transform: translate(34px, -50%);
			}
			.naffco-arrow-right {
				right: 0;
				transform: translate(-34px, -50%);
			}
			.naffco-arrow-icon {
				font-size: 40px;
				color: #ffffff;
				line-height: 1;
				z-index: 2;
				position: relative;
				font-weight: 300;
			}
			.naffco-arrow-title-wrap {
				position: absolute;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				background: rgba(0, 0, 0, 0.5);
				opacity: 0;
				transform: scale(0);
				transition: all 0.3s ease;
				border-radius: 50%;
			}
			.naffco-arrow-imgholder {
				width: 100%;
				height: 100%;
				position: absolute;
				top: 0;
				left: 0;
				background-position: center center;
				background-size: cover;
				border-radius: 50%;
				transition: all 0.3s ease;
			}
			.naffco-arrow-left .naffco-arrow-imgholder {
				transform: translateX(-100%);
			}
			.naffco-arrow-right .naffco-arrow-imgholder {
				transform: translateX(100%);
			}
			.naffco-arrow:hover .naffco-arrow-imgholder,
			.naffco-arrow:focus .naffco-arrow-imgholder {
				transform: translateX(0);
				opacity: 1;
			}
			.naffco-arrow:hover .naffco-arrow-title-wrap,
			.naffco-arrow:focus .naffco-arrow-title-wrap {
				opacity: 1;
				transform: scale(1);
			}
			.naffco-arrow:hover,
			.naffco-arrow:focus {
				background: rgba(0, 0, 0, 0.2);
			}
			/* Progress Bar */
			.naffco-progress {
				position: absolute;
				bottom: 76px;
				left: 313px;
				width: 1920px;
				height: 5px;
				background-color: transparent;
				z-index: 200;
				visibility: visible;
				margin-top: 0;
				transform: translate(0, 0);
			}
			.naffco-progress::before {
				background-color: rgba(235, 235, 235, 0.5);
				content: "";
				position: absolute;
				width: 100%;
				height: 0.5px;
				left: 0;
				z-index: -1;
				top: 50%;
				transform: translateY(-50%);
			}
			.naffco-progress::after {
				content: "";
				position: absolute;
				height: 100%;
				width: 100%;
				background-color: inherit;
			}
			.naffco-progress-bar {
				height: 100%;
				background: rgb(176, 28, 18);
				width: 100%;
				transform-origin: 0% 50%;
				transform: scaleX(0);
				transition: transform 0.1s linear;
				position: relative;
				z-index: 1;
			}
			@media (min-width: 1800px) {
				.naffco-progress {
					bottom: 76px !important;
					left: 313px;
					width: 1920px;
				}
			}
			@media (max-width: 1920px) {
				.naffco-progress {
					left: 16.3%;
					width: calc(100% - 16.3%);
				}
			}
			@media (max-width: 1366px) {
				.naffco-progress {
					bottom: 50px;
					left: 142px;
					width: calc(100% - 142px);
				}
			}
			@media (max-width: 768px) {
				.naffco-progress {
					bottom: 30px;
					left: 80px;
					width: calc(100% - 80px);
				}
			}
			@media (max-width: 420px) {
				.naffco-progress {
					bottom: 20px;
					left: 38px;
					width: calc(100% - 38px);
				}
			}
			/* Responsive Styles - Breakpoint 1: 1366px */
			@media (max-width: 1366px) {
				.naffco-slider-wrapper {
					min-height: 635px;
				}
				.naffco-text-layer {
					left: 142px;
					bottom: 200px;
				}
				.naffco-text-layer.layer-1 {
					bottom: 200px;
					font-size: 45px;
					line-height: 1.15;
					max-width: 900px;
				}
				.naffco-text-layer.layer-2 {
					bottom: 155px;
					font-size: 30px;
					line-height: 1.25;
				}
				.naffco-arrow {
					width: 60px;
					height: 60px;
					min-width: 60px;
					min-height: 60px;
				}
				.naffco-arrow-icon {
					font-size: 35px;
				}
			}
			/* Responsive Styles - Breakpoint 2: 768px */
			@media (max-width: 768px) {
				.naffco-slider-wrapper {
					min-height: 960px;
				}
				.naffco-text-layer {
					left: 80px;
					bottom: 120px;
				}
				.naffco-text-layer.layer-1 {
					bottom: 120px;
					font-size: 26px;
					line-height: 1.15;
					max-width: 500px;
				}
				.naffco-text-layer.layer-2 {
					bottom: 95px;
					font-size: 20px;
					line-height: 1.25;
				}
				.naffco-arrow {
					width: 50px;
					height: 50px;
					min-width: 50px;
					min-height: 50px;
				}
				.naffco-arrow-icon {
					font-size: 30px;
				}
				.naffco-arrow-left {
					transform: translate(20px, -50%);
				}
				.naffco-arrow-right {
					transform: translate(-20px, -50%);
				}
			}
			/* Responsive Styles - Breakpoint 3: 420px */
			@media (max-width: 420px) {
				.naffco-slider-wrapper {
					min-height: 720px;
				}
				.naffco-text-layer {
					left: 38px;
					bottom: 60px;
				}
				.naffco-text-layer.layer-1 {
					bottom: 60px;
					font-size: 16px;
					line-height: 1.15;
					max-width: 250px;
				}
				.naffco-text-layer.layer-2 {
					bottom: 42px;
					font-size: 13px;
					line-height: 1.25;
				}
				.naffco-arrow {
					width: 40px;
					height: 40px;
					min-width: 40px;
					min-height: 40px;
				}
				.naffco-arrow-icon {
					font-size: 24px;
				}
				.naffco-arrow-left {
					transform: translate(10px, -50%);
				}
				.naffco-arrow-right {
					transform: translate(-10px, -50%);
				}
			}

/* Newsletter Form Styling to match theme - AGGRESSIVE OVERRIDES */
#newslettercustomid .unified-contact-form {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: flex-start !important; /* Align to top to handle potential height diffs */
    justify-content: space-between !important;
    width: 100% !important;
    gap: 15px !important; /* Add gap between elements */
}

/* Force fields to be inline and override any width settings */
#newslettercustomid .unified-contact-form .form-field-wrapper {
    margin-bottom: 0 !important;
    flex: 1 1 0% !important; /* Flex grow, shrink, start from 0 */
    min-width: 200px !important;
    margin-right: 0 !important; /* Use gap instead */
    width: auto !important;
    max-width: none !important;
}

/* Hide labels to match theme design */
#newslettercustomid .unified-contact-form .form-field-wrapper label {
    display: none !important;
}

/* Input styling */
#newslettercustomid .unified-contact-form .form-control {
    height: 50px !important;
    border: none !important;
    border-bottom: 1px solid #1a1a1a !important;
    padding: 0 !important;
    width: 100% !important;
    border-radius: 0 !important;
    background-color: transparent !important;
    box-shadow: none !important;
    margin-bottom: 0 !important;
    font-size: 16px !important;
    font-family: "neue-haas-grotesk-text", sans-serif !important;
}

/* Button container - CRITICAL: Override inline styles */
#newslettercustomid .unified-contact-form .form-field-wrapper-button {
    width: auto !important;
    flex: 0 0 auto !important;
    margin-bottom: 0 !important;
    margin-top: 0 !important;
}

/* Button styling */
#newslettercustomid .unified-contact-form .unified-contact-form-submit {
    height: 50px !important;
    padding: 0 30px !important;
    background-color: #ba0c2f !important; /* Standard red */
    color: #fff !important;
    border: none !important;
    text-transform: uppercase !important;
    font-weight: bold !important;
    font-size: 14px !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    line-height: 50px !important; /* Ensure vertical center */
    margin-top: 0 !important;
}

#newslettercustomid .unified-contact-form .unified-contact-form-submit:hover {
    background-color: #333 !important;
}

/* Privacy checkbox specific styling */
#newslettercustomid .unified-contact-form .form-field-wrapper:has(input[type="checkbox"]),
#newslettercustomid .unified-contact-form .form-field-wrapper.field-type-checkbox {
    flex: 0 0 100% !important;
    margin-top: 10px !important;
    margin-right: 0 !important;
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
}

/* Show label for checkbox */
#newslettercustomid .unified-contact-form .form-field-wrapper:has(input[type="checkbox"]) label,
#newslettercustomid .unified-contact-form .form-field-wrapper.field-type-checkbox label {
    display: inline-block !important;
    margin-left: 8px !important;
    font-weight: normal !important;
    font-size: 14px !important;
    color: #666 !important;
    margin-bottom: 0 !important;
}

/* Responsive */
@media (max-width: 768px) {
    #newslettercustomid .unified-contact-form {
        flex-direction: column !important;
        gap: 10px !important;
    }
    #newslettercustomid .unified-contact-form .form-field-wrapper {
        width: 100% !important;
        flex: 0 0 100% !important;
    }
    #newslettercustomid .unified-contact-form .form-field-wrapper-button {
        width: 100% !important;
    }
    #newslettercustomid .unified-contact-form .unified-contact-form-submit {
        width: 100% !important;
    }
}