/* ============================================
   GLOBAL STYLES - ParriSur
   Sistema de colores y proporciones unificadas
   ============================================ */

:root {
	/* Color Palette */
	--primary-gold: #FBE35D;
	--dark-bg: #0a0a0a;
	--dark-secondary: #1a1a1a;
	--header-black: #000;
	--nav-dark: #121212;
	--text-light: #fff;
	--text-secondary: #ddd;
	--text-tertiary: #ccc;
	--border-dark: #333;
	
	/* Spacing */
	--spacing-xs: 10px;
	--spacing-sm: 15px;
	--spacing-md: 20px;
	--spacing-lg: 30px;
	--spacing-xl: 40px;
	--spacing-xxl: 60px;
	
	/* Typography — cuerpo 10–14px; títulos moderados (sin cuerpos a 26–30px) */
	--font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	--font-size-base: 14px;
	--font-size-body-sm: 12px;
	--font-size-body-md: 13px;
	--line-height-base: 1.6;
	--font-size-h1: clamp(1.15rem, 2.2vw, 1.45rem);
	--font-size-h2: clamp(1.05rem, 1.85vw, 1.22rem);
	--font-size-h3: clamp(1rem, 1.5vw, 1.1rem);
	
	/* Transitions */
	--transition-fast: 0.3s ease;
	--transition-normal: 0.4s ease;
}

/* ============================================
   UNIVERSAL STYLES
   ============================================ */

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	font-size: 14px;
}

