/**
 * Composición JCF - Frontend Stylesheet
 * Dark theme with orange accents (#ff6600), glassmorphism, premium transitions.
 */

/* 1. Grid of Delegations (Shortcode & WP Bakery) */
.jcf-delegaciones-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 30px;
	margin: 20px 0;
	width: 100%;
}

.jcf-delegaciones-grid.columns-2 {
	grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
}

.jcf-delegaciones-grid.columns-4 {
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}

/* Individual Card Design */
.jcf-delegacion-card {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 30px 20px;
	background: rgba(18, 18, 18, 0.7);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	text-decoration: none !important;
	box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
	overflow: hidden;
	cursor: pointer;
}

.jcf-delegacion-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, rgba(255, 102, 0, 0.05) 0%, rgba(0, 0, 0, 0) 100%);
	opacity: 0;
	transition: opacity 0.4s ease;
	z-index: 1;
}

/* Card Logo */
.jcf-card-logo {
	width: 100%;
	height: 140px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 20px;
	overflow: hidden;
	z-index: 2;
}

.jcf-card-logo img {
	max-width: 85%;
	max-height: 100%;
	object-fit: contain;
	transition: transform 0.4s ease, filter 0.4s ease;
}

/* Card Title */
.jcf-card-title {
	margin: 10px 0 0 0 !important;
	color: #ffffff !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	text-align: center;
	z-index: 2;
	transition: color 0.3s ease;
}

/* Dynamic Bottom Bar Accent */
.jcf-card-accent-bar {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 0;
	height: 3px;
	background: #ff6600;
	box-shadow: 0 0 8px #ff6600;
	transition: width 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
	z-index: 3;
}

/* Card Hover States */
.jcf-delegacion-card:hover {
	transform: translateY(-8px);
	border-color: rgba(255, 102, 0, 0.4);
	box-shadow: 0 15px 40px rgba(255, 102, 0, 0.15), 0 0 1px rgba(255, 102, 0, 0.4);
}

.jcf-delegacion-card:hover::before {
	opacity: 1;
}

.jcf-delegacion-card:hover .jcf-card-logo img {
	transform: scale(1.08);
}

.jcf-delegacion-card:hover .jcf-card-title {
	color: #ff6600 !important;
}

.jcf-delegacion-card:hover .jcf-card-accent-bar {
	width: 100%;
}


/* 2. Organigrama (Single Post Details Template) */
.jcf-organigrama-wrap {
	background: rgba(15, 15, 15, 0.85);
	border: 1px solid rgba(255, 102, 0, 0.15);
	border-radius: 16px;
	padding: 40px;
	margin: 30px 0;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
	color: #e0e0e0;
	font-family: inherit;
	overflow: hidden;
}

/* Header Section */
.jcf-org-header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 30px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	padding-bottom: 30px;
	margin-bottom: 40px;
}

.jcf-org-logo {
	width: 120px;
	height: 120px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.2);
	border: 1px solid rgba(255, 255, 255, 0.05);
	border-radius: 12px;
	padding: 10px;
}

.jcf-org-logo img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.jcf-org-main-title {
	margin: 0 !important;
	color: #ffffff !important;
	font-size: 32px !important;
	font-weight: 800 !important;
}

