@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;700&display=swap');

:root {
    --primary-color: #0a192f; /* Azul marino oscuro */
    --secondary-color: #64ffda; /* Un toque de cian brillante */
    --light-slate: #ccd6f6;
    --slate: #8892b0;
    --white: #e6f1ff;
    --font-sans: 'Montserrat', sans-serif;
}

body {
    font-family: var(--font-sans);
    background-color: var(--primary-color);
    color: var(--slate);
    line-height: 1.6;
    overflow-x: hidden;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Prevenir overflow horizontal */
* {
    box-sizing: border-box;
}

.container-fluid,
.container,
.row {
    max-width: 100%;
    overflow-x: hidden;
}

/* Prevenir scroll horizontal en elementos específicos */
.hero,
.content-section,
.about-section,
.contact-section {
    max-width: 100%;
    overflow-x: hidden;
}

.navbar-nav {
    max-width: 100%;
}

/* Mejoras para el navbar */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-default {
    background-color: #0a192f;
    opacity: 0.9;
}

/* Asegurar que navbar-scrolled tenga prioridad sobre navbar-default */
.navbar.navbar-default.navbar-scrolled {
    background-color: #0a192f !important;
    opacity: 1 !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(100, 255, 218, 0.1);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    color: var(--slate) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease;
}

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

.navbar-toggler {
    border: 1px solid var(--secondary-color);
    padding: 0.25rem 0.5rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28100, 255, 218, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Navbar con scroll */
.navbar.navbar-scrolled {
    background-color: #0a192f !important;
    opacity: 1 !important;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(100, 255, 218, 0.1);
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: all 0.3s ease-in-out;
}

a:hover {
    color: var(--white);
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: clamp(40px, 8vw, 80px);
    color: var(--light-slate);
    margin: 0;
    font-weight: 700;
}

.hero-content .subtitle {
    font-size: clamp(20px, 4vw, 30px);
    color: var(--secondary-color);
    margin-top: 10px;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 20px auto 40px;
    color: var(--slate);
}

.btn-primary-custom {
    color: var(--secondary-color);
    background-color: transparent;
    border: 1px solid var(--secondary-color);
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: bold;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background-color: rgba(100, 255, 218, 0.1);
}

/* Estilos para las páginas de contenido */
.content-section {
    padding: 120px 0 80px;
    min-height: 100vh;
}

.section-title {
    font-size: 2.5rem;
    color: var(--light-slate);
    margin-bottom: 1rem;
    font-weight: 700;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--slate);
    margin-bottom: 3rem;
    max-width: 600px;
}

/* Tarjetas de servicios */
.service-card {
    background: rgba(100, 255, 218, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.1);
    border-radius: 8px;
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.1);
}

