/* Blog Post Rich-Text Content Styling (Quill Output) */
.post-content {
    font-size: 1.05rem;
    color: var(--text-primary);
}
.post-content h1, .post-content h2, .post-content h3 {
    color: var(--cyan-electric);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 700;
}
.post-content p {
    margin-bottom: 1.2em;
}
.post-content ul, .post-content ol {
    margin-bottom: 1.2em;
    padding-left: 20px;
}
.post-content li {
    margin-bottom: 0.5em;
}
.post-content blockquote {
    border-left: 4px solid var(--cyan-electric);
    padding: 10px 15px;
    margin: 1.5em 0;
    background: rgba(0, 184, 255, 0.05);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-secondary);
}
.post-content pre.ql-syntax {
    background: rgba(0, 0, 0, 0.4);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow-x: auto;
    color: #e5c07b;
    font-family: 'Courier New', Courier, monospace;
    margin-bottom: 1.5em;
}
.post-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1em 0;
}

/* Grid Layout for 10-20+ Blog Posts */
#posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    width: 100%;
    margin-top: 30px;
}

#posts-container .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#posts-container .post-summary {
    flex-grow: 1; /* Pushes the edit/delete buttons to the bottom */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Truncates long text to keep cards uniform */
    -webkit-box-orient: vertical;
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}
:root {
    --bg-deep: #050a10;
    --navy-brand: #0A1F44;
    --cyan-electric: #00B8FF;
    --text-main: #f8fafc;
    --glass: rgba(255, 255, 255, 0.03);
    --border: rgba(255, 255, 255, 0.1);
    --text-primary: var(--text-main);
    --text-secondary: rgba(248, 250, 252, 0.7);
    --accent-color: var(--cyan-electric);
    --nav-glow: rgba(0, 184, 255, 0.05);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 110px; /* Prevents the sticky navbar from covering the targeted section */
}

body {
    background-color: var(--bg-deep);
    color: var(--text-main);
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* Hero Section */
header {
    width: 100%;
    min-height: 60vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle at top center, rgba(10, 31, 68, 0.8) 0%, var(--bg-deep) 70%);
    padding: 60px 20px;
}

