/* ============================================
   JAMWEB.SPACE - Components
   ============================================ */

/* ─────────────────────────────────────────
   BUTTONS
   ───────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    line-height: 1;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn svg {
    width: 1.25em;
    height: 1.25em;
    flex-shrink: 0;
}

/* Primary Button - Filled Neon */
.btn-primary {
    background: var(--gradient-neon);
    color: var(--color-bg-primary);
    box-shadow: var(--shadow-neon-sm);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-neon-md);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Secondary Button - Outline */
.btn-secondary {
    background: transparent;
    color: var(--color-neon);
    border: 2px solid var(--color-neon);
}

.btn-secondary:hover {
    background: var(--color-neon-subtle);
    box-shadow: var(--shadow-neon-sm);
    transform: translateY(-2px);
}

/* Ghost Button */
.btn-ghost {
    background: transparent;
    color: var(--color-text-primary);
    border: 1px solid var(--color-border-light);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-neon);
    color: var(--color-neon);
}

/* WhatsApp Button */
.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #20bd5a;
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.btn-whatsapp-floating:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.5);
    color: white;
}

.btn-whatsapp-floating svg {
    width: 32px;
    height: 32px;
}

/* Button Sizes */
.btn-sm {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
}

.btn-lg {
    padding: var(--space-5) var(--space-10);
    font-size: var(--text-lg);
}

/* ─────────────────────────────────────────
   HEADER / NAVIGATION
   ───────────────────────────────────────── */

.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    transition: all var(--transition-base);
}

.header.scrolled {
    background: rgba(10, 10, 15, 0.95);
    box-shadow: var(--shadow-lg);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo img {
    height: 40px;
    width: auto;
}

/* Desktop Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav-list {
    display: flex;
    align-items: center;
    gap: var(--space-6);
}

.nav-link {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-secondary);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-neon);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--color-neon);
    transition: all var(--transition-base);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Dropdown Menu */
.nav-dropdown {
    position: relative;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: var(--space-1);
}

.nav-dropdown-toggle svg {
    width: 1em;
    height: 1em;
    transition: transform var(--transition-fast);
}

.nav-dropdown:hover .nav-dropdown-toggle svg {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 220px;
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-2);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-fast);
    box-shadow: var(--shadow-xl);
}

.nav-dropdown:hover .nav-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.nav-dropdown-item {
    display: block;
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.nav-dropdown-item:hover {
    background: var(--color-neon-subtle);
    color: var(--color-neon);
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text-primary);
    transition: all var(--transition-fast);
    border-radius: 2px;
}

.menu-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

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

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Navigation */
@media (max-width: 1024px) {
    .menu-toggle {
        display: flex;
    }

    /* Hide the desktop nav on mobile — JS overlay handles it */
    .nav {
        display: none !important;
    }
}

/* ─────────────────────────────────────────
   MOBILE NAV OVERLAY  (#mobile-nav)
   Built by JS as a direct <body> child so
   it is never trapped inside the header's
   backdrop-filter stacking context.
   ───────────────────────────────────────── */

#mobile-nav {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

#mobile-nav.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

/* Slide-in panel */
.mn-panel {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(320px, 85vw);
    background: #0a0a0f;
    border-left: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-direction: column;
    padding: 24px 20px 40px;
    overflow-y: auto;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

#mobile-nav.open .mn-panel {
    transform: translateX(0);
}

/* Close button */
.mn-close {
    align-self: flex-end;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #a0a0b0;
    cursor: pointer;
    margin-bottom: 24px;
    flex-shrink: 0;
    transition: color 0.2s, border-color 0.2s;
}

.mn-close:hover {
    color: #00e2b7;
    border-color: rgba(0, 226, 183, 0.4);
}

/* Nav list */
.mn-list {
    list-style: none;
    margin: 0;
    padding: 0;
    flex: 1;
}

