/* source-code.css - V2 (Western Tech Style) */
.source-code-page {
    height: 100%;
    overflow-y: auto;
    padding: 80px 40px 40px; /* 80px top, 40px sides/bottom */
    background-color: #ffffff; /* Changed to pure white */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box; /* Ensure padding is included in height calculation */
}

.page-header {
    text-align: center;
    margin: 0 auto 50px; /* Let page padding handle top margin */
    max-width: 800px;
}

.main-headline {
    font-size: 42px; /* Adjusted for better balance */
    font-weight: 700;
    color: #212529;
    letter-spacing: -1.5px;
    line-height: 1.2;
    margin: 0 0 20px 0;
}

.sub-headline {
    font-size: 18px; /* Adjusted for better balance */
    color: #6c757d;
    line-height: 1.6;
    margin: 0 auto;
    max-width: 700px; /* Increased width for the text */
}

.source-code-page section {
    max-width: 960px; /* Constrain width to make it less scattered */
    margin: 0 auto 35px; /* Center sections and keep bottom margin */
    padding: 30px; /* Increased padding */
    background-color: #ffffff;
    border-radius: 8px; /* Slightly less rounded */
    box-shadow: 0 2px 10px rgba(0,0,0,0.06); /* Softer shadow */
    border: none; /* Removed border for a cleaner look */
}

.source-code-page h2 {
    font-size: 24px;
    color: #212529; /* Darker, more standard text color */
    margin-top: 0;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6; /* Lighter border color */
    font-weight: 600;
}

/* --- Image Showcase --- */
.carousel {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.carousel__track-container {
    overflow: hidden;
    border-radius: 6px;
}

.carousel__track {
    padding: 0;
    margin: 0;
    list-style: none;
    display: flex;
    transition: transform 0.5s ease-out;
}

.carousel__slide {
    flex: 0 0 100%;
    width: 100%;
}

.carousel__image {
    width: 100%;
    height: auto;
    display: block;
}

/* Overriding the generic .source-code-page button style */
.carousel .carousel__button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(25, 25, 25, 0.5);
    border: none;
    border-radius: 50%;
    color: white;
    width: 44px;
    height: 44px;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: background-color 0.2s ease;
}

.carousel .carousel__button:hover {
    background: rgba(0, 0, 0, 0.7);
    box-shadow: none; /* Reset generic hover shadow */
    transform: translateY(-50%); /* Reset generic hover transform */
}

.carousel__button--left {
    left: 15px; /* Moved inside the image for better aesthetics */
}

.carousel__button--right {
    right: 15px; /* Moved inside the image for better aesthetics */
}

.carousel__nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

/* Overriding the generic .source-code-page button style */
.carousel .carousel__indicator {
    border: none;
    background-color: #ccc;
    width: 12px;
    height: 12px;
    padding: 0;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.carousel .carousel__indicator:hover {
    background-color: #aaa;
    transform: none; /* Reset generic hover transform */
    box-shadow: none; /* Reset generic hover shadow */
}

.carousel .carousel__indicator.current-slide {
    background-color: #007bff;
}

.carousel .carousel__indicator.current-slide:hover {
    background-color: #007bff; /* Keep color on hover for active dot */
}

/* --- Shared button style to match the app --- */
/* This style should NOT apply to carousel buttons. The overrides above handle this. */
.source-code-page button {
    padding: 12px 24px;
    border: 1px solid transparent;
    border-radius: 5px; /* Sharper corners */
    background-color: #007bff; /* Classic bootstrap blue */
    color: white;
    font-size: 15px;
    font-weight: 600; /* Bolder text */
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    letter-spacing: 0.5px;
}

.source-code-page button:hover {
    background-color: #0069d9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.25);
}

/* Secondary, outline button style */
#toggle-images-btn {
    background-color: #6c757d; /* Grey for secondary actions */
}

#toggle-images-btn:hover {
     background-color: #5a6268;
     box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

#scroll-to-price-btn {
    background-color: transparent;
    color: #007bff;
    border: 1px solid #007bff;
}
#scroll-to-price-btn:hover {
    background-color: #007bff;
    color: white;
}

/* --- Business Story & Details --- */
#business-story p,
#source-code-details ul {
    font-size: 16px;
    line-height: 1.8; /* More line spacing */
    color: #495057; /* Softer text color */
}

#source-code-details ul {
    list-style-type: none;
    padding-left: 0;
}
#source-code-details ul li {
    padding-left: 24px;
    margin-bottom: 15px;
    position: relative;
}
#source-code-details ul li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #28a745; /* Green checkmark still works well */
    font-weight: bold;
}

#source-code-details .sub-list {
    list-style-type: none;
    padding-left: 15px;
    margin-top: 10px;
}

#source-code-details .sub-list li {
    padding-left: 0;
    margin-bottom: 8px;
}

