:root {
    /* Minimalist Light White & Blue Palette */
    --bg-white: #ffffff;
    --bg-gray: #f9fafb;
    --text-dark: #111827;
    --text-gray: #4b5563;
    --border-color: #e5e7eb;
    
    /* Azul Tranquilo / Sereno */
    --accent-blue: #3b82f6; 
    --accent-blue-hover: #2563eb;
    --accent-blue-light: #eff6ff;

    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

body.dark-mode {
    --bg-white: #0f172a;
    --bg-gray: #1e293b;
    --text-dark: #f8fafc;
    --text-gray: #94a3b8;
    --border-color: #334155;
    --accent-blue-light: rgba(59, 130, 246, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, .font-heading {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-dark);
    letter-spacing: -0.5px;
}

.text-blue { color: var(--accent-blue); }
.text-white { color: #fff; }
.bg-light { background-color: var(--bg-gray); }
.bg-white { background-color: var(--bg-white); }
.mt-4 { margin-top: 1.5rem; }

/* --- Buttons & Pills --- */
.pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    border-radius: 9999px; /* Pill shape */
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
.pill-btn.solid-blue {
    background: var(--accent-blue);
    color: #fff;
}
.pill-btn.solid-blue:hover {
    background: var(--accent-blue-hover);
    transform: translateY(-2px);
}
.pill-btn.dark-btn {
    background: var(--text-dark);
    color: var(--bg-white);
}
.pill-btn.dark-btn:hover {
    background: var(--accent-blue);
    color: #fff;
    transform: translateY(-2px);
}
body.dark-mode .pill-btn.dark-btn {
    background: var(--accent-blue);
    color: #fff;
}
body.dark-mode .pill-btn.dark-btn:hover {
    background: var(--accent-blue-hover);
}

.pill-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-gray);
    color: var(--text-dark);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

.nav-links li a:hover {
    color: var(--accent-blue);
}
.nav-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.lang-btn {
    background: var(--bg-gray);
    border: none;
    color: var(--text-dark);
    font-weight: 700;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-family: var(--font-main);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 40px;
}
.lang-btn:hover {
    background: var(--accent-blue-light);
    color: var(--accent-blue);
    transform: translateY(-2px);
}
body.dark-mode .lang-btn {
    background: #1e293b;
    color: #f1f5f9;
}
body.dark-mode .lang-btn:hover {
    background: #334155;
    color: #60a5fa;
}

/* --- Container --- */
.container {
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0; width: 100%;
    z-index: 1000;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #f3f4f6;
    padding: 1.2rem 5%;
    transition: padding 0.3s;
}
.navbar.scrolled {
    padding: 0.8rem 5%;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05);
}
.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
}
.navbar-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}
.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
}
.nav-links a:not(.pill-btn) {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: color 0.3s;
}
.nav-links a:hover:not(.pill-btn) { color: var(--accent-blue); }

#nav-contact.pill-btn {
    background: var(--text-dark);
    color: var(--bg-white);
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
    box-shadow: none;
}
#nav-contact.pill-btn:hover {
    background: var(--accent-blue);
    color: #fff;
}
body.dark-mode #nav-contact.pill-btn {
    background: #1e293b;
    color: #f1f5f9;
    border: 1px solid #334155;
}
body.dark-mode #nav-contact.pill-btn:hover {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}

/* --- Hero Section --- */
.hero {
    padding: 160px 5% 100px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}
.hero-top-labels {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
}
.hero-main-title {
    margin-bottom: 4rem;
}
.title-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.title-row.right {
    justify-content: center;
}
.hero-main-title h1 {
    font-size: clamp(3rem, 8vw, 6.5rem);
    letter-spacing: -3px;
    text-transform: uppercase;
}
.asterisk {
    font-size: clamp(3rem, 8vw, 6.5rem);
    color: var(--text-dark);
    line-height: 1;
}

.hero-actions { display: flex; gap: 1rem; align-items: center; margin-left: 1rem; flex-wrap: wrap;}

.hero-desc-row {
    max-width: 600px;
    margin-left: auto;
    margin-bottom: 3rem;
    text-align: right;
}
.hero-desc-row p { font-size: 1.1rem; color: var(--text-gray); }

