/*
Theme Name:     MYSM Child
Theme URI:      https://mysm.com/
Description:    Child theme de Astra para MYSM - Sitio empresarial minimalista
Author:         MYSM
Author URI:     https://mysm.com/
Template:       astra
Version:        1.0.0
License:        GNU General Public License v2 or later
License URI:    http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:    mysm-child
Tags:           accessibility-ready, block-styles, custom-colors, custom-logo, custom-menu, editor-style, featured-images, footer-widgets, rtl-language-support, threaded-comments, translation-ready
*/

/* === Variables CSS === */
:root {
	--mysm-primary: #333333;
	--mysm-secondary: #666666;
	--mysm-accent: #000000;
	--mysm-bg: #ffffff;
	--mysm-light-bg: #f8f9fa;
	--mysm-border: #e5e5e5;
	--mysm-text: #333333;
	--mysm-text-light: #666666;
	--mysm-spacing: 20px;
	--mysm-radius: 8px;
}

/* === Reset y Base === */
body {
	color: var(--mysm-text);
	line-height: 1.6;
}

a {
	color: var(--mysm-accent);
	transition: color 0.3s ease;
}

a:hover {
	color: var(--mysm-secondary);
}

/* === Encabezado === */
.site-header {
	background: var(--mysm-bg);
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.main-header-menu .current-menu-item > a {
	color: var(--mysm-accent);
	font-weight: 600;
}

/* === Botones === */
.button,
button,
input[type="button"],
input[type="reset"],
input[type="submit"],
.wp-block-button__link {
	border-radius: var(--mysm-radius);
	padding: 12px 24px;
	font-weight: 500;
	transition: all 0.3s ease;
}

.button:hover,
button:hover,
input[type="button"]:hover,
input[type="reset"]:hover,
input[type="submit"]:hover,
.wp-block-button__link:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* === Contenedor === */
.site-content {
	padding: 40px 0;
}

.container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 20px;
}

/* === Tarjetas === */
.entry-content .wp-block-group,
.widget {
	background: var(--mysm-bg);
	border: 1px solid var(--mysm-border);
	border-radius: var(--mysm-radius);
	padding: var(--mysm-spacing);
}

/* === Footer === */
.site-footer {
	background: var(--mysm-light-bg);
	border-top: 1px solid var(--mysm-border);
	padding: 40px 0;
}

/* === Widgets === */
.widget-title {
	font-size: 1.25rem;
	font-weight: 600;
	margin-bottom: 15px;
	color: var(--mysm-primary);
}

/* === Blog === */
.entry-title {
	font-weight: 600;
	line-height: 1.3;
}

.entry-meta {
	color: var(--mysm-text-light);
	font-size: 0.9rem;
}

/* === Sección de Videos Home === */
.home-video-section {
	padding: 40px 20px;
	background: var(--mysm-light-bg);
	margin-bottom: 40px;
}

.home-video-section .widget {
	background: transparent;
	border: none;
	padding: 0;
}

.video-section-title {
	text-align: center;
	margin-bottom: 30px;
	font-size: 1.75rem;
	color: var(--mysm-primary);
}

/* === Contenedor Video === */
.mysm-video-container {
	margin-bottom: 30px;
}

.mysm-video-title {
	margin-bottom: 15px;
	font-size: 1.1rem;
	color: var(--mysm-primary);
}

.mysm-video-wrapper {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	border-radius: var(--mysm-radius);
	background: #000;
}

.mysm-video-wrapper iframe,
.mysm-video-wrapper video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
}

/* === Galería de Videos === */
.mysm-video-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 30px;
}

.mysm-video-item {
	background: var(--mysm-bg);
	border-radius: var(--mysm-radius);
	overflow: hidden;
}

/* === Mobile Videos === */
@media (max-width: 768px) {
	.home-video-section {
		padding: 20px 15px;
	}

	.mysm-video-gallery {
		grid-template-columns: 1fr;
	}
}

/* === CPT Videos === */
.home-cpt-videos-section {
	padding: 50px 20px;
	background: var(--mysm-light-bg);
	margin: 40px 0;
}

.home-cpt-videos-section .section-title {
	text-align: center;
	font-size: 2rem;
	margin-bottom: 40px;
	color: var(--mysm-primary);
}

.mysm-video-card {
	background: var(--mysm-bg);
	border-radius: var(--mysm-radius);
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mysm-video-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.mysm-video-thumbnail a {
	display: block;
}

.mysm-video-thumbnail img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	transition: opacity 0.3s ease;
}

.mysm-video-card:hover .mysm-video-thumbnail img {
	opacity: 0.9;
}

