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

body {
    font-family: var(--font-system);
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header - Fixed dimensions to prevent CLS */
header {
    position: fixed;
    top: 0;
    width: 100%;
    height: 80px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    max-width: 1400px;
    margin: 0 auto;
    height: 80px;
}

nav img {
    width: 164px;
    height: 32px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
 }

 .logo span {
     color: #f97316;
 }

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

 .nav-links a {
     color: #333;
     text-decoration: none;
     font-weight: 500;
     transition: color 0.3s;
 }

 .nav-links a:hover {
     color: #2563eb;
 }

 .menu-toggle {
     display: none;
     font-size: 1.5rem;
     cursor: pointer;
     color: #2563eb;
 }



 /* Sections */
 .section {
     padding: 80px 5%;
     max-width: 1400px;
     margin: 0 auto;
 }

 .section-title {
     text-align: center;
     font-size: 2.5rem;
     margin-bottom: 1rem;
     color: #1e40af;
     position: relative;
     z-index: 1;
 }

 .section-subtitle {
     text-align: center;
     font-size: 1.2rem;
     color: #666;
     margin-bottom: 4rem;
     max-width: 700px;
     margin-left: auto;
     margin-right: auto;
     position: relative;
     z-index: 1;
 }

 /* About Section */
 .about-content {
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 4rem;
     align-items: center;
 }

 @media (max-width: 1024px) {
     .about-content {
         grid-template-columns: 1fr;
     }

     .about-image {
         text-align: center;
     }

     .about-image img {
         max-width: 100% !important;
         width: 100% !important;
         height: auto !important;
     }
 }

 .about-text h3 {
     font-size: 2rem;
     color: #2563eb;
     margin-bottom: 1.5rem;
 }

 .about-text p {
     font-size: 1.1rem;
     margin-bottom: 1.5rem;
     color: #555;
 }

 .about-features {
     display: grid;
     grid-template-columns: repeat(2, 1fr);
     gap: 1.5rem;
     margin-top: 2rem;
 }

 @media (max-width: 768px) {
     .about-features {
         grid-template-columns: 1fr;
     }
 }

 .feature-item {
     display: flex;
     align-items: start;
     gap: 1rem;
 }

 .feature-item i {
     color: #f97316;
     font-size: 1.5rem;
     margin-top: 0.2rem;
 }

 .feature-item div h4 {
     color: #2563eb;
     margin-bottom: 0.5rem;
 }

 /* Modules Section */
 .modules {
     background: #f8fafc;
 }

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

 .module-card {
     background: white;
     padding: 2rem;
     border-radius: 15px;
     box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
     transition: all 0.3s ease;
     text-align: center;
 }

 .module-card:hover {
     transform: translateY(-10px);
     box-shadow: 0 8px 30px rgba(37, 99, 235, 0.15);
 }

 .module-card i {
     font-size: 3rem;
     color: #2563eb;
     margin-bottom: 1.5rem;
 }

 .module-card h3 {
     font-size: 1.4rem;
     margin-bottom: 1rem;
     color: #1e40af;
 }

 .module-card p {
     color: #666;
     line-height: 1.6;
 }

 /* Electronic Billing Section */
 .billing {
     background: linear-gradient(135deg, #1e40af 0%, #2563eb 100%);
     color: white;
 }

 .billing-content {
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 4rem;
     align-items: center;
 }

 @media (max-width: 1024px) {
     .billing-content {
         grid-template-columns: 1fr;
     }
 }

 .billing-text h2 {
     color: white;
     margin-bottom: 1.5rem;
 }

 .billing-text p {
     font-size: 1.1rem;
     margin-bottom: 1rem;
     opacity: 0.95;
 }

 .billing-features {
     margin-top: 2rem;
 }

 .billing-feature {
     display: flex;
     align-items: center;
     gap: 1rem;
     margin-bottom: 1.5rem;
 }

 .billing-feature i {
     font-size: 1.5rem;
     color: #f97316;
 }

 .billing-image {
     text-align: center;
 }

 .billing-image i {
     font-size: 15rem;
     opacity: 0.2;
 }

 /* Sectors Section */
 .sectors-grid {
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
     gap: 2rem;
 }

 .sector-card {
     background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
     padding: 2rem;
     border-radius: 15px;
     text-align: center;
     transition: all 0.3s ease;
     border: 2px solid transparent;
 }

 .sector-card:hover {
     border-color: #2563eb;
     transform: scale(1.05);
 }

 .sector-card i {
     font-size: 3rem;
     color: #2563eb;
     margin-bottom: 1rem;
 }

 .sector-card h3 {
     color: #1e40af;
     font-size: 1.2rem;
 }

 /* Contact Section */
 .contact {
     background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
 }

 .contact-content {
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 4rem;
 }

 @media (max-width: 1024px) {
     .contact-content {
         grid-template-columns: 1fr;
     }
 }

 .contact-info h3 {
     color: #1e40af;
     font-size: 2rem;
     margin-bottom: 2rem;
 }

 .contact-item {
     display: flex;
     align-items: start;
     gap: 1.5rem;
     margin-bottom: 2rem;
 }

 .contact-item i {
     font-size: 1.5rem;
     color: #2563eb;
     margin-top: 0.3rem;
 }

 .contact-item div h4 {
     color: #1e40af;
     margin-bottom: 0.5rem;
 }

 .contact-item div p {
     color: #666;
 }

 .whatsapp-btn {
     background: #25d366;
     color: white;
     padding: 1.2rem 2.5rem;
     border-radius: 50px;
     text-decoration: none;
     display: inline-flex;
     align-items: center;
     gap: 0.8rem;
     font-weight: 600;
     font-size: 1.1rem;
     margin-top: 2rem;
     transition: all 0.3s ease;
     box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
 }

 .whatsapp-btn:hover {
     background: #20ba5a;
     transform: translateY(-2px);
     box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
 }

 .contact-form {
     background: white;
     padding: 2.5rem;
     border-radius: 15px;
     box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
 }

 .form-group {
     margin-bottom: 1.5rem;
 }

 .form-group label {
     display: block;
     margin-bottom: 0.5rem;
     color: #1e40af;
     font-weight: 500;
 }

 .form-group input,
 .form-group textarea {
     width: 100%;
     padding: 0.8rem;
     border: 2px solid #e0f2fe;
     border-radius: 8px;
     font-family: 'Poppins', sans-serif;
     transition: border-color 0.3s;
 }

 .form-group input:focus,
 .form-group textarea:focus {
     outline: none;
     border-color: #2563eb;
 }

 .form-group textarea {
     resize: vertical;
     min-height: 120px;
 }

 /* Footer */
 footer {
     background: #1e293b;
     color: white;
     padding: 3rem 5%;
 }

 .footer-content {
     max-width: 1400px;
     margin: 0 auto;
     display: grid;
     grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
     gap: 3rem;
 }

 .footer-section h3 {
     margin-bottom: 1.5rem;
     color: #f97316;
 }

 .footer-section p,
 .footer-section a {
     color: #cbd5e1;
     text-decoration: none;
     display: block;
     margin-bottom: 0.8rem;
     transition: color 0.3s;
 }

 .footer-section a:hover {
     color: #2563eb;
 }

 .social-links {
     display: flex;
     gap: 1rem;
     margin-top: 1rem;
 }

 .social-links a {
     width: 40px;
     height: 40px;
     background: #334155;
     border-radius: 50%;
     display: flex;
     align-items: center;
     justify-content: center;
     transition: all 0.3s ease;
 }

 .social-links a:hover {
     background: #2563eb;
     transform: translateY(-3px);
 }

 .footer-bottom {
     text-align: center;
     margin-top: 3rem;
     padding-top: 2rem;
     border-top: 1px solid #334155;
     color: #94a3b8;
 }

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

                 to {
                     opacity: 1;
                     transform: translateY(0);
                 }
                 }

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Remove max-width constraints on mobile */
    .section,
    nav {
        max-width: 100%;
        padding-left: 5%;
        padding-right: 5%;
        overflow-x: hidden;
    }

    /* Prevent horizontal overflow */
    .about-content,
    .about-text,
    .about-image {
        max-width: 100%;
        overflow-x: hidden;
    }

    /* Ensure text wraps properly */
    .about-text h3,
    .about-text p {
        word-wrap: break-word;
        overflow-wrap: break-word;
        max-width: 100%;
    }

    /* Navigation */
    .menu-toggle {
        display: block;
        cursor: pointer;
        transition: transform 0.3s ease;
    }

    .menu-toggle:active {
        transform: scale(0.95);
    }

    .menu-toggle i {
        transition: transform 0.3s ease;
    }

    .menu-toggle.active i {
        transform: rotate(90deg);
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 0 2rem;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                    opacity 0.3s ease,
                    padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .nav-links.active {
        max-height: 80vh;
        opacity: 1;
        padding: 2rem;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .nav-links li {
        opacity: 0;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }

    .nav-links.active li:nth-child(1) { transition-delay: 0.05s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.15s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.25s; }
    .nav-links.active li:nth-child(6) { transition-delay: 0.3s; }
    .nav-links.active li:nth-child(7) { transition-delay: 0.35s; }

    /* Hero section - full width */
    .hero {
        padding: 6rem 5% 4rem;
    }

    /* Hero and main sections */
    .hero-content,
    .about-content,
    .contact-content {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    /* Billing section - invertir orden en móvil */
    .billing-content {
        grid-template-columns: 1fr !important;
        gap: 2rem;
    }

    .billing-text {
        order: 2;
    }

    .billing-image {
        order: 1;
        text-align: center;
    }

    .billing-image img {
        max-width: 100%;
        height: auto;
    }

    /* About section images */
    .about-image {
        text-align: center;
        width: 100%;
        overflow: hidden;
    }

    .about-image img {
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
    }

    /* Typography */
    .hero-text h1 {
        font-size: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    /* Other sections */
    .about-features {
        grid-template-columns: 1fr;
    }

    .modules-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .sectors-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .module-card {
        padding: 2rem 1.5rem;
    }

    .sector-card {
        padding: 1.5rem;
    }

    /* Contact section */
    .contact-form {
        padding: 2rem 1.5rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 1rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
}

/* Mobile phones (480px and down) */
@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.75rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .modules-grid,
    .sectors-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .module-card i,
    .sector-card i {
        font-size: 2.5rem;
    }

    .module-card h3,
    .sector-card h3 {
        font-size: 1.2rem;
    }

    .billing-text h2 {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
}