/* ============================================
   BASCULA CENCAR - Premium Industrial Design
   ============================================ */

/* --- VARIABLES --- */
:root {
    --primary: #355872;
    --secondary: #7AAACE;
    --accent: #9CD5FF;
    --bg-light: #F7F8F0;
    --white: #ffffff;
    --dark: #1a2e3d;
    --text-body: #4a6275;
    --location-red: #E74C3C;
    --shadow-sm: 0 2px 8px rgba(53, 88, 114, 0.08);
    --shadow-md: 0 8px 30px rgba(53, 88, 114, 0.12);
    --shadow-lg: 0 20px 60px rgba(53, 88, 114, 0.15);
    --shadow-card: 0 4px 20px rgba(53, 88, 114, 0.10);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- RESET Y BASE --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-body);
    overflow-x: hidden;
    line-height: 1.6;
    font-size: 16px;
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

/* --- UTILITY: REVEAL ANIMATIONS --- */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- NAVEGACION --- */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(53, 88, 114, 0.06);
    transition: box-shadow var(--transition), padding var(--transition);
}

header.scrolled {
    box-shadow: var(--shadow-md);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 72px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.logo span {
    color: var(--secondary);
}

.logo::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 28px;
    background: linear-gradient(180deg, var(--secondary), var(--accent));
    border-radius: 3px;
    margin-right: 8px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 8px;
    align-items: center;
}

nav ul li a {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
    letter-spacing: 0.01em;
}

nav ul li a:hover {
    background: rgba(53, 88, 114, 0.06);
    color: var(--secondary);
}

.btn-nav {
    background: var(--primary) !important;
    color: var(--white) !important;
    padding: 10px 24px !important;
    border-radius: var(--radius-sm) !important;
    font-weight: 700 !important;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition) !important;
}

.btn-nav:hover {
    background: var(--secondary) !important;
    color: var(--white) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(122, 170, 206, 0.35) !important;
}

/* --- HAMBURGER MENU (MOBILE) --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    z-index: 1001;
}

.menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--primary);
    border-radius: 3px;
    transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

/* --- HERO --- */
.hero-container {
    position: relative;
    width: 100%;
    height: 80vh;
    min-height: 520px;
    max-height: 800px;
    overflow: hidden;
    background: var(--dark);
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.5s ease;
    z-index: 1;
}

.slide::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(26, 46, 61, 0.82) 0%,
        rgba(53, 88, 114, 0.55) 50%,
        rgba(26, 46, 61, 0.75) 100%
    );
    z-index: 1;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: 0 24px;
}

.hero-content h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 16px;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: clamp(1rem, 2.2vw, 1.25rem);
    line-height: 1.6;
    opacity: 0.9;
    max-width: 580px;
    margin: 0 auto 32px;
    font-weight: 400;
}

.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
    padding: 16px 36px;
    border-radius: 50px;
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    cursor: pointer;
    border: none;
    letter-spacing: 0.01em;
}

.hero-cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    background: var(--accent);
    color: var(--dark);
}

.hero-cta svg {
    transition: transform var(--transition);
}

.hero-cta:hover svg {
    transform: translateX(4px);
}

/* --- CAROUSEL INDICATORS --- */
.carousel-indicators {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.carousel-indicators .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    border: 2px solid rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background var(--transition), transform var(--transition), width var(--transition);
}

.carousel-indicators .dot.active {
    background: var(--white);
    border-color: var(--white);
    width: 32px;
    border-radius: 8px;
}

/* --- STATS BAR --- */
.stats-bar {
    background: var(--white);
    margin-top: -48px;
    position: relative;
    z-index: 30;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 36px 48px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 140px;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.stat-number .stat-suffix {
    font-size: 1.4rem;
    color: var(--secondary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-body);
    font-weight: 500;
    margin-top: 4px;
    letter-spacing: 0.02em;
}

.stat-divider {
    width: 1px;
    height: 48px;
    background: rgba(53, 88, 114, 0.1);
}

/* --- SECTION TITLES --- */
.section-title {
    text-align: center;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    color: var(--primary);
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 12px;
}

.section-subtitle {
    text-align: center;
    font-size: 1.05rem;
    color: var(--text-body);
    max-width: 560px;
    margin: 0 auto 48px;
    line-height: 1.6;
}

/* --- SECCION SERVICIOS --- */
#servicios {
    padding: 100px 0 80px;
}

.grid-services {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin: 0 auto;
}