.hero-social-links {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}
.hero-social-links .social-icon {
    width: 48px; height: 48px;
    border-radius: 50%;
    background: #f1f5f9;
    color: #1e293b;
    display: flex; justify-content: center; align-items: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    font-size: 1.3rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.hero-social-links .social-icon:hover {
    background: #fff;
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    color: var(--accent-blue);
}

body.dark-mode .hero-social-links .social-icon {
    background: #1e293b;
    color: #f1f5f9;
}
body.dark-mode .hero-social-links .social-icon:hover {
    background: #334155;
    color: #60a5fa;
}
.hero-social-links .social-icon:hover { 
    background: var(--text-dark); 
    color: white; 
    transform: translateY(-3px); 
}

/* --- Services / Skills --- */
.services {
    padding: 8rem 5%;
    background: var(--bg-gray);
    margin: 0 auto;
}
.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-transform: uppercase;
}
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px; margin: 0 auto;
}
.service-card {
    padding: 3rem 2rem;
    border-radius: 30px;
    border: 1px solid #e5e7eb;
    background: #fff;
    transition: all 0.3s ease;
}
.service-card:hover,
.service-card.active-card {
    border-color: var(--accent-blue);
    box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.15);
    transform: translateY(-5px);
}
.service-card .icon-wrapper {
    width: 60px; height: 60px;
    background: var(--bg-gray);
    color: var(--text-dark);
    border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    transition: all 0.3s ease;
}
.service-card:hover .icon-wrapper,
.service-card.active-card .icon-wrapper {
    background: var(--accent-blue);
    color: #fff;
}
.service-card h3 {
    font-size: 1.4rem; margin-bottom: 1rem;
}
.service-card p {
    color: var(--text-gray); font-size: 1rem; line-height: 1.6;
}

