* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --teal-dark: #0f3f3e;
    --teal-medium: #1a7a78;
    --teal-light: #2eb8b5;
    --cyan-bright: #4ffffc;
    --bg-dark: #0a1a1a;
    --bg-medium: #0f2424;
    --bg-light: #143d3c;
    --text-white: #ffffff;
    --text-light: rgba(255, 255, 255, 0.9);
    --text-muted: rgba(78, 255, 252, 0.7);
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-medium) 50%, var(--bg-light) 100%);
    background-attachment: fixed;
    color: var(--text-white);
    line-height: 1.6;
    opacity: 0;
    transition: opacity 0.5s ease;
    min-height: 100vh;
    overflow-x: hidden;
}

body.loaded {
    opacity: 1;
}

/* Engranajes de fondo */
.gears-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
    opacity: 0.25;
}

.gear {
    position: absolute;
    opacity: 0.9;
}

.gear img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes rotateReverse {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

/* Animaciones fade */
.fade-section {
    opacity: 0;
    transform: translateY(80px) scale(0.9);
    transition: opacity 0.8s cubic-bezier(0.34, 1.56, 0.64, 1),
        transform 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.fade-section.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.card-animate {
    opacity: 0;
    transform: translateY(60px) scale(0.85) rotateX(-15deg);
    transition: opacity 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        transform 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.card-animate.card-visible {
    opacity: 1;
    transform: translateY(0) scale(1) rotateX(0);
}

/* Header */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.75rem 0;
    background: linear-gradient(135deg, rgba(15, 63, 62, 0.95), rgba(26, 122, 120, 0.95));
    border-bottom: 2px solid rgba(78, 255, 252, 0.3);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

header.scrolled {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo-container img {
    height: 46px;
    object-fit: contain;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: color 0.25s ease;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--cyan-bright);
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    height: 2px;
    width: 0;
    background: var(--cyan-bright);
    transition: width 0.25s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Hero */
section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 1.5rem;
    position: relative;
    z-index: 1;
}

.hero {
    padding: 4rem 1.5rem 3rem;
    position: relative;
    z-index: 1;
    transition: opacity 0.3s ease;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: center;
}

.hero-text {
    text-align: center;
}

.hero h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--teal-light), var(--cyan-bright));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero p {
    max-width: 780px;
    margin: 0 auto 1.75rem;
    color: var(--text-light);
    font-size: 1rem;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.cta-container {
    animation: fadeInUp 0.8s ease 0.6s both;
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-logo img {
    max-width: 100%;
    width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
}

/* Orden en mobile: logo primero */
.hero-logo {
    order: -1;
}

.hero-text {
    order: 1;
}

/* Responsive breakpoints para el hero */
@media (min-width: 600px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .hero-logo img {
        max-height: 300px;
    }
}

@media (min-width: 900px) {
    .hero {
        padding: 6rem 1.5rem 5rem;
    }
    
    .hero-content {
        grid-template-columns: 1.1fr 0.9fr;
        gap: 3rem;
    }
    
    /* Restaurar orden normal en desktop */
    .hero-logo {
        order: 2;
    }
    
    .hero-text {
        order: 1;
        text-align: left;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero p {
        margin-left: 0;
        margin-right: 0;
        font-size: 1.15rem;
    }
    
    .cta-container {
        justify-content: flex-start;
    }
    
    .hero-logo img {
        max-height: 350px;
    }
}

@media (min-width: 1200px) {
    .hero-logo img {
        max-height: 400px;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cta-button {
    display: inline-block;
    padding: 0.9rem 2rem;
    border-radius: 999px;
    color: var(--text-white);
    text-decoration: none;
    font-weight: 700;
    background: linear-gradient(135deg, var(--teal-medium), var(--teal-light));
    box-shadow: 0 8px 28px rgba(46, 184, 181, 0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    border: 2px solid rgba(78, 255, 252, 0.3);
}

.cta-button:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, var(--teal-light), var(--cyan-bright));
    box-shadow: 0 12px 32px rgba(78, 255, 252, 0.5);
}

.cta-secondary {
    background: rgba(46, 184, 181, 0.2);
    border: 2px solid var(--teal-light);
}

.cta-secondary:hover {
    background: rgba(46, 184, 181, 0.4);
}

h2 {
    text-align: center;
    margin-bottom: 3.5rem;
    font-size: 2.25rem;
    background: linear-gradient(135deg, var(--teal-light), var(--cyan-bright));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-lead {
    max-width: 780px;
    margin: 0 auto 3rem;
    color: var(--text-muted);
    font-size: 1.1rem;
    text-align: center;
}

/* Cards */
.cards-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.card {
    background: rgba(15, 36, 36, 0.8);
    border: 2px solid rgba(46, 184, 181, 0.3);
    border-radius: 15px;
    padding: 1.5rem;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: blur(15px);
}

.card:hover {
    transform: translateY(-4px);
    border-color: var(--teal-light);
    box-shadow: 0 20px 40px rgba(46, 184, 181, 0.4);
}

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--teal-medium), var(--teal-light));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-white);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.card h3 {
    color: var(--cyan-bright);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Process */
.process-steps {
    display: grid;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.process-step {
    display: grid;
    grid-template-columns: 80px 1fr;
    gap: 1.5rem;
    align-items: center;
}

.step-number {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--teal-medium), var(--teal-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-white);
    box-shadow: 0 10px 30px rgba(46, 184, 181, 0.4);
}

.step-content {
    background: rgba(15, 36, 36, 0.8);
    border: 2px solid rgba(46, 184, 181, 0.3);
    border-radius: 12px;
    padding: 1.5rem;
    backdrop-filter: blur(15px);
}

.step-content h3 {
    color: var(--cyan-bright);
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.step-content p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Contact */
#contacto {
    margin-top: 3rem;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    justify-content: center;
    margin: -0.5rem 0 1.25rem;
}

.btn {
    display: inline-block;
    padding: 0.85rem 1rem;
    font-weight: 800;
    text-decoration: none;
    color: var(--text-white);
    background: linear-gradient(135deg, var(--teal-medium), var(--teal-light));
    border: 2px solid rgba(78, 255, 252, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    border-radius: 10px;
}

.btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, var(--teal-light), var(--cyan-bright));
    box-shadow: 0 12px 26px rgba(78, 255, 252, 0.4);
}

.btn-contact {
    min-width: 160px;
    text-align: center;
}

.btn-whatsapp {
    background: #25d366;
    border-color: #25d366;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-whatsapp:hover {
    background: #20ba5a;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
}

.contact-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(12, 1fr);
}

.contact-card {
    grid-column: span 12;
}

@media (min-width: 600px) {
    .contact-card:nth-child(1) {
        grid-column: span 6;
    }
    .contact-card:nth-child(2) {
        grid-column: span 6;
    }
    .contact-card:nth-child(3) {
        grid-column: span 12;
    }
}

@media (min-width: 900px) {
    .contact-card:nth-child(1) {
        grid-column: span 4;
    }
    .contact-card:nth-child(2) {
        grid-column: span 5;
    }
    .contact-card:nth-child(3) {
        grid-column: span 3;
    }
}

.contact-list {
    list-style: none;
    display: grid;
    gap: 0.5rem;
    margin: 0.5rem 0 1rem;
}

.contact-list a {
    color: var(--text-muted);
    text-decoration: none;
}

.contact-list a:hover {
    color: var(--cyan-bright);
}

.mini-copy {
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.9rem;
}

.form-row label {
    color: var(--text-light);
    font-size: 0.95rem;
    font-weight: 500;
}

.form-row input,
.form-row textarea {
    background: rgba(15, 36, 36, 0.8);
    color: var(--text-white);
    border: 2px solid rgba(46, 184, 181, 0.3);
    border-radius: 10px;
    padding: 0.8rem 0.9rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    resize: none;
}

.form-row input:focus,
.form-row textarea:focus {
    border-color: var(--teal-light);
    box-shadow: 0 0 0 3px rgba(46, 184, 181, 0.2);
}

.error {
    color: #ff6b6b;
    font-size: 0.85rem;
    min-height: 1.1em;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.25rem;
    flex-wrap: wrap;
}

.form-note {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.map-card .map-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
    border-radius: 10px;
    border: 1px solid rgba(46, 184, 181, 0.4);
}

.map-card iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--bg-dark), var(--bg-medium));
    border-top: 2px solid rgba(46, 184, 181, 0.3);
    margin-top: 6rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2.25rem 1.5rem;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.footer-section h3 {
    color: var(--cyan-bright);
    margin-bottom: 0.5rem;
}

