/* =========================================
   1. CUSTOM FONTS
   ========================================= */
@font-face {
    font-family: 'cyurban';
    src: url('fonts/cyurban.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

/* =========================================
   2. GLOBAL VARIABLES (COLOR PALETTE)
   ========================================= */
:root {
    /* --- Main Brand Colors --- */
    --primary-color: #2563eb;       /* Modern Blue */
    --accent-color: rgb(21, 236, 6);/* Neon Green (Hover/Accents) */
    
    /* --- Backgrounds --- */
    --bg-body: #0f172a;             /* Main Dark Background */
    --bg-card: #1e293b;             /* Card Background */
    --bg-nav: rgba(15, 23, 42, 0.8);/* Semi-transparent Navbar */
    --bg-overlay: rgba(0, 0, 0, 0.4); /* Hero Image Overlay */
    
    /* --- Text Colors --- */
    --text-white: #ffffff;          /* Pure White (Headers) */
    --text-light: #f8fafc;          /* Off-White (Body Text) */
    --text-muted: #94a3b8;          /* Gray (Descriptions/Subtext) */
    
    /* --- Borders & UI Details --- */
    --border-color: #334155;        /* Borders for cards/nav */
    --shadow-color: rgba(37, 99, 235, 0.15); /* Glow effect */
    
    /* --- Typography --- */
    --font-main: 'cyurban', sans-serif; 
}

/* =========================================
   3. RESET & GLOBAL STYLES
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-light);
    line-height: 1.6;
}

a { 
    text-decoration: none; 
    color: inherit; 
    transition: color 0.3s ease;
}

/* --- Typography Alignment --- */
/* Headers are usually Centered or Left, specifically defined later */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-main);
    color: var(--text-white);
}

p, li {
    text-align: justify;
}

h3 {
    text-align: center;
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }


/* =========================================
   4. LISTS & BULLETS
   ========================================= */

/* Default: Hide bullets (Clean for Navbar/Footer) */
ul { 
    list-style: none; 
}

/* Override: Show bullets inside Content Areas */
.card ul, .feature-list, .feature-col ul {
    list-style: disc;
    padding-left: 1.5rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
    color: var(--text-light);
}

.card ul li, .feature-list li, .feature-col ul li {
    margin-bottom: 0.5rem;
    padding-left: 0.5rem;
}


/* =========================================
   5. NAVIGATION
   ========================================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.0rem 5%;
    background-color: var(--bg-nav);
    backdrop-filter: blur(5px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    font-size: 1.2rem;
    display: inline-flex;
    align-items: center;
    min-width: 50px;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Typing Effect in Nav */
.type-text {
    max-width: 0;
    overflow: hidden;
    white-space: nowrap;
    opacity: 0;
    transition: max-width 1.2s steps(15), opacity 0.5s linear;
}

.nav-links a:hover .type-text {
    max-width: 160px; 
    opacity: 1;
}

.nav-links a:not(.btn-primary):hover::after {
    content: '|';
    animation: blink 1s infinite;
    margin-left: 2px;
    font-weight: bold;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* =========================================
   6. BUTTONS
   ========================================= */
.btn-primary, .btn-secondary, .btn-social {
    display: inline-block;
    padding: 0.7rem 1.5rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

/* Primary */
.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-white);
    border: 1px solid var(--primary-color);
}

.btn-primary:hover {
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.55);
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* Secondary */
.btn-secondary {
    background-color: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-light);
}

.btn-secondary:hover {
    border-color: var(--accent-color);
    color: var(--accent-color);
    transform: translateY(-2px);
}

