/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variables de tema */
:root {
    --brand-red: #B22222;
    --brand-black: #000000;
    --brand-white: #ffffff;
    --brand-muted: #f8f9fa;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #000;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

header {
    background: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.lang-selector {
    margin-left: 2rem;
}

.lang-selector select {
    background: #fff;
    border: 1px solid #B22222;
    color: #B22222;
    font-weight: bold;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}

.lang-selector select:hover {
    border-color: #8B0000;
}

.lang-selector select:focus {
    outline: none;
    border-color: #8B0000;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    color: #B22222;
}

.site-logo {
    height: 60px;
    width: auto;
    display: block;
}

.nav-links {
    list-style: none;
    display: flex;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: #B22222;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    flex: 1;
    /* Hacer el main parcialmente transparente para que el fondo de la página sea visible */
    background: rgba(255,255,255,0.88);
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    overflow: hidden;
}

#hero {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem 0;
}

.hero-content {
    flex: 1;
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #B22222;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.btn:hover {
    background: #8B0000;
}

.slide img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.slideshow-container {
    position: relative;
    flex: 1;
    max-width: 100%;
    /* permitir que la imagen del hero entre sin quedar recortada */
    overflow: visible;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: auto;
    display: block;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #B22222;
}

ol {
    padding-left: 1.5rem;
}

form {
    display: flex;
    flex-direction: column;
    max-width: 500px;
}

label {
    margin-top: 1rem;
}

input, textarea {
    padding: 0.5rem;
    margin-top: 0.5rem;
    border: 1px solid #ccc;
    border-radius: 5px;
}

button {
    margin-top: 1rem;
    padding: 0.5rem;
    background: #B22222;
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

button:hover {
    background: #8B0000;
}

footer {
    background: #f8f9fa;
    text-align: center;
    padding: 1rem;
    margin-top: 2rem;
}

.social-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-links a {
    display: inline-block;
    text-decoration: none;
}

.fb-link {
    background: #1877f2;
    color: white;
    padding: 0.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.fb-link svg {
    width: 20px;
    height: 20px;
}

.ig-link {
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    position: relative;
}
.ig-link svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
}
.tt-link {
    background: #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    position: relative;
}
.tt-link svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
}
.tt-link svg path {
    fill: #000;
}

.social-icons {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    justify-content: center;
}

.center-content {
    text-align: center;
}

.social-icons a {
    display: inline-block;
    text-decoration: none;
    transition: transform 0.2s;
}

.social-icons a:hover {
    transform: scale(1.1);
}

.social-icons svg {
    width: 24px;
    height: 24px;
}

/* Auction Guide */
.auction-steps {
    margin-top: 2rem;
}

.steps-row {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.step-item {
    flex: 1;
    text-align: center;
    padding: 1.5rem;
    border-radius: 8px;
    background: #f9f9f9;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.step-number {
    display: inline-block;
    width: 24px;
    height: 24px;
    background: #B22222;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-size: 0.9rem;
    font-weight: bold;
    margin-right: 0.5rem;
}

.step-icon {
    font-size: 2rem;
    color: #B22222;
    margin-bottom: 0.5rem;
}

.step-item h4 {
    color: #000000;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.step-item p {
    color: #000000;
    font-size: 0.9rem;
    line-height: 1.4;
}

.step-subtitle {
    display: block;
    font-size: 0.8rem;
    color: #666;
    font-style: italic;
    margin-top: 0.5rem;
}

/* Galería */
.carousel-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.carousel-container {
    width: calc(300px * 3 + 1rem * 2); /* Ancho fijo para mostrar 3 imágenes */
    overflow: hidden;
}

.gallery {
    display: flex;
    gap: 1rem;
    transition: transform 0.3s ease;
}

.gallery-item {
    min-width: 300px;
    text-align: center;
}

.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

.carousel-btn {
    background: #ffffff;
    color: rgb(248, 2, 2);
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1.5rem;
    cursor: pointer;
    border-radius: 5px;
    margin: 0 1rem;
}

.carousel-btn:hover {
    background: #fdfdfd;
}

.carousel-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Responsive */
@media (max-width: 1024px) {
    main {
        padding: 1rem;
    }
    .hero-content h1 {
        font-size: 2rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    #hero {
        gap: 1rem;
    }
}

/* Sales Gallery */
.sales-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    justify-items: center;
}

.sales-gallery .gallery-item {
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 1rem;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s;
}

.sales-gallery .gallery-item:hover {
    transform: scale(1.05);
}

.sales-gallery .gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 5px;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    text-align: center;
    border-radius: 5px;
}

