/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #0d0e0e05;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
    width: 100%;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Header */
.header {
    background: #f3f4f6;
    /* Light gray background */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.nav {
    padding: 0.8rem 0;
}

.nav .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.logo.glitch-logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    position: relative;
    display: flex;
    align-items: center;
}

.logo.glitch-logo a {
    text-decoration: none;
    color: #6b7280;
    /* Light/Medium gray text */
    transition: color 0.3s ease;
}

.logo.glitch-logo a:hover {
    color: #374151;
    /* Slightly darker gray on hover for contrast */
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    margin-right: auto;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: #4b5563;
    font-weight: 600;
    font-size: 1rem;
    transition: color 0.3s ease, transform 0.2s ease;
    position: relative;
}

.nav-links a:hover {
    color: #2563eb;
    transform: translateY(-1px);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #2563eb;
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Header Search */
.header-search {
    flex-shrink: 0;
}

.header-search form {
    display: flex;
    align-items: center;
    background: #f3f4f6;
    border-radius: 50px;
    padding: 0.25rem 0.25rem 0.25rem 1.25rem;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.header-search form:focus-within {
    background: #fff;
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.header-search input {
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.95rem;
    color: #1f2937;
    width: 200px;
    transition: width 0.3s ease;
}

.header-search input::placeholder {
    color: #9ca3af;
}

.header-search input:focus {
    width: 240px;
}

.header-search button {
    background: #2563eb;
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.header-search button:hover {
    background: #1d4ed8;
    transform: scale(1.05);
}

.header-search button svg {
    width: 18px;
    height: 18px;
}

/* Hamburger menu button */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 110;
    color: #a1a1aa;
    transition: color 0.3s ease;
}

.hamburger-menu:hover {
    color: #fff;
}

.hamburger-menu svg {
    display: block;
}

@media (max-width: 768px) {
    .hamburger-menu {
        display: block;
    }

    .nav .container {
        flex-wrap: nowrap;
        gap: 0.75rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #18181b;
        padding: 1rem 0;
        gap: 0;
        margin: 0;
        border-top: 1px solid #333;
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
        z-index: 100;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 0.85rem 2rem !important;
        font-size: 1rem !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links a::after {
        display: none;
    }

    .nav {
        position: relative;
    }

    .header-search {
        display: none;
    }

    .header-search input {
        width: 150px;
    }

    .header-search input:focus {
        width: 180px;
    }
}

/* Hero Section */
.hero {
    background: #e0e7ff33;
    color: #1f2937;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-description {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #4b5563;
}

.hero-btn {
    display: inline-block;
    background: #2a2b2d;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.hero-btn:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

/* Featured Section */
.featured {
    padding: 2rem 0;
    background: #fafbfc;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #1f2937;
}

.featured .section-title {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

.featured-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.featured-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.featured-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
}

.featured-card .card-content {
    padding: 1.25rem;
}

.featured-card .card-title a {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
}

.featured-card .card-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    color: #4b5563;
}

.featured-card .card-meta {
    margin-bottom: 1rem;
}

.featured-card .card-author {
    font-size: 0.95rem;
    font-weight: 500;
    color: #6b7280;
}

/* Blog List */
.blog-list {
    padding: 4rem 0;
    background: #f8fafc;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.blog-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
}

.card-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.category {
    background: #cfd2da;
    color: #0f0f10;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.category:hover {
    background: #c7d2fe;
    color: #312e81;
}

.date {
    color: #6b7280;
}

.card-title {
    margin-bottom: 1rem;
}

.card-title a {
    text-decoration: none;
    color: #1f2937;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.card-title a:hover {
    color: #2563eb;
}

.card-excerpt {
    color: #6b7280;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.card-author {
    color: #9ca3af;
    font-size: 0.875rem;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-btn {
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: #6b7280;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.page-btn:hover {
    background: #f3f4f6;
    color: #374151;
}

.page-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Post Page */
.post {
    padding: 4rem 3rem;
    background: white;
    max-width: 100%;
    overflow-x: hidden;
}

.post-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

.post-meta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.post-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
    line-height: 1.2;
}

.post-author {
    color: #6b7280;
    font-size: 1.1rem;
}

.post-content {
    max-width: 800px;
    margin: 0 auto 3rem;
    font-size: 1.1rem;
    line-height: 1.8;
    overflow-x: auto;
}

.post-content h1,
.post-content h2,
.post-content h3 {
    margin: 2rem 0 1rem;
    color: #1f2937;
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

.post-footer {
    text-align: center;
}

.back-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #f3f4f6;
    color: #374151;
    text-decoration: none;
    border-radius: 6px;
    transition: background 0.3s ease;
}

.back-btn:hover {
    background: #e5e7eb;
}

/* Admin Panel */
.admin-header {
    background: #1f2937;
}

.admin-header .logo {
    color: white;
}

.admin-header .nav-links a {
    color: #d1d5db;
}

.admin-header .nav-links a:hover {
    color: white;
}

.admin-container {
    background: #f8fafc;
    min-height: calc(100vh - 80px);
    padding: 2rem 0;
}

.editor-section {
    background: white;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.editor-section .container {
    padding: 2rem;
}

.blog-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #2563eb;
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
}

.btn-secondary {
    background: #6b7280;
    color: white;
}

.btn-secondary:hover {
    background: #4b5563;
}

.btn-sm {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.btn-danger {
    background: #dc2626;
    color: white;
}

.btn-danger:hover {
    background: #b91c1c;
}

/* Posts Management */
.posts-management {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.posts-management .container {
    padding: 2rem;
}

.posts-table {
    overflow-x: auto;
}

.posts-table table {
    width: 100%;
    border-collapse: collapse;
}

.posts-table th,
.posts-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.posts-table th {
    background: #f9fafb;
    font-weight: 600;
    color: #374151;
}

.status {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status.draft {
    background: #fef3c7;
    color: #92400e;
}

.status.published {
    background: #d1fae5;
    color: #065f46;
}

.actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

/* Alert */
.alert {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: 6px;
    text-align: center;
}

.alert.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

/* Footer */
.footer {
    background: #1f2937;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Main Content Layout */
.main-content {
    padding: 2rem 0;
}

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
    align-items: start;
}

/* Sidebar Styles */
.sidebar {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.sidebar-widget h3 {
    margin-bottom: 1rem;
    color: #1f2937;
    font-size: 1.2rem;
}

.sidebar-widget p {
    color: #6b7280;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Newsletter Widget */
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.newsletter-form input {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.9rem;
}

.newsletter-form input:focus {
    outline: none;
    border-color: #2a2b2d;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.newsletter-form button {
    background: #2a2b2d;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
}

.newsletter-form button:hover {
    background: #1d4ed8;
}

/* Ad Widget */
.ad-placeholder {
    background: #f3f4f6;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    color: #6b7280;
}

.ad-placeholder p {
    margin: 0 0 0.5rem 0;
    font-weight: 500;
}

.ad-placeholder small {
    color: #9ca3af;
}

/* Featured Images */
.card-image {
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
    aspect-ratio: 16/9;
    width: 100%;
    background: #f3f4f6;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.3s ease;
    max-width: 100%;
    display: block;
}

.blog-card:hover .card-image img {
    transform: scale(1.05);
}

/* Featured post images - prominent display */
.featured-image {
    aspect-ratio: 16/9;
    max-width: 100%;
    display: block;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
}

/* All image containers will now always display with either image or placeholder */

/* Image loading and error states */
.card-image img {
    transition: opacity 0.3s ease;
}

/* Hide broken images */
.card-image img[src=""],
.card-image img:not([src]) {
    display: none;
}

/* Handle image loading errors */
.card-image img {
    object-fit: cover;
    object-position: center;
    width: 100%;
    height: 100%;
}

/* Image Placeholder Styles */
.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #f9fafb;
    border: 2px dashed #e5e7eb;
    color: #9ca3af;
    font-size: 0.875rem;
    font-weight: 500;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.featured-card:hover .image-placeholder {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.blog-card:hover .image-placeholder {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.image-placeholder svg {
    opacity: 0.7;
}

.image-placeholder span {
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
}

/* Latest post images - smaller */
.latest-image {
    aspect-ratio: 16/9;
    max-width: 100%;
}

/* Category page styles */
.category-header {
    margin-bottom: 2rem;
    text-align: center;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.5rem;
}

.category-description {
    color: #6b7280;
    font-size: 1.1rem;
}

/* Empty state styles */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.empty-state h3 {
    font-size: 1.5rem;
    color: #374151;
    margin-bottom: 1rem;
}

.empty-state p {
    color: #6b7280;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.empty-state .btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #2563eb;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.3s ease;
}

.empty-state .btn:hover {
    background: #1d4ed8;
}

.post-featured-image {
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Create Form Styles */
.create-form-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 8px;
    padding: 2rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.form-help {
    display: block;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #6b7280;
}

.checkbox-group {
    margin: 1.5rem 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #374151;
}

.checkbox-label input[type="checkbox"] {
    margin-right: 0.75rem;
    transform: scale(1.2);
}

.editor-container {
    height: 400px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
}

.image-preview {
    margin-top: 1rem;
    padding: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #f9fafb;
}

.image-preview img {
    max-width: 200px;
    max-height: 150px;
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

.remove-image {
    background: #dc2626;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
}

.remove-image:hover {
    background: #b91c1c;
}

.current-image {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: #f9fafb;
    border-radius: 4px;
}

.current-image img {
    border-radius: 4px;
}

/* Enhanced Responsive Design */
@media (max-width: 1200px) {
    .container {
        max-width: 1000px;
        padding: 0 40px;
    }

    .featured-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
    }


}

@media (max-width: 1024px) {
    .content-wrapper {
        grid-template-columns: 1fr 250px;
        gap: 2rem;
    }

    .hero-content h2 {
        font-size: 2.5rem;
    }

    .featured-grid {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        gap: 2rem;
    }



    .blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .post {
        padding: 3rem 2rem;
    }

    .hero {
        padding: 3rem 0;
    }

    .hero-content h2 {
        font-size: 2rem;
        line-height: 1.2;
    }

    .hero-description {
        font-size: 1.1rem;
    }

    .featured {
        padding: 1.5rem 0;
    }

    .featured-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        max-width: 600px;
    }

    .featured-card {
        padding: 1rem;
    }



    .image-placeholder {
        font-size: 0.8rem;
    }

    .image-placeholder span {
        font-size: 0.7rem;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .sidebar {
        position: static;
        order: -1;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }


    .post-title {
        font-size: 2rem;
    }

    .actions {
        flex-direction: column;
        align-items: stretch;
    }

    .post-meta {
        flex-direction: column;
        gap: 0.5rem;
    }

    .card-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .pagination {
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .page-btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .post {
        padding: 2rem 1rem;
    }

    .hero {
        padding: 2rem 0;
    }

    .hero-content h2 {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    .hero-description {
        font-size: 1rem;
    }

    .hero-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .featured {
        padding: 1rem 0;
    }

    .featured-grid {
        max-width: 100%;
        gap: 1rem;
    }

    .featured-card {
        padding: 0.875rem;
    }





    .image-placeholder {
        font-size: 0.75rem;
    }

    .image-placeholder span {
        font-size: 0.65rem;
    }

    .image-placeholder svg {
        width: 60px;
        height: 40px;
    }


    .card-title a {
        font-size: 1.05rem;
        line-height: 1.4;
    }

    .blog-card {
        padding: 1rem;
    }

    .create-form-container {
        padding: 1rem;
        margin: 0 10px;
    }

    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .post-content {
        font-size: 1rem;
    }

    .card-excerpt {
        font-size: 0.9rem;
        line-height: 1.5;
    }
}

/* Mobile centering fix for latest post images */
@media (max-width: 768px) {
    .blog-card .card-image.latest-image {
        width: 100%;
        margin-left: auto;
        margin-right: auto;
        display: block;
    }

    .blog-card .card-image.latest-image img {
        object-fit: cover;
        object-position: center center;
        display: block;
        width: 100%;
        height: 100%;
    }

    .blog-card .card-image.latest-image .image-placeholder {
        width: 100%;
    }
}

/* ===================== */
/* Translation Page      */
/* ===================== */

.translate-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.translate-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    line-height: 1.3;
}

.translate-title .highlight-word {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.1em 0.4em;
    border-radius: 6px;
    backdrop-filter: blur(10px);
}

.translate-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.translate-english-link {
    display: inline-block;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1.25rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background 0.3s ease;
    backdrop-filter: blur(10px);
}

.translate-english-link:hover {
    background: rgba(255, 255, 255, 0.35);
}

.translate-content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

/* Info Card */
.translate-info-card {
    display: flex;
    gap: 1.5rem;
    background: white;
    border-radius: 12px;
    padding: 1.25rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    flex-wrap: wrap;
    justify-content: center;
}

.info-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #9ca3af;
    font-weight: 600;
}

.info-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1f2937;
}

/* Region Sections */
.translate-region {
    margin-bottom: 2rem;
}

.region-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e7ff;
}

/* Translation Table */
.translate-table-wrap {
    overflow-x: auto;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.translate-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.translate-table thead th {
    background: #f8fafc;
    color: #374151;
    font-weight: 600;
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 2px solid #e5e7eb;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.translate-table tbody td {
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
}

.translate-table tbody tr:hover {
    background: #f8fafc;
}

.translate-table tbody tr:last-child td {
    border-bottom: none;
}

.lang-link {
    text-decoration: none;
    color: #2563eb;
    font-weight: 500;
    transition: color 0.2s;
}

.lang-link:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

.translation-text {
    font-weight: 600;
    color: #1f2937;
    font-size: 1rem;
}

.transliteration-text {
    color: #6b7280;
    font-style: italic;
}

.no-data {
    color: #d1d5db;
}

.translate-footer {
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Subtitle as h2 */
.translate-subtitle {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 1rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 400;
}

/* Language Tag Filter */
.lang-tag-section {
    margin-bottom: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 1.25rem;
}

.lang-tag-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.lang-tag-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1f2937;
}

.lang-tag-note {
    font-size: 0.8rem;
    color: #9ca3af;
    font-style: italic;
}

.lang-tag-container {
    position: relative;
}

.lang-tag-input {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f8fafc;
}

.lang-tag-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.lang-tag-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    margin-top: 4px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 50;
}

.tag-drop-item {
    padding: 0.6rem 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.15s;
    border-bottom: 1px solid #f3f4f6;
}

.tag-drop-item:last-child {
    border-bottom: none;
}

.tag-drop-item:hover {
    background: #f0f4ff;
}

.tag-drop-empty {
    padding: 0.75rem 1rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Selected Tags */
.selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.75rem;
    min-height: 0;
}

.lang-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.3rem 0.6rem;
    background: linear-gradient(135deg, #e0e7ff 0%, #f0f4ff 100%);
    border: 1px solid #c7d2fe;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #3730a3;
    animation: tagIn 0.2s ease;
}

@keyframes tagIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.lang-tag-flag {
    font-size: 1rem;
}

.lang-tag-remove {
    background: none;
    border: none;
    color: #6366f1;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0 0.15rem;
    margin-left: 0.1rem;
    border-radius: 50%;
    transition: all 0.15s;
}

.lang-tag-remove:hover {
    background: #6366f1;
    color: white;
}

.lang-filter-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn-clear-tags,
.btn-show-all {
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    font-size: 0.8rem;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.15s;
}

.btn-clear-tags:hover,
.btn-show-all:hover {
    background: #f3f4f6;
    color: #1f2937;
}

/* Flag Icon (flag-icons CSS lib) */
.lang-flag-img {
    margin-right: 0.4rem;
    font-size: 0.85rem;
    vertical-align: middle;
    border-radius: 2px;
}

/* 2-Column Layout */
.translate-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 2rem;
}

.translate-main {
    min-width: 0;
}

/* Sidebar */
.translate-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    order: 2;
}

.sidebar-card {
    background: white;
    border-radius: 12px;
    padding: 1.25rem;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.sidebar-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0.75rem;
}

/* Sidebar Search */
.sidebar-search-wrap {
    position: relative;
}

.sidebar-search {
    width: 100%;
    padding: 0.6rem 0.85rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: #f8fafc;
}

.sidebar-search:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
    background: white;
}

.sidebar-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    margin-top: 4px;
    z-index: 30;
    overflow: hidden;
}

.sidebar-result-item {
    display: block;
    padding: 0.6rem 0.85rem;
    text-decoration: none;
    color: #374151;
    font-size: 0.9rem;
    transition: background 0.15s;
}

.sidebar-result-item:hover {
    background: #f0f4ff;
}

/* Related Words */
.related-words {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.related-word-chip {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.2s;
}

.related-word-chip:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.no-related {
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Pronunciation Button */
.btn-speak {
    background: none;
    border: 1px solid #e5e7eb;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #667eea;
    transition: all 0.2s;
    padding: 0;
}

.btn-speak:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: scale(1.1);
}

.btn-speak:active {
    transform: scale(0.95);
}

.th-listen,
.listen-cell {
    width: 60px;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .translate-title {
        font-size: 1.4rem;
    }

    .translate-subtitle {
        font-size: 0.95rem;
    }

    .translate-info-card {
        padding: 1rem;
        gap: 1rem;
    }

    .info-value {
        font-size: 1rem;
    }

    .translate-table {
        font-size: 0.85rem;
    }

    .translate-table thead th,
    .translate-table tbody td {
        padding: 0.5rem 0.65rem;
    }

    .th-listen,
    .listen-cell {
        width: 40px;
    }

    .btn-speak {
        width: 28px;
        height: 28px;
    }

    .translate-footer {
        flex-direction: column;
    }

    .translate-layout {
        grid-template-columns: 1fr;
    }

    .translate-sidebar {
        order: -1;
    }
}

/* ========================= */
/* Translations Overview     */
/* ========================= */

/* Search Box */
.overview-search {
    position: relative;
    margin-bottom: 2rem;
}

.overview-search-inner {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.search-icon-lg {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    display: flex;
    pointer-events: none;
}

.overview-search-input {
    width: 100%;
    padding: 1.1rem 1.25rem 1.1rem 3.25rem;
    border: 2px solid transparent;
    border-radius: 16px;
    font-size: 1.05rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: white;
}

.overview-search-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.12);
}

/* Search Results Dropdown */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 12px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    margin-top: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
    z-index: 50;
}

.search-result-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    color: #1f2937;
    transition: background 0.15s;
    border-bottom: 1px solid #f3f4f6;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: #f0f4ff;
}

.search-word {
    font-weight: 500;
    font-size: 1rem;
}

.search-word mark {
    background: #fef08a;
    color: #1f2937;
    border-radius: 2px;
    padding: 0 2px;
}

.search-arrow {
    color: #667eea;
    font-weight: 600;
    font-size: 1.1rem;
}

.search-no-result {
    padding: 1.25rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.95rem;
}

.search-more {
    padding: 0.75rem 1.25rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.85rem;
    background: #f9fafb;
    border-radius: 0 0 12px 12px;
}

/* Quick Stats */
.overview-stats {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.stat-pill {
    background: white;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.9rem;
    color: #4b5563;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stat-pill strong {
    color: #667eea;
    font-weight: 700;
}

/* Word Groups */
.word-group {
    margin-bottom: 2rem;
}

.word-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e0e7ff;
}

.word-group-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1f2937;
}

.word-group-count {
    font-size: 0.85rem;
    color: #9ca3af;
    font-weight: 500;
}

/* Word Cloud / Chips */
.word-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.word-chip {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    background: white;
    color: #374151;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.word-chip:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
}

@media (max-width: 768px) {
    .overview-search-input {
        font-size: 0.95rem;
        padding: 0.9rem 1rem 0.9rem 2.75rem;
    }

    .word-chip {
        font-size: 0.8rem;
        padding: 0.3rem 0.65rem;
    }

    .overview-stats {
        gap: 0.5rem;
    }

    .stat-pill {
        font-size: 0.8rem;
        padding: 0.4rem 0.9rem;
    }
}

/* ------ HEADER AND FOOTER DARK THEME OVERRIDES ------ */

.header {
    background: #18181b !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5) !important;
    border-bottom: 1px solid #333;
}

.nav-links a {
    color: #a1a1aa !important;
}

.nav-links a:hover {
    color: #fff !important;
}

/* Header Search */
.header-search {
    display: flex;
    align-items: center;
    margin-left: 20px;
}

.header-search form {
    display: flex;
    align-items: center;
    background: #27272a;
    border-radius: 20px;
    padding: 4px 12px;
    border: 1px solid #3f3f46;
}

.header-search input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 4px 8px;
    outline: none;
    width: 160px;
    font-size: 0.9rem;
}

.header-search input::placeholder {
    color: #71717a;
}

.header-search button {
    background: transparent;
    border: none;
    color: #a1a1aa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-search button:hover {
    color: #fff;
}

.glitch-logo a {
    color: #fff !important;
    font-family: 'Arial Black', Impact, sans-serif;
    font-weight: 900;
    font-size: 1.8rem;
    letter-spacing: 1px;
    text-shadow:
        -2px 0px 0px #0ea5e9,
        2px 0px 0px #f97316;
    position: relative;
    text-transform: uppercase;
    text-decoration: none;
}


/* ============================================== */
/* HOME PAGE STYLES — LIGHT THEME                 */
/* ============================================== */

.home-page {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: #ffffff;
}

/* --- Hero Section --- */
.hp-hero {
    position: relative;
    padding: 6rem 0 5rem;
    overflow: hidden;
    background: linear-gradient(135deg, #eff6ff 0%, #f0f4ff 40%, #faf5ff 100%);
    min-height: 580px;
    display: flex;
    align-items: center;
}

.hp-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hp-hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 40%, rgba(59, 130, 246, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 60% 50% at 80% 60%, rgba(168, 85, 247, 0.06) 0%, transparent 60%),
        radial-gradient(ellipse 40% 30% at 50% 80%, rgba(16, 185, 129, 0.05) 0%, transparent 50%);
}

.hp-hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hp-hero .container {
    position: relative;
    z-index: 1;
}

.hp-hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hp-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    padding: 0.4rem 1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #2563eb;
    margin-bottom: 1.5rem;
}

.hp-badge-dot {
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: hp-pulse 2s ease-in-out infinite;
}

@keyframes hp-pulse {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.3);
    }
}

