/**
 * Approach Section (Notre Approche)
 *
 * @package EGCI_Template
 * @since 1.0.0
 */

/* ============================================
   Approach Section (Notre Approche)
   ============================================ */

.approach-section {
	background: #ffffff;
	border-radius: 20px;
}

@media (max-width: 767px) {
	.approach-section {
		padding: 65px 0;
	}
}

@media (max-width: 480px) {
	.approach-section {
		padding: 65px 0;
	}
}

.approach-header {
	margin-bottom: 50px;
}

.approach-subtitle {
	max-width: 800px;
    margin-bottom: 0;
    font-family: "Inter Tight", sans-serif;
    font-weight: 400;
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--egci-text-light);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.approach-subtitle p {
	margin-top: 0;
	margin-bottom: 0.39em;
	color: inherit;
	font-family: inherit;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

.approach-subtitle p:last-child {
	margin-bottom: 0;
}

.approach-cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--egci-primary);
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
	margin-top: 15px;
	transition: gap 0.3s ease;
}

.approach-cta:hover {
	gap: 12px;
	color: var(--egci-secondary);
	text-decoration: none;
}

.approach-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 90px;
	margin-top: 50px;
}

/* Responsive adjustments for approach columns */
@media (max-width: 1200px) {
	.approach-grid[style*="grid-template-columns: repeat(6"] {
		grid-template-columns: repeat(4, 1fr) !important;
	}
	.approach-grid[style*="grid-template-columns: repeat(5"] {
		grid-template-columns: repeat(4, 1fr) !important;
	}
}

@media (max-width: 992px) {
	.approach-grid[style*="grid-template-columns: repeat(4"] {
		grid-template-columns: repeat(3, 1fr) !important;
	}
	.approach-grid[style*="grid-template-columns: repeat(6"] {
		grid-template-columns: repeat(3, 1fr) !important;
	}
	.approach-grid[style*="grid-template-columns: repeat(5"] {
		grid-template-columns: repeat(3, 1fr) !important;
	}
}

@media (max-width: 768px) {
	.approach-grid[style*="grid-template-columns"] {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 480px) {
	.approach-grid[style*="grid-template-columns"] {
		grid-template-columns: 1fr !important;
	}
}

.approach-card {
	background: white;
	border-radius: 0.3125rem;
	padding: 40px 30px;
	text-align: center;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	transition: all 0.3s ease;
	cursor: pointer;
	position: relative;
	overflow: hidden;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	min-height: 615px;
	display: block;
	text-decoration: none;
	color: inherit;
}

.approach-card:hover {
	text-decoration: none;
	color: inherit;
}

.approach-card--has-bg-image {
	background-color: #333;
	color: white;
}

.approach-card__overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 1;
	transition: background 0.3s ease;
}

.approach-card:hover .approach-card__overlay {
	background: rgba(0, 0, 0, 0.3);
}

.approach-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.approach-card__content {
	position: absolute;
	bottom: 0;
	z-index: 2;
	width: 100%;
	padding: 30px;
	left: 0;
}

.approach-card__title {
	font-size: 1.3rem;
	font-weight: 700;
	color: var(--egci-text);
	margin-bottom: 15px;
	text-align: left;
}

.approach-card--has-bg-image .approach-card__title {
	color: white;
}

.approach-card__title {
	color: var(--egci-text);
}

.approach-card--has-bg-image .approach-card__title {
	color: white;
	font-family: "Kanit";
	font-size: 35px;
	text-transform: uppercase;
}

.approach-card__subtitle {
	font-size: 1rem;
	color: var(--egci-text-light);
	line-height: 1.6;
	margin-bottom: 15px;
	margin-top: 10px;
}

.approach-card--has-bg-image .approach-card__subtitle {
	color: rgba(255, 255, 255, 0.9);
}

.approach-card__subtitle p {
	margin-bottom: 0.5em;
}

.approach-card__subtitle p:last-child {
	margin-bottom: 0;
}

.approach-card__excerpt {
	font-size: 0.95rem;
	color: var(--egci-text-light);
	line-height: 1.6;
}

.approach-card--has-bg-image .approach-card__excerpt {
	color: rgba(255, 255, 255, 0.9);
}

/* Single Approach Page */
.single-approach__hero {
	margin-bottom: 0;
}

