/* DSI Tech Theme - 2025 */
:root {
    --bg-dark: #050a14;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --text-main: #e0e6ed;
    --text-muted: #94a3b8;
    --primary-blue: #0d6efd;
    --neon-cyan: #00f2ff;
    --neon-purple: #bc13fe;
    --glass-border: rgba(255, 255, 255, 0.1);
    --nav-bg: rgba(5, 10, 20, 0.85);
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-main);
    overflow-x: hidden;
}

/* Typography & Links */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    font-weight: 700;
    letter-spacing: -0.5px;
}

a {
    color: var(--neon-cyan);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--neon-purple);
    text-shadow: 0 0 8px rgba(188, 19, 254, 0.6);
}

/* Navbar */
.navbar {
    background-color: var(--nav-bg) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
}

.navbar-brand {
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary-blue), var(--neon-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-link {
    color: var(--text-main) !important;
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--neon-cyan);
    transition: width 0.3s;
    box-shadow: 0 0 10px var(--neon-cyan);
}

.nav-link:hover::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    background: radial-gradient(circle at 50% 50%, rgba(13, 110, 253, 0.15), transparent 60%),
        linear-gradient(rgba(5, 10, 20, 0.9), rgba(5, 10, 20, 0.8)),
        url('images/nuevo-logo-dsi-2025.png');
    /* Fallback */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(var(--glass-border) 1px, transparent 1px),
        linear-gradient(90deg, var(--glass-border) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.1;
    pointer-events: none;
}

.hero-section h1 {
    font-size: 3.5rem;
    text-shadow: 0 0 20px rgba(13, 110, 253, 0.5);
    margin-bottom: 1.5rem;
}

.hero-section .lead {
    color: var(--text-muted);
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Buttons */
.btn-primary {
    background: transparent;
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan);
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 10px rgba(0, 242, 255, 0.2);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--neon-cyan);
    color: var(--bg-dark);
    box-shadow: 0 0 25px rgba(0, 242, 255, 0.6);
    border-color: var(--neon-cyan);
    transform: translateY(-2px);
}

/* Sections General */
section {
    padding: 80px 0;
    position: relative;
}

/* Cards (Services, Projects, Testimonials) */
.card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: var(--text-main);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px);
    background: var(--bg-card-hover);
    border-color: var(--neon-cyan);
    box-shadow: 0 10px 30px rgba(0, 242, 255, 0.1);
}