.footer-section p,
.footer-section a {
    color: var(--text-muted);
    text-decoration: none;
    display: block;
    margin: 0.25rem 0;
}

.footer-section a:hover {
    color: var(--cyan-bright);
}

.footer-bottom {
    color: var(--text-muted);
    text-align: center;
    padding: 1rem;
    border-top: 1px solid rgba(46, 184, 181, 0.2);
}

/* Responsive */
@media (max-width: 900px) {
    h2 {
        font-size: 2rem;
    }

    nav {
        justify-content: center;
    }

    .nav-links {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    section {
        padding: 4rem 1.5rem;
    }
    
    h2 {
        font-size: 1.75rem;
        margin-bottom: 2.5rem;
    }
    
    .section-lead {
        font-size: 1rem;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
    }
    
    .process-step {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .step-number {
        margin: 0 auto;
    }
    
    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 700px) {
    nav {
        flex-direction: column;
        text-align: center;
    }

    .logo-container {
        margin-bottom: 0.5rem;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    section {
        padding: 4rem 1rem;
    }

    .hero {
        padding: 3rem 1rem 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-content {
        gap: 1.5rem;
    }

    #contacto {
        margin-top: 1.5rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-logo img {
        max-height: 300px;
    }
    
    .hero h1 {
        font-size: 1.75rem;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 400px) {
    .hero h1 {
        font-size: 1.75rem;
    }

    .btn {
        padding: 0.75rem 0.85rem;
        font-size: 0.9rem;
    }
}

.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--cyan-bright);
    border-radius: 50%;
    opacity: 0;
    box-shadow: 0 0 10px rgba(78, 255, 252, 0.8);
    animation: floatParticle linear infinite;
}

@keyframes floatParticle {
    0% {
        opacity: 0;
        transform: translateY(0) translateX(0) scale(0);
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        opacity: 0;
        transform: translateY(-100vh) translateX(var(--drift)) scale(1);
    }
}