#source-code-details .sub-list li::before {
    content: ''; /* Remove the checkmark for sub-items */
}

/* --- Pricing --- */
#pricing {
    background: none; /* Removed gradient for a flat design */
}

.pricing-card {
    text-align: center;
    max-width: 400px; /* Slightly smaller card */
    margin: 20px auto;
    padding: 40px;
    border: 1px solid #dee2e6; /* Subtle border */
    border-radius: 8px;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); /* Softer shadow */
}

.pricing-card h3 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 20px;
}

.pricing-card .price {
    font-size: 44px;
    font-weight: 700;
    color: #212529; /* Black price for a classic look */
    margin: 20px 0 30px;
}
.pricing-card .price::before {
    content: '$';
    font-size: 24px;
    font-weight: 400;
    vertical-align: super;
    margin-right: 4px;
}


.pricing-card .features-list {
    list-style: none;
    padding: 0;
    margin-bottom: 35px;
    text-align: left;
    color: #495057;
}

.pricing-card .features-list li {
    margin-bottom: 12px;
}

.buy-now-btn {
    display: inline-block;
    width: 100%;
    padding: 16px 20px;
    background-color: #007aff;
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.2);
    margin-top: 20px;
    text-decoration: none;
}

.buy-now-btn:hover {
    background-color: #006ee6;
    transform: none;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.25);
}

.buy-now-btn:active {
    background-color: #005ecb;
    transform: none;
    box-shadow: none;
}

/* Scrollbar styling for webkit browsers */
.source-code-page::-webkit-scrollbar {
    width: 9px;
}

.source-code-page::-webkit-scrollbar-track {
    background: transparent;
}

.source-code-page::-webkit-scrollbar-thumb {
    background: #ced4da;
    border-radius: 10px;
}

.source-code-page::-webkit-scrollbar-thumb:hover {
    background: #adb5bd;
}

/* --- GitHub Code Explorer Widget --- */
#code-explorer {
    background: none;
    box-shadow: none;
    border: none;
    padding: 0;
}

.github-widget {
    background-color: #0d1117;
    border: 1px solid #30363d;
    border-radius: 8px;
    margin: 0 auto;
    max-width: 960px;
    font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
    overflow: hidden;
}

.widget-header {
    background-color: #161b22;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #30363d;
}

.dots {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red { background-color: #ed6a5e; }
.dot.yellow { background-color: #f4be4f; }
.dot.green { background-color: #61c554; }

.widget-title {
    color: #8b949e;
    font-size: 13px;
    text-align: center;
    flex-grow: 1;
    margin-right: 48px; /* to balance the dots */
}

.widget-body {
    display: flex;
    min-height: 400px;
}

.file-tree {
    width: 240px;
    background-color: #161b22;
    padding: 15px 0;
    border-right: 1px solid #30363d;
    overflow-y: auto;
}

.file-tree ul {
    list-style: none;
    padding: 0;
}

.tree-item {
    color: #c9d1d9;
    font-size: 14px;
    padding: 6px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tree-item.folder {
    font-weight: 500;
}

.tree-item .folder-icon,
.tree-item .file-icon {
    fill: #8b949e;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.tree-item.folder.expanded > .folder-icon {
    /* Simple rotation for expansion, could be a different icon too */
    /* transform: rotate(90deg); */
}

.file-tree .nested {
    padding-left: 20px;
    display: none; /* Hidden by default */
}

.file-tree .nested.active {
    display: block; /* Shown when folder is expanded */
}

.file-tree .tree-item.file:hover {
    background-color: rgba(173, 216, 230, 0.1); /* Light blueish hover */
}

.file-tree .tree-item.file.active {
    background-color: #007bff;
    color: white;
}
.file-tree .tree-item.file.active .file-icon {
    fill: white;
}


.code-viewer {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.code-header {
    background-color: #161b22;
    padding: 12px 20px;
    border-bottom: 1px solid #30363d;
    color: #c9d1d9;
    font-size: 14px;
}

.code-viewer-pre {
    margin: 0;
    padding: 16px;
    overflow-x: auto;
    flex-grow: 1;
    background-color: #0d1117;
}

.code-viewer-pre code {
    font-family: 'SF Mono', 'Consolas', 'Menlo', monospace;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre;
    color: #c9d1d9;
}

/* Scrollbar for file tree and code viewer */
.file-tree::-webkit-scrollbar,
.code-viewer-pre::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.file-tree::-webkit-scrollbar-track,
.code-viewer-pre::-webkit-scrollbar-track {
    background: #161b22;
}

.file-tree::-webkit-scrollbar-thumb,
.code-viewer-pre::-webkit-scrollbar-thumb {
    background: #30363d;
    border-radius: 4px;
}

.file-tree::-webkit-scrollbar-thumb:hover,
.code-viewer-pre::-webkit-scrollbar-thumb:hover {
    background: #444c56;
}
