/*
 * Main stylesheet for Sistemas Integrales del Mayab clone.
 * This stylesheet endeavours to match the layout and colour palette
 * of the original landing page as closely as possible. Colours,
 * typography, spacing and component styles have been derived
 * through visual inspection of the original site.
 */

/* CSS variables for common colours */
:root {
	--color-dark: #031e3e; /* dark navy used in footer and top bar */
	--color-primary: #02499b; /* primary blue for headings and buttons */
	--color-secondary: #0a3d79; /* deeper blue used for backgrounds */
	--color-light: #f5f8fd; /* light background for sections */
	--color-accent: #115eb8; /* accent blue for lines and highlights */
	--color-gallery-bg: #eef6fc; /* light blue for gallery section */
	--color-text: #0d214d; /* dark text colour */
	--color-gray: #6b7280; /* muted text colour */
	--radius-base: 8px;
	--transition: 0.3s ease;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	font-family: "Poppins", sans-serif;
	color: var(--color-text);
	background-color: #ffffff;
	line-height: 1.6;
	scroll-behavior: smooth;
	overflow-x: hidden;
}

a {
	text-decoration: none;
	color: inherit;
}

/* Top Info Bar */
.info-bar {
	background-color: var(--color-dark);
	color: #ffffff;
	font-size: 0.85rem;
}
.info-container {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.5rem 1rem;
}
.info-left span {
	margin-right: 1.5rem;
	display: inline-flex;
	align-items: center;
}
.info-left i {
	margin-right: 0.4rem;
}
.info-right a {
	margin-left: 0.8rem;
	color: #ffffff;
	transition: var(--transition);
}
.info-right a:hover {
	color: var(--color-primary);
}

/* Navigation */
.main-nav {
	background-color: #ffffff;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	position: sticky;
	top: 0;
	z-index: 100;
}
.nav-container {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 1rem;
}
.site-name {
	font-size: 1.3rem;
	font-weight: 600;
	color: var(--color-text);
}
.nav-links ul {
	list-style: none;
	display: flex;
	align-items: center;
}
.nav-links ul li {
	margin-left: 1.5rem;
}
.nav-links ul li a {
	font-size: 0.95rem;
	font-weight: 500;
	color: var(--color-text);
	transition: var(--transition);
	position: relative;
}
.nav-links ul li a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -4px;
	width: 100%;
	height: 2px;
	background-color: var(--color-primary);
	transform: scaleX(0);
	transform-origin: left;
	transition: var(--transition);
}
.nav-links ul li a:hover::after {
	transform: scaleX(1);
}
.btn-primary {
	background-color: var(--color-primary);
	color: #ffffff;
	padding: 0.6rem 1.2rem;
	border-radius: var(--radius-base);
	font-weight: 500;
	transition: var(--transition);
	display: inline-block;
}
.btn-primary:hover {
	background-color: var(--color-secondary);
}

/* General section container */
.section {
	padding: 4rem 1rem;
}
.container {
	max-width: 1200px;
	margin: 0 auto;
}

/* Hero Section */
#inicio {
	position: relative;
	background-color: var(--color-light);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	padding: 3rem 1rem;
	background-image: url("/images/riveira-maya.gif");
	background-repeat: no-repeat;
	background-size: cover;
	background-position: center;
}
#inicio .hero-content {
	flex: 1 1 50%;
	max-width: 50%;
	padding: 1rem;
	position: relative;
}
#inicio .hero-box {
	border: 6px solid var(--color-primary);
	padding: 2rem;
	background-color: #ffffff;
	max-width: 520px;
}
#inicio .hero-box h4 {
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--color-primary);
	letter-spacing: 1px;
	text-transform: uppercase;
	margin-bottom: 0.5rem;
}
#inicio .hero-box h1 {
	font-size: 2.5rem;
	font-weight: 700;
	color: var(--color-text);
	margin-bottom: 1rem;
	line-height: 1.3;
}
#inicio .hero-box .divider {
	width: 60%;
	height: 4px;
	background-color: var(--color-primary);
	margin: 1rem 0;
}
#inicio .hero-box p {
	color: var(--color-gray);
	margin-bottom: 2rem;
	line-height: 1.5;
}
#inicio .hero-box .btn-primary {
	padding: 0.8rem 1.6rem;
	font-size: 1rem;
}
#inicio .hero-image {
	flex: 1 1 50%;
	max-width: 50%;
	padding: 1rem;
}
#inicio .hero-image img {
	width: 100%;
	height: auto;
	border-radius: var(--radius-base);
	object-fit: cover;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* About / Experience Section */
