:root {
    --primary: #E63946; /* Red */
    --secondary: #FFB703; /* Yellow */
    --dark: #121212; /* Black */
    --grey-light: #F3F4F6;
    --grey-medium: #6B7280;
    --white: #FFFFFF;
    --glass: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

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

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

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

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

/* Buttons */
.btn-primary, .btn-primary-large, .btn-primary-full {
    background-color: var(--primary);
    color: var(--white);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-primary:hover, .btn-primary-large:hover, .btn-primary-full:hover {
    background-color: #c1121f;
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(230, 57, 70, 0.4);
}

.btn-primary-large {
    padding: 1.2rem 2.5rem;
    font-size: 1.1rem;
}

.btn-primary-full {
    width: 100%;
    text-align: center;
    font-size: 1.1rem;
}

.btn-secondary-large {
    background-color: transparent;
    color: var(--white);
    padding: 1.2rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-block;
    border: 2px solid var(--white);
    margin-left: 1rem;
}

.btn-secondary-large:hover {
    background-color: var(--white);
    color: var(--dark);
}

.btn-text {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-text:hover {
    gap: 0.8rem;
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
    padding: 1.5rem 0;
}

header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    padding: 0.8rem 0;
    box-shadow: var(--shadow);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.logo img {
    height: 45px;
    width: auto;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--white);
    transition: var(--transition);
}

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

.logo-sub {
    font-size: 0.7rem;
    font-weight: 400;
    letter-spacing: 2px;
    color: var(--secondary);
    margin-top: -2px;
    display: block;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--white);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: var(--transition);
}

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

.nav-links a:hover {
    color: var(--secondary);
}

header.scrolled .nav-links a:hover {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    cursor: pointer;
    color: var(--white);
}

header.scrolled .mobile-menu-btn {
    color: var(--dark);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transform: translateY(-100%);
    transition: transform 0.6s cubic-bezier(0.85, 0, 0.15, 1);
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
}

.mobile-menu-overlay.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.mobile-menu-overlay .close-menu {
    position: absolute;
    top: 2rem;
    right: 2rem;
    color: white;
    cursor: pointer;
}

.mobile-nav-links {
    list-style: none;
    text-align: center;
}

.mobile-nav-links li {
    margin-bottom: 2.5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.mobile-menu-overlay.active .mobile-nav-links li {
    opacity: 1;
    transform: translateY(0);
}

.mobile-nav-links a {
    color: white;
    text-decoration: none;
    font-size: 3rem;
    font-weight: 700;
    transition: var(--transition);
}

.mobile-nav-links a:hover {
    color: var(--primary);
    padding-left: 1rem;
}

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

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(18, 18, 18, 0.8), rgba(18, 18, 18, 0.4));
}

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

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
}

/* Sections General */
section {
    padding: 8rem 0;
}

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

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--primary);
}

.section-subtitle {
    color: var(--grey-medium);
    font-size: 1.1rem;
}

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

