/* ==========================================================================
   CSS Variables & Base Styles
   ========================================================================== */
   :root {
    /* Colors */
    --bg-dark: #0a0a0a;
    --bg-card: #151515;
    --text-main: #f0f0f0;
    --text-muted: #a0a0a0;
    
    /* XYZ Axes Colors */
    --color-x: #ff3b3b; /* Red */
    --color-y: #00e676; /* Green */
    --color-z: #2979ff; /* Blue */
    
    /* Typography */
    --font-body: 'Inter', sans-serif;
    --font-heading: 'Space Grotesk', sans-serif;
    
    /* Spacing & Utilities */
    --transition: all 0.3s ease;
    --container-width: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

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

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

ul {
    list-style: none;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-x), var(--color-y), var(--color-z));
    border-radius: 2px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn-primary, .btn-submit, .btn-outline, .whatsapp-btn, .nav-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: linear-gradient(45deg, var(--color-x), var(--color-z));
    color: white;
    box-shadow: 0 4px 15px rgba(255, 59, 59, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(41, 121, 255, 0.4);
}

.btn-submit {
    background-color: var(--color-y);
    color: #000;
    width: 100%;
    margin-top: 1rem;
}

.btn-submit:hover {
    background-color: #00c853;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--text-main);
    color: var(--text-main);
}

.btn-outline:hover {
    background: var(--text-main);
    color: var(--bg-dark);
}

/* ==========================================================================
   Navbar
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    z-index: 1000;
    padding: 1rem 0;
}

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

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-cut { color: var(--text-main); }
.logo-cad { color: var(--color-y); }

.axes-dots {
    display: flex;
    gap: 4px;
}

.axes-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.dot-x { background-color: var(--color-x); }
.dot-y { background-color: var(--color-y); }
.dot-z { background-color: var(--color-z); }

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links a:hover {
    color: var(--color-y);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 2px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    height: 100vh;
    background-image: url('assets/hero-bg.png');
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 0; /* Resetting just in case */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(10,10,10,0.4) 0%, rgba(10,10,10,0.9) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff, #a0a0a0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: 2.5rem;
}

/* ==========================================================================
   Cotizador Section
   ========================================================================== */
/* ==========================================================================
   Cotizador Section (Inmersivo)
   ========================================================================== */
.quote-section-immersive {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.dxf-viewer-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #050505;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: 1;
}

.dxf-viewer-bg canvas {
    width: 100%;
    height: 100%;
    outline: none;
    display: block;
}

/* Cotas Flotantes */
.cota-label {
    position: absolute;
    color: var(--color-y);
    font-size: 0.85rem;
    font-family: var(--font-heading);
    background: rgba(0,0,0,0.7);
    padding: 2px 6px;
    border: 1px solid var(--color-y);
    border-radius: 4px;
    pointer-events: none;
    z-index: 5;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.cota-label.hidden {
    opacity: 0;
}

.viewer-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-align: center;
    z-index: 2;
    pointer-events: none;
}

.viewer-placeholder svg {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    opacity: 0.5;
}

/* Panel Flotante Glassmorphism */
.quote-floating-panel {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 420px;
    background: rgba(10, 10, 10, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1.2rem;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    margin: 1.5rem auto;
    /* Aligned to the left for better viewer visibility on desktop */
    margin-left: 2%;
}

@media (max-width: 768px) {
    .quote-floating-panel {
        margin: 1rem auto;
        max-width: 95%;
        padding: 1rem;
    }
}

.panel-header h2 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 0.1rem;
}

.panel-header p {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-bottom: 0.8rem;
}

.file-upload-box {
    background: rgba(255, 255, 255, 0.02);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    padding: 0.8rem;
    text-align: center;
    border-radius: 8px;
    transition: var(--transition);
}

.file-upload-box:hover {
    border-color: var(--color-y);
    background: rgba(0, 230, 118, 0.05);
}

