/*
Theme Name: V-Chek Professional Theme
Description: Enterprise-grade WordPress theme for V-Chek blood pressure monitoring device
Version: 1.2.0
Author: V-Chek Development Team
Author URI: https://evercons.com
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vchek-theme
Domain Path: /languages
Requires at least: 5.0
Tested up to: 6.4
Requires PHP: 7.4
Network: false
Update URI: false

This theme follows WordPress coding standards and security best practices.
Optimized for performance, accessibility, and maintainability.
*/

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    font-weight: 400;
    line-height: 1.6;
    color: #1a202c;
    background-color: #ffffff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   ACCESSIBILITY IMPROVEMENTS
   ========================================================================== */

/* Skip to main content link for screen readers */
.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999999;
    padding: 8px 16px;
    background: #000;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.skip-link:focus {
    left: 6px;
    top: 7px;
}

/* Focus indicators for better accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* Screen reader only text */
.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;
}

/* ==========================================================================
   LAYOUT CONTAINERS
   ========================================================================== */

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
    width: 100%;
}

@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
}

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

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.site-header.header-hidden {
    transform: translateY(-100%);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    min-height: 70px;
}

.site-branding {
    flex-shrink: 0;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.site-title a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-title a:hover,
.site-title a:focus {
    color: #1d4ed8;
}

/* Main Navigation */
.main-navigation {
    display: flex;
    align-items: center;
    gap: 2rem;
}

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

.nav-menu a {
    display: block;
    padding: 0.5rem 0;
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease;
    position: relative;
}

.nav-menu a:hover,
.nav-menu a:focus {
    color: #2563eb;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #2563eb;
    transition: width 0.3s ease;
}

.nav-menu a:hover::after,
.nav-menu a:focus::after {
    width: 100%;
}

/* CTA Button */
.header-cta .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    border: none;
    cursor: pointer;
}

.header-cta .btn-primary:hover,
.header-cta .btn-primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    width: 30px;
    height: 30px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: #1a202c;
    margin: 3px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* ==========================================================================
   CONTENT SECTIONS
   ========================================================================== */

.content-section {
    padding: 6rem 0;
    position: relative;
}

.content-section.hero {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 8rem 0 6rem;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.content-section.alternate {
    background: #f8fafc;
}

.content-section.dark {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #ffffff;
}

.section-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.section-container.single-column {
    grid-template-columns: 1fr;
    text-align: center;
    max-width: 800px;
}

.section-container.full-width {
    max-width: 100%;
    padding: 0;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

.section-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    color: #1d4ed8;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #1e293b;
    letter-spacing: -0.025em;
}

.section-title.large {
    font-size: clamp(2.5rem, 6vw, 4rem);
}

.section-title.medium {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.section-title.small {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

.section-title .highlight {
    color: #2563eb;
    position: relative;
}

.section-title .highlight::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 2px;
}

.section-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    color: #64748b;
    margin-bottom: 2rem;
    line-height: 1.7;
    max-width: 600px;
}

.section-description {
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    color: #64748b;
    margin-bottom: 2rem;
    line-height: 1.7;
}

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

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
    user-select: none;
    -webkit-user-select: none;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover,
.btn-primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    color: #ffffff;
}

