/* =========================================
   CODEIA SOLUTIONS - ESTILOS PRINCIPALES
   ========================================= */

/* Variables CSS */
:root {
    --primary-green: #7CB342;
    --dark-green: #2E4339;
    --light-green: #A5D26A;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --dark-gray: #333333;
    --text-color: #2c3e50;
    --gradient: linear-gradient(135deg, #7CB342 0%, #2E4339 100%);
    --gradient-hover: linear-gradient(135deg, #8BC34A 0%, #1B5E20 100%);
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-hover: 0 20px 40px rgba(0,0,0,0.15);
    --border-radius: 15px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

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

/* Utilidades */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

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

/* Progress Bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--gradient);
    z-index: 9999;
    transition: width 0.3s ease;
    width: 0%;
}

/* =========================================
   NAVIGATION
   ========================================= */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--dark-green);
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon {
    width: 80px;
    height: 60px;
    background: var(--gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    position: relative;
    overflow: hidden;
}

.logo-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transform: rotate(45deg);
    transition: var(--transition);
}

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

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: var(--gradient);
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: var(--primary-green);
}

.mobile-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.mobile-menu span {
    width: 25px;
    height: 3px;
    background: var(--dark-green);
    margin: 3px 0;
    transition: 0.3s;
}

/* =========================================
   HERO SECTION
   ========================================= */

.hero {
    min-height: 100vh;
    background: var(--gradient);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="3" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="60" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="90" cy="80" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="10" cy="90" r="3" fill="rgba(255,255,255,0.1)"/></svg>');
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text {
    color: white;
    z-index: 2;
    position: relative;
}

.hero-text h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    animation: slideInLeft 1s ease-out;
}

.hero-text .highlight {
    background: linear-gradient(120deg, #A5D26A, #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: slideInLeft 1s ease-out 0.2s both;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    animation: slideInLeft 1s ease-out 0.4s both;
}

.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

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

.btn-secondary:hover {
    background: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.code-animation {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: slideInRight 1s ease-out;
}

.code-lines {
    font-family: 'Courier New', monospace;
    color: #A5D26A;
    font-size: 0.9rem;
    line-height: 1.8;
}

.code-keyword { color: #ffffff; font-weight: bold; }
.code-string { color: #FFE082; }
.code-comment { color: #B0BEC5; opacity: 0.7; }

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

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

/* =========================================
   SECTIONS
   ========================================= */

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--dark-green);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.2rem;
    color: var(--text-color);
    max-width: 600px;
    margin: 0 auto;
}

/* =========================================
   SERVICES SECTION
   ========================================= */

.services {
    padding: 5rem 0;
    background: var(--light-gray);
}

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

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(124, 179, 66, 0.1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient);
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--gradient);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
    font-size: 1.8rem;
}

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

.service-card p {
    color: var(--text-color);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.service-features li i {
    color: var(--primary-green);
}

/* =========================================
   ABOUT SECTION
   ========================================= */

.about {
    padding: 5rem 0;
    background: white;
}

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

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

.about-text p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

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

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--light-gray);
    border-radius: var(--border-radius);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-green);
    display: block;
}

.stat-label {
    color: var(--text-color);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.about-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tech-stack {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    max-width: 300px;
}

.tech-item {
    background: var(--gradient);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.tech-item:hover {
    transform: scale(1.05);
}

/* =========================================
   PORTFOLIO SECTION
   ========================================= */

.portfolio {
    padding: 5rem 0;
    background: var(--light-gray);
}

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

.portfolio-item {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.portfolio-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.portfolio-image {
    height: 200px;
    background: var(--gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 3rem;
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-content h3 {
    color: var(--dark-green);
    margin-bottom: 0.5rem;
}

.portfolio-content p {
    color: var(--text-color);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* =========================================
   CERTIFICATIONS SECTION
   ========================================= */

.certifications {
    padding: 3rem 0;
    background: white;
    border-top: 1px solid #eee;
}

.cert-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    align-items: center;
    text-align: center;
}

.cert-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.cert-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.cert-item h4 {
    color: var(--dark-green);
    margin: 0;
    font-size: 1rem;
}

.cert-item p {
    color: var(--text-color);
    margin: 0;
    font-size: 0.9rem;
}

/* =========================================
   CONTACT SECTION
   ========================================= */

.contact {
    padding: 5rem 0;
    background: var(--dark-green);
    color: white;
}

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

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.contact-details {
    list-style: none;
}

.contact-details li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.contact-details i {
    color: var(--light-green);
    font-size: 1.2rem;
}

.contact-form {
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--light-green);
    background: rgba(255, 255, 255, 0.2);
}

.form-group select {
    cursor: pointer;
}

.form-group select option {
    background: var(--dark-green);
    color: white;
}

/* =========================================
   FOOTER
   ========================================= */

.footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem 0 1rem;
}

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

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

.footer-section p,
.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    line-height: 1.6;
}

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

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

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

.social-links a:hover {
    background: var(--light-green);
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

/* =========================================
   FLOATING BUTTONS & CHAT
   ========================================= */

/* Floating Action Buttons */
.floating-buttons {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.floating-buttons-left {
    position: fixed;
    left: 20px;
    bottom: 20px;
    z-index: 1000;
}

.floating-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
    animation: pulse 2s infinite;
}

.floating-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.3s ease;
}

.floating-btn:hover::before {
    transform: scale(1.2);
}

.floating-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0,0,0,0.4);
}