.mysm-video-card .mysm-video-title {
	padding: 15px;
	font-size: 1.1rem;
	margin: 0;
}

.mysm-video-card .mysm-video-title a {
	color: var(--mysm-primary);
	text-decoration: none;
}

.mysm-video-card:hover .mysm-video-title a {
	color: var(--mysm-accent);
}

/* === CPT Video Archive === */
.post-type-archive-mysm_video .mysm-videos-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 30px;
	margin-top: 40px;
}

/* === CPT Video Single === */
.single-mysm_video .entry-title {
	font-size: 2rem;
	margin-bottom: 20px;
}

.single-mysm_video .mysm-video-container {
	margin-bottom: 30px;
}

/* === Responsive Videos CPT === */
@media (max-width: 768px) {
	.home-cpt-videos-section {
		padding: 30px 15px;
	}

	.home-cpt-videos-section .mysm-videos-grid {
		grid-template-columns: 1fr;
	}

	.mysm-video-thumbnail img {
		height: 180px;
	}
}

/* === Admin - Metabox de Video === */
.mysm-video-upload-wrapper {
	padding: 15px;
	background: #f8f9fa;
	border: 1px solid #ddd;
	border-radius: 4px;
	margin-top: 10px;
}

.mysm-video-upload-wrapper video {
	border-radius: 4px;
	margin-top: 10px;
}

/* === Video Local === */
.mysm-local-video .mysm-video-wrapper video {
	width: 100%;
}

/* === Custom Video Player === */
.mysm-custom-player {
	position: relative;
	background: #000;
	border-radius: var(--mysm-radius);
	overflow: hidden;
}

.mysm-custom-player video {
	width: 100%;
	display: block;
	cursor: pointer;
}

.mysm-custom-player:hover .mysm-video-controls {
	opacity: 1;
}

.mysm-video-controls {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(transparent, rgba(0,0,0,0.8));
	padding: 15px;
	opacity: 0;
	transition: opacity 0.3s ease;
}

/* Progress Bar */
.mysm-progress-bar {
	position: relative;
	height: 6px;
	background: rgba(255,255,255,0.3);
	border-radius: 3px;
	cursor: pointer;
	margin-bottom: 10px;
}

.mysm-progress-filled {
	height: 100%;
	background: var(--mysm-accent);
	border-radius: 3px;
	width: 0%;
	transition: width 0.1s;
}

.mysm-progress-handle {
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
	width: 14px;
	height: 14px;
	background: var(--mysm-accent);
	border-radius: 50%;
	opacity: 0;
	transition: opacity 0.2s;
}

.mysm-progress-bar:hover .mysm-progress-handle {
	opacity: 1;
}

/* Control Buttons */
.mysm-controls-buttons {
	display: flex;
	align-items: center;
	gap: 15px;
}

.mysm-controls-buttons button {
	background: none;
	border: none;
	color: #fff;
	cursor: pointer;
	font-size: 16px;
	padding: 5px;
	transition: transform 0.2s;
}

.mysm-controls-buttons button:hover {
	transform: scale(1.1);
}

/* Time Display */
.mysm-time-display {
	color: #fff;
	font-size: 13px;
	font-family: monospace;
}

/* Volume Control */
.mysm-volume-control {
	display: flex;
	align-items: center;
	gap: 5px;
}

.mysm-volume-bar {
	width: 60px;
	height: 4px;
	background: rgba(255,255,255,0.3);
	border-radius: 2px;
	cursor: pointer;
}

.mysm-volume-filled {
	height: 100%;
	background: #fff;
	border-radius: 2px;
	width: 80%;
}

/* Fullscreen Button */
.mysm-btn-fullscreen {
	margin-left: auto;
}

/* Play/Pause Overlay */
.mysm-custom-player::after {
	content: '▶';
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	font-size: 60px;
	color: rgba(255,255,255,0.8);
	opacity: 1;
	transition: opacity 0.3s;
	pointer-events: none;
}

.mysm-custom-player.playing::after {
	opacity: 0;
}

/* Responsive */
@media (max-width: 768px) {
	.mysm-video-controls {
		padding: 10px;
	}

	.mysm-volume-bar {
		width: 40px;
	}

	.mysm-time-display {
		font-size: 11px;
	}
}

/* === Mobile === */
@media (max-width: 768px) {
	.site-content {
		padding: 20px 0;
	}

	.container {
		padding: 0 15px;
	}
}

/* === Animaciones === */
@keyframes fadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

.site-main > article {
	animation: fadeIn 0.5s ease;
}