/* Social Buttons */
.social-buttons-container {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-social {
    border: 1px solid var(--text-muted);
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-social svg {
    width: 20px;
    height: 20px;
    fill: var(--text-light);
    transition: fill 0.3s;
}

.btn-social:hover {
    border-color: var(--accent-color);
    transform: translateY(-2px);
}

.btn-social:hover svg {
    fill: var(--accent-color);
}

/* =========================================
   7. HERO SECTION
   ========================================= */
.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1rem;
    position: relative;
    background-image: url('images/cyurban_background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: var(--text-white);
}

.hero::before {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: var(--bg-overlay);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 1200px; 
    width: 90%;
}

.hero h2 {
    font-size: clamp(2rem, 5vw, 4.5rem);
    font-weight: 800;
    margin-bottom: 1rem;
    text-align: center;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto 2rem auto;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

/* =========================================
   8. SECTIONS & CARDS
   ========================================= */
.container {
    padding: 5rem 5%; 
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    text-align: center;
}

/* Standard Grids */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.grid-2-cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
}

/* Card Styles */
.card {
    background: linear-gradient(145deg, var(--bg-card), var(--bg-body));
    
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.3s, border-color 0.3s;
    position: relative;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.card h3 {
    margin-bottom: 1rem;
    text-align: center;
}

.card p {
    color: var(--text-muted);
}

.card img {
    max-width: 100%;
    height: auto;
    margin-top: 1.5rem;
    border-radius: 8px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* =========================================
   9. FEATURE CARD (Zoning Decoder)
   ========================================= */
.feature-card {
    background: 
        linear-gradient(145deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.9)), /* High opacity overlay */
        url('images/cdi_magnify_large.png'); /* Your image path here */
        background-size: auto, 40%;
        background-position: center;
        background-repeat: no-repeat;
    border: 1px solid var(--primary-color);
    border-radius: 12px;
    box-shadow: 0 0 20px var(--shadow-color);
    display: grid;
    grid-template-columns: 1.2fr 1.2fr 0.8fr;
    overflow: hidden;
    margin-bottom: 2rem;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 50px rgba(37, 99, 235, 0.55);
}

.feature-col {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/*
.feature-image-col {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0,0,0,0.2);
    padding: 1rem;
}

.feature-image-col img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 250px;
}*/

.blue-badge {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    background-color: var(--primary-color);
    color: var(--text-white);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    /*text-transform: uppercase;*/
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

/* =========================================
   10. SPECIAL INTERACTIVE ELEMENTS
   ========================================= */
.icon-badge {
    position: absolute;
    top: 1.2rem;
    right: 1.2rem;
    z-index: 5;
}

.icon-badge svg {
    width: 32px;
    height: 32px;
    fill: var(--text-light);
    opacity: 0.5;
}

/* Leadership Card Reveal */
.leadership-card {
    overflow: hidden;
    cursor: pointer;
}

.card-default {
    transition: opacity 0.3s, transform 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.team-reveal {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--bg-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.leadership-card:hover .team-reveal { transform: translateY(0); }
.leadership-card:hover .card-default { opacity: 0.2; transform: scale(0.95); }

/* Phone Button */
.phone-btn { min-width: 140px; }
.phone-btn .hover-text { display: none; }
.phone-btn:hover .default-text { display: none; }
.phone-btn:hover .hover-text { display: inline-block; }

/* Map Popup */
.map-wrapper { position: relative; display: inline-block; }
.map-popup {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 130%;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 200px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    z-index: 100;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}
.map-wrapper:hover .map-popup { visibility: visible; opacity: 1; top: 120%; }
.map-popup iframe { width: 100%; height: 100%; border: 0; }

/* =========================================
   11. FOOTER
   ========================================= */
footer {
    background-color: var(--bg-body);
    border-top: 1px solid var(--border-color);
    padding: 4rem 5% 2rem 5%;
    font-size: 0.9rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: var(--text-light);
    margin-bottom: 1.2rem;
    font-weight: 700;
    /*text-transform: uppercase;*/
    letter-spacing: 1px;
    font-size: 0.85rem;
    text-align: left;
}

.footer-col ul li { 
    margin-bottom: 0.8rem;
    text-align: left;
}

.footer-col ul li a {
    color: var(--text-muted);
    transition: color 0.2s;
}
.footer-col ul li a:hover { color: var(--accent-color); }

.social-icon {
    width: 20px; 
    height: 20px; 
    fill: var(--text-muted);
    transition: fill 0.3s, transform 0.3s;
    vertical-align: middle;
}
.footer-col a:hover .social-icon {
    fill: var(--accent-color);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 2rem;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer-legal { display: flex; gap: 1.5rem; }

/* =========================================
   12. MOBILE / RESPONSIVE
   ========================================= */
.hamburger { display: none; cursor: pointer; }
.bar {
    display: block; width: 25px; height: 3px;
    margin: 5px auto; background-color: white;
}

@media (max-width: 900px) {
    .feature-card, .grid-2-cols { grid-template-columns: 1fr; }
    .feature-image-col { order: -1; }
}

@media (max-width: 768px) {
    .hamburger { display: block; }
    
    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--bg-body);
        width: 100%;
        text-align: center;
        padding: 2rem 0;
        transition: 0.3s;
        border-bottom: 1px solid var(--border-color);
    }

    .nav-links.active { left: 0; }
    .hero h2 { font-size: 2.5rem; }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }
}


/* =========================================
   13. SAMPLE CHAT
   ========================================= */

.chat-frame {
    width: 100%;
    height: 400px; /* Adjust height to fit your tool */
    border: none;  /* Removes the ugly border */
    display: block;
    /*background-color: var(--bg-card);  Matches your card color */
}

/* --- CARD CONTAINER --- */
.chat-card {
    width: 320px;
    height: 400px; /* Fixed height is REQUIRED for scrolling */ 
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Clips the content */
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-header {
    text-align: center;
    padding: 10px;
    font-weight: bold;
    border-bottom: 1px solid #eee;
    z-index: 10;
}

/* --- LIST --- */
.chat-list {
    flex: 1; /* Fills remaining space */
    overflow-y: auto; /* Enables scrolling */
    padding: 20px;
    padding-top: 10px;
    margin: 0;
    list-style: none;
    scroll-behavior: smooth;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Hide scrollbar for cleaner look */
.chat-list::-webkit-scrollbar { display: none; }
.chat-list { -ms-overflow-style: none; scrollbar-width: none; }

/* --- MESSAGE BUBBLES --- */
.message {
    /* HIDDEN BY DEFAULT */
    display: none; 
    position: relative;
    max-width: 220px;
    margin-bottom: 15px;
    padding: 10px 16px;
    line-height: 20px;
    word-wrap: break-word;
    border-radius: 10px;
    font-size: 15px;
    clear: both; /* Ensures they stack properly */
    text-align: left;
}

/* This class is added by JS to trigger animation */
.message.appearing {
    display: block; /* Make it exist */
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

/* KEYFRAMES */
@keyframes popIn {
    0% { opacity: 0; transform: translateY(20px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}


/* Sent */
.message.sent {
    float: right; /* Use float for cleaner stacking in pure CSS */
    color: white;
    background: var(--primary-color);
}
.message.sent::before {
    right: -7px;
    background-color: var(--primary-color);
    border-bottom-left-radius: 8px 7px;
}
.message.sent::after {
    right: -26px;
    border-bottom-left-radius: 5px;
}

/* Received */
.message.received {
    float: left;
    color: black;
    background: var(--text-light);
}
.message.received::before {
    left: -7px;
    background-color: var(--text-light);
    border-bottom-right-radius: 8px 7px;
}
.message.received::after {
    left: -26px;
    border-bottom-right-radius: 5px;
}
