/* Wilderness Guide Palette */
:root {
  --mustard-yellow: #E5B05E;
  --terracotta: #C86B55;
  --night-teal: #2C5E5E;
  --olive-green: #8DA36F;
  --charcoal-brown: #3D3531;
  --paper-white: #F4F1EA;
  --sky-blue: #A5C9CA;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  width: 100%;
  min-height: 100vh;
  background-image: url('assets/bg-north-carolina.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  color: var(--charcoal-brown);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  overflow-x: hidden;
  padding: 20px 0;
  position: relative;
}

/* Floating Balloon */
.balloon {
  position: fixed;
  top: 10vh;
  left: 362px; /* Position in the gap between columns */
  transform: translateX(-50%);
  width: 18vw;
  height: auto;
  z-index: 0;
  pointer-events: none;
  animation: balloonBounce 3s ease-in-out infinite;
}


@keyframes balloonBounce {
  0%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  50% {
    transform: translateX(-50%) translateY(-20px);
  }
}

@keyframes balloonBounceHome {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
}

/* Main Layout - Two Column Structure */
.main-layout {
  display: flex;
  gap: 24px;
  max-width: 1200px;
  width: 90%;
  align-items: flex-start;
  position: relative;
  z-index: 2;
}

/* Ensure primary content stacks above the fixed balloon */
header, .site-header, .main-layout, .home-layout, .home-card, .left-column, .right-column, main, footer {
  position: relative;
  z-index: 3;
}

/* Left Column */
.left-column {
  flex: 0 0 350px;
  background-color: rgba(244, 241, 234, 0.9);
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 20px 60px rgba(61, 53, 49, 0.3);
}

.left-column h2 {
  font-family: 'Lobster', cursive;
  font-size: 28px;
  color: var(--night-teal);
  margin-bottom: 16px;
  font-weight: 400;
  line-height: 1.3;
}

.left-column p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--charcoal-brown);
}

/* Sticky Ad in Left Column */
.left-ad-sticky {
  margin-top: 24px;
  position: sticky;
  top: 20px;
}

.vpn-container {
  background-color: rgba(244, 241, 234, 0.9);
  min-height: 600px;
  flex: 1;
  max-width: 500px;
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(61, 53, 49, 0.3);
  overflow: hidden;
  z-index: 10;
}

/* Header */
header {
  background-color: var(--night-teal);
  padding: 20px;
  text-align: center;
  border-bottom: 3px solid var(--olive-green);
}

header h1 {
  color: var(--paper-white);
  font-family: 'Lobster', cursive;
  font-size: 36px;
  margin-bottom: 12px;
  font-weight: 400;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.status-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--terracotta);
  transition: all 0.3s ease;
}

.status-dot.connected {
  background-color: var(--olive-green);
  box-shadow: 0 0 10px var(--olive-green);
}

.status-text {
  color: var(--paper-white);
  font-size: 14px;
  font-weight: 500;
}

/* Main Content */
main {
  flex: 1;
  padding: 20px;
}

/* Connection Info */
.connection-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.info-card {
  background-color: white;
  border: 2px solid var(--olive-green);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-label {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--night-teal);
  font-weight: 600;
  letter-spacing: 0.5px;
}

.info-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--charcoal-brown);
}

/* Server List */
.server-list h2 {
  font-family: 'Lobster', cursive;
  font-size: 22px;
  color: var(--terracotta);
  margin-bottom: 12px;
  text-transform: none;
  letter-spacing: 0.5px;
  font-weight: 400;
}

.servers {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
  max-height: 240px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Custom Scrollbar */
.servers::-webkit-scrollbar {
  width: 6px;
}

.servers::-webkit-scrollbar-track {
  background: var(--paper-white);
  border-radius: 3px;
}

.servers::-webkit-scrollbar-thumb {
  background: var(--olive-green);
  border-radius: 3px;
}

.servers::-webkit-scrollbar-thumb:hover {
  background: var(--night-teal);
}

/* Server Item */
.server-item {
  background-color: white;
  border: 2px solid var(--olive-green);
  border-radius: 8px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  transition: all 0.2s ease;
}

.server-item:hover {
  border-color: var(--mustard-yellow);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(61, 53, 49, 0.1);
}

.server-item.active {
  background-color: var(--mustard-yellow);
  border-color: var(--mustard-yellow);
}

.server-item.active .server-name,
.server-item.active .server-latency {
  color: var(--charcoal-brown);
}

.server-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.server-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--charcoal-brown);
}

.server-location {
  font-size: 11px;
  color: var(--night-teal);
}

.server-latency {
  font-size: 12px;
  font-weight: 600;
  color: var(--olive-green);
}

/* Actions */
.actions {
  margin-top: 16px;
}

