/* ============================================
   DECGAR SOFTWARE - ESTILOS MODERNOS
   Colores: #006700, #008001, blanco, negro
   ============================================ */

/* Variables de colores */
:root {
    --primary-dark: #006700;
    --primary-light: #008001;
    --primary-gradient: linear-gradient(135deg, #006700 0%, #008001 50%, #00a001 100%);
    --primary-gradient-hover: linear-gradient(135deg, #005500 0%, #006700 50%, #008001 100%);
    --secondary-color: #000000;
    --light-color: #ffffff;
    --dark-color: #0a0a0a;
    --gray-dark: #1a1a1a;
    --gray-medium: #2d2d2d;
    --gray-light: #f5f5f5;
    --text-color: #333333;
    --text-light: #888888;
    --glow-color: rgba(0, 128, 1, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

/* Reset y estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    color: var(--light-color);
    background-color: var(--dark-color);
    overflow-x: hidden;
}

/* Fondo animado con partículas */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(0, 103, 0, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 128, 1, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(0, 103, 0, 0.05) 0%, transparent 30%);
    pointer-events: none;
    z-index: -1;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

a {
    text-decoration: none;
    color: var(--primary-light);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover {
    color: #00a001;
    text-shadow: 0 0 10px var(--glow-color);
}

/* Botones modernos con degradado */
.btn {
    display: inline-block;
    background: var(--primary-gradient);
    color: var(--light-color);
    padding: 14px 35px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 103, 0, 0.4);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 128, 1, 0.5), 0 0 30px rgba(0, 128, 1, 0.3);
    color: var(--light-color);
}

/* Títulos de sección */
.section-title, .services h2, .about h2, .contact h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 60px;
    color: var(--light-color);
    position: relative;
    padding-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 3px;
}

.section-title::after, .services h2::after, .about h2::after, .contact h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background: var(--primary-gradient);
    border-radius: 2px;
    box-shadow: 0 0 20px var(--glow-color);
}

/* ============================================
   HEADER - Glassmorphism moderno
   ============================================ */
header {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 128, 1, 0.2);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 10px 0;
    background: rgba(10, 10, 10, 0.95);
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo estilizado */
.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo::before {
    content: '</>';
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    color: white;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    border-radius: 12px 4px 12px 12px;
    box-shadow: 0 4px 15px rgba(0, 103, 0, 0.4);
    transition: all 0.3s ease;
}

.logo:hover::before {
    transform: rotate(-5deg) scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 128, 1, 0.5);
}

.logo h1 {
    color: var(--light-color);
    font-size: 1.6rem;
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: -1px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.1;
}

.logo h1 span {
    color: var(--text-light);
    font-size: 0.9rem;
    font-weight: 400;
    margin-top: 2px;
}

/* Navegación */
nav ul {
    display: flex;
    list-style: none;
    gap: 10px;
}

nav ul li a {
    color: var(--light-color);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 10px 20px;
    border-radius: 30px;
    position: relative;
    transition: all 0.3s ease;
}

nav ul li a::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--primary-gradient);
    border-radius: 30px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

nav ul li a:hover {
    color: var(--light-color);
    text-shadow: none;
}

nav ul li a:hover::before {
    opacity: 1;
}

/* ============================================
   HERO SECTION - Impactante y tecnológico
   ============================================ */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 20px 80px;
    position: relative;
    background: 
        linear-gradient(135deg, rgba(0, 103, 0, 0.1) 0%, transparent 50%),
        linear-gradient(225deg, rgba(0, 128, 1, 0.1) 0%, transparent 50%),
        var(--dark-color);
    overflow: hidden;
}

/* Líneas de grid tecnológicas */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(0, 128, 1, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 128, 1, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* Círculos decorativos animados */
.hero::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    border: 1px solid rgba(0, 128, 1, 0.1);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.1); opacity: 0.2; }
}

.hero .container {
    position: relative;
    z-index: 1;
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 25px;
    background: linear-gradient(135deg, var(--light-color) 0%, #cccccc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 1s ease;
    line-height: 1.2;
}

.hero p {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 40px;
    color: var(--text-light);
    animation: fadeInUp 1s ease 0.2s;
    animation-fill-mode: both;
}

.hero .btn {
    animation: fadeInUp 1s ease 0.4s;
    animation-fill-mode: both;
}

/* ============================================
   SERVICIOS - Cards con efecto glass
   ============================================ */
.services {
    padding: 120px 0;
    background: linear-gradient(180deg, var(--dark-color) 0%, var(--gray-dark) 100%);
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.service-card {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 50px 35px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-15px);
    border-color: rgba(0, 128, 1, 0.3);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.3),
        0 0 30px rgba(0, 128, 1, 0.1);
}

.service-card i {
    font-size: 3.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 25px;
    display: inline-block;
    filter: drop-shadow(0 0 10px var(--glow-color));
}

.service-card h3 {
    color: var(--light-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.service-card p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.7;
}

/* ============================================
   SOBRE NOSOTROS
   ============================================ */
.about {
    padding: 120px 0;
    background: var(--gray-dark);
    position: relative;
}

.about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary-light), transparent);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-content h2 {
    color: var(--light-color);
}

.about p {
    margin-bottom: 25px;
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--text-light);
}

.about ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

.about ul li {
    background: linear-gradient(135deg, rgba(0, 103, 0, 0.2) 0%, rgba(0, 128, 1, 0.1) 100%);
    padding: 15px 30px;
    border-radius: 50px;
    border: 1px solid rgba(0, 128, 1, 0.3);
    color: var(--light-color);
    font-weight: 500;
    transition: all 0.3s ease;
}