.service-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.service-card h3 {
    color: var(--light-slate);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.service-card p {
    color: var(--slate);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.service-list {
    list-style: none;
    padding: 0;
}

.service-list li {
    color: var(--slate);
    padding: 0.3rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.service-list li::before {
    content: "▶";
    color: var(--secondary-color);
    position: absolute;
    left: 0;
    font-size: 0.8rem;
}

/* Media queries para móviles */
@media (max-width: 768px) {
    .hero {
        min-height: 100vh;
        padding: 0 15px;
    }
    
    .hero-content h1 {
        font-size: clamp(30px, 10vw, 50px);
    }
    
    .hero-content .subtitle {
        font-size: clamp(18px, 5vw, 24px);
    }
    
    .hero-content p {
        font-size: 1rem;
        margin: 15px auto 30px;
    }
    
    .content-section {
        padding: 100px 0 60px;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .service-card {
        margin-bottom: 1.5rem;
    }
    
    .navbar-collapse {
        background-color: rgba(10, 25, 47, 0.95);
        border-radius: 8px;
        margin-top: 1rem;
        padding: 1rem;
    }
    
    .navbar-nav .nav-link {
        text-align: center;
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid rgba(100, 255, 218, 0.1);
    }
    
    .navbar-nav .nav-item:last-child .nav-link {
        border-bottom: none;
    }
}

@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content .subtitle {
        font-size: 1.2rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .service-icon {
        font-size: 2.5rem;
    }
}

/* Estilos para el portafolio */
.portfolio-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 2rem;
    background: rgba(100, 255, 218, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.1);
    transition: all 0.3s ease;
}

.portfolio-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(100, 255, 218, 0.15);
}

.portfolio-image {
    width: 100%;
    height: 250px;
    background: linear-gradient(135deg, var(--primary-color) 0%, rgba(100, 255, 218, 0.1) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: var(--secondary-color);
    position: relative;
    overflow: hidden;
}

.portfolio-image::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(100, 255, 218, 0.1) 50%, transparent 70%);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Asegurar que las animaciones no causen overflow */
.portfolio-image::before {
    overflow: hidden;
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-title {
    color: var(--light-slate);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.portfolio-description {
    color: var(--slate);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.portfolio-tech {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tech-tag {
    background: rgba(100, 255, 218, 0.1);
    color: var(--secondary-color);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid rgba(100, 255, 218, 0.2);
}

.portfolio-links {
    display: flex;
    gap: 1rem;
}

.portfolio-link {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border: 1px solid var(--secondary-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

.portfolio-link:hover {
    background: rgba(100, 255, 218, 0.1);
    color: var(--white);
}

/* Filtros del portafolio */
.portfolio-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 3rem;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--secondary-color);
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .portfolio-filters {
        gap: 0.5rem;
    }
    
    .filter-btn {
        padding: 0.4rem 1rem;
        font-size: 0.9rem;
    }
    
    .portfolio-links {
        flex-direction: column;
    }
    
    .portfolio-link {
        text-align: center;
    }
}

/* Estilos para la página Nosotros */
.about-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, rgba(100, 255, 218, 0.1) 100%);
    padding: 60px 0;
    text-align: center;
}

.about-section {
    padding: 80px 0;
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--slate);
}

.stats-container {
    background: rgba(100, 255, 218, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.1);
    border-radius: 12px;
    padding: 3rem 2rem;
    margin: 3rem 0;
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--secondary-color);
    display: block;
}

.stat-label {
    color: var(--light-slate);
    font-weight: 600;
    margin-top: 0.5rem;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.value-item {
    background: rgba(100, 255, 218, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.1);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
}

.value-item:hover {
    transform: translateY(-5px);
    border-color: var(--secondary-color);
    box-shadow: 0 10px 30px rgba(100, 255, 218, 0.1);
}

.value-icon {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.value-item h4 {
    color: var(--light-slate);
    margin-bottom: 1rem;
    font-weight: 600;
}

.value-item p {
    color: var(--slate);
    line-height: 1.6;
}

.team-section {
    background: rgba(100, 255, 218, 0.02);
    border-radius: 12px;
    padding: 3rem 2rem;
    margin: 3rem 0;
}

.team-member {
    text-align: center;
    padding: 1.5rem;
}

.member-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 1.5rem;
    border: 3px solid rgba(100, 255, 218, 0.3);
}

.member-name {
    color: var(--light-slate);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.member-role {
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 1rem;
}

.member-description {
    color: var(--slate);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .stats-container {
        padding: 2rem 1rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .team-section {
        padding: 2rem 1rem;
    }
    
    .member-avatar {
        width: 100px;
        height: 100px;
        font-size: 2.5rem;
    }
}

/* Estilos para la página de Contacto */
.contact-hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, rgba(100, 255, 218, 0.1) 100%);
    padding: 60px 0;
    text-align: center;
}

.contact-section {
    padding: 80px 0;
}

.contact-form {
    background: rgba(100, 255, 218, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.1);
    border-radius: 12px;
    padding: 3rem;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    color: var(--light-slate);
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.form-control {
    background: rgba(100, 255, 218, 0.05);
    border: 1px solid rgba(100, 255, 218, 0.2);
    border-radius: 8px;
    padding: 12px 16px;
    color: var(--light-slate);
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.form-control:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(100, 255, 218, 0.2);
    background: rgba(100, 255, 218, 0.08);
}

.form-control::placeholder {
    color: var(--slate);
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.contact-info {
    background: rgba(100, 255, 218, 0.03);
    border-radius: 12px;
    padding: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: rgba(100, 255, 218, 0.05);
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    transform: translateX(5px);
    border-left: 3px solid var(--secondary-color);
}

.contact-icon {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-right: 1rem;
    width: 40px;
    text-align: center;
}

.contact-details h4 {
    color: var(--light-slate);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
}

.contact-details p {
    color: var(--slate);
    margin: 0;
    line-height: 1.4;
}

.btn-submit {
    background: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    padding: 12px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
    width: 100%;
}

.btn-submit:hover {
    background: var(--light-slate);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(100, 255, 218, 0.3);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.alert-success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

@media (max-width: 768px) {
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .contact-info {
        margin-top: 2rem;
        padding: 1.5rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem 1rem;
    }
    
    .contact-icon {
        margin-right: 0;
        margin-bottom: 0.5rem;
        font-size: 2rem;
    }
}

/* HU-07: Adaptabilidad mejorada para todos los dispositivos */

/* Tablets en orientación vertical */
@media (max-width: 991px) and (min-width: 769px) {
    .hero-content h1 {
        font-size: clamp(35px, 7vw, 60px);
    }
    
    .service-card, .portfolio-item, .value-item {
        margin-bottom: 2rem;
    }
    
    .team-section {
        padding: 2.5rem 2rem;
    }
}

/* Dispositivos móviles pequeños */
@media (max-width: 480px) {
    .container {
        padding-left: 15px;
        padding-right: 15px;
        max-width: 100%;
    }
    
    .content-section {
        padding: 80px 0 50px;
    }
    
    .section-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .btn-primary-custom {
        padding: 14px 28px;
        font-size: 1rem;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .navbar-brand {
        font-size: 1.3rem;
    }
    
    /* Formulario de contacto en móviles */
    .contact-form {
        padding: 2rem 1rem;
    }
    
    .form-control {
        padding: 14px 16px;
        font-size: 1rem;
    }
    
    .btn-submit {
        padding: 14px 24px;
        font-size: 1.1rem;
    }
    
    /* Stats mejoradas para móviles */
    .stats-container {
        padding: 1.5rem 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
}

/* Dispositivos muy pequeños */
@media (max-width: 360px) {
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-content .subtitle {
        font-size: 1.1rem;
    }
    
    .service-card, .contact-form, .contact-info {
        padding: 1.5rem 1rem;
    }
    
    .portfolio-filters {
        gap: 0.3rem;
    }
    
    .filter-btn {
        padding: 0.3rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* Mejoras para pantallas grandes */
@media (min-width: 1400px) {
    .container {
        max-width: 1200px;
    }
    
    .hero-content h1 {
        font-size: clamp(60px, 8vw, 90px);
    }
    
    .hero-content .subtitle {
        font-size: clamp(24px, 4vw, 36px);
    }
}

/* Optimizaciones para orientación landscape en móviles */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 20px 0;
    }
    
    .content-section {
        padding: 60px 0 40px;
    }
    
    .navbar {
        padding: 0.5rem 0;
    }
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Tema oscuro del sistema */
@media (prefers-color-scheme: dark) {
    /* Ya tenemos un tema oscuro por defecto, pero podemos hacer ajustes */
    .navbar.navbar-scrolled {
        background-color: #000510 !important;
    }
}

/* Mejoras para dispositivos táctiles */
.touch-device .service-card:hover,
.touch-device .portfolio-item:hover,
.touch-device .value-item:hover,
.touch-device .contact-item:hover {
    transform: none; /* Desactivar hover en dispositivos táctiles */
}

.touch-hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 8px 25px rgba(100, 255, 218, 0.15) !important;
}

/* Mejoras de rendimiento para animaciones */
.service-card,
.portfolio-item,
.value-item,
.contact-item {
    will-change: transform;
}

/* Optimizaciones para scroll suave */
html {
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

/* Mejoras para el menú móvil */
.mobile-device .navbar-collapse {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.mobile-device .navbar-nav .nav-link {
    font-size: 1.1rem;
    padding: 1rem 1.5rem !important;
}

/* Indicador visual para elementos interactivos en móviles */
.mobile-device .btn,
.mobile-device .filter-btn,
.mobile-device .portfolio-link {
    position: relative;
    transition: all 0.2s ease;
}

.mobile-device .btn:active,
.mobile-device .filter-btn:active,
.mobile-device .portfolio-link:active {
    transform: scale(0.95);
}

/* Mejoras de accesibilidad */
.btn:focus,
.filter-btn:focus,
.portfolio-link:focus,
.form-control:focus {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}