.mn-list>li {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

/* Nav links */
.mn-link {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 15px 4px;
    font-size: 1.05rem;
    font-weight: 500;
    color: #a0a0b0;
    background: transparent;
    border: none;
    cursor: pointer;
    text-align: left;
    transition: color 0.2s;
}

.mn-link:hover,
.mn-link.active {
    color: #00e2b7;
}

/* Servicios toggle arrow */
.mn-sub-toggle {
    justify-content: space-between;
}

.mn-sub-toggle svg {
    transition: transform 0.25s ease;
    flex-shrink: 0;
}

.mn-has-sub.open .mn-sub-toggle svg {
    transform: rotate(180deg);
}

/* Sub-menu */
.mn-sub {
    list-style: none;
    margin: 0;
    padding: 0 0 8px 12px;
    display: none;
}

.mn-has-sub.open .mn-sub {
    display: block;
}

.mn-sub-link {
    display: block;
    padding: 10px 4px;
    font-size: 0.9rem;
    color: #7a7a90;
    transition: color 0.2s;
}

.mn-sub-link:hover,
.mn-sub-link.active {
    color: #00e2b7;
}

/* Chatbot IA link — neon accent */
.mn-link--ai {
    color: #00e2b7 !important;
}

/* Contacto CTA button */
.mn-cta {
    display: block;
    margin-top: 24px;
    padding: 14px;
    background: linear-gradient(135deg, #00e2b7, #00b896);
    color: #0a0a0f;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 12px;
    text-align: center;
    transition: opacity 0.2s;
}

.mn-cta:hover {
    opacity: 0.9;
}



/* ─────────────────────────────────────────
   CARDS
   ───────────────────────────────────────── */

.card {
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, var(--color-border-neon), transparent 50%);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
    border-color: var(--color-border-neon);
}

.card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-neon-subtle);
    border: 1px solid var(--color-border-neon);
    border-radius: var(--radius-lg);
    color: var(--color-neon);
    margin-bottom: var(--space-5);
    transition: all var(--transition-base);
}

.card:hover .card-icon {
    box-shadow: var(--shadow-neon-sm);
}

.card-icon svg {
    width: 28px;
    height: 28px;
}

.card-title {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-3);
}

.card-text {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}

/* Highlighted Card */
.card-featured {
    border-color: var(--color-neon);
    box-shadow: var(--shadow-neon-sm);
}

.card-featured::before {
    opacity: 0.5;
}

/* ─────────────────────────────────────────
   PRICING TABLE
   ───────────────────────────────────────── */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-6);
}

.pricing-card {
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    display: flex;
    flex-direction: column;
    transition: all var(--transition-base);
}

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

.pricing-card.featured {
    border-color: var(--color-neon);
    box-shadow: var(--shadow-neon-md);
    position: relative;
}

.pricing-card.featured::after {
    content: 'POPULAR';
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    background: var(--gradient-neon);
    color: var(--color-bg-primary);
    font-size: var(--text-xs);
    font-weight: var(--font-bold);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    letter-spacing: var(--tracking-wider);
}

.pricing-name {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    margin-bottom: var(--space-2);
}

.pricing-price {
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    color: var(--color-neon);
    margin-bottom: var(--space-2);
}

.pricing-price span {
    font-size: var(--text-base);
    font-weight: var(--font-normal);
    color: var(--color-text-muted);
}

.pricing-description {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid var(--color-border);
}

.pricing-features {
    flex: 1;
    margin-bottom: var(--space-6);
}

.pricing-features li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-3);
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-3);
}

.pricing-features li svg {
    width: 20px;
    height: 20px;
    color: var(--color-neon);
    flex-shrink: 0;
    margin-top: 2px;
}

/* ─────────────────────────────────────────
   FORMS
   ───────────────────────────────────────── */

.form-group {
    margin-bottom: var(--space-5);
}

.form-label {
    display: block;
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--color-text-primary);
    margin-bottom: var(--space-2);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-4);
    font-size: var(--text-base);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    color: var(--color-text-primary);
    transition: all var(--transition-fast);
}

.form-input:hover,
.form-textarea:hover,
.form-select:hover {
    border-color: var(--color-border-light);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-neon);
    box-shadow: 0 0 0 3px var(--color-neon-subtle);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--color-text-muted);
}

