/* --- CONFIGURACIÓN GENERAL --- */
:root {
	/* --- TIPOGRAFÍAS --- */
	--font-serif: "Cormorant Garamond", serif;
	--font-sans: "United Sans", "Inter", sans-serif;
	/* --- PALETA DE COLORES --- */
	--bg-primary: #fafafa;
	--text-main: #33302e;
	--text-muted: #4d4338;
	--border-color: #baae8a;
	--accent-color: #e2e3ff;
}

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

body {
	background-color: var(--bg-primary);
	color: var(--text-main);
	font-family: var(--font-sans);
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

/* --- 2. HEADER Y NAVEGACIÓN --- */
.site-header {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 32px;
	padding: 36px 64px;
	background-color: transparent;
	z-index: 10;
}

.logo {
	flex-shrink: 0; /* Evita que el nombre se aplaste si el menú es largo */
}

.logo a {
	display: inline-block;
	font-family: var(--font-serif); /* O var(--font-sans) si prefieres palo seco */
	font-size: 32px;
	font-weight: 400;
	line-height: 1.1;
	text-decoration: none;
	color: #ffffff;
	letter-spacing: 1.5px;
	text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.main-nav {
	display: flex;
	align-items: center;
	gap: 40px;
}

.main-nav a {
	text-decoration: none;
	font-family: var(--font-sans);
	font-size: 15px;
	font-weight: 300;
	color: #ffffff;
	transition:
		opacity 0.3s ease,
		border-color 0.3s ease;
	letter-spacing: 1px;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
	white-space: nowrap;
}

.main-nav a:hover,
.main-nav a.active {
	border-bottom: 1px solid #ffffff;
	padding-bottom: 4px;
}

/* --- 3. PORTADA / HERO --- */
.hero-container {
	position: relative;
	width: 100%;
	height: 550px;
	margin: 0;
	padding: 0;
	overflow: hidden;
}

/* Oscurece ligeramente la parte superior para que el logo y el menú siempre se lean bien */
.hero-container::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(to bottom, rgba(0, 0, 0, 0.42) 0%, rgba(0, 0, 0, 0.12) 45%, rgba(0, 0, 0, 0) 100%);
	pointer-events: none;
	z-index: 2;
}

.hero-image-wrapper {
	width: 100%;
	height: 100%;
	overflow: hidden;
}

.hero-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	display: block;
}

/* --- 4. FOOTER --- */
.site-footer {
	display: block;
	margin-top: auto;
	text-align: center;
	padding: 24px;
	font-size: 12px;
	font-family: var(--font-sans);
	color: var(--text-muted);
	background-color: var(--bg-primary);
}

/* --- 5. ESTILOS PARA PÁGINAS INTERIORES --- */
.site-header-interior {
	position: relative !important;
	background-color: var(--bg-primary);
}

.site-header-interior .logo a,
.site-header-interior .main-nav a {
	color: var(--text-main) !important;
	text-shadow: none !important;
}

.site-header-interior .main-nav a:hover,
.site-header-interior .main-nav a.active {
	border-bottom: 1px solid var(--border-color);
	opacity: 1;
}

/* --- 6. SECCIÓN PORTAFOLIO Y SUBMENÚ --- */
.portfolio-container {
	max-width: 1400px;
	width: 100%;
	margin: 0 auto;
	padding: 40px 64px 80px 64px;
	flex: 1;
}

.portfolio-subnav {
	position: sticky;
	top: 0;
	z-index: 850;
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 40px;
	margin-bottom: 60px;
	padding: 18px 20px;
	background-color: rgba(250, 250, 250, 0.94);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid rgba(51, 48, 46, 0.08);
	transition:
		padding 0.3s ease,
		box-shadow 0.3s ease;
}

.portfolio-subnav:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.subnav-link {
	background: none;
	border: none;
	cursor: pointer;
	text-decoration: none;
	font-family: var(--font-sans);
	font-size: 13px;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--text-muted);
	transition:
		color 0.3s ease,
		border-color 0.3s ease;
	padding-bottom: 4px;
}

.subnav-link:hover,
.subnav-link.active {
	color: var(--text-main);
	border-bottom: 1px solid var(--border-color);
}

/* --- 7. CSS GRID DE FOTOS --- */
.portfolio-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 5px;
	margin-bottom: 10px;
	align-items: center;
}

.gallery-item {
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.4s ease;
}

.gallery-item.hidden {
	display: none !important;
}

.gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	display: block;
	transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* --- 8. ESTILOS PARA LA PÁGINA ABOUT --- */
.about-container {
	max-width: 1400px;
	width: 100%;
	margin: 0 auto;
	padding: 60px 64px 100px 64px;
	flex: 1;
}