body {
	background: linear-gradient(135deg, var(--dark-bg) 0%, var(--dark-secondary) 50%, var(--dark-secondary) 100%);
	color: var(--text-light);
	font-family: var(--font-family);
	line-height: var(--line-height-base);
	background-attachment: fixed;
	margin: 0;
	font-size: var(--font-size-base);
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */

.header {
	background: var(--header-black);
	padding: var(--spacing-lg) 0;
	text-align: center;
	border-bottom: 3px solid var(--primary-gold);
	box-shadow: 0 4px 20px rgba(251, 227, 93, 0.2);
}

.header img {
	max-width: 100%;
	height: auto;
	max-height: 100px;
}

nav {
	background: var(--nav-dark);
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 0;
	border-bottom: 2px solid var(--primary-gold);
	box-shadow: 0 2px 15px rgba(251, 227, 93, 0.15);
}

nav a {
	padding: var(--spacing-lg) var(--spacing-lg);
	color: var(--primary-gold);
	text-decoration: none;
	font-weight: bold;
	font-size: 14px;
	transition: var(--transition-fast);
	border-right: 1px solid var(--border-dark);
	position: relative;
}

nav a:last-child {
	border-right: none;
}

nav a:hover {
	background: var(--primary-gold);
	color: var(--header-black);
	box-shadow: 0 0 15px rgba(251, 227, 93, 0.4);
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1, h2, h3, h4, h5, h6 {
	color: var(--primary-gold);
	text-shadow: 0 0 15px rgba(251, 227, 93, 0.3);
	margin-bottom: var(--spacing-md);
	font-family: var(--font-family);
	font-weight: 700;
	line-height: 1.28;
}

h1 { font-size: var(--font-size-h1); letter-spacing: 1px; }
h2 { font-size: var(--font-size-h2); letter-spacing: 0.6px; }
h3, h4, h5, h6 { font-size: var(--font-size-h3); letter-spacing: 0.3px; }

p {
	color: var(--text-secondary);
	margin-bottom: var(--spacing-md);
	font-size: var(--font-size-base);
	line-height: 1.65;
}

a {
	color: var(--primary-gold);
	text-decoration: none;
	transition: var(--transition-fast);
}

a:hover {
	color: var(--text-light);
	text-shadow: 0 0 10px rgba(251, 227, 93, 0.3);
}

/* ============================================
   CONTAINERS & SECTIONS
   ============================================ */

.container {
	max-width: 1400px;
	margin: 0 auto;
	padding: var(--spacing-xl) var(--spacing-md);
}

.section {
	padding: var(--spacing-xxl) var(--spacing-md);
	margin: var(--spacing-xxl) 0;
}

.section-title {
	font-size: 1.35rem;
	text-align: center;
	margin-bottom: var(--spacing-lg);
	text-transform: uppercase;
	letter-spacing: 1.2px;
}

/* ============================================
   BUTTONS & INTERACTIVE
   ============================================ */

button, .btn, a.button {
	background: var(--primary-gold);
	color: var(--header-black);
	padding: var(--spacing-md) var(--spacing-lg);
	border: none;
	border-radius: 6px;
	font-weight: bold;
	font-size: var(--font-size-base);
	cursor: pointer;
	transition: var(--transition-fast);
	display: inline-block;
	text-decoration: none;
	box-shadow: 0 4px 15px rgba(251, 227, 93, 0.2);
	font-family: var(--font-family);
	letter-spacing: 0.3px;
}

button:hover, .btn:hover, a.button:hover {
	box-shadow: 0 8px 25px rgba(251, 227, 93, 0.4);
	transform: translateY(-2px);
}

/* Enlaces tipo botón: los estilos globales a:link usan dorado con !important */
a.button:link,
a.button:visited,
a.button:hover,
a.button:active,
a.btn:link,
a.btn:visited,
a.btn:hover,
a.btn:active {
	color: var(--header-black) !important;
	text-shadow: none !important;
}

/* CTA de inicio (index01) y otras: mismo conflicto a:link oro / fondo dorado */
a.primary-cta:link,
a.primary-cta:visited,
a.primary-cta:hover,
a.primary-cta:active {
	color: var(--header-black) !important;
	text-shadow: none !important;
}

/* ============================================
   CARDS & BOXES
   ============================================ */

.card, .box {
	background: rgba(251, 227, 93, 0.08);
	border: 2px solid var(--primary-gold);
	border-radius: 12px;
	padding: var(--spacing-lg);
	transition: var(--transition-normal);
	box-shadow: 0 8px 30px rgba(251, 227, 93, 0.2);
}

.card:hover, .box:hover {
	transform: translateY(-10px);
	box-shadow: 0 15px 50px rgba(251, 227, 93, 0.4);
	border-color: var(--text-light);
	background: rgba(251, 227, 93, 0.15);
}

/* ============================================
   HIGHLIGHT & ACCENT BOXES
   ============================================ */

.highlight {
	background: rgba(251, 227, 93, 0.1);
	border-left: 4px solid var(--primary-gold);
	padding: var(--spacing-lg);
	border-radius: 8px;
	margin: var(--spacing-lg) 0;
}

.highlight p {
	color: var(--primary-gold);
	font-weight: 600;
}

/* ============================================
   IMAGES & MEDIA
   ============================================ */

img {
	max-width: 100%;
	height: auto;
	display: block;
}

.img-card {
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 10px 40px rgba(251, 227, 93, 0.25);
	border: 2px solid var(--primary-gold);
	transition: var(--transition-normal);
}

.img-card:hover {
	box-shadow: 0 15px 60px rgba(251, 227, 93, 0.4);
	transform: scale(1.02);
}

.img-card img {
	width: 100%;
	height: 100%;
	display: block;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
	nav a {
		padding: var(--spacing-md) var(--spacing-sm);
		font-size: 12px;
	}

	.container {
		padding: var(--spacing-lg) var(--spacing-sm);
	}

	.section-title {
		font-size: 1.15rem;
	}

	h2 {
		font-size: 1.08rem;
	}
}

@media (max-width: 480px) {
	nav a {
		padding: var(--spacing-sm) var(--spacing-xs);
		font-size: 11px;
	}

	.container {
		padding: var(--spacing-md) var(--spacing-xs);
	}

	.section-title {
		font-size: 1.05rem;
	}
}

/* ============================================
   LEGACY PAGE HARMONIZATION
   Applies to old table-based pages as well
   ============================================ */

body {
	font-size: var(--font-size-base);
}

p, li, td, th {
	color: var(--text-secondary) !important;
	font-family: var(--font-family) !important;
	font-size: var(--font-size-base) !important;
	line-height: 1.65 !important;
}

/* Normalize readability on long legacy pages */
p {
	max-width: 1100px;
}

/* Force consistent link palette even on old pages with visited/active styles */
a:link,
a:visited {
	color: var(--primary-gold) !important;
	font-family: var(--font-family) !important;
	font-weight: 600 !important;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

a:hover,
a:active {
	color: var(--text-light) !important;
}

h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-family) !important;
	line-height: 1.3 !important;
	color: var(--primary-gold) !important;
}

/* Keep old table layouts usable while modernizing feel */
table {
	max-width: 100%;
	border-collapse: collapse;
	margin-left: auto;
	margin-right: auto;
}

td, th {
	padding: 6px;
	vertical-align: top;
}

/* Unified image treatment */
img {
	max-width: 100%;
	height: auto;
	display: block;
}

/* Avoid stretched images on old markup with hardcoded width/height */
img[width],
img[height] {
	max-width: 100%;
	height: auto;
}

/* Legacy photos and content blocks */
[bgcolor="#351F0D"],
[style*="background-color: #351F0D"] {
	background-color: #2b1b11 !important;
}

[bgcolor="#053827"],
[style*="background-color: #053827"] {
	background-color: #0f3027 !important;
}

[bgcolor="#121212"],
[style*="background-color: #121212"] {
	background-color: var(--nav-dark) !important;
}

[bgcolor="#8F735D"],
[style*="background-color: #8F735D"] {
	background-color: #2c251f !important;
}

[bgcolor="#BB3400"],
[style*="background-color: #BB3400"] {
	background-color: #7a2f12 !important;
}

/* Legacy inline text colors harmonized */
[style*="color: #7FE0BF"],
[style*="color:#7FE0BF"],
[style*="color: #80E5C3"],
[style*="color:#80E5C3"] {
	color: var(--text-secondary) !important;
}

[style*="color: #A8935B"],
[style*="color:#A8935B"] {
	color: var(--text-tertiary) !important;
}

/* Legacy inline font cleanup */
[style*="font-family"],
font {
	font-family: var(--font-family) !important;
}

[style*="font-size: 24px"],
[style*="font-size:24px"] {
	font-size: var(--font-size-base) !important;
}

[style*="font-size: 26px"],
[style*="font-size:26px"],
[style*="font-size: 28px"],
[style*="font-size:28px"],
[style*="font-size: 30px"],
[style*="font-size:30px"],
[style*="font-size: 32px"],
[style*="font-size:32px"],
[style*="font-size: 36px"],
[style*="font-size:36px"],
[style*="font-size: 40px"],
[style*="font-size:40px"] {
	font-size: var(--font-size-base) !important;
}

/* Magazine-style article rhythm */
h1, h2, h3 {
	max-width: 1100px;
	margin-left: auto;
	margin-right: auto;
}

p {
	margin-left: auto;
	margin-right: auto;
}

/* Form consistency across old/new pages */
input,
textarea,
select,
button {
	font-family: var(--font-family);
	font-size: var(--font-size-base);
	border-radius: 8px;
	border: 1px solid var(--border-dark);
}

input,
textarea,
select {
	background: #111;
	color: var(--text-light);
	padding: 10px 12px;
	width: 100%;
	max-width: 100%;
}

textarea {
	min-height: 160px;
	resize: vertical;
}

form {
	max-width: 980px;
	margin: 0 auto;
	padding: var(--spacing-lg);
}

/* Main wrappers used by legacy pages */
main,
section,
article,
header,
footer,
nav {
	width: 100%;
}

/* ============================================
   LEGACY PAGE TYPOGRAPHY OVERRIDES
   Strong normalization for old inline-heavy pages
   ============================================ */

body.legacy-page {
	font-family: var(--font-family) !important;
	font-size: 14px !important;
	line-height: 1.62 !important;
	color: var(--text-secondary) !important;
	text-align: left !important;
}

body.legacy-page p,
body.legacy-page li,
body.legacy-page td,
body.legacy-page th,
body.legacy-page div,
body.legacy-page span,
body.legacy-page strong,
body.legacy-page em {
	font-family: var(--font-family) !important;
	font-size: 0.92rem !important;
	line-height: 1.62 !important;
	color: var(--text-secondary) !important;
}

body.legacy-page h1,
body.legacy-page h2,
body.legacy-page h3,
body.legacy-page h4,
body.legacy-page h5,
body.legacy-page h6 {
	font-family: var(--font-family) !important;
	color: var(--primary-gold) !important;
	text-shadow: 0 0 10px rgba(251, 227, 93, 0.2) !important;
	line-height: 1.3 !important;
	margin: 0 0 12px !important;
}

body.legacy-page h1 { font-size: 1.2rem !important; }
body.legacy-page h2 { font-size: 1.05rem !important; }
body.legacy-page h3,
body.legacy-page h4,
body.legacy-page h5,
body.legacy-page h6 { font-size: 0.95rem !important; }

/* Keep inline children from breaking typography inside the same sentence */
body.legacy-page p *,
body.legacy-page li *,
body.legacy-page td *,
body.legacy-page th *,
body.legacy-page h1 *,
body.legacy-page h2 *,
body.legacy-page h3 *,
body.legacy-page h4 *,
body.legacy-page h5 *,
body.legacy-page h6 * {
	font-family: inherit !important;
	font-size: inherit !important;
	line-height: inherit !important;
	font-weight: inherit !important;
	color: inherit !important;
}

body.legacy-page a,
body.legacy-page a:link,
body.legacy-page a:visited {
	font-family: var(--font-family) !important;
	font-size: 0.92rem !important;
	font-weight: 600 !important;
	color: var(--primary-gold) !important;
	text-decoration: none !important;
}

body.legacy-page a:hover,
body.legacy-page a:active {
	color: var(--text-light) !important;
	text-decoration: underline !important;
}

body.legacy-page td[align="center"],
body.legacy-page p[align="center"] {
	text-align: center !important;
}

/* ============================================
   PRODUCT DETAIL PAGES (unified layout)
   Same visual language as puertacominada.html
   ============================================ */

.product-page-hero {
	max-width: 1200px;
	margin: 32px auto 18px;
	padding: 0 16px;
}

.product-page-hero img {
	width: 100%;
	max-height: 560px;
	object-fit: contain;
	object-position: center;
	background: #0b0b0b;
	border: 2px solid var(--primary-gold);
	border-radius: 14px;
	box-shadow: 0 10px 35px rgba(251, 227, 93, 0.22);
}

.product-page-gallery {
	max-width: 1200px;
	margin: 0 auto 36px;
	padding: 0 16px;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
	gap: 18px;
}

.product-page-gallery img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: contain;
	background: #0b0b0b;
	border: 2px solid var(--primary-gold);
	border-radius: 12px;
	box-shadow: 0 8px 26px rgba(251, 227, 93, 0.2);
}