#nosotros {
	background-color: #ffffff;
}
#nosotros .experience-wrapper {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	padding: 4rem 1rem;
	max-width: 1200px;
	margin: 0 auto;
}
#nosotros .exp-image {
	flex: 1 1 30%;
	max-width: 30%;
	position: relative;
	padding: 1rem;
}
#nosotros .exp-image img {
	width: 100%;
	border-radius: var(--radius-base);
	object-fit: cover;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
#nosotros .dark-block {
	position: absolute;
	bottom: -2rem;
	left: 10%;
	width: 40%;
	height: 40%;
	background-color: var(--color-dark);
	border-radius: var(--radius-base);
	z-index: -1;
}
#nosotros .exp-card {
	position: absolute;
	bottom: -3rem;
	left: 35%;
	transform: translateX(-50%);
	background-color: var(--color-primary);
	color: #ffffff;
	padding: 2rem;
	border-radius: var(--radius-base);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
	text-align: center;
	width: 200px;
}
#nosotros .exp-card span {
	display: block;
	font-size: 3rem;
	font-weight: 700;
	margin-bottom: 0.3rem;
}
#nosotros .exp-content {
	flex: 1 1 70%;
	max-width: 70%;
	padding: 1rem;
}
#nosotros .exp-content h5 {
	font-size: 0.9rem;
	font-weight: 500;
	color: var(--color-primary);
	letter-spacing: 1px;
	text-transform: uppercase;
	margin-bottom: 0.5rem;
}
#nosotros .exp-content h2 {
	font-size: 2.2rem;
	font-weight: 700;
	margin-bottom: 1rem;
	line-height: 1.3;
	color: var(--color-text);
}
#nosotros .exp-content p {
	color: var(--color-gray);
	margin-bottom: 1.5rem;
	line-height: 1.5;
}
#nosotros .features {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
}
#nosotros .feature {
	display: flex;
	align-items: flex-start;
	gap: 0.8rem;
	flex: 1 1 45%;
}
#nosotros .feature .icon {
	font-size: 2rem;
	color: var(--color-primary);
}
#nosotros .feature h4 {
	font-size: 1.1rem;
	font-weight: 600;
	margin-bottom: 0.3rem;
	color: var(--color-text);
}
#nosotros .feature p {
	font-size: 0.9rem;
	color: var(--color-gray);
}
#nosotros .btn-primary {
	margin-top: 2rem;
	padding: 0.8rem 1.6rem;
}

