:root {
    --bg-primary: #0B0E11;
    --bg-secondary: #0B0B0B;
    --bg-card: #181A20;
    --bg-glass: rgba(30, 35, 41, 0.7);
    --gold: #FCD535;
    --gold-hover: #F0B90B;
    --text-primary: #EAECEF;
    --text-secondary: #848E9C;
    --white: #FFFFFF;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container-width: 1200px;
    --gold-grad: linear-gradient(135deg, #FCD535 0%, #F0B90B 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
.logo {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.gold {
    color: var(--gold);
}

.gold-gradient {
    background: var(--gold-grad);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: var(--transition);
}

header.scrolled {
    background: rgba(11, 14, 17, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--gold);
}

.mobile-menu-btn {
    display: none;
}

/* Language Dropdown */
.lang-dropdown {
    position: relative;
    display: inline-block;
}

.lang-dropbtn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: var(--transition);
}

.lang-dropbtn:hover {
    border-color: var(--gold);
    color: var(--gold);
}

.lang-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: var(--bg-card);
    min-width: 80px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    margin-top: 8px;
    /* Pequeño espacio visual */
    overflow: visible;
    /* Permitir el puente ::before */
    z-index: 1001;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Puente invisible para evitar que el menú se cierre al mover el mouse */
.lang-dropdown-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: transparent;
}


.lang-dropdown-content a {
    color: var(--text-primary);
    padding: 0.6rem 1.2rem;
    text-decoration: none;
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
}

.lang-dropdown-content a:hover {
    background: rgba(252, 213, 53, 0.1);
    color: var(--gold);
}

.lang-dropdown:hover .lang-dropdown-content {
    display: block;
}

.arrow-down {
    transition: var(--transition);
    font-size: 0.6rem;
    opacity: 0.7;
}

.lang-dropdown:hover .arrow-down {
    transform: rotate(180deg);
}



/* Buttons */
.btn-primary {
    background: var(--gold-grad);
    color: #000;
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(252, 213, 53, 0.2);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    padding: 0.8rem 1.8rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: var(--transition);
}

.btn-secondary:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    background-size: cover;
    background-position: center;
    background-image: url('kairos_hero_bg.png');
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at right, transparent 0%, var(--bg-primary) 80%);
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.cta-group {
    display: flex;
    gap: 1.5rem;
}

/* Portfolio Section */
.portfolio-section {
    padding: 8rem 0;
    background: var(--bg-secondary);
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-secondary);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2.5rem;
}

.portfolio-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
    border: 1.5px solid rgba(255, 255, 255, 0.05);
}

.portfolio-card:hover {
    transform: translateY(-10px);
    border-color: rgba(252, 213, 53, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.card-img {
    height: 240px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: #2a2e33;
}

#project-1-img {
    background-image: url('project_chatbots.png');
}

#project-2-img {
    background-image: url('project_saas.png');
}

#project-3-img {
    background-image: url('project_crm.png');
}

#project-4-img {
    background-image: url('project_1.png');
}



.card-overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.tag {
    background: rgba(0, 0, 0, 0.6);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.card-content {
    padding: 2rem;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--white);
}

.card-content p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.view-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gold);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
}

.view-link .arrow {
    transition: var(--transition);
}

.view-link:hover .arrow {
    transform: translateX(5px);
}

/* Services Section */
.services-section {
    padding: 8rem 0;
}

.services-wrapper {
    display: flex;
    align-items: center;
    gap: 4rem;
    flex-wrap: wrap;
}

.services-info {
    flex: 1;
    min-width: 300px;
}

.services-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.services-info p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.service-list {
    list-style: none;
}

.service-list li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.2rem;
    font-weight: 500;
}

.service-list li::before {
    content: '✓';
    color: var(--gold);
    font-weight: bold;
    font-size: 1.2rem;
}

.services-visual {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
}

.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    padding: 3rem;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 3rem;
    position: relative;
}

.glass-card::after {
    content: '';
    position: absolute;
    width: 200px;
    height: 200px;
    background: var(--gold);
    filter: blur(100px);
    opacity: 0.1;
    z-index: -1;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--gold);
    font-family: 'Outfit', sans-serif;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Contact Section */
