/* Base Styles & Typography */
:root {
    --primary-color: #007bff; /* Azul vibrante */
    --secondary-color: #6c757d; /* Gris oscuro */
    --accent-color: #ffc107; /* Amarillo */
    --dark-bg: #212529; /* Fondo oscuro principal */
    --light-bg: #f8f9fa; /* Fondo claro para secciones */
    --text-color: #343a40; /* Color de texto principal */
    --light-text: #f8f9fa; /* Texto para fondos oscuros */
    --border-color: #dee2e6; /* Color de borde */
    --font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
    scroll-behavior: smooth;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

a:hover {
    color: #0056b3;
}

ul {
    list-style: none;
}

h1, h2, h3, h4 {
    margin-bottom: 1rem;
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
    color: var(--light-text);
}

h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    padding-bottom: 10px;
}

h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
}

p {
    margin-bottom: 1rem;
}

.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--light-bg);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--light-text);
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateY(-2px);
}

.btn-call {
    background-color: var(--accent-color);
    color: var(--dark-bg);
    border: 2px solid var(--accent-color);
    margin-left: 20px;
}

.btn-call:hover {
    background-color: #e0a800;
    border-color: #e0a800;
    transform: translateY(-2px);
}

/* Header */
.header {
    background-color: var(--dark-bg);
    color: var(--light-text);
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header .logo {
    display: flex;
    align-items: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--light-text);
}

.header .logo img {
    height: 40px; /* Ajusta el tamaño de tu logo */
    margin-right: 10px;
}

.nav-menu ul {
    display: flex;
}

.nav-menu ul li {
    margin-left: 30px;
}

.nav-menu ul li a {
    color: var(--light-text);
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
    padding-bottom: 5px;
}

.nav-menu ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu ul li a:hover::after,
.nav-menu ul li a.active::after {
    width: 100%;
}

.nav-menu ul li a:hover {
    color: var(--primary-color);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--light-text);
    margin: 4px 0;
    transition: 0.4s;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://via.placeholder.com/1920x1080?text=Fondo+Autos+Cerrajeria') no-repeat center center/cover; /* Reemplaza con una imagen de fondo relevante */
    color: var(--light-text);
    text-align: center;
    padding: 200px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh; /* Ocupa al menos el 100% de la altura de la vista */
    margin-top: -80px; /* Compensa la altura del header fijo */
    position: relative; /* Para el efecto de scroll */
}

.hero-section::before { /* Efecto parallax o superposición */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-attachment: fixed; /* Esto es para parallax */
    background-image: url('https://via.placeholder.com/1920x1080?text=Fondo+Autos+Cerrajeria'); /* Misma imagen que el fondo */
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
    filter: brightness(0.7);
    z-index: -1;
}