.service-card {
    background: var(--white);
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: var(--transition);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.service-card-img {
    height: 200px;
    background-size: cover;
    background-position: center;
    transition: var(--transition);
}

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

.service-card-content {
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
}

.priority-badge {
    background: var(--secondary);
    color: var(--dark);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.3rem 0.8rem;
    border-radius: 50px;
    display: inline-block;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.service-card.priority {
    border: 2px solid var(--secondary);
    box-shadow: 0 10px 30px rgba(255, 183, 3, 0.1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: var(--grey-light);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: var(--primary);
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--primary);
    color: var(--white);
}

.service-card h3 {
    margin-bottom: 1rem;
}

.service-card p {
    color: var(--grey-medium);
    margin-bottom: 1.5rem;
}

/* Testimonials */
.testimonials {
    background-color: var(--dark);
    color: var(--white);
}

.testimonials .section-title::after {
    background-color: var(--secondary);
}

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

.testimonial-card {
    background: rgba(255, 255, 255, 0.05);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.testimonial-content p {
    font-style: italic;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    position: relative;
}

.testimonial-footer {
    display: flex;
    flex-direction: column;
}

.testimonial-footer strong {
    color: var(--secondary);
    font-size: 1.2rem;
}

.testimonial-footer span {
    color: var(--grey-medium);
    font-size: 0.9rem;
}

/* Excelencia en Medellín Gallery */
.excelencia-medellin {
    background-color: var(--white);
    padding: 10rem 0;
    overflow: hidden;
}

.gallery-slider-container {
    position: relative;
    padding: 0 1rem;
    margin: 0 -1rem;
}

.gallery-wrapper {
    overflow: hidden;
    padding: 2rem 0;
}

.gallery-track {
    display: flex;
    gap: 2.5rem;
    transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.gallery-item {
    flex: 0 0 450px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    transition: var(--transition);
    background: var(--grey-light);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: var(--white);
    color: var(--primary);
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    z-index: 100;
    transition: var(--transition);
}

.slider-btn:hover {
    background: var(--primary);
    color: var(--white);
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev { left: -20px; }
.slider-btn.next { right: -20px; }

@media (max-width: 768px) {
    .gallery-item {
        flex: 0 0 300px;
    }
    .slider-btn {
        width: 45px;
        height: 45px;
    }
    .slider-btn.prev { left: 0px; }
    .slider-btn.next { right: 0px; }
}

/* About Us */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-image img {
    width: 100%;
    border-radius: 30px;
    box-shadow: var(--shadow);
}

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

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--primary);
}

.stat-item p {
    color: var(--grey-medium);
    margin-top: -5px;
}

/* Contact */
.contact {
    background-color: var(--grey-light);
}

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

.contact-form-container {
    background: var(--white);
    padding: 3rem;
    border-radius: 30px;
    box-shadow: var(--shadow);
}

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

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

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    font-family: inherit;
    transition: var(--transition);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.contact-info h3 {
    margin-bottom: 2rem;
}

.info-item {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.info-item i {
    color: var(--primary);
    flex-shrink: 0;
}

.info-item p {
    color: var(--grey-medium);
    font-size: 0.9rem;
}

.fake-map {
    width: 100%;
    height: 250px;
    background: #E5E7EB;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--grey-medium);
    gap: 1rem;
}

/* Footer */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 5rem 0 2rem;
    position: relative;
    z-index: 10;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}

.footer-brand .logo {
    margin-bottom: 1.5rem;
}

.footer-brand .logo-text {
    color: var(--white);
}

.footer-links h4, .footer-social h4 {
    margin-bottom: 1.5rem;
}

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

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--grey-medium);
    text-decoration: none;
    transition: var(--transition);
}

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

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icons a {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.social-icons a:hover {
    background: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--grey-medium);
    font-size: 0.9rem;
}

/* Animations */
.fade-in {
    animation: fadeIn 1s ease-out forwards;
}

.fade-in-delay {
    opacity: 0;
    animation: fadeIn 1s ease-out 0.3s forwards;
}

.fade-in-delay-2 {
    opacity: 0;
    animation: fadeIn 1s ease-out 0.6s forwards;
}

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

/* Mobile Responsive */
@media (max-width: 992px) {
    .hero h1 { font-size: 3rem; }
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .hero-btns { display: flex; flex-direction: column; gap: 1rem; }
    .btn-secondary-large { margin-left: 0; }
    
    .chatbot-window {
        width: calc(100vw - 2rem);
        height: 60vh;
        bottom: 5rem;
        right: 1rem;
    }

    /* Prevent auto-zoom on iOS */
    input, select, textarea {
        font-size: 16px !important;
    }

    .mobile-nav-links a {
        font-size: 2.5rem;
    }

    /* Stack floating buttons on mobile/tablet */
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }

    .chatbot-bubble {
        bottom: 90px;
        right: 20px;
    }


}

/* Page Transitions */
.page-transition {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease-in-out;
}

.page-transition.active {
    opacity: 1;
    pointer-events: all;
}

body.loading {
    overflow: hidden;
}

.content-fade {
    animation: contentFadeIn 0.8s ease-out forwards;
}

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

/* Page Header (for subpages) */
.page-header {
    padding: 10rem 0 5rem;
    background: var(--dark);
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header h1 {
    font-size: 3.5rem;
    position: relative;
    z-index: 1;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(230, 57, 70, 0.1), transparent);
}

/* Mission, Vision, Values Grid */
.mvv-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.mvv-card {
    background: var(--white);
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.mvv-card:hover {
    transform: translateY(-5px);
}

.mvv-icon {
    width: 60px;
    height: 60px;
    background: var(--grey-light);
    color: var(--primary);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

/* Why Choose Us Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
}

.feature-item {
    display: flex;
    gap: 1.5rem;
}

.feature-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--secondary);
    color: var(--dark);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.whatsapp-float:hover {
    transform: scale(1.1) rotate(5deg);
    background-color: #128C7E;
}

.whatsapp-float i {
    width: 30px;
    height: 30px;
}
/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease-in-out, visibility 0.5s;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader-logo {
    width: 120px;
    margin-bottom: 2rem;
    animation: pulse 2s infinite ease-in-out;
}

.progress-container {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.05); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

/* Backdoor Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

.modal-content {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.pin-display {
    background: var(--grey-light);
    padding: 1.5rem;
    border-radius: 12px;
    font-size: 2rem;
    letter-spacing: 1rem;
    margin-bottom: 2rem;
    min-height: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.pin-pad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.pin-btn {
    background: var(--grey-light);
    border: none;
    padding: 1.5rem;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.pin-btn:hover {
    background: var(--secondary);
    color: var(--dark);
}

.pin-btn.clear {
    background: #fee2e2;
    color: #ef4444;
}

.pin-btn.submit {
    background: #dcfce7;
    color: #16a34a;
}

/* AI Estimator Styles */
.ai-estimator {
    background: var(--white);
}

.estimator-card {
    background: var(--grey-light);
    padding: 3rem;
    border-radius: 30px;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow);
}

.upload-area {
    border: 2px dashed var(--grey-medium);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 2rem;
    background: var(--white);
}

.upload-area:hover {
    border-color: var(--primary);
    background: rgba(230, 57, 70, 0.05);
}

.upload-area i {
    width: 40px;
    height: 40px;
    color: var(--primary);
    margin-bottom: 1rem;
}

.ai-result {
    margin-top: 2rem;
    background: var(--dark);
    color: var(--white);
    padding: 2rem;
    border-radius: 20px;
    animation: fadeIn 0.5s ease;
}

.ai-result.hidden {
    display: none;
}

.result-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--secondary);
    margin-bottom: 1rem;
    font-weight: 700;
}

