/* ============================================
   XGEOSPACE - Component Styles
   ============================================ */

/* ========== Buttons (SpaceX "Ghost" Style) ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 50px;
    padding: 0 40px;
    /* Wide buttons */
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 0;
    /* Boxy buttons like NASA/SpaceX often use, or minimal radius */
}

.btn-primary {
    background: transparent;
    border-color: var(--color-white);
    color: var(--color-white);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: var(--color-white);
    transition: width 0.3s ease;
    z-index: -1;
}

.btn-primary:hover {
    color: var(--color-black);
}

.btn-primary:hover::before {
    width: 100%;
}

.btn-secondary {
    background: var(--color-white);
    color: var(--color-black);
    border: 2px solid var(--color-white);
}

.btn-secondary:hover {
    background: transparent;
    color: var(--color-white);
}

.btn-sm {
    height: 36px;
    padding: 0 20px;
    font-size: 0.75rem;
}

/* ========== Cards (Clean Grids) ========== */
/* Services: Clean, icon-based, minimal border */
.service-card {
    background: var(--color-dark);
    border: 1px solid #222;
    padding: 3rem 2rem;
    transition: 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    border-color: #444;
    transform: translateY(-5px);
}

.service-icon {
    font-size: 2rem;
    color: var(--color-white);
    margin-bottom: 2rem;
}

.service-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: white;
}

.service-description {
    color: #888;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.service-link {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Projects: Image heavy, text overlay on hover */
.project-card {
    position: relative;
    height: 400px;
    background: #0a0a0a;
    overflow: hidden;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s;
}

.project-card:hover {
    border-color: var(--color-white);
}

.project-image-container {
    height: 100%;
    width: 100%;
}

.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.7;
    transition: opacity 0.5s, transform 0.5s;
}

.project-card:hover .project-image {
    opacity: 0.4;
    transform: scale(1.05);
}

.project-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.project-category {
    font-family: var(--font-tech);
    color: #888;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    display: block;
    text-transform: uppercase;
}

.project-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: white;
}

.project-description {
    height: 0;
    opacity: 0;
    overflow: hidden;
    color: #ccc;
    font-size: 0.9rem;
    transition: 0.3s;
}

.project-card:hover .project-description {
    height: auto;
    opacity: 1;
    margin-top: 1rem;
}

.project-tech {
    display: none;
}

/* Hide tech tags for cleaner look, less "dev portfolio" more "company" */

/* ========== Team (Minimal Portraits) ========== */
.team-card {
    background: transparent;
    text-align: center;
}

.team-avatar {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(100%);
    /* Elegant B&W style */
    transition: 0.3s;
    margin: 0 auto 1.5rem;
}

.team-card:hover .team-avatar {
    filter: grayscale(0%);
}

.team-name {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.team-role {
    color: #666;
    font-size: 0.85rem;
    font-family: var(--font-tech);
    margin-bottom: 1rem;
}

.team-social a {
    color: #444;
    margin: 0 5px;
}

.team-social a:hover {
    color: white;
}

/* ========== Stats (Big Numbers) ========== */
.stat-card {
    text-align: center;
    border: 1px solid #222;
    padding: 3rem 1rem;
    background: #0a0a0a;
    transition: 0.3s;
}

.stat-card:hover {
    border-color: #444;
    transform: translateY(-5px);
}

.stat-number {
    font-size: 4rem;
    font-weight: 700;
    color: white;
    font-family: var(--font-display);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 2px;
    color: #888;
}

/* ========== High-Tech Forms ========== */
.contact-container {
    display: flex;
    gap: 4rem;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-form-container {
    flex: 1.5;
    min-width: 300px;
    background: rgba(20, 20, 20, 0.6);
    /* Fondo semi-transparente oscuro */
    backdrop-filter: blur(10px);
    /* Efecto vidrio */
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem;
    position: relative;
    /* Decoración de esquinas estilo interfaz HUD */
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.contact-form-container::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 20px;
    height: 20px;
    border-top: 2px solid white;
    border-left: 2px solid white;
}

.contact-form-container::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 20px;
    height: 20px;
    border-bottom: 2px solid white;
    border-right: 2px solid white;
}

.form-group {
    margin-bottom: 2rem;
    position: relative;
}

.form-label {
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 2px;
    color: #888;
    margin-bottom: 0.8rem;
    display: block;
    font-weight: 600;
    transition: color 0.3s;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid #333;
    border-radius: 0;
    padding: 15px;
    font-size: 1rem;
    color: white;
    font-family: var(--font-primary);
    transition: all 0.3s ease;
}

/* Efecto Foco Brillante */
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-white);
    background: rgba(255, 255, 255, 0.08);
    /* Ligeramente más claro */
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.form-group:focus-within .form-label {
    color: white;
    /* Label se ilumina también */
}