.hp-hero-title {
    font-size: 3.2rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.hp-gradient-text {
    background: linear-gradient(135deg, #2563eb, #7c3aed, #0891b2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hp-hero-desc {
    font-size: 1.1rem;
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 2rem;
    max-width: 520px;
}

.hp-hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Buttons */
.hp-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.75rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.hp-btn-primary {
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    color: white;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.25);
}

.hp-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.35);
}

.hp-btn-outline {
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.hp-btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.hp-btn-ghost {
    background: transparent;
    color: #64748b;
    padding: 0.85rem 1rem;
}

.hp-btn-ghost:hover {
    color: #1e293b;
}

.hp-btn-lg {
    padding: 1rem 2rem;
    font-size: 1.05rem;
}

/* Hero Visual - Floating Cards */
.hp-hero-visual {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    perspective: 800px;
}

.hp-hero-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.4s ease;
    animation: hp-float 6s ease-in-out infinite;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.hp-hero-card:nth-child(2) {
    animation-delay: -1.5s;
}

.hp-hero-card:nth-child(3) {
    animation-delay: -3s;
}

.hp-hero-card:nth-child(4) {
    animation-delay: -4.5s;
}

@keyframes hp-float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-10px) rotate(1deg);
    }
}

.hp-hero-card:hover {
    transform: translateY(-8px) scale(1.05);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hp-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hp-card-gtm .hp-card-icon {
    background: #eff6ff;
    color: #2563eb;
}

.hp-card-ga4 .hp-card-icon {
    background: #fff7ed;
    color: #ea580c;
}

.hp-card-api .hp-card-icon {
    background: #faf5ff;
    color: #7c3aed;
}

.hp-card-tracking .hp-card-icon {
    background: #ecfdf5;
    color: #059669;
}

.hp-hero-card span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    letter-spacing: 0.5px;
}

