/**
 * MonoFrame Theme - Main Stylesheet
 * 
 * This file contains custom styles for the MonoFrame WordPress theme supporting classic theme styles as a backward compatibility.
 * It includes styles for layout, typography, forms, galleries, and block patterns.
 * The main styling for blocks is in the theme.json file.
 * 
 * @package MonoFrame
 * @version 1.00
 */

/* ==========================================================================
   LAYOUT & SPACING
   ========================================================================== */

/* Front page layout adjustments */
.front-page {
	margin-top: 0;
	margin-bottom: 0;
}

/* Remove vertical margins for specific elements */
.empty-vertical-margin {
	margin-top: 0;
	margin-bottom: 0;
}

/* Footer spacing */
footer {
	margin-top: 0;
}

/* ==========================================================================
   MEDIA & FIGURES
   ========================================================================== */

/* Figure element constraints */
figure {
    max-width: 100%;
}

/* Image alignment classes */
.alignnone {
    margin-left: auto;
    margin-right: auto;
}

.alignleft {
    float: left;
    margin: 0 var(--wp--style--block-gap) var(--wp--style--block-gap) 0;
}

.aligncenter {
    display: block;
    margin: 0 auto;
}

.alignright {
    float: right;
    margin: 0 0 var(--wp--style--block-gap) var(--wp--style--block-gap);
}

/* Figure caption styling */
figcaption {
    font-size: var(--wp--preset--font-size--small);
    line-height: 1.4;
    color: var(--wp--preset--color--jet);
}

