/* ClearPath Health Solutions - Main Stylesheet */

/* ========== Theme Variables ========== */
:root {
    --bg-primary: #fff;
    --bg-secondary: #f9f9f9;
    --bg-card: #fff;
    --bg-slider: #ffffff;
    --bg-footer: #f5f5f5;
    --bg-input: #fff;

    --text-primary: #333;
    --text-secondary: #555;
    --text-muted: #666;
    --text-heading: #1a1a2e;
    --text-nav: #333;
    --text-footer: #555;
    --text-footer-heading: #333;
    --text-footer-link: #0073aa;
    --text-footer-bottom: #888;

    --border-color: #e0e0e0;
    --border-input: #ccc;
    --border-footer: #e0e0e0;

    --accent: #0073aa;
    --accent-hover: #005177;
    --accent-check: #28a745;

    --shadow-light: rgba(0,0,0,0.1);
    --shadow-medium: rgba(0,0,0,0.12);

    --table-even: #f9f9f9;
    --table-hover: #eef5fa;

    --submenu-hover: #f5f5f5;

    --svg-stroke: #6dccea;
    --svg-stroke-alt: #3399cc;
    --svg-accent: #5cd65c;
    --svg-fill-dark: #0d1520;
    --svg-fill-panel: #0a1220;
    --svg-fill-bar: #162840;
}

[data-theme="dark"] {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-card: #1e1e1e;
    --bg-slider: #0a0a1a;
    --bg-footer: #0a0a1a;
    --bg-input: #2a2a2a;

    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-muted: #999;
    --text-heading: #e8e8e8;
    --text-nav: #e0e0e0;
    --text-footer: #b0b0b0;
    --text-footer-heading: #e0e0e0;
    --text-footer-link: #6dccea;
    --text-footer-bottom: #777;

    --border-color: #333;
    --border-input: #444;
    --border-footer: #222;

    --accent: #4db8d8;
    --accent-hover: #6dccea;
    --accent-check: #5cd65c;

    --shadow-light: rgba(0,0,0,0.3);
    --shadow-medium: rgba(0,0,0,0.4);

    --table-even: #1a1a1a;
    --table-hover: #1e2a3a;

    --submenu-hover: #2a2a2a;

    --svg-stroke: #8dd8f0;
    --svg-stroke-alt: #4db8d8;
    --svg-accent: #7ce87c;
    --svg-fill-dark: #0a0e18;
    --svg-fill-panel: #080c14;
    --svg-fill-bar: #1a2a40;
}

/* ========== Reset and Base ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    transition: background-color 0.3s, color 0.3s;
}

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

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
}

/* ========== Header ========== */
.site-header {
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    max-width: 1200px;
    margin: 0 auto;
    transition: background-color 0.3s, border-color 0.3s;
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
}

.site-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-decoration: none;
}
.site-logo img {
    max-height: 50px;
    width: auto;
}
.site-tagline {
    display: block;
    font-size: 11.9px;
    letter-spacing: 1.9px;
    color: var(--text-muted);
    font-weight: 500;
    margin-top: 2px;
    white-space: nowrap;
    text-transform: uppercase;
}

/* ========== Dark Mode Toggle ========== */
.theme-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 15px;
    cursor: pointer;
    font-size: 13px;
    color: var(--text-muted);
    user-select: none;
}

.theme-toggle-track {
    width: 36px;
    height: 20px;
    background: var(--border-color);
    border-radius: 10px;
    position: relative;
    transition: background 0.3s;
}

.theme-toggle-track::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

[data-theme="dark"] .theme-toggle-track {
    background: var(--accent);
}

[data-theme="dark"] .theme-toggle-track::after {
    transform: translateX(16px);
}

.theme-icon {
    font-size: 16px;
    line-height: 1;
}

/* ========== Navigation ========== */
.main-nav {
    display: flex;
    align-items: center;
}

.main-nav ul {
    list-style: none;
}