/* --- Tech Bar --- */
.hp-tech-bar {
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    padding: 2rem 0;
}

.hp-tech-label {
    text-align: center;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #94a3b8;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.hp-tech-logos {
    display: flex;
    justify-content: center;
    gap: 2.5rem;
    flex-wrap: wrap;
    align-items: center;
}

.hp-tech-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    font-size: 0.88rem;
    font-weight: 500;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.hp-tech-item:hover {
    color: #1e293b;
}

.hp-tech-icon {
    font-size: 1.25rem;
}

.hp-tech-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.5);
    transition: filter 0.3s ease;
}

.hp-tech-item:hover .hp-tech-logo {
    filter: grayscale(0%) opacity(1);
}

/* --- Section Shared --- */
.hp-section-tag {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #4f46e5;
    margin-bottom: 0.75rem;
    padding: 0.3rem 0.8rem;
    background: #eef2ff;
    border-radius: 50px;
}

.hp-section-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.hp-section-subtitle {
    font-size: 1.05rem;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.7;
}

.hp-section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

/* --- About Section --- */
.hp-about {
    padding: 6rem 0;
    background: #ffffff;
}

.hp-about-grid {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 4rem;
    align-items: center;
}

.hp-about-img-frame {
    position: relative;
    border-radius: 50%;
    overflow: hidden;
    aspect-ratio: 1/1;
    background: linear-gradient(135deg, #eff6ff, #eef2ff);
    border: 3px solid #e2e8f0;
    box-shadow: 0 8px 30px rgba(79, 70, 229, 0.12);
}

.hp-about-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
}

