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

:root {
    --primary: #114374;
    --secondary: #0e2a47;
    --accent: #4da8f7;
    --light: #f8f9fb;
    --dark: #09203f;
    --gray: #6c757d;

    /* legacy names mapped to new blue palette to avoid changing many selectors */
    --color-rojo: var(--primary);
    --rojo: var(--primary);

    /* Para la marquesina de marcas */
	/* --marquee-width: 1600px; */
	--marquee-width: 100%;
	--marquee-height: 25vh;
	--marquee-elements: 3; /* defined with JavaScript */
	--marquee-elements-displayed: 3;
	--marquee-element-width: calc(var(--marquee-width) / var(--marquee-elements-displayed));
	--marquee-animation-duration: calc(var(--marquee-elements) * 1.5s);
}

@font-face {
    font-family: 'MontserratBold';
    src: url('fonts/Montserrat-Bold.woff2') format('woff2');
    src: url('fonts/Montserrat-Bold.woff') format('woff');
}

@font-face {
    font-family: 'RobotoRegular';
    src: url('fonts/Roboto.woff2') format('woff2');
    src: url('fonts/Roboto.woff') format('woff');
}

@font-face {
    font-family: 'Kaushan';
    src: url('fonts/Kaushan.woff2') format('woff2');
    src: url('fonts/Kaushan.woff') format('woff');
}

body {
    font-family: 'RobotoRegular', Roboto, system-ui, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    overflow-x: hidden;
}

/* Header */
header {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
}

.logo img {
    height: 50px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-size: 1.2rem;
    transition: color 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--dark);
    margin: 3px 0;
    transition: 0.3s;
}

/* Hero Section */
.hero {
    height: 100dvh;
    min-height: 750px;
    background: linear-gradient(135deg, rgba(85, 37, 83, 1) 15%, rgba(11, 94, 215, 0.8) 100%);
    color: var(--light);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url(../images/sistemas-anti-incendios-innovamod.jpg);
    background-size: cover;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    padding: 6rem 0 0 4rem;
    z-index: 1;
}

.hero h1 {
    font-family: 'MontserratBold';
    font-size: 4.5rem;
    margin-bottom: 1.5rem;
    line-height: 1;
    max-width: 700px;
    animation: fadeInUp 1s ease;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 700px;
    animation: fadeInUp 1s ease 0.4s both;
}

.hero p.hero-subtitle {
    font-family: 'Kaushan';
    font-size: 1.3rem;
    margin-bottom: 1rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease 0.2s both;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 1s ease 0.6s both;
}

.btn {
    padding: 1rem 2.5rem;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    color: var(--light);
    background-image: linear-gradient(135deg, #63a4ff 0%, #0b5ed7 100%);
    box-shadow: 0 20px 30px -6px rgba(11, 94, 215, 0.25);
}

.btn-primary:hover {
    transform: translateY(3px);
    box-shadow: none;
}

.btn-primary:active {
  opacity: 0.5;
}

.btn-secondary {
    background: transparent;
    color: var(--light);
    border: 2px solid white;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.8);
    color: var(--primary);
}

/* Benefits Section */
.benefits {
    padding: 80px 2rem;
    background: var(--light);
}

.benefits h2,
.services h2,
.gallery h2,
.nuestros-clientes h2,
.sistemas-contra-incendio h2 {
    font-family: 'Kaushan';
    font-size: 1.5em;
}

.benefits h3,
.services h3,
.gallery h3,
.nuestros-clientes h3,
.sistemas-contra-incendio h3 {
    font-family: 'MontserratBold';
    font-size: 1.875em;
    text-transform: uppercase;
    text-align: center;
    color: var(--gray);
}
.benefits h3::after,
.services h3::after,
.gallery h3::after,
.nuestros-clientes h3::after,
.sistemas-contra-incendio h3::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 1rem auto 1.5rem;
}

.benefit-title {
    font-size: 1.25rem;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.benefit-title::after {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--secondary);
    margin: 0.5rem auto 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

.section-subtitle {
    text-align: center;
    color: var(--gray);
    margin-bottom: 4rem;
    font-size: 1.2rem;
}

.benefits-grid {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.benefit-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
}

.benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.benefit-icon {
    text-align: center;
    margin-bottom: 1.5rem;
}

.benefit-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary);
}

