/**
 * MANCOR Custom CSS
 * Estilos personalizados para usar en el editor CSS de Astra
 * Este archivo contiene todos los estilos custom de mancor-3.html
 */

/* ==========================================================================
   Scrollbar personalizada
   ========================================================================== */
:root{
    --border-radius: 20px;
    --border-radius-20: 20px;
}

/* Corrección de espaciado global */
body {
    margin: 0;
    padding: 0;
}

/* Corregir espaciado superior para header fijo */
.ast-header-break-point #main,
.ast-desktop #main,
#main {
    padding-top: 0 !important;
}

/* Asegurar que el contenido principal no tenga margen superior extra */
#primary {
    margin-top: 0 !important;
}

/* Corregir container de Astra */
.ast-container {
    margin-top: 0 !important;
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #121212;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #A81010;
}

/* ==========================================================================
   Animaciones CSS personalizadas
   ========================================================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes marquee {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

/* ==========================================================================
   Text effects y utilidades
   ========================================================================== */
.text-outline {
    -webkit-text-stroke: 1px #fff;
    color: transparent;
}

.hero-overlay {
    background: linear-gradient(rgba(26, 26, 26, 0.4), rgba(26, 26, 26, 0.6));
}

/* ==========================================================================
   Estilos para Header y Navegación Personalizada
   ========================================================================== */

/* Ocultar header de Astra para usar el nuestro */
.ast-desktop .main-header-bar,
.ast-header-break-point .main-header-bar,
#masthead,
.site-header {
    display: none !important;
}

/* Navegación Principal */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: #A81010;
    transition: width 0.3s ease;
}

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

/* Navegación fija al hacer scroll */
#mainNav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: transparent;
    z-index: 9999;
    transition: all 0.3s ease;
}

#mainNav.nav-scrolled {
    background: rgba(17, 17, 17, 0.95);
    backdrop-filter: blur(18px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.65);
    border-color: rgba(255, 255, 255, 0.06);
}

/* Logo optimizado */
#mainNav img {
    height: 80px;
    width: auto;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Estilos para el menú móvil */
.mobile-menu {
    position: fixed;
    top: 0;
    width: 290px;
    height: 100vh;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(10px);
    z-index: 99999;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2rem 1.5rem;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu.active {
    right: 0;
}
/* Reset estilos de botón de Astra en el toggle del submenú */
.mobile-submenu-toggle {
    background: transparent !important;
    border: none !important;
    padding: 4px !important;
    margin: 0 !important;
    box-shadow: none !important;
    color: white !important;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    border-radius: 4px;
}

.mobile-submenu-toggle:hover {
    color: var(--color-primary, #e63329) !important;
    background: transparent !important;
}

/* Logo del menú móvil optimizado */
.mobile-menu .font-display {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(4px);
    z-index: 99998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   Utilidades de animación
   ========================================================================== */

/* ==========================================================================
   Elementos posicionados
   ========================================================================== */
.buil-service-2-img-1 {
    position: absolute;
    bottom: -100px;
    right: 0;
    z-index: 5 !important;
}

.project-hover-gradient {
    position: relative;
    overflow: hidden;
}

.project-hover-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(168, 16, 16, 0.1), rgba(168, 16, 16, 0.3));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.project-hover-gradient:hover::before {
    opacity: 1;
}

.parallax-section {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

/* ==========================================================================
   Utilidades de animación para GSAP
   ========================================================================== */
.reveal-up,
.reveal-down,
.reveal-left,
.reveal-right,
.reveal-scale,
.reveal-rotate {
    opacity: 0;
}

/* ==========================================================================
   Formularios
   ========================================================================== */

/* Sobrescribir estilos de Astra para el formulario de contacto */
#contactForm input[type="text"],
#contactForm input[type="email"],
#contactForm input[type="tel"],
#contactForm textarea {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 1rem !important;
    padding: 1rem 1.5rem 1rem 4rem !important;
    color: #ffffff !important;
    font-size: 16px !important;
    line-height: 24px !important;
    box-shadow: none !important;
    transition: all 0.3s ease !important;
}

#contactForm textarea {
    resize: none !important;
    min-height: 120px !important;
}

#contactForm input[type="text"]:focus,
#contactForm input[type="email"]:focus,
#contactForm input[type="tel"]:focus,
#contactForm textarea:focus {
    outline: none !important;
    border-color: transparent !important;
    box-shadow: 0 0 0 2px #A81010 !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
}

#contactForm input::placeholder,
#contactForm textarea::placeholder {
    color: #9CA3AF !important;
    opacity: 1 !important;
}

.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23A81010'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.5em;
}

.service-checkbox:checked + label {
    border-color: #A81010 !important;
    color: #A81010 !important;
    background-color: rgba(168, 16, 16, 0.1) !important;
}

.service-checkbox + label:hover {
    border-color: rgba(168, 16, 16, 0.5) !important;
    background-color: rgba(255, 255, 255, 0.1) !important;
}