.single-approach__hero img {
	width: 100%;
	height: 400px;
	object-fit: cover;
	display: block;
}

.single-approach__header {
	padding: 60px 0;
	background: linear-gradient(135deg, #e8f4f8 0%, #f5f7fa 100%);
	text-align: center;
}

.single-approach__title {
	font-size: 3rem;
	font-weight: 700;
	color: var(--egci-text);
	margin: 0;
}

.single-approach__content {
	padding: 60px 0;
}

.single-approach__main {
	max-width: 900px;
	margin: 0 auto;
}

.single-approach__footer {
	padding: 40px 0;
	background: var(--egci-bg-light);
	border-top: 1px solid var(--egci-border);
}

.single-approach__navigation {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
}

.single-approach__nav-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 15px 25px;
	background: white;
	border: 2px solid var(--egci-border);
	border-radius: 8px;
	text-decoration: none;
	color: var(--egci-text);
	transition: all 0.3s ease;
	flex: 1;
	min-width: 200px;
}

.single-approach__nav-link:hover {
	border-color: var(--egci-primary);
	color: var(--egci-primary);
	text-decoration: none;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.single-approach__nav-link--prev {
	justify-content: flex-start;
}

.single-approach__nav-link--all {
	justify-content: center;
	flex: 0 0 auto;
}

.single-approach__nav-link--next {
	justify-content: flex-end;
	text-align: right;
}

.single-approach__nav-label {
	font-size: 0.875rem;
	color: var(--egci-text-light);
	display: block;
}

.single-approach__nav-title {
	font-weight: 600;
	display: block;
}

@media (max-width: 768px) {
	.approach-title {
		font-size: 2rem;
	}

	.approach-grid {
		grid-template-columns: 1fr;
		gap: 20px;
	}

	.single-approach__title {
		font-size: 2rem;
	}

	.single-approach__hero img {
		height: 250px;
	}

	.single-approach__navigation {
		flex-direction: column;
	}

	.single-approach__nav-link {
		width: 100%;
		min-width: auto;
	}

	.single-approach__nav-link--all {
		order: -1;
	}
}

/* ============================================
   New Approach Grid Layout (Large image + List)
   ============================================ */
.approach-grid-new {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 90px;
	align-items: center;
}

/* Image on the right, list on the left */
.approach-grid-new__list {
	order: 1;
	display: flex;
	flex-direction: column;
}

.approach-grid-new__image {
	order: 2;
	position: relative;
}

@media (max-width: 768px) {
	.approach-grid-new__image {
		display: none;
	}
}

.approach-grid-new__image img {
	height: auto;
	display: block;
	min-height: 500px;
	width: 100%;
	aspect-ratio: 1;
	border-radius: 50%;
	object-fit: cover;
	box-shadow: 0 20px 60px var(--egci-shadow);
}

.approach-grid-new__image-placeholder {
	width: 100%;
	min-height: 500px;
	background: var(--egci-bg-light);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--egci-text-light);
}

.approach-grid-new__image-placeholder i {
	font-size: 64px;
}

.approach-list {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.approach-list__item {
	margin: 0;
}

.approach-list__link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 15px;
	background: white;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
	text-decoration: none;
	color: var(--egci-text);
	transition: all 0.3s ease;
	border: 2px solid transparent;
}

.approach-list__link:hover {
	transform: translateX(-5px);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
	border-color: var(--egci-primary);
	text-decoration: none;
	color: var(--egci-text);
}

.approach-list__title {
	font-size: 1.2rem;
	font-weight: 600;
	color: var(--egci-text);
	flex: 1;
}

.approach-list__icon {
	font-size: 18px;
	color: var(--egci-primary);
	margin-left: 15px;
	transition: transform 0.3s ease;
}

.approach-list__link:hover .approach-list__icon {
	transform: translateX(-5px);
}

