:root {
    --bg-primary: #ffffff;
    --navy-deep: #0A192F;
    --wine-red: #8B0000;
    --wine-red-hover: #a00000;
    --text-primary: #1e293b;
    --text-muted: #64748b;
    --glass: rgba(255, 255, 255, 0.9);
    --shadow-soft: 0 10px 30px -5px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 20px 40px -10px rgba(10, 25, 47, 0.15);
    --font-heading: 'Rajdhani', sans-serif;
    --font-body: 'Montserrat', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

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

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(10, 25, 47, 0.05);
    padding: 1.2rem 0;
    transition: all 0.3s;
}

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

.logo img {
    height: 45px;
    transition: transform 0.3s ease;
}

.logo-provided {
    filter: brightness(0) !important;
}

.logo-provided:hover {
    transform: scale(1.05);
}

.nav-container {
    display: flex;
    align-items: center;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--navy-deep);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s;
    position: relative;
    padding: 10px 0; /* Touch Target improvement */
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--wine-red);
    transition: width 0.3s;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--wine-red);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--navy-deep);
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    width: 44px; /* AREA DE CLIC GARANTIZADA */
    height: 44px;
}

.mobile-menu-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--navy-deep);
    margin: 5px auto;
    transition: 0.3s ease-in-out;
}

/* Animación de apertura para las líneas CSS */
.nav-links.active + .mobile-menu-btn span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.nav-links.active + .mobile-menu-btn span:nth-child(2) {
    opacity: 0;
}
.nav-links.active + .mobile-menu-btn span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    display: flex;
    align-items: center;
    padding-top: 100px; /* Moves it lower */
    color: white;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-background img, .hero-video-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.35) contrast(1.1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(10, 25, 47, 0.9) 0%, rgba(10, 25, 47, 0.4) 100%);
    z-index: -1;
}

.hero-content {
    max-width: 850px;
    transform: translateX(-60px); /* Shifting further left as requested */
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 2rem;
    text-transform: uppercase;
    animation: fadeInUp 1s ease-out;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 3rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease-out 0.2s backwards;
}

.btn {
    display: inline-block;
    padding: 1.2rem 3rem;
    border-radius: 4px; /* Exact requirement */
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--wine-red);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
}

.btn-primary:hover {
    background: var(--wine-red-hover);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 0, 0, 0.4);
}

/* Services Section */
.services {
    padding: 120px 0;
    background: #f8fafc;
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--navy-deep);
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.section-header .line {
    width: 80px;
    height: 4px;
    background: var(--wine-red);
    margin: 0 auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: white;
    padding: 3.5rem 2rem;
    text-align: center;
    border-radius: 8px;
    box-shadow: var(--shadow-soft);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-bottom: 4px solid transparent;
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-hover);
    border-bottom: 4px solid var(--wine-red);
}

.service-card i {
    font-size: 3.5rem;
    color: var(--navy-deep);
    margin-bottom: 2rem;
    display: block;
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--navy-deep);
    margin-bottom: 1rem;
}

.service-card p {
    margin-bottom: 2rem;
    color: var(--text-muted);
}

.service-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: var(--wine-red);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.service-link i {
    width: 16px;
    height: 16px;
    margin-bottom: 0 !important;
}

.service-link:hover {
    gap: 0.8rem;
    color: var(--navy-deep);
}

/* Approach Section */
.approach {
    padding: 120px 0;
}

.approach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 3rem;
}

.approach-item {
    text-align: center;
}

.icon-circle {
    width: 100px;
    height: 100px;
    background: var(--navy-deep);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 2rem;
    font-size: 2.5rem;
    transition: all 0.3s;
}

.approach-item:hover .icon-circle {
    transform: rotateY(180deg);
    background: var(--wine-red);
}

.approach-item h3 {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--navy-deep);
}

/* slider/Testimonials */
.testimonials {
    background: var(--navy-deep);
    color: white;
    padding: 120px 0;
}

.testimonial-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.testimonial-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 2rem;
    border: 4px solid var(--wine-red);
    object-fit: cover;
}

.quote {
    font-size: 1.5rem;
    font-style: italic;
    margin-bottom: 2rem;
    line-height: 1.8;
}

.author {
    font-weight: 700;
    color: var(--wine-red);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Footer */
footer {
    background: #050b16;
    color: white;
    padding: 80px 0 30px;
}

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

.footer-logo {
    height: 50px;
    margin-bottom: 2rem;
    filter: brightness(0) invert(1);
}

.footer-grid h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 2rem;
    text-transform: uppercase;
    color: var(--wine-red);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 1rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #64748b;
    font-size: 0.9rem;
}

