/* ==========================================
   CANONITY - CSS STYLESHEET
   Google-inspired design with modern animations
   ========================================== */

/* CSS Variables */
:root {
    --primary-color: #4285f4;
    --secondary-color: #34a853;
    --accent-color: #fbbc04;
    --error-color: #ea4335;
    --text-primary: #202124;
    --text-secondary: #5f6368;
    --text-light: #80868b;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-dark: #202124;
    --border-color: #dadce0;
    --shadow-sm: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
    --shadow-md: 0 1px 3px 0 rgba(60, 64, 67, 0.3), 0 4px 8px 3px rgba(60, 64, 67, 0.15);
    --shadow-lg: 0 2px 6px 2px rgba(60, 64, 67, 0.15), 0 8px 24px 4px rgba(60, 64, 67, 0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-primary);
    background: var(--bg-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Product Sans', 'Roboto', sans-serif;
    font-weight: 500;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 2rem; }
h4 { font-size: 1.5rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    opacity: 0.8;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container-narrow {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==========================================
   HEADER & NAVIGATION
   ========================================== */

.site-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: var(--transition);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Product Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}
.logo-text{
    margin-bottom:5px
}
.logo-icon {
    font-size: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-icon img{
    width: 28px;
    height: 28px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-secondary);
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.user-menu {
    position: relative;
}

.user-button {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    background: var(--bg-secondary);
    border-radius: 24px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 0.9rem;
}

.user-button:hover {
    background: var(--border-color);
}

.user-button img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.user-initial {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
}

.user-menu:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    transition: var(--transition);
}

.dropdown-menu a:hover {
    background: var(--bg-secondary);
}

.dropdown-divider {
    height: 1px;
    background: #e0e0e0;
    margin: 0.25rem 0;
}

/* Language Switcher */
.lang-switcher,
.lang-menu {
    position: relative;
}

.lang-button {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-color);
    background: var(--bg-primary);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-family: inherit;
    font-size: 0.85rem;
}

.lang-button:hover {
    border-color: var(--primary-color);
    background: var(--bg-secondary);
}

.lang-icon {
    font-size: 1rem;
}

.lang-code {
    font-weight: 600;
    color: var(--text-secondary);
}

.lang-arrow {
    font-size: 0.6rem;
    color: var(--text-light);
    margin-left: 0.25rem;
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow-md);
    min-width: 150px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 1000;
}

.lang-switcher:hover .lang-dropdown,
.lang-menu:hover .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}

.lang-dropdown a:hover {
    background: var(--bg-secondary);
}

.lang-dropdown a.active {
    background: var(--bg-secondary);
    color: var(--primary-color);
    font-weight: 600;
}

.lang-flag {
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-light);
    width: 1.5rem;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition);
}

/* ==========================================
   BUTTONS
   ========================================== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 24px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    font-family: inherit;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background: #1a73e8;
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* ==========================================
   HERO SECTION
   ========================================== */