.settings-panel {
    margin-top: 0.8rem;
    padding-top: 0.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.cascade-group {
    background: rgba(255,255,255,0.02);
    padding: 0.6rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 0.8rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.cascade-group .form-group {
    margin-bottom: 0;
}

.cascade-group label {
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cascade-group select {
    width: 100%;
    padding: 0.3rem 0.2rem;
    font-size: 0.75rem;
}

.colors-list {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    max-height: 110px;
    overflow-y: auto;
    padding-right: 5px;
}

.color-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.color-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
}

.color-box {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.2);
}

.color-item select {
    width: 120px;
    padding: 0.2rem;
    font-size: 0.75rem;
    background: #111;
    color: #fff;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
}

.quote-summary {
    background: rgba(255, 59, 59, 0.05);
    border: 1px solid rgba(255, 59, 59, 0.2);
    padding: 0.8rem;
    border-radius: 8px;
    margin-top: 0.8rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat span {
    font-size: 0.65rem;
    color: var(--text-muted);
}

.stat strong {
    font-size: 0.9rem;
    font-family: var(--font-heading);
}

.price-box {
    text-align: center;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.price-box h3 {
    font-size: 1.5rem;
    color: var(--color-y);
    font-family: var(--font-heading);
    margin: 0.2rem 0;
}

.text-muted {
    font-size: 0.7rem;
    color: var(--text-muted);
    display: block;
    margin-top: 0.2rem;
}


.form-group {
    margin-bottom: 0.6rem;
    text-align: left;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    color: var(--text-main);
    font-family: var(--font-body);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-y);
    background: rgba(255,255,255,0.1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Servicios Section
   ========================================================================== */
.services {
    padding: 6rem 0;
    background: var(--bg-dark);
}

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

.service-card {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
}

.service-card.x-accent::before { background-color: var(--color-x); }
.service-card.y-accent::before { background-color: var(--color-y); }
.service-card.z-accent::before { background-color: var(--color-z); }

.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(255,255,255,0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-icon {
    width: 30px;
    height: 30px;
}

.x-accent .service-icon { stroke: var(--color-x); }
.y-accent .service-icon { stroke: var(--color-y); }
.z-accent .service-icon { stroke: var(--color-z); }

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--text-muted);
}

/* ==========================================================================
   Galería Section
   ========================================================================== */
.gallery {
    padding: 6rem 0;
    background: linear-gradient(180deg, var(--bg-dark) 0%, #050505 100%);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1;
    background: var(--bg-card);
}

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

.placeholder-img {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.placeholder-img svg {
    width: 50px;
    height: 50px;
    opacity: 0.5;
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.gallery-overlay span {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    transform: translateY(20px);
    transition: var(--transition);
    color: var(--color-y);
}

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

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

.gallery-item:hover .gallery-overlay span {
    transform: translateY(0);
}

.gallery-action {
    text-align: center;
}

.gallery-action p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* ==========================================================================
   Contacto Section
   ========================================================================== */
.contact {
    padding: 6rem 0;
    background: var(--bg-dark);
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    background: var(--bg-card);
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.05);
}

.contact-info {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3rem;
}

.info-item {
    display: flex;
    gap: 1.5rem;
}

.info-icon {
    font-size: 2rem;
}

.info-item h4 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.info-item p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.whatsapp-btn {
    background-color: #25D366;
    color: #fff;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    gap: 10px;
}

.whatsapp-btn:hover {
    background-color: #1ebe57;
    transform: translateY(-2px);
}

.w-icon {
    width: 20px;
    height: 20px;
}

.nav-link-btn {
    background-color: rgba(255,255,255,0.1);
    color: var(--text-main);
    padding: 0.8rem 1.5rem;
    font-size: 0.9rem;
}

.nav-link-btn:hover {
    background-color: rgba(255,255,255,0.2);
}

.map-container {
    min-height: 400px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
footer {
    background: #000;
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.05);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 900px) {
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
    .hero-content h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(10, 10, 10, 0.95);
        flex-direction: column;
        padding: 2rem 0;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: flex;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}
.hidden { display: none !important; }