.hero-section h1 {
    font-size: 3.8rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-section p {
    font-size: 1.5rem;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* About Section */
.about-section {
    text-align: center;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.feature-item i {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.feature-item h3 {
    font-size: 1.7rem;
    margin-bottom: 10px;
    color: var(--dark-bg);
}

.feature-item p {
    font-size: 1rem;
    color: var(--secondary-color);
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-item {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.service-item i {
    font-size: 3.5rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.service-item h3 {
    font-size: 1.7rem;
    margin-bottom: 10px;
    color: var(--dark-bg);
}

.service-item p {
    font-size: 1rem;
    color: var(--secondary-color);
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.gallery-item {
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item img:hover {
    transform: scale(1.08);
}

/* Testimonials Section */
.testimonial-carousel {
    display: flex;
    overflow-x: hidden; /* Oculta el scrollbar */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 30px;
    position: relative;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.testimonial-item {
    flex: 0 0 100%; /* Cada testimonio ocupa el 100% del ancho */
    width: 100%;
    scroll-snap-align: start;
    padding: 40px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    text-align: center;
    margin: 0 10px; /* Espacio entre los items */
}

.testimonial-item p {
    font-style: italic;
    font-size: 1.1rem;
    color: var(--text-color);
    margin-bottom: 20px;
}

.testimonial-item h4 {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.testimonial-item span {
    font-size: 0.9rem;
    color: var(--secondary-color);
}

.carousel-nav {
    text-align: center;
    margin-top: 20px;
}

.carousel-nav button {
    background-color: var(--primary-color);
    color: var(--light-text);
    border: none;
    padding: 10px 15px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    margin: 0 10px;
    transition: background-color 0.3s ease;
}

.carousel-nav button:hover {
    background-color: #0056b3;
}

/* Contact Section */
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
    align-items: flex-start;
}

.contact-info {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.contact-info h3 {
    color: var(--dark-bg);
    margin-bottom: 25px;
    font-size: 2rem;
}

.contact-info p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    font-size: 1.1rem;
}

.contact-info p i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 15px;
    width: 30px; /* Alinea los íconos */
    text-align: center;
}

.contact-info p a {
    color: var(--text-color);
}

.contact-info p a:hover {
    color: var(--primary-color);
}

.social-links {
    margin-top: 30px;
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: var(--light-text);
    font-size: 1.3rem;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.social-links a:hover {
    background-color: #0056b3;
    transform: translateY(-5px);
}

.contact-form {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.contact-form h3 {
    color: var(--dark-bg);
    margin-bottom: 25px;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: var(--font-family);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25);
}

.contact-form .btn-primary {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
}

.map-container {
    margin-top: 50px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.map-container iframe {
    border-radius: 8px;
}

/* Footer */
.footer {
    background-color: var(--dark-bg);
    color: var(--secondary-color);
    padding: 40px 0;
    text-align: center;
    font-size: 0.9rem;
}

.footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.footer-links {
    display: flex;
    gap: 20px;
}

.footer-links a {
    color: var(--secondary-color);
}

.footer-links a:hover {
    color: var(--primary-color);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInAnimation 1s ease-out forwards;
}

.delay-1 { animation-delay: 0.5s; }
.delay-2 { animation-delay: 1s; }
.delay-3 { animation-delay: 1.5s; }
.delay-4 { animation-delay: 2s; }
.delay-5 { animation-delay: 2.5s; }
.delay-6 { animation-delay: 3s; }


@keyframes fadeInAnimation {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 992px) {
    .header .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px; /* Ajusta según la altura de tu header */
        left: 0;
        background-color: var(--dark-bg);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
        padding: 20px 0;
        z-index: 999;
    }

    .header .nav-menu.active {
        display: flex;
    }

    .nav-menu ul {
        flex-direction: column;
        align-items: center;
    }

    .nav-menu ul li {
        margin: 15px 0;
    }

    .nav-menu ul li a {
        font-size: 1.2rem;
    }

    .btn-call {
        margin-left: 0;
        margin-top: 20px; /* Para que el botón no quede pegado al menú */
    }

    .menu-toggle {
        display: flex;
    }

    .hero-section {
        padding: 150px 0;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section p {
        font-size: 1.2rem;
    }

    .features-grid, .services-grid, .gallery-grid, .contact-grid {
        grid-template-columns: 1fr;
    }

    .feature-item, .service-item, .contact-info, .contact-form, .testimonial-item {
        margin-bottom: 20px;
    }

    .footer .container {
        flex-direction: column;
    }

    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.8rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero-section {
        min-height: 80vh;
    }
    
    /* MODAL GALERIA */
.img-modal{
    display:none;
    position:fixed;
    z-index:9999;
    left:0;
    top:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.9);
    justify-content:center;
    align-items:center;
}

.img-modal img{
    max-width:90%;
    max-height:90%;
    border-radius:8px;
}

.close-btn{
    position:absolute;
    top:20px;
    right:30px;
    color:white;
    font-size:40px;
    cursor:pointer;
}
}