.product-page-specs {
	max-width: 1100px;
	margin: 0 auto 36px;
	padding: 0 16px;
}

.product-page-specs-box {
	background: rgba(251, 227, 93, 0.08);
	border: 2px solid var(--primary-gold);
	border-radius: 12px;
	padding: 20px;
}

.product-page-specs-box p {
	margin-bottom: 10px;
}

.product-page-actions {
	text-align: center;
	margin-bottom: 24px;
}

.product-page-actions a + a {
	margin-left: 12px;
}

/* ============================================
   CONTACTO / CLIENTES (páginas estáticas)
   ============================================ */

.static-page-intro {
	max-width: 900px;
	margin: 0 auto 24px;
	padding: 0 16px;
	text-align: center;
}

.static-contact-card {
	max-width: 720px;
	margin: 0 auto 28px;
	padding: 24px;
	background: rgba(251, 227, 93, 0.08);
	border: 2px solid var(--primary-gold);
	border-radius: 12px;
	text-align: center;
}

.static-social {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
	margin: 20px 0;
}

.static-social a {
	display: inline-block;
}

.static-social img {
	width: 48px;
	height: 48px;
	object-fit: contain;
	border-radius: 50%;
	padding: 6px;
	background: rgba(251, 227, 93, 0.15);
}