/* Services Section */
#servicios {
	background-image: url("../images/services-bg.jpg");
	background-size: cover;
	background-position: center;
	color: var(--color-text);
	position: relative;
	padding: 4rem 1rem;
	overflow: hidden;
}
#servicios::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(255, 255, 255, 0.9);
	z-index: 0;
}
#servicios .services-container {
	position: relative;
	z-index: 1;
	max-width: 1200px;
	margin: 0 auto;
}
#servicios h3 {
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--color-primary);
	text-align: center;
	margin-bottom: 0.5rem;
}
#servicios h2 {
	font-size: 2.3rem;
	font-weight: 700;
	text-align: center;
	color: var(--color-text);
	margin-bottom: 1.5rem;
	line-height: 1.3;
}
#servicios p.section-description {
	max-width: 800px;
	margin: 0 auto 2rem auto;
	text-align: center;
	color: var(--color-gray);
	line-height: 1.5;
}
.services-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 2rem;
}
.service-card {
	background-color: #ffffff;
	border-radius: var(--radius-base);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
	padding: 2rem 1.5rem;
	position: relative;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.service-card.featured {
	background-color: var(--color-primary);
	color: #ffffff;
}
.service-card.featured h4,
.service-card.featured p {
	color: #ffffff;
}
.service-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
.service-card .icon-wrapper {
	width: 48px;
	height: 48px;
	background-color: var(--color-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	margin-bottom: 1rem;
}
.service-card.featured .icon-wrapper {
	background-color: #ffffff;
}
.service-card .icon-wrapper i {
	color: #ffffff;
	font-size: 1.5rem;
}
.service-card.featured .icon-wrapper i {
	color: var(--color-primary);
}
.service-card h4 {
	font-size: 1.2rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: var(--color-text);
}
.service-card p {
	color: var(--color-gray);
	font-size: 0.9rem;
	line-height: 1.4;
}

/* Gallery Section */
#galeria {
	background-color: var(--color-gallery-bg);
	padding: 4rem 1rem;
}
#galeria h3 {
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: var(--color-primary);
	text-align: center;
	margin-bottom: 0.5rem;
}
#galeria h2 {
	font-size: 2.3rem;
	font-weight: 700;
	text-align: center;
	color: var(--color-text);
	margin-bottom: 1rem;
}
#galeria p.section-description {
	max-width: 800px;
	margin: 0 auto 2rem auto;
	text-align: center;
	color: var(--color-gray);
	line-height: 1.5;
}
.gallery-line {
	width: 100px;
	height: 4px;
	background-color: var(--color-primary);
	margin: 0 auto 2rem auto;
}
.gallery-grid {
	max-width: 1000px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.5rem;
}
.gallery-grid img {
	width: 100%;
	height: 200px;
	object-fit: cover;
	border-radius: var(--radius-base);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Testimonials Section */
#testimonios {
	background-color: #ffffff;
	padding: 4rem 1rem;
}
#testimonios h3 {
	text-transform: uppercase;
	font-size: 0.9rem;
	letter-spacing: 1px;
	color: var(--color-primary);
	text-align: center;
	margin-bottom: 0.5rem;
}
#testimonios h2 {
	font-size: 2.3rem;
	font-weight: 700;
	text-align: center;
	color: var(--color-text);
	margin-bottom: 1.5rem;
	line-height: 1.3;
}
.testimonials-grid {
	max-width: 1100px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 2rem;
}
.testimonial-card {
	background-color: var(--color-light);
	border-radius: var(--radius-base);
	padding: 2rem;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
	position: relative;
}
.testimonial-card .quote-icon {
	position: absolute;
	top: 1rem;
	right: 1rem;
	font-size: 2rem;
	color: var(--color-primary);
}
.testimonial-card .avatar {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	object-fit: cover;
	margin-bottom: 1rem;
}
.testimonial-card .stars {
	color: #f5b014;
	margin-bottom: 0.5rem;
}
.testimonial-card p {
	color: var(--color-gray);
	font-size: 0.9rem;
	line-height: 1.4;
	margin-bottom: 1rem;
}
.testimonial-card .name {
	font-weight: 600;
	color: var(--color-text);
	margin-bottom: 0.2rem;
}
.testimonial-card .position {
	font-size: 0.8rem;
	color: var(--color-primary);
}