.main-nav > ul {
    display: flex;
    gap: 5px;
}

.main-nav > ul > li {
    position: relative;
}

.main-nav a {
    display: block;
    padding: 10px 15px;
    color: var(--text-nav);
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s;
}

.main-nav a:hover {
    color: var(--accent);
}

.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 8px var(--shadow-light);
    min-width: 200px;
    z-index: 1001;
    padding: 0;
}

.main-nav > ul > li:hover > .sub-menu {
    display: block;
}

.sub-menu li {
    display: block;
}

.sub-menu a {
    padding: 8px 15px;
    white-space: nowrap;
}

.sub-menu a:hover {
    background: var(--submenu-hover);
}

.sub-menu li {
    position: relative;
}

.sub-menu .sub-menu {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
}

.sub-menu li:hover > .sub-menu {
    display: block;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    color: var(--text-primary);
}

/* ========== Hero Slider ========== */
.hero-slider {
    position: relative;
    height: 350px;
    overflow: hidden;
    background: var(--bg-slider);
    max-width: 1200px;
    margin: 0 auto;
    border-radius: 0 0 8px 8px;
    border: 1px solid #f2f2f2;
    transition: background-color 0.3s;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
    flex-direction: column;
    padding-bottom: 4px;
    padding-left: 80px;
    text-align: left;
    color: var(--text-heading);
    opacity: 0;
    transition: opacity 1s ease;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 130px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.18));
    pointer-events: none;
}

.slide.active {
    opacity: 1;
}

.slide.slide-left {
    align-items: flex-start;
    text-align: left;
    padding-left: 80px;
    padding-bottom: 4px;
}

.slide.slide-right {
    align-items: flex-start;
    text-align: left;
    padding-left: 80px;
    padding-bottom: 4px;
}

.slide h2 {
    font-size: 42px;
    margin-bottom: 0;
}

.slide p {
    font-size: 20px;
    color: var(--text-secondary);
    margin-top: -12px;
    margin-bottom: 0;
}

/* Page Hero (non-slider) */
.page-hero {
    background: var(--bg-slider);
    color: var(--text-heading);
    text-align: center;
    padding: 60px 20px;
}

.page-hero h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.page-hero p {
    font-size: 18px;
    opacity: 0.9;
}

/* ========== Content Sections ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 60px 0;
}

.section-light {
    background: var(--bg-secondary);
    transition: background-color 0.3s;
}

/* ========== Product Cards Grid ========== */
.product-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    padding: 40px 0;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    text-align: center;
    transition: box-shadow 0.3s, background-color 0.3s, border-color 0.3s;
}

.product-card:hover {
    box-shadow: 0 4px 16px var(--shadow-light);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    padding: 15px 20px 0;
}

.edition-label {
    font-size: 22px;
    font-weight: 700;
    color: var(--accent);
    text-align: center;
    padding: 0 10px 10px;
}

.product-card-content {
    padding: 20px;
}

.product-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-heading);
}

.product-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.product-card .btn {
    display: inline-block;
    padding: 8px 20px;
    background: var(--accent);
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.3s;
}

.product-card .btn:hover {
    background: var(--accent-hover);
    color: #fff;
}

/* ========== Text Content Block ========== */
.text-block {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 40px 20px;
}

.text-block h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: var(--text-heading);
}

.text-block p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* ========== Buttons ========== */
.btn {
    display: inline-block;
    padding: 10px 25px;
    background: var(--accent);
    color: #fff;
    border-radius: 4px;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
}

.btn:hover {
    background: var(--accent-hover);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
}

.btn-outline:hover {
    background: var(--accent);
    color: #fff;
}

/* ========== Comparison Table ========== */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 14px;
}

.comparison-table th,
.comparison-table td {
    padding: 12px 15px;
    text-align: center;
    border: 1px solid var(--border-color);
}

.comparison-table thead th {
    background: var(--accent);
    color: #fff;
    font-weight: 600;
    font-size: 15px;
}