.service-checkbox:checked + label .check-icon {
    opacity: 1 !important;
    color: #A81010 !important;
}

.service-checkbox + label {
    transition: all 0.2s ease !important;
}

/* ==========================================================================
   Swiper personalizado
   ========================================================================== */
.swiper {
    width: 100%;
    height: 100%;
}

.projectsSwiper {
    padding: 0 50px !important;
    overflow: hidden !important;
}

.projectsSwiper .swiper-wrapper {
    display: flex !important;
    transition-timing-function: linear !important;
}

.projectsSwiper .swiper-slide {
    width: calc(100% - 20px) !important;
    margin-right: 20px !important;
    flex-shrink: 0 !important;
    height: 500px !important;
}

/* Asegurar que las imágenes dentro de los slides usen object-cover */
.projectsSwiper .swiper-slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
}

/* Asegurar que el contenedor del slide tenga la altura correcta */
.projectsSwiper .swiper-slide > div {
    height: 500px !important;
    width: 100% !important;
}

@media (min-width: 1024px) {
    .projectsSwiper .swiper-slide {
        width: calc(25% - 22.5px) !important;
        margin-right: 30px !important;
    }
}

@media (min-width: 640px) and (max-width: 1023px) {
    .projectsSwiper .swiper-slide {
        width: calc(50% - 10px) !important;
        margin-right: 20px !important;
    }
}

.swiper-button-next,
.swiper-button-prev {
    background: rgba(168, 16, 16, 0.9) !important;
    width: 40px !important;
    height: 40px !important;
    border-radius: 50% !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.swiper-button-next:after,
.swiper-button-prev:after {
    font-size: 20px !important;
    font-weight: bold !important;
}

.swiper-button-next {
    right: 0 !important;
}

.swiper-button-prev {
    left: 0 !important;
}

.swiper-pagination-bullet {
    background: #666 !important;
    opacity: 1 !important;
    width: 10px !important;
    height: 10px !important;
}

.swiper-pagination-bullet-active {
    background: #A81010 !important;
}

/* ==========================================================================
   Excavadora en contacto
   ========================================================================== */
.contact-excavator {
    position: absolute;
    bottom: -80px;
    right: 5%;
    width: 480px;
    max-width: 45%;
    pointer-events: none;
    transform-origin: center bottom;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.7));
    opacity: 0.95;
    will-change: transform;
}

@media (max-width: 1023px) {
    .contact-excavator {
        display: none;
    }
}

/* ==========================================================================
   Back to top button
   ========================================================================== */
#backToTop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #A81010;
    color: white;
    padding: 1rem;
    border-radius: 50%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#backToTop.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backToTop:hover {
    background: white;
    color: #A81010;
    transform: translateY(0) scale(1.1);
}

/* ==========================================================================
   Responsive ajustes
   ========================================================================== */
@media (max-width: 768px) {
    .projectsSwiper {
        padding: 0 20px !important;
    }
}

@media (max-width: 640px) {
    .projectsSwiper .swiper-slide {
        width: calc(100% - 10px) !important;
        margin-right: 10px !important;
    }
}

.mancor-textarea-wrapper textarea,.mancor-submit-btn,.service-label,.mancor-input-wrapper input, .mancor-textarea-wrapper textarea, .mancor-form-container {
    border-radius: 15px !important;
}

/* ==========================================================================
   PÁGINA CONTACTO - Estilos específicos
   ========================================================================== */

/* Material Symbols */
.material-symbols-outlined {
    font-variation-settings:
        'FILL' 0,
        'wght' 300,
        'GRAD' 0,
        'opsz' 24;
}

/* Utilidades personalizadas para Tailwind */
.text-outline-dark {
    -webkit-text-stroke: 2px #000;
    color: transparent;
}

.text-outline-primary {
    -webkit-text-stroke: 2px #A81010;
    color: transparent;
}

.counter-number {
    font-size: 6rem;
    line-height: 1;
}

@media (min-width: 768px) {
    .counter-number {
        font-size: 9rem;
    }
}

.geo-overlay {
    background-color: #1A1A1A;
    background-image: radial-gradient(#333 1px, transparent 1px);
    background-size: 30px 30px;
}

/* Respuestas FAQ */
.faq-answer {
    display: block !important;
}

.faq-answer.hidden {
    display: none !important;
}

.faq-item.active .faq-answer {
    display: block !important;
}

.faq-item.active .material-symbols-outlined {
    transform: rotate(180deg);
}

/* Mapa Leaflet */
#map {
    height: 100%;
    width: 100%;
    z-index: 1;
}

.leaflet-container {
    background: #1a1a1a !important;
}

.leaflet-tile {
    filter: invert(1) hue-rotate(180deg) brightness(0.6) contrast(1.2) !important;
}