/* Responsive for approach-grid-new */
@media (max-width: 992px) {
	.approach-grid-new {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.approach-grid-new__image img {
		min-height: 400px;
	}

	.approach-grid-new__image-placeholder {
		min-height: 400px;
	}
}

@media (max-width: 768px) {
	.approach-grid-new {
		gap: 30px;
		margin-top: 30px;
	}

	.approach-grid-new__image img {
		min-height: 300px;
	}

	.approach-grid-new__image-placeholder {
		min-height: 300px;
	}

	.approach-list__link {
		padding: 20px 25px;
	}

	.approach-list__title {
		font-size: 1.1rem;
	}
}

/* ============================================
   Approach All Page (All Posts Page)
   ============================================ */
.approach-all-container {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.approach-item {
	padding: 80px 0;
	position: relative;
	scroll-margin-top: 100px;
}

.approach-item:nth-child(even) {
	background: var(--egci-bg-light);
}

.approach-item__inner {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 60px;
	align-items: center;
}


.approach-item__content {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.approach-item__title {
	font-size: 2.5rem;
	font-weight: 700;
	color: var(--egci-text);
	margin: 0;
	line-height: 1.2;
	text-transform: uppercase;
}

.approach-item__subtitle {
	font-size: 1.1rem;
	line-height: 1.8;
	color: var(--egci-text);
}

.approach-item__subtitle p {
	margin-bottom: 1em;
}

.approach-item__description {
	font-size: 1.1rem;
	line-height: 1.8;
	color: var(--egci-text);
}

.approach-item__description p {
	margin-bottom: 1em;
}

.approach-item__full-content {
	color: var(--egci-text-light);
}

.approach-item__full-content p {
	margin-bottom: 1.5em;
}

.approach-item__button {
	margin-top: 30px;
}

.approach-item__button .btn {
	display: inline-flex;
	align-items: center;
	gap: 10px;
}

.approach-item__button .btn i {
	transition: transform 0.3s ease;
}

.approach-item__button .btn:hover i {
	transform: translateX(5px);
}

.approach-item__image {
	position: relative;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.approach-item__image img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
	min-height: 400px;
}

.approach-item__image-placeholder {
	width: 100%;
	min-height: 400px;
	background: var(--egci-bg-light);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--egci-text-light);
}

.approach-item__image-placeholder i {
	font-size: 64px;
}

/* Highlight effect for auto-scroll */
.approach-item--highlighted {
	animation: approachHighlight 2s ease-in-out;
}

@keyframes approachHighlight {
	0% {
		background-color: transparent;
	}
	50% {
		background-color: rgba(251, 187, 1, 0.1);
	}
	100% {
		background-color: transparent;
	}
}

/* Responsive for approach-all */
@media (max-width: 992px) {
	.approach-item {
		padding: 60px 0;
	}

	.approach-item__inner {
		grid-template-columns: 1fr !important;
		gap: 40px;
	}

	.approach-item__title {
		font-size: 2rem;
	}

	.approach-item__image img {
		min-height: 300px;
	}

	.approach-item__image-placeholder {
		min-height: 300px;
	}
}

@media (max-width: 768px) {
	.approach-item {
		padding: 40px 0;
	}

	.approach-item__inner {
		gap: 30px;
	}

	.approach-item__title {
		font-size: 1.75rem;
	}

	.approach-item__description,
	.approach-item__full-content {
		font-size: 1rem;
	}
}

/* Style 2: approach archive as grid */
.approach-all-container--style-2 {
	display: grid;
	/* Control columns from CSS only */
	--approach-grid-columns: 3;
	grid-template-columns: repeat(var(--approach-grid-columns, 2), minmax(0, 1fr));
	gap: 30px;
	margin-bottom: 2rem;
}

.approach-all-container--style-2 .approach-item {
	padding: 0;
	background: #fff;
	overflow: hidden;
}

.approach-all-container--style-2 .approach-item__inner {
	display: block;
	height: 100%;
}

.approach-all-container--style-2 .approach-item__content {
	padding: 1.5rem;
    background-color: var(--egci-bg-light);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--egci-transition);
	height: 100%;
}

.approach-all-container--style-2 .approach-item__title {
	font-size: 1.1rem;
	text-transform: none;
}

.approach-all-container--style-2 .approach-item__image img,
.approach-all-container--style-2 .approach-item__image-placeholder {
	min-height: 240px;
}

@media (max-width: 992px) {
	.approach-all-container--style-2 {
		--approach-grid-columns: 1;
		gap: 20px;
	}
}

@media (max-width: 576px) {
	.approach-all-container--style-2 {
		gap: 16px;
	}

	.approach-all-container--style-2 .approach-item__content {
		padding: 1rem;
	}

	.approach-all-container--style-2 .approach-item__image img,
	.approach-all-container--style-2 .approach-item__image-placeholder {
		min-height: 180px;
	}
}
