@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&family=Outfit:wght@400;600;800&display=swap');

:root {
    /* Using HSL to have full control over brightness (L) and saturation (S) */
    --primary: hsla(40, 6%, 90%, 0.8);
    /* Before it was #757473 (L: 46%). Now L: 60% for more brightness */
    --primary-hover: #351f1b;
    /* Even brighter version for hover */

    /* Centralized Glow Variables */
    --primary-glow: hsla(35, 5%, 90%, 0.4);
    --primary-glow-intense: hsla(35, 5%, 90%, 0.8);
    --card-glow: 0 0 20px hsla(35, 5%, 90%, 0.3);

    --bg-dark: #13100d;
    --bg-card: #2c2929;
    --text-main: #9b0f1d;
    /*#789395*/
    --text-muted: #f4f5ed;
    --accent: #ec3141;
    --glass: #743736;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
}

/* Header & Nav */
header {

    position: fixed;
    top: 0;
    width: 100%;
    height: 100px;
    z-index: 100;
    background: transparent;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-main {
    color: var(--primary);
    display: flex;
    height: 100px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    max-width: 100%;
    margin: 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.logo img {
    height: 400px;
    width: 400px;
    display: block;
    margin-left: 5%;
}


nav {
    flex: 1;
    padding: 0 20px 0 20px;
    margin-left: clamp(0%, 5vw, 25%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

nav ul {
    display: flex;
    padding-right: 20px;
    margin-left: clamp(0%, 5vw, 10%);
    /*menu al medio con 20%*/
    margin-right: 5%;
    list-style: none;
    align-items: center;
    justify-content: space-between;
    width: 80%;
}

nav ul li {
    padding: 0 1.0rem;
}

nav a {
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    font-size: 1.0rem;
    justify-content: space-between;
    gap: 100px;
}

nav :hover,
nav :focus {
    color: var(--accent);
}

.nav-contact {
    margin-right: 5%;
}

.btn-primary {
    padding: 10px 24px;
    border-radius: 9999px;
    font-weight: 700;
    display: inline-block;
    background: var(--bg-card);
}

.btn-primary:focus,
.btn-primary:hover {
    color: var(--accent);
    outline: 3px solid var(--primary-hover);
    outline-offset: 3px;
    transform: translateY(-5px);
}

/* Hero Section */
p {
    color: var(--text-muted);
}

.hero {
    height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem 2rem;
    position: relative;
    overflow: hidden;
}

.hero-video {
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    width: 100%;
    height: 70%;
    object-fit: fill;
}

.hero-content h1 {
    margin-top: 20px;
    font-size: clamp(3rem, 8vw, 5rem);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--primary);
    color: var(--bg-dark);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    transition: var(--transition);
    box-shadow: 0 10px 20px var(--glass);
}

.btn:hover {
    color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 15px 30px var(--glass);
}

/* Sections */
section {
    padding: 100px 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-head {
    text-align: center;
    margin-bottom: 4rem;
}

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

/*service items*/
.service-item {
    width: 100%;
    margin-top: 1.5rem;
    /* ← espacio entre el texto y la imagen */
    border-radius: 12px;
    overflow: hidden;
}

.service-item img {
    width: 100%;
    /* ← ocupa todo el ancho del servicio item */
    height: 200px;
    /* ← altura fija para todas las imágenes */
    object-fit: cover;
    /* ← recorta sin deformar */
    border-radius: 12px;
    display: block;
}

/* Expandable Services Section */
.expandable-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0, 1, 0, 1);
    opacity: 0;
}

.expandable-content.active {
    max-height: 2000px;
    /* High enough to contain the content */
    opacity: 1;
    transition: max-height 0.5s ease-in, opacity 0.5s ease-in;
}

.show-more-container {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

/* Botón de expansión personalizado (Sin Font Awesome para consistencia) */
.card-toggle-btn {
    position: absolute;
    bottom: 25px;
    right: 25px;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.card-toggle-btn::before,
.card-toggle-btn::after {
    content: "";
    position: absolute;
    margin-top: 25px;
    background-color: var(--primary);
    border-radius: 5px;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

/* Línea Horizontal */
.card-toggle-btn::before {
    width: 14px;
    height: 2px;
}

/* Línea Vertical */
.card-toggle-btn::after {
    width: 2px;
    height: 14px;
}

/* Transformación a Menos (-) */
.card-toggle-btn.active::after {
    transform: rotate(90deg);
    opacity: 0;
    /* Desaparece la vertical */
}

.card-toggle-btn:hover::before,
.card-toggle-btn:hover::after {
    background-color: var(--accent);
}


/* Features Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    position: relative;
    /* Added to contain absolute positioned elements */
}

.card-horizontal {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 2rem;
    width: 100%;
    text-align: left;
    margin-top: 50px;
}

/* Responsive adjustment for horizontal cards */
@media (max-width: 768px) {
    .card-horizontal {
        flex-direction: column;
        text-align: center;
    }
}

.column {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 100%;
}

.card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: 0 10px 20px var(--glass);
}

.card i {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    display: block;
}

.touch-icon {
    display: none;
}

/* Identity items */
.grid2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 3rem;
}

.grid3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px));
    gap: 3rem;
}

