/* Custom styles for Digital Nomad Villages */

/* Base styles */
:root {
    --primary-color: #C06B4D;
    --primary-hover: #A55A3F;
    --secondary-color: #4B6F44;
    --secondary-color-rgb: 75, 111, 68; /* Added for RGBA animations */
    --cream-color: #F5EFE0;
    --text-dark: #2D3748;
    --text-light: #718096;
    --transition-base: all 0.15s ease-in-out;
    --green-700: #047857;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

/* Custom container max-width */
.container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    width: 100%; /* Ensure container takes full width on mobile */
}

/* Header styles */
.main-header {
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    height: 5rem;
    transition: height 0.3s ease-in-out, background-color 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}

.main-header.header-compact {
    height: 4rem;
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
    width: 100%;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-image {
    display: block;
    height: 3rem;
    width: auto;
    border-radius: 0.5rem;
    margin-right: 0.5rem;
}

.desktop-nav {
    display: none;
}

@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
    }
    .desktop-nav a {
        margin-left: 2rem;
    }
    .desktop-nav a:first-child {
        margin-left: 0;
    }
}

.desktop-nav a {
    color: var(--text-dark);
    text-decoration: none;
    transition: var(--transition-base);
}
.desktop-nav a:hover {
     color: var(--green-700);
}

.mobile-menu-button {
    display: inline-block;
    background-color: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-dark);
    transition: var(--transition-base);
}
.mobile-menu-button:hover {
     color: var(--green-700);
}

@media (min-width: 768px) {
    .mobile-menu-button {
        display: none;
    }
}

.mobile-menu-icon {
    display: block;
    height: 1.5rem;
    width: 1.5rem;
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

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

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

@keyframes logoScaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in {
    animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide-in {
    animation: slideIn 0.6s ease-out forwards;
}

.animate-scale-in {
    animation: scaleIn 0.6s ease-out forwards;
}

.animate-slide-in-left {
    animation: slideInLeft 0.6s ease-out forwards;
}

.animate-slide-in-right {
    animation: slideInRight 0.6s ease-out forwards;
}

/* Section styles */
section {
    padding: 8rem 0; /* Increased to 8rem for default desktop */
    box-sizing: border-box;
    width: 100%;
}

/* Scroll Animation styles */
section[data-animate="true"] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Trigger animations for sections when they come into view */
[data-animate="true"] .animate-slide-in-left,
[data-animate="true"] .animate-slide-in-right {
    opacity: 0; /* Start invisible */
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    color: var(--text-dark);
    line-height: 1.2;
}

h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

h3 {
    font-size: 1.75rem;
    font-weight: 500;
    margin-bottom: 1rem;
}

p {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    line-height: 1.7;
}

/* Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition-base);
}

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

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-base);
    cursor: pointer;
    border: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-hover);
    color: white;
}

/* Mobile Menu Styles */
.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 100;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease-out, visibility 0.3s ease-out;
}

.mobile-menu.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.mobile-menu:not(.hidden) {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-nav-wrapper {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    background-color: white;
    box-shadow: -4px 0 12px rgba(0, 0, 0, 0.15);
}

.mobile-nav-close-button {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-dark);
    transition: var(--transition-base);
}

.mobile-nav-close-button:hover {
    color: var(--green-700);
}

.mobile-nav-close-button:focus {
    outline: none;
    color: var(--green-700);
}

.mobile-nav-close-icon {
    display: block;
    height: 1.5rem;
    width: 1.5rem;
}

.mobile-nav-content {
    padding: 5rem 2rem 2rem 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-nav-links > * {
    margin-bottom: 0.5rem;
}

.mobile-nav-links > *:last-child {
    margin-bottom: 0;
}

.mobile-nav-link,
.mobile-nav-text {
    color: var(--text-dark);
    font-size: 1.125rem;
    font-weight: 500;
    padding: 1rem 0;
    border-bottom: 1px solid #e5e7eb;
    text-decoration: none;
    transition: var(--transition-base);
}

.mobile-nav-text {
    border-bottom: none;
    color: var(--text-light);
    font-size: 1rem;
}

.mobile-nav-link:hover,
.mobile-nav-link:focus {
    color: var(--green-700);
}

body.overflow-hidden {
    overflow: hidden;
}

/* Image styles */
img {
    display: block;
    max-width: 100%;
    height: auto;
}

img:hover {
    transform: scale(1.02);
    transition: transform 0.3s ease;
}

/* Card styles */
.card {
    border-radius: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 1.5rem;
}

.card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Lists */
ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

li {
    padding: 0;
    margin: 0;
    color: var(--text-dark);
}

/* Form elements */
input {
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
}

input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(192, 107, 77, 0.1);
}

/* Footer */
footer {
    background-color: var(--text-dark);
    color: white;
}

footer a {
    color: white;
    text-decoration: none;
    transition: var(--transition-base);
}

footer a:hover {
    color: var(--cream-color);
}


.chat-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--secondary-color);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 40;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.chat-toggle svg {
    width: 24px;
    height: 24px;
}

