/* ==========================================================================
   CSS Zen Garden - Adaptación Completa: Escuela de Aikido Vinaròs
   ========================================================================== */

/* Configuración básica */
html {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	scroll-behavior: smooth;
}

*, *:before, *:after {
	box-sizing: inherit;
}

body { 
	font: 87.5%/1.8 'Georgia', 'Times New Roman', serif;
	color: #555753; 
	background: #fff url(http://csszengarden.com/001/blossoms.jpg) no-repeat bottom right; 
	margin: 0; 
	padding: 0;
	overflow-x: hidden;
}

p { 
	margin-top: 0; 
	margin-bottom: 1.2em;
	text-align: justify;
}

h3 { 
	font: italic normal 1.35em 'Georgia', serif;
	letter-spacing: 1px; 
	margin-bottom: 0.5em; 
	color: #7D775C;
	border-bottom: 1px solid #dcd6cd;
	padding-bottom: 4px;
}

h4 {
	font: bold 1.15em 'Georgia', serif;
	color: #8c1d1d;
	margin-top: 1.5em;
	margin-bottom: 0.5em;
}

a:link { 
	font-weight: bold; 
	text-decoration: none; 
	color: #4a5d4e;
}
a:visited { 
	font-weight: bold; 
	text-decoration: none; 
	color: #6e7a70;
}
a:hover, a:focus, a:active { 
	text-decoration: underline; 
	color: #8c1d1d;
}

abbr {
	border-bottom: none;
}

