/**
 * Block-specific Styles
 *
 * @package OPA_Bahai_India
 */

/* Cover Block */
.wp-block-cover {
	position: relative;
}

.wp-block-cover .wp-block-cover__inner-container {
	position: relative;
	z-index: 1;
}

/* Query Block */
.wp-block-query .wp-block-post-template {
	gap: var(--wp--preset--spacing--50);
}

/* Post Featured Image */
.wp-block-post-featured-image img {
	width: 100%;
	height: auto;
	object-fit: cover;
}

/* Post Title */
.wp-block-post-title a {
	text-decoration: none;
	transition: color 0.3s ease;
}

.wp-block-post-title a:hover {
	color: var(--wp--preset--color--secondary);
}

/* Post Excerpt */
.wp-block-post-excerpt__excerpt {
	margin-bottom: 0;
}

.wp-block-post-excerpt__more-text {
	display: none;
}

/* Post Terms */
.wp-block-post-terms a {
	text-decoration: none;
}

.wp-block-post-terms a:hover {
	text-decoration: underline;
}

/* Navigation Block */
.wp-block-navigation__responsive-container-open,
.wp-block-navigation__responsive-container-close {
	padding: 0.5rem;
}

.wp-block-navigation__responsive-dialog {
	padding: var(--wp--preset--spacing--50);
}

.wp-block-navigation__responsive-container.is-menu-open {
	background: var(--wp--preset--color--white);
}

.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item a {
	color: var(--wp--preset--color--dark-gray);
	padding: 0.75rem 0;
}

/* Search Block */
.wp-block-search__button {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	border: none;
	cursor: pointer;
	transition: background 0.3s ease;
}

.wp-block-search__button:hover {
	background: var(--wp--preset--color--primary-light);
}

.wp-block-search__input {
	border: 1px solid var(--wp--preset--color--gray);
	padding: 0.75rem 1rem;
}

.wp-block-search__input:focus {
	border-color: var(--wp--preset--color--primary);
	outline: none;
	box-shadow: 0 0 0 2px rgba(26, 54, 93, 0.2);
}

/* Quote Block */
.wp-block-quote {
	font-style: italic;
}

.wp-block-quote cite {
	font-style: normal;
	font-size: 0.875rem;
}

/* Pullquote Block */
.wp-block-pullquote {
	text-align: center;
}

.wp-block-pullquote blockquote {
	margin: 0;
}

/* Table Block */
.wp-block-table {
	overflow-x: auto;
}

.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}

.wp-block-table th,
.wp-block-table td {
	border: 1px solid var(--wp--preset--color--gray);
	padding: 0.75rem;
}

.wp-block-table th {
	background: var(--wp--preset--color--light-gray);
	font-weight: 600;
}

.wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
	background: var(--wp--preset--color--light-gray);
}

/* Gallery Block */
.wp-block-gallery {
	gap: var(--wp--preset--spacing--40);
}

.wp-block-gallery .wp-block-image {
	margin: 0;
}

.wp-block-gallery .wp-block-image img {
	border-radius: 8px;
}

/* Image Block */
.wp-block-image figcaption {
	text-align: center;
	margin-top: 0.5rem;
}

/* Separator Block */
.wp-block-separator {
	border: none;
	border-top: 1px solid var(--wp--preset--color--gray);
	opacity: 1;
}

.wp-block-separator.is-style-wide {
	max-width: 100%;
}

.wp-block-separator.is-style-dots {
	border: none;
	background: none !important;
}

.wp-block-separator.is-style-dots::before {
	content: '···';
	color: var(--wp--preset--color--medium-gray);
	font-size: 1.5rem;
	letter-spacing: 1rem;
}

/* Columns Block */
.wp-block-columns {
	gap: var(--wp--preset--spacing--50);
}

@media (max-width: 781px) {
	.wp-block-columns:not(.is-not-stacked-on-mobile) {
		flex-direction: column;
	}
}

/* Button Block */
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	border: 2px solid currentColor;
}

/* Social Links Block */
.wp-block-social-links {
	gap: 0.75rem;
}

.wp-block-social-link {
	margin: 0 !important;
}

.wp-block-social-link a {
	transition: transform 0.3s ease;
}

.wp-block-social-link a:hover {
	transform: scale(1.1);
}

/* Site Title Block */
.wp-block-site-title a {
	text-decoration: none;
}