/* Pre-formatted text */
pre {
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ==========================================================================
   BUTTONS & INTERACTIVE ELEMENTS
   ========================================================================== */

/* Button hover effects */
.wp-block-button a:hover {
    color: var(--wp--preset--color--anti-flash-white);
	transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

/* Cover pattern button hover states */
.wp-block-cover .wp-block-button__link:hover {
    background-color: var(--wp--preset--color--cornsilk) !important;
    color: var(--wp--preset--color--jet) !important;
}

/* Secondary button hover in cover */
.wp-block-cover .wp-block-button__link.has-secondary-background-color:hover {
    background-color: var(--wp--preset--color--cornsilk) !important;
    color: var(--wp--preset--color--jet) !important;
}

/* Outline button hover in cover */
.wp-block-cover .wp-block-button.is-style-outline .wp-block-button__link:hover {
    background-color: var(--wp--preset--color--cornsilk) !important;
    color: var(--wp--preset--color--jet) !important;
    border-color: var(--wp--preset--color--cornsilk) !important;
}

/* ==========================================================================
   LINKS & NAVIGATION
   ========================================================================== */

/* Header link states */
header a:visited,
header a:hover {
    color: var(--wp--preset--color--primary);
}

/* General link hover state */
a:hover {
    color: var(--wp--preset--color--chinese-blue);
}

/* Visited link color */
a:visited {
    color: #2F4B93;
}

/* Footer link styling */
footer a,
footer h2.wp-block-site-title a {
    color: var(--wp--preset--color--anti-flash-white);
}

footer a:hover {
    color: var(--wp--preset--color--ripe-mango);
}

footer a:visited {
    color: #A3A3A3;
}

/* * Related articles title */
.monoframe-related-article-title {
    font-size: var(--wp--preset--font-size--large);
    margin-top: 0;
    margin-bottom: 0;
}

/* ==========================================================================
   TABLES
   ========================================================================== */

/* Table container */
.wp-block-table {
	margin: var(--wp--preset--spacing--medium) 0;
	border-collapse: collapse;
	width: 100%;
}

/* Table element styling */
.wp-block-table table,
table {
	border: 1px solid var(--wp--preset--color--jet);
	border-radius: 4px;
	overflow: hidden;
}

/* Table headers */
.wp-block-table th,
th {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	padding: var(--wp--preset--spacing--small);
	font-weight: 600;
	text-align: left;
}

/* Table footer */
.wp-block-table tfoot,
tfoot {
    background: var(--wp--preset--color--chinese-blue);
    color: var(--wp--preset--color--white);
}

/* Table cells */
.wp-block-table td,
td {
	padding: var(--wp--preset--spacing--small);
	border-bottom: 1px solid var(--wp--preset--color--anti-flash-white);
}

/* Alternating row colors */
.wp-block-table tr:nth-child(even),
tr:nth-child(even) {
	background: var(--wp--preset--color--anti-flash-white);
}

/* Row hover effect */
.wp-block-table tr:hover,
tr:hover {
	background: var(--wp--preset--color--white);
}

/* ==========================================================================
   DEFINITION LISTS
   ========================================================================== */

/* Definition list container */
dl {
	margin: var(--wp--preset--spacing--medium) 0;
}

/* Definition terms */
dt {
	font-weight: 600;
	color: var(--wp--preset--color--primary);
	margin-top: var(--wp--preset--spacing--small);
}

/* Definition descriptions */
dd {
	margin-left: var(--wp--preset--spacing--medium);
	margin-bottom: var(--wp--preset--spacing--small);
	padding-left: var(--wp--preset--spacing--small);
	border-left: 2px solid var(--wp--preset--color--anti-flash-white);
}

/* ==========================================================================
   ADDRESS & CODE ELEMENTS
   ========================================================================== */

/* Address styling */
address {
	font-style: normal;
	margin: var(--wp--preset--spacing--medium) 0;
	padding: var(--wp--preset--spacing--small);
	background: var(--wp--preset--color--anti-flash-white);
	border-left: 3px solid var(--wp--preset--color--primary);
	border-radius: 0 4px 4px 0;
}

/* Inline code styling */
code {
	background: var(--wp--preset--color--anti-flash-white);
	color: var(--wp--preset--color--jet);
	padding: 2px 6px;
	border-radius: 3px;
	font-family: 'Courier New', monospace;
	font-size: 0.875em;
}

/* ==========================================================================
   CLASSIC GALLERY STYLING
   ========================================================================== */

/* Gallery container */
.gallery {
	display: grid;
	gap: var(--wp--preset--spacing--small);
	margin: var(--wp--preset--spacing--medium) 0;
}

/* Gallery column configurations */
.gallery-columns-1 {
	grid-template-columns: 1fr;
}

.gallery-columns-2 {
	grid-template-columns: repeat(2, 1fr);
}

.gallery-columns-3 {
	grid-template-columns: repeat(3, 1fr);
}

.gallery-columns-4 {
	grid-template-columns: repeat(4, 1fr);
}

.gallery-columns-5 {
	grid-template-columns: repeat(5, 1fr);
}

.gallery-columns-6 {
	grid-template-columns: repeat(6, 1fr);
}

.gallery-columns-7 {
	grid-template-columns: repeat(7, 1fr);
}

.gallery-columns-8 {
	grid-template-columns: repeat(8, 1fr);
}

.gallery-columns-9 {
	grid-template-columns: repeat(9, 1fr);
}

/* Gallery items */
.gallery-item {
	margin: 0;
	position: relative;
}

/* Gallery icon container */
.gallery-icon {
	position: relative;
	overflow: hidden;
	border-radius: 4px;
	transition: transform 0.3s ease;
}

.gallery-icon:hover {
	transform: scale(1.05);
}

/* Gallery images */
.gallery-icon img {
	width: 100%;
	height: auto;
	display: block;
	border-radius: 4px;
}

.gallery-icon a {
	display: block;
	text-decoration: none;
}

/* Gallery captions */
.gallery-caption {
	background: rgba(0, 0, 0, 0.8);
	color: var(--wp--preset--color--white);
	padding: var(--wp--preset--spacing--small);
	font-size: 0.875rem;
	text-align: center;
	margin-top: 4px;
	border-radius: 0 0 4px 4px;
}

/* ==========================================================================
   GALLERY RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* Tablet breakpoint */
@media (max-width: 768px) {
	.gallery-columns-4,
	.gallery-columns-5,
	.gallery-columns-6,
	.gallery-columns-7,
	.gallery-columns-8,
	.gallery-columns-9 {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Mobile breakpoint */
@media (max-width: 480px) {
	.gallery-columns-2,
	.gallery-columns-3,
	.gallery-columns-4,
	.gallery-columns-5,
	.gallery-columns-6,
	.gallery-columns-7,
	.gallery-columns-8,
	.gallery-columns-9 {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* Small mobile breakpoint */
@media (max-width: 320px) {
	.gallery-columns-2,
	.gallery-columns-3,
	.gallery-columns-4,
	.gallery-columns-5,
	.gallery-columns-6,
	.gallery-columns-7,
	.gallery-columns-8,
	.gallery-columns-9 {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   BLOCKQUOTES
   ========================================================================== */

/* Blockquote styling */
blockquote {
	border-left: 4px solid var(--wp--preset--color--primary);
	padding-left: var(--wp--preset--spacing--medium);
	margin: var(--wp--preset--spacing--medium) 0;
	font-style: italic;
	background: var(--wp--preset--color--anti-flash-white);
	padding: var(--wp--preset--spacing--medium);
	border-radius: 0 4px 4px 0;
}

/* ==========================================================================
   FORMS
   ========================================================================== */

/* Form container */
form {
	margin: var(--wp--preset--spacing--medium) 0;
}

/* Form groups */
.form-group {
	margin-bottom: var(--wp--preset--spacing--medium);
}

/* Form labels */
label {
	display: block;
	margin-bottom: var(--wp--preset--spacing--small);
	font-weight: 600;
	color: var(--wp--preset--color--jet);
}

/* Form field containers */
.form-group,
fieldset {
	margin-bottom: var(--wp--preset--spacing--medium);
}

/* Input fields - all types */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="datetime-local"],
input[type="month"],
input[type="week"],
textarea,
select {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	padding: var(--wp--preset--spacing--small);
	border: 1px solid var(--wp--preset--color--jet);
	border-radius: 4px;
	font-size: 1rem;
	font-family: inherit;
	background: var(--wp--preset--color--white);
	transition: border-color 0.3s ease;
}

/* Input focus states */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
	outline: none;
	border-color: var(--wp--preset--color--primary);
	box-shadow: 0 0 0 2px rgba(49, 80, 152, 0.2);
}

/* Textarea specific styling */
textarea {
	min-height: 100px;
	resize: vertical;
}

/* Select dropdown styling */
select {
	appearance: none;
	background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
	background-position: right 8px center;
	background-repeat: no-repeat;
	background-size: 16px;
	padding-right: 40px;
}

/* Checkboxes and radio buttons */
input[type="checkbox"],
input[type="radio"] {
	margin-right: var(--wp--preset--spacing--small);
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

/* Button base styles */
button,
input[type="submit"],
input[type="button"],
input[type="reset"] {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	padding: var(--wp--preset--spacing--small) var(--wp--preset--spacing--medium);
	border: none;
	border-radius: 4px;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

/* Button hover states */
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover,
input[type="reset"]:hover {
	background: var(--wp--preset--color--yankees-blue);
	color: var(--wp--preset--color--white);
}

/* Submit button specific hover */
input[type="submit"]:hover {
	background: var(--wp--preset--color--chinese-blue);
	color: var(--wp--preset--color--white);
}

/* Outline button style */
.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	border: 2px solid var(--wp--preset--color--primary);
	color: var(--wp--preset--color--primary);
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
}

/* Button focus states */
button:focus,
input[type="submit"]:focus,
input[type="button"]:focus,
input[type="reset"]:focus {
	outline: none;
	box-shadow: 0 0 0 2px rgba(49, 80, 152, 0.2);
}

/* Secondary button styling */
button.secondary,
input[type="button"] {
	background: var(--wp--preset--color--secondary);
	color: var(--wp--preset--color--jet);
}

button.secondary:hover,
input[type="button"]:hover {
	background: var(--wp--preset--color--metallic-sunburst);
}

/* ==========================================================================
   FORM VALIDATION & LAYOUT
   ========================================================================== */

/* Form validation styling */
input:invalid,
textarea:invalid,
select:invalid {
	border-color: #dc2626;
}

/* Form row layout */
.form-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--wp--preset--spacing--medium);
}

/* Form responsive layout */
@media (max-width: 768px) {
	.form-row {
		grid-template-columns: 1fr;
	}
}

/* ==========================================================================
   BLOCK PATTERNS
   ========================================================================== */

/* Services and testimonials pattern spacing */
.services,
.testimonials {
    padding-bottom: var(--wp--preset--spacing--large);
}

/* Services pattern icon sizing */
.services-icon img {
    width: 64px !important;
    height: 64px !important;
    margin: 0 auto var(--wp--preset--spacing--small);
    display: block;
}

/* ==========================================================================
   PATTERN RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* Tablet breakpoint for services icons */
@media (max-width: 768px) {
    .services-icon img {
        width: 40px !important;
        height: 40px !important;
    }
}

/* Mobile breakpoint for services icons */
@media (max-width: 480px) {
    .services-icon img {
        width: 64px !important;
        height: 64px !important;
    }
}