@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;700&family=Roboto:wght@300;400;500&display=swap');

:root {
    /* Colors */
    --white: #FFFFFF;
    --black: #000000;
    --red: #FF0000;
    --gray-light: #f4f4f4;
    --gray-dark: #1a1a1a;

    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Roboto', sans-serif;

    /* Spacing */
    --section-padding: 100px 5%;
    --container-max-width: 1200px;

    /* Transitions */
    --transition: all 0.3s ease;
}

/* Base Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--white);
    color: var(--black);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
.slogan {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 2px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img,
svg {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout Utilities */
.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: var(--section-padding);
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.grid {
    display: grid;
    gap: 30px;
}

/* Patterns */
.pattern-zebra {
    background-color: var(--white);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80' viewBox='0 0 80 80'%3E%3Cpath d='M0 0c10 10 20 0 30 10s0 20 10 30-10 10-10 30 20 0 30-10 0-20 10-30 10-10 10-30' fill='none' stroke='%23000' stroke-width='2' opacity='0.05'/%3E%3Cpath d='M80 80c-10-10-20 0-30-10s0-20-10-30 10-10 10-30-20 0-30 10 0 20-10 30-10 10-10 30' fill='none' stroke='%23000' stroke-width='2' opacity='0.05'/%3E%3C/svg%3E");
}

.pattern-tiger {
    background-color: var(--black);
    color: var(--white);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100'%3E%3Cpath d='M0 20c20 0 30 10 50 10s30-10 50-10M0 50c20 0 30 10 50 10s30-10 50-10M0 80c20 0 30 10 50 10s30-10 50-10' fill='none' stroke='%23fff' stroke-width='3' opacity='0.03'/%3E%3C/svg%3E");
}

/* Bienvenidos Section */
#bienvenidos {
    background: url('assets/images/bg-secc01.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}


/* Navbar */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px) saturate(180%);
    -webkit-backdrop-filter: blur(15px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    transition: var(--transition);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 5%;
}

.logo img {
    height: 80px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 700;
    font-size: 0.9rem;
    position: relative;
}

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

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

/* Hero Section */
.hero {
    position: relative;
    height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white);
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-content {
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-progress-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    z-index: 20;
}

.hero-progress-bar {
    width: 0%;
    height: 100%;
    background: var(--red);
    transition: width 0.1s linear;
}


.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero-logo-container {
    max-width: 600px;
    width: 90%;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease;
}

.hero-logo {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.3));
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.hero p {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    margin-bottom: 40px;
    animation: fadeInUp 1.2s ease;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 40px;
    background: var(--red);
    color: var(--white);
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    transition: var(--transition);
    border-radius: 0;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--black);
    transition: var(--transition);
    z-index: -1;
}

.btn:hover::before {
    left: 0;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
}

.service-card {
    background: var(--white);
    padding: 40px;
    border: 1px solid #ddd;
    text-align: center;
    transition: var(--transition);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--red);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    display: block;
}

/* About Section Grid Desktop */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "title image"
        "text image";
    grid-template-rows: auto 1fr;
    align-items: center;
    gap: 50px;
}

.about-title {
    grid-area: title;
}

.about-image {
    grid-area: image;
}

.about-text {
    grid-area: text;
}

/* Form */
.contact-container {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
}

.contact-info h3 {
    margin-bottom: 20px;
    color: var(--red);
}

.contact-item {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

input,
textarea {
    padding: 15px;
    border: 1px solid #ccc;
    font-family: var(--font-body);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--red);
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    background: #000;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.protection-shield {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    background: transparent;
    /* Invisible shield to prevent direct image dragging/saving */
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 0, 0, 0.4);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    z-index: 10;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.95);
}

.lightbox-content-wrapper {
    position: relative;
    margin: auto;
    display: block;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
}

.lightbox-content {
    width: 100%;
    height: auto;
    max-height: 80vh;
    object-fit: contain;
}

.lightbox .protection-shield {
    z-index: 2010;
}

#caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 10px 0;
    font-family: var(--font-heading);
}

.close-lightbox {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2100;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: var(--red);
    text-decoration: none;
    cursor: pointer;
}

.prev-lightbox,
.next-lightbox {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2100;
}

.next-lightbox {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev-lightbox {
    left: 0;
}

.prev-lightbox:hover,
.next-lightbox:hover {
    background-color: var(--red);
}

@media only screen and (max-width: 700px) {
    .lightbox-content-wrapper {
        width: 100%;
    }
}

footer {
    background: var(--black);
    color: var(--white);
    padding: 60px 5% 20px;
    text-align: center;
}

.footer-logo img {
    height: 120px;
    margin: 0 auto 30px;
    filter: invert(1);
}

.social-links {
    margin: 30px 0;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.copyright {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-top: 40px;
    border-top: 1px solid #333;
    padding-top: 20px;
}

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

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

/* Mobile Menu */
.menu-btn {
    display: none;
    cursor: pointer;
    font-size: 2rem;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* Will be managed by JS */
    }

    .menu-btn {
        display: block;
    }

    .contact-container {
        grid-template-columns: 1fr;
    }

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

    #nosotros .container {
        grid-template-columns: 1fr;
        display: flex;
        flex-direction: column;
    }

    .about-title {
        order: 1;
        text-align: center;
    }

    .about-image {
        order: 2;
        margin: 20px 0;
    }

    .about-text {
        order: 3;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: var(--red);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    overflow: visible;
    /* Allow larger logo to overflow */
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--black);
    transform: translateY(-5px);
}

.back-to-top img {
    width: 80px;
    height: 80px;
    max-width: none;
    /* Allow exceeding container */
}