/* ==============================================
    General Styles
============================================== */
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: #f2f2f7;
  color: #1c1c1e;
  padding: 20px;
}
.container {
  max-width: 900px;
  margin: 0 auto;
  background-color: #ffffff;
  padding: 20px 30px;
  border-radius: 14px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* --- Project Page Header --- */
.project-top-header {
    text-align: center;
    padding: 20px 0;
    margin-bottom: 2rem;
}
.coat-of-arms {
    width: 80px;
    height: auto;
    margin-bottom: 1.5rem;
}
.main-org-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1c1c1e;
    margin: 0 0 1rem 0;
}
.project-main-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: #333;
    margin: 0 0 1.25rem 0;
}
.customer-info {
    font-size: 1rem;
    font-weight: 400;
    color: #1c1c1e;
    margin: 0;
}
.project-description-section {
    text-align: left;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}
.section-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 0 0 2rem 0;
}

/* ==============================================
    Navigation (For PDF Pages)
============================================== */
.sticky-nav {
  position: sticky;
  top: 0;
  background: rgba(242, 242, 247, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 10px;
  border-bottom: 1px solid rgba(60, 60, 67, 0.29);
  margin-bottom: 20px;
  z-index: 10;
}
.back-btn {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  background: transparent;
  color: #007aff;
  font-size: 17px;
  text-decoration: none;
  font-weight: 500;
  transition: background-color 0.2s ease;
}
.back-btn:hover {
  background-color: rgba(0, 122, 255, 0.1);
}

/* ==============================================
    Main Content & Cards
============================================== */
.subtitle {
  text-align: center;
  color: #1a2533;
  margin-bottom: 20px;
}
.docs {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
.card {
  display: block;
  padding: 15px;
  border: 1px solid rgba(60, 60, 67, 0.15);
  border-radius: 12px;
  background: white;
  text-decoration: none;
  color: #1f2937;
  font-weight: 500;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* --- Styles for Uploaded Documents (Green Check) --- */
/* We use a CSS Border shape instead of a text character. 
   This guarantees the color is GREEN on all devices (iOS/Android). */
.card.uploaded {
    display: flex;
    align-items: center;
}
.card.uploaded::before {
    content: "";
    display: inline-block;
    width: 7px;
    height: 12px;
    border: solid #28a745; /* Forced Green Color */
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
    margin-right: 12px;
    margin-bottom: 2px;
    flex-shrink: 0;
}

/* --- Styles for Missing Documents (Grey Disabled) --- */
.card.disabled {
    pointer-events: none;
    cursor: default;
    background-color: #f1f3f5;
    color: #999999;
    border-color: #e2e2e2;
    box-shadow: none;
    display: flex;
    align-items: center;
    transition: none;
}
.card.disabled:hover {
    transform: none;
    box-shadow: none;
    background-color: #f1f3f5;
}
.card.disabled::before {
    content: "🚫"; /* This emoji usually displays consistently */
    margin-right: 10px;
    font-size: 1.2em;
    opacity: 1;
    display: inline-block;
}


/* --- STYLES FOR ALLOWED BLOCKS SECTION --- */
.blocks-section {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}
.blocks-section .subtitle {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}
.blocks-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 1rem;
}
.blocks-notice {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    background-color: #dc3545;
    padding: 20px 25px;
    border-radius: 12px;
    border: 2px solid #b02a27;
    margin-top: 2rem;
    display: block;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.35);
}
.block-tag {
    background-color: #28a745;
    color: #ffffff;
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 1.25rem;
    font-weight: 600;
    border: 1px solid #218838;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ==============================================
    PDF Viewer Styles
============================================== */
#pdf-container {
    position: relative;
    border: 1px solid #dbe2e8;
    border-radius: 14px;
    min-height: 60vh;
    background-color: #f8f9fa;
    overflow: hidden;
}
#pdf-viewer {
    width: 100%;
    height: auto;
    display: block;
}
.loader-container {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(248, 249, 250, 0.8);
    z-index: 10;
}
.loader {
    border: 5px solid #e9ecef;
    border-top: 5px solid #007aff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.pdf-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 16px;
    flex-wrap: wrap;
}
.pdf-controls .btn {
  width: 50px;
  height: 50px;
  padding: 0;
  font-size: 22px;
  line-height: 50px;
  text-align: center;
}

/* ==============================================
    General Button Styles
============================================== */
.open-btn {
  text-align: center;
  margin: 15px 0;
}
.btn {
    display: inline-block;
    padding: 12px 20px;
    font-size: 17px;
    font-weight: 600;
    color: #ffffff;
    background-color: #007aff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.2s ease, transform 0.1s ease;
}
.btn:hover {
    background-color: #005ecb;
}
.btn:active {
    transform: scale(0.98);
}

/* ==============================================
    Footer
============================================== */
footer {
  text-align: center;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid rgba(60, 60, 67, 0.29);
  font-size: 14px;
  color: #8e8e93;
}