.card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(53, 88, 114, 0.06);
    transition: transform var(--transition), box-shadow var(--transition);
    cursor: default;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-img-wrapper img {
    transform: scale(1.08);
}

.card-img-wrapper::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.9));
    pointer-events: none;
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover > img {
    transform: scale(1.08);
}

.card-body {
    padding: 24px 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.card-body h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.01em;
    line-height: 1.3;
}

.card-body p {
    font-size: 0.92rem;
    color: var(--text-body);
    line-height: 1.6;
}

.card-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
    flex-shrink: 0;
}

.card-icon svg {
    width: 22px;
    height: 22px;
    color: var(--white);
}

/* --- PROCESO DE PESAJE --- */
.process-section {
    background: var(--white);
    padding: 100px 0;
}

.process-grid {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
    position: relative;
}

.process-step {
    flex: 1;
    min-width: 200px;
    max-width: 260px;
    text-align: center;
    position: relative;
    padding: 32px 20px;
}

.step-number {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    font-weight: 800;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    box-shadow: 0 6px 20px rgba(53, 88, 114, 0.25);
}

.process-step h4 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.process-step p {
    font-size: 0.88rem;
    color: var(--text-body);
    line-height: 1.55;
}

.process-connector {
    position: absolute;
    top: 60px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.process-connector svg {
    color: var(--accent);
}

/* --- SECCION CONTACTO --- */
#contacto {
    padding: 80px 0;
}

.contact-wrapper {
    display: flex;
    gap: 48px;
    align-items: stretch;
    max-width: 960px;
    margin: 0 auto;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 32px;
}

.contact-info-item {
    display: flex;
    gap: 16px;
    align-items: flex-start;
}

.contact-info-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(156, 213, 255, 0.2), rgba(122, 170, 206, 0.15));
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-info-icon svg {
    width: 22px;
    height: 22px;
    color: var(--primary);
}

.contact-info-item h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.contact-info-item p {
    font-size: 0.88rem;
    color: var(--text-body);
    line-height: 1.5;
}

.contact-box {
    flex: 1;
    background: var(--primary);
    color: var(--white);
    padding: 40px 36px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 480px;
    width: 100%;
}

.contact-box h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.contact-box .contact-box-subtitle {
    font-size: 0.92rem;
    opacity: 0.8;
    margin-bottom: 28px;
    line-height: 1.5;
}

.contact-box form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
}

.contact-box input,
.contact-box textarea {
    width: 100%;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    border: 2px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color var(--transition), background var(--transition);
    outline: none;
}

.contact-box input::placeholder,
.contact-box textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.contact-box input:focus,
.contact-box textarea:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.12);
}

.contact-box textarea {
    min-height: 120px;
    resize: vertical;
}

.btn-main {
    background: var(--accent);
    color: var(--dark);
    padding: 16px 32px;
    font-weight: 700;
    font-size: 1rem;
    border-radius: var(--radius-sm);
    border: none;
    cursor: pointer;
    font-family: inherit;
    letter-spacing: 0.01em;
    transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-main::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.25);
    border-radius: 50%;
    transition: width 0.5s, height 0.5s, top 0.5s, left 0.5s;
    transform: translate(-50%, -50%);
}

.btn-main:hover {
    background: var(--white);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}

.btn-main:active::after {
    width: 300px;
    height: 300px;
    transition: 0s;
}

.success-msg {
    margin-top: 16px;
    padding: 14px 20px;
    background: rgba(156, 213, 255, 0.15);
    border: 1px solid rgba(156, 213, 255, 0.3);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-weight: 600;
    font-size: 0.92rem;
    text-align: center;
}

/* --- MAPA --- */
.map-section {
    background: var(--bg-light);
    padding: 80px 0 80px;
}

.map-section .section-title {
    padding-bottom: 12px;
}

.section-title-line {
    width: 80px;
    height: 4px;
    background: var(--primary);
    margin: 0 auto 20px;
    border-radius: 2px;
}

.map-card {
    background: var(--white);
    border: 2px solid var(--accent);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(53, 88, 114, 0.15);
    transition: box-shadow var(--transition), transform var(--transition);
}

.map-card:hover {
    box-shadow: 0 16px 50px rgba(53, 88, 114, 0.2);
    transform: translateY(-4px);
}

.map-card iframe {
    display: block;
    width: 100%;
    height: 450px;
    border: 0;
}

