/*
 * Frontend Block Styles for Doctors Profile Theme
 * These styles apply to blocks on the frontend of the website
 */

/* === Core Block Enhancements === */

/* Wide and Full Width Support */
.wp-block[data-align="wide"] {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}

.wp-block[data-align="full"] {
	max-width: none;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

/* === Custom Block Styles Implementation === */

/* Medical CTA Button */
.wp-block-button.is-style-medical-cta {
	margin: 20px 0;
}

.wp-block-button.is-style-medical-cta .wp-block-button__link {
	background: linear-gradient(135deg, #2c5aa0 0%, #28a745 100%);
	border: none;
	border-radius: 30px;
	padding: 15px 30px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	transition: all 0.3s ease;
	box-shadow: 0 4px 15px rgba(44, 90, 160, 0.3);
	text-decoration: none;
	display: inline-block;
}

.wp-block-button.is-style-medical-cta .wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(44, 90, 160, 0.4);
	text-decoration: none;
}

.wp-block-button.is-style-medical-cta .wp-block-button__link:focus {
	outline: 3px solid #fd7e14;
	outline-offset: 2px;
}

/* Medical Card Group */
.wp-block-group.is-style-medical-card {
	background: #fff;
	border-radius: 15px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	padding: 30px;
	border: 1px solid #e9ecef;
	transition: all 0.3s ease;
	margin: 20px 0;
}

.wp-block-group.is-style-medical-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

/* Medical Heading */
.wp-block-heading.is-style-medical-heading {
	position: relative;
	padding-bottom: 15px;
	margin-bottom: 25px;
	font-family: 'Poppins', sans-serif;
	font-weight: 700;
}

.wp-block-heading.is-style-medical-heading::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 60px;
	height: 3px;
	background: linear-gradient(135deg, #2c5aa0 0%, #28a745 100%);
	border-radius: 2px;
}

.wp-block-heading.is-style-medical-heading.has-text-align-center::after {
	left: 50%;
	transform: translateX(-50%);
}

.wp-block-heading.is-style-medical-heading.has-text-align-right::after {
	left: auto;
	right: 0;
}

/* Testimonial Quote */
.wp-block-quote.is-style-testimonial-style {
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	border: none;
	border-left: 5px solid #28a745;
	border-radius: 10px;
	padding: 30px;
	position: relative;
	font-style: italic;
	margin: 30px 0;
}

.wp-block-quote.is-style-testimonial-style::before {
	content: '\201C';
	font-size: 60px;
	color: #28a745;
	position: absolute;
	top: 10px;
	left: 20px;
	opacity: 0.3;
	font-family: serif;
}

.wp-block-quote.is-style-testimonial-style p {
	margin-left: 40px;
	font-size: 18px;
	line-height: 1.6;
}

.wp-block-quote.is-style-testimonial-style cite {
	font-weight: 600;
	color: #2c5aa0;
	font-style: normal;
	display: block;
	margin-top: 15px;
	text-align: right;
}

/* === Medical Theme Patterns === */

/* Medical Services Section */
.medical-services-section {
	background: #f8f9fa;
	padding: 60px 0;
}

.medical-services-section .wp-block-column {
	text-align: center;
	transition: all 0.3s ease;
	padding: 20px;
}

.medical-services-section .wp-block-column:hover {
	transform: translateY(-5px);
}

.medical-services-section .fas,
.medical-services-section .fa {
	color: #28a745;
	margin-bottom: 20px;
	transition: all 0.3s ease;
}

.medical-services-section .wp-block-column:hover .fas,
.medical-services-section .wp-block-column:hover .fa {
	transform: scale(1.1);
	color: #2c5aa0;
}

/* Doctor Profile Card */
.doctor-profile-card {
	background: #fff;
	border-radius: 15px;
	padding: 30px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
	margin: 30px 0;
	overflow: hidden;
}

.doctor-profile-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.doctor-profile-card .wp-block-image {
	margin-bottom: 0;
}

.doctor-profile-card .wp-block-image img {
	border-radius: 50%;
	transition: all 0.3s ease;
	width: 150px;
	height: 150px;
	object-fit: cover;
}

.doctor-profile-card:hover .wp-block-image img {
	transform: scale(1.05);
}

/* Testimonial Card */
.testimonial-card {
	position: relative;
	overflow: hidden;
	border-radius: 15px;
	padding: 40px;
	margin: 30px 0;
}

.testimonial-card::before {
	content: '';
	position: absolute;
	top: -50%;
	right: -50%;
	width: 100%;
	height: 100%;
	background: rgba(255, 255, 255, 0.1);
	transform: rotate(45deg);
	transition: all 0.5s ease;
	pointer-events: none;
}

.testimonial-card:hover::before {
	right: 100%;
}

/* FAQ Container */
.faq-container .wp-block-details {
	margin-bottom: 15px;
	border: 1px solid #e9ecef;
	border-radius: 10px;
	overflow: hidden;
	transition: all 0.3s ease;
}

.faq-container .wp-block-details:hover {
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.faq-container .wp-block-details summary {
	padding: 20px;
	background: #fff;
	cursor: pointer;
	font-weight: 600;
	color: #2c5aa0;
	border: none;
	outline: none;
}

.faq-container .wp-block-details[open] summary {
	background: #f8f9fa;
	border-bottom: 1px solid #e9ecef;
}

.faq-container .wp-block-details summary:focus {
	outline: 2px solid #2c5aa0;
	outline-offset: -2px;
}

/* === Color Utilities === */
.has-primary-blue-color { color: #2c5aa0 !important; }
.has-primary-blue-background-color { background-color: #2c5aa0 !important; }
.has-medical-green-color { color: #28a745 !important; }
.has-medical-green-background-color { background-color: #28a745 !important; }
.has-trust-blue-color { color: #007cba !important; }
.has-trust-blue-background-color { background-color: #007cba !important; }
.has-soft-gray-color { color: #f8f9fa !important; }
.has-soft-gray-background-color { background-color: #f8f9fa !important; }
.has-dark-text-color { color: #212529 !important; }
.has-dark-text-background-color { background-color: #212529 !important; }
.has-accent-orange-color { color: #fd7e14 !important; }
.has-accent-orange-background-color { background-color: #fd7e14 !important; }

/* === Gradient Utilities === */
.has-medical-gradient-background {
	background: linear-gradient(135deg, #2c5aa0 0%, #28a745 100%) !important;
}

.has-trust-gradient-background {
	background: linear-gradient(135deg, #007cba 0%, #2c5aa0 100%) !important;
}

/* === Typography === */
.has-small-font-size { font-size: 14px !important; }
.has-normal-font-size { font-size: 16px !important; }
.has-medium-font-size { font-size: 20px !important; }
.has-large-font-size { font-size: 28px !important; }
.has-extra-large-font-size { font-size: 36px !important; }

/* === Responsive Design === */
@media (max-width: 768px) {
	.wp-block-group.is-style-medical-card {
		padding: 20px;
		margin: 15px 0;
	}
	
	.wp-block-button.is-style-medical-cta .wp-block-button__link {
		padding: 12px 24px;
		font-size: 14px;
	}
	
	.medical-services-section {
		padding: 40px 0;
	}
	
	.medical-services-section .wp-block-columns {
		flex-direction: column;
	}
	
	.doctor-profile-card {
		padding: 20px;
	}
	
	.doctor-profile-card .wp-block-columns {
		flex-direction: column;
		text-align: center;
	}
	
	.doctor-profile-card .wp-block-column:first-child {
		margin-bottom: 20px;
	}
	
	.testimonial-card {
		padding: 25px;
	}
	
	.wp-block-quote.is-style-testimonial-style::before {
		font-size: 40px;
		top: 5px;
		left: 15px;
	}
	
	.wp-block-quote.is-style-testimonial-style p {
		margin-left: 20px;
		font-size: 16px;
	}
	
	.has-extra-large-font-size { font-size: 28px !important; }
	.has-large-font-size { font-size: 24px !important; }
}

@media (max-width: 480px) {
	.wp-block[data-align="full"] {
		margin-left: calc(50% - 50vw);
		margin-right: calc(50% - 50vw);
	}
	
	.medical-services-section {
		padding: 30px 0;
	}
	
	.doctor-profile-card,
	.testimonial-card {
		margin: 20px 0;
	}
}

/* === Print Styles === */
@media print {
	.wp-block-button.is-style-medical-cta .wp-block-button__link {
		background: #2c5aa0 !important;
		color: white !important;
		box-shadow: none !important;
	}
	
	.wp-block-group.is-style-medical-card {
		border: 2px solid #e9ecef !important;
		box-shadow: none !important;
		break-inside: avoid;
	}
	
	.medical-services-section .wp-block-column:hover,
	.doctor-profile-card:hover,
	.testimonial-card:hover {
		transform: none !important;
	}
}

/* === Animation Support === */
@media (prefers-reduced-motion: no-preference) {
	.fade-in-up {
		animation: fadeInUp 0.6s ease-out;
	}
	
	@keyframes fadeInUp {
		from {
			opacity: 0;
			transform: translateY(30px);
		}
		to {
			opacity: 1;
			transform: translateY(0);
		}
	}
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-group.is-style-medical-card,
	.doctor-profile-card,
	.testimonial-card,
	.medical-services-section .wp-block-column,
	.wp-block-button.is-style-medical-cta .wp-block-button__link {
		transition: none !important;
	}
}

/* === High Contrast Support === */
@media (prefers-contrast: high) {
	.wp-block-group.is-style-medical-card {
		border: 2px solid #000;
	}
	
	.wp-block-button.is-style-medical-cta .wp-block-button__link {
		border: 2px solid #000;
	}
}