/* Contact Section */
#contacto {
	position: relative;
	background-image: url("../images/contact-bg.jpg");
	background-size: cover;
	background-position: center;
	color: #ffffff;
	padding: 4rem 1rem;
	overflow: hidden;
}
#contacto::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(3, 30, 62, 0.7);
	z-index: 0;
}
#contacto .contact-container {
	position: relative;
	z-index: 1;
	max-width: 1200px;
	margin: 0 auto;
}
#contacto .contact-header h3 {
	font-size: 0.9rem;
	letter-spacing: 1px;
	text-transform: uppercase;
	color: var(--color-primary);
	margin-bottom: 0.5rem;
}
#contacto .contact-header h2 {
	font-size: 2.2rem;
	font-weight: 700;
	margin-bottom: 1rem;
	color: #ffffff;
}
#contacto .contact-header p {
	max-width: 800px;
	margin-bottom: 2rem;
	color: #e2e8f0;
	line-height: 1.5;
}
#contacto .contact-row {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
}
#contacto .contact-card {
  position: relative;
	flex: 1 1 40%;
	background-color: rgba(3, 30, 62, 0.85);
	padding: 2rem;
	border-radius: var(--radius-base);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	z-index: 1;
}
#contacto .contact-card .background-data {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("https://imagedelivery.net/xaKlCos5cTg_1RWzIu_h-A/de9ddb75-747b-4b52-9955-8c9c0595d400/public");
	object-fit: cover;
	background-position: center;
	background-size: cover;
	filter: blur(5px) brightness(0.3);
  z-index: 0;
}
#contacto .contact-card .info-data {
  position: relative;
  z-index: 1;
}
#contacto .contact-card h4 {
	font-size: 1.4rem;
	font-weight: 600;
	margin-bottom: 1rem;
	color: #ffffff;
}
#contacto .contact-card ul {
	list-style: none;
}
#contacto .contact-card li {
	margin-bottom: 0.8rem;
	font-size: 0.9rem;
	color: #e2e8f0;
}
#contacto .contact-card li i {
	margin-right: 0.6rem;
	color: var(--color-primary);
}
#contacto .contact-form {
	flex: 1 1 55%;
	background-color: rgba(255, 255, 255, 0.95);
	padding: 2rem;
	border-radius: var(--radius-base);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	color: var(--color-text);
}
#contacto .contact-form form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1rem;
}
#contacto .contact-form form .full-width {
	grid-column: 1 / -1;
}
#contacto .contact-form label {
	font-size: 0.85rem;
	font-weight: 500;
	color: var(--color-text);
	margin-bottom: 0.3rem;
	display: block;
}
#contacto .contact-form input,
#contacto .contact-form textarea {
	width: 100%;
	padding: 0.7rem 1rem;
	border: none;
	background-color: #f5f8fd;
	border-radius: var(--radius-base);
	font-size: 0.9rem;
	color: var(--color-text);
	outline: none;
}
#contacto .contact-form textarea {
	height: 150px;
	resize: vertical;
}
#contacto .contact-form button {
	grid-column: 1 / -1;
	background-color: var(--color-primary);
	color: #ffffff;
	padding: 0.8rem 1.6rem;
	border: none;
	border-radius: var(--radius-base);
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	transition: var(--transition);
}
#contacto .contact-form button:hover {
	background-color: var(--color-secondary);
}

/* Footer */
.site-footer {
	background-color: var(--color-dark);
	color: #ffffff;
	padding: 4rem 1rem 2rem;
}
.footer-container {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 2rem;
}
.footer-column h2,
.footer-column h3 {
	margin-bottom: 1rem;
	font-size: 1.2rem;
	font-weight: 600;
}
.footer-column p {
	font-size: 0.9rem;
	line-height: 1.5;
	color: #cbd5e1;
}
.footer-column ul {
	list-style: none;
}
.footer-column li {
	margin-bottom: 0.5rem;
	font-size: 0.9rem;
	color: #cbd5e1;
}
.footer-column li i {
	margin-right: 0.5rem;
	color: var(--color-primary);
}
.footer-column a {
	color: #cbd5e1;
	transition: var(--transition);
}
.footer-column a:hover {
	color: var(--color-primary);
}
.footer-social a {
	margin-right: 0.8rem;
	color: #cbd5e1;
	font-size: 1.1rem;
	transition: var(--transition);
}
.footer-social a:hover {
	color: var(--color-primary);
}
.footer-bottom {
	text-align: center;
	margin-top: 2rem;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-top: 1rem;
	font-size: 0.8rem;
	color: #94a3b8;
}

