/* ========================================
   Global Reset & Base Styles
   ======================================== */

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

:root {
    --utech-blue: #0E004E;  /* Primary color*/
    --utech-gold: #FFD201; /* Accent */
    --hover-color: #B0BAFF;
    --text-dark: #141414; /* Text */
    --bg-light: #FFFFFF;
    --header-bg: #EEEEF7;
    --bg-gray: #F2F2F2;
    --drop-shadow: #1414144c;
    --image-shadow: #0000004a;
    --hero-overlay: #14141477;
}

body {
  font-family: 'Roboto', Arial, sans-serif;
  background: var(--bg-gray);
  color: var(--text-dark);
  margin: 0;
  line-height: 1.6;
}

h1, h2, h3 { color: var(--utech-blue);  font-family: 'Times New Roman', Times, serif;}
a { color: var(--utech-gold); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ========================================
   Header 
   ======================================== */

header {
    background-color: #EEEEF7;
    padding: 20px; 
    box-shadow: 0 10px 10px var(--drop-shadow);
    text-align: center;
    position: relative;
}

#header-div{
    max-width: 1200px; 
    margin: 0 auto; 
    display: flex; 
    align-items: center; 
    justify-content: space-between;
}

header h1 {
    margin: 0;
    font-size: 2.2rem;
}

@media screen and (max-width: 768px) {
    #header-div{
        flex-wrap: wrap;
        justify-content: center;
    }
    #utech-logo{
        width: 80%;
    }
}

/* ========================================
   Hero Banner
   ======================================== */
.hero{
    position: relative;
    height: 350px;
    overflow: hidden;
    margin: 20px;
    border-radius: 12px;
}

.hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.overlay {
  position: absolute;
  inset: 0 50% 0 0;          
  background: var(--hero-overlay);
}

.text {
  position: absolute;
  inset: 0 50% 0 0;  
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.text h1 {
  margin: 0;
  color: white;
  font-size: 2.4rem;
}

/* ========================================
   Main
   ======================================== */
main{
    max-width: 60vw; 
    margin: 40px auto; 
    padding: 0 20px;
}


main h1{
    text-align: center; 
    margin-bottom: 25px;
}
    
/* ========================================
    Directions
    ======================================== */
#directions-view{
    background: var(--bg-light); 
    border-radius: 12px; 
    padding: 30px; 
    box-shadow: 4px 4px 12px var(--drop-shadow)
}
#source-input, #destination-input{
        width: 100%; 
    padding: 12px; 
    margin: 8px 0 20px; 
    border: 1px solid var(--utech-blue); 
    border-radius: 6px;
}

main span{
    color: red;
}

#submit-div{
    display: flex;
    justify-content: center;
    align-items: center;
}

#submitBtn{
    background: var(--utech-blue); 
    color: white; 
    border: none; 
    padding: 21px 60px; 
    font-size: 1.5rem; 
    border-radius: 10px; 
    cursor: pointer; 
    font-weight: bold;
}

#submitBtn:hover {
    background: var(--hover-color);
    color: var(--utech-blue);
}

@media screen and (max-width: 768px) {
    main{
        max-width: 100vw;
    }
}

/* ========================================
   Autocomplete Suggestions
   ======================================== */
.source-section, .destination-section{
    position: relative;
}

.suggestions{
    display: none;
    position: absolute;
    min-width: 160px;
    width : 100%;
    box-shadow: 0px 4px 12px 0px var(--drop-shadow);
    z-index: 1;
}

.suggestions li {
    background-color: var(--utech-blue);
    color: var(--bg-light);
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    cursor: pointer;
}

.suggestions li:hover {
    background-color: var(--hover-color);
    color: var(--utech-blue);
}

/* ========================================
   Navigation Bar & Views
   ======================================== */

.navbar {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.nav-btn {
    padding: 12px 24px;
    background: #0E004E;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #F0FFFF;
}

.nav-btn:hover {
    background: #B0BAFF;
    color: #0E004E;
}

.nav-btn.active {
    background: #FFD201;
    color: #0E004E;
}

.view {
    display: none;
    animation: fadeIn 0.4s ease-in;
}

.view.active {
    display: block;
}

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

/* ========================================
   Output Section 
   ======================================== */
.output-section {
    margin-bottom: 30px;
    margin-top: 30px;
    padding: 20px 30px;
    border-radius: 8px;
    box-shadow: 4px 4px 12px var(--drop-shadow);
    background-color: var(--bg-light);
}

/* ========================================
   Text Direction
   ======================================== */

.direction-instructions ol{
    padding-left: 18px;
}

/* ========================================
   Building and Floor Picture
   ======================================== */

.output-row {
    border-radius: 10px;
    display: flex;
    gap: 8px;
}

.output-section.half {
    flex: 1;
    min-width: 280px;
}

div#buildingPictureSection{
    width: 50%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.output-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 10px;
    box-shadow: 0 4px 12px var(--image-shadow);
}

@media screen and (max-width: 768px) {
    .output-row{
        flex-wrap: wrap;
        justify-content: center;
    }
    div#buildingPictureSection{
        width: 100%;
    }
}

/* ========================================
   Carousel
   ======================================== */
.carousel { display: flex; flex-direction: column; align-items: center; }

.carousel-image-wrap {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-img {
    width: 100%;
    border-radius: 8px;
    object-fit: cover;
    box-shadow: 0 4px 12px var(--image-shadow);
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(14,0,78,0.7);
    color: #FFD201;
    border: none;
    font-size: 1.4rem;
    padding: 8px 14px;
    cursor: pointer;
    border-radius: 6px;
    z-index: 2;
    transition: background 0.2s;
}
.carousel-btn:hover { background: rgba(14,0,78,1); }
.carousel-prev { left: 8px; }
.carousel-next { right: 8px; }

.carousel-caption {
    margin-top: 10px;
    font-size: 0.9rem;
    color: var(--text-dark);
    text-align: center;
    font-style: italic;
}

.carousel-dots {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.carousel-dot {
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--utech-blue);
    opacity: 0.3;
    cursor: pointer;
    transition: opacity 0.2s;
}
.carousel-dot.active { opacity: 1; background: var(--utech-gold); }

/* ========================================
   Route Map
   ======================================== */

#mapSection {
    position: relative;
    overflow: hidden;
}

#mapContent {
    width: 100%;
    margin-top: 10px;
}

/* ========================================
   General Canvas Styles
   ======================================== */

canvas {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px var(--image-shadow);
    background-color: var(--bg-light);
}
   
/* ========================================
   Error Messages
   ======================================== */

.error-container {
    margin-top: 20px;
    padding: 15px;
    background: #fee;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.error-container p {
    color: #c0392b;
    font-weight: 500;
}

/* ========================================
   Footer
   ======================================== */

footer{
    background: var(--utech-blue);
    color: var(--bg-light);
    text-align: center; 
    padding: 20px; 
    margin-top: 60px;
}

#bible-verse{
    padding: 20px 0px 0px;
    font-size: 1.6rem;
    color: var(--utech-gold);
    display: flex;
    justify-content: center;
}

footer a{
    color: var(--utech-gold);
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .pano-viewer-container {
    height: 300px;
  }

  .pano-modal-inner {
    max-height: 95vh;
  }

  .pano-modal-title {
    font-size: 0.82rem;
  }

  .pano-scene-label {
    max-width: 160px;
  }

  .pano-nav-btn {
    width: 32px;
    height: 32px;
    font-size: 0.95rem;
  }
}