.identity-item {
    text-align: center;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    /*same height for all teh cards*/
    position: relative;
    aspect-ratio: 16/9;
}

.identity-item img {
    width: 65%;
    height: 90%;
    object-fit: fill;
}

/*items para historia* (copia a identity item)*/
.history-item {
    text-align: center;
    background: var(--bg-card);
    border-radius: 12px;
    overflow: hidden;
    /*same height for all teh cards*/
    position: relative;
    aspect-ratio: 16/9;
}

.history-item h1 {
    display: block;
    margin-bottom: 5%;
}

.history-item i {
    display: none;
}

.history-item img {
    background-color: var(--bg-dark);
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ================================
   CAROUSEL - Opinions Section
================================ */
.carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
    position: relative;
}

.carousel-view {
    flex: 1;
    overflow: hidden;
    /* mask fades at the edges for a premium look */
    -webkit-mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
    mask-image: linear-gradient(to right, transparent, black 4%, black 96%, transparent);
}

.carousel-track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.carousel-card {
    /* 3 cards per slide: (100% - 2 gaps) / 3 */
    flex: 0 0 calc((100% - 3rem) / 3);
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-opinion {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    position: relative;
    /* Added to contain absolute positioned elements */
}

.opinion-stars {
    color: var(--accent);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.opinion-author {
    margin-top: 1.5rem;
    font-weight: 600;
    color: var(--primary);
    font-size: 0.9rem;
}

/* Nav Arrows */
.carousel-btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: var(--bg-card);
    color: var(--primary);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.carousel-btn:hover {
    background: var(--primary);
    color: var(--bg-dark);
    transform: scale(1.1);
    box-shadow: 0 0 20px var(--primary-glow);
}

.carousel-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Dots */
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 2rem;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    border: none;
    cursor: pointer;
    transition: var(--transition);
    padding: 0;
}

.carousel-dot.active {
    background: var(--primary);
    transform: scale(1.3);
    box-shadow: 0 0 8px var(--primary-glow);
}

/* Contact Form */
.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 3rem;
    border-radius: 24px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
}

input,
textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: white;
    font-family: inherit;
}

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

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

footer p {
    color: var(--accent);
}

/* Mobile Navigation */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 1001;
    padding: 10px;

}