.faq-section {
	max-width: 900px;
	margin: 0 auto 40px;
	padding: 0 16px;
}

.faq-section h2 {
	font-size: 1.12rem;
	margin-top: 28px;
	margin-bottom: 12px;
	text-align: left;
}

/* Guías largas (miparri, elhumo) */
body.guide-page .guide-header {
	text-align: center;
	margin-bottom: 8px;
}

body.guide-page .guide-lead {
	font-size: var(--font-size-base);
	max-width: 900px;
	margin: 0 auto 16px;
	line-height: 1.65;
	color: var(--text-secondary);
}

body.guide-page .guide-main {
	padding-top: 12px;
	padding-bottom: 8px;
}

body.guide-page .guide-article {
	max-width: 1000px;
	margin: 0 auto;
	padding: 0 4px 24px;
	text-align: left;
}

body.guide-page .guide-article p,
body.guide-page .guide-article td {
	margin-bottom: 12px;
}

body.guide-page .guide-section-title {
	font-size: 1.1rem;
	margin: 1.25rem 0 10px;
	color: var(--primary-gold) !important;
	font-weight: 700;
	text-align: left;
}

body.guide-page .guide-article .guide-figure {
	text-align: center;
}

body.guide-page .guide-article img {
	max-width: 100%;
	height: auto;
	border: 2px solid var(--primary-gold);
	border-radius: 8px;
	background: #0b0b0b;
}

