:root {
    --primary-blue: #0a2463;
    --secondary-blue: #1e3888;
    --accent-blue: #3e92cc;
    --light-blue: #a8dadc;
    --white: #ffffff;
    --black: #000000;
    --gray: #333333;
    --light-gray: #f5f5f5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--white);
    color: var(--gray);
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background-color: rgba(10, 36, 99, 0.95);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    color: var(--white);
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
}

.logo-img {
    height: 100%;
    max-height: 50px; /* ajusta si quieres más grande */
    margin-right: 10px;
    object-fit: contain;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    font-size: 20px;
}

nav ul li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-blue);
    transition: width 0.3s ease;
}

nav ul li a:hover {
    color: var(--accent-blue);
}

nav ul li a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    color: var(--white);
    width: 100%;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    max-width: 700px;
    animation: fadeInUp 1s ease 0.2s;
    animation-fill-mode: both;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--accent-blue);
    color: var(--white);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid var(--accent-blue);
    animation: fadeInUp 1s ease 0.4s;
    animation-fill-mode: both;
}

.btn:hover {
    background-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.btn-outline {
    background-color: transparent;
    margin-left: 15px;
}

.btn-outline:hover {
    background-color: var(--accent-blue);
}

/* Tech Animation */
.tech-animation {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.tech-node {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    box-shadow: 0 0 10px 2px rgba(62, 146, 204, 0.7);
}

/* Services Section */
.services {
    padding: 100px 0;
    background-color: var(--light-gray);
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 15px;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 3px;
    background-color: var(--accent-blue);
    bottom: -10px;
    left: 25%;
}

.section-title p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto;
    color: var(--gray);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--white);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.service-icon {
    font-size: 3rem;
    color: var(--accent-blue);
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-blue);
}

.service-card p {
    color: var(--gray);
    line-height: 1.6;
    margin-bottom: 20px;
}

.service-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 15px;
}

/* About Section */
.about {
    padding: 100px 0;
    background-color: var(--white);
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 20px;
    color: var(--gray);
}

.about-image {
    flex: 1;
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background-color: var(--primary-blue);
    color: var(--white);
}

.contact .section-title h2 {
    color: var(--white);
}

.contact .section-title h2::after {
    background-color: var(--accent-blue);
}

.contact .section-title p {
    color: rgba(255, 255, 255, 0.8);
}

.contact-content {
    display: flex;
    gap: 50px;
}

.contact-form {
    flex: 2;
}

.contact-info {
    flex: 1;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: none;
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-family: inherit;
    font-size: 1rem;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background-color: rgba(255, 255, 255, 0.2);
}

.contact-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
}

.contact-info-item i {
    font-size: 1.5rem;
    color: var(--accent-blue);
    margin-right: 15px;
    width: 30px;
}

.contact-info-item h3 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.contact-info-item p {
    color: rgba(255, 255, 255, 0.8);
}

/* Footer */
footer {
    background-color: var(--black);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-column h3 {
    font-size: 1.3rem;
    margin-bottom: 20px;
    color: var(--accent-blue);
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 10px;
}

.footer-column ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: var(--accent-blue);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--accent-blue);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 2.8rem;
    }
    
    .about-content {
        flex-direction: column;
    }
    
    .contact-content {
        flex-direction: column;
    }
}
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--primary-blue);
        padding: 20px 0;
    }
    
    nav.active {
        display: block;
    }
    
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin: 10px 0;
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .btn-outline {
        display: block;
        margin-left: 0;
        margin-top: 15px;
        width: fit-content;
    }
    
    .tech-animation {
        display: none;
    }
}
/* ================= POPUP GLOBAL ================= */

.popup {
    position: fixed;
    inset: 0;

    display: flex;
    justify-content: center;
    align-items: center;

    width: 100vw;
    height: 100vh;

    background: rgba(0, 0, 0, 0.7);
    z-index: 99999;
}

.popup.oculto {
    display: none;
}

.popup-content {
    background: #fff;
    padding: 30px 40px;
    border-radius: 12px;
    text-align: center;

    max-width: 400px;
    width: 90%;

    box-shadow: 0 10px 30px rgba(0,0,0,0.3);

    animation: aparecer 0.3s ease;
}

@keyframes aparecer {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
} 
/* ===== WIDGET LUNA (FIX TOTAL) ===== */

/* BOTÓN BURBUJA */
#mw-fab {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 999999;
  overflow: hidden;
  box-shadow: 0 8px 25px rgba(0,0,0,0.6);
  border: 2px solid rgba(79, 209, 255, 0.3);
  background: #0b0e1a;
}

#mw-fab img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* PANEL CHAT */
#mw-panel {
  position: fixed;
  bottom: 100px;
  right: 25px;
  width: 340px;
  max-height: 520px;

  background: #0f1220;
  border-radius: 20px;

  display: none;
  flex-direction: column;

  z-index: 999998;

  box-shadow: 0 25px 70px rgba(0,0,0,0.8);
  border: 1px solid rgba(79,209,255,0.15);

  overflow: hidden;
}

/* CUANDO SE ABRE */
#mw-panel.open {
  display: flex;
}

/* HEADER DEL CHAT */
#mw-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  background: #0b0e1a;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

#mw-header img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.mw-hinfo h3 {
  margin: 0;
  color: #fff;
  font-size: 16px;
}

.mw-hinfo p {
  margin: 0;
  font-size: 12px;
  color: #aaa;
}

/* MENSAJES */
#mw-msgs {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
}

.mw-msg {
  padding: 10px 14px;
  border-radius: 15px;
  margin-bottom: 10px;
  max-width: 80%;
  font-size: 14px;
}

.mw-msg.bot {
  background: #1a1f35;
  color: #fff;
}

.mw-msg.user {
  background: #3e92cc;
  color: #fff;
  margin-left: auto;
}

/* INPUT */
#mw-input-area {
  display: flex;
  padding: 10px;
  border-top: 1px solid rgba(255,255,255,0.05);
}

#mw-input {
  flex: 1;
  padding: 10px;
  border-radius: 20px;
  border: none;
  outline: none;
}

#mw-send {
  margin-left: 10px;
  border: none;
  background: #3e92cc;
  color: white;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

/* FOOTER */
#mw-footer {
  text-align: center;
  font-size: 12px;
  color: #aaa;
  padding: 8px;
}
/* ===== FIX MOBILE CHAT ===== */
@media (max-width: 480px) {

  #mw-panel {
    right: 10px;
    left: 10px;        /* 👈 ocupa casi toda la pantalla */
    width: auto;       /* 👈 evita que se desborde */
    bottom: 90px;
    max-height: 80vh;  /* 👈 no se salga vertical */
  }

  #mw-fab {
    right: 15px;
    bottom: 15px;
  }

}