/* Reset y Variables */
:root {
    --primary-color:#13BCE7;
    --primary-dark: #5568d3;
    --secondary-color: #764ba2;
    --dark-bg: #1a1a2e;
    --light-bg: #f8f9fa;
    --text-dark: #333;
    --text-light: #666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    color: var(--text-dark);
}

html {
    scroll-behavior: smooth;
}

/* Navbar */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    padding: 8px 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar.scrolled {
    padding: 5px 0;
    background: rgba(255, 255, 255, 0.98) !important;
}

/* Logo */
.logo-img {
    max-width: 55px;
    height: auto;
}

.navbar-brand div h3 {
    margin-bottom: 0;
    line-height: 1;
}

.navbar-brand div small {
    display: block;
    margin-top: -9px;
    line-height: 1;
}

.navbar-brand {
    font-weight: bold;
    color: var(--text-light) !important;
    font-size: 0.9rem;
}

.navbar-brand strong {
    font-size: 1rem;
}

.navbar-brand small {
    font-size: 0.65rem;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 20px;
}

.nav-link {
    color: var(--text-dark) !important;
    font-weight: 500;
    padding: 0.4rem 0.8rem !important;
    position: relative;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

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

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

/* Hero Section */
.hero {
    min-height: 100vh;
    background: linear-gradient(135deg, #0A6A82 0%, #13BCE7 50%, #A1E9F9 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 80px 20px 40px;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.1) 0%, transparent 50%);
}

.network-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0.3;
}

#networkCanvas {
    width: 100%;
    height: 100%;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    padding: 0 20px;
}

.hero-content .text {
    position: relative;
    z-index: 2;
    color: #13BCE7;
    padding: 0 20px;
}

.hero-content h1 {
    animation: fadeInUp 1s ease;
    text-align: left;
    font-size: 2.5rem;
    font-weight: 700;
}

.hero-content h2,
.hero-content p {
    animation: fadeInUp 1s ease 0.2s both;
    text-align: left;
}

.hero-logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 1s ease;
}

.hero-logo {
    width: 100%;
    max-width: 300px;
    height: auto;
    filter: drop-shadow(0 10px 30px rgba(255, 255, 255, 0.2));
    animation: float 3s ease-in-out infinite;
}

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

.text-primary-custom {
    color: #4169E1 !important;
}

.cta-button {   
    background: #79f5a2 !important;
    border: none !important;
    padding: 15px 40px;
    font-weight: 600;
    transition: all 0.3s;
    animation: fadeInUp 1s ease 0.4s both;
}

.cta-button:hover {
    background: #5179f1 !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(65, 105, 225, 0.3);
}

/* Por qué elegir CORE */
.why-section {
    background: white;
    padding: 60px 0;
}

.Core {
    color: #13BCE7;
}