.leaflet-control-attribution {
    background: rgba(0, 0, 0, 0.7) !important;
    color: #ccc !important;
}

.leaflet-control-attribution a {
    color: #A81010 !important;
}

/* Mensajes del formulario */
.form-message {
    display: none;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
    font-weight: 500;
}

.form-message.success {
    display: block;
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid rgb(34, 197, 94);
    color: rgb(34, 197, 94);
}

.form-message.error {
    display: block;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgb(239, 68, 68);
    color: rgb(239, 68, 68);
}

/* Botones de filtro FAQ */
.faq-filter-btn {
    transition: all 0.3s ease;
}

.faq-filter-btn.active {
    background-color: #A81010;
    border-color: #A81010;
    color: white;
}

/* ==========================================================================
   Carrusel de Proyectos - Asegurar cover completo
   ========================================================================== */
.swiper-carousel-* .swiper-slide img,
.swiper-slide img {
    object-fit: cover !important;
    object-position: center !important;
    width: 100% !important;
    height: 100% !important;
    display: block !important;
}

.swiper-slide > div > div:first-child {
    position: absolute;
    inset: 0;
    overflow: hidden;
    width: 100%;
    height: 100%;
}

.swiper-slide > div > div:first-child img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
}

/* ==========================================================================
   Footer Personalizado MANCOR
   ========================================================================== */
footer .widget {
    margin-bottom: 0;
}

footer .widget-title {
    color: white;
    font-family: "Barlow Semi Condensed", sans-serif;
    font-weight: 900;
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    letter-spacing: 0.025em;
}

/* Estilos para widget de texto en footer */
footer .widget_text,
footer .widget_custom_html {
    color: #9CA3AF;
}

footer .widget_text p,
footer .widget_custom_html p {
    line-height: 1.75;
    font-weight: 300;
    color: #9CA3AF;
}

/* Estilos para el widget de navegación en footer */
footer .widget_nav_menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

footer .widget_nav_menu ul li {
    margin-bottom: 1.25rem;
}

footer .widget_nav_menu ul li a {
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #3E3E3E;
    padding-bottom: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.025em;
    transition: color 0.3s ease;
    text-decoration: none;
}

footer .widget_nav_menu ul li a:hover {
    color: #A81010;
}

footer .widget_nav_menu ul li a::after {
    content: 'arrow_forward';
    font-family: 'Material Symbols Outlined';
    font-size: 10px;
    transform: rotate(-45deg);
}

/* Redes sociales en footer */
footer .social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

footer .social-links a {
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #363636;
    color: #9CA3AF;
    border-radius: 50%;
    transition: all 0.3s ease;
}

footer .social-links a:hover {
    background-color: #A81010;
    color: white;
}

/* Logo en footer */
footer .footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

footer .footer-logo-icon {
    background-color: #A81010;
    padding: 0.5rem;
    border-radius: 0.75rem;
}

footer .footer-logo-icon .material-symbols-outlined {
    color: white;
    font-size: 1.5rem;
}

footer .footer-logo-text {
    font-family: "Barlow Semi Condensed", sans-serif;
    font-weight: 900;
    font-size: 1.875rem;
    color: white;
    letter-spacing: -0.05em;
}

footer .footer-logo-text .dot {
    color: #A81010;
}

/* Información de contacto en footer */
footer .contact-info {
    list-style: none;
    margin: 0;
    padding: 0;
}

footer .contact-info li {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    margin-bottom: 2rem;
}

footer .contact-info li .material-symbols-outlined {
    color: #A81010;
    font-size: 1.5rem;
    margin-top: 0.125rem;
}

footer .contact-info li span:not(.material-symbols-outlined) {
    color: #D1D5DB;
    font-weight: 300;
    line-height: 1.625;
}

/* Horarios en footer */
footer .footer-hours {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #3E3E3E;
}

footer .footer-hours h5 {
    color: white;
    font-weight: 700;
    margin-bottom: 1rem;
    text-decoration: underline;
    text-decoration-color: #A81010;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    letter-spacing: 0.025em;
}

footer .footer-hours p {
    color: #D1D5DB;
    margin-bottom: 0.5rem;
    font-weight: 300;
}

/* Copyright y enlaces legales */
footer .footer-bottom {
    border-top: 1px solid #3E3E3E;
    margin-top: 5rem;
    padding-top: 2.5rem;
}

footer .footer-bottom-links a {
    color: white;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.025em;
    transition: color 0.3s ease;
    text-decoration: none;
}

footer .footer-bottom-links a:hover {
    color: #A81010;
}

/* Ajustes responsive para footer */
@media (max-width: 768px) {
    footer .widget-title {
        font-size: 1.125rem;
        margin-bottom: 2rem;
    }
    
    footer .footer-logo-text {
        font-size: 1.5rem;
    }
    
    footer .footer-bottom {
        text-align: center;
    }
    
    footer .footer-bottom-links {
        margin-top: 1.5rem;
    }
}