body.guide-page .guide-next .highlight p {
	color: var(--text-secondary) !important;
	font-weight: 400 !important;
}

body.guide-page .guide-next .highlight a.button {
	margin-top: 0;
}

.faq-section p {
	text-align: left;
	margin-bottom: 16px;
}

.ref-clients-grid {
	max-width: 1100px;
	margin: 0 auto 40px;
	padding: 0 16px;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
	align-items: center;
}

.ref-clients-grid img {
	max-height: 100px;
	width: auto;
	max-width: 160px;
	object-fit: contain;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(251, 227, 93, 0.35);
	border-radius: 8px;
	padding: 8px;
}

footer p {
	font-size: var(--font-size-body-sm) !important;
	line-height: 1.6 !important;
}

/* ============================================
   PIE COMÚN — contacto, WhatsApp, redes
   ============================================ */

.site-footer {
	background: var(--nav-dark);
	border-top: 3px solid var(--primary-gold);
	padding: 20px 16px 24px;
	text-align: center;
	box-shadow: inset 0 2px 12px rgba(251, 227, 93, 0.08);
}

.site-footer * {
	text-align: center;
}

.site-footer-contact {
	font-size: var(--font-size-body-sm) !important;
	line-height: 1.55 !important;
	color: var(--text-secondary) !important;
	margin: 0 0 12px !important;
	text-align: center !important;
}

.site-footer-contact a {
	font-weight: 600 !important;
}

.site-footer-sep {
	opacity: 0.65;
}

.site-footer-social {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 10px 14px;
	margin: 0 0 14px;
}

.site-footer-iconlink {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	color: var(--primary-gold) !important;
	text-decoration: none !important;
	border-radius: 50%;
	background: rgba(251, 227, 93, 0.08);
	border: 1px solid rgba(251, 227, 93, 0.35);
	transition: var(--transition-fast);
}

.site-footer-iconlink:hover,
.site-footer-iconlink:focus {
	color: var(--header-black) !important;
	background: var(--primary-gold);
	border-color: var(--primary-gold);
	transform: translateY(-1px);
}

.site-footer-iconlink svg {
	width: 15px;
	height: 15px;
	display: block;
	fill: currentColor;
}

.site-footer-ship {
	font-size: var(--font-size-body-sm) !important;
	margin: 0 0 8px !important;
	color: var(--primary-gold) !important;
	text-align: center !important;
}

.site-footer-tagline {
	font-size: var(--font-size-body-sm) !important;
	line-height: 1.5 !important;
	color: var(--text-tertiary) !important;
	margin: 0 !important;
	max-width: 640px;
	margin-left: auto !important;
	margin-right: auto !important;
	text-align: center !important;
}

/* Nosotros: cuerpo 12–14px, bloques más densos y mejor uso del ancho */
body.page-nosotros .nosotros-body {
	max-width: 960px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px 16px;
	align-content: start;
}

body.page-nosotros .nosotros-body > .section-title {
	grid-column: 1 / -1;
	margin-bottom: 8px;
}

body.page-nosotros .nosotros-body > .highlight-box {
	grid-column: 1 / -1;
}

body.page-nosotros .nosotros-body p,
body.page-nosotros .nosotros-body li {
	font-size: var(--font-size-base) !important;
	line-height: 1.6 !important;
}

body.page-nosotros .nosotros-body .about-section strong {
	font-size: var(--font-size-base);
}

body.page-nosotros .highlight-box p {
	font-size: var(--font-size-base) !important;
	line-height: 1.6 !important;
}

body.page-nosotros .highlight-box h2 {
	font-size: 1.1rem;
}

@media (max-width: 768px) {
	body.page-nosotros .nosotros-body {
		grid-template-columns: 1fr;
		gap: 10px;
	}
}