.why-card {
    background: var(--light-bg);
    border-radius: 12px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.why-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

.why-card-icon {
    color: var(--primary-color);
}

/* Proyectos */
.projects-section {
    background: var(--light-bg);
    padding: 60px 0;
}

/* Quiénes Somos */
.about-section {
    background: white;
    padding: 60px 0;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.team-member {
    text-align: center;
    padding: 20px;
    background: var(--light-bg);
    border-radius: 12px;
    transition: all 0.3s;
}

.team-member:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.team-avatar {
    margin-bottom: 10px;
}

/* Servicios */
.services-section {
    background: var(--light-bg);
    padding: 60px 0;
}

.service-card {
    background: white;
    border-radius: 12px;
    transition: all 0.3s;
    border: 2px solid transparent;
}

.service-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

/* Marquee para Proyectos con Arrastre y Auto-scroll */
.marquee-container {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    width: 100%;
    background: transparent;
    padding: 20px 0;
    position: relative;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
    
    /* Ocultar scrollbar pero mantener funcionalidad */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* Ocultar scrollbar en Chrome, Safari y Opera */
.marquee-container::-webkit-scrollbar {
    display: none;
}

.marquee-container:active {
    cursor: grabbing;
}

.marquee-content {
    display: flex;
    gap: 30px;
    width: max-content;
    padding: 0 20px;
}

.service-card-wrapper {
    width: 300px;
    flex-shrink: 0;
}

/* Formulario de Contacto */
.contact-section {
    background: white;
    padding: 60px 0;
}

.contact-container {
    max-width: 600px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 12px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(84, 196, 248, 0.25);
}

.submit-button {
    background: #13BCE7 !important;
    border: none;
    padding: 15px;
    font-weight: 600;
    transition: all 0.3s;
}

.submit-button:hover {
    background: #7f9aec !important;
    transform: translateY(-2px);
}

/* Footer */
footer {
    background: var(--dark-bg);
    color: #ffffff;
}

footer p,
footer h5,
footer small,
footer strong,
footer span,
footer li {
    color: #ffffff !important;
}

footer a {
    color: #ffffff !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-color) !important;
}

footer .text-muted {
    color: #ffffff !important;
    opacity: 0.85;
}

footer i {
    color: #ffffff;
}

footer .logo-img {
    filter: brightness(1.1);
}

footer hr {
    border-color: rgba(255, 255, 255, 0.2);
}

footer .btn {
    background: var(--primary-color);
    border: none;
    color: white;
}

footer .btn:hover {
    background: var(--primary-dark);
}

/* Enlace de reclutamiento en footer */
.recruitment-link {
    color: #ffffff !important;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    display: inline-block;
}

.recruitment-link:hover {
    color: var(--primary-color) !important;
    text-decoration: underline;
}

.recruitment-link i {
    font-size: 1rem;
}

/* Floating Action Buttons */
.floating-menu {
    position: fixed;
    right: 30px;
    bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 999;
    opacity: 1;
}

.float-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    border: none;
    position: relative;
}

.float-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}

.whatsapp-btn {
    background: #25D366;
}

.whatsapp-btn:hover {
    background: #20bd5a;
}

.calendar-btn {
    background: #4169E1;
}

.calendar-btn:hover {
    background: #3558c9;
}

.chat-btn {
    background: #7B68EE;
}

.chat-btn:hover {
    background: #6a57d5;
}

.toggle-btn {
    background: #3aaac6;
    font-size: 26px;
    animation: pulse 2s infinite;
}

.toggle-btn:hover {
    background: #5a52e6;
    animation: none;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(108, 99, 255, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(108, 99, 255, 0.7);
    }
}

/* Validación Formularios */
.was-validated .form-control:invalid {
    border-color: #dc3545;
}

.was-validated .form-control:valid {
    border-color: #198754;
}

.invalid-feedback {
    font-size: 0.85rem;
}

/* Animaciones */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

section {
    scroll-margin-top: 70px;
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .hero {
        min-height: auto !important;
        padding: 100px 15px 50px !important;
    }
    
    .hero .container {
        padding-top: 20px;
        padding-bottom: 30px;
    }
    
    .hero-logo {
        max-width: 180px !important;
        margin-bottom: 30px;
    }
    
    .hero-content h1 {
        font-size: 1.75rem !important;
        text-align: center !important;
        line-height: 1.3;
        margin-bottom: 20px !important;
    }

    .hero-content h2 {
        font-size: 1rem !important;
        text-align: center !important;
        margin-bottom: 15px !important;
    }
    
    .hero-content p {
        font-size: 0.95rem !important;
        text-align: center !important;
        margin-bottom: 25px !important;
    }

    .hero-content {
        text-align: center !important;
        padding: 0 10px;
    }
    
    .cta-button {
        padding: 12px 30px !important;
        font-size: 0.95rem !important;
        width: 100%;
        max-width: 320px;
    }

    .navbar {
        padding: 5px 0 !important;
    }
    
    .navbar-brand {
        font-size: 0.85rem !important;
    }
    
    .navbar-brand strong {
        font-size: 0.95rem !important;
    }
    
    .logo-img {
        width: 30px !important;
        height: 30px !important;
    }

    .why-section,
    .projects-section,
    .about-section,
    .services-section,
    .contact-section {
        padding: 40px 0 !important;
    }
    
    .display-5 {
        font-size: 1.75rem !important;
    }
    
    .why-card,
    .service-card {
        padding: 30px 20px !important;
        margin-bottom: 20px;
    }

    .floating-menu {
        right: 15px;
        bottom: 15px;
        gap: 10px;
    }

    .float-btn {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    
    .toggle-btn {
        font-size: 22px !important;
    }

    .contact-container {
        padding: 25px 20px !important;
    }
    
    .form-control,
    .form-select {
        font-size: 0.95rem;
        padding: 10px !important;
    }

    .team-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .team-member {
        padding: 15px !important;
    }

    footer {
        padding: 30px 0 !important;
    }
    
    footer .col-md-3 {
        margin-bottom: 25px;
        text-align: center;
    }

    /* Centrar logo y textos del footer en móvil */
    footer .col-md-3:first-child {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    footer .col-md-3:first-child .d-flex {
        justify-content: center;
    }
    
    footer h5 {
        font-size: 1.1rem;
    }
    
    section {
        scroll-margin-top: 60px;
    }

    .service-card-wrapper {
        width: 250px;
    }

    .marquee-container::-webkit-scrollbar {
        height: 6px;
    }
}

@media (min-width: 769px) and (max-width: 991px) {
    .hero {
        min-height: 80vh;
        padding: 100px 30px 50px;
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-logo {
        max-width: 250px;
    }
    
    .why-section,
    .projects-section,
    .about-section,
    .services-section,
    .contact-section {
        padding: 50px 0;
    }
}

@media (max-width: 375px) {
    .hero {
        padding: 90px 10px 40px !important;
    }
    
    .hero-content h1 {
        font-size: 1.5rem !important;
    }
    
    .hero-logo {
        max-width: 150px !important;
    }
    
    .cta-button {
        font-size: 0.9rem !important;
        padding: 10px 25px !important;
    }
}