/* Animations */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Success Cases / Portfolio */
.success-cases {
    padding: 6rem 0;
    background: white;
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.case-card {
    padding: 2rem;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    transition: transform 0.3s, box-shadow 0.3s;
}

.case-card:hover {
    box-shadow: 0 15px 30px rgba(10, 25, 47, 0.08);
    transform: translateY(-5px);
}

.case-card h4 {
    font-size: 1.25rem;
    color: var(--navy-deep);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.case-card .metric {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--wine-red);
    margin-bottom: 0.25rem;
}

.case-card .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 1rem;
}

.case-card p {
    color: #475569;
    line-height: 1.6;
}

/* Tech Stack */
.tech-stack {
    padding: 6rem 0;
    background: var(--navy-deep);
    color: white;
}

.stack-desc {
    text-align: center;
    color: #94a3b8;
    max-width: 600px;
    margin: 1.5rem auto 3rem;
}

.stack-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
}

.tech-badge {
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
    cursor: default;
}

.tech-badge:hover {
    border-color: var(--wine-red);
    background: rgba(139, 0, 0, 0.1);
    transform: translateY(-5px);
}

.tech-badge span {
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.tech-badge small {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #94a3b8;
}

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
/* --- RESPONSIVE REFACTOR --- */

@media (max-width: 1024px) {
    .container { padding: 0 1.5rem; }
}

@media (max-width: 768px) {
    .mobile-menu-btn { display: block; }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: 0.4s ease-in-out;
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    
    .nav-links.active {
        right: 0;
    }

    .hero-content {
        transform: none;
        text-align: center;
    }

    .hero h1 { font-size: 2.8rem; }
    
    .section-header h2 { font-size: 2.2rem; }
    
    .wa-chat-panel { width: 90vw; right: 5vw; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2.2rem; }
    .btn { padding: 1rem 2rem; width: 100%; text-align: center; }
}

/* Touch targets for accessibility */
.btn, .nav-links a, .service-link, #wa-floating-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* WhatsApp Secure Widget Styles */
.wa-widget-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 50;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.wa-chat-panel {
    width: 320px;
    background: rgba(255, 255, 255, 0.85); /* Translucent background */
    backdrop-filter: blur(12px); /* Mimics Tailwind backdrop-blur */
    -webkit-backdrop-filter: blur(12px);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: 0 20px 40px -10px rgba(10, 25, 47, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transform-origin: bottom right;
}

.wa-chat-panel.hidden {
    opacity: 0;
    transform: scale(0);
    pointer-events: none;
}

.wa-header {
    background: var(--navy-deep);
    color: white;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 3px solid var(--wine-red);
}

.secure-icon {
    color: var(--wine-red);
    width: 24px;
    height: 24px;
}

.wa-header-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

.secure-text {
    font-size: 0.75rem;
    color: #94a3b8;
    margin: 0;
}

.wa-body {
    padding: 1rem;
}

.wa-body textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-family: var(--font-body);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    resize: none;
}

.wa-body textarea:focus {
    outline: none;
    border-color: #0A192F;
    box-shadow: 0 0 0 2px rgba(10, 25, 47, 0.1);
}

.captcha-container {
    background: #f8fafc;
    padding: 0.75rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    border: 1px dashed #cbd5e1;
}

.captcha-container input {
    width: 60px;
    padding: 0.25rem;
    margin-left: 0.5rem;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
}

.consent-container {
    display: flex;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: #64748b;
    margin-bottom: 1rem;
    align-items: flex-start;
}

.consent-container input {
    margin-top: 0.2rem;
}

.consent-container a {
    color: #3b82f6;
    text-decoration: underline;
}

.wa-button {
    width: 100%;
    padding: 0.75rem;
    background: var(--wine-red);
    color: white;
    border: none;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    text-transform: uppercase;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
}

.wa-button:hover {
    background: var(--wine-red-hover);
    box-shadow: 0 4px 15px rgba(139, 0, 0, 0.3);
}

.wa-floating-btn {
    width: 64px;
    height: 64px;
    background: #10b981; /* Emerald Green */
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px -5px rgba(16, 185, 129, 0.4);
    transition: all 0.3s;
    position: relative;
}

.wa-floating-btn:hover {
    transform: scale(1.1) translateY(-5px);
    background: #059669; /* Darker Emerald */
    box-shadow: 0 15px 30px -5px rgba(16, 185, 129, 0.5);
}

.wa-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444; /* Red for alert */
    color: white;
    font-size: 14px;
    font-weight: bold;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}