/* MOBILE RESPONSIVE STYLES - Main Breakpoint */
@media (max-width: 768px) {
    section {
        padding: 4rem 0; /* Reduced padding for mobile */
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
        max-width: 100%;
    }
    
    h1 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.75rem;
        line-height: 1.3;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    p {
        font-size: 1rem;
        line-height: 1.6;
    }
    
    #eliza-chat-container {
        height: 450px;
        margin: 0 1rem;
        max-width: calc(100% - 2rem);
    }
    
    #eliza-chat-container.expanded {
        height: 600px;
    }
    
    .chat-toggle {
        bottom: 1rem;
        right: 1rem;
        width: 50px;
        height: 50px;
    }
    
    .chat-toggle svg {
        width: 20px;
        height: 20px;
    }
    
    /* Specific adjustments for chat section spacing on mobile */
    .chat-section {
        padding-top: 1.75rem;
        padding-bottom: 1.5rem;
    }
}

/* === Hero Section Styles === */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    overflow: hidden;
    width: 100%;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    /* Fallback Background Image */
    background-image: url('../public/images/hero-fallback_opacity.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.hero-video-wrapper {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 0;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    max-height: 100%;
}

.hero-video-iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Hero overlay removed - using inline styles only */

.hero-content {
    text-align: center;
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 0 1rem;
}

.hero-content h1 {
    color: #ffffff;
    margin-bottom: 1.5rem;
    font-size: clamp(2rem, 4vw, 3rem);
}

.hero-content p {
    font-size: clamp(1.25rem, 2.5vw, 2.25rem);
    color: #ffffff;
    margin-bottom: 2rem;
    max-width: 48rem;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6);
}

/* Media query for larger desktop screens */
@media (min-width: 1024px) {
    .hero-content p {
        font-size: 2.25rem;
    }
}

.hero-cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 0.15s ease-in-out;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    border: none;
}
.hero-cta-button:hover {
    background-color: var(--primary-hover);
}

/* Styling for the main logo in the video hero section */
.hero-main-logo {
    display: block;
    max-width: 280px;
    width: 280px;
    height: 280px;
    margin: 0 auto 2rem auto;
    position: relative;
    z-index: 5;
    border-radius: 50%;
    box-shadow: 0 0 20px 8px rgba(255, 255, 255, 0.45), 
                0 0 50px 25px rgba(255, 223, 150, 0.35), 
                0 0 90px 45px rgba(255, 210, 100, 0.25);
    object-fit: cover;
    overflow: hidden;
    animation: logoScaleIn 0.8s ease-out 0.5s forwards;
    opacity: 0;
}

/* Override global img:hover for this specific logo */
.hero-main-logo:hover {
    transform: none;
    box-shadow: none;
}

/* === Vision Section Styles === */
.vision-section {
    background-color: #ffffff;
}

.vision-grid {
    display: grid;
    gap: 3rem;
    align-items: center;
}