.form-textarea {
    resize: vertical;
    min-height: 150px;
}

/* Selector personalizado */
.form-select {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%23FFFFFF%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 0.65em auto;
}

.form-select option {
    background: #000;
    color: white;
}

/* Technical Elements Animation (SpaceX style) */
@keyframes rotateSatellite {
    from {
        transform: rotate(0deg) translateY(0px);
    }

    to {
        transform: rotate(2deg) translateY(10px);
    }
}

.mission-visual-section {
    padding: 100px 0;
    overflow: hidden;
    background: #000;
}

.satellite-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.satellite-img {
    width: 80%;
    animation: rotateSatellite 4s infinite alternate ease-in-out;
    filter: drop-shadow(0 0 50px rgba(255, 255, 255, 0.1));
}

.annotation {
    position: absolute;
    color: white;
    font-family: var(--font-tech);
    display: flex;
    align-items: center;
    gap: 15px;
    pointer-events: none;
}

.annotation-line {
    height: 1px;
    background: white;
    width: 150px;
}

.annotation-text {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.ann-1 {
    top: 20%;
    left: 0;
}

.ann-2 {
    bottom: 30%;
    right: 0;
    flex-direction: row-reverse;
}

.ann-3 {
    top: 40%;
    right: 5%;
    flex-direction: row-reverse;
}

/* ========== Professional Hero Elements ========== */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(252, 61, 33, 0.1);
    border: 1px solid rgba(252, 61, 33, 0.3);
    padding: 8px 16px;
    border-radius: 50px;
    color: var(--nasa-red);
    font-family: var(--font-tech);
    font-size: 0.85rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-family: var(--font-display);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -2px;
    background: linear-gradient(white, #888);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-description {
    font-size: 1.25rem;
    color: #ccc;
    line-height: 1.6;
    max-width: 800px;
    margin-bottom: 3rem;
}

/* ========== Floating Actions (Astronaut & Premium WhatsApp) ========== */
.floating-actions {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 2000;
}

.action-btn {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    position: relative;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}

/* WhatsApp Premium 3D Style */
.whatsapp-btn {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: white;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4), inset 0 2px 5px rgba(255,255,255,0.3);
}

.whatsapp-btn::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #25D366;
    animation: ping 2s infinite;
    opacity: 0;
}

@keyframes ping {
    0% { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.6); opacity: 0; }
}

.whatsapp-btn:hover {
    transform: translateY(-8px) scale(1.1);
    box-shadow: 0 20px 40px rgba(37, 211, 102, 0.5);
}

.whatsapp-btn i {
    width: 32px;
    height: 32px;
    stroke-width: 2.5;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.2));
}

/* Astronaut Bot (GIF-like CSS animation) - VISIBILITY ENHANCED */
.chatbot-btn {
    background: #0a0a0a;
    border: 2px solid #fc3d21; /* Borde rojo NASA más prominente */
    overflow: hidden;
    box-shadow: 0 0 15px rgba(252, 61, 33, 0.4);
}

/* Astronaut CSS Robot */
.astronaut-bot {
    width: 44px; /* Un poco más grande para visibilidad */
    height: 44px;
    position: relative;
    animation: astronautFloat 3s infinite ease-in-out;
}

.bot-helmet {
    width: 34px;
    height: 30px;
    background: #ffffff; /* Blanco puro para contraste */
    border-radius: 12px 12px 10px 10px;
    position: absolute;
    top: 4px;
    left: 5px;
    box-shadow: inset -4px -4px 0 rgba(0,0,0,0.1), 0 0 10px rgba(255,255,255,0.5);
}

.bot-visor {
    width: 26px;
    height: 14px;
    background: #000000;
    border-radius: 5px;
    position: absolute;
    top: 6px;
    left: 4px;
    overflow: hidden;
    border: 1px solid rgba(252, 61, 33, 0.4);
}

.bot-visor::after {
    content: '';
    position: absolute;
    width: 5px;
    height: 5px;
    background: #00ffbc;
    border-radius: 50%;
    top: 4px;
    left: 5px;
    box-shadow: 12px 0 0 #00ffbc, 0 0 8px #00ffbc; /* Brillo aumentado */
    animation: botEyes 4s infinite;
}

.bot-body {
    width: 28px;
    height: 20px;
    background: #f0f0f0;
    border-radius: 6px 6px 12px 12px;
    position: absolute;
    bottom: 2px;
    left: 8px;
    z-index: -1;
    border: 1px solid rgba(0,0,0,0.1);
}

@keyframes astronautFloat {
    0%, 100% { transform: translateY(0) rotate(5deg); }
    50% { transform: translateY(-8px) rotate(-5px); }
}

@keyframes botEyes {
    0%, 90%, 100% { opacity: 1; }
    95% { opacity: 0; }
}

