/* =========================================
   TU CSS ORIGINAL (INTACTO)
   ========================================= */
:root {
    --primary: #0f172a;
    --accent: #2563eb;
    --bg: #ffffff;
    --text: #1e293b;
    --muted: #64748b;
    --border: #f1f5f9;
    --max-width: 1100px;
    --color-tuffy: #3b82f6;
    --color-ivan: #ef4444;
    --color-fer: #8b5cf6;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

/* Ajuste del Logo y la imagen de Tuffy */
.logo {
    display: flex;
    align-items: center;
    gap: 1px; /* Aumenta el espacio entre imagen y texto */
    font-weight: 800;
    font-size: 1.5rem;
}

.logo-img-wrapper {
    width: 110px; 
    height: 55px;
    /* AJUSTE: Empuja la imagen a la derecha */
    margin-left: 30px; 
    /* Espacio entre la imagen y el texto "Tuffy Inc" */
    margin-right: 5px; 
}

.logo-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Cambia a contain para ver al perrito completo */
    
    /* 1. Hacemos un zoom para eliminar el espacio vacío de la foto */
    transform: scale(1.1); 
    
    /* 2. Lo movemos hacia la derecha dentro de su cuadro */
    margin-left: 35px; 
    
    transition: transform 0.3s ease; /* Opcional: para que se vea fluido */
}

/* Animación del Cursor */
.blink-cursor {
    color: var(--accent);
    margin-left: 2px;
    font-weight: 300;
    animation: blinker 1s linear infinite;
}

@keyframes blinker {
    50% { opacity: 0; }
}

/* Asegurar que el wrap alinee todo bien */
.wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* FONDO DE ICONOS ANIMADOS DETRÁS DE TODO */
.bg-icons {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.04;
}

.floating-icon {
    position: absolute;
    font-size: 2rem;
    color: var(--primary);
    animation: move linear infinite;
}

@keyframes move {
    from { transform: translateY(110vh) rotate(0deg); }
    to { transform: translateY(-20vh) rotate(360deg); }
}

/* NAV */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border);
    z-index: 1000;
}

nav .wrap {
    max-width: var(--max-width);
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
}

.logo {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary);
    letter-spacing: -1px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo i {
    color: var(--accent);
}

.menu a {
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--muted);
    text-decoration: none;
    margin-left: 20px;
    transition: 0.3s;
    text-transform: uppercase;
}

.menu a:hover {
    color: var(--accent);
}

/* 1. HERO */
header.main-hero {
    height: 90vh;
    background: linear-gradient(rgba(15, 23, 42, 0.85), rgba(15, 23, 42, 0.85)),
        url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?q=80&w=2072');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: center;
    padding: 0 24px;
}

/* MODIFICADO: Agregamos las propiedades para el hover bitono aquí */
header h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -3px;
    margin-bottom: 20px;
    
    /* Agregados para el efecto solicitado */
    color: #fff;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: default;
}

header h1 span {
    color: var(--accent); /* Azul Tuffy */
}

/* EFECTO HOVER DEL TÍTULO */
header h1:hover {
    transform: scale(1.05);
    text-shadow: 0 0 30px rgba(37, 99, 235, 0.5); /* Resplandor azul */
}

.tech-badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 30px;
}

.badge-tech {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    cursor: default;
    text-transform: uppercase;
}

.badge-tech:hover {
    background: var(--accent);
    border-color: var(--accent);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.3);
}

/* 2. ECOSISTEMA */
#ecosistema {
    padding: 100px 0;
}

.eco-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.eco-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 35px;
    transition: 0.4s;
    position: relative;
    text-align: center;
    cursor: pointer;
}

.eco-card i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 15px;
    display: block;
}

.eco-card:hover {
    transform: scale(1.05);
    border-color: var(--accent);
}

.badge-dev {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #eff6ff;
    color: var(--accent);
    font-size: 0.65rem;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 12px;
}

/* 3. EQUIPO FLIP */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    padding: 50px 0;
}

.flip-card {
    height: 350px;
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.8s;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-front,
.flip-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 25px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px;
    background-color: #fff;
}

.flip-back {
    transform: rotateY(180deg);
    color: #fff;
    text-align: center;
    border: none;
}

