/* ===================================
   MAMSOFTECH - Main Styles
   Modern, Professional & Disruptive
   =================================== */

:root {
    /* Colors */
    --primary: #3b82f6;
    /* Azul más brillante */
    --primary-dark: #2563eb;
    /* Azul oscuro */
    --secondary: #6366f1;
    /* Azul-violeta */
    --accent: #8b5cf6;
    /* Violeta suave */
    --success: #10b981;
    --warning: #f59e0b;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #8b5cf6 100%);
    --gradient-secondary: linear-gradient(135deg, #60a5fa 0%, #818cf8 100%);
    --gradient-accent: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    --gradient-dark: linear-gradient(135deg, #1e293b 0%, #334155 100%);

    /* Dark Theme */
    --bg-primary: #0f0f1e;
    --bg-secondary: #1a1a2e;
    --bg-tertiary: #252538;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b8;
    --text-muted: #6b6b8a;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.5rem;
    --radius-md: 1rem;
    --radius-lg: 1.5rem;
    --radius-xl: 2rem;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ===================================
   NAVIGATION
   =================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 15, 30, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 1000;
    padding: var(--spacing-sm) 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-lg);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-normal);
}

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

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

/* ===================================
   HERO SECTION
   =================================== */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--gradient-dark);
    opacity: 0.5;
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(99, 102, 241, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.2) 0%, transparent 50%);
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
}

.hero-title {
    font-family: 'Poppins', sans-serif;
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xl);
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-md);
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 30px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
}

/* Floating Cards */
.hero-visual {
    position: relative;
    height: 500px;
    width: 100%;
}

/* Logo central - redondo y moderado */
.hero-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 480px;
    width: 95%;
    height: auto;
    opacity: 0.95;
    z-index: 0;
    border-radius: 45%;
    box-shadow: 0 8px 32px rgba(102, 126, 234, 0.3);
}

.floating-card {
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    /* REDONDA */
    padding: 1rem;
    /* Padding uniforme */
    width: 120px;
    /* Ancho fijo para círculo perfecto */
    height: 120px;
    /* Alto fijo para círculo perfecto */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3),
        0 0 0 1px rgba(255, 255, 255, 0.1) inset;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    text-decoration: none;
    /* Sin subrayado para enlaces */
    color: inherit;
    /* Mantener color del texto */
}

.floating-card:hover {
    transform: translateY(-10px) scale(1.05);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 12px 48px rgba(99, 102, 241, 0.4),
        0 0 0 1px rgba(99, 102, 241, 0.3) inset,
        0 0 20px rgba(99, 102, 241, 0.2);
}