.form-textarea {
    min-height: 140px;
    resize: vertical;
}

.form-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a0a0b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right var(--space-4) center;
    background-size: 16px;
    padding-right: var(--space-12);
}

.form-hint {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    margin-top: var(--space-1);
}

.form-error {
    font-size: var(--text-xs);
    color: var(--color-error);
    margin-top: var(--space-1);
}

/* ─────────────────────────────────────────
   FOOTER
   ───────────────────────────────────────── */

.footer {
    background: var(--color-bg-secondary);
    border-top: 1px solid var(--color-border);
    padding-top: var(--space-16);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: var(--space-12);
    margin-bottom: var(--space-12);
}

@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-8);
    }
}

@media (max-width: 640px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
}

.footer-brand {
    max-width: 320px;
}

.footer-logo {
    height: 36px;
    width: auto;
    margin-bottom: var(--space-4);
}

.footer-tagline {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    margin-bottom: var(--space-6);
}

.footer-heading {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    text-transform: uppercase;
    letter-spacing: var(--tracking-wider);
    color: var(--color-text-primary);
    margin-bottom: var(--space-4);
}

.footer-links li {
    margin-bottom: var(--space-2);
}

.footer-links a {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--color-neon);
}

.footer-bottom {
    border-top: 1px solid var(--color-border);
    padding-block: var(--space-6);
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-4);
}

.footer-copyright {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

.footer-legal {
    display: flex;
    gap: var(--space-6);
}

.footer-legal a {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.footer-legal a:hover {
    color: var(--color-neon);
}

/* Tech Stack Strip */
.footer-tech {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-8);
    padding: var(--space-6) 0;
    border-top: 1px solid var(--color-border);
    opacity: 0.4;
    filter: grayscale(1);
    transition: all var(--transition-base);
}

.footer-tech:hover {
    opacity: 0.7;
    filter: grayscale(0);
}

.footer-tech img {
    height: 24px;
    width: auto;
}

/* ─────────────────────────────────────────
   BADGES & TAGS
   ───────────────────────────────────────── */

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--font-medium);
    border-radius: var(--radius-full);
    background: var(--color-neon-subtle);
    color: var(--color-neon);
    border: 1px solid var(--color-border-neon);
}

.tag {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-sm);
    background: var(--color-bg-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.tag:hover,
.tag.active {
    border-color: var(--color-neon);
    color: var(--color-neon);
    background: var(--color-neon-subtle);
}

/* ─────────────────────────────────────────
   DIVIDERS
   ───────────────────────────────────────── */

.divider {
    height: 1px;
    background: var(--color-border);
    margin: var(--space-8) 0;
}

.divider-neon {
    background: linear-gradient(90deg, transparent, var(--color-neon), transparent);
    opacity: 0.5;
}

/* ─────────────────────────────────────────
   FORM NOTIFICATIONS
   ───────────────────────────────────────── */

.form-notification {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    margin-top: var(--space-4);
    animation: slide-in 0.3s ease-out;
}

@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-notification.success {
    background: rgba(0, 226, 183, 0.1);
    border: 1px solid rgba(0, 226, 183, 0.3);
    color: #00e2b7;
}

.form-notification.error {
    background: rgba(255, 82, 82, 0.1);
    border: 1px solid rgba(255, 82, 82, 0.3);
    color: #ff5252;
}

.notification-close {
    background: none;
    border: none;
    color: inherit;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.notification-close:hover {
    opacity: 1;
}

.form-note {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-align: center;
    margin-top: var(--space-4);
}

/* ─────────────────────────────────────────
   MODALS / POPUPS
   ───────────────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.open {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #12121a;
    /* slightly lighter than base dark */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    padding: 40px 32px;
    transform: translateY(20px) scale(0.95);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-overlay.open .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: none;
    color: var(--color-text-muted);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-text);
}

.modal-header {
    text-align: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    margin-bottom: 8px;
    font-size: 1.5rem;
}

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