/* Categories Block */
.wp-block-categories-list {
	list-style: none;
	padding-left: 0;
}

.wp-block-categories-list li {
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--wp--preset--color--gray);
}

.wp-block-categories-list a {
	text-decoration: none;
}

/* Archives Block */
.wp-block-archives-list {
	list-style: none;
	padding-left: 0;
}

.wp-block-archives-list li {
	padding: 0.5rem 0;
	border-bottom: 1px solid var(--wp--preset--color--gray);
}

.wp-block-archives-list a {
	text-decoration: none;
}

/* Tag Cloud Block */
.wp-block-tag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.wp-block-tag-cloud a {
	display: inline-block;
	padding: 0.25rem 0.75rem;
	background: var(--wp--preset--color--light-gray);
	border-radius: 50px;
	text-decoration: none;
	font-size: 0.875rem;
	transition: all 0.3s ease;
}

.wp-block-tag-cloud a:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
}

/* Latest Posts Block */
.wp-block-latest-posts {
	list-style: none;
	padding-left: 0;
}

.wp-block-latest-posts li {
	padding: 0.75rem 0;
	border-bottom: 1px solid var(--wp--preset--color--gray);
}

.wp-block-latest-posts__post-title {
	text-decoration: none;
	font-weight: 600;
}

.wp-block-latest-posts__post-date {
	display: block;
	font-size: 0.75rem;
	color: var(--wp--preset--color--medium-gray);
	margin-top: 0.25rem;
}

/* Comments Block */
.wp-block-comments {
	margin-top: var(--wp--preset--spacing--60);
}

.wp-block-comment-template {
	list-style: none;
	padding-left: 0;
}

.wp-block-comment-template > li {
	padding: var(--wp--preset--spacing--40) 0;
	border-bottom: 1px solid var(--wp--preset--color--gray);
}

/* Comments Form */
.comment-form {
	margin-top: var(--wp--preset--spacing--50);
}

.comment-form label {
	display: block;
	margin-bottom: 0.5rem;
	font-weight: 600;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
	width: 100%;
	padding: 0.75rem;
	border: 1px solid var(--wp--preset--color--gray);
	border-radius: 8px;
	margin-bottom: 1rem;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
	border-color: var(--wp--preset--color--primary);
	outline: none;
	box-shadow: 0 0 0 2px rgba(26, 54, 93, 0.2);
}

.comment-form input[type="submit"] {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	padding: 0.75rem 1.5rem;
	border: none;
	border-radius: 8px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.3s ease;
}

.comment-form input[type="submit"]:hover {
	background: var(--wp--preset--color--primary-light);
}

/* File Block */
.wp-block-file {
	display: flex;
	align-items: center;
	gap: 1rem;
	padding: 1rem;
	background: var(--wp--preset--color--light-gray);
	border-radius: 8px;
}

.wp-block-file a:first-child {
	font-weight: 600;
	text-decoration: none;
}

.wp-block-file .wp-block-file__button {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	padding: 0.5rem 1rem;
	border-radius: 4px;
	text-decoration: none;
	font-size: 0.875rem;
}

/* Calendar Block */
.wp-block-calendar table {
	width: 100%;
	text-align: center;
}

.wp-block-calendar th,
.wp-block-calendar td {
	padding: 0.5rem;
}

.wp-block-calendar td a {
	font-weight: 600;
	color: var(--wp--preset--color--primary);
}

/* Video Block */
.wp-block-video video {
	width: 100%;
	border-radius: 8px;
}

/* Audio Block */
.wp-block-audio {
	margin: var(--wp--preset--spacing--40) 0;
}

.wp-block-audio audio {
	width: 100%;
}

/* Embed Block */
.wp-block-embed {
	margin: var(--wp--preset--spacing--50) 0;
}

.wp-block-embed iframe {
	max-width: 100%;
}

/* Details Block */
.wp-block-details {
	border: 1px solid var(--wp--preset--color--gray);
	border-radius: 8px;
	padding: 1rem;
}

.wp-block-details summary {
	cursor: pointer;
	font-weight: 600;
}

.wp-block-details[open] summary {
	margin-bottom: 1rem;
}

/* Footnotes Block */
.wp-block-footnotes {
	font-size: 0.875rem;
	border-top: 1px solid var(--wp--preset--color--gray);
	padding-top: var(--wp--preset--spacing--40);
	margin-top: var(--wp--preset--spacing--60);
}
