:root {
  --emerald-green: #284139;
  --wasabi: #809076;
  --khaki: #F8D794;
  --earth: #8B6830;
  --dark: #111A19;
  
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--khaki);
  color: var(--dark);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--emerald-green);
}

/* Header & Nav */
header {
  position: absolute;
  top: 0;
  width: 100%;
  padding: 2rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  color: white; /* Header over dark forest img */
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 3rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.nav-links a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s;
}

.nav-links a:hover {
  opacity: 0.7;
}

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

.logo-container img {
  height: 60px;
  filter: brightness(0) invert(1); /* Make logo white for hero */
}

.logo-text {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  letter-spacing: 4px;
}

.contact-header {
  font-family: var(--font-serif);
  font-size: 1.1rem;
}

.nav-btn-gold {
  background-color: var(--earth);
  color: white;
  border: none;
  padding: 0.8rem 1.5rem;
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: opacity 0.3s;
}

.nav-btn-gold:hover {
  opacity: 0.8;
}

/* Hero Section */
.hero {
  height: 100vh;
  background-image: url('hero.png');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  padding: 0 5%;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(rgba(17,26,25,0.4), rgba(17,26,25,0.2));
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  color: white;
  max-width: 600px;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 5rem);
  line-height: 1.1;
  color: white;
  margin-bottom: 2rem;
  text-transform: uppercase;
}

.hero p {
  font-size: 1.1rem;
  margin-bottom: 3rem;
  letter-spacing: 0.5px;
  font-weight: 300;
}

.booking-bar {
  position: absolute;
  bottom: 0;
  left: 5%;
  right: 5%;
  background: white;
  display: flex;
  color: var(--dark);
  z-index: 10;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.booking-item {
  flex: 1;
  padding: 1.5rem 2rem;
  border-right: 1px solid rgba(17,26,25,0.1);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.booking-btn {
  background: var(--earth);
  color: white;
  border: none;
  font-family: var(--font-serif);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: background 0.3s;
}

.booking-btn:hover {
  background: var(--dark);
}

/* Info Section (Beige background) */
.section-info {
  padding: 8rem 5%;
  position: relative;
}

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

.small-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--wasabi);
}

.huge-title {
  font-size: 4.5rem;
  line-height: 1.1;
  text-transform: uppercase;
  margin-bottom: 3rem;
}

.info-text-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  color: var(--dark);
  font-size: 0.95rem;
}

/* Image Grids */
.editorial-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--earth);
  color: white;
  margin-bottom: 4rem;
}

.editorial-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 400px;
}

.editorial-content {
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tag-list {
  display: flex;
  gap: 2rem;
  margin-bottom: 4rem;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 1px;
}

.tag-item {
  border: 1px solid rgba(255,255,255,0.3);
  padding: 0.5rem 1.5rem;
}

/* Second editorial grid reversing */
.editorial-grid.reversed {
  background: var(--wasabi);
}

/* Footer */
footer {
  background: var(--dark);
  color: var(--khaki);
  padding: 8rem 5% 4rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

footer img {
  height: 100px;
  margin-bottom: 3rem;
  opacity: 0.9;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-bottom: 4rem;
  list-style: none;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 2px;
}

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

.btn-portal {
  display: inline-block;
  background: linear-gradient(135deg, #B8860B 0%, #F8D794 50%, #8B6830 100%);
  background-size: 200% auto;
  color: var(--dark);
  padding: 1.2rem 4rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  text-decoration: none;
  font-family: var(--font-serif);
  font-weight: 700;
  margin-bottom: 5rem;
  border-radius: 4px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  transition: all 0.4s ease;
  border: 1px solid rgba(255,255,255,0.2);
}

.btn-portal:hover {
  background-position: right center;
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(248, 215, 148, 0.4);
}

.copyright {
  border-top: 1px solid rgba(248, 215, 148, 0.2);
  padding-top: 2rem;
  font-size: 0.8rem;
  letter-spacing: 1px;
  opacity: 0.5;
}

/* Contact Section */
.section-contacto {
    padding: 8rem 5%;
    background-color: var(--khaki);
    border-top: 1px solid rgba(40, 65, 57, 0.2);
}

.contacto-container {
    max-width: 800px;
    margin: 0 auto;
}

.contacto-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 1.2rem;
    background: transparent;
    border: 1px solid var(--emerald-green);
    color: var(--dark);
    font-family: var(--font-sans);
    font-size: 1rem;
    outline: none;
    transition: all 0.3s;
}

.form-group input::placeholder {
    color: rgba(17, 26, 25, 0.5);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--earth);
    box-shadow: 0 0 0 1px var(--earth);
}

.btn-submit {
    background: var(--emerald-green);
    color: var(--khaki);
    border: none;
    padding: 1.5rem;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    transition: background 0.3s;
    margin-top: 1rem;
}

.btn-submit:hover {
    background: var(--dark);
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Floating Chatbot Widget */
.chatbot-widget-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.chatbot-toggle-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--khaki);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5), 0 0 0 2px var(--earth);
    position: relative;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    padding: 0;
    overflow: hidden;
}