/* Sections & Flow */
.jcf-org-section {
	width: 100%;
	margin-bottom: 35px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.jcf-org-sub-title {
	width: 100%;
	text-align: center;
	color: #ff6600 !important;
	font-size: 18px !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	margin-bottom: 20px !important;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.jcf-org-sub-title::before,
.jcf-org-sub-title::after {
	content: '';
	flex-grow: 1;
	height: 1px;
	background: linear-gradient(to right, rgba(255,102,0,0), rgba(255,102,0,0.4), rgba(255,102,0,0));
}

/* Cards Layout */
.jcf-org-row {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 20px;
	width: 100%;
}

/* Base Card Class */
.jcf-org-card {
	background: rgba(25, 25, 25, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.05);
	border-left: 4px solid #ff6600;
	border-radius: 8px;
	padding: 15px 25px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	min-width: 240px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
	transition: all 0.3s ease;
}

.jcf-org-card:hover {
	transform: translateY(-3px);
	border-color: rgba(255, 102, 0, 0.3);
	border-left-color: #ff6600;
	box-shadow: 0 6px 20px rgba(255, 102, 0, 0.1);
}

.jcf-org-card-superior {
	background: rgba(255, 102, 0, 0.06);
	border: 1px solid rgba(255, 102, 0, 0.2);
	border-top: 4px solid #ff6600;
	border-left: 1px solid rgba(255, 102, 0, 0.2);
	border-radius: 8px;
	min-width: 280px;
	padding: 20px 30px;
}

.jcf-org-card-superior:hover {
	border-color: rgba(255, 102, 0, 0.4);
	box-shadow: 0 8px 25px rgba(255, 102, 0, 0.15);
}

/* Text elements inside cards */
.jcf-role-title {
	font-size: 12px;
	text-transform: uppercase;
	color: #a0a0a0;
	letter-spacing: 1px;
	margin-bottom: 6px;
	font-weight: 600;
}

.jcf-role-name {
	font-size: 18px;
	color: #ffffff;
	font-weight: 700;
}

.jcf-org-card-superior .jcf-role-title {
	color: #ff8c40;
}

/* Lists Stack (stacked vertically) */
.jcf-org-lists-stack {
	display: flex;
	flex-direction: column;
	gap: 25px;
	margin-top: 30px;
	width: 100%;
}

.jcf-org-list-box {
	background: rgba(20, 20, 20, 0.45);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.05);
	border-left: 4px solid #ff6600;
	border-radius: 8px;
	padding: 22px 25px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
	transition: all 0.3s ease;
}

.jcf-org-list-box:hover {
	border-color: rgba(255, 102, 0, 0.35);
	box-shadow: 0 6px 20px rgba(255, 102, 0, 0.08);
}

.jcf-org-list-box .jcf-org-sub-title {
	margin-top: 0;
	margin-bottom: 15px;
	font-size: 15px;
	color: #ff8c40;
	text-transform: uppercase;
	letter-spacing: 1px;
	font-weight: 700;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	padding-bottom: 6px;
}

.jcf-organigrama-wrap .jcf-org-list-box ul {
	display: block !important;
	column-count: 2 !important;
	column-gap: 40px !important;
	list-style: none !important;
	padding: 0 !important;
	margin: 0 !important;
}

@media (max-width: 580px) {
	.jcf-organigrama-wrap .jcf-org-list-box ul {
		column-count: 1 !important;
	}
}

.jcf-organigrama-wrap .jcf-org-list-box li {
	break-inside: avoid !important;
	page-break-inside: avoid !important;
	-webkit-column-break-inside: avoid !important;
	position: relative !important;
	padding: 8px 0 8px 25px !important;
	color: #d0d0d0 !important;
	font-size: 15px !important;
	transition: color 0.2s ease, transform 0.2s ease;
	display: block !important;
	width: 100% !important;
}

.jcf-organigrama-wrap .jcf-org-list-box li::before {
	content: '\f147' !important; /* Dashicons check */
	font-family: dashicons !important;
	position: absolute !important;
	left: 0 !important;
	top: 9px !important; /* Aligns perfectly with the first line of text */
	line-height: 16px !important;
	height: 16px !important;
	width: 16px !important;
	color: #ff6600 !important;
	font-size: 16px !important;
}

.jcf-organigrama-wrap .jcf-org-list-box li:hover {
	color: #ffffff !important;
	transform: translateX(4px) !important;
}

/* Footer & Contacts */
.jcf-org-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 30px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	margin-top: 40px;
	padding-top: 30px;
}

.jcf-contact-item {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 16px;
	color: #b0b0b0;
	transition: color 0.3s ease;
}

.jcf-contact-item span.dashicons {
	color: #ff6600;
	font-size: 20px;
	width: 20px;
	height: 20px;
}

.jcf-contact-item a {
	color: #e0e0e0 !important;
	text-decoration: none !important;
	font-weight: 600;
	transition: color 0.3s ease;
}

.jcf-contact-item a:hover {
	color: #ff6600 !important;
}

/* Responsiveness adjustments */
@media (max-width: 768px) {
	.jcf-organigrama-wrap {
		padding: 25px 20px;
	}
	.jcf-org-header {
		flex-direction: column;
		text-align: center;
		gap: 15px;
	}
	.jcf-org-card {
		width: 100%;
	}
	.jcf-org-lists-grid {
		grid-template-columns: 1fr;
	}
	.jcf-org-footer {
		flex-direction: column;
		align-items: center;
		gap: 15px;
	}
}

/* 3. Fotos de la Delegación Grid */
.jcf-fotos-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 20px;
	width: 100%;
	margin-top: 10px;
}

.jcf-foto-item {
	position: relative;
	border: 1px solid rgba(255, 102, 0, 0.15);
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
	background: rgba(0, 0, 0, 0.2);
	transition: all 0.3s ease;
	aspect-ratio: 16 / 9;
	display: flex;
	align-items: center;
	justify-content: center;
}

.jcf-foto-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.jcf-foto-item:hover {
	border-color: #ff6600;
	box-shadow: 0 8px 25px rgba(255, 102, 0, 0.25);
	transform: scale(1.02);
}

.jcf-foto-item:hover img {
	transform: scale(1.05);
}

@media (max-width: 768px) {
	.jcf-fotos-grid {
		grid-template-columns: 1fr;
	}
}