.hero-split {
    width: 100%;
    max-width: 1200px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.hero-content {
    flex: 1;
    text-align: left;
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.badge {
    display: inline-block;
    border: 1px solid var(--cyan-electric);
    padding: 5px 15px;
    border-radius: 20px;
    color: var(--cyan-electric);
    font-size: 0.8rem;
    margin-bottom: 20px;
    background: rgba(0, 184, 255, 0.05);
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -1.5px;
    margin: 0 0 20px 0;
    line-height: 1.1;
    background: linear-gradient(to bottom, #fff, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    opacity: 0.8;
    font-size: 1.15rem;
    line-height: 1.6;
    max-width: 550px;
    margin-bottom: 30px;
}

.hero-ctas {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* Interactive Code Window Visual */
.code-window {
    background: rgba(5, 10, 16, 0.8);
    border: 1px solid var(--cyan-electric);
    border-radius: 12px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 15px 35px rgba(0, 184, 255, 0.15);
    overflow: hidden;
    backdrop-filter: blur(10px);
    transform: perspective(1000px) rotateY(-15deg);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.code-window:hover {
    transform: perspective(1000px) rotateY(0deg) scale(1.02);
    box-shadow: 0 20px 45px rgba(0, 184, 255, 0.3);
}

.code-header {
    background: rgba(255, 255, 255, 0.05);
    padding: 12px 15px;
    display: flex;
    gap: 8px;
    border-bottom: 1px solid var(--border);
}

.code-header .dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f56; }
.dot.yellow { background: #ffbd2e; }
.dot.green { background: #27c93f; }

.code-body {
    padding: 20px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.95rem;
    line-height: 1.7;
    text-align: left;
}

.code-body code { display: block; color: var(--text-main); }
.cw-keyword { color: #c678dd; }
.cw-var { color: #e06c75; }
.cw-class { color: #e5c07b; }
.cw-method { color: #61afef; }
.cw-prop { color: #d19a66; }
.cw-string { color: #98c379; }
.cw-bool { color: #d19a66; }

@media (max-width: 900px) {
    .hero-split { flex-direction: column; text-align: center; }
    .hero-content { align-items: center; text-align: center; }
    .hero-ctas { justify-content: center; }
    .hero-visual { justify-content: center; width: 100%; margin-top: 20px; }
    .code-window { transform: none; }
    .code-window:hover { transform: scale(1.02); }
}

/* Bento Grid */
.container {
    max-width: 1200px;
    padding: 40px 20px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: minmax(200px, auto);
    gap: 20px;
}

.card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 30px;
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

/* Spotlight Hover Effect controlled by JS */
.card::before {
    content: '';
    position: absolute;
    top: var(--y, 0);
    left: var(--x, 0);
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle closest-side, rgba(0, 184, 255, 0.15), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.card:hover {
    border-color: var(--cyan-electric);
    transform: scale(1.02);
    background: rgba(0, 184, 255, 0.02);
}

.card:hover::before {
    opacity: 1;
}

/* Specific Grid Spans for Visual Interest */
.wide { grid-column: span 2; }
.tall { grid-row: span 2; }

/* Bento-Grid Glass Buttons */
.btn-secure {
    background: var(--glass);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 16px;
    color: var(--cyan-electric);
    padding: 12px 28px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.btn-secure:hover {
    background: rgba(0, 184, 255, 0.1);
    border-color: var(--cyan-electric);
    color: #fff;
    transform: scale(1.05);
    box-shadow: 0 8px 24px rgba(0, 184, 255, 0.15);
}

/* Download Button for Media Assets */
.btn-download {
    background: transparent;
    border: 1px solid var(--cyan-electric);
    color: var(--cyan-electric);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-block;
    text-decoration: none;
    box-sizing: border-box;
}

.btn-download:hover {
    background: var(--cyan-electric);
    color: var(--navy-brand);
}

/* Press & Media Card Utilities */
.card-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
}

.press-date {
    font-size: 0.85rem;
    color: var(--cyan-electric);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.press-title {
    color: var(--text-main);
    margin: 0.5rem 0 1rem;
    font-size: 1.25rem;
}

.read-more {
    color: var(--cyan-electric);
    margin-top: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    transition: padding-left 0.3s ease;
}

.card-link:hover .read-more {
    padding-left: 10px;
}

/* Utility Classes previously used inline */
.bg-navy { background: var(--navy-brand); }
.bg-white { background: #fff; color: var(--navy-brand); }
.ecom-visual { margin-top: 100px; opacity: 0.5; }

/* Secure Form Styling */
#contactForm {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 20px;
}

#contactForm input, 
#contactForm textarea,
#contactForm select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    padding: 15px;
    border-radius: 8px;
    color: var(--text-main);
    font-family: inherit;
    font-size: 1rem;
}

#contactForm select option {
    background: var(--bg-deep);
    color: var(--text-main);
}

#contactForm input:focus, 
#contactForm textarea:focus,
#contactForm select:focus {
    outline: none;
    border-color: var(--cyan-electric);
    background: rgba(0, 184, 255, 0.05);
}

#formStatus {
    opacity: 0;
    transition: opacity 0.3s ease;
    font-weight: 600;
    text-align: center;
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #fff;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: transform 0.3s ease;
}
.whatsapp-float:hover {
    transform: scale(1.1);
}

/* Responsive Design */
@media (max-width: 900px) {
    .container { grid-template-columns: repeat(2, 1fr); }
    .wide { grid-column: span 2; }
}

@media (max-width: 600px) {
    .container { grid-template-columns: 1fr; }
    .wide, .tall { grid-column: span 1; grid-row: span 1; }
}

/* Navigation Bar */
.navbar {
    width: 90%;
    max-width: 1200px;
    margin: 20px auto 0;
    background: rgba(0, 184, 255, 0.15);
    backdrop-filter: blur(20px);
    border: 1px solid var(--cyan-electric);
    border-radius: 24px;
    padding: 0 20px;
    position: sticky;
    top: 20px; /* Maintains the floating effect when scrolling */
    z-index: 1000;
    display: flex;
    justify-content: center;
    box-shadow: 0 8px 32px 0 rgba(0, 184, 255, 0.3);
}

.nav-container {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-main);
    text-decoration: none;
}

.nav-links {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links li a {
    color: var(--text-main);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid transparent;
    position: relative;
    transition: all 0.3s ease;
}

.nav-links li a:hover,
.nav-links li a.active {
    background: rgba(0, 184, 255, 0.2);
    border-color: var(--cyan-electric);
    color: #fff;
}

/* Dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: rgba(10, 31, 68, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid var(--cyan-electric);
    border-radius: 16px;
    list-style: none;
    padding: 10px 0;
    margin-top: 10px;
    min-width: 200px;
    box-shadow: 0 8px 32px 0 rgba(0, 184, 255, 0.2);
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    margin: 0 10px;
    padding: 12px 15px;
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.dropdown-menu li a:hover,
.dropdown-menu li a.active {
    background: rgba(0, 184, 255, 0.2);
    border-color: var(--cyan-electric);
    color: #fff;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 3px;
    transition: all 0.3s ease-in-out;
}

@media (max-width: 900px) {
    .menu-toggle { display: flex; }
    .nav-container { flex-wrap: wrap; height: auto; min-height: 70px; }
    
    .nav-links {
        width: 100%;
        flex-direction: column;
        display: none;
        padding: 10px 0 20px 0;
    }
    .nav-links.active { display: flex; }
    
    .dropdown-menu {
        position: static;
        background: transparent;
        border: none;
        box-shadow: none;
        text-align: center;
        min-width: 100%;
        display: none;
        margin-top: 0;
        padding: 10px 0;
    }
    .dropdown:hover .dropdown-menu { display: block; }
    
    #auth-container { width: 100%; justify-content: center; margin: 0 0 20px 0 !important; display: none !important; }
    #auth-container.active { display: flex !important; }
    
    /* Hamburger Animation */
    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* Generic Page Container for About/Contact */
.page-container {
    max-width: 900px;
    width: 100%;
    padding: 60px 20px;
    min-height: calc(100vh - 70px); /* 70px is nav height */
}

.page-container h1 {
    font-size: clamp(2rem, 6vw, 3.5rem);
    color: var(--cyan-electric);
    margin-bottom: 20px;
    text-align: center;
}

.page-container p {
    font-size: 1.1rem;
    line-height: 1.7;
    opacity: 0.8;
    max-width: 700px;
    margin: 0 auto 40px auto;
    text-align: center;
}

/* Contact Page Specifics */
.contact-card {
    text-align: left;
    max-width: 700px;
    margin: auto;
    background: var(--navy-brand);
}

#contactForm .btn-secure {
    width: 100%;
}

/* Footer */
.site-footer {
    width: 100%;
    background: rgba(0, 184, 255, 0.15);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--cyan-electric);
    padding: 30px 20px;
    margin-top: auto; /* Pushes footer to the bottom of the screen */
    box-shadow: 0 -8px 32px 0 rgba(0, 184, 255, 0.3);
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-col h4 {
    color: var(--cyan-electric);
    margin-bottom: 15px;
    margin-top: 0;
    font-size: 1.1rem;
}

.footer-col p {
    margin-top: 0;
    line-height: 1.6;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: var(--text-main);
    text-decoration: none;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.footer-col a:hover {
    color: var(--cyan-electric);
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-icons a svg {
    width: 24px;
    height: 24px;
    fill: var(--text-main);
    opacity: 0.8;
    transition: opacity 0.3s ease, fill 0.3s ease;
}

.social-icons a:hover svg {
    opacity: 1;
    fill: var(--cyan-electric);
}

.btn-primary {
    background: var(--glass);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--cyan-electric);
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: rgba(0, 184, 255, 0.1);
    border-color: var(--cyan-electric);
    color: #fff;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    background: rgba(10, 31, 68, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid var(--cyan-electric);
    color: var(--text-main);
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 184, 255, 0.2);
    font-size: 0.95rem;
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.3s ease, transform 0.3s ease;
    text-align: center;
    font-weight: 600;
}
.toast.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}
.toast.error {
    border-color: #ff4d4d;
    box-shadow: 0 4px 12px rgba(255, 77, 77, 0.2);
}
.toast.success {
    border-color: #27c93f;
    box-shadow: 0 4px 12px rgba(39, 201, 63, 0.2);
}

/* Spinner Animation */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
    vertical-align: middle;
    margin-right: 8px;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Blog Post Rich-Text Content Styling (Quill Output) */
.post-content {
    font-size: 1.05rem;
    color: var(--text-primary);
}
.post-content h1, .post-content h2, .post-content h3 {
    color: var(--cyan-electric);
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: 700;
}
.post-content p {
    margin-bottom: 1.2em;
}
.post-content ul, .post-content ol {
    margin-bottom: 1.2em;
    padding-left: 20px;
}
.post-content li {
    margin-bottom: 0.5em;
}
.post-content blockquote {
    border-left: 4px solid var(--cyan-electric);
    padding: 10px 15px;
    margin: 1.5em 0;
    background: rgba(0, 184, 255, 0.05);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--text-secondary);
}
.post-content pre.ql-syntax {
    background: rgba(0, 0, 0, 0.4);
    padding: 15px;
    border-radius: 8px;
    border: 1px solid var(--border);
    overflow-x: auto;
    color: #e5c07b;
    font-family: 'Courier New', Courier, monospace;
    margin-bottom: 1.5em;
}
.post-content img {
    max-width: 100%;
    border-radius: 8px;
    margin: 1em 0;
}

/* Grid Layout for 10-20+ Blog Posts */
#posts-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    width: 100%;
    margin-top: 30px;
}

#posts-container .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#posts-container .post-summary {
    flex-grow: 1; /* Pushes the edit/delete buttons to the bottom */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Truncates long text to keep cards uniform */
    -webkit-box-orient: vertical;
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Dark Theme Overrides for Quill Editor (Input) */
.ql-container {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border) !important;
    border-radius: 0 0 8px 8px;
    font-size: 1.05rem;
    font-family: inherit;
}
.ql-editor {
    color: var(--text-main);
    min-height: 200px;
}
.ql-toolbar {
    background: rgba(0, 184, 255, 0.1);
    border: 1px solid var(--border) !important;
    border-bottom: none !important;
    border-radius: 8px 8px 0 0;
}
.ql-toolbar.ql-snow .ql-stroke { stroke: var(--text-main); }
.ql-toolbar.ql-snow .ql-fill { fill: var(--text-main); }
.ql-toolbar.ql-snow button:hover .ql-stroke,
.ql-toolbar.ql-snow button.ql-active .ql-stroke { stroke: var(--cyan-electric); }
.ql-toolbar.ql-snow .ql-picker { color: var(--text-main); }