.estimate-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

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

.estimate-stats .label {
    font-size: 0.8rem;
    color: var(--grey-medium);
}

.estimate-stats .value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary);
}

/* ChatBot Styles - Premium Upgrade */
.chatbot-bubble {
    position: fixed;
    bottom: 30px;
    right: 110px;
    background: var(--dark);
    color: var(--white);
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 1000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.chatbot-bubble:hover {
    transform: scale(1.1) translateY(-5px);
    background: var(--primary);
    box-shadow: 0 12px 40px rgba(230, 57, 70, 0.4);
}

.chatbot-window {
    position: fixed;
    bottom: 110px;
    right: 30px;
    width: 380px;
    height: 550px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: bottom right;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.chatbot-window.hidden {
    transform: scale(0.8) translateY(20px);
    opacity: 0;
    pointer-events: none;
}

.chat-header {
    background: var(--dark);
    color: var(--white);
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: linear-gradient(135deg, #121212 0%, #1a1a1a 100%);
}

.chat-avatar {
    position: relative;
}

.chat-avatar img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: var(--white);
    padding: 3px;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.chat-avatar::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #4ade80;
    border: 2px solid var(--dark);
    border-radius: 50%;
}

.chat-title h4 {
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
}

.chat-title span {
    font-size: 0.75rem;
    color: #4ade80;
    display: flex;
    align-items: center;
    gap: 4px;
}

#close-chat {
    margin-left: auto;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: var(--white);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

#close-chat:hover {
    background: var(--primary);
    transform: rotate(90deg);
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    background: radial-gradient(circle at top right, rgba(230, 57, 70, 0.03), transparent 40%);
}

.message {
    padding: 1rem 1.2rem;
    border-radius: 18px;
    max-width: 85%;
    font-size: 0.95rem;
    line-height: 1.4;
    position: relative;
    animation: messageSlideIn 0.3s ease-out forwards;
}

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

.message.bot {
    background: var(--white);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    color: var(--dark);
}

.message.user {
    background: var(--primary);
    color: var(--white);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.2);
}

.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 0.5rem;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--grey-medium);
    border-radius: 50%;
    animation: typingPulse 1.4s infinite ease-in-out;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingPulse {
    0%, 100% { transform: scale(1); opacity: 0.4; }
    50% { transform: scale(1.3); opacity: 1; }
}

.chat-input {
    padding: 1.2rem;
    background: var(--white);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.chat-input input {
    flex: 1;
    border: 1px solid #E5E7EB;
    padding: 0.9rem 1.2rem;
    border-radius: 14px;
    outline: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.chat-input input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.1);
}

.chat-input button {
    background: var(--primary);
    color: var(--white);
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.2);
}

.chat-input button:hover {
    background: var(--dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

@media (max-width: 480px) {
    .chatbot-window {
        width: calc(100vw - 2rem);
        height: 70vh;
        bottom: 90px;
        right: 1rem;
    }
    
    .chatbot-bubble {
        bottom: 90px; /* Positioned above WhatsApp */
        right: 20px;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
}


/* AI Modal Premium Styles */
.ai-modal {
    animation: modalSlideUp 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(50px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.ai-sparkle {
    color: var(--secondary);
    animation: sparkleRotate 3s infinite linear;
}

@keyframes sparkleRotate {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

.ai-brain-container {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-brain-wave {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    border-radius: 50%;
    opacity: 0;
    animation: wavePulse 2s infinite ease-out;
}

.ai-brain-wave:nth-child(2) { animation-delay: 0.6s; }
.ai-brain-wave:nth-child(3) { animation-delay: 1.2s; }

@keyframes wavePulse {
    0% { transform: scale(0.5); opacity: 0; }
    50% { opacity: 0.5; }
    100% { transform: scale(1.5); opacity: 0; }
}

.ai-input-group textarea:focus, .ai-input-group input:focus {
    border-color: var(--primary) !important;
    background: rgba(230, 57, 70, 0.02);
    outline: none;
    box-shadow: 0 0 0 4px rgba(230, 57, 70, 0.1);
}

#ai-modal-intro::after {
    content: '|';
    animation: blink 0.8s infinite;
}

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