/*
Theme Name: NoteWise
Description: Professional theme for NoteWise iOS app with AI-powered audio transcription and summarization features. Fully responsive with purple gradient branding and SEO optimization.
Version: 1.0
Author: Love Lake Technologies
Text Domain: notewise
*/

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

:root {
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #9333ea 100%);
    --secondary-gradient: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    --accent-color: #f59e0b;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-light: #ffffff;
    --background: #ffffff;
    --surface: #f9fafb;
    --border: #e5e7eb;
    --shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

html {
    scroll-behavior: smooth;
}

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

/* WordPress Core Reset */
.wp-caption {
    max-width: 100%;
}

.wp-caption-text {
    margin: 0.8075em 0;
}

.gallery-caption {
    margin: 0 0 1.5em;
}

.alignnone {
    margin: 5px 20px 20px 0;
}

.aligncenter,
div.aligncenter {
    display: block;
    margin: 5px auto 5px auto;
}

.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

a img.alignright {
    float: right;
    margin: 5px 0 20px 20px;
}

a img.alignnone {
    margin: 5px 20px 20px 0;
}

a img.alignleft {
    float: left;
    margin: 5px 20px 20px 0;
}

a img.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.wp-caption {
    background: #fff;
    border: 1px solid #f0f0f0;
    max-width: 96%;
    padding: 5px 3px 10px;
    text-align: center;
}

.wp-caption.alignnone {
    margin: 5px 20px 20px 0;
}

.wp-caption.alignleft {
    margin: 5px 20px 20px 0;
}

.wp-caption.alignright {
    margin: 5px 0 20px 20px;
}

.wp-caption img {
    border: 0 none;
    height: auto;
    margin: 0;
    max-width: 98.5%;
    padding: 0;
    width: auto;
}

/* Typography */
.hero-title {
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 900;
    line-height: 1.1;
    color: white;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    font-weight: 400;
    line-height: 1.5;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Layout Components */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section {
    padding: 5rem 0;
}

.hero {
    background: var(--primary-gradient);
    color: var(--text-light);
    padding: 8rem 0 6rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="0.5"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    pointer-events: none;
}

/* App Icon */
.app-icon {
    width: 160px;
    height: 160px;
    background: var(--secondary-gradient);
    border-radius: 32px;
    margin: 0 auto 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2), 0 0 0 4px rgba(255, 255, 255, 0.1);
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.app-icon:hover {
    transform: scale(1.05);
}

.app-icon svg {
    width: 80px;
    height: 80px;
    fill: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    font-size: 1.125rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    min-height: 56px;
}

.btn-primary {
    background: var(--accent-color);
    color: var(--text-primary);
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--text-primary);
    text-decoration: none;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: var(--text-light);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: var(--text-light);
    text-decoration: none;
}

.app-store-badge {
    height: 60px;
    width: auto;
    margin: 0 10px;
}

/* Feature Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: var(--background);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.feature-icon svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Use Cases */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.use-case {
    background: var(--surface);
    padding: 2rem;
    border-radius: 12px;
    border-left: 4px solid var(--accent-color);
}

.use-case-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

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

/* CTA Section */
.cta-section {
    background: var(--primary-gradient);
    color: var(--text-light);
    text-align: center;
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: rgba(255, 255, 255, 0.8);
    padding: 3rem 0 2rem;
    text-align: center;
    width: 100% !important;
    margin: 0 !important;
    left: 0;
    right: 0;
}

.footer-logo-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.footer-site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.footer-description {
    max-width: 500px;
    margin: 0 auto;
    opacity: 0.9;
    line-height: 1.6;
    font-size: 1.1rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 2rem;
    margin-top: 2rem;
}

.footer-nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    margin: 0 1.5rem;
    padding: 0.5rem 0;
    font-weight: 500;
    transition: all 0.3s ease;
    border-bottom: 2px solid transparent;
}

.footer-nav a:hover {
    color: white;
    border-bottom-color: var(--accent-color);
}

.footer-copyright {
    margin-top: 1.5rem;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Site Header */
.site-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 1.25rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    width: 100% !important;
    margin: 0 !important;
    left: 0;
    right: 0;
}

.admin-bar .site-header {
    top: 32px;
}

/* Front Page Header Styles */
.front-page-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    z-index: 100 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1) !important;
    padding: 1rem 0 !important;
}

.front-page-header .nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1rem;
}

.front-page-header .nav-menu a {
    color: var(--text-primary) !important;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.front-page-header .nav-menu a:hover {
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
}

.admin-bar .front-page-header {
    top: 32px !important;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.site-branding .logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.2s ease;
}

.site-branding .logo-link:hover {
    transform: translateY(-1px);
}

.logo-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.logo-icon svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.site-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.main-navigation {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin: 0;
}

.nav-menu a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    font-size: 0.95rem;
}