/* Services Section */
.services {
    padding: 80px 2rem;
    background: white;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.service-item {
    background-color: transparent;
    perspective: 1000px;
    cursor: pointer;
    height: 200px;
}

.service-item.featured {
    transform: translateY(-8px);
    box-shadow: 0 24px 48px rgba(11,94,215,0.14);
    z-index: 2;
}
.service-item.featured .flip-card-front {
    color: var(--light);
    background: linear-gradient(135deg, rgba(11,94,215,0.95) 0%, var(--primary) 100%);
}
.service-item.featured .flip-card-front .service-card-title {
    color: var(--light);
}
.service-item.featured .flip-card-back {
    color: var(--light);
    background: linear-gradient(120deg, var(--secondary) 10%, rgba(11,94,215,0.9) 100%);
}

.service-card-title {
    font-size: 1.5em;
    font-weight: 900;
    text-align: center;
    margin: 0;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.service-item:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front, .flip-card-back {
  box-shadow: 0 8px 14px 0 rgba(0,0,0,0.2);
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 15px;
}

.flip-card-front {
    color: var(--dark);
    background: linear-gradient(120deg, var(--light) 60%, rgb(235, 245, 255) 88%,
         rgb(220, 235, 255) 40%, var(--primary) 48%);
    padding: 0 1.5rem;
}

.flip-card-back {
    font-size: 1.1em;
    color: var(--light);
    text-align: left;
    padding: 1.5rem;
    background: linear-gradient(120deg, var(--primary) 30%, rgb(210, 235, 255) 88%,
     rgb(240, 250, 255) 40%, var(--secondary) 48%);
    transform: rotateY(180deg);
}


/* Gallery Section */
.gallery {
    padding: 80px 2rem;
    background: var(--secondary);
    color: var(--light);
}
.galeria {
    width: 100%;
    max-width: 950px;
    margin: 0 auto;
    padding: 50px 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    grid-auto-rows: 250px;
    grid-auto-flow: dense;
    gap: 20px;  
}

.galeria .image-box {
    position: relative;
    background-color: var(--secondary);
    border: 2px solid var(--light);
    border-radius: 16px;
    overflow: hidden;
}
  
.galeria .image-box:nth-child( 7n+1 ){
    grid-column: span 2;
    grid-row: span 2;
}
  
.galeria .image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all .5s ease;
}
  
.galeria .image-box img:hover {
    transform: scale(1.5);
}

.btn-play img:hover {
    transform: none;
  }
  
.btn-play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    cursor: pointer;
    object-fit: none;
}
  
@media( max-width:768px ){

    .galeria{
      grid-template-columns: repeat( auto-fit, minmax( 250px, 1fr ));
      grid-auto-rows: 250px;
    }
  
    .galeria .image-box:nth-child( 7n +1 ){
      grid-column: unset;
      grid-row: unset;
    }
}


/* About Section */
.about {
    padding: 80px 2rem;
    background: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--gray);
    line-height: 1.8;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--light);
    border-radius: 10px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary);
}

.stat-label {
    color: var(--gray);
    font-size: 0.9rem;
    text-transform: uppercase;
}

/* Sistemas Contra Incendio */
.sistemas-contra-incendio {
    padding: 80px 2rem;
    background: white;
}
.sistemas-contra-incendio-content {
    color: #adb3b8;
    background-color: var(--secondary);
    line-height: 1.7;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
}
.sistemas-contra-incendio-content p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-align: justify;
}
.texto-sistemas-contra-incendio,
.imagen-sistemas-contra-incendio {
    padding: 2rem;
}
.imagen-sistemas-contra-incendio {
    display: flex;
    justify-content: center;
    align-items: center;
}
.imagen-sistemas-contra-incendio img {
    width: 100%;
    border-radius: 10px;
}