.service-icon {
    font-size: 3rem;
    background: linear-gradient(45deg, var(--neon-cyan), var(--primary-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1.5rem;
    display: inline-block;
    filter: drop-shadow(0 0 5px rgba(13, 110, 253, 0.5));
}

/* Projects Specific */
.project-img-hover {
    transition: transform 0.5s ease, filter 0.5s ease;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card:hover .project-img-hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* Testimonials */
.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--neon-purple);
    color: var(--text-main);
    padding: 2rem;
    height: 100%;
    border-radius: 8px;
}

.testimonial-stars svg {
    fill: var(--neon-cyan);
    filter: drop-shadow(0 0 2px var(--neon-cyan));
}

.testimonial-card cite {
    color: var(--neon-purple);
    font-style: normal;
    font-weight: 600;
}

/* Accordion (FAQ) */
.accordion-item {
    background: transparent;
    border: 1px solid var(--glass-border);
    margin-bottom: 10px;
    border-radius: 8px !important;
    overflow: hidden;
}

.accordion-button {
    background: var(--bg-card);
    color: var(--text-main);
    box-shadow: none !important;
}

.accordion-button:not(.collapsed) {
    background: rgba(13, 110, 253, 0.2);
    color: var(--neon-cyan);
}

.accordion-button::after {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.accordion-body {
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
}

/* Footer */
footer {
    background: #020408 !important;
    border-top: 1px solid var(--glass-border);
    padding: 2rem 0;
}

/* Utilities */
.text-muted {
    color: var(--text-muted) !important;
}

.bg-light {
    background-color: transparent !important;
    /* Override Bootstrap bg-light */
}

.bg-dark {
    background-color: var(--bg-dark) !important;
}

/* WhatsApp Float */
.whatsapp-float {
    background: #25d366;
    box-shadow: 0 0 15px rgba(37, 211, 102, 0.4);
}

.whatsapp-float:hover {
    background: #128c7e;
    box-shadow: 0 0 25px rgba(37, 211, 102, 0.6);
    transform: scale(1.1);
}

/* Animations */
.animated-element {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.fade-in-up.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

/* =============================================
   NAVBAR LOGO
   ============================================= */
.navbar-brand {
    background: none;
    -webkit-text-fill-color: unset;
}

.navbar-brand img {
    height: 44px;
    width: auto;
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.btn-nav-cta {
    background: transparent;
    border: 1px solid var(--neon-cyan);
    color: var(--neon-cyan) !important;
    -webkit-text-fill-color: var(--neon-cyan);
    padding: 6px 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.btn-nav-cta:hover {
    background: var(--neon-cyan);
    color: var(--bg-dark) !important;
    -webkit-text-fill-color: var(--bg-dark);
    box-shadow: 0 0 15px rgba(0, 242, 255, 0.4);
}

/* =============================================
   HERO UPGRADES
   ============================================= */
.hero-section {
    background: radial-gradient(circle at 50% 50%, rgba(13, 110, 253, 0.15), transparent 60%),
        linear-gradient(rgba(5, 10, 20, 0.88), rgba(5, 10, 20, 0.80)),
        url('images/nuevo-logo-dsi-2025.png') center/cover no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.hero-badge {
    background: rgba(0, 242, 255, 0.08);
    border: 1px solid rgba(0, 242, 255, 0.25);
    color: var(--neon-cyan);
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.typed-text {
    color: var(--neon-cyan);
    text-shadow: 0 0 20px rgba(0, 242, 255, 0.5);
}

.typed-cursor {
    display: inline-block;
    color: var(--neon-cyan);
    animation: blink 1s step-end infinite;
    margin-left: 2px;
    font-weight: 300;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.btn-outline-hero {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    padding: 12px 30px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.btn-outline-hero:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.4);
    color: var(--text-main);
    transform: translateY(-2px);
}

.hero-stats {
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.4rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--neon-cyan), var(--primary-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

.stat-suffix {
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--neon-cyan), var(--primary-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    display: block;
    color: var(--text-muted);
    font-size: 0.78rem;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =============================================
   STACK SECTION
   ============================================= */
.stack-section {
    background: rgba(13, 110, 253, 0.02);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.stack-label {
    color: var(--text-muted);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0;
}

.stack-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

.stack-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 1rem 1.4rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    min-width: 95px;
    transition: all 0.3s ease;
    color: var(--text-muted);
    cursor: default;
}

.stack-item:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 242, 255, 0.1);
}

.stack-item i {
    font-size: 1.8rem;
}

.stack-item span {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* =============================================
   PROCESO / HOW WE WORK
   ============================================= */
.proceso-section {
    background: radial-gradient(circle at 80% 50%, rgba(188, 19, 254, 0.04), transparent 60%);
}

.process-step {
    padding: 2rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    position: relative;
    transition: all 0.35s ease;
    height: 100%;
}

.process-step:hover,
.process-step--active {
    border-color: var(--neon-cyan);
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 242, 255, 0.08);
}

.process-number {
    font-size: 4rem;
    font-weight: 700;
    color: rgba(0, 242, 255, 0.06);
    line-height: 1;
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    font-family: monospace;
    pointer-events: none;
}

.process-icon {
    font-size: 2.4rem;
    background: linear-gradient(45deg, var(--neon-cyan), var(--primary-blue));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* =============================================
   PROJECT BADGES
   ============================================= */
.project-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 242, 255, 0.12);
    border: 1px solid rgba(0, 242, 255, 0.35);
    color: var(--neon-cyan);
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 1;
}

/* =============================================
   TESTIMONIAL UPGRADES
   ============================================= */
.testimonial-avatar {
    width: 46px;
    height: 46px;
    min-width: 46px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-blue), var(--neon-purple));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
}

.testimonial-name {
    color: var(--text-main);
}

.testimonial-stars {
    font-size: 0.85rem;
    letter-spacing: -1px;
}

/* =============================================
   FOOTER COMPLETO
   ============================================= */
.footer-full {
    background: rgba(3, 6, 14, 0.99);
    border-top: 1px solid var(--glass-border);
}

.footer-heading {
    color: var(--neon-cyan);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.2rem;
}

.footer-desc {
    font-size: 0.9rem;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.88rem;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--neon-cyan);
    text-shadow: none;
}

.footer-whatsapp {
    color: #25d366 !important;
    font-weight: 600;
    font-size: 0.95rem;
}

.footer-whatsapp:hover {
    color: #1db954 !important;
    text-shadow: 0 0 8px rgba(37, 211, 102, 0.4) !important;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--text-muted);
    font-size: 1rem;
    margin-right: 6px;
    transition: all 0.3s ease;
}

.social-btn:hover {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 242, 255, 0.15);
    text-shadow: none;
}

.footer-bottom {
    border-top: 1px solid var(--glass-border);
}

/* =============================================
   CHATBOT
   ============================================= */
#chatbot-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

#chatbot-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-blue);
    border: none;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(13, 110, 253, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

#chatbot-toggle:hover {
    background: #0b5ed7;
    transform: scale(1.08);
    box-shadow: 0 6px 25px rgba(13, 110, 253, 0.7);
}

#chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 350px;
    height: 500px;
    background: #0d1117;
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
}