.comparison-table tbody tr:nth-child(even) {
    background: var(--table-even);
}

.comparison-table tbody tr:hover {
    background: var(--table-hover);
}

.comparison-table td:first-child {
    text-align: left;
    font-weight: 500;
}

.comparison-table .check {
    color: var(--accent-check);
    font-size: 18px;
}

.comparison-table .dash {
    color: var(--text-muted);
}

/* ========== Product Detail Page ========== */
.product-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 40px 0;
}

.product-detail img {
    border-radius: 8px;
    box-shadow: 0 2px 12px var(--shadow-light);
}

.product-detail-content h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: var(--text-heading);
}

.product-detail-content p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.8;
}

/* Feature List */
.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    font-size: 15px;
}

.sub-list li {
    padding: 2px 0;
    padding-left: 25px;
}


.feature-list li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--accent-check);
    font-weight: bold;
}

.sub-list li::before {
    content: "\2022";
    position: absolute;
    left: 0;
    color: var(--accent-check);
    font-weight: bold;
}

/* ========== Forms ========== */
.form-section {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

.form-section h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--text-heading);
}

.form-section > p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    font-size: 14px;
    color: var(--text-primary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-input);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    background: var(--bg-input);
    color: var(--text-primary);
    transition: background-color 0.3s, border-color 0.3s, color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
}

.form-group textarea {
    height: 120px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ========== Support Page ========== */
.support-content {
    text-align: center;
    padding: 40px 20px;
}

.support-content h2 {
    font-size: 28px;
    margin-bottom: 15px;
    color: var(--text-heading);
}

.support-content p {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.support-content a {
    font-weight: 600;
}

/* App Download Section */
.app-downloads {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 30px 0;
}

.app-download-card {
    text-align: center;
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-card);
    transition: background-color 0.3s, border-color 0.3s;
}

.app-download-card h4 {
    margin-bottom: 10px;
    color: var(--text-heading);
}

/* Carousel for CP2GO */
.feature-carousel {
    position: relative;
    height: 300px;
    overflow: hidden;
    background: var(--bg-slider);
    margin-bottom: 40px;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 28px;
    font-weight: 600;
    opacity: 0;
    transition: opacity 1s ease;
}

.carousel-slide.active {
    opacity: 1;
}

/* ========== Footer ========== */
.site-footer {
    background: var(--bg-footer);
    color: var(--text-footer);
    padding: 40px 0 20px;
    max-width: 1200px;
    margin: 0 auto;
    border-top: 3px solid var(--accent);
    transition: background-color 0.3s, border-color 0.3s;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.footer-section h3 {
    color: var(--text-footer-heading);
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-section p {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 5px;
}

.footer-section a {
    color: var(--text-footer-link);
}

.footer-section a:hover {
    color: var(--accent-hover);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    font-size: 14px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 30px auto 0;
    padding: 15px 20px 0;
    border-top: 1px solid var(--border-footer);
    text-align: center;
    font-size: 13px;
    color: var(--text-footer-bottom);
}

/* ========== Dark mode adjustments ========== */
[data-theme="dark"] .site-logo img {
    filter: brightness(1.8) saturate(1.2);
}

[data-theme="dark"] .slide h2 {
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

[data-theme="dark"] .slide p {
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-primary);
        border-top: 1px solid var(--border-color);
        box-shadow: 0 4px 8px var(--shadow-light);
    }

    .main-nav.open {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
    }

    .sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        background: var(--bg-secondary);
    }

    .product-cards {
        grid-template-columns: 1fr;
    }

    .product-detail {
        grid-template-columns: 1fr;
    }

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

    .hero-slider {
        height: 250px;
    }

    .slide h2 {
        font-size: 28px;
    }

    .slide.slide-left {
        padding-left: 30px;
    }

    .slide.slide-right {
        padding-right: 30px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .comparison-table {
        font-size: 12px;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 8px 5px;
    }

    .theme-toggle span.theme-label {
        display: none;
    }
}