.hero {
    min-height: 90vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-content {
    z-index: 2;
}

.hero-title {
    font-size: 4.5rem;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradientShift 3s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: 1.8rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero-description {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Floating Shapes Animation */
.hero-visual {
    position: relative;
    height: 500px;
}

.floating-shapes {
    position: relative;
    width: 100%;
    height: 100%;
}

.shape {
    position: absolute;
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
}

.shape-1 {
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 150px;
    height: 150px;
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    top: 50%;
    right: 20%;
    animation-delay: 1s;
}

.shape-3 {
    width: 180px;
    height: 180px;
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    bottom: 20%;
    left: 30%;
    animation-delay: 2s;
}

.shape-4 {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    top: 30%;
    right: 10%;
    animation-delay: 1.5s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
    }
    50% {
        transform: translateY(-40px) rotate(-5deg);
    }
    75% {
        transform: translateY(-20px) rotate(3deg);
    }
}

/* Animate In */
.animate-in {
    opacity: 0;
    transform: translateY(30px);
    animation: slideIn 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

@keyframes slideIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================
   FEATURES SECTION
   ========================================== */

.features {
    padding: 6rem 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 4rem;
    color: var(--text-primary);
}

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

.feature-card {
    padding: 2rem;
    border-radius: 16px;
    background: white;
    border: 1px solid var(--border-color);
    transition: var(--transition);
    cursor: pointer;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.feature-icon {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ==========================================
   USE CASES SECTION
   ========================================== */

.use-cases {
    padding: 6rem 0;
    background: var(--bg-secondary);
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.use-case {
    padding: 2rem;
    background: white;
    border-radius: 16px;
    border-left: 4px solid var(--primary-color);
    transition: var(--transition);
}

.use-case:hover {
    transform: translateX(8px);
    box-shadow: var(--shadow-md);
}

.use-case-number {
    font-size: 3rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
}

.use-case h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
}

.use-case p {
    color: var(--text-secondary);
}

/* ==========================================
   CTA SECTION
   ========================================== */

.cta-section {
    padding: 6rem 0;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cta-section h2 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: white;
}

.cta-section p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.auth-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.auth-buttons .btn {
    background: white;
    color: var(--text-primary);
}

.auth-buttons .btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* ==========================================
   BLOG SECTION
   ========================================== */

.blog-hero {
    padding: 4rem 0 2rem;
    text-align: center;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.page-title {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

.blog-list {
    padding: 4rem 0;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.post-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.post-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.post-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.post-content {
    padding: 1.5rem;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.author-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.author-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.post-date {
    font-size: 0.85rem;
    color: var(--text-light);
}

.post-title a {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.post-title a:hover {
    color: var(--primary-color);
}

.post-excerpt {
    color: var(--text-secondary);
    margin: 1rem 0;
    line-height: 1.7;
}

.read-more {
    color: var(--primary-color);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.read-more:hover {
    gap: 0.75rem;
}

/* ==========================================
   SINGLE POST
   ========================================== */

.post-single {
    padding: 4rem 0;
}

.post-header {
    padding: 2rem 0;
    background: var(--bg-secondary);
    margin-bottom: 3rem;
}

.post-header .post-title {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
}

.post-meta-full {
    margin-bottom: 2rem;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.author-avatar-large {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.featured-image {
    margin-top: 2rem;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.post-body {
    padding: 2rem 0;
}

.markdown-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.markdown-content h2 {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.markdown-content h3 {
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.markdown-content p {
    margin-bottom: 1.5rem;
}

.markdown-content code {
    background: var(--bg-secondary);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.markdown-content pre {
    background: var(--bg-dark);
    color: #f8f8f2;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 1.5rem;
}

.markdown-content pre code {
    background: none;
    padding: 0;
    color: inherit;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 2rem 0;
}

.markdown-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--text-secondary);
}

.markdown-content ul, .markdown-content ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.markdown-content li {
    margin-bottom: 0.5rem;
}

.post-gallery {
    margin-top: 3rem;
}

.post-gallery h3 {
    margin-bottom: 1.5rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.gallery-item {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

.gallery-item figcaption {
    padding: 1rem;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.back-link {
    color: var(--primary-color);
    font-weight: 500;
}

.empty-state {
    text-align: center;
    padding: 4rem 0;
}

.empty-state h2 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.empty-state p {
    color: var(--text-secondary);
}

/* ==========================================
   FOOTER
   ========================================== */

.site-footer {
    background: var(--bg-dark);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.footer-section h4 {
    font-size: 1rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.footer-section p {
    opacity: 0.8;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    transition: var(--transition);
}

.footer-section a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
}

.footer-bottom p {
    margin-bottom: 0.75rem;
}

.footer-legal-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    font-size: 0.85rem;
}

.footer-legal-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.2s ease;
}

.footer-legal-links a:hover {
    color: white;
    opacity: 1;
}

.footer-legal-links span {
    color: rgba(255, 255, 255, 0.4);
}

/* ==========================================
   RESPONSIVE
   ========================================== */

@media (max-width: 968px) {
    .hero .container {
        grid-template-columns: 1fr;
    }

    .hero-visual {
        height: 300px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-md);
        display: none;
    }

    .nav-menu.active {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .page-title {
        font-size: 2.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .post-header .post-title {
        font-size: 2rem;
    }

    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
}