/* CTA Section */
.cta-section {
    padding: 80px 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Marquesina de clientes */
.nuestros-clientes {
    padding: 4rem 0;
    text-align: center;
    background-color: var(--light);
    overflow: hidden;
}
.marquee {
    display: flex;
	justify-content: center;
	padding: 0 0 4rem 0;
	background-color: transparent;

	width: var(--marquee-width);
	height: var(--marquee-height);
	overflow: hidden;
	position: relative;
}
.marquee:before, .marquee:after {
	position: absolute;
	top: 0;
	width: 10rem;
	height: 100%;
	content: "";
	z-index: 1;
}
.marquee:before {
	left: 0;
	background: linear-gradient(to right, var(--light) 0%, transparent 100%);
}
.marquee:after {
	right: 0;
	background: linear-gradient(to left, var(--light) 0%, transparent 100%);
}
.marquee-content {
	list-style: none;
	height: 100%;
	display: flex;
	animation: scrolling var(--marquee-animation-duration) linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

@keyframes scrolling {
	0% { transform: translateX(0); }
	100% { transform: translateX(calc(-1 * var(--marquee-element-width) * var(--marquee-elements))); }
}
.marquee-content li {
	display: flex;
	justify-content: center;
	/* align-items: center; */
	/* text-align: center; */
	flex-shrink: 0;
	/* width: var(--marquee-element-width); */
    padding: 0 2rem;
	/* max-height: 100%; */
	/*font-size: calc(var(--marquee-height)*3/4);*/ /* 5rem; */
	/* white-space: nowrap; */
}
.marquee-content li img {
    object-fit: cover;
    border-radius: 30px;
}
.marquee-content li p {
	font-size: 4.5rem;
	line-height: 1.1;
	color: var(--color-rojo);
	border-bottom: 2px solid var(--color-rojo);
	letter-spacing: -1px;
	padding: 0 2rem;
	margin: 0;
}
@media (max-width: 600px) {
	:root {
	  --marquee-width: 100vw;
	  --marquee-height: 14vh;
	  --marquee-elements-displayed: 3;
	}
	.marquee:before, .marquee:after { width: 5rem; }
}


/* Footer */
footer {
    background: var(--secondary);
    color: white;
    padding: 3rem 2rem 1rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--accent);
}

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
}

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

#contactForm {
    display: flex;
    flex-direction: column;
}

#contactForm label {
    margin-top: 1rem;
}

#contactForm input {
    color: var(--light);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 1rem;
    padding: .75rem;
    background: none;
    outline: none;
    border: none;
    border-bottom: 2px solid var(--light);
}

#contactForm textarea {
    color: var(--light);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 1rem;
    padding: .75rem;
    resize: none;
    field-sizing: content;
    background: none;
    outline: none;
    border: none;
    border-bottom: 2px solid var(--light);
}

.form-btn {
    margin-top: 1.5rem;

    button {
      width: 50%;
      letter-spacing: 2px;
    }
}

.error {
    color: var(--rojo);
    margin-top: -1rem;
    padding-bottom: 1rem;
    display: none;
}

.gracias {
    text-align: center;
    padding: 1rem 0;
    display: none;
}

/*
  Botón flotante de WhatsApp
*/
.btn-whatsapp {
    color: white;
    font-size: 1em;
    /* font-weight: bold; */
    letter-spacing: 1px;
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: .5rem 1rem;
	position: fixed;
	bottom: 4rem;
	right: 0;
	background-color: #0df053;
	border-radius: 50px 0 0 50px;
	box-shadow: 8px 8px 10px rgba(0,0,0,0.3);
	z-index: 10;
    transition: background-color .3s ease;
}
.btn-whatsapp:hover {
	background-color: #0ac244;
}
/*
.btn-whatsapp::before {
    content: "";
    position: absolute;
    height: 100%;
    width: 100%;
    background-color: #b6fbcc;
    border-radius: 50px;
    opacity: 0.7;
}
.btn-whatsapp::before {
    animation: pulse 2s ease-out infinite;
} */
@keyframes pulse {
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}


/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.1);
        padding: 2rem 0;
    }

    .nav-links.active {
        left: 0;
    }

    .menu-toggle {
        display: flex;
    }

    .hero-content {
        padding: 1rem;
        padding-top: 8rem;
    }

   .hero h1 {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .cta-buttons {
        flex-direction: column;
    }

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