/* Gallery page hero */
.gallery-hero {
	background-color: var(--color-gallery-bg);
	padding: 4rem 1rem 3rem;
	text-align: center;
}
.gallery-hero h1 {
	font-size: 2.4rem;
	font-weight: 700;
	color: var(--color-text);
	margin-bottom: 1rem;
}
.gallery-hero p {
	max-width: 700px;
	margin: 0 auto 2rem auto;
	color: var(--color-gray);
	line-height: 1.5;
}
.gallery-hero .btn-group {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 1rem;
}

/* Gallery cards (projects) */
.projects-section {
	padding: 4rem 1rem;
	background-color: #ffffff;
}
.projects-grid {
	max-width: 1200px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 2rem;
}
.project-card {
	background-color: var(--color-light);
	border-radius: var(--radius-base);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	transition: var(--transition);
}
.project-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}
.project-card img {
	width: 100%;
	height: 180px;
	object-fit: cover;
}
.project-card .card-body {
	padding: 1.5rem;
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}
.project-card h4 {
	font-size: 1.2rem;
	font-weight: 600;
	margin-bottom: 0.5rem;
	color: var(--color-text);
}
.project-card p {
	font-size: 0.9rem;
	color: var(--color-gray);
	flex: 1;
	margin-bottom: 1rem;
}
.project-card .btn-secondary {
	background-color: var(--color-primary);
	color: #ffffff;
	padding: 0.5rem 1rem;
	border-radius: var(--radius-base);
	font-size: 0.9rem;
	font-weight: 500;
	display: inline-block;
	transition: var(--transition);
}
.project-card .btn-secondary:hover {
	background-color: var(--color-secondary);
}

/* Modal styles for gallery (reuse from previous project) */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 1000;
}
.overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  background-color: #ffffff;
  border-radius: var(--radius-base);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  max-width: 90%;
  max-height: 90%;
  overflow: auto;
  opacity: 0;
  visibility: hidden;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 1001;
}
.modal.active {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}
.modal .modal-content {
  position: relative;
  padding: 1rem;
}
.modal .modal-content img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-base);
}
.modal .close-button {
  position: absolute;
  top: 0rem;
  right: 0rem;
  font-size: 1.5rem;
  color: var(--color-dark);
  cursor: pointer;
  z-index: 1000;
}

/* Carousel styles for gallery modal */
.modal .carousel {
  position: relative;
  overflow: hidden;
  min-width: 275px;
  width: 80vw;
}
.modal .carousel .slide {
  width: 100%;
  display: none;
  border-radius: var(--radius-base);
}
.modal .carousel .slide.active {
  display: block;
}
.modal .carousel-button {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  font-size: 2rem;
  padding: 0.4rem 0.6rem;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  line-height: 1;
}
.modal .carousel-button.prev {
  left: 0.5rem;
}
.modal .carousel-button.next {
  right: 0.5rem;
}

.modal .carousel img {
	object-fit: cover;
	aspect-ratio: 16/10;
	max-height: 70vh;
}

/* Responsive tweaks */
@media (max-width: 992px) {
	#inicio .hero-content,
	#inicio .hero-image {
		max-width: 100%;
		flex: 1 1 100%;
	}
	#nosotros .exp-image,
	#nosotros .exp-content {
		max-width: 100%;
		flex: 1 1 100%;
	}
	#nosotros .exp-card {
		left: 50%;
	}
	#contacto .contact-row {
		flex-direction: column;
	}
	#contacto .contact-card,
	#contacto .contact-form {
		flex: 1 1 100%;
	}
}

@media (max-width: 552px) {
	.nav-links ul li a {
		font-size: 0.7rem;
	}

	.nav-container {
		flex-direction: column;
	}

	.nav-left {
		img {
			height: 30px;
		}
	}

	.nav-right {
		font-size: 0.5rem;
	}

	.info-left {
		font-size: 0.75rem;
	}
}