.chatbot-toggle-btn:hover {
    transform: scale(1.1);
}

.chatbot-toggle-btn.hidden {
    transform: scale(0) rotate(-180deg);
    opacity: 0;
    pointer-events: none;
}

.chatbot-avatar-img {
    width: 100%;
    height: 100%;
    background-image: url('ciervo_avatar.png');
    background-size: cover;
    background-position: center;
}

.chatbot-pulse {
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid var(--earth);
    animation: ping 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {
    75%, 100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.chatbot-tooltip {
    position: absolute;
    bottom: 80px;
    right: 10px;
    background: rgba(17, 26, 25, 0.9);
    border: 1px solid var(--earth);
    color: var(--khaki);
    padding: 1rem;
    border-radius: 8px 8px 0px 8px;
    font-size: 0.8rem;
    font-family: var(--font-sans);
    line-height: 1.4;
    width: max-content;
    max-width: 250px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-origin: bottom right;
}

.chatbot-tooltip.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Tooltip Caret */
.chatbot-tooltip::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 15px;
    border-width: 8px 8px 0;
    border-style: solid;
    border-color: rgba(17, 26, 25, 0.9) transparent transparent transparent;
    display: block;
    width: 0;
}
.chatbot-tooltip::before {
    content: '';
    position: absolute;
    bottom: -9px;
    right: 15px;
    border-width: 9px 9px 0;
    border-style: solid;
    border-color: var(--earth) transparent transparent transparent;
    display: block;
    width: 0;
    z-index: -1;
}

.tooltip-close {
    position: absolute;
    top: 5px;
    right: 5px;
    background: none;
    border: none;
    color: gray;
    cursor: pointer;
    font-size: 1.2rem;
    line-height: 0.5;
}
.tooltip-close:hover {
    color: white;
}

.chatbot-panel {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 350px;
    height: 550px;
    max-height: 80vh;
    background: rgba(17, 26, 25, 0.95);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(248, 215, 148, 0.3);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: white;
    box-shadow: 0 20px 40px rgba(0,0,0,0.7);
    
    /* Animation initial state */
    opacity: 0;
    transform: translateY(20px) scale(0.9);
    pointer-events: none;
    transform-origin: bottom right;
    transition: all 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.chatbot-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.chat-header {
    background: rgba(40, 65, 57, 0.95);
    padding: 1rem 1.2rem;
    font-family: var(--font-serif);
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(248, 215, 148, 0.3);
    color: var(--khaki);
}

.chatbot-avatar-img-small {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-image: url('ciervo_avatar.png');
    background-size: cover;
    background-position: center;
    border: 1px solid var(--earth);
}

.chat-minimize-btn {
    background: transparent;
    border: none;
    color: var(--khaki);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 0.5;
    padding-bottom: 8px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.chat-minimize-btn:hover {
    opacity: 1;
}

.chat-messages {
    flex: 1;
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    scrollbar-width: thin;
    scrollbar-color: var(--earth) transparent;
}
.chat-messages::-webkit-scrollbar { width: 6px; }
.chat-messages::-webkit-scrollbar-thumb { background: var(--earth); border-radius: 10px; }

/* Chat bubble styling */
.chat-bubble {
    max-width: 85%;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-weight: 300;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre-wrap;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    animation: fadeInBubble 0.3s ease-out forwards;
}

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

.bot-bubble {
    background: rgba(248, 215, 148, 0.1);
    align-self: flex-start;
    border-top-left-radius: 0;
    border: 1px solid rgba(248, 215, 148, 0.15);
}

.user-bubble {
    background: var(--earth);
    color: var(--khaki);
    align-self: flex-end;
    border-top-right-radius: 0;
}

.chat-controls {
    padding: 1rem;
    background: rgba(17, 26, 25, 0.9);
    border-top: 1px solid rgba(248, 215, 148, 0.3);
}

.chat-options {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.chat-option-btn {
    background: transparent;
    border: 1px solid var(--khaki);
    color: var(--khaki);
    padding: 0.8rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chat-option-btn:hover {
    background: rgba(248, 215, 148, 0.15);
}

#chatInput {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(248, 215, 148, 0.3);
    color: white;
    padding: 0.8rem;
    border-radius: 6px;
    font-family: var(--font-sans);
    outline: none;
    transition: border-color 0.2s;
}

#chatInput:focus {
    border-color: var(--khaki);
    background: rgba(255,255,255,0.1);
}

.chat-btn-submit {
    background: var(--khaki);
    color: var(--dark);
    border: none;
    padding: 0 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: transform 0.1s;
}

.chat-btn-submit:active {
    transform: scale(0.95);
}

@media (max-width: 480px) {
    .chatbot-panel {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
        border: none;
    }
    
    .chatbot-widget-container {
        bottom: 0;
        right: 0;
        width: 100%;
    }
    
    .chatbot-toggle-btn {
        margin: 0 20px 20px auto;
    }
}

/* Visítanos Section */
.section-visitanos {
  padding: 8rem 5%;
  background-color: var(--khaki);
  text-align: center;
}

.container-narrow {
  max-width: 900px;
  margin: 0 auto;
}

.section-visitanos .huge-title {
  margin-bottom: 4rem;
}

.footer-map-container {
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 30px 60px rgba(17, 26, 25, 0.2);
  border: 1px solid rgba(40, 65, 57, 0.1);
  background: white;
}

.footer-map-container iframe {
  display: block;
  filter: grayscale(0.2) contrast(1.05);
  transition: all 0.5s ease;
}

.footer-map-container iframe:hover {
  filter: grayscale(0);
}

/* Espacio para Socios Section */
.section-socios {
  padding: 10rem 5%;
  background-color: var(--dark);
  color: var(--khaki);
}

.socios-header {
  text-align: center;
  margin-bottom: 6rem;
}

.section-socios .huge-title {
  color: var(--khaki);
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 0.9rem;
  letter-spacing: 4px;
  opacity: 0.7;
}

.socios-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.socio-card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(248, 215, 148, 0.1);
  border-radius: 10px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  display: flex;
  flex-direction: column;
}

.socio-card:hover {
  transform: translateY(-15px);
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--khaki);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.socio-card-img {
  height: 250px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.socio-card-img::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(to bottom, transparent 50%, rgba(17, 26, 25, 0.8));
}

.socio-card-content {
  padding: 2.5rem;
}

.socio-card-content h3 {
  color: var(--khaki);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.socio-card-content p {
  font-size: 0.9rem;
  line-height: 1.6;
  opacity: 0.8;
  font-weight: 300;
}

@media (max-width: 1024px) {
  .socios-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .section-visitanos, .section-socios {
    padding: 6rem 5%;
  }
  
  .socios-grid {
    grid-template-columns: 1fr;
  }
  
  .huge-title {
    font-size: 3rem;
  }
}