/* ==============================================
    Responsive Design
============================================== */
@media (min-width: 600px) {
  .docs {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 480px) {
  .pdf-controls > span {
    order: -1;
    width: 100%;
    text-align: center;
    margin-bottom: 5px;
  }
}

/* === Bottom Navigation Bar === */
body {
    padding-bottom: 70px;
}
#bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    z-index: 1000;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.05);
}
.nav-tab {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    color: #555;
    font-size: 11px;
    font-weight: 500;
    transition: background-color 0.2s ease, color 0.2s ease;
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}
.nav-tab:active {
    background-color: rgba(0, 0, 0, 0.05);
}
.nav-tab:hover {
    color: #007aff;
}
.nav-tab svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
    margin-bottom: 2px;
}

/* === Contact Phone List Styles === */
.contact-phones {
    list-style-type: none;
    padding-left: 0;
    margin-top: 10px;
}
.contact-phones li {
    font-size: 1.1rem;
    margin-bottom: 8px;
    font-weight: 500;
}
.contact-phones li a {
    text-decoration: none;
    color: #0056b3;
}
.contact-phones li a:hover {
    text-decoration: underline;
}
/* ==============================================
    Contact Card Styles (Modern & User Friendly)
============================================== */
.phone-section-container {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.contact-card {
    display: flex;
    align-items: center;
    background-color: #f8f9fa; /* Light Grey Background */
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 12px 16px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    /* Remove default link styling */
    color: inherit; 
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.15); /* Subtle Blue Shadow */
    border-color: #007aff;
    background-color: #ffffff;
}

.contact-card:active {
    transform: scale(0.98);
}

/* The Circle Icon Container */
.contact-icon {
    width: 42px;
    height: 42px;
    background-color: #e7f1ff; /* Very Light Blue */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
    flex-shrink: 0;
}

/* The Icon SVG itself */
.contact-icon svg {
    width: 20px;
    height: 20px;
    fill: #007aff; /* Apple Blue Color */
}

/* Text Container */
.contact-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-label {
    font-size: 0.8rem;
    color: #6c757d; /* Grey Label */
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.contact-number {
    font-size: 1.1rem;
    font-weight: 700;
    color: #212529; /* Dark text */
    font-feature-settings: "tnum"; /* Monospaced numbers for better readability */
}
/* ==============================================
    Driver.js: Premium Blue (Clean - No Artifacts)
============================================== */

/* 1. Entrance Animation */
@keyframes popoverEnter {
    0% { opacity: 0; transform: translateY(10px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* 2. The Popover Box */
.driver-popover {
    background-color: rgba(0, 122, 255, 0.94) !important; /* Deep Brand Blue */
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
    
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 16px !important;
    padding: 20px 24px !important;
    max-width: 280px !important;
    box-shadow: 0 12px 32px rgba(0, 60, 180, 0.4) !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    
    animation: popoverEnter 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.driver-popover-arrow { display: none !important; }

/* 3. Typography (Crisp White) */
.driver-popover-title {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    margin-bottom: 8px !important;
    line-height: 1.2 !important;
    letter-spacing: -0.2px !important;
    text-shadow: none !important;
}

.driver-popover-description {
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: rgba(255, 255, 255, 0.95) !important;
    margin-bottom: 20px !important;
    font-weight: 400 !important;
    text-shadow: none !important;
}

/* 4. Footer & Buttons (THE FIX) */
.driver-popover-footer {
    display: flex !important;
    gap: 10px !important;
    margin-top: 0 !important;
    text-shadow: none !important;
}

.driver-popover-footer button {
    text-shadow: none !important;
}

.driver-popover-btn {
    flex: 1 !important;
    height: 42px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;

    /* --- CRITICAL FIXES FOR STRANGE EFFECTS --- */
    text-shadow: none !important;             /* Removes text fuzziness */
    -webkit-appearance: none !important;      /* Removes iOS default button styling */
    appearance: none !important;
    -webkit-tap-highlight-color: transparent !important; /* Removes grey tap box */
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;    /* Clean flat shadow */
    transform: translateZ(0) !important;      /* Forces hardware rendering to clear artifacts */
}

/* Next / Done Button */
.driver-popover-next-btn,
.driver-popover-done-btn {
    background-color: #ffffff !important;
    color: #007aff !important; /* Crisp Blue Text */
}

.driver-popover-next-btn:hover,
.driver-popover-done-btn:hover {
    background-color: #f2f2f2 !important;
    transform: translateY(-1px) !important;
}

/* Previous Button */
.driver-popover-prev-btn {
    background-color: rgba(0, 0, 0, 0.25) !important;
    color: #ffffff !important;
}

.driver-popover-prev-btn:hover {
    background-color: rgba(0, 0, 0, 0.35) !important;
}

/* Close Button */
.driver-popover-close-btn {
    background: transparent !important;
    color: rgba(255, 255, 255, 0.6) !important;
    border-radius: 50% !important;
    padding: 8px !important;
    top: 10px !important;
    right: 10px !important;
    -webkit-appearance: none !important;
}
.driver-popover-close-btn:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}