.btn-disconnect {
  width: 100%;
  padding: 14px;
  background-color: var(--terracotta);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.btn-disconnect:hover:not(:disabled) {
  background-color: #B85844;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(200, 107, 85, 0.3);
}

.btn-disconnect:disabled {
  background-color: #ccc;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Footer */
footer {
  background-color: var(--night-teal);
  padding: 12px;
  text-align: center;
  border-top: 2px solid var(--olive-green);
}

.footer-text {
  color: var(--paper-white);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.5px;
}

/* Footer links */
.footer-text a {
  color: var(--paper-white);
  text-decoration: underline;
  margin: 0 6px;
  font-weight: 600;
}

.footer-links {
  display: inline-block;
  margin-left: 8px;
}

/* FAQ Styling */
.faq-content {
  padding: 24px;
}

.faq-item {
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--olive-green);
}

.faq-item:last-child {
  border-bottom: none;
}

.faq-item h3 {
  font-family: 'Lobster', cursive;
  font-size: 20px;
  color: var(--terracotta);
  margin-bottom: 10px;
  font-weight: 400;
}

.faq-item p {
  font-size: 14px;
  line-height: 1.7;
  color: var(--charcoal-brown);
}

.faq-item a {
  color: var(--night-teal);
  text-decoration: underline;
  font-weight: 600;
}

.back-link {
  display: inline-block;
  color: var(--night-teal);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 16px;
  background-color: rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  transition: all 0.2s ease;
}

.back-link:hover {
  background-color: rgba(255, 255, 255, 0.9);
  transform: translateX(-4px);
}

/* Loading State */
.server-item.loading {
  opacity: 0.6;
  pointer-events: none;
}

/* Animations */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.status-dot.connecting {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Advertisement Containers */
.ad-container {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 16px;
  background-color: rgba(244, 241, 234, 0.5);
}

.ad-top {
  margin-bottom: 20px;
}

.ad-bottom {
  margin-top: 20px;
}

.ad-placeholder {
  background: linear-gradient(135deg, rgba(141, 163, 111, 0.1), rgba(165, 201, 202, 0.1));
  border: 2px dashed var(--olive-green);
  border-radius: 8px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 90px;
  box-shadow: 0 4px 12px rgba(61, 53, 49, 0.1);
}

.ad-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--olive-green);
  font-weight: 600;
}

.ad-content {
  font-size: 14px;
  color: var(--charcoal-brown);
  font-weight: 600;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 12px 24px;
  border-radius: 6px;
}

/* Ad Box Styling */
.ad-inline-box {
  max-width: 300px;
  width: 100%;
  min-height: 250px;
}

/* Responsive Design */
@media (max-width: 768px) {
  body {
    padding: 10px 0;
  }

  .balloon {
    display: none;
  }
  
  .main-layout {
    flex-direction: column;
    width: 95%;
    gap: 16px;
  }
  
  .left-column {
    flex: 1;
    width: 100%;
    padding: 24px;
  }
  
  .left-column h2 {
    font-size: 24px;
  }
  
  .left-column p {
    font-size: 14px;
  }
  
  .left-ad-sticky {
    position: static;
    margin-top: 20px;
  }
  
  .vpn-container {
    width: 100%;
    max-width: 100%;
    min-height: auto;
  }
  
  header h1 {
    font-size: 28px;
  }
  
  .connection-info {
    grid-template-columns: 1fr;
  }
  
  .servers {
    max-height: 300px;
  }
  
  .ad-container {
    padding: 12px;
  }
  
  .ad-placeholder {
    padding: 16px;
    min-height: 70px;
  }
  
  .ad-content {
    font-size: 12px;
    padding: 10px 20px;
  }
}

@media (max-width: 480px) {
  .left-column {
    padding: 20px;
  }
  
  .left-column h2 {
    font-size: 20px;
  }
  
  .left-column p {
    font-size: 13px;
  }
  
  .vpn-container {
    border-radius: 12px;
  }
  
  header {
    padding: 16px;
  }
  
  header h1 {
    font-size: 24px;
  }
  
  main {
    padding: 16px;
  }
  
  .server-name {
    font-size: 13px;
  }
  
  .server-location {
    font-size: 10px;
  }
  
  .server-list h2 {
    font-size: 18px;
  }
  
  .ad-container {
    padding: 8px;
  }
  
  .ad-placeholder {
    padding: 12px;
    min-height: 60px;
  }
  
  .ad-inline-box {
    max-width: 100%;
    min-height: 200px;
  }
  
  .faq-content {
    padding: 16px;
  }
  
  .faq-item h3 {
    font-size: 18px;
  }
  
  .faq-item p {
    font-size: 13px;
  }
}

/* =============================================
   HOMEPAGE STYLES
   ============================================= */

/* Home Layout - centered like other pages but wider */
.home-layout {
  width: 90%;
  max-width: 720px;
  position: relative;
  z-index: 2;
}