/* --- About Us --- */
.about-us {
    padding: 6rem 5%;
    background: var(--bg-white);
}
.about-us.blue-section {
    background: var(--accent-blue);
    color: #fff;
}
.about-us .container {
    max-width: 1400px;
    margin: 0 auto;
}
.about-us-content {
    display: flex;
    align-items: center;
    gap: 4rem;
}
.about-us-img {
    flex: 0 0 auto;
}
.about-us-img img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--accent-blue);
    box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.2);
}
.about-us.blue-section .about-us-img img {
    border-color: #fff;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
}
.about-us-text {
    flex: 1;
}
.about-us-text h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
}
.about-us.blue-section .about-us-text h2 {
    color: #fff;
}
.about-us-text p {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 1rem;
    line-height: 1.8;
}
.about-us.blue-section .about-us-text p {
    color: #e5e7eb;
}
.social-links-about {
    display: flex;
    gap: 1.2rem;
    margin-top: 2.5rem;
}
.social-links-about a {
    width: 48px;
    height: 48px;
    background: #f8fafc;
    color: #1e293b;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.3rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}
.social-links-about a:hover {
    background: #fff;
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    color: var(--accent-blue);
}

body.dark-mode .social-links-about a {
    background: #334155;
    color: #f1f5f9;
}
body.dark-mode .social-links-about a:hover {
    background: #475569;
}

body.dark-mode .navbar {
    background: rgba(15, 23, 42, 0.9);
}
body.dark-mode .service-card, body.dark-mode .case-card {
    background: #1e293b;
    border-color: #334155;
}
body.dark-mode .project-visual {
    background: #1e293b;
}
body.dark-mode .contact-wrapper {
    background: #1e293b;
}
body.dark-mode .contact-form-container {
    background: #0f172a;
    border: 1px solid #334155;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}
body.dark-mode .minimal-form input, body.dark-mode .minimal-form textarea {
    border-bottom: 1px solid #334155;
}
body.dark-mode .footer-minimal {
    border-top: 1px solid #334155;
}
body.dark-mode .blue-section {
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
}

@media (max-width: 1024px) {
    .about-us-content {
        flex-direction: column;
        text-align: center;
    }
}

/* --- Content Block (Nosotros / Diferenciales) --- */
.content-block { padding: 6rem 5%; background: var(--bg-white); }
.content-block .container { max-width: 1400px; margin: 0 auto;}
.split-content { display: flex; gap: 4rem; align-items: flex-start;}
.split-text { flex: 1.2; }
.split-features { flex: 1; background: var(--bg-gray); padding: 3rem; border-radius: 30px; }

.section-title { font-size: 3rem; text-transform: uppercase; margin-bottom: 2rem; line-height: 1.1;}
.split-text p { font-size: 1.1rem; color: var(--text-gray); margin-bottom: 1.5rem; line-height: 1.8;}
.split-text ul { list-style: none; margin-top: 2rem; margin-bottom: 1rem;}
.split-text li { margin-bottom: 1rem; font-size: 1.05rem; color: var(--text-dark); display: flex; align-items: center; gap: 1rem;}
.split-text li i { color: var(--accent-blue); background: var(--accent-blue-light); padding: 0.5rem; border-radius: 50%; font-size: 0.9rem;}

.split-features h3 { font-size: 1.5rem; margin-bottom: 2rem; }
.feature-item { display: flex; gap: 1rem; margin-bottom: 1.5rem; align-items: flex-start;}
.feature-item i { color: var(--accent-blue); font-size: 1.2rem; margin-top: 0.2rem;}
.feature-item p { color: var(--text-dark); font-weight: 500; font-size: 1.05rem;}

/* --- Experience Blue Section --- */
.experience.blue-section {
    background: var(--accent-blue);
    color: #fff;
    padding: 6rem 5%;
}
.experience.blue-section .container { max-width: 1400px; margin: 0 auto; }
.experience.blue-section h2 { margin-bottom: 2rem;}

.exp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}
.exp-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    padding: 2.5rem;
    border-radius: 30px;
    transition: all 0.3s ease;
}
.exp-card:hover {
    transform: translateY(-5px);
    background: #fff !important;
    border-color: #fff;
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.2);
}
.exp-card:hover .icon-wrapper {
    background: var(--accent-blue) !important;
    color: #fff !important;
}
.exp-card:hover p, .exp-card:hover h3, .exp-card:hover h3 span {
    color: #111827 !important;
}
.exp-card:hover h3 i {
    color: var(--accent-blue) !important;
}
.exp-header {
    display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem;
}
.tech-badges-container {
    display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 1rem;
}
.exp-header h3 { font-size: 1.2rem; text-transform: none; transition: color 0.3s ease; }
.exp-card p { font-size: 1rem; line-height: 1.6; margin-bottom: 1.5rem; color: #fff; transition: color 0.3s ease; }
.tags { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.tag {
    background: rgba(255,255,255,0.15);
    padding: 0.4rem 1rem; border-radius: 9999px; font-size: 0.8rem;
    font-family: var(--font-main);
}

/* --- Projects Section --- */
.projects {
    padding: 8rem 5%;
    background: var(--bg-white);
}
.cases {
    padding: 6rem 5%;
    background: var(--bg-gray);
}
.cases .container { max-width: 1400px; margin: 0 auto; }
.cases-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; margin-top: 1rem; }
.case-card { padding: 1.5rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 12px; }
.case-card h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
.case-card p { color: var(--text-gray); font-size: 0.95rem; line-height: 1.5; }
.projects .container {
    max-width: 1400px;
    margin: 0 auto;
}
.project-list {
    margin-top: 5rem;
    display: flex; flex-direction: column; gap: 6rem;
}
.project-row {
    display: flex; align-items: center; gap: 5rem;
}
.project-row.reverse { flex-direction: row-reverse; }
.project-info { flex: 1; }
.project-info h3 { font-size: 2.2rem; margin-bottom: 1.5rem; }
.project-info p { color: var(--text-gray); margin-bottom: 2rem; font-size: 1.1rem; line-height:1.7;}
.btn-link {
    color: var(--text-dark); font-weight: 700; text-transform: uppercase; text-decoration: none;
    display: inline-flex; align-items: center; gap: 0.5rem;
    border-bottom: 2px solid var(--text-dark);
    padding-bottom: 0.2rem;
    transition: color 0.3s, border-color 0.3s;
}
.btn-link:hover { color: var(--accent-blue); border-color: var(--accent-blue); }

.project-visual {
    flex: 0.8; 
    min-height: 280px; 
    border-radius: 30px;
    display: flex; justify-content: center; align-items: center;
    background: #f8fafc;
    width: 100%;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
body.dark-mode .project-visual {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-color: #334155;
}
.mockup-box { 
    width: 140px; height: 140px; display: flex; align-items: center; justify-content: center; 
    font-size: 3.5rem; border-radius: 24px; background: #fff; 
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    position: relative;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.mockup-box::before {
    content: '';
    position: absolute;
    top: 12px;
    left: 15px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ff5f56;
    box-shadow: 12px 0 0 #ffbd2e, 24px 0 0 #27c93f;
}
.project-row:hover .mockup-box {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 0 30px 60px rgba(0,0,0,0.15);
}

body.dark-mode .mockup-box {
    background: #1e293b;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.mockup-box.blue-shadow { color: #3b82f6; }
.mockup-box.orange-shadow { color: #fb923c; }
.mockup-box.dark-shadow { color: #64748b; }
.mockup-box.green-shadow { color: #10b981; }

/* --- Contact & Footer --- */
.contact {
    padding: 8rem 5%;
    background: var(--bg-white);
}
.contact .container {
    max-width: 1400px;
    margin: 0 auto;
}
.contact-wrapper {
    background: var(--bg-gray);
    border-radius: 40px;
    padding: 5rem;
    display: flex;
    gap: 5rem;
    align-items: center;
}
.contact-info { flex: 1; }
.contact-info h2 { font-size: 3.5rem; margin-bottom: 1.5rem; }
.contact-info p { color: var(--text-gray); margin-bottom: 2rem; font-size: 1.1rem;}

.contact-form-container { 
    flex: 1; background: #fff; padding: 4rem; 
    border-radius: 30px; box-shadow: 0 20px 40px rgba(0,0,0,0.05); 
    width: 100%;
}
.form-title { font-family: var(--font-heading); font-weight: 800; font-size: 1.2rem; margin-bottom: 2.5rem; }
.input-row { display: flex; gap: 2rem; margin-bottom: 2rem; }
.minimal-form input, .minimal-form textarea {
    width: 100%;
    padding: 1rem 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
    font-size: 1rem;
    font-family: var(--font-main);
    color: var(--text-dark);
    transition: all 0.3s ease;
}
.minimal-form input:focus, .minimal-form textarea:focus { 
    outline: none; 
    border-color: var(--accent-blue);
    padding-left: 0.5rem;
}
body.dark-mode .minimal-form input:focus, body.dark-mode .minimal-form textarea:focus {
    border-color: #fff;
}
.field-group {
    flex: 1;
    width: 100%;
}
.error-message {
    color: #ef4444;
    font-size: 0.8rem;
    margin-top: 0.4rem;
    min-height: 1rem;
    display: block;
    opacity: 0;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}
.error-message.visible {
    opacity: 1;
    transform: translateY(0);
}
.success-message {
    background: #ecfdf5;
    color: #065f46;
    padding: 1rem;
    border-radius: 12px;
    margin-top: 2rem;
    display: none;
    text-align: center;
    font-weight: 500;
}
body.dark-mode .success-message {
    background: rgba(16, 185, 129, 0.1);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.2);
}
.minimal-form textarea { margin-bottom: 2.5rem; resize: vertical; }

.footer-minimal { 
    text-align: center; padding: 3rem; 
    color: var(--text-gray); font-size: 0.95rem; 
    border-top: 1px solid #f3f4f6;
    background: var(--bg-white);
}

/* Utils / Animations */
.visible { opacity: 1 !important; transform: translateY(0) !important; }
.fade-in { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }

/* Responsive adjustments */
@media (max-width: 1024px) {
    .project-row, .project-row.reverse { flex-direction: column; text-align: center; }
    .contact-wrapper { flex-direction: column; padding: 3rem 1.5rem; gap: 3rem; }
    .contact-form-container { padding: 2.5rem 1.5rem; }
    .split-content { flex-direction: column; }
    .nav-links { display: none; }
}

@media (max-width: 768px) {
    .hero { 
        padding: 120px 5% 60px; 
        text-align: center; 
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    .hero-top-labels { 
        flex-direction: column; 
        align-items: center; 
        gap: 0.8rem;
        margin-bottom: 2.5rem; 
        width: 100%;
    }
    .hero-main-title {
        width: 100%;
        margin-bottom: 3rem;
    }
    .title-row, .title-row.right { justify-content: center; }
    .hero-main-title h1 { 
        font-size: clamp(2.2rem, 10vw, 3.8rem); 
        letter-spacing: -1px; 
    }
    #hero-title-sub {
        font-size: clamp(1.5rem, 6vw, 2.5rem) !important;
    }
    .hero-desc-row { 
        text-align: center; 
        margin: 0 auto 2.5rem; 
        padding: 0 1rem;
    }
    .hero-desc-row p { font-size: 1rem; }
    .hero-social-links { 
        justify-content: center; 
        width: 100%;
    }
    .hero-actions { 
        justify-content: center; 
        margin-left: 0; 
        margin-top: 1rem; 
    }
    
    .section-title { font-size: 2.2rem; }
    .contact-info { text-align: center; margin-bottom: 2rem; }
    .contact-info h2 { font-size: 2.5rem; line-height: 1.1; }
    .contact-wrapper { padding: 2rem 1rem; }
    .contact-form-container { padding: 2rem 1rem; border-radius: 20px; }
    .input-row { flex-direction: column; gap: 0rem; }
    
    .exp-grid { grid-template-columns: 1fr; }
    .exp-card { padding: 1.5rem; }
    .project-row { gap: 2rem; }
    .project-info h3 { font-size: 1.8rem; }
}

@media (max-width: 480px) {
    .hero { padding-top: 100px; }
    .hero-main-title h1 { font-size: 2rem; }
    .section-title { font-size: 1.8rem; }
    .contact-info h2 { font-size: 2rem; }
    .pill-label { font-size: 0.75rem; padding: 0.4rem 0.8rem; }
}