.btn-primary-large {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-primary-large:hover,
.btn-primary-large:focus {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(59, 130, 246, 0.5);
    color: #ffffff;
}

.btn-secondary {
    background: #ffffff;
    color: #475569;
    border: 2px solid #e2e8f0;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-size: 1.1rem;
}

.btn-secondary:hover,
.btn-secondary:focus {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    color: #475569;
}

.btn-link {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    padding: 0.875rem 0;
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
    background: none;
    border: none;
    cursor: pointer;
}

.btn-link:hover,
.btn-link:focus {
    border-bottom-color: #3b82f6;
    color: #1d4ed8;
}

/* ==========================================================================
   GRID LAYOUTS
   ========================================================================== */

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

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

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

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

/* ==========================================================================
   CARDS
   ========================================================================== */

.card {
    background: #ffffff;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card.featured::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.card.featured:hover::before {
    transform: scaleX(1);
}

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

.card-image {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.card-image img {
    width: 80px;
    height: auto;
    opacity: 0.9;
    transition: all 0.3s ease;
    display: block;
    margin: 0 auto;
}

.card:hover .card-image img {
    opacity: 1;
    transform: scale(1.1);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.card-description {
    color: #64748b;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ==========================================================================
   FEATURE LISTS
   ========================================================================== */

.feature-list {
    display: flex;
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #475569;
    font-weight: 500;
    font-size: 0.95rem;
}

.feature-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}

.benefits-list {
    list-style: none;
    margin-bottom: 2rem;
    padding: 0;
}

.benefits-list li {
    padding: 0.5rem 0;
    color: #475569;
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ==========================================================================
   STEP CARDS
   ========================================================================== */

.step-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.step-number {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #ffffff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* ==========================================================================
   IMAGES
   ========================================================================== */

.responsive-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    display: block;
}

.featured-image {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: block;
}

.floating-image {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { 
        transform: translateY(0px); 
    }
    50% { 
        transform: translateY(-20px); 
    }
}

/* ==========================================================================
   PRODUCT SHOWCASE
   ========================================================================== */

.product-showcase {
    position: relative;
}

.product-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.product-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.product-indicators {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    padding: 0;
}

.indicator:hover,
.indicator:focus {
    background: #94a3b8;
}

.indicator.active {
    background: #3b82f6;
    transform: scale(1.2);
}

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

.site-footer {
    background: #1e293b;
    color: #ffffff;
    padding: 4rem 0 2rem;
}

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

.footer-section h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #3b82f6;
    line-height: 1.3;
}

.footer-section h4 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #ffffff;
    line-height: 1.3;
}

.footer-section p {
    color: #94a3b8;
    line-height: 1.6;
    font-size: 0.95rem;
}

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

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

.footer-section ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-section ul li a:hover,
.footer-section ul li a:focus {
    color: #3b82f6;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #334155;
    color: #94a3b8;
    font-size: 0.9rem;
}

/* ==========================================================================
   WORDPRESS CONTENT STYLES
   ========================================================================== */

.wp-content {
    margin-bottom: 2rem;
}

.wp-content h1,
.wp-content h2,
.wp-content h3,
.wp-content h4,
.wp-content h5,
.wp-content h6 {
    margin-bottom: 1rem;
    color: #1e293b;
    line-height: 1.3;
}

.wp-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

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

.wp-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

.wp-content blockquote {
    border-left: 4px solid #3b82f6;
    padding-left: 1rem;
    margin: 1.5rem 0;
    font-style: italic;
    color: #64748b;
}

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

@media (max-width: 1024px) {
    .section-container {
        gap: 3rem;
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .main-navigation {
        gap: 1rem;
    }

    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: #ffffff;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding: 2rem 0;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .nav-menu li {
        margin: 1rem 0;
    }

    .nav-menu a {
        font-size: 1.1rem;
        color: #1e293b;
        padding: 1rem;
    }

    /* Layout Adjustments */
    .section-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        padding: 0 1rem;
    }

    .content-section {
        padding: 4rem 0;
    }

    .content-section.hero {
        padding: 6rem 0 4rem;
        min-height: auto;
    }

    .feature-list {
        justify-content: center;
        flex-wrap: wrap;
        gap: 1rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .grid-auto {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0.75rem 0;
    }

    .container {
        padding: 0 1rem;
    }

    .content-section {
        padding: 3rem 0;
    }

    .content-section.hero {
        padding: 5rem 0 3rem;
    }

    .section-container {
        padding: 0 0.5rem;
    }

    .btn-primary-large,
    .btn-secondary {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .step-card {
        padding: 1.5rem;
    }
}

/* ==========================================================================
   PERFORMANCE OPTIMIZATIONS
   ========================================================================== */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .floating-image {
        animation: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary,
    .btn-primary-large {
        border: 2px solid #000000;
    }
    
    .card {
        border: 2px solid #000000;
    }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    .site-header,
    .mobile-menu-toggle,
    .nav-menu,
    .header-cta,
    .site-footer {
        display: none !important;
    }
    
    .content-section {
        padding: 1rem 0;
    }
    
    .section-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #000000;
    }
    
    a {
        text-decoration: underline;
    }
    
    .btn {
        border: 1px solid #000000;
        background: transparent !important;
        color: #000000 !important;
    }
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.hidden { display: none; }
.visible { display: block; }

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* ==========================================================================
   LOADING STATES
   ========================================================================== */

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}