/* Medium Laptop menu*/
@media (max-width: 1180px) {
    header {
        height: 100px;
    }

    .header-main {
        padding: 10px;
        justify-content: space-between;
        gap: 10px;
    }

    .logo img {
        height: 400px;
        width: 400px;
        margin: 0;
    }

    #main-nav {
        margin-left: 0px;
    }

    #nav-list {
        background-color: transparent;
    }

    nav ul {
        display: flex;
        position: fixed;
        margin-left: 0px;
        top: 25px;
        width: 150px;
        transition: var(--transition);
    }

    nav ul li {
        padding: 0 1.0rem;
        /* ajusta el valor a tu gusto */
    }

    nav a {
        font-size: 1.0rem;
    }

    .nav-contact {
        margin-top: auto;
        padding-top: 2rem;
    }

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

    /* Small Laptop menu*/
    @media (max-width: 1070px) {
        header {
            height: 100px;
        }

        .header-main {
            padding: 10px;
            justify-content: space-between;
            gap: 10px;
        }


        .logo img {
            height: 400px;
            width: 400px;
            margin: 0;
        }

        #main-nav {
            margin-left: 0px;
        }

        #nav-list {
            background-color: transparent;
        }

        nav ul {
            display: flex;
            position: fixed;
            margin-left: 0px;
            top: 25px;
            width: 150px;
            background: var(--bg-dark);
            transition: var(--transition);
        }

        nav ul li {
            padding: 0 0.67rem;
            /* ajusta el valor a tu gusto */
        }

        nav a {
            font-size: 1.0rem;
        }

        .nav-contact {
            margin-top: auto;
            padding-top: 2rem;
        }

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


        /*menu-toggle activated*/
        @media (max-width: 1010px) {
            header {
                height: 100px;
            }

            .header-main {
                padding: 10px 15px;
            }

            .menu-toggle {
                display: block;
                /* Puts it on the left */
                order: -50;
            }

            .logo {
                order: 0;
                margin: 0;
                margin-left: clamp(0%, 20vw, 30%);
            }

            .logo img {
                height: 400px;
                width: auto;
                margin: 0;
            }

            #nav-list {
                background-color: var(--bg-dark);
            }

            nav ul {
                display: flex;
                flex-direction: column;
                position: fixed;
                left: -100%;
                /* Hidden by default */
                top: 0;
                width: 150px;
                height: 100vh;
                padding: 100px 2rem 2rem;
                background: var(--bg-dark);
                transition: var(--transition);
            }

            nav ul.active {
                left: -5px;
                /* Sliding in from left */
            }

            nav ul li {
                margin-bottom: 1.2rem;
            }

            nav a {
                font-size: 1.2rem;
            }

            .nav-contact {
                margin-top: auto;
                padding-top: 2rem;
            }

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

        /* Tablet menu*/
        @media (max-width: 770px) {
            header {
                height: 100px;
            }

            .header-main {
                padding: 10px 15px;
            }

            .menu-toggle {
                display: block;
                /* Puts it on the left */
                order: -50;
            }

            .logo {
                order: 0;
                margin: 0;
                margin-left: clamp(0%, 20vw, 30%);
            }

            .logo img {
                height: 400px;
                width: auto;
                margin: 0;
            }

            nav ul {
                display: flex;
                flex-direction: column;
                position: fixed;
                left: -100%;
                /* Hidden by default */
                top: 0;
                width: 150px;
                height: 100vh;
                background: var(--bg-dark);
                padding: 100px 2rem 2rem;
                transition: var(--transition);
                box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
            }

            nav ul.active {
                left: -10px;
                /* Sliding in from left */
            }

            nav ul li {
                margin-bottom: 1.2rem;
            }

            nav a {
                font-size: 1.2rem;
            }

            .nav-contact {
                margin-top: auto;
                padding-top: 2rem;
            }

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

            .carousel-card {
                flex: 0 0 100%;
            }

            .carousel-view {
                -webkit-mask-image: none;
                mask-image: none;
            }

            .carousel-btn {
                display: none;
            }

            /*Mobile Navigation large screens */
            @media (max-width: 480px) {

                header {
                    height: 100px;
                }

                .header-main {
                    padding: 0px 15px;
                }

                .menu-toggle {
                    display: block;
                    /* Puts it on the left */
                    order: -100;
                    height: 100%;
                }

                .logo {
                    order: 0;
                    margin: 0 auto;
                }

                .logo img {
                    height: 400px;
                    width: auto;
                    margin: 0;
                }

                nav ul {
                    display: flex;
                    flex-direction: column;
                    position: fixed;
                    /* Hidden by default */
                    top: 10px;
                    width: 155px;
                    height: 100vh;
                    background: var(--bg-dark);
                    padding: 100px 2rem 2rem;
                    transition: var(--transition);
                    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
                }

                nav ul.active {
                    left: -10px;
                    /* Sliding in from left */
                }

                nav ul li {
                    margin-bottom: 1.2rem;
                }

                nav a {
                    font-size: 1.2rem;
                }

                .nav-contact {
                    margin-top: auto;
                    padding-top: 2rem;
                }

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

                section {
                    padding: 2rem 2rem;
                    justify-content: center;
                }

                .grid2 {
                    grid-template-columns: 1fr;
                    height: 100%;
                }

                .content-text {
                    display: none;
                }

                /* Hold to reveal interaction */
                .history-item i {
                    display: block;
                }

                .history-item.active-reveal h1 {
                    display: none;
                }

                .history-item.active-reveal .content-text {
                    display: block;
                    animation: fadeIn 0.3s ease;
                }

                .touch-icon {
                    display: block;
                    position: absolute;
                    bottom: 1px;
                    right: 15px;
                    color: var(--primary);
                    font-size: 1.2rem;
                    opacity: 0.4;
                    animation: pulseTouch 2s infinite;
                    pointer-events: none;
                }

                .touch-icon:hover {
                    color: var(--accent);
                    transform: scale(1.2);
                }

                @keyframes pulseTouch {
                    0% {
                        transform: scale(1);
                        opacity: 0.6;
                    }

                    50% {
                        transform: scale(1.2);
                        opacity: 1;
                    }

                    100% {
                        transform: scale(1);
                        opacity: 0.6;
                    }
                }

                @keyframes fadeIn {
                    from {
                        opacity: 0;
                        transform: translateY(10px);
                    }

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

                /*Mobile Navigation medium screens */
                @media (max-width: 380px) {

                    header {
                        height: 100px;
                    }

                    .menu-toggle {
                        display: block;
                        /* Puts it on the left */
                        order: -100;
                    }

                    .logo {
                        order: 0;
                    }

                    .logo img {
                        height: 375px;
                        width: auto;
                    }

                    nav ul {
                        display: flex;
                        flex-direction: column;
                        position: fixed;
                        left: -100%;
                        /* Hidden by default */
                        top: 10px;
                        width: 155px;
                        height: 100vh;
                        background: var(--bg-dark);
                        padding: 100px 2rem 2rem;
                        transition: var(--transition);
                        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
                    }

                    nav ul.active {
                        left: -10px;
                        /* Sliding in from left */
                    }

                    nav ul li {
                        margin-bottom: 1.2rem;
                    }

                    nav a {
                        font-size: 1.2rem;
                    }

                    .nav-contact {
                        margin-top: auto;
                        padding-top: 2rem;
                    }

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

                    .identity-item img {
                        display: none;
                    }

                    .history-item.active-reveal .content-text {
                        display: block;
                        animation: fadeIn 0.3s ease;
                        font-size: 0.9rem;
                    }

                    /*Mobile Navigation small screens */
                    @media (max-width: 325px) {

                        header {
                            height: 100px;
                        }

                        .header-main {
                            padding: 0px 15px;
                        }

                        .menu-toggle {
                            display: block;
                            /* Puts it on the left */
                            order: -100;
                        }

                        .logo {
                            order: 0;
                            margin: 0;
                        }

                        .logo img {
                            height: 300px;
                            width: auto;

                        }

                        nav ul {
                            display: flex;
                            flex-direction: column;
                            position: fixed;
                            left: -100%;
                            /* Hidden by default */
                            top: 10px;
                            width: 155px;
                            height: 100vh;
                            background: var(--bg-dark);
                            padding: 100px 2rem 2rem;
                            transition: var(--transition);
                            box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
                        }

                        nav ul.active {
                            left: -10px;
                            /* Sliding in from left */
                        }

                        nav ul li {
                            margin-bottom: 1.2rem;
                        }

                        nav a {
                            font-size: 1.2rem;
                        }

                        .nav-contact {
                            margin-top: auto;
                            padding-top: 2rem;
                        }

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

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

                        .history-item.active-reveal .content-text {
                            display: block;
                            animation: fadeIn 0.3s ease;
                            font-size: 0.65rem;
                        }
                    }
                }
            }
        }
    }
}