.nav-menu a:hover,
.nav-menu .current-menu-item a {
    color: white;
    background: var(--primary-gradient);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transform: translateY(-1px);
}

.header-actions {
    display: flex;
    align-items: center;
}

.btn-small {
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    min-height: auto;
}

/* Page Content */
.page-content,
.post-content {
    padding: 4rem 0;
    min-height: 60vh;
}

.content-header {
    text-align: center;
    margin-bottom: 3rem;
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--surface) 0%, rgba(99, 102, 241, 0.05) 100%);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.page-title,
.post-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.page-meta {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 3rem;
    margin-top: -2rem;
    position: relative;
    z-index: 1;
}

/* Ensure full width for header and footer */
.site-header,
.footer {
    width: 100%;
    margin: 0;
    padding-left: 0;
    padding-right: 0;
}

.site-header .container,
.footer .container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.content-wrapper p,
.content-wrapper ul,
.content-wrapper ol,
.content-wrapper blockquote {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.content-wrapper h1,
.content-wrapper h2,
.content-wrapper h3,
.content-wrapper h4,
.content-wrapper h5,
.content-wrapper h6 {
    margin: 2rem 0 1rem;
    line-height: 1.3;
    color: var(--text-primary);
}

.content-wrapper h1 { font-size: 2.5rem; }
.content-wrapper h2 { font-size: 2rem; }
.content-wrapper h3 { font-size: 1.75rem; }
.content-wrapper h4 { font-size: 1.5rem; }
.content-wrapper h5 { font-size: 1.25rem; }
.content-wrapper h6 { font-size: 1.125rem; }

/* Blog Posts */
.post-excerpt {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.read-more {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 600;
}

.read-more:hover {
    text-decoration: underline;
}

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

.post-card {
    background: var(--background);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-card-content {
    padding: 1.5rem;
}

.post-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.post-card-title a {
    color: var(--text-primary);
    text-decoration: none;
}

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

/* WordPress Specific */
.admin-bar .hero {
    padding-top: calc(8rem + 32px);
}

.admin-bar .site-header {
    top: 32px;
}

/* Override WordPress and plugin constraints */
body .site-header,
body .footer {
    box-sizing: border-box !important;
    position: relative !important;
}

body .site-header {
    position: sticky !important;
    top: 0 !important;
}

body.admin-bar .site-header {
    top: 32px !important;
}

/* Ensure no wrapper constraints affect header/footer */
.site-header,
.footer {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Force full width on all page types */
.page .site-header,
.page .footer,
.single .site-header,
.single .footer,
.archive .site-header,
.archive .footer,
.search .site-header,
.search .footer {
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero {
        padding: 6rem 0 4rem;
    }
    
    .admin-bar .hero {
        padding-top: calc(6rem + 46px);
    }
    
    .admin-bar .site-header {
        top: 46px;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .app-icon {
        width: 120px;
        height: 120px;
    }
    
    .app-icon svg {
        width: 60px;
        height: 60px;
    }
    
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
        margin: 0.5rem 0.25rem;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    /* Mobile header */
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .main-navigation {
        order: 3;
        width: 100%;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
        text-align: center;
    }
    
    .header-actions {
        order: 2;
    }
    
    .content-wrapper {
        padding: 2rem 1rem;
        margin-top: -1rem;
    }
    
    .page-content,
    .post-content {
        padding: 2rem 0;
    }
    
    .content-header {
        padding: 2rem 0;
    }
    
    .logo-icon {
        width: 40px;
        height: 40px;
        margin-right: 0.5rem;
    }
    
    .logo-icon svg {
        width: 20px;
        height: 20px;
    }
    
    .site-title {
        font-size: 1.25rem;
    }
    
    .footer-logo-icon {
        width: 40px;
        height: 40px;
    }
    
    .footer-site-title {
        font-size: 1.25rem;
    }
}

/* Performance Optimizations */
.lazyload {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazyload.loaded {
    opacity: 1;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus styles */
.btn:focus,
a:focus {
    outline: 2px solid var(--accent-color);
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* WordPress Content Styles */
.wp-block-group {
    margin-bottom: 1.5rem;
}

.wp-block-heading {
    margin-bottom: 1rem;
}

.has-text-align-center {
    text-align: center;
}

.has-text-align-left {
    text-align: left;
}

.has-text-align-right {
    text-align: right;
}

/* Print Styles */
@media print {
    .hero::before,
    .footer,
    .btn {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .hero {
        background: none;
        color: #000;
    }
    
    .hero-title {
        color: #000 !important;
        -webkit-text-fill-color: #000 !important;
    }
}