:root {
    --primary: #001a3d; /* Navy Deep */
    --accent: #0066ff; /* Electric Blue */
    --accent-dark: #004ecc;
    --highlight: #e60000; /* Intense Red */
    --white: #ffffff;
    --gray-light: #f8f9fa;
    --gray-medium: #e9ecef;
    --text-dark: #1a1a1a;
    --text-muted: #555555;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --container-width: 1200px;
    --header-height: 80px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: var(--white);
    background-image: url('../background-pattern.png');
    background-size: 800px;
    background-attachment: fixed;
}

h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

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

.grid {
    display: grid;
    gap: 30px;
}

.text-center { text-align: center; }
.mt-50 { margin-top: 50px; }
.w-full { width: 100%; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #0052cc;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 102, 255, 0.3);
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary);
}

.btn-secondary:hover {
    background-color: var(--gray-medium);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: var(--white);
}

/* Header */
#main-header {
    height: var(--header-height);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background: transparent;
    transition: var(--transition);
    display: flex;
    align-items: center;
}

#main-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    height: 70px;
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.header-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo img {
    height: 45px;
}

.logo-text {
    font-weight: 700;
    font-size: 1.4rem;
    color: var(--primary);
    line-height: 1;
}

.logo-text small {
    display: block;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--highlight);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--primary);
}

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

.desktop-nav {
    display: flex;
    align-items: center;
    gap: 40px;
}

/* Mobile Nav Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--primary);
    transition: var(--transition);
}

/* Hero */
.hero {
    height: 100vh;
    min-height: 600px;
    position: relative;
    display: flex;
    align-items: center;
    color: var(--white);
    padding-top: var(--header-height);
}

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

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 26, 61, 0.9) 0%, rgba(0, 26, 61, 0.4) 100%);
}

.hero-content {
    max-width: 800px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero h1 span {
    color: var(--accent);
}

.hero-tag {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    color: var(--accent);
    margin-bottom: 15px;
    background: rgba(255, 255, 255, 0.1);
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 700px;
}

.hero-actions {
    display: flex;
    gap: 20px;
}

/* Solutions Section */
.solutions-section {
    padding: 100px 0;
    background: var(--gray-light);
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-title {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.section-subtitle {
    color: var(--text-muted);
}

.solutions-grid {
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.solution-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.solution-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.card-img {
    height: 240px;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 30px;
}

.card-content h3 {
    margin-bottom: 15px;
    color: var(--primary);
}

.card-content p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.btn-link {
    font-weight: 700;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Clase 42 */
.clase-42 {
    padding: 100px 0;
}

.clase-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
}

.badge {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(230, 0, 0, 0.1);
    color: var(--highlight);
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.clase-text h2 {
    font-size: 2.5rem;
    margin-bottom: 25px;
}

.clase-list {
    margin-top: 30px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.clase-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
}

.clase-list li::before {
    content: "✓";
    color: var(--accent);
    font-weight: bold;
}

.clase-visual img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0,26,61,0.2);
}

/* Stats Section */
.stats-section {
    padding: 60px 0;
    background: var(--white);
    position: relative;
    z-index: 10;
    margin-top: -60px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
    border-radius: 12px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.stat-item {
    text-align: center;
    border-right: 1px solid var(--gray-medium);
}

.stat-item:last-child {
    border-right: none;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 5px;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
    .stat-item:nth-child(2) { border-right: none; }
}

/* Smart City Section */
.smart-city-section {
    padding: 120px 0;
    background: var(--white);
}

/* Why Section */
.bg-gray {
    background-color: #f0f4f8;
}

.mb-60 { margin-bottom: 60px; }
.p-30 { padding: 30px; }

.tech-stack {
    margin-top: 25px;
}

.tech-item {
    margin-bottom: 10px;
    padding-left: 20px;
    position: relative;
}

.tech-item::before {
    content: "•";
    color: var(--accent);
    font-size: 1.5rem;
    position: absolute;
    left: 0;
    top: -5px;
}

.icon-svg {
    color: var(--accent);
    margin-bottom: 20px;
}

/* SDK Preview */
.sdk-preview {
    padding: 100px 0;
    background: #000a1a;
    color: white;
}

.code-block {
    background: #0d1117;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #30363d;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.code-header {
    display: flex;
    gap: 6px;
    margin-bottom: 15px;
}

.code-header span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #30363d;
}

.code-block pre {
    color: #4ade80;
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

/* Legal Pages */
.legal-page {
    padding: 160px 0 100px;
}

.legal-content h1 {
    margin-bottom: 30px;
    color: var(--primary);
}

.legal-content h3 {
    margin-top: 40px;
    margin-bottom: 15px;
}

.legal-content p, .legal-content li {
    color: var(--text-muted);
    margin-bottom: 15px;
}

.legal-content ul {
    padding-left: 20px;
    list-style: disc;
    margin-bottom: 20px;
}

/* Page Headers */
.section-hero-small {
    padding: 180px 0 80px;
    background: var(--primary);
    color: white;
    text-align: center;
}

.section-padding {
    padding: 100px 0;
}

.page-content {
    min-height: 60vh;
}

.why-section {
    padding: 100px 0;
}

.features-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.feature-card {
    background: var(--white);
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    border-bottom: 4px solid transparent;
}

.feature-card:hover {
    border-bottom-color: var(--accent);
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 15px;
}

/* CTA */
.cta-section {
    padding: 100px 0;
    background: var(--primary);
    color: var(--white);
    text-align: center;
}

.cta-content h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px;
    opacity: 0.9;
}

/* Footer */
footer {
    background: #001229;
    color: var(--white);
    padding: 80px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-logo img {
    height: 40px;
}

.footer-info p {
    opacity: 0.7;
    margin-bottom: 15px;
    max-width: 400px;
}

.footer-links h4, .footer-contact h4 {
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.footer-links li, .footer-contact li {
    margin-bottom: 12px;
    opacity: 0.8;
}

.footer-links a:hover {
    color: var(--accent);
    padding-left: 5px;
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    font-size: 0.9rem;
    opacity: 0.6;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 999;
    transition: var(--transition);
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Back to Top */
#backToTop {
    position: fixed;
    bottom: 100px;
    right: 35px;
    width: 45px;
    height: 45px;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 998;
}

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    padding: 50px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    background: none;
    border: none;
    cursor: pointer;
}

#modal-form input, #modal-form textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--gray-medium);
    border-radius: 6px;
}

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

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

.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease-out;
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease-out;
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }

/* Responsive */
@media (max-width: 992px) {
    .hero h1 { font-size: 2.8rem; }
    .clase-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-grid { grid-template-columns: 1fr; }
    .desktop-nav { display: none; }
    .mobile-menu-toggle { display: flex; }
}

@media (max-width: 768px) {
    .hero { text-align: center; justify-content: center; }
    .hero-actions { flex-direction: column; }
    .section-title { font-size: 2rem; }
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateX(100%);
    transition: transform 0.5s ease-in-out;
}

.mobile-nav-overlay.active {
    transform: translateX(0);
}

.mobile-nav-content {
    text-align: center;
}

.mobile-links li {
    margin-bottom: 25px;
}

.mobile-links a {
    font-size: 1.8rem;
    color: var(--white);
    font-weight: 700;
}