#chatbot-window.chatbot-hidden {
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

#chatbot-header {
    background: linear-gradient(135deg, var(--primary-blue), #0b3d91);
    color: #fff;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

#chatbot-close {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

#chatbot-close:hover {
    color: #fff;
}

#chatbot-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--bg-dark);
    scrollbar-width: thin;
    scrollbar-color: var(--glass-border) transparent;
}

#chatbot-messages::-webkit-scrollbar {
    width: 4px;
}

#chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

#chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 4px;
}

#chatbot-input-container {
    display: flex;
    padding: 12px;
    border-top: 1px solid var(--glass-border);
    background: #0d1117;
    gap: 8px;
}

#chatbot-input {
    flex: 1;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 10px 16px;
    font-size: 14px;
    outline: none;
    color: var(--text-main);
    font-family: 'Montserrat', sans-serif;
    transition: border-color 0.2s;
}

#chatbot-input::placeholder {
    color: var(--text-muted);
}

#chatbot-input:focus {
    border-color: var(--neon-cyan);
    box-shadow: 0 0 8px rgba(0, 242, 255, 0.15);
}

#chatbot-send {
    background: var(--primary-blue);
    border: none;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

#chatbot-send:hover {
    background: #0b5ed7;
    box-shadow: 0 0 12px rgba(13, 110, 253, 0.5);
    transform: scale(1.05);
}

.chat-message {
    padding: 10px 14px;
    border-radius: 14px;
    max-width: 82%;
    word-wrap: break-word;
    font-size: 0.88rem;
    line-height: 1.5;
    animation: slideIn 0.3s ease;
}

.chat-message.user {
    background: var(--primary-blue);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-message.bot {
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid var(--glass-border);
    color: var(--text-main);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 480px) {
    #chatbot-window {
        width: calc(100vw - 40px);
        height: 70vh;
    }
}

/* =============================================
   ARTICLE / RECURSOS PAGES
   ============================================= */

/* Alerts dark theme */
.alert {
    border-radius: 8px;
    border-width: 1px;
}
.alert-info    { background: rgba(13,110,253,0.12); border-color: rgba(13,110,253,0.35); color: var(--text-main); }
.alert-warning { background: rgba(255,193,7,0.10);  border-color: rgba(255,193,7,0.35);  color: var(--text-main); }
.alert-success { background: rgba(25,135,84,0.12);  border-color: rgba(25,135,84,0.35);  color: var(--text-main); }
.alert-danger  { background: rgba(220,53,69,0.12);  border-color: rgba(220,53,69,0.35);  color: var(--text-main); }
.alert strong  { color: inherit; }

/* Code blocks */
pre {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 1.2rem;
    color: var(--text-main);
    font-size: 0.82rem;
    overflow-x: auto;
    line-height: 1.6;
}

code {
    color: var(--neon-cyan);
    background: rgba(0, 242, 255, 0.08);
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.88em;
}

pre code {
    color: var(--text-main);
    background: transparent;
    padding: 0;
    font-size: inherit;
}

/* kbd */
kbd {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--glass-border);
    color: var(--neon-cyan);
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 0.82em;
    box-shadow: none;
}

/* Breadcrumb */
.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}
.breadcrumb-item a {
    color: var(--neon-cyan);
}
.breadcrumb-item.active {
    color: var(--text-muted);
}
.breadcrumb-item + .breadcrumb-item::before {
    color: var(--text-muted);
}

/* details / summary */
details {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 0.8rem 1.2rem;
    transition: all 0.2s ease;
}
details[open] { padding-bottom: 1.2rem; }
summary {
    color: var(--neon-cyan);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    -webkit-user-select: none;
    user-select: none;
}
summary:hover { color: var(--text-main); }

/* Article header / btn back */
.btn-outline-primary {
    border-color: var(--neon-cyan);
    color: var(--neon-cyan);
    background: transparent;
}
.btn-outline-primary:hover {
    background: var(--neon-cyan);
    border-color: var(--neon-cyan);
    color: var(--bg-dark);
}

/* Article main spacing (below fixed navbar) */
.article-main {
    padding-top: 80px;
}

/* =============================================
   RESPONSIVE TWEAKS
   ============================================= */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2.2rem;
    }

    .hero-logo {
        max-width: 200px;
    }

    .stat-number {
        font-size: 2rem;
    }

    .stack-grid {
        gap: 0.6rem;
    }

    .stack-item {
        min-width: 80px;
        padding: 0.8rem 0.9rem;
    }
}