/* 4. TUFFYDEV CORE */
#tuffydev {
    margin: 60px 0;
    padding: 80px 0;
    background: #020617;
    color: #fff;
    border-radius: 40px;
}

.dash-box {
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 40px;
}

.dash-box img {
    width: 100%;
    display: block;
}

.dev-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.dev-card {
    height: 220px;
    perspective: 1000px;
}

.dev-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    cursor: pointer;
}

.dev-card:hover .dev-card-inner {
    transform: rotateY(180deg);
}

.dev-front,
.dev-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.dev-front {
    background: rgba(255, 255, 255, 0.03);
}

.dev-front i {
    font-size: 2rem;
    color: var(--accent);
    margin-bottom: 10px;
}

.dev-back {
    background: var(--accent);
    color: white;
    transform: rotateY(180deg);
    border: none;
}

/* 5. PLANES */
#planes {
    padding: 100px 0;
    background: #f8fafc;
    border-radius: 50px;
}

.price-container {
    background: #fff;
    border-radius: 30px;
    overflow-x: auto;
    border: 1px solid var(--border);
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

th {
    background: #f1f5f9;
    padding: 25px;
    text-align: center;
    font-weight: 800;
}

td {
    padding: 15px 20px;
    border-bottom: 1px solid #f1f5f9;
    text-align: center;
    font-size: 0.85rem;
}

.blue-check {
    color: var(--accent);
    font-size: 1.2rem;
}

.cross {
    color: #ef4444;
    font-size: 1.1rem;
}

.cost-row {
    background: #fdfdfd;
    font-weight: 800;
    font-size: 1rem !important;
    color: var(--primary);
}

.plan-btn {
    padding: 12px 24px;
    border-radius: 10px;
    border: none;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: 0.3s;
}

.custom-plan-box {
    margin-top: 40px;
    background: var(--accent);
    color: #fff;
    padding: 40px;
    border-radius: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* 6. CONTACTO FULL WIDTH & CENTERED */
#contacto {
    padding: 100px 0;
}

.contact-card {
    width: 100%;
    padding: 60px 40px;
    background: var(--primary);
    color: #fff;
    border-radius: 35px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.contact-card input,
.contact-card textarea {
    width: 100%;
    padding: 20px;
    margin: 15px 0;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 1.1rem;
    text-align: center;
}

.contact-card input::placeholder,
.contact-card textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
    text-align: center;
}

.btn-submit {
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 22px;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    margin-top: 20px;
}

/* FLOAT BUTTONS */
.float-btns {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 2000;
}

.f-btn {
    width: 60px;
    height: 60px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
    border: none;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-up {
    background: var(--primary);
    opacity: 0;
    transform: translateY(50px);
    pointer-events: none;
}

.btn-up.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.btn-wa {
    background: #22c55e;
    text-decoration: none;
}

footer {
    padding: 60px 0;
    text-align: center;
    background: #020617;
    color: #64748b;
}

/* =========================================
   NUEVOS ESTILOS AGREGADOS (RESPONSIVE)
   ========================================= */

/* Estilo por defecto para el botón hamburguesa (Oculto en PC) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--primary);
    cursor: pointer;
}

/* Media Queries para Móvil y Tablets */
@media (max-width: 768px) {
    
    /* Mostrar botón hamburguesa */
    .menu-toggle {
        display: block;
    }

    /* Ocultar menú normal y darle estilo de caja flotante */
    .menu {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        padding: 20px;
        border-bottom: 3px solid var(--accent);
        display: none; /* Se activa con la clase .active desde JS */
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
    }

    .menu.active {
        display: flex;
    }

    .menu a {
        margin: 15px 0;
        font-size: 1.1rem;
        text-align: center;
        margin-left: 0; /* Reset del margen de desktop */
    }

    /* Ajustes generales de tamaño */
    header h1 {
        font-size: 2.2rem;
    }

    /* Grids a 1 columna */
    .eco-grid, .team-grid, .dev-grid {
        grid-template-columns: 1fr;
    }

    /* Padding de tarjetas */
    .contact-card, .custom-plan-box {
        padding: 30px 20px;
    }
}