.about-grid {
	display: grid;
	grid-template-columns: 1fr 1.2fr;
	gap: 80px;
	align-items: center;
}

.about-image-wrapper {
	width: 100%;
	height: 600px;
	overflow: hidden;
}

.about-image-wrapper img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.about-text-content {
	display: flex;
	flex-direction: column;
	gap: 24px;
	text-align: center;
}

.about-title {
	font-family: var(--font-serif);
	font-size: 55px;
	font-weight: 400;
	letter-spacing: 2px;
	color: var(--text-main);
	margin-bottom: 50px;
	text-align: center;
}

.about-description {
	display: flex;
	flex-direction: column;
	gap: 16px;
	font-size: 15px;
	line-height: 1.8;
	color: var(--text-main);
}

/* --- 9. ESTILOS PARA LA PÁGINA CONTACTO --- */
.contact-container {
	max-width: 1400px;
	width: 100%;
	margin: 0 auto;
	padding: 60px 64px 100px 64px;
	flex: 1;
}

.contact-grid {
	display: grid;
	grid-template-columns: 1fr 1.2fr;
	gap: 80px;
	align-items: start;
}

.contact-title {
	font-family: var(--font-serif);
	font-size: 42px;
	font-weight: 400;
	letter-spacing: 1px;
	color: var(--text-main);
	margin-bottom: 16px;
}

.contact-intro {
	font-size: 15px;
	line-height: 1.8;
	color: var(--text-muted);
	margin-bottom: 32px;
}

.contact-details {
	display: flex;
	flex-direction: column;
	gap: 12px;
	font-size: 14px;
	color: var(--text-main);
	border-top: 1px solid var(--border-color);
	padding-top: 24px;
}

.contact-form {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.form-group label {
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--text-muted);
}

.form-group input,
.form-group textarea {
	background: transparent;
	border: none;
	border-bottom: 1px solid var(--border-color);
	padding: 10px 0;
	font-family: var(--font-sans);
	font-size: 15px;
	color: var(--text-main);
	outline: none;
	transition: border-color 0.3s ease;
	resize: vertical;
}

.form-group input:focus,
.form-group textarea:focus {
	border-bottom: 1px solid var(--text-main);
}

.error-msg {
	font-size: 12px;
	color: #9e3b33;
	min-height: 16px;
}

.btn-submit {
	align-self: flex-start;
	background-color: var(--text-main);
	color: var(--bg-primary);
	border: 1px solid var(--text-main);
	padding: 14px 36px;
	font-family: var(--font-sans);
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 1.5px;
	cursor: pointer;
	transition:
		background-color 0.3s ease,
		color 0.3s ease;
}

.btn-submit:hover {
	background-color: transparent;
	color: var(--text-main);
}

.form-feedback {
	font-size: 14px;
	color: var(--text-main);
	margin-top: 8px;
}

/* =========================================================
   10. DISEÑO RESPONSIVE (TABLET Y MÓVIL)
   ========================================================= */
@media (max-width: 1024px) {
	.site-header {
		padding: 32px 32px;
	}

	.logo a {
		font-size: 26px;
	}

	.main-nav {
		gap: 24px;
	}

	.portfolio-container,
	.about-container,
	.contact-container {
		padding: 40px 32px 80px 32px;
	}

	.about-grid,
	.contact-grid {
		gap: 40px;
	}

	.about-image-wrapper {
		height: 550px;
	}
}

@media (max-width: 768px) {
	.site-header {
		flex-direction: column;
		gap: 16px;
		padding: 24px 20px;
		text-align: center;
	}

	.logo a {
		font-size: 22px;
	}

	.main-nav {
		gap: 20px;
		flex-wrap: wrap;
		justify-content: center;
	}

	.main-nav a {
		font-size: 13px;
	}

	.hero-container {
		height: 380px;
	}

	.portfolio-container,
	.about-container,
	.contact-container {
		padding: 24px 20px 60px 20px;
	}

	.portfolio-subnav {
		gap: 24px;
		margin-bottom: 36px;
	}

	.portfolio-grid {
		grid-template-columns: 1fr;
		gap: 24px;
		margin-bottom: 48px;
	}

	.gallery-item {
		aspect-ratio: auto;
		height: 420px;
	}

	.about-grid,
	.contact-grid {
		grid-template-columns: 1fr;
		gap: 40px;
	}

	.about-image-wrapper {
		height: 450px;
	}

	.about-title,
	.contact-title {
		font-size: 32px;
	}

	.btn-submit {
		width: 100%;
		text-align: center;
	}
}
