/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

:root {
    --primary-color: #1E2761;
    --secondary-color: #2D46B9;
    --accent-color: #408EC6;
    --white: #FFFFFF;
    --black: #000000;
    --gray-100: #F8F9FA;
    --gray-200: #E9ECEF;
    --gray-300: #DEE2E6;
    --gray-400: #CED4DA;
    --gray-500: #6C757D;
    --gray-600: #495057;
    --gray-700: #343A40;
    --gray-800: #212529;

    --bg-primary: var(--white);
    --bg-secondary: var(--gray-100);
    --text-primary: var(--gray-800);
    --text-secondary: var(--gray-600);
    --border-color: var(--gray-300);
    --card-bg: var(--white);
    --navbar-bg: rgba(255, 255, 255, 0.95);
    --form-bg: var(--gray-100);
    --input-bg: var(--white);
}

/* Variables para modo oscuro */
[data-theme="dark"] {
    --bg-primary: #0f1419;
    --bg-secondary: #1a1f29;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --border-color: #2d3748;
    --card-bg: #1e2532;
    --navbar-bg: rgba(15, 20, 25, 0.95);
    --form-bg: #1a1f29;
    --input-bg: #2d3748;
    --accent-color: #5fa8d8;
    --gray-100: #1a1f29;
    --gray-200: #2d3748;
    --gray-300: #4a5568;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    display: flex;
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--navbar-bg);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
    border-bottom: 1px solid var(--border-color);
}

.logo{
    width: 50px;
    height: auto;
    margin-right: 10px;
    border-radius: 200px;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.nav-logo h2 {

    color: var(--primary-color);
    font-weight: 700;
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
   text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    justify-content: end;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-primary);
    margin: 3px 0;
    transition: 0.3s;
}

.language-selector {
    position: relative;
    display: inline-block;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}

.lang-btn:hover {
    border-color: var(--primary-color);
    background: rgba(30, 39, 97, 0.05);
}

.flag-icon {
    width: 20px;
    height: 15px;
    object-fit: cover;
    border-radius: 2px;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.lang-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 2px solid var(--gray-300);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
    min-width: 120px;
}

.lang-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 15px;
    border: none;
    background: transparent;
    text-align: left;
    cursor: pointer;
    transition: background 0.3s ease;
    font-size: 14px;
    color: var(--gray-700);
}

.lang-option:hover {
    background: var(--gray-100);
}

.lang-option:first-child {
    border-radius: 6px 6px 0 0;
}

.lang-option:last-child {
    border-radius: 0 0 6px 6px;
}


/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 100px 0 50px;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.hero-content {
    flex: 1;
    padding-right: 2rem;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 0.3s forwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease 0.6s forwards;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(30, 39, 97, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-color);
    padding: 12px 30px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-2px);
}

.hero-visual {
    flex: 1;
    position: relative;
}

.visual-container {
    position: relative;
    height: 500px;
}

.visual-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 20px;
    height: 100%;
}

.grid-item {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    transform: scale(0.9);
}

.grid-item:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.grid-item:hover img {
    transform: scale(1.05);
}

.item-1 {
    grid-column: 1;
    grid-row: 1 / span 2;
    animation: scaleIn 1s ease 0.8s forwards;
}

.item-2 {
    grid-column: 2;
    grid-row: 1;
    animation: scaleIn 1s ease 1s forwards;
}

.item-3 {
    grid-column: 2;
    grid-row: 2;
    animation: scaleIn 1s ease 1.2s forwards;
}

/* Services Section */
.services {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--card-bg);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(50px);
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: var(--bg-secondary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--primary-color);
    transform: scale(1.1);
}

.service-icon img {
    width: 50px;
    height: 50px;
}

.service-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.service-card p {
    padding: 100px 0;
    background: var(--bg-primary);
}

/* About Section */
.about {
    padding: 100px 0;
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text {
    opacity: 0;
    transform: translateX(-50px);
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray-500);
    font-weight: 500;
}

.about-image {
    opacity: 0;
    transform: translateX(50px);
}

.about-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* Projects Section */
.projects {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
     background: var(--card-bg);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(50px);
    border: 1px solid var(--border-color);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.project-image {
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.project-info p {
    color: var(--text-secondary);
    line-height: 1.6
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background: var(--white);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    margin-top: 3rem;
}

.contact-info h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.contact-info p {
    color: var(--gray-600);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-item img {
    width: 24px;
    height: 24px;
}

.contact-item span {
    color: var(--gray-700);
    font-weight: 500;
}

.contact-form {
    background: var(--gray-100);
    padding: 2.5rem;
    border-radius: 20px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 2px solid var(--gray-300);
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--white);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 39, 97, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section p {
    line-height: 1.6;
    opacity: 0.9;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.footer-section ul li a:hover {
    opacity: 1;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: inline-block;
    transition: transform 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
}

.social-links img {
    width: 32px;
    height: 32px;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.8;
}

.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    border: none;
    color: var(--white);
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(30, 39, 97, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 12px 35px rgba(30, 39, 97, 0.4);
}
[data-theme="dark"] .theme-toggle {
    background: var(--accent-color);
}

/* Ajustes específicos para modo oscuro */
[data-theme="dark"] .navbar.scrolled {
    background: var(--navbar-bg);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .nav-menu {
    background-color: var(--bg-primary);
    box-shadow: 0 10px 27px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .service-card:hover .service-icon {
    background: var(--primary-color);
}

[data-theme="dark"] .project-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .service-card:hover,
[data-theme="dark"] .project-card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
}

/* Partículas - Adaptación para modo oscuro */
[data-theme="dark"] .particles-canvas {
    opacity: 0.2;
}

/* Formas morphing - Adaptación para modo oscuro */
[data-theme="dark"] .morphing-shapes > div {
    background: linear-gradient(45deg, var(--accent-color), var(--secondary-color)) !important;
    opacity: 0.05 !important;
}

/* Cursor personalizado - Adaptación para modo oscuro */
[data-theme="dark"] .custom-cursor {
    background: var(--accent-color) !important;
}

[data-theme="dark"] .cursor-follower {
    border-color: var(--accent-color) !important;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll animations */
.service-card.animate,
.project-card.animate,
.about-text.animate,
.about-image.animate {
    opacity: 1;
    transform: translateY(0) translateX(0);
    transition: all 0.8s ease;
}
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 4.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .visual-grid {
        gap: 30px;
    }
    
    .service-card {
        padding: 3rem 2.5rem;
    }
    
    .contact-content {
        gap: 6rem;
    }
}

@media (min-width: 1200px) and (max-width: 1439px) {
    .container {
        padding: 0 30px;
    }

    .hero-title {
        font-size: 3.8rem;
    }

     .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .about-content {
        gap: 5rem;
    }
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.8rem;
    }
    
    .about-content {
        gap: 3rem;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 120px 0 50px;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 3rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .visual-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }
    
    .item-1 {
        grid-column: 1;
        grid-row: 1;
    }
    
    .item-2 {
        grid-column: 1;
        grid-row: 2;
    }
    
    .item-3 {
        grid-column: 1;
        grid-row: 3;
    }
}

@media (max-width: 480px) {
    .language-selector {
        margin-left: auto;
        margin-right: 15px;
    }
    
    .lang-dropdown {
        right: 0;
        left: auto;
    }
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .services-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}

/* Utility classes */
.visible {
    opacity: 1 !important;
    transform: translateY(0) translateX(0) scale(1) !important;
}

