:root {
    --primary-color: #004d40; /* Dark Green */
    --secondary-color: #00796b; /* Lighter Green */
    --accent-color: #4db6ac; /* Teal */
    --text-color: #333;
    --background-color: #f4f4f4;
    --white: #fff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
header {
    background-color: var(--white);
    padding: 1rem 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    text-align: left;
}

header .header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo {
    max-width: 120px;
    max-height: 80px;
}

.header-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.header-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 0;
    line-height: 1.2;
}

.header-subtitle {
    font-size: 1rem;
    color: var(--secondary-color);
    margin: 0;
}

/* Hero Carousel Section */
.hero-carousel {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: 400px; /* Adjust height as needed */
    color: var(--white);
}

.carousel-slides {
    display: flex;
    width: 400%; /* 100% * number of slides */
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    width: 25%; /* 100% / number of slides */
    height: 100%;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.carousel-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.carousel-slide .container {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.carousel-slide h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

.carousel-slide p {
    font-size: 1.2rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    border: none;
    padding: 0.4rem 0.8rem;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 3;
    border-radius: 50%;
}

.carousel-control.prev {
    left: 10px;
}

.carousel-control.next {
    right: 10px;
}

.slide-link {
    display: flex;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    justify-content: center;
    align-items: center;
}

/* Services Section */
.services {
    padding: 2rem 0;
}

.services h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.service-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 120px;
    padding: 1rem;
    border-radius: 16px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    overflow: hidden;
    text-align: center;
    color: var(--white);
    background-size: cover;
    background-position: center;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

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

.service-item h3 {
    position: relative;
    font-size: 1rem;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
    margin: 0;
    z-index: 2;
}

.service-item .arrow {
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    z-index: 2;
    transition: transform 0.3s ease;
}

.service-item:hover .arrow {
    transform: translateX(5px);
}

.service-item-link {
    text-decoration: none;
}

/* CTA Section */
.cta {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 3rem 0;
}

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

.cta-button {
    background-color: #25D366;
    color: var(--white);
    padding: 1rem 2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.cta-button:hover {
    background-color: #20B954;
}

/* WhatsApp Widget */
.whatsapp-widget {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 300px;
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    z-index: 1001;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
    display: none;
}

.whatsapp-widget.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    display: block;
}

.widget-header {
    background: #075E54;
    color: white;
    padding: 15px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.advisor-avatar {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    object-fit: cover;
}

.advisor-info {
    display: flex;
    flex-direction: column;
}

.advisor-name {
    font-weight: bold;
    font-size: 16px;
}

.advisor-status {
    font-size: 12px;
    opacity: 0.9;
}

.close-widget {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.widget-body {
    padding: 20px;
    min-height: 120px;
    background: #e5ddd5;
    position: relative;
}

.typing-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
}

.typing-dots {
    background: #fff;
    border-radius: 18px;
    padding: 12px 16px;
    display: flex;
    gap: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.typing-dots span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #999;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {
    0%, 60%, 100% {
        transform: translateY(0);
        opacity: 0.5;
    }
    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}

.message-container {
    animation: messageSlideIn 0.3s ease;
}

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

.message {
    background: #fff;
    border-radius: 18px 18px 18px 6px;
    padding: 12px 16px 8px 16px;
    max-width: 85%;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    position: relative;
}

.message::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: -6px;
    width: 0;
    height: 0;
    border: 6px solid transparent;
    border-right-color: #fff;
    border-bottom-color: #fff;
    border-left: none;
}

.message p {
    margin: 0 0 8px 0;
    line-height: 1.4;
    color: #333;
    font-size: 14px;
}

.message-meta {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.message-time {
    font-size: 11px;
    color: #999;
}

.message-status {
    color: #4FC3F7;
    font-size: 12px;
    font-weight: bold;
}

.widget-footer {
    padding: 15px;
    border-radius: 0 0 15px 15px;
}

.start-chat-btn {
    width: 100%;
    max-width: 100%;
    background: #25D366;
    color: white;
    padding: 12px 8px;
    border-radius: 25px;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: bold;
    transition: background 0.3s ease;
    box-sizing: border-box;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.start-chat-btn:hover {
    background: #20B954;
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.whatsapp-float::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border-radius: 50%;
    background: rgba(37, 211, 102, 0.3);
    animation: radiateWhatsApp 2s infinite;
    z-index: -1;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float:hover::before {
    animation-play-state: paused;
}

@keyframes radiateWhatsApp {
    0% {
        transform: scale(1);
        opacity: 0.7;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.3;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

/* Responsive adjustments */
@media (max-width: 480px) {
    .whatsapp-widget {
        width: calc(100vw - 40px);
        right: 20px;
        left: 20px;
    }

    .start-chat-btn {
        font-size: 14px;
        padding: 10px 6px;
        gap: 6px;
    }

    .widget-footer {
        padding: 10px;
    }
    
    /* Header ajustes para móviles pequeños */
    header .header-content {
        gap: 10px;
    }
    
    .logo {
        max-width: 60px;
        max-height: 50px;
    }
    
    .header-title {
        font-size: 1rem;
    }
    
    .header-subtitle {
        font-size: 0.75rem;
    }
}

/* Footer */
footer {
    background-color: #333;
    color: var(--white);
    text-align: center;
    padding: 1rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    .hero p {
        font-size: 1rem;
    }
    
    /* Header responsive - mantener horizontal */
    header .header-content {
        gap: 15px;
    }
    
    .logo {
        max-width: 80px;
        max-height: 60px;
    }
    
    .header-title {
        font-size: 1.1rem;
    }
    
    .header-subtitle {
        font-size: 0.85rem;
    }
}