/* Color Palette & Variables */
:root {
    --corp-green: #52824F;
    --highlight-green: #7CC68D;
    --dark-green: #3D663B;
    --bg-white: #FFFFFF;
    --text-dark: #333333;
    --text-gray: #666666;
    --light-gray: #F5F7F5;
    --border-gray: #DBDBDB;
    --footer-bg: #222222;
    --glass-bg: rgba(255, 255, 255, 0.9);
    --transition: all 0.3s ease-in-out;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: var(--light-gray);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background: var(--corp-green);
    color: var(--bg-white);
}

.btn-primary:hover {
    background: var(--highlight-green);
    box-shadow: 0 4px 15px rgba(124, 198, 141, 0.5);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--bg-white);
    border-color: var(--bg-white);
}

.btn-outline:hover {
    background: var(--bg-white);
    color: var(--corp-green);
    transform: translateY(-2px);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Header & Navbar */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: var(--transition);
    padding: 20px 0;
}

header.scrolled {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 15px 0;
}

header.scrolled .logo-memory {
    color: var(--corp-green);
}

header.scrolled .logo-sistemas {
    color: var(--text-dark);
}

header.scrolled .nav-links a {
    color: var(--text-dark);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-memory {
    color: var(--bg-white);
    transition: var(--transition);
}

.logo-sistemas {
    color: var(--highlight-green);
    font-weight: 300;
    transition: var(--transition);
}

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

.nav-links a {
    color: var(--bg-white);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
}

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

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

.menu-toggle {
    display: none;
    color: var(--bg-white);
    font-size: 1.5rem;
    cursor: pointer;
}

header.scrolled .menu-toggle {
    color: var(--corp-green);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    color: var(--bg-white);
    overflow: hidden;
}

.video-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.animated-bg {
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    animation: slowZoom 25s ease-in-out infinite alternate;
}

@keyframes slowZoom {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(34, 34, 34, 0.9) 0%, rgba(82, 130, 79, 0.6) 100%);
}

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

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, #ffffff, var(--highlight-green));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    font-weight: 300;
}

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

/* Section Common */
section {
    padding: 100px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.section-title .line {
    width: 80px;
    height: 4px;
    background: var(--corp-green);
    margin: 0 auto;
    border-radius: 2px;
}

/* Services */
.services {
    background: var(--bg-white);
}

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

.card {
    background: var(--bg-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
    border: 1px solid var(--border-gray);
    position: relative;
    top: 0;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(82, 130, 79, 0.15);
    border-color: var(--highlight-green);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover img {
    transform: scale(1.05);
}

.card-content {
    padding: 30px;
    position: relative;
    background: var(--bg-white);
    z-index: 2;
}

.card-icon {
    font-size: 2rem;
    color: var(--highlight-green);
    margin-bottom: 15px;
}

.card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--corp-green);
}

.card p {
    color: var(--text-gray);
}

/* About */
.about {
    background: var(--light-gray);
}

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

.about-text h2 {
    font-size: 2.5rem;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.about-text h3 {
    font-size: 1.5rem;
    color: var(--highlight-green);
    margin-bottom: 25px;
    font-weight: 300;
}

.about-text p {
    color: var(--text-gray);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.stats {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--corp-green);
}

.stat-label {
    color: var(--text-gray);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

.about-image {
    position: relative;
}

.image-wrapper {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.image-wrapper img {
    width: 100%;
    display: block;
    height: auto;
}

.glow-effect {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(124, 198, 141, 0.2) 0%, transparent 60%);
    z-index: -1;
    animation: rotate 10s linear infinite;
}

@keyframes rotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Contact */
.contact {
    background: var(--bg-white);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--corp-green);
    background: var(--light-gray);
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.info-item h4 {
    color: var(--text-dark);
    margin-bottom: 5px;
    font-size: 1.1rem;
}

.info-item p {
    color: var(--text-gray);
}

.whatsapp-icon-info {
    color: #25D366 !important;
    background: rgba(37, 211, 102, 0.1) !important;
}

.whatsapp-link {
    color: #25D366;
    font-weight: 600;
}

.whatsapp-link:hover {
    text-decoration: underline;
}

.contact-form {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
}

.form-group {
    margin-bottom: 20px;
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-gray);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--light-gray);
}

.form-group input:focus, 
.form-group textarea:focus {
    outline: none;
    border-color: var(--highlight-green);
    background: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(124, 198, 141, 0.2);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-group input {
    width: auto;
    margin-top: 5px;
}

.checkbox-group label {
    font-size: 0.9rem;
    color: var(--text-gray);
}

/* Footer */
footer {
    background: var(--footer-bg);
    color: var(--bg-white);
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 800;
}

footer p {
    color: var(--text-gray);
    font-size: 0.9rem;
}

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

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4);
}

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

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

.fade-in {
    opacity: 0;
    transition: opacity 1s ease-out;
}

.fade-in.active {
    opacity: 1;
}

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

/* Responsive adjustments */
@media (max-width: 900px) {
    section { padding: 60px 0; }
    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .hero-content h1 {
        font-size: 2.8rem;
    }
    .section-title h2 {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    section { padding: 50px 0; }
    .hero-content h1 {
        font-size: 2.2rem;
    }
    .hero-content p {
        font-size: 1.1rem;
    }
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--glass-bg);
        backdrop-filter: blur(10px);
        flex-direction: column;
        gap: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-out;
    }
    .nav-links.active {
        max-height: 300px;
    }
    .nav-links a {
        padding: 15px 20px;
        color: var(--text-dark);
        border-bottom: 1px solid rgba(0,0,0,0.05);
        display: block; /* ensure huge click target area */
    }
    .nav-links a:hover {
        background: rgba(82, 130, 79, 0.1);
    }
    .menu-toggle {
        display: block;
    }
    header.scrolled {
        background: var(--bg-white);
    }
    header .logo-memory {
        color: var(--text-dark); 
    }
    header.menu-open {
        background: var(--bg-white);
    }
    header.menu-open .logo-memory {
        color: var(--corp-green);
    }
    header.menu-open .menu-toggle {
        color: var(--corp-green);
    }
}

@media (max-width: 480px) {
    section { padding: 40px 0; }
    .hero-content h1 { font-size: 1.8rem; }
    .hero-buttons { 
        flex-direction: column; 
        gap: 15px; 
    }
    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }
    .stats {
        flex-direction: column;
        gap: 20px;
    }
    .stat-number { font-size: 2rem; }
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 25px;
        bottom: 20px;
        right: 20px;
    }
}