.about ul li:hover {
    background: var(--primary-gradient);
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0, 128, 1, 0.3);
}

.about ul li i {
    color: var(--primary-light);
    margin-right: 10px;
}

/* ============================================
   CONTACTO
   ============================================ */
.contact {
    padding: 120px 0;
    background: linear-gradient(180deg, var(--gray-dark) 0%, var(--dark-color) 100%);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

/* Formulario */
.contact form {
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.02) 100%);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 25px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--light-color);
    transition: all 0.3s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-light);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    background: rgba(0, 128, 1, 0.05);
    box-shadow: 0 0 20px rgba(0, 128, 1, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Info de contacto */
.contact-info {
    background: linear-gradient(135deg, rgba(0, 103, 0, 0.15) 0%, rgba(0, 128, 1, 0.05) 100%);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(0, 128, 1, 0.2);
}

.contact-info h3 {
    color: var(--light-color);
    margin-bottom: 35px;
    font-size: 1.8rem;
}

.contact-info p {
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    color: var(--text-light);
    font-size: 1.05rem;
    transition: all 0.3s ease;
}

.contact-info p:hover {
    color: var(--light-color);
    transform: translateX(5px);
}

.contact-info i {
    width: 50px;
    height: 50px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    font-size: 1.2rem;
    color: var(--light-color);
    box-shadow: 0 4px 15px rgba(0, 103, 0, 0.3);
}

/* ============================================
   CHATBOT - Diseño moderno
   ============================================ */
.chatbot-trigger,
.chatbot-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: var(--primary-gradient);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 5px 25px rgba(0, 103, 0, 0.5);
    border: none;
    z-index: 1000;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatbot-trigger:hover,
.chatbot-toggle:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 8px 35px rgba(0, 128, 1, 0.6);
}

.chatbot-trigger i,
.chatbot-toggle i {
    font-size: 26px;
}

.chatbot-container {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 380px;
    background: var(--gray-dark);
    border-radius: 20px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    z-index: 1000;
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 128, 1, 0.2);
}

.chatbot-container.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.chatbot-header {
    background: var(--primary-gradient);
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-header h3,
.chatbot-header h4 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

#minimize-chat,
#closeChatbot {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 1.3rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#minimize-chat:hover,
#closeChatbot:hover {
    background: rgba(255,255,255,0.3);
}

.chatbot-messages {
    height: 320px;
    overflow-y: auto;
    padding: 20px;
    background: var(--dark-color);
}

.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: transparent;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--primary-dark);
    border-radius: 3px;
}

.chatbot-message {
    margin-bottom: 15px;
    max-width: 85%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.95rem;
    line-height: 1.5;
    animation: messageIn 0.3s ease;
}

@keyframes messageIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Indicador de escritura */
.typing-indicator .dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--primary-light);
    border-radius: 50%;
    margin: 0 3px;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-indicator .dot:nth-child(1) { animation-delay: -0.32s; }
.typing-indicator .dot:nth-child(2) { animation-delay: -0.16s; }
.typing-indicator .dot:nth-child(3) { animation-delay: 0s; }

@keyframes typingBounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.5; }
    40% { transform: scale(1); opacity: 1; }
}

.chatbot-message.bot {
    background: var(--gray-medium);
    color: var(--light-color);
    border-bottom-left-radius: 5px;
    margin-right: auto;
}

.chatbot-message.user {
    background: var(--primary-gradient);
    color: white;
    border-bottom-right-radius: 5px;
    margin-left: auto;
}

.chatbot-input {
    display: flex;
    padding: 15px 20px;
    background: var(--gray-dark);
    border-top: 1px solid rgba(255,255,255,0.1);
    gap: 10px;
}

.chatbot-input input {
    flex: 1;
    padding: 14px 20px;
    background: var(--dark-color);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 30px;
    font-size: 0.95rem;
    color: var(--light-color);
    outline: none;
    transition: all 0.3s ease;
}

.chatbot-input input:focus {
    border-color: var(--primary-light);
}

.chatbot-input input::placeholder {
    color: var(--text-light);
}

.chatbot-input button {
    background: var(--primary-gradient);
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.chatbot-input button:hover {
    transform: scale(1.1);
    box-shadow: 0 5px 20px rgba(0, 128, 1, 0.4);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--secondary-color);
    color: var(--light-color);
    padding: 50px 0 30px;
    text-align: center;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
}

footer p {
    margin-bottom: 25px;
    color: var(--text-light);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-color);
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 128, 1, 0.4);
}

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px var(--glow-color); }
    50% { box-shadow: 0 0 40px var(--glow-color); }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .chatbot-container {
        width: 340px;
    }
    
    .hero h2 {
        font-size: 2.8rem;
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 15px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li a {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .hero {
        padding: 140px 20px 80px;
    }
    
    .hero h2 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title, .services h2, .about h2, .contact h2 {
        font-size: 2rem;
    }
    
    .chatbot-container {
        width: 300px;
        right: 15px;
        bottom: 100px;
    }
    
    .chatbot-trigger,
    .chatbot-toggle {
        right: 15px;
        bottom: 15px;
        width: 55px;
        height: 55px;
    }
    
    .about ul {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 576px) {
    .hero h2 {
        font-size: 1.8rem;
    }
    
    .section-title, .services h2, .about h2, .contact h2 {
        font-size: 1.7rem;
        letter-spacing: 1px;
    }
    
    .chatbot-container {
        width: calc(100% - 30px);
        left: 15px;
        right: 15px;
    }
    
    .contact form,
    .contact-info {
        padding: 25px;
    }
    
    .logo::before {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .logo h1 {
        font-size: 1.3rem;
    }
}
