/*
 *
 *  Estilos generales modernos y responsivos para la web Nohales.com
 *  Author: Antigravity Redesign System (2026)
 * 
 */

:root {
	--color-primary: #1e3b70;
	--color-primary-light: #2c4e8c;
	--color-primary-dark: #122548;
	--color-accent: #facc15;
	--color-accent-hover: #eab308;
	--color-bg-light: #f8fafc;
	--color-text-dark: #1e293b;
	--color-text-light: #ffffff;
	--color-text-muted: #64748b;
	--color-border: #e2e8f0;
	
	--font-sans: 'Open Sans', system-ui, -apple-system, sans-serif;
	
	--shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
	--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
	--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
	
	--radius-sm: 4px;
	--radius-md: 8px;
	--radius-lg: 16px;
	
	--max-width: 1140px;
	--transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset / Base */
* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: var(--font-sans);
	color: var(--color-text-dark);
	background-color: #ffffff;
	line-height: 1.6;
	overflow-x: hidden;
}

img {
	max-width: 100%;
	height: auto;
	display: block;
}

a {
	color: inherit;
	text-decoration: none;
	transition: var(--transition-smooth);
}

/* Header & Navigation */
header {
	width: 100%;
	background-color: #ffffff;
	position: relative;
	z-index: 100;
}

.barra_idiomas {
	background-color: var(--color-bg-light);
	border-bottom: 1px solid var(--color-border);
	padding: 6px 0;
}

.barra_idiomas .centrador {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 0 20px;
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.barra_idiomas .idioma {
	color: var(--color-text-muted);
	font-weight: 600;
}

.barra_idiomas .idioma.activo {
	color: var(--color-primary);
}

header .superior {
	max-width: var(--max-width);
	margin: 0 auto;
	padding: 15px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

header .logo-container img.logo {
	height: 50px;
	width: auto;
}

/* Menú principal */
header .menu_principal ul {
	display: flex;
	list-style: none;
	gap: 15px;
}

header .menu_principal ul li a {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 10px 15px;
	border-radius: var(--radius-md);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	color: var(--color-primary);
	gap: 6px;
}

header .menu_principal ul li a img {
	width: 20px;
	height: 20px;
	opacity: 0.85;
	transition: var(--transition-smooth);
}

header .menu_principal ul li a:hover,
header .menu_principal ul li a.active {
	background-color: var(--color-accent);
	color: var(--color-primary-dark);
}

header .menu_principal ul li a:hover img,
header .menu_principal ul li a.active img {
	opacity: 1;
	transform: translateY(-2px);
}

/* Mobile Nav Toggle */
.mobile-nav-toggle {
	display: none;
	background: transparent;
	border: 0;
	cursor: pointer;
	padding: 10px;
}

.hamburger {
	display: block;
	position: relative;
	width: 24px;
	height: 2px;
	background-color: var(--color-primary);
	transition: var(--transition-smooth);
}

.hamburger::before,
.hamburger::after {
	content: '';
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	background-color: var(--color-primary);
	transition: var(--transition-smooth);
}

.hamburger::before { top: -6px; }
.hamburger::after { bottom: -6px; }

/* Mobile nav active styles */
.mobile-nav-toggle[aria-expanded="true"] .hamburger {
	background-color: transparent;
}
.mobile-nav-toggle[aria-expanded="true"] .hamburger::before {
	transform: rotate(45deg);
	top: 0;
}
.mobile-nav-toggle[aria-expanded="true"] .hamburger::after {
	transform: rotate(-45deg);
	bottom: 0;
}

/* Hero Section / Inferior */
header .inferior {
	background: linear-gradient(rgba(30, 59, 112, 0.75), rgba(30, 59, 112, 0.85)), url('../images/Slide.png') no-repeat center center;
	background-size: cover;
	min-height: 220px;
	display: flex;
	align-items: center;
	color: var(--color-text-light);
	text-align: center;
	padding: 40px 20px;
}

header.header_inicio .inferior {
	background: linear-gradient(rgba(30, 59, 112, 0.65), rgba(30, 59, 112, 0.85)), url('../images/slide_home.png') no-repeat center center;
	background-size: cover;
	min-height: 400px;
}

header .hero-content {
	max-width: 800px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 25px;
	align-items: center;
}

header .inferior h1 {
	font-size: 20px;
	font-weight: 400;
	font-style: italic;
	line-height: 1.5;
	text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header.header_inicio .inferior h1 {
	font-size: 28px;
	line-height: 1.4;
}

.btn-cta {
	display: inline-block;
	background-color: var(--color-accent);
	color: var(--color-primary-dark);
	font-weight: 700;
	text-transform: uppercase;
	font-size: 12px;
	padding: 12px 30px;
	border-radius: 30px;
	box-shadow: var(--shadow-md);
	letter-spacing: 0.05em;
}

.btn-cta:hover {
	background-color: var(--color-text-light);
	color: var(--color-primary);
	transform: translateY(-2px);
}

/* Franjas azules */
.franja_azul {
	background-color: var(--color-primary);
	color: var(--color-text-light);
	padding: 60px 20px;
}

.franja_azul article {
	max-width: var(--max-width);
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: 20px;
	text-align: center;
}

.franja_azul h1 {
	font-size: 28px;
	font-weight: 700;
	color: var(--color-accent);
}

.franja_azul p {
	font-size: 16px;
	max-width: 800px;
	margin: 0 auto;
	line-height: 1.7;
	color: rgba(255,255,255,0.9);
}

/* Empresa Page */
.franja_azul.empresa article {
	display: grid;
	grid-template-columns: 1fr 1fr;
	align-items: center;
	gap: 40px;
	text-align: left;
}

.franja_azul.empresa img {
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-lg);
}

.columna_der {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.columna_der h2 {
	font-size: 18px;
	font-weight: 600;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.85);
}

.instalaciones {
	max-width: var(--max-width);
	margin: 60px auto;
	padding: 0 20px;
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 30px;
}

.instalaciones h1 {
	font-size: 32px;
	color: var(--color-primary);
}

.instalaciones p {
	font-size: 16px;
	color: var(--color-text-muted);
	max-width: 800px;
	margin: 0 auto;
}

.instalaciones img {
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
	width: 100%;
}

.divisor {
	display: block;
	height: 1px;
	background-color: var(--color-border);
	max-width: var(--max-width);
	margin: 40px auto;
}

/* Video link section */
#enlace_video {
	display: flex;
	justify-content: center;
	align-items: center;
	background: linear-gradient(rgba(30,59,112,0.8), rgba(30,59,112,0.9)), url('../images/empresa_01_nohales.jpg') no-repeat center center;
	background-size: cover;
	padding: 80px 20px;
	color: var(--color-text-light);
	font-size: 22px;
	font-weight: 700;
	text-align: center;
	cursor: pointer;
	position: relative;
}

#enlace_video span {
	display: inline-flex;
	align-items: center;
	gap: 15px;
	background-color: rgba(0, 0, 0, 0.4);
	padding: 15px 30px;
	border-radius: 40px;
	border: 2px solid var(--color-accent);
}