.modal-content img {
    width: 100%;
    height: auto;
    margin-bottom: 1rem;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

@media (max-width: 768px) {
    nav {
        flex-direction: column;
    }
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        text-align: center;
    }
    .nav-links.active {
        display: flex;
    }
    .menu-toggle {
        display: flex;
    }
    #hero {
        flex-direction: column;
        gap: 1rem;
    }
    .hero-content h1 {
        font-size: 1.8rem;
    }
    .hero-content p {
        font-size: 1rem;
    }
    main {
        padding: 1rem;
    }
    .site-logo {
        height: 42px;
    }
}

/* WhatsApp floating button */
.whatsapp-float {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 56px;
    height: 56px;
    background: #25D366;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    z-index: 9999;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.whatsapp-float:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(0,0,0,0.25);
}
.whatsapp-float svg {
    width: 26px;
    height: 26px;
    fill: #fff;
}

/* Ocultar en pantallas grandes si se desea (opcional) */
@media (min-width: 1200px) {
    /* .whatsapp-float { display: none; } */
}

/* Tema Negro y Rojo - Overrides para dar estilo consistente */
/* Ajustes generales */
body {
    /* Fondo sutil con variaciones blancas/ligeramente gris y un toque rojo tenue */
    background:
        radial-gradient(circle at 8% 8%, rgba(178,34,34,0.03), transparent 12%),
        linear-gradient(180deg, #ffffff 0%, #fbfbfb 100%);
    color: var(--brand-black);
}

header {
    background: var(--brand-black);
    color: var(--brand-white);
    box-shadow: none;
}

.logo a {
    color: var(--brand-red);
}

.nav-links a {
    color: var(--brand-white);
}
.nav-links a:hover {
    color: var(--brand-red);
}

.menu-toggle span {
    background: var(--brand-white);
}

.btn {
    background: var(--brand-red);
    color: var(--brand-white);
}
.btn:hover {
    background: #8B0000;
}

h1, h2 {
    color: var(--brand-red);
}

footer {
    background: var(--brand-black);
    color: var(--brand-white);
}

.social-links a {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 6px;
}
.social-links a svg path { fill: var(--brand-white); }

/* Mantener colores oficiales de WhatsApp (verde) */
.whatsapp-float {
    background: #25D366; /* WhatsApp green */
}
.whatsapp-float:hover {
    background: #1ebc58;
}

/* Mejor contraste para slideshow captions, botones y enlaces importantes */
.slide .caption, .hero-content p, .hero-content a {
    color: var(--brand-black);
}

/* Opcional: si quieres un footer más ligero en móviles */
@media (max-width: 480px) {
    footer { padding: 1.25rem; }
}

/* Page-specific dark red/black variants (applied to body for full-page effect) */
body.page-index,
body.page-about,
body.page-services,
body.page-vision,
body.page-sales,
body.page-contact,
body.page-index-old {
    /* Fondo degradado negro -> rojo (fallbacks incluidos) */
    color: var(--brand-white);
    background: #EB5757; /* fallback for old browsers */
    background: -webkit-linear-gradient(to right, #000000, #EB5757); /* Chrome 10-25, Safari 5.1-6 */
    background: linear-gradient(to right, #000000, #EB5757); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
    background-attachment: fixed;
}

/* OVERRIDE: dejar todo blanco (header y contenido), mantener footer oscuro */
body, html {
    background: var(--brand-white) !important;
    background-image: none !important;
    color: var(--brand-black) !important;
}

header {
    background: var(--brand-white) !important;
    color: var(--brand-black) !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1) !important;
}

header .nav-links a {
    color: var(--brand-black) !important;
}

/* Hover: mostrar rojo en los enlaces del header */
header .nav-links a:hover,
header .nav-links li a:focus {
    color: var(--brand-red) !important;
}
header .nav-links a { transition: color 0.18s ease-in-out; }

/* Hero image entrance animations */
.hero-img {
    opacity: 0;
    transform: translateY(-20px);
    transition: transform 0.9s cubic-bezier(.2,.8,.2,1), opacity 0.9s ease;
    will-change: transform, opacity;
}
.hero-img.slide-in-top {
    opacity: 1;
    transform: translateY(0);
}
.hero-img.slide-in-left {
    opacity: 1;
    transform: translateX(0);
}
.hero-img.slide-in-right {
    opacity: 1;
    transform: translateX(0);
}
.hero-img.from-left { transform: translateX(-40px); }
.hero-img.from-right { transform: translateX(40px); }
.hero-img.from-top { transform: translateY(-40px); }

main {
    background: var(--brand-white) !important;
    color: var(--brand-black) !important;
    box-shadow: none !important;
    border: none !important;
}

/* Keep footer styling intact (dark) */
footer {
    background: var(--brand-black) !important;
    color: var(--brand-white) !important;
}

/* Main translucent panels with red accents for readability */
body.page-index main,
body.page-services main,
body.page-sales main,
body.page-index-old main {
    background: rgba(8,8,8,0.72);
    color: var(--brand-white);
    border: 1px solid rgba(178,34,34,0.15);
}

body.page-about main,
body.page-vision main,
body.page-contact main {
    background: rgba(12,12,12,0.66);
    color: var(--brand-white);
    border-left: 6px solid rgba(178,34,34,0.24);
}

/* Ensure headings and important text stand out */
body.page-index h1, body.page-index h2,
body.page-about h1, body.page-about h2,
body.page-services h1, body.page-services h2,
body.page-vision h1, body.page-vision h2,
body.page-sales h1, body.page-sales h2,
body.page-contact h1, body.page-contact h2,
body.page-index-old h1, body.page-index-old h2 {
    color: var(--brand-red);
}

/* Links and buttons on dark backgrounds */
body.page-index a, body.page-about a, body.page-services a, body.page-vision a, body.page-sales a, body.page-contact a {
    color: #f6d7d7;
}
body.page-index .btn, body.page-about .btn, body.page-services .btn, body.page-vision .btn, body.page-sales .btn, body.page-contact .btn {
    background: var(--brand-red);
    color: var(--brand-white);
}

/* Reveal on scroll: base hidden state and visible state */
.reveal {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 600ms ease-out, transform 600ms cubic-bezier(.2,.9,.25,1);
    will-change: transform, opacity;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* small variant: appear from left/right */
.reveal.from-left { transform: translateX(-28px); }
.reveal.from-right { transform: translateX(28px); }
.reveal.from-left.visible, .reveal.from-right.visible { transform: translateX(0); }

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal { transition: none; transform: none; opacity: 1; }
}

/* Header-specific reveal: distinct effect - slide from top + deblur */
header.reveal {
    opacity: 0;
    transform: translateY(-28px) scaleY(0.995);
    filter: blur(6px);
    transition: opacity 520ms ease-out, transform 520ms cubic-bezier(.2,.9,.25,1), filter 520ms ease-out;
    will-change: transform, opacity, filter;
}
header.reveal.visible {
    opacity: 1;
    transform: translateY(0) scaleY(1);
    filter: blur(0);
    box-shadow: 0 6px 20px rgba(0,0,0,0.06);
}
header.reveal { z-index: 60; position: relative; }

/* Location page styles */
.map-container {
    text-align: center;
    margin: 2rem 0;
}

.map-container iframe {
    max-width: 100%;
    height: 450px;
    border: 1px solid #ddd;
}

#ubicacion h3, #location h3 {
    color: #B22222;
    font-size: 1.2rem;
    margin-top: 1rem;
}

#ubicacion .btn, #location .btn {
    display: block;
    margin: 1rem auto;
    width: fit-content;
}

/* Responsive Design for Auction Steps */
@media (max-width: 768px) {
    .steps-row {
        flex-direction: column;
        gap: 1rem;
    }
    
    .step-item {
        margin-bottom: 1rem;
    }
}