/* Responsiveness for Chatbot */
@media screen and (max-width: 480px) {
    .chatbot-window {
        width: 100%;
        height: 100%;
        bottom: 0;
        right: 0;
        border-radius: 0;
    }

    .floating-actions {
        bottom: 20px;
        right: 20px;
        gap: 15px;
    }

    .action-btn {
        width: 55px;
        height: 55px;
    }

    .astronaut-bot {
        transform: scale(0.85);
    }

    .chatbot-options {
        grid-template-columns: 1fr; /* Una sola columna en móviles muy pequeños */
    }
}

.chatbot-btn:hover {
    background: #fc3d21;
    border-color: #fc3d21;
}

.chatbot-btn:hover .bot-helmet { background: #fff; }
.chatbot-btn:hover .bot-visor { background: #000; }

/* ========== AGU AI Chatbot Window (XGEOSPACE Tech Style) ========== */
.chatbot-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 600px;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 2001;
    opacity: 0;
    visibility: hidden;
    transform: translateY(40px);
    transition: all 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    box-shadow: 0 40px 80px rgba(0,0,0,0.8);
}

.chatbot-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Header XGEOSPACE Style */
.chatbot-header {
    background: linear-gradient(90deg, #0a0a0a, #1a1a1a);
    padding: 18px 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #fc3d21; /* Acento rojo NASA */
}

.chatbot-identity {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chatbot-avatar-icon {
    width: 28px;
    height: 28px;
    color: #fc3d21;
    filter: drop-shadow(0 0 5px rgba(252, 61, 33, 0.5));
}

.chatbot-header h4 {
    margin: 0;
    color: white;
    font-size: 1rem;
    font-weight: 700;
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 1px;
}

#chatbotClose {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: all 0.3s;
}

#chatbotClose:hover {
    background: #fc3d21;
    border-color: #fc3d21;
}

/* Message Area */
.chatbot-messages {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: radial-gradient(circle at bottom, rgba(252, 61, 33, 0.05), transparent);
}

/* Jarbis Bot Message Box */
.message.bot {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #efefef;
    padding: 18px;
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.6;
    width: 100%;
    box-sizing: border-box;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.message.user {
    align-self: flex-end;
    background: #fc3d21;
    color: white;
    padding: 12px 18px;
    border-radius: 18px;
    border-bottom-right-radius: 4px;
    font-size: 0.95rem;
    max-width: 80%;
    font-weight: 500;
    box-shadow: 0 5px 15px rgba(252, 61, 33, 0.3);
}

/* Category Grid (Index) */
.chatbot-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 15px;
}

.chat-option {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e0e0e0;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-align: left;
    font-size: 0.85rem;
    font-weight: 500;
    font-family: 'Inter', sans-serif;
}

.chat-option:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: #fc3d21;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.4);
}

.chat-option i {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
}

/* Colors for specific categories */
.chat-option[data-action="proyectos"] i { color: #fc3d21; }
.chat-option[data-action="servicios"] i { color: #00ffbc; }
.chat-option[data-action="tecnologia"] i { color: #00b4db; }
.chat-option[data-action="contacto"] i { color: #ffab00; }
.chat-option[data-action="autor"] i { color: #a278ff; }

/* Input Area Style */
.chatbot-input-area {
    padding: 20px;
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 12px;
    align-items: center;
}

.chatbot-input {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 12px 18px;
    color: white;
    font-size: 0.95rem;
    outline: none;
    transition: 0.3s;
}

.chatbot-input:focus {
    border-color: #fc3d21;
    background: rgba(255, 255, 255, 0.08);
}

.chatbot-send {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #fc3d21;
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 5px 15px rgba(252, 61, 33, 0.3);
}

.chatbot-send:hover {
    transform: scale(1.05);
    background: white;
    color: black;
}

/* Typing Indicator */
.typing {
    display: flex;
    gap: 4px;
    padding: 5px 10px;
}

.typing span {
    width: 6px;
    height: 6px;
    background: #55606b;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.typing span:nth-child(2) { animation-delay: 0.2s; }
.typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
    30% { transform: translateY(-5px); opacity: 1; }
}

@media (max-width: 480px) {
    .chatbot-window {
        bottom: 0;
        right: 0;
        width: 100%;
        height: 100%;
        border-radius: 0;
    }
}
@media (max-width: 768px) {
    .service-card {
        padding: 2rem 1.5rem;
    }
    
    .project-card {
        height: 300px;
    }
    
    .stat-number {
        font-size: 3rem;
    }
    
    .contact-form-container {
        padding: 2rem 1.5rem;
    }
    
    .team-avatar {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .stat-number {
        font-size: 2.5rem;
    }
    
    .btn {
        padding: 0 25px;
        height: 45px;
        font-size: 0.8rem;
    }
}