@media (min-width: 768px) {
    .vision-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.vision-text-content h2 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.vision-text-content p {
     color: var(--text-dark);
}
.vision-text-content p:last-of-type {
    margin-bottom: 0;
}

.vision-text-content p:first-of-type {
     margin-bottom: 1rem;
}

.vision-image-wrapper {
    position: relative;
}

.vision-image {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

/* Umbria Section */
.umbria-section {
    background-color: #f8f9fa;
    padding: 8rem 0;
}

.umbria-section h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.umbria-text-content p {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    line-height: 1.7;
}

.umbria-list {
    list-style: none;
    padding: 0;
}

.umbria-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.umbria-list li:last-child {
    margin-bottom: 0;
}

.umbria-list .checkmark {
    color: var(--secondary-color);
    font-weight: bold;
    margin-right: 0.75rem;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.umbria-list span:last-child {
    flex: 1;
}

/* Nomadi Section */
.nomadi-section {
    background-color: #ffffff;
}

.nomadi-section h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
    font-size: 2.5rem;
    font-weight: 600;
    line-height: 1.3;
}

/* Investment Section */
.investment-section {
    background-color: #f8f9fa;
}

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

.investment-text-content {
    /* Container for investment content */
}

.investment-text-content p {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.investment-text-content h3 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.investment-text-content ul {
    margin-left: 0;
    padding-left: 0;
}

.investment-text-content ul ul {
    list-style: disc;
    margin-left: 1.5rem;
    padding-left: 0;
}

.investment-text-content ul ul li {
    display: list-item;
    align-items: baseline;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Progetto Section */
.progetto-section {
    background-color: #ffffff;
}

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

.progetto-text-content {
    /* Container for project content */
}

.progetto-text-content p {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.progetto-text-content p:last-of-type {
    margin-bottom: 0;
}

/* Proprieta Section */
.proprieta-section {
    background-color: #f8f9fa;
}

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

.proprieta-text-content {
    /* Container for property content */
}

.proprieta-text-content p {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.proprieta-text-content p:last-of-type {
    margin-bottom: 0;
}

.proprieta-text-content .cta-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 1rem;
}

.proprieta-text-content .cta-button:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.proprieta-text-content .cta-button {
    /* Additional styling if needed */
}

/* Language Switcher */
.lang-switcher {
    display: flex;
    gap: 0.5rem;
}

.lang-switcher a {
    color: var(--text-dark);
    text-decoration: none;
    padding: 0.25rem;
    transition: var(--transition-base);
}

.lang-switcher a:hover {
    color: var(--primary-color);
}

/* Team Section */
.team-section {
    background-color: #ffffff;
}

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

.team-intro-text {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.team-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.team-member {
    text-align: center;
}

.team-member img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem auto;
    border: 4px solid var(--cream-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.team-member h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.team-member p {
    color: var(--text-light);
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Contact Section */
.contact-section {
    background-color: #f8f9fa;
    text-align: center;
}

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

.contact-content-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.contact-intro-text p {
    color: var(--text-dark);
    margin-bottom: 1.5rem;
}

.contact-list {
    text-align: left;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
     .contact-list {
        columns: 1;
    }
}

.contact-list li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.contact-list .checkmark {
    color: var(--secondary-color);
    font-weight: bold;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.contact-list span:last-child {
    flex: 1;
}

.contact-privacy-text {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 2rem;
    font-style: italic;
}

.contact-button-wrapper {
    margin-bottom: 1.5rem;
}

.contact-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: background-color 0.15s ease-in-out;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    border: none;
}

.contact-button:hover {
    background-color: var(--primary-hover);
    color: white;
}

.contact-direct {
    color: var(--text-dark);
}

.contact-direct a {
    color: var(--primary-color);
    text-decoration: none;
}

.contact-direct a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Footer */
.main-footer {
    background-color: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.footer-column h3 {
    color: var(--cream-color);
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}

.footer-column p {
    color: #d1d5db;
    line-height: 1.6;
}

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

.footer-social-links a {
    color: #d1d5db;
    transition: var(--transition-base);
}

.footer-social-links a:last-child {
    margin-right: 0;
}

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

.footer-bottom {
    border-top: 1px solid #4b5563;
    margin-top: 2rem;
    padding-top: 1rem;
    text-align: center;
}

.footer-bottom p {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* Chat Widget Detailed Styles */
.eliza-chat-messages {
    padding: 15px;
    flex: 1;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background-color: #f9fafb;
    min-height: 300px;
}

.message {
    display: flex;
    align-items: flex-start;
    max-width: 85%;
    gap: 8px;
}

.user-message {
    align-self: flex-end;
    flex-direction: row-reverse;
    background-color: var(--secondary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 18px 18px 5px 18px;
    margin-left: auto;
}

.stella-message {
    align-self: flex-start;
    background-color: white;
    border: 1px solid #e5e7eb;
    border-radius: 18px 18px 18px 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.stella-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.message-text {
    padding: 10px 15px;
    line-height: 1.5;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Duplicate rule - keeping the first one */
.stella-message {
    /* Already defined above */
}

.eliza-chat-input-area {
    border-top: 1px solid #e5e7eb;
    padding: 15px;
    background-color: #ffffff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.eliza-chat-input {
    flex: 1;
    border: 1px solid #d1d5db;
    border-radius: 20px;
    padding: 8px 15px;
    font-size: 14px;
    resize: none;
    outline: none;
}

.eliza-chat-input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(75, 111, 68, 0.1);
}

.eliza-chat-send-btn {
    background-color: var(--secondary-color);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
    flex-shrink: 0;
}

.eliza-chat-send-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Typing indicator */
.typing-indicator .message-text {
    display: flex;
    align-items: center;
    gap: 4px;
}

.typing-indicator .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #9ca3af;
    animation: typing 1.4s infinite ease-in-out;
}

.typing-indicator .dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-indicator .dot:nth-child(2) {
    animation-delay: -0.16s;
}

.typing-indicator .dot:nth-child(3) {
    animation-delay: 0;
}

@keyframes typing {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Prompt buttons */
.eliza-prompt-buttons {
    padding: 10px 15px;
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.prompt-btn {
    background-color: white;
    border: 1px solid var(--secondary-color);
    color: var(--secondary-color);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prompt-btn:hover {
    background-color: var(--secondary-color);
    color: white;
    transform: translateY(-1px);
}

/* SMALL MOBILE SPECIFIC STYLES */
@media (max-width: 640px) {
    body {
        font-size: 14px;
    }
    
    .container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    section {
        padding: 2.5rem 0;
    }
    
    .hero-section {
        height: 85vh;
        min-height: 500px;
    }
    
    .hero-main-logo {
        width: 150px;
        height: 150px;
        max-width: 150px;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .event-cta-title {
        font-size: 1.5rem;
    }
    
    .event-cta-description {
        font-size: 1rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .team-member img {
        width: 120px;
        height: 120px;
    }
    
    .stella-cta-image {
        width: 120px;
        height: 120px;
    }
    
    #eliza-chat-container {
        margin: 0 0.5rem;
        max-width: calc(100% - 1rem);
        height: 350px;
    }
}

/* Fix for horizontal overflow issues */
* {
    box-sizing: border-box;
}

html, body {
    max-width: 100%;
    overflow-x: hidden;
}

.hero-video-wrapper iframe,
.hero-video-iframe {
    max-width: 100%;
}

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Additional mobile-first improvements */
@media (max-width: 320px) {
    .container {
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
    
    .hero-main-logo {
        width: 120px;
        height: 120px;
        max-width: 120px;
    }
    
    .hero-content h1 {
        font-size: 1.25rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
    }
}

/* Stella CTA Section */
.stella-cta-section {
    background-color: var(--cream-color, #F5EFE0);
    padding: 4rem 0;
    text-align: center;
}

.stella-cta-image {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-bottom: 1.5rem;
    object-fit: cover;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stella-cta-name {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color, #C06B4D);
    margin-bottom: 0.75rem;
}

.stella-cta-description {
    color: var(--text-dark, #2D3748);
    font-size: 1.1rem;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
}

.stella-cta-button {
    display: inline-block;
    background-color: var(--primary-color, #C06B4D);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: background-color 0.15s ease-in-out, transform 0.15s ease-in-out;
    box-shadow: 0 4px 12px rgba(192, 107, 77, 0.3);
}

.stella-cta-button:hover {
    background-color: var(--primary-hover, #A55A3F);
    transform: translateY(-2px) scale(1.05);
    color: white;
    box-shadow: 0 6px 18px rgba(192, 107, 77, 0.4);
}

/* Property Proposals Section on Home */
.proposte-home-section {
    padding: 4rem 0;
    background-color: #f8f9fa;
}

.proposte-home-section h2 {
    text-align: center;
    margin-bottom: 2.5rem;
}

.proposte-home-text p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.proposte-home-text .cta-button {
    display: inline-block;
    padding: 12px 30px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-top: 1rem;
}

.proposte-home-text .cta-button:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

/* Collescipoli Slider Section */
.collescipoli-slider-section {
    padding: 4rem 0;
}

.collescipoli-slider-section .slider-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.collescipoli-slider-section .slider-container:not(:last-child) {
    margin-bottom: 2rem;
}

.collescipoli-slider-section .slider-image {
    width: 100%;
    height: auto;
    display: block;
}

.collescipoli-slider-section .img-comp-overlay {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 50%;
    overflow: hidden;
    z-index: 1;
}

.collescipoli-slider-section .img-comp-overlay .slider-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.collescipoli-slider-section .img-comp-slider {
    position: absolute;
    z-index: 9;
    cursor: ew-resize;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.collescipoli-slider-section .slider-handle-icon {
    width: 20px;
    height: 20px;
    position: relative;
}

.collescipoli-slider-section .slider-handle-icon::before,
.collescipoli-slider-section .slider-handle-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    transform: translateY(-50%);
}

.collescipoli-slider-section .slider-handle-icon::before {
    left: 7px;
    border-right: 6px solid var(--primary-color);
}

.collescipoli-slider-section .slider-handle-icon::after {
    right: 7px;
    border-left: 6px solid var(--primary-color);
}

/* Service Button */
.service-button {
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.service-button:hover {
    background-color: var(--secondary-color);
    color: white;
}

/* Event CTA Section */
.event-cta-section {
    background-color: var(--cream-color);
    color: var(--text-dark);
    padding: 2.5rem 0;
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--primary-color);
}

.event-cta-container {
    max-width: 750px;
    margin: 0 auto;
    padding: 0 1rem;
}

.event-cta-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.event-cta-description {
    font-size: 1.05rem;
    line-height: 1.65;
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.event-cta-description strong {
    color: var(--primary-color);
}

.event-cta-button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: white;
    padding: 0.8rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background-color 0.2s ease, transform 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.event-cta-button:hover {
    background-color: #3a5a35;
    color: white;
    transform: translateY(-2px);
}

/* Enhanced home events banner */
.event-home-cta {
    background: linear-gradient(135deg, var(--cream-color) 0%, #f0e8d6 100%);
    border: none;
    margin: 2rem 0 1.5rem;
    padding: 3rem 0 2.25rem;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.event-home-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 20% 80%, rgba(192, 107, 77, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(75, 111, 68, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.event-home-cta .container { 
    padding: 1.25rem 2rem; 
    position: relative;
    z-index: 2;
}

/* Create a more composite layout */
.event-home-cta .event-content-wrapper {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    align-items: center;
}

.event-home-cta .event-main-content {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

.event-home-cta .event-text-content {
    flex: 1;
}

.event-home-cta .event-action-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.event-home-cta .cta-btn {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--secondary-color) 0%, #3a5a35 100%);
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    border: none;
    box-shadow: 0 4px 16px rgba(75, 111, 68, 0.3);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.event-home-cta .cta-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.event-home-cta .cta-btn:hover::before {
    left: 100%;
}

.event-home-cta .cta-btn:hover { 
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(75, 111, 68, 0.4);
    background: linear-gradient(135deg, #3a5a35 0%, var(--secondary-color) 100%);
}

.event-home-cta .cta-btn.primary { 
    background: linear-gradient(135deg, var(--primary-color) 0%, #A55A3F 100%);
    box-shadow: 0 4px 16px rgba(192, 107, 77, 0.3);
}

.event-home-cta .cta-btn.primary:hover { 
    background: linear-gradient(135deg, #A55A3F 0%, var(--primary-color) 100%);
    box-shadow: 0 8px 24px rgba(192, 107, 77, 0.4);
}

.event-home-cta .thumb {
    width: 200px; 
    height: 120px; 
    border-radius: 12px; 
    overflow: hidden; 
    flex-shrink: 0; 
    box-shadow: 0 6px 18px rgba(0,0,0,0.12); 
    background: #fff;
    transition: all 0.3s ease;
    position: relative;
}

.event-home-cta .thumb::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(192, 107, 77, 0.1) 0%, rgba(75, 111, 68, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.event-home-cta .thumb:hover::before {
    opacity: 1;
}

.event-home-cta .thumb:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}

.event-home-cta .thumb img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block;
    transition: transform 0.3s ease;
}

.event-home-cta .thumb:hover img {
    transform: scale(1.05);
}

/* Enhanced typography for events box */
.event-home-cta [style*="font-weight:800"] {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.4rem !important;
    font-weight: 800 !important;
    line-height: 1.3 !important;
}

.event-home-cta [style*="color: #33403a"] {
    color: var(--text-dark) !important;
    font-size: 1.05rem !important;
    font-weight: 500 !important;
    margin-top: 0.5rem !important;
}

.event-home-cta [style*="color: #5c6b61"] {
    color: #6b7b70 !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    margin-top: 0.75rem !important;
    padding: 0.5rem 1rem;
    background: rgba(75, 111, 68, 0.1);
    border-radius: 20px;
    display: inline-block;
}

@media (max-width: 768px) {
    .event-home-cta .container { 
        padding: 1.25rem; 
    }
    
    .event-home-cta .event-content-wrapper {
        grid-template-columns: 1fr;
        gap: 1.25rem;
        text-align: center;
    }
    
    .event-home-cta .event-main-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .event-home-cta .thumb { 
        width: 100%; 
        max-width: 250px;
        height: 140px; 
        margin: 0 auto;
    }
    
    .event-home-cta .event-action-area {
        align-items: center;
        width: 100%;
    }
    
    .event-home-cta .cta-btn {
        width: auto;
        min-width: 200px;
        padding: 1rem 1.5rem;
        font-size: 1rem;
        white-space: nowrap;
        display: inline-flex !important;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .event-home-cta .container { 
        padding: 1rem; 
    }
    
    .event-home-cta .event-main-content {
        gap: 0.75rem;
    }
    
    .event-home-cta .thumb { 
        max-width: 220px;
        height: 120px; 
    }
    
    .event-home-cta .cta-btn {
        min-width: 180px;
        padding: 0.875rem 1.25rem;
        font-size: 0.95rem;
    }
}

/* Main margin */
main {
    margin-bottom: 3rem;
}

/* Stella Promo Pop-up Styles */
.stella-promo-popup {
    background-color: white;
    color: var(--text-dark);
    border: 2px solid var(--secondary-color);
    padding: 1.5rem 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
    display: flex;
    align-items: center;
    gap: 1rem;
    visibility: hidden;
    width: fit-content;
    margin: 1.5rem auto 0 auto;
    position: relative;
}

.stella-promo-popup::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid var(--secondary-color);
}

.stella-promo-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
}

.stella-promo-popup.visible {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    animation: pulseEffect 2s infinite;
}

.stella-promo-popup p {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 500;
    line-height: 1.4;
}

.close-stella-promo {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.75rem;
    line-height: 1;
    padding: 0.25rem;
    cursor: pointer;
    transition: color 0.15s ease-in-out;
}

.close-stella-promo:hover {
    color: var(--text-dark);
}

/* MOBILE ADJUSTMENTS FOR STELLA PROMO */
@media (max-width: 768px) {
    .stella-promo-popup {
        padding: 1rem 1.25rem;
        margin-top: 1rem;
        gap: 0.75rem;
        margin-left: 1rem;
        margin-right: 1rem;
        width: calc(100% - 2rem);
    }
    
    .stella-promo-avatar {
        width: 60px;
        height: 60px;
    }
    
    .stella-promo-popup p {
        font-size: 1rem;
    }
    
    .close-stella-promo {
        font-size: 1.5rem;
    }
    
    .event-cta-title {
        font-size: 1.75rem;
    }
    
    .event-cta-description {
        font-size: 1rem;
    }
    
    .event-cta-container {
        padding: 0 1.25rem;
    }
    
    .stella-cta-section {
        padding: 3rem 0;
    }
    
    .stella-cta-image {
        width: 120px;
        height: 120px;
    }
    
    .stella-cta-description {
        font-size: 1rem;
        max-width: 350px;
    }
    
    .stella-cta-button {
        padding: 0.875rem 2rem;
        font-size: 1rem;
    }
    
    /* Grid adjustments for mobile */
    .vision-grid,
    .team-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .umbria-list li,
    .contact-list li {
        align-items: flex-start;
        font-size: 0.95rem;
    }
    
    .checkmark {
        margin-top: 0.1rem;
    }
    
    /* Mobile hero adjustments */
    .hero-background {
        background-position: center center;
    }

    .hero-content {
        padding: 0 1rem;
    }

    .hero-content h1 {
        font-size: clamp(1.5rem, 6vw, 2rem);
        margin-bottom: 1rem;
    }

    .hero-content p {
        font-size: clamp(1rem, 4vw, 1.25rem);
        margin-bottom: 1.5rem;
        max-width: 95%;
    }
    
    .hero-main-logo {
        width: 200px;
        height: 200px;
        max-width: 200px;
        margin-bottom: 1.5rem;
    }
    
    .hero-cta-button {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Additional chat adjustments for mobile */
    #eliza-chat-container {
        height: 400px;
        margin: 0 1rem;
        max-width: calc(100% - 2rem);
        border-radius: 8px;
    }

    .eliza-chat-messages {
        padding: 10px;
    }

    .message {
        max-width: 90%;
        padding: 6px 10px;
    }

    .stella-avatar {
        width: 40px;
        height: 40px;
        margin-right: 8px;
    }

    .message-text {
        padding: 8px 12px;
    }

    .message-text p {
        font-size: 0.9rem;
        margin-bottom: 0 !important;
    }

    .eliza-prompt-buttons {
        padding: 8px 10px;
        gap: 6px;
    }

    .prompt-btn {
        padding: 5px 10px;
        font-size: 0.8rem;
    }

    .eliza-chat-input-area {
        padding: 2px 10px;
        background-color: #f9fafb;
        border: 2px dotted var(--secondary-color, #379b23);
    }

    .eliza-chat-input {
        font-size: 0.95rem;
        padding: 10px 15px;
        border-radius: 15px;
    }

    .eliza-chat-send-btn {
        width: 40px;
        height: 40px;
        margin-left: 8px;
        border-radius: 0.75rem;
        background-color: var(--secondary-color, #4B6F44);
        color: white;
        border: none;
    }

    .eliza-chat-send-btn svg {
        width: 22px;
        height: 22px;
    }
}

/* Keyframes for pulsing effect */
@keyframes pulseEffect {
    0% {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(var(--secondary-color-rgb), 0.4);
    }
    70% {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15), 0 0 0 10px rgba(var(--secondary-color-rgb), 0);
    }
    100% {
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(var(--secondary-color-rgb), 0);
    }
}

/* Specific adjustments for section spacing */
.chat-section {
    padding-top: 2rem;
    padding-bottom: 1.75rem;
}

/* VERY SMALL SCREENS - Additional optimizations */
@media (max-width: 480px) {
    .container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    section {
        padding: 2.5rem 0;
    }
    
    .hero-section {
        height: 85vh;
        min-height: 500px;
    }
    
    .hero-main-logo {
        width: 150px;
        height: 150px;
        max-width: 150px;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .event-cta-title {
        font-size: 1.5rem;
    }
    
    .event-cta-description {
        font-size: 1rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    .team-member img {
        width: 120px;
        height: 120px;
    }
    
    .stella-cta-image {
        width: 120px;
        height: 120px;
    }
    
    #eliza-chat-container {
        margin: 0 0.5rem;
        max-width: calc(100% - 1rem);
        height: 350px;
    }
} 