/* --- FOOTER --- */
.site-footer {
    background: var(--dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 60px 0 0;
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    padding-bottom: 40px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.footer-logo span {
    color: var(--accent);
}

.footer-logo::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 24px;
    background: linear-gradient(180deg, var(--secondary), var(--accent));
    border-radius: 3px;
    margin-right: 6px;
}

.footer-col p {
    font-size: 0.88rem;
    line-height: 1.65;
    max-width: 280px;
}

.footer-col h4 {
    color: var(--white);
    font-size: 0.92rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 16px;
}

.footer-col ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-col ul li a {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition), padding-left var(--transition);
}

.footer-col ul li a:hover {
    color: var(--accent);
    padding-left: 6px;
}

.footer-bottom {
    text-align: center;
    padding: 24px 0;
    font-size: 0.82rem;
    opacity: 0.5;
}

/* --- LOCATION FLOAT --- */
.location-float {
    position: fixed;
    bottom: 100px;
    right: 28px;
    width: 60px;
    height: 60px;
    z-index: 1000;
    border-radius: 50%;
    background: var(--location-red);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(231, 76, 60, 0.35);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    cursor: pointer;
}

.location-float:hover {
    transform: scale(1.1) translateY(-4px);
    box-shadow: 0 12px 36px rgba(231, 76, 60, 0.45);
    background: #C0392B;
}

.location-float svg {
    width: 28px;
    height: 28px;
}

/* --- WHATSAPP FLOAT --- */
.whatsapp-float {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 60px;
    height: 60px;
    z-index: 1000;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.35);
    transition: transform var(--transition), box-shadow var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-4px);
    box-shadow: 0 12px 36px rgba(37, 211, 102, 0.45);
}

.whatsapp-float img,
.whatsapp-float svg {
    width: 32px;
    height: 32px;
}

/* --- BADGE --- */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, rgba(156, 213, 255, 0.15), rgba(122, 170, 206, 0.1));
    color: var(--secondary);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 8px 18px;
    border-radius: 50px;
    border: 1px solid rgba(122, 170, 206, 0.2);
    margin-bottom: 16px;
}

.badge-light {
    background: rgba(255, 255, 255, 0.1);
    color: var(--accent);
    border-color: rgba(255, 255, 255, 0.15);
}

/* ============================================
   MEDIA QUERIES
   ============================================ */

@media (max-width: 1024px) {
    .grid-services {
        grid-template-columns: repeat(2, 1fr);
    }

    .stats-bar {
        margin-left: 5%;
        margin-right: 5%;
    }

    .contact-wrapper {
        flex-direction: column;
        align-items: center;
    }

    .contact-info {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 24px;
    }

    .contact-box {
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    nav ul {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px 24px;
        gap: 4px;
        box-shadow: var(--shadow-md);
        border-top: 1px solid rgba(53, 88, 114, 0.06);
    }

    nav ul.open {
        display: flex;
    }

    nav ul li a {
        display: block;
        padding: 14px 16px;
        border-radius: var(--radius-sm);
    }

    .hero-container {
        height: 70vh;
        min-height: 440px;
    }

    .hero-content h1 {
        font-size: clamp(1.6rem, 6vw, 2.2rem);
    }

    .stats-bar {
        flex-direction: column;
        gap: 20px;
        padding: 28px 24px;
        margin-top: -32px;
        margin-left: 5%;
        margin-right: 5%;
    }

    .stat-divider {
        width: 60px;
        height: 1px;
    }

    .grid-services {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }

    .process-grid {
        flex-direction: column;
        align-items: center;
    }

    .process-connector {
        display: none;
    }

    .contact-info {
        flex-direction: column;
    }

    .footer-grid {
        flex-direction: column;
        gap: 32px;
    }

    #servicios,
    #contacto {
        padding: 64px 0;
    }

    .process-section {
        padding: 64px 0;
    }
}

@media (max-width: 480px) {
    body {
        font-size: 15px;
    }

    .hero-container {
        min-height: 380px;
    }

    .hero-cta {
        padding: 14px 28px;
        font-size: 0.92rem;
    }

    .contact-box {
        padding: 28px 20px;
    }

    .location-float,
    .whatsapp-float {
        width: 52px;
        height: 52px;
        right: 16px;
    }

    .location-float {
        bottom: 84px;
    }

    .whatsapp-float {
        bottom: 20px;
    }

    .location-float svg {
        width: 24px;
        height: 24px;
    }

    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }

    .map-card iframe {
        height: 350px;
    }
}
