html,
body {
	height: 100%;
}

body {
	display: flex;
	flex-direction: column;
}

header {
	border-bottom: 1px solid #999;
	height: 88px;
	display: flex;
	align-items: center;
	padding: 0 10px;
	flex-shrink: 0;
}

#main-container{
	display: flex;
	width:100%;
	height:100%;
	overflow: hidden;
}

#main {
	font-family: "Open Sans", sans-serif;
	flex: 1;
	display: flex;
	transition: transform ease 0.5s;
}

a.back {
	position: absolute;
	top: 10px;
	left: 10px;
	font-size: 1.2em;
	color: #333;
	text-decoration: none;
	background-color: #fff;
	padding: 5px 10px;
	border-radius: 5px;
	border: 1px solid #999;
	transition: background-color 0.3s ease, color 0.3s ease;
}

a.back:hover {
	background-color: #333;
	color: #fff;
}

#main>section {
	width: 100vw;
	min-height: 100%;
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	transition: transform 0.5s ease;
	padding: 40px 10em; /* Padding por defecto para pantallas medianas */
	position: relative;
	overflow: auto;
}

#brands {
	margin-top: 40px;
	display: flex;
	flex-direction: row;
}

.brand {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	margin: 10px;
}

.brand img {
	display: block;
	margin-bottom: 20px;
}

.equipment-logo {
	display: block;
	margin: auto;
	margin-bottom: 40px;
	max-width:100%;
}

#equipment-title {
	margin-bottom: 40px;
}

#videos{
	justify-content: flex-start;
}
#videos-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 20px;
	margin-top: 40px;
	width: 100%;
	justify-items: center;
}

.video-item {
	display: flex;
	flex-direction: column;
	align-items: top;
	width:100%;
}

.video-container {
	transition: all 0.3s ease;
	width: 328px;
	padding: 4px;
}

.video-item.visto .video-container {
	background: #4caf50;
}
.video-item.visto .video-container::after {
	content: "Visto";
	position: absolute;
	top: 0;
	right: 0;
	background: #4caf50;
	color: #fff;
	padding: 5px 10px;
	font-size: 1.2em;
	border-radius: 0 5px 0 5px;
}

.video-item video {
	display: block;
	width: 100%;
}

.video-title {
	font-size: 1.6em;
	margin-top: 10px;
}

.video-description {
	font-size: 1.3em;
	color: #666;
	margin-top: 5px;
}

select,
input[type="text"] {
	width: 100%;
	font-size: 1.4em;
	font-family: "Open Sans", sans-serif;
	background: #fff;
	border: 1px solid #999;
	padding: 10px;
	border-radius: 5px;
	height: 41px;
	color:#333;
}

h1 {
	font-size: 3em;
	margin-bottom: 20px;
	color: #333;
	text-align: center;
}

h2 {
	font-size: 2.5em;
	margin-bottom: 10px;
	color: #333;
	text-align: center;
}

h3 {
	font-size: 1.6em;
	margin-bottom: 20px;
	color: #333;
	text-align: center;
}

/* Modal de formulario */
.form-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.7);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 20000;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.form-modal.show {
	opacity: 1;
}

.form-container {
	background: #fff;
	padding: 30px;
	border-radius: 10px;
	max-width: 500px;
	width: 90%;
	max-height: 80vh;
	overflow-y: auto;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.form-title {
	margin-bottom: 20px;
	color: #333;
	text-align: center;
	font-size: 1.8em;
}

.form-content {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.form-field {
	display: flex;
	flex-direction: column;
}

.form-field label {
	font-size: 1.4em;
	font-weight: bold;
	margin-bottom: 5px;
	display: block;
	color: #333;
}

.form-field label {
	display: none;
}

.form-row {
	display: flex;
	gap: 10px;
}

.form-row .form-field {
	flex: 1 1 0;
	min-width: 0;
}

.form-field input,
.form-field select {
	width: 100%;
	padding: 10px;
	border: 1px solid #ccc;
	border-radius: 5px;
	font-size: 1.4em;
	box-sizing: border-box;
	font-family: "Open Sans", sans-serif;
}

.form-field input:focus,
.form-field select:focus {
	outline: none;
	border-color: #4caf50;
	box-shadow: 0 0 5px rgba(76, 175, 80, 0.3);
}

.form-buttons {
	display: flex;
	gap: 20px;
	justify-content: space-between;
	margin-top: 20px;
}
.form-buttons button{
	width: 100%;
}

button {
	flex: 1;
	padding: 12px;
	border: none;
	border-radius: 5px;
	font-size: 16px;
	cursor: pointer;
	transition: background 0.3s ease;
	font-family: "Open Sans", sans-serif;
}

.btn-submit {
	background: #111;
	color: #fff;
	order: 2;
}

.btn-submit:hover {
	background: #333;
}

#success{
	text-align: center;
}

.errores{
	font-size:14px;
	font-weight: bold;
	text-align: center;
	color:#f00;
}

label a{
	color: #666;
}
label a:hover{
	color: #333;
}

/*
versión mobile o pantallas pequeñas
*/
body.small.modal {
	overflow: hidden !important;
	position: fixed;
	width: 100%;
	height: 100%;
}
body.small #main > section {
	padding: 40px 20px;
	position: absolute;
	top: 89px;
	display: none;
	text-align: center;
}
body.small #main > section::after, body.small .form-container::after, body.small .form-buttons::after  {
	content: "";
	display: block;
	width: 100%;
	height: 80px;
}
body.small #brands {
	flex-direction: column;
}
body.small #main-container {
	overflow: visible;
	height: auto;
}
body.small a.back{
	position:static;
	display: inline-block;
	margin-bottom: 20px;
}
body.small #videos-list{
	flex-direction: column;
}
body.small .video-container{
	width: 100%;
}
body.small .form-container{
	max-height: 100vh;
	margin-top:0;
	width:100%;
	height: 100%;
	border-radius:0;
	padding: 20px;
	max-width: 100%;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

body.small .form-modal {
	align-items: flex-start;
	background: #fff;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
}

body.small .email-modal {
	align-items: flex-start;
	background: #fff;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
}

body.small.modal {
	overflow: hidden;
	position: fixed;
	width: 100%;
	height: 100%;
}

body.small .email-modal .form-container {
	max-height: 100vh;
	height: 100%;
	max-width: 100%;
	border-radius: 0;
	padding: 20px;
}

body.small .form-container button[type="button"] {
	min-height: 44px;
	touch-action: manipulation;
}

.fadein {
	animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Media queries para padding horizontal responsivo */
/* Para pantallas de 1280px o menos - sin padding horizontal */
@media (max-width: 1280px) {
	#main>section {
		padding: 40px 0;
	}
}

/* Para pantallas entre 1281px y 1600px - padding moderado */
@media (min-width: 1281px) and (max-width: 1600px) {
	#main>section {
		padding: 40px 5em;
	}
}

/* Para pantallas entre 1601px y 1919px - padding medio */
@media (min-width: 1601px) and (max-width: 1919px) {
	#main>section {
		padding: 40px 10em;
	}
}

/* Para pantallas de 1920px o más - padding completo */
@media (min-width: 1920px) {
	#main>section {
		padding: 40px 20em;
	}
}