.contact-section {
    padding: 8rem 0;
    background: var(--bg-secondary);
}

.contact-card {
    max-width: 700px;
    margin: 0 auto;
    background: var(--bg-card);
    padding: 4rem;
    border-radius: 24px;
    text-align: center;
}

.contact-card.glass {
    background: rgba(24, 26, 32, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.contact-card h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-card p {
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1.2rem;
    background: #1e2329;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    color: var(--text-primary);
    outline: none;
    font-family: inherit;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--gold);
}

/* Footer */
footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.footer-logo {
    text-align: center;
}

.footer-logo .gold {
    font-size: 2rem;
    letter-spacing: 3px;
}

.footer-logo p {
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.footer-bottom {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.3);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s forwards;
}

.delay-1 {
    animation-delay: 0.2s;
}

.delay-2 {
    animation-delay: 0.4s;
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Multimedia Pulse */
.portfolio-card:last-child .card-img::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(252, 213, 53, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 1.5rem;
    padding-left: 5px;
    animation: pulse 2s infinite;
    cursor: pointer;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 0 rgba(252, 213, 53, 0.4);
    }

    70% {
        transform: translate(-50%, -50%) scale(1.1);
        box-shadow: 0 0 0 15px rgba(252, 213, 53, 0);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
        box-shadow: 0 0 0 0 rgba(252, 213, 53, 0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: -100%;
        width: 70%;
        height: 100vh;
        background: var(--bg-card);
        padding: 6rem 2rem;
        transition: 0.5s ease;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-menu-btn {
        display: block;
        width: 30px;
        height: 20px;
        position: relative;
        cursor: pointer;
        z-index: 1001;
    }

    .mobile-menu-btn span {
        display: block;
        width: 100%;
        height: 2px;
        background: var(--gold);
        position: absolute;
        transition: 0.3s;
    }

    .mobile-menu-btn span:nth-child(1) {
        top: 0;
    }

    .mobile-menu-btn span:nth-child(2) {
        top: 9px;
    }

    .mobile-menu-btn span:nth-child(3) {
        top: 18px;
    }

    .mobile-menu-btn.open span:nth-child(1) {
        transform: rotate(45deg);
        top: 9px;
    }

    .mobile-menu-btn.open span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.open span:nth-child(3) {
        transform: rotate(-45deg);
        top: 9px;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .services-wrapper {
        flex-direction: column;
    }

    .glass-card {
        padding: 2rem;
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .lang-dropdown {
        width: 100%;
        margin-top: 1rem;
    }

    .lang-dropbtn {
        width: fit-content;
        margin-bottom: 0.5rem;
    }

    .lang-dropdown-content {
        position: static;
        display: block;
        background: transparent;
        box-shadow: none;
        border: none;
        margin-top: 0;
        min-width: auto;
    }

    .lang-dropdown-content button {
        padding: 0.8rem 0;
        font-size: 1.1rem;
    }

    .arrow-down {
        display: none;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }

    .whatsapp-float svg {
        width: 24px;
        height: 24px;
    }
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 40px;
    right: 40px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: var(--transition);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1) translateY(-5px);
    box-shadow: 2px 5px 15px rgba(0, 0, 0, 0.4);
}

/* Modal Gallery */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
}

.modal-content {
    background: var(--bg-card);
    margin: 5% auto;
    padding: 3rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    width: 90%;
    max-width: 1000px;
    border-radius: 24px;
    position: relative;
    animation: modalIn 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.close-modal {
    position: absolute;
    right: 2rem;
    top: 1.5rem;
    color: var(--text-secondary);
    font-size: 2.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: var(--transition);
}

.close-modal:hover {
    color: var(--gold);
}

#modal-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

#modal-description {
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    background: #1e2329;
}

.gallery-item:hover {
    transform: scale(1.02);
    border-color: var(--gold);
}

.gallery-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.gallery-item-info {
    padding: 1rem;
}

.gallery-item-info h4 {
    font-size: 0.9rem;
    color: var(--white);
}

@media (max-width: 768px) {
    .modal-content {
        padding: 2rem 1.5rem;
        margin: 10% auto;
        width: 95%;
    }

    #modal-title {
        font-size: 1.8rem;
    }

    .close-modal {
        right: 1.5rem;
    }
}