.hp-about-img-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 1rem;
    color: #94a3b8;
}

.hp-about-img-placeholder span {
    font-size: 1.5rem;
    font-weight: 700;
    color: #4f46e5;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hp-about-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.hp-stat {
    flex: 1;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.25rem;
    text-align: center;
}

.hp-stat-number {
    display: block;
    font-size: 1.75rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.hp-stat-label {
    font-size: 0.8rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

.hp-about-desc {
    font-size: 1.05rem;
    color: #64748b;
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.hp-about-desc strong {
    color: #1e293b;
}

.hp-about-highlights {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.hp-highlight {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: #334155;
}

/* --- Services Section --- */
.hp-services {
    padding: 6rem 0;
    background: #f8fafc;
}

.hp-services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.hp-service-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.hp-service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, #2563eb, transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.hp-service-card:hover {
    transform: translateY(-6px);
    border-color: #cbd5e1;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

.hp-service-card:hover::before {
    opacity: 1;
}

.hp-service-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.hp-icon-gtm {
    background: #eff6ff;
    color: #2563eb;
}

.hp-icon-ga4 {
    background: #fff7ed;
    color: #ea580c;
}

.hp-icon-tracking {
    background: #ecfdf5;
    color: #059669;
}

.hp-icon-privacy {
    background: #faf5ff;
    color: #7c3aed;
}

.hp-icon-api {
    background: #fdf2f8;
    color: #db2777;
}

.hp-icon-consult {
    background: #ecfeff;
    color: #0891b2;
}

.hp-service-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.hp-service-card p {
    font-size: 0.92rem;
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 1.25rem;
}

.hp-service-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.hp-service-tags span {
    display: inline-block;
    padding: 0.25rem 0.65rem;
    background: #eef2ff;
    border: 1px solid #e0e7ff;
    border-radius: 8px;
    font-size: 0.78rem;
    font-weight: 500;
    color: #4f46e5;
}

/* --- Help Section --- */
.hp-help {
    padding: 5rem 0;
    background: #ffffff;
}

.hp-help-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.hp-help-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 2.5rem 2rem;
    text-align: center;
    text-decoration: none;
    transition: all 0.4s ease;
}

.hp-help-card:hover {
    transform: translateY(-6px);
    border-color: #cbd5e1;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    background: #ffffff;
}

.hp-help-icon {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: transform 0.3s ease;
}

.hp-help-card:hover .hp-help-icon {
    transform: scale(1.1);
}

.hp-help-blog {
    background: #eff6ff;
    color: #2563eb;
}

.hp-help-services {
    background: #ecfdf5;
    color: #059669;
}

.hp-help-contact {
    background: #fff7ed;
    color: #ea580c;
}

.hp-help-card h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.hp-help-card p {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.5;
}

/* --- CTA Section --- */
.hp-cta {
    padding: 5rem 0 6rem;
    background: #f8fafc;
}

.hp-cta-card {
    position: relative;
    background: linear-gradient(135deg, #eff6ff, #eef2ff, #faf5ff);
    border: 1px solid #e0e7ff;
    border-radius: 24px;
    padding: 4rem;
    text-align: center;
    overflow: hidden;
}

.hp-cta-content {
    position: relative;
    z-index: 1;
}

.hp-cta-card h2 {
    font-size: 2.25rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
}

.hp-cta-card p {
    font-size: 1.1rem;
    color: #64748b;
    max-width: 500px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.hp-cta-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.hp-cta-decoration {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.hp-cta-circle {
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(79, 70, 229, 0.08);
}

.hp-cta-c1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: -100px;
    animation: hp-spin 20s linear infinite;
}

.hp-cta-c2 {
    width: 200px;
    height: 200px;
    bottom: -60px;
    left: -60px;
    animation: hp-spin 15s linear infinite reverse;
}

.hp-cta-c3 {
    width: 150px;
    height: 150px;
    top: 50%;
    left: 10%;
    animation: hp-spin 25s linear infinite;
}

@keyframes hp-spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* --- Animations --- */
.hp-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.hp-animate.hp-visible {
    opacity: 1;
    transform: translateY(0);
}

.hp-service-card.hp-animate:nth-child(2) {
    transition-delay: 0.1s;
}

.hp-service-card.hp-animate:nth-child(3) {
    transition-delay: 0.2s;
}

.hp-service-card.hp-animate:nth-child(4) {
    transition-delay: 0.3s;
}

.hp-service-card.hp-animate:nth-child(5) {
    transition-delay: 0.4s;
}

.hp-service-card.hp-animate:nth-child(6) {
    transition-delay: 0.5s;
}

.hp-help-card.hp-animate:nth-child(2) {
    transition-delay: 0.1s;
}

.hp-help-card.hp-animate:nth-child(3) {
    transition-delay: 0.2s;
}

.hp-highlight.hp-animate:nth-child(2) {
    transition-delay: 0.1s;
}

.hp-highlight.hp-animate:nth-child(3) {
    transition-delay: 0.2s;
}

.hp-highlight.hp-animate:nth-child(4) {
    transition-delay: 0.3s;
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hp-hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hp-hero-text {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hp-hero-desc {
        max-width: 600px;
    }

    .hp-hero-actions {
        justify-content: center;
    }

    .hp-hero-title {
        font-size: 2.5rem;
    }

    .hp-hero-visual {
        max-width: 400px;
        margin: 0 auto;
    }

    .hp-about-grid {
        grid-template-columns: 220px 1fr;
        gap: 2.5rem;
    }

    .hp-about-image {
        max-width: 220px;
        margin: 0 auto;
    }

    .hp-services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hp-about,
    .hp-services,
    .hp-help {
        padding: 4rem 0;
    }

    .hp-cta {
        padding: 4rem 0 5rem;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .hp-hero {
        padding: 3rem 0 2.5rem;
        min-height: auto;
    }

    .hp-hero-title {
        font-size: 2rem;
    }

    .hp-hero-desc {
        font-size: 1rem;
        max-width: 100%;
    }

    .hp-hero-visual {
        grid-template-columns: 1fr 1fr;
        gap: 0.75rem;
        max-width: 320px;
    }

    .hp-hero-card {
        padding: 1.25rem 1rem;
    }

    .hp-card-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
    }

    .hp-card-icon svg {
        width: 24px;
        height: 24px;
    }

    .hp-hero-card span {
        font-size: 0.8rem;
    }

    /* Tech bar mobile */
    .hp-tech-bar {
        padding: 1.5rem 0;
    }

    .hp-tech-logos {
        gap: 1.25rem 1.5rem;
        justify-content: center;
    }

    .hp-tech-item {
        font-size: 0.75rem;
        gap: 0.35rem;
    }

    .hp-tech-logo {
        height: 22px;
    }

    .hp-tech-label {
        font-size: 0.7rem;
        margin-bottom: 1rem;
    }

    /* About section mobile */
    .hp-about {
        padding: 3.5rem 0;
    }

    .hp-about-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hp-about-image {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .hp-about-img-frame {
        width: 180px;
        max-width: 180px;
    }

    .hp-about-stats {
        justify-content: center;
        gap: 0.75rem;
        width: 100%;
        max-width: 280px;
    }

    .hp-stat {
        padding: 1rem;
    }

    .hp-stat-number {
        font-size: 1.5rem;
    }

    .hp-about-text {
        text-align: center;
    }

    .hp-about-desc {
        font-size: 0.95rem;
    }

    .hp-about-highlights {
        align-items: center;
    }

    .hp-highlight {
        font-size: 0.88rem;
    }

    /* Services section mobile */
    .hp-services {
        padding: 3.5rem 0;
    }

    .hp-services-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .hp-service-card {
        padding: 1.5rem;
    }

    .hp-service-card h3 {
        font-size: 1.1rem;
    }

    .hp-service-card p {
        font-size: 0.88rem;
    }

    .hp-section-header {
        margin-bottom: 2.5rem;
    }

    /* Help section mobile */
    .hp-help {
        padding: 3.5rem 0;
    }

    .hp-help-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .hp-help-card {
        padding: 2rem 1.5rem;
    }

    .hp-help-icon {
        width: 60px;
        height: 60px;
        border-radius: 16px;
        margin-bottom: 1rem;
    }

    /* CTA section mobile */
    .hp-cta {
        padding: 3rem 0 3.5rem;
    }

    .hp-cta-card {
        padding: 2.5rem 1.5rem;
        border-radius: 16px;
    }

    .hp-cta-card h2 {
        font-size: 1.5rem;
    }

    .hp-cta-card p {
        font-size: 0.95rem;
    }

    .hp-section-title {
        font-size: 1.75rem;
    }

    .hp-section-subtitle {
        font-size: 0.95rem;
    }

    .hp-section-tag {
        font-size: 0.72rem;
        padding: 0.25rem 0.65rem;
    }

    /* Blog grid mobile fix */
    .blog-grid {
        grid-template-columns: 1fr;
    }

    .featured-grid {
        grid-template-columns: 1fr;
    }

    /* Post page mobile */
    .post {
        padding: 2rem 1rem;
    }

    .post-title {
        font-size: 1.75rem;
    }

    .post-content {
        font-size: 1rem;
    }

    /* Footer mobile */
    .footer {
        padding: 1.5rem 0;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hp-hero {
        padding: 2.5rem 0 2rem;
    }

    .hp-hero-title {
        font-size: 1.65rem;
    }

    .hp-hero-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.75rem;
    }

    .hp-hero-desc {
        font-size: 0.92rem;
    }

    .hp-hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hp-btn {
        justify-content: center;
        width: 100%;
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .hp-hero-visual {
        max-width: 260px;
        gap: 0.5rem;
    }

    .hp-hero-card {
        padding: 1rem 0.75rem;
    }

    .hp-card-icon {
        width: 40px;
        height: 40px;
        border-radius: 10px;
    }

    .hp-card-icon svg {
        width: 20px;
        height: 20px;
    }

    .hp-hero-card span {
        font-size: 0.72rem;
    }

    /* About */
    .hp-about {
        padding: 2.5rem 0;
    }

    .hp-about-img-frame {
        width: 150px;
        max-width: 150px;
    }

    .hp-about-stats {
        max-width: 240px;
    }

    .hp-stat {
        padding: 0.75rem;
    }

    .hp-stat-number {
        font-size: 1.3rem;
    }

    .hp-stat-label {
        font-size: 0.7rem;
    }

    .hp-about-desc {
        font-size: 0.9rem;
    }

    .hp-highlight {
        font-size: 0.82rem;
        gap: 0.5rem;
    }

    .hp-highlight svg {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
    }

    .hp-section-title {
        font-size: 1.5rem;
    }

    /* Services */
    .hp-services {
        padding: 2.5rem 0;
    }

    .hp-service-card {
        padding: 1.25rem;
    }

    .hp-service-icon {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        margin-bottom: 1rem;
    }

    .hp-service-card h3 {
        font-size: 1.05rem;
    }

    .hp-service-card p {
        font-size: 0.85rem;
    }

    .hp-service-tags span {
        font-size: 0.72rem;
        padding: 0.2rem 0.5rem;
    }

    /* Help */
    .hp-help {
        padding: 2.5rem 0;
    }

    .hp-help-card {
        padding: 1.5rem 1.25rem;
    }

    .hp-help-card h3 {
        font-size: 1.05rem;
    }

    .hp-help-card p {
        font-size: 0.82rem;
    }

    /* CTA */
    .hp-cta {
        padding: 2rem 0 2.5rem;
    }

    .hp-cta-card {
        padding: 2rem 1.25rem;
        border-radius: 14px;
    }

    .hp-cta-card h2 {
        font-size: 1.35rem;
    }

    .hp-cta-card p {
        font-size: 0.88rem;
    }

    .hp-cta-actions {
        flex-direction: column;
        align-items: center;
    }

    .hp-btn-lg {
        padding: 0.85rem 1.5rem;
        font-size: 0.95rem;
    }

    /* Tech logos */
    .hp-tech-logos {
        gap: 0.75rem 1rem;
    }

    .hp-tech-item {
        font-size: 0.7rem;
    }

    .hp-tech-item span {
        display: none;
    }

    .hp-tech-logo {
        height: 24px;
    }

    /* Blog pages */
    .hero {
        padding: 2rem 0;
    }

    .hero-content h2 {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 0.95rem;
    }

    .hero-btn {
        padding: 0.65rem 1.25rem;
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.5rem;
    }

    .card-title a {
        font-size: 1rem;
    }

    .card-excerpt {
        font-size: 0.85rem;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .post {
        padding: 1.5rem 0.5rem;
    }

    .post-title {
        font-size: 1.5rem;
    }

    .post-content {
        font-size: 0.95rem;
    }

    /* Footer */
    .footer {
        padding: 1.25rem 0;
        font-size: 0.8rem;
    }

    .glitch-logo a {
        font-size: 1.4rem !important;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .container {
        padding: 0 12px;
    }

    .hp-hero-title {
        font-size: 1.45rem;
    }

    .hp-hero-badge {
        font-size: 0.7rem;
    }

    .hp-hero-visual {
        max-width: 230px;
    }

    .hp-section-title {
        font-size: 1.35rem;
    }

    .hp-cta-card h2 {
        font-size: 1.2rem;
    }

    .glitch-logo a {
        font-size: 1.2rem !important;
    }

    .nav-links a {
        font-size: 0.9rem !important;
    }
}

/* Ensure images never overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Ensure tables are scrollable on mobile */
table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Fix for code blocks overflow */
pre,
code {
    max-width: 100%;
    overflow-x: auto;
    word-break: break-word;
}