#enlace_video:hover span {
	background-color: var(--color-accent);
	color: var(--color-primary-dark);
	transform: scale(1.05);
}

/* Servicios Capas (Desarrollo) */
.capas {
	max-width: var(--max-width);
	margin: 60px auto;
	padding: 0 20px;
}

.capas-container {
	display: grid;
	grid-template-columns: 1fr 1.2fr;
	gap: 40px;
	align-items: center;
}

.capas_visual {
	position: relative;
	background: url('../images/marca_agua_servicios_nohales.png') no-repeat center center;
	background-size: contain;
	height: 380px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 10px;
	padding-left: 20px;
}

.capa {
	padding: 15px 20px;
	background-color: #ffffff;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	font-weight: 700;
	cursor: pointer;
	box-shadow: var(--shadow-sm);
	transition: var(--transition-smooth);
	max-width: 280px;
	position: relative;
}

.capa:hover, .capa.active {
	background-color: var(--color-primary);
	color: var(--color-text-light);
	border-color: var(--color-primary);
	transform: translateX(10px);
}

/* Generates titles based on ID for styling layer names */
.capa::before {
	content: attr(id);
	text-transform: capitalize;
	font-size: 16px;
}

.capas_descripcion {
	background-color: var(--color-bg-light);
	border-radius: var(--radius-lg);
	padding: 40px;
	box-shadow: inset 0 2px 4px rgba(0,0,0,0.03);
	min-height: 250px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.capa-text {
	display: none;
	animation: fadeIn 0.4s ease forwards;
}

.capa-text.active {
	display: block;
}

.capa-text h1 {
	color: var(--color-primary);
	font-size: 26px;
	margin-bottom: 15px;
	border-bottom: 2px solid var(--color-accent);
	padding-bottom: 5px;
	display: inline-block;
}

.capa-text p {
	font-size: 15px;
	line-height: 1.7;
	color: var(--color-text-dark);
}

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

/* Productos Page */
.nuestro_producto {
	max-width: var(--max-width);
	margin: 60px auto;
	padding: 0 20px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 50px;
	align-items: center;
}

.nuestro_producto img {
	width: 100%;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
}

.calidad_y_produccion {
	max-width: var(--max-width);
	margin: 60px auto;
	padding: 0 20px;
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: 40px;
}

.calidad_y_produccion article {
	background-color: var(--color-bg-light);
	padding: 40px;
	border-radius: var(--radius-lg);
	border: 1px solid var(--color-border);
}

.calidad_y_produccion h1 {
	color: var(--color-primary);
	font-size: 24px;
	margin-bottom: 20px;
	text-transform: capitalize;
}

.calidad_y_produccion p {
	font-size: 15px;
	line-height: 1.7;
	margin-bottom: 15px;
	color: var(--color-text-muted);
}

/* Noticias Page */
.noticias {
	max-width: 800px;
	margin: 40px auto 80px;
	padding: 0 20px;
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.enlace_noticia a {
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 25px 30px;
	background-color: var(--color-bg-light);
	border-radius: var(--radius-lg);
	border: 1px solid var(--color-border);
	box-shadow: var(--shadow-sm);
}

.enlace_noticia a img {
	width: 24px;
	height: 24px;
	flex-shrink: 0;
	transition: var(--transition-smooth);
}

.noticia-info {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.enlace_noticia a h1 {
	font-size: 16px;
	font-weight: 600;
	color: var(--color-primary);
	line-height: 1.4;
}

.noticia-fuente {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: var(--color-text-muted);
	font-weight: 700;
}

.enlace_noticia a:hover {
	border-color: var(--color-primary);
	background-color: #ffffff;
	box-shadow: var(--shadow-md);
}

.enlace_noticia a:hover img {
	transform: translateX(5px);
}

/* Contacto Page & Forms */
.datos_contacto article {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: 40px;
	align-items: center;
	text-align: left;
}

.datos_contacto .company-name {
	font-size: 20px;
	font-weight: 700;
	color: var(--color-accent);
}

.contact-links {
	margin-top: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.contact-links a:hover {
	color: var(--color-accent);
	text-decoration: underline;
}

.logo-contacto {
	max-width: 240px;
	justify-self: center;
}

.mapa_form_contacto {
	max-width: var(--max-width);
	margin: 60px auto;
	padding: 0 20px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
}

.mapa_empresa iframe {
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-md);
	min-height: 400px;
}

.formulario_contacto {
	background-color: var(--color-bg-light);
	padding: 40px;
	border-radius: var(--radius-lg);
	border: 1px solid var(--color-border);
	box-shadow: var(--shadow-sm);
}

.formulario_contacto h2 {
	color: var(--color-primary);
	font-size: 24px;
	margin-bottom: 25px;
	text-align: center;
}

.form-group {
	margin-bottom: 20px;
}

.form-group label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	margin-bottom: 6px;
	color: var(--color-text-dark);
}

.form-group input,
.form-group textarea {
	width: 100%;
	padding: 12px 16px;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-md);
	font-family: var(--font-sans);
	font-size: 14px;
	transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
	outline: none;
	border-color: var(--color-primary);
	box-shadow: 0 0 0 3px rgba(30, 59, 112, 0.15);
}

.form-group textarea {
	height: 120px;
	resize: vertical;
}

input[type="submit"] {
	width: 100%;
	padding: 14px;
	background-color: var(--color-primary);
	color: var(--color-text-light);
	border: 0;
	border-radius: var(--radius-md);
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	transition: var(--transition-smooth);
}

input[type="submit"]:hover {
	background-color: var(--color-primary-dark);
	box-shadow: var(--shadow-md);
}

/* Gallery Carousel System */
.seccion_galeria {
	background-color: var(--color-bg-light);
	padding: 60px 20px;
}

.gallery-carousel-wrapper {
	max-width: var(--max-width);
	margin: 0 auto;
	position: relative;
}

.carousel-container {
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none; /* Hide scrollbar for Firefox */
	scroll-behavior: smooth;
}

.carousel-container::-webkit-scrollbar {
	display: none; /* Hide scrollbar for Chrome/Safari */
}

.carousel-container ul {
	display: flex;
	gap: 20px;
	list-style: none;
	padding: 10px 0;
}

.carousel-container ul li {
	scroll-snap-align: start;
	flex-shrink: 0;
}

.gallery-item {
	display: block;
	position: relative;
	overflow: hidden;
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	background-color: #ffffff;
	border: 1px solid var(--color-border);
	transition: var(--transition-smooth);
}

.gallery-item img {
	object-fit: cover;
	transition: var(--transition-smooth);
}

.gallery-title {
	display: block;
	padding: 12px 15px;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	color: var(--color-text-dark);
	border-top: 1px solid var(--color-border);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.gallery-item:hover {
	transform: translateY(-4px);
	box-shadow: var(--shadow-md);
	border-color: var(--color-primary);
}

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

.carousel-prev,
.carousel-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background-color: #ffffff;
	border: 1px solid var(--color-border);
	width: 44px;
	height: 44px;
	border-radius: 50%;
	cursor: pointer;
	box-shadow: var(--shadow-md);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	color: var(--color-primary);
	z-index: 10;
	transition: var(--transition-smooth);
}

.carousel-prev:hover,
.carousel-next:hover {
	background-color: var(--color-primary);
	color: var(--color-text-light);
	border-color: var(--color-primary);
}

.carousel-prev { left: -22px; }
.carousel-next { right: -22px; }

/* Lightbox Modal */
.lightbox-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(15, 23, 42, 0.95);
	z-index: 2000;
	display: none;
	justify-content: center;
	align-items: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.lightbox-modal.open {
	display: flex;
	opacity: 1;
}

.lightbox-content {
	max-width: 90%;
	max-height: 80%;
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 15px;
}

.lightbox-content img {
	max-width: 100%;
	max-height: 70vh;
	object-fit: contain;
	border-radius: var(--radius-md);
	box-shadow: 0 25px 50px -12px rgb(0 0 0 / 0.5);
	animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
	from { transform: scale(0.9); opacity: 0; }
	to { transform: scale(1); opacity: 1; }
}

.lightbox-caption {
	color: var(--color-text-light);
	font-size: 18px;
	font-weight: 600;
	text-align: center;
}

.lightbox-close {
	position: absolute;
	top: -50px;
	right: 0;
	background: transparent;
	border: 0;
	color: var(--color-text-light);
	font-size: 32px;
	cursor: pointer;
	width: 44px;
	height: 44px;
}

.lightbox-close:hover {
	color: var(--color-accent);
}

/* Footer */
.footer_principal {
	background-color: var(--color-primary-dark);
	color: var(--color-text-light);
	padding: 60px 20px 30px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 40px;
	border-top: 5px solid var(--color-accent);
}

.autoconsumo-images {
	display: flex;
	justify-content: center;
	gap: 30px;
	flex-wrap: wrap;
}

.autoconsumo-images img {
	height: 120px;
	width: auto;
	border-radius: var(--radius-md);
	background-color: #ffffff;
	padding: 5px;
}

.footer_principal .enlaces_contacto {
	display: flex;
	gap: 15px;
	justify-content: center;
	align-items: center;
	font-size: 13px;
	color: rgba(255,255,255,0.7);
}

.footer_principal .enlace_contacto:hover {
	color: var(--color-accent);
}

.footer_principal .sep {
	color: rgba(255,255,255,0.3);
}

.copyright {
	font-size: 12px;
	color: rgba(255,255,255,0.4);
	text-align: center;
}

/* Responsive Breakpoints */
@media (max-width: 960px) {
	header .superior {
		position: relative;
	}
	
	.mobile-nav-toggle {
		display: block;
	}
	
	header .menu_principal {
		position: absolute;
		top: 100%;
		left: 0;
		width: 100%;
		background-color: #ffffff;
		box-shadow: var(--shadow-lg);
		border-top: 1px solid var(--color-border);
		max-height: 0;
		overflow: hidden;
		transition: max-height 0.4s ease-out;
	}
	
	header .menu_principal.open {
		max-height: 500px;
	}
	
	header .menu_principal ul {
		flex-direction: column;
		padding: 20px;
		gap: 5px;
	}
	
	header .menu_principal ul li a {
		flex-direction: row;
		justify-content: flex-start;
		gap: 15px;
		padding: 12px 20px;
		font-size: 13px;
	}
	
	header .menu_principal ul li a img {
		margin: 0;
	}
	
	.capas-container {
		grid-template-columns: 1fr;
	}
	
	.nuestro_producto,
	.calidad_y_produccion,
	.mapa_form_contacto,
	.franja_azul.empresa article,
	.datos_contacto article {
		grid-template-columns: 1fr;
		gap: 30px;
	}
	
	.franja_azul.empresa article {
		text-align: center;
	}
	
	.datos_contacto article {
		text-align: center;
		justify-items: center;
	}
	
	.logo-contacto {
		max-width: 180px;
	}
	
	.carousel-prev { left: 10px; }
	.carousel-next { right: 10px; }
}

@media (max-width: 480px) {
	header .inferior h1 {
		font-size: 16px;
	}
	
	header.header_inicio .inferior h1 {
		font-size: 20px;
	}
	
	.franja_azul h1 {
		font-size: 22px;
	}
	
	.footer_principal .enlaces_contacto {
		flex-direction: column;
		gap: 10px;
	}
	
	.footer_principal .sep {
		display: none;
	}
}