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

:root {
    --primary-color: #FF0000;
    --secondary-color: #1a1a1a;
    --accent-color: #0066cc;
    --light-bg: #f8f9fa;
    --text-dark: #333;
    --text-light: #666;
    --border-color: #e0e0e0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* HEADER / NAVBAR */
header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2d2d2d 100%);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.logo-container img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.logo-text {
    display: flex;
    gap: 0.3rem;
}

.logo-text .code {
    color: white;
}

.logo-text .tera {
    color: white;
}

.logo-text .lab {
    color: var(--primary-color);
    font-weight: bold;
}

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

nav a {
    color: white;
    text-decoration: none;
    transition: color 0.3s, text-shadow 0.3s;
    font-weight: 500;
}

nav a:hover {
    color: var(--primary-color);
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

/* MOBILE MENU BUTTON */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 0.4rem;
    background: none;
    border: none;
    padding: 0.5rem;
    z-index: 1001;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* MOBILE NAV MENU */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu.active {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2d2d2d 100%);
    width: 100%;
    padding: 1rem 0;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    animation: slideDown 0.3s ease-out;
    z-index: 999;
}

.nav-menu.active li {
    list-style: none;
}

.nav-menu.active a {
    display: block;
    padding: 1rem 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-menu.active a:hover {
    background: rgba(255, 0, 0, 0.1);
}

/* HERO SECTION */
.hero {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 50%, #1a1a1a 100%);
    color: white;
    padding: 100px 2rem;
    text-align: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 0, 0, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0, 102, 204, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1rem;
    line-height: 1.1;
    animation: slideInDown 0.8s ease-out;
}

.hero h1 .highlight {
    color: var(--primary-color);
    text-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: #ddd;
    animation: slideInUp 0.8s ease-out 0.2s both;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    animation: slideInUp 0.8s ease-out 0.4s both;
}

.btn {
    padding: 15px 40px;
    font-size: 1.1rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff3333 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.5);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* ABOUT SECTION */
.about {
    padding: 80px 2rem;
    max-width: 1200px;
    margin: 0 auto;
    background: var(--light-bg);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

.section-title .highlight {
    color: var(--primary-color);
}

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

.about-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.about-text p {
    margin-bottom: 1rem;
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.05rem;
}

.features-list {
    list-style: none;
    margin: 2rem 0;
}

.features-list li {
    padding: 0.8rem 0;
    padding-left: 2rem;
    position: relative;
    color: var(--text-light);
    font-weight: 500;
}

.features-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: bold;
}

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

.stat {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.stat-text {
    color: var(--text-light);
    font-size: 1rem;
}

/* SERVICES SECTION */
.services {
    padding: 80px 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

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

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border-top: 4px solid var(--primary-color);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.service-card p {
    color: var(--text-light);
    line-height: 1.8;
}

/* PROJECTS SECTION */
.projects {
    padding: 80px 2rem;
    background: var(--light-bg);
    max-width: 1200px;
    margin: 0 auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.project-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.project-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 0, 0, 0.2);
}

.project-header {
    background: linear-gradient(135deg, #f0f0f0 0%, #e8e8e8 100%);
    padding: 2rem;
    text-align: center;
    border-bottom: 2px solid var(--border-color);
}

.project-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.project-header h3 {
    font-size: 1.5rem;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.project-type {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 0.9rem;
}

.project-body {
    padding: 1.5rem;
}

.project-body p {
    color: var(--text-light);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tech-tag {
    background: var(--light-bg);
    color: var(--primary-color);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    border: 1px solid var(--primary-color);
}

/* TECHNOLOGIES SECTION */
.technologies {
    padding: 80px 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.tech-item {
    text-align: center;
    padding: 2rem;
    background: var(--light-bg);
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.tech-item:hover {
    border-color: var(--primary-color);
    transform: scale(1.05);
    background: white;
}

.tech-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.tech-item p {
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
}

/* CTA SECTION */
.cta-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #ff3333 100%);
    color: white;
    padding: 80px 2rem;
    text-align: center;
    margin-top: 80px;
}

.cta-section h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-section p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

/* FOOTER */
footer {
    background: var(--secondary-color);
    color: white;
    padding: 3rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
    text-align: left;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ddd;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #444;
    padding-top: 2rem;
    text-align: center;
    color: #999;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin: 1rem 0;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s;
}

.social-links a:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.3);
}

/* ANIMATIONS */
@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* RESPONSIVE */
@media (max-width: 768px) {
    nav {
        padding: 0 1rem;
        position: relative;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none !important;
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        flex-direction: column;
        gap: 0;
        background: linear-gradient(135deg, var(--secondary-color) 0%, #2d2d2d 100%);
        width: 100%;
        padding: 1rem 0;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
        z-index: 999;
    }

    .nav-menu.active {
        display: flex !important;
        animation: slideDown 0.3s ease-out;
    }

    .nav-menu li {
        list-style: none;
    }

    .nav-menu a {
        display: block;
        padding: 1rem 2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu a:hover {
        background: rgba(255, 0, 0, 0.1);
        color: var(--primary-color);
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn {
        width: 100%;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr;
    }

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

    .tech-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    nav {
        flex-direction: row;
        justify-content: space-between;
        padding: 0 1rem;
    }

    .menu-toggle {
        display: flex;
    }

    .nav-menu {
        display: none !important;
    }

    .nav-menu.active {
        display: flex !important;
    }

    .logo-container {
        gap: 0.5rem;
        font-size: 1.2rem;
    }

    .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero {
        padding: 50px 1rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

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

/* SCROLL ANIMATIONS */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* HOVER GLOW EFFECT */
.glow-on-hover {
    position: relative;
    transition: all 0.3s ease;
}

.glow-on-hover:hover {
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

/* ===== PRESOLICITUD PAGE ===== */
.form-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 70px 2rem 90px;
    background: var(--light-bg);
}

.form-section .section-title {
    margin-bottom: 1rem;
}

.form-intro {
    max-width: 760px;
    margin: 0 auto 2.2rem;
    text-align: center;
    color: var(--text-light);
    font-size: 1.06rem;
    line-height: 1.8;
}

.form-container {
    max-width: 980px;
    margin: 0 auto;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    box-shadow: 0 18px 45px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.form-header {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #2d2d2d 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.form-header h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.form-header p {
    color: #ddd;
    font-size: 1rem;
}

#presolicitudForm {
    padding: 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem 1.4rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1px solid #d8d8d8;
    border-radius: 12px;
    padding: 0.9rem 1rem;
    font-size: 1rem;
    background: #fff;
    color: var(--text-dark);
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.15s ease;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9b9b9b;
}

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

.form-group input:hover,
.form-group select:hover,
.form-group textarea:hover {
    border-color: #b8b8b8;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(255, 0, 0, 0.12);
    transform: translateY(-1px);
}

.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.7rem;
    background: #fafafa;
    border: 1px solid #ececec;
    border-radius: 12px;
    padding: 0.9rem 1rem;
}

.checkbox-group input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.checkbox-group label {
    margin: 0;
    font-weight: 500;
    color: var(--text-light);
    line-height: 1.5;
    cursor: pointer;
}

#presolicitudForm button[type="submit"] {
    grid-column: 1 / -1;
    justify-self: center;
    min-width: 260px;
    margin-top: 0.5rem;
}

.form-trust {
    max-width: 980px;
    margin: 1.2rem auto 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
}

.form-trust .trust-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 0.9rem;
    text-align: center;
    color: var(--text-light);
    font-size: 0.92rem;
}

/* Responsive */
@media (max-width: 900px) {
    #presolicitudForm {
        grid-template-columns: 1fr;
        padding: 1.4rem;
    }

    .form-header {
        padding: 1.5rem 1.2rem;
    }

    .form-header h3 {
        font-size: 1.25rem;
    }

    .form-trust {
        grid-template-columns: 1fr;
    }

    #presolicitudForm button[type="submit"] {
        width: 100%;
        min-width: 0;
    }
}