/* Contenedor Principal */
.page-wrapper { 
	background: url(http://csszengarden.com/001/zen-bg.jpg) no-repeat top left; 
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 200px 40px 170px;
	position: relative;
	min-height: 100vh;
}

.intro { 
	width: 100%;
}

/* Cabecera */
header {
	padding-top: 25px;
	min-height: 90px;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	flex-wrap: wrap;
	gap: 15px;
}

header h1 { 
	background: none !important;
	text-indent: 0 !important;
	white-space: normal !important;
	overflow: visible !important;
	font: bold 1.8em 'Georgia', serif !important;
	color: #1a1a1a !important;
	margin: 0 !important;
	display: block !important;
	width: auto !important;
	height: auto !important;
}

header h2 { 
	background: none !important;
	text-indent: 0 !important;
	white-space: normal !important;
	overflow: visible !important;
	font: italic 1.1em 'Georgia', serif !important;
	color: #7D775C !important;
	margin: 5px 0 0 0 !important;
	display: block !important;
	width: auto !important;
	height: auto !important;
	text-align: right;
}

/* Ideogramas de Aikido (合氣道) */
.page-wrapper::before {
	content: "合氣道";
	position: absolute;
	top: 18px;
	left: 20px;
	display: inline-block;
	width: auto;
	height: auto;
	padding: 4px 2px;
	font-family: "Kaiti SC", "STKaiti", "Yu Mincho", "MS Mincho", "Georgia", serif;
	font-size: 1.5em;
	font-weight: bold;
	color: #555753;
	letter-spacing: 4px;
	line-height: 1.1;
	writing-mode: vertical-rl;
	text-orientation: upright;
	text-align: center;
	background-color: #f7f5f0;
	border-radius: 2px;
	box-shadow: 0 0 3px #f7f5f0;
	z-index: 100;
}

/* Menú Lateral Izquierdo Superpuesto */
.side-menu-layer {
	position: absolute;
	top: 230px;
	left: 10px;
	width: 145px;
	z-index: 999;
	background-color: rgba(247, 245, 240, 0.95);
	border: none;
	border-radius: 4px;
	padding: 8px 5px;
}

.side-menu-layer ul.menu-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.side-menu-layer ul.menu-list > li {
	margin-bottom: 4px;
	border-bottom: 1px dashed #D4CDDC;
	padding-bottom: 3px;
}

.side-menu-layer ul.menu-list > li:last-child {
	border-bottom: none;
}

.side-menu-layer a {
	display: block;
	color: #555753;
	text-decoration: none;
	font-weight: bold;
	font-size: 0.9em;
	padding: 3px 5px;
}

.side-menu-layer a:hover {
	color: #8c1d1d;
	background-color: #eae6df;
	border-radius: 3px;
}

/* Desplegables del Menú */
.menu-dropdown summary {
	font-weight: bold;
	font-size: 0.9em;
	color: #555753;
	cursor: pointer;
	padding: 3px 5px;
	user-select: none;
	outline: none;
}

.menu-dropdown summary:hover {
	color: #8c1d1d;
	background-color: #eae6df;
	border-radius: 3px;
}

.menu-dropdown summary::after {
	content: ' ▾';
	font-size: 0.8em;
}

.menu-dropdown[open] summary::after {
	content: ' ▴';
}

.menu-dropdown ul.submenu {
	list-style: none;
	margin: 4px 0 4px 8px;
	padding: 0;
	border-left: 2px solid #7D775C;
}

.menu-dropdown ul.submenu li {
	margin-bottom: 2px;
}

.menu-dropdown ul.submenu a {
	font-weight: normal;
	font-size: 0.85em;
	padding: 2px 6px;
	color: #666;
}

.menu-dropdown ul.submenu a:hover {
	color: #8c1d1d;
}

/* Formato para páginas de contenido */
.activity-page-content {
	background-color: #fdfbf7;
	padding: 25px;
	border-left: 5px solid #8c1d1d;
	border-radius: 4px;
	margin-top: 20px;
	margin-bottom: 30px;
	box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.activity-page-content h3 {
	font-size: 1.6em;
	color: #8c1d1d;
	margin-top: 0;
	margin-bottom: 20px;
}

.activity-page-content p {
	font-size: 1.05em;
	line-height: 1.8;
}

.activity-page-content ul, 
.activity-page-content ol {
	margin-bottom: 1.2em;
	padding-left: 20px;
}

.activity-page-content li {
	margin-bottom: 6px;
}

/* Imagen de cabecera superior en páginas de actividad */
.activity-image-wrapper {
	width: 100%;
	text-align: center !important;
	margin-top: 10px;
	margin-bottom: 25px;
	clear: both;
}

.activity-featured-image {
	display: block !important;
	margin-left: auto !important;
	margin-right: auto !important;
	width: 62.5%;
	max-width: 500px;
	height: auto;
	border-radius: 4px;
	border: 3px solid #e2ded5;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12);
}

/* Contenedor e imagen contorneada a la DERECHA con 2mm de separación */
.text-wrap-container {
	position: relative;
	overflow: hidden;
	margin: 10px 0;
}

.img-right-wrapped {
	float: right;
	width: 180px;
	height: auto;
	margin: 2mm 0 2mm 2mm; /* Separación exacta de 2mm arriba, abajo e izquierda */
	border-radius: 4px;
	border: 1px solid #dcd6cd;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
	shape-margin: 2mm;
}

/* Estilos del Formulario de Contacto */
.form-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 15px;
}

.form-table td {
	padding: 8px 5px;
	vertical-align: middle;
	border: none;
}

.form-table td:first-child {
	width: 100px;
	text-align: right;
	padding-right: 15px;
}

.form-table label {
	font-weight: bold;
	color: #1a1a1a;
}

.form-table input[type="text"],
.form-table input[type="email"],
.form-table textarea {
	width: 100%;
	padding: 8px 10px;
	font-family: inherit;
	font-size: 0.95em;
	border: 1px solid #dcd6cd;
	border-radius: 4px;
	background-color: #ffffff;
	color: #2b2b2b;
}

.form-table input:focus,
.form-table textarea:focus {
	outline: none;
	border-color: #7D775C;
	box-shadow: 0 0 5px rgba(125, 119, 92, 0.3);
}

.form-buttons {
	display: flex;
	gap: 15px;
	margin-top: 10px;
}

.btn {
	padding: 10px 22px;
	font-family: inherit;
	font-size: 0.95em;
	font-weight: bold;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.btn-delete {
	background-color: #7D775C;
	color: #ffffff;
}

.btn-delete:hover {
	background-color: #5d5843;
}

.btn-send {
	background-color: #8c1d1d;
	color: #ffffff !important;
}

.btn-send:hover {
	background-color: #6a1414;
}

/* Estilos de la Tabla de Horario Escolar con Fondos Alternativos Forzados */
.table-responsive {
	overflow-x: auto;
	margin-bottom: 25px;
}

.schedule-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.82em;
	text-align: center;
	border: 1px solid #dcd6cd;
}

.schedule-table th {
	background-color: #7D775C !important;
	color: #ffffff !important;
	padding: 10px 8px;
	font-weight: bold;
	border: 1px solid #6b664e;
}

.schedule-table td {
	padding: 8px 4px;
	border: 1px solid #dcd6cd;
	font-weight: bold;
	line-height: 1.3;
	vertical-align: middle;
}

.schedule-table tr.row-alt-1,
.schedule-table tr.row-alt-1 td {
	background-color: #f7f5f0 !important;
}

.schedule-table tr.row-alt-2,
.schedule-table tr.row-alt-2 td {
	background-color: #eae6df !important;
}

.schedule-table .time-col {
	background-color: #e2ded5 !important;
	color: #1a1a1a;
	font-weight: bold;
	white-space: nowrap;
	width: 90px;
	border-right: 2px solid #7D775C;
}

/* Colores de texto por disciplina en el horario */
.cat-aikido-adultos { color: #800080; }
.cat-aikido-infantil { color: #006600; }
.cat-aikido-infantil-blue { color: #0055aa; }
.cat-aikido-infantil-green { color: #007700; }
.cat-karate-infantil { color: #990066; }
.cat-karate-adultos { color: #880000; }
.cat-jujutsu { color: #009944; }
.cat-iaido { color: #d97706; }
.cat-iaido-aikido { color: #d97706; }

.schedule-notes {
	background-color: #f7f5f0;
	padding: 15px 20px;
	border-radius: 4px;
	border: 1px solid #e2ded5;
	font-size: 0.9em;
}

.schedule-notes p {
	margin-bottom: 8px;
}

.schedule-notes ul, .schedule-notes ol {
	margin-top: 0;
	margin-bottom: 15px;
	padding-left: 20px;
	font-style: italic;
	color: #555;
}

.schedule-notes li {
	margin-bottom: 4px;
}

.summary {
	margin: 20px 0; 
	padding: 15px;
	background-color: #f2efe9;
	border-left: 4px solid #8c1d1d;
}

.summary p {
	font-style: italic;
	font-size: 1.05em;
	margin: 0 0 8px 0;
}

.preamble, .supporting {
	padding: 10px 0;
}

footer { 
	text-align: center; 
	padding-top: 20px;
	border-top: 1px solid #dcd6cd;
	margin-top: 30px;
}

footer a { 
	margin: 0 10px; 
}

.sidebar {
	position: absolute;
	top: 150px;
	right: 15px;
	width: 160px;
}

.sidebar .wrapper { 
	font-size: 0.85em; 
	background: transparent url(http://csszengarden.com/001/paper-bg.jpg) top left repeat-y; 
	padding: 10px; 
}

.sidebar h3.select,
.sidebar h3.archives,
.sidebar h3.resources {
	background: none !important;
	text-indent: 0 !important;
	white-space: normal !important;
	overflow: visible !important;
	font: bold 1.05em 'Georgia', serif !important;
	color: #7D775C !important;
	width: auto !important;
	height: auto !important;
	margin: 15px 0 5px 0 !important;
	border-bottom: 1px solid #7D775C;
}

.sidebar ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sidebar li {
	line-height: 1.3em; 
	padding: 5px 0;
	border-bottom: 1px dashed #ded8ce;
}

.extra1 {
	background: transparent url(http://csszengarden.com/001/cr2.gif) top left no-repeat; 
	position: absolute; 
	top: 40px; 
	right: 0; 
	width: 148px; 
	height: 110px;
}

/* Adaptación Responsive */
@media screen and (max-width: 1024px) {
	.page-wrapper {
		padding: 0 180px 30px 160px;
	}
	
	header h1 {
		font-size: 1.5em !important;
	}
	
	header h2 {
		font-size: 1em !important;
	}
}

@media screen and (max-width: 768px) {
	body {
		background-image: none;
	}

	.page-wrapper {
		padding: 15px;
		background: #ffffff;
	}

	.page-wrapper::before {
		position: static;
		writing-mode: horizontal-tb;
		display: block;
		width: fit-content;
		margin: 0 auto 10px auto;
		letter-spacing: 8px;
	}

	header {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}

	header h1, header h2 {
		text-align: center;
		float: none;
	}

	.side-menu-layer {
		position: static;
		width: 100%;
		margin: 15px 0;
		box-shadow: 0 2px 5px rgba(0,0,0,0.05);
	}

	.side-menu-layer ul.menu-list {
		display: flex;
		flex-wrap: wrap;
		gap: 10px;
		justify-content: center;
	}

	.side-menu-layer ul.menu-list > li {
		border-bottom: none;
		margin-bottom: 0;
	}

	.sidebar {
		position: static;
		width: 100%;
		margin-top: 30px;
	}

	.sidebar .wrapper {
		background: #f7f5f0;
		border: 1px solid #e0dad0;
	}

	.form-table td:first-child {
		text-align: left;
		display: block;
		width: 100%;
		padding-bottom: 2px;
	}

	.form-table td {
		display: block;
		width: 100%;
	}

	.activity-featured-image {
		width: 90% !important;
		max-width: 100% !important;
	}
}

@media screen and (max-width: 480px) {
	header h1 {
		font-size: 1.3em !important;
	}

	header h2 {
		font-size: 0.9em !important;
	}

	.side-menu-layer ul.menu-list {
		flex-direction: column;
		align-items: stretch;
	}

	.side-menu-layer a, .menu-dropdown summary {
		text-align: center;
		padding: 8px;
		background-color: #eae6df;
		border-radius: 3px;
	}

	.img-right-wrapped {
		float: none;
		display: block;
		margin: 2mm auto;
		width: 60%;
		max-width: 200px;
	}
}