.floating-card .card-icon {
    font-size: 2rem;
    /* Reducido para que quepa mejor */
    filter: drop-shadow(0 2px 8px rgba(99, 102, 241, 0.3));
    transition: transform 0.3s ease;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-card:hover .card-icon {
    transform: scale(1.15) rotate(5deg);
}

.floating-card .card-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.floating-card .card-title {
    font-weight: 700;
    font-size: 0.75rem;
    /* Reducido para cards circulares */
    color: #ffffff;
    margin-bottom: 0;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

.floating-card .card-subtitle {
    font-size: 0.625rem;
    /* Muy pequeño para cards circulares */
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
    line-height: 1.2;
}

/* Cards en círculo alrededor del logo - Posiciones mejoradas */
.card-1 {
    top: -3%;
    left: -2%;
    animation-delay: 0s;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
}

.card-2 {
    top: -3%;
    left: 80%;
    animation-delay: 1s;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
}

.card-3 {
    top: 38%;
    right: -16%;
    animation-delay: 2s;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
}

.card-4 {
    top: 38%;
    left: -16%;
    animation-delay: 0.5s;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
}

.card-5 {
    bottom: 3%;
    left: -8%;
    animation-delay: 1.5s;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
}

.card-6 {
    bottom: 3%;
    right: -8%;
    animation-delay: 2.5s;
    background: linear-gradient(135deg, rgba(236, 72, 153, 0.15) 0%, rgba(255, 255, 255, 0.08) 100%);
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* ===================================
   SECTIONS
   =================================== */

section {
    padding: var(--spacing-2xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.section-subtext {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

/* ===================================
   SERVICES
   =================================== */

.services {
    background: var(--bg-secondary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-lg);
}

.service-card {
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: var(--transition-normal);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-md);
    display: flex;
    justify-content: center;
    align-items: center;
    height: 80px;
}

.service-icon .icon-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    filter: drop-shadow(0 4px 12px rgba(99, 102, 241, 0.3));
    transition: transform 0.3s ease;
}

.service-card:hover .icon-img {
    transform: scale(1.1) rotate(5deg);
}

.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.service-description {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-md);
}

.service-note {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    font-style: italic;
}

.service-features {
    list-style: none;
}

.service-features li {
    padding: var(--spacing-xs) 0;
    color: var(--text-secondary);
    position: relative;
    padding-left: 1.5rem;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

/* ===================================
   ABOUT
   =================================== */

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
    align-items: center;
}

.about-description {
    font-size: 1.125rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

.about-description p {
    margin-bottom: var(--spacing-lg);
    text-align: justify;
    text-justify: inter-word;
}

.about-description p:last-child {
    margin-bottom: 0;
    text-align: center;
    font-size: 1.2rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-top: var(--spacing-xs);
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.tech-item {
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    text-align: center;
    font-weight: 600;
    transition: var(--transition-normal);
}

.tech-item:hover {
    background: var(--gradient-primary);
    transform: scale(1.05);
}

/* ===================================
   CONTACT
   =================================== */

.contact {
    background: var(--bg-secondary);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-2xl);
}

.contact-item {
    display: flex;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.contact-icon {
    font-size: 2rem;
}

.contact-item h3 {
    margin-bottom: var(--spacing-xs);
    font-size: 1.125rem;
}

.contact-item p {
    color: var(--text-secondary);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.form-input,
.form-textarea {
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* ===================================
   FOOTER
   =================================== */

.footer {
    background: var(--bg-primary);
    padding: var(--spacing-xl) 0 var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-lg);
}

.footer-brand h3 {
    font-family: 'Poppins', sans-serif;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: var(--spacing-xs);
}

.footer-brand p {
    color: var(--text-secondary);
}

.footer-links {
    display: flex;
    gap: var(--spacing-lg);
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #9ca3af;
    /* Improved contrast from #6b6b8a */
    font-size: 0.875rem;
}

/* ===================================
   RESPONSIVE
   =================================== */

@media (max-width: 768px) {

    .hero-content,
    .about-content,
    .contact-content {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-visual {
        display: none;
    }

    .nav-menu {
        gap: var(--spacing-md);
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }
}

/* ===================================
   PARTICLES CANVAS
   =================================== */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    /* Behind everything */
    pointer-events: none;
    /* Let clicks pass through */
}

/* ===================================
   PERFORMANCE OPTIMIZATIONS
   =================================== */

/* Disable expensive blur effects on mobile devices */
@media (max-width: 768px) {

    .navbar,
    .floating-card {
        backdrop-filter: none !important;
        background: rgba(15, 15, 30, 0.85) !important;
    }
}


/* Respect user's reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .floating-card {
        animation: none !important;
    }

    #particles-canvas {
        display: none !important;
    }
}

/* ===================================
   FAQ SECTION
   =================================== */

.faq-section {
    background: var(--bg-primary);
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-tertiary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-md);
    overflow: hidden;
    transition: var(--transition-normal);
}

.faq-item:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.faq-item[open] {
    border-color: rgba(99, 102, 241, 0.5);
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.2);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-md) var(--spacing-lg);
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-primary);
    transition: var(--transition-fast);
    list-style: none;
}

.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:hover {
    color: var(--primary);
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--primary);
    transition: var(--transition-normal);
    min-width: 24px;
    text-align: center;
}

.faq-item[open] .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 var(--spacing-lg) var(--spacing-lg) var(--spacing-lg);
    color: var(--text-secondary);
    line-height: 1.8;
    animation: fadeIn 0.3s ease;
}

.faq-answer p {
    margin-bottom: var(--spacing-sm);
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ul,
.faq-answer ol {
    margin: var(--spacing-sm) 0;
    padding-left: var(--spacing-lg);
}

.faq-answer li {
    margin-bottom: var(--spacing-xs);
    color: var(--text-secondary);
}

.faq-answer strong {
    color: var(--text-primary);
    font-weight: 600;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive FAQ */
@media (max-width: 768px) {
    .faq-question {
        font-size: 1rem;
        padding: var(--spacing-sm) var(--spacing-md);
    }

    .faq-answer {
        padding: 0 var(--spacing-md) var(--spacing-md) var(--spacing-md);
        font-size: 0.9375rem;
    }

    .faq-icon {
        font-size: 1.25rem;
    }
}