.whatsapp-btn {
    background: linear-gradient(135deg, #25D366, #128C7E);
}

.chatbot-btn {
    background: var(--gradient);
}

.floating-btn i {
    position: relative;
    z-index: 2;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(0,0,0,0.3), 0 0 0 10px rgba(124, 179, 66, 0.2);
    }
    100% {
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    }
}

/* Tooltip for floating buttons */
.floating-btn-tooltip {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.floating-buttons .floating-btn-tooltip {
    right: 70px;
}

.floating-buttons-left .floating-btn-tooltip {
    left: 70px;
}

.floating-btn-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
}

.floating-buttons .floating-btn-tooltip::after {
    left: 100%;
    border-left-color: rgba(0,0,0,0.8);
}

.floating-buttons-left .floating-btn-tooltip::after {
    right: 100%;
    border-right-color: rgba(0,0,0,0.8);
}

.floating-btn:hover .floating-btn-tooltip {
    opacity: 1;
}

/* =========================================
   CHAT WIDGET
   ========================================= */

.chat-widget {
    position: fixed;
    bottom: 100px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    z-index: 999;
    transform: translateY(100%) scale(0.8);
    opacity: 0;
    transition: all 0.3s ease;
    overflow: hidden;
    border: 2px solid var(--primary-green);
}

.chat-widget.active {
    transform: translateY(0) scale(1);
    opacity: 1;
}

.chat-header {
    background: var(--gradient);
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-header-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-avatar {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.chat-status {
    display: flex;
    flex-direction: column;
}

.chat-status h4 {
    margin: 0;
    font-size: 1rem;
}

.chat-status span {
    font-size: 0.8rem;
    opacity: 0.9;
    display: flex;
    align-items: center;
    gap: 5px;
}

.online-dot {
    width: 8px;
    height: 8px;
    background: #4CAF50;
    border-radius: 50%;
    animation: blink 1.5s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0.3; }
}

.chat-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.chat-close:hover {
    background: rgba(255,255,255,0.2);
}

.chat-body {
    height: 350px;
    overflow-y: auto;
    padding: 20px;
    background: #f8f9fa;
}

.chat-message {
    margin-bottom: 15px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.message-bubble {
    background: white;
    padding: 12px 15px;
    border-radius: 18px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    max-width: 80%;
    position: relative;
}

.message-bubble::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 15px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-right: 8px solid white;
}

.message-time {
    font-size: 0.7rem;
    color: #999;
    margin-top: 5px;
}

.chat-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.chat-option {
    background: var(--gradient);
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.chat-option:hover {
    transform: translateX(5px);
    background: var(--gradient-hover);
}

.chat-footer {
    padding: 15px 20px;
    background: white;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    align-items: center;
}

.chat-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 25px;
    padding: 10px 15px;
    outline: none;
    font-size: 0.9rem;
}

.chat-input:focus {
    border-color: var(--primary-green);
}

.chat-send {
    background: var(--gradient);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.chat-send:hover {
    transform: scale(1.1);
}

/* Logo styles fix */
.logo-icon {
    background: none !important;
}

.logo-image {
    width: 100%;
    height: auto;
}