.home-card {
  background-color: rgba(244, 241, 234, 0.9);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(61, 53, 49, 0.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Home Content */
.home-content {
  padding: 32px;
}

/* Home Hero */
.home-hero {
  text-align: center;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--olive-green);
  margin-bottom: 32px;
}

.home-hero h2 {
  font-family: 'Lobster', cursive;
  font-size: 32px;
  color: var(--night-teal);
  margin-bottom: 12px;
  font-weight: 400;
}

.home-hero p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--charcoal-brown);
  margin-bottom: 24px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* CTA Button */
.home-cta {
  display: inline-block;
  background-color: var(--mustard-yellow);
  color: var(--charcoal-brown);
  padding: 14px 36px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.2s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.home-cta:hover {
  background-color: #D9A350;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(229, 176, 94, 0.4);
}

/* Features */
.home-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--olive-green);
}

.home-feature {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.home-feature-icon {
  font-size: 28px;
  flex-shrink: 0;
  line-height: 1;
  margin-top: 2px;
}

.home-feature strong {
  display: block;
  font-size: 14px;
  color: var(--night-teal);
  margin-bottom: 4px;
}

.home-feature p {
  font-size: 13px;
  line-height: 1.5;
  color: var(--charcoal-brown);
  opacity: 0.8;
}

/* How It Works */
.home-steps {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--olive-green);
}

.home-steps h2 {
  font-family: 'Lobster', cursive;
  font-size: 22px;
  color: var(--terracotta);
  margin-bottom: 16px;
  font-weight: 400;
}

.home-steps-list {
  display: flex;
  gap: 16px;
}

.home-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  background: white;
  padding: 14px 16px;
  border-radius: 8px;
  border: 2px solid var(--olive-green);
}

.home-step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--mustard-yellow), var(--terracotta));
  color: white;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.home-step p {
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal-brown);
}

/* Server Locations */
.home-servers {
  margin-bottom: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--olive-green);
}

.home-servers h2 {
  font-family: 'Lobster', cursive;
  font-size: 22px;
  color: var(--terracotta);
  margin-bottom: 16px;
  font-weight: 400;
}

.home-server-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-server-tag {
  background: white;
  border: 2px solid var(--olive-green);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--charcoal-brown);
  transition: all 0.2s ease;
}

.home-server-tag:hover {
  border-color: var(--mustard-yellow);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(61, 53, 49, 0.1);
}

/* Bottom CTA */
.home-bottom-cta {
  text-align: center;
}

.home-bottom-cta p {
  margin-top: 16px;
}

.home-text-link {
  color: var(--night-teal);
  text-decoration: underline;
  font-weight: 600;
  font-size: 14px;
}

/* Responsive - Homepage */
@media (max-width: 768px) {
  .home-layout {
    width: 95%;
  }

  .home-hero h2 {
    font-size: 26px;
  }

  .home-features {
    grid-template-columns: 1fr;
  }

  .home-steps-list {
    flex-direction: column;
  }

  .home-server-grid {
    gap: 8px;
  }

  .home-server-tag {
    font-size: 13px;
    padding: 6px 12px;
  }
}

@media (max-width: 480px) {
  .home-content {
    padding: 24px 20px;
  }

  .home-hero h2 {
    font-size: 22px;
  }
}

/* Hide balloon on mobile */
@media (max-width: 768px) {
  .balloon {
    display: none;
  }
}

/* Modal Styles */
.modal {
  display: none !important; 
  position: fixed; 
  z-index: 1000; 
  left: 0;
  top: 0;
  width: 100%; 
  height: 100%; 
  overflow: auto; 
  background-color: rgba(0,0,0,0.5); 
  animation: fadeIn 0.3s;
}

.modal.show {
  display: block !important;
}

.modal-content {
  background-color: var(--paper-white);
  margin: 15% auto; 
  padding: 32px;
  border: 3px solid var(--olive-green);
  border-radius: 16px;
  width: 400px;
  max-width: 90%;
  text-align: center;
  position: relative;
  box-shadow: 0 20px 60px rgba(61, 53, 49, 0.4);
  animation: slideDown 0.3s;
}

.close-modal {
  color: var(--night-teal);
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.close-modal:hover,
.close-modal:focus {
  color: var(--terracotta);
  text-decoration: none;
  cursor: pointer;
}

.modal h2 {
  font-family: 'Lobster', cursive;
  color: var(--terracotta);
  font-size: 28px;
  margin-bottom: 16px;
}

.modal p {
  color: var(--charcoal-brown);
  margin-bottom: 24px;
  font-size: 16px;
  line-height: 1.5;
}

.install-btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--mustard-yellow), var(--terracotta));
  color: white;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 30px;
  font-weight: 700;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(200, 107, 85, 0.4);
}

.install-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200, 107, 85, 0.6);
}

@keyframes fadeIn {
  from {opacity: 0;}
  to {opacity: 1;}
}

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