/*
Theme Name: Aggia Theme v2
Author: Aggia
Description: Dedykowany motyw dla firmy Aggia
Version: 2.0
*/

@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&family=Poppins:wght@400;500;600&family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --primary-color: #00666e;
    --secondary-color: #45b898;
    --dark-color: #1c1c1c;
    --light-color: #f8f9fa;
    --white: #ffffff;
    --text-color: #333333;
    --sub-text-color: #676767;
    --transition: all 0.3s ease;
    --font-main: 'Roboto', sans-serif;
    --font-heading: 'Montserrat', sans-serif;
    --font-accent: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--dark-color);
    font-weight: 400; /* Unified font weight */
}

h2 {
    font-size: 3rem; /* Unified H2 size */
    margin-bottom: 60px;
    line-height: 1.2;
    position: relative;
    display: inline-block;
}

h2::before {
    content: '//';
    color: var(--secondary-color);
    margin-right: 15px;
    font-weight: 800;
    letter-spacing: -2px;
}

h3 {
    font-size: 1.8rem; /* Unified H3 size */
    margin-bottom: 20px;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Transparent mode for Hero pages */
.header.transparent-mode {
    background: transparent;
    box-shadow: none;
}

.header.transparent-mode.scrolled {
    background: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    transition: height 0.3s ease;
}

.header.scrolled .container {
    height: 70px;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-transform: uppercase;
    display: flex;
    align-items: center;
}

.logo a img {
    transition: filter 0.3s ease;
}

/* Make logo white ONLY on transparent header when not scrolled */
.header.transparent-mode:not(.scrolled) .logo a img {
    filter: brightness(0) invert(1);
}

.nav-list {
    display: flex;
    align-items: center;
}

.nav-list li {
    margin-left: 20px;
}

.nav-list a {
    color: var(--dark-color); /* Default dark for standard pages */
    font-weight: 500;
    transition: var(--transition);
}

.nav-list a:hover {
    color: var(--primary-color);
}

/* White links for transparent header */
.header.transparent-mode:not(.scrolled) .nav-list a {
    color: var(--white);
}

.header.transparent-mode:not(.scrolled) .nav-list a:hover {
    color: var(--secondary-color);
}

/* Scrolled state link colors (same as default) */
.header.scrolled .nav-list a {
    color: var(--dark-color);
}

.header.scrolled .nav-list a:hover {
    color: var(--primary-color);
}

/* Dropdown Menu Styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--white);
    min-width: 250px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    z-index: 1000;
    border-radius: 5px;
    padding: 10px 0;
    top: 100%;
    left: 0;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-category {
    padding: 10px 20px 5px;
    font-weight: bold;
    color: var(--primary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    border-bottom: 1px solid #eee;
    margin-bottom: 5px;
}

.dropdown-category:first-child {
    padding-top: 5px;
}

.dropdown-content a {
    color: var(--text-color) !important; /* Force dark color in dropdown */
    padding: 8px 20px;
    text-decoration: none;
    display: block;
    font-size: 0.95rem;
    transition: var(--transition);
}

.dropdown-content a:hover {
    background-color: var(--light-color);
    color: var(--primary-color) !important;
    padding-left: 25px;
}

/* Mobile Dropdown adjustments */
@media (max-width: 768px) {
    .dropdown {
        display: block;
        width: 100%;
    }
    
    .dropdown-content {
        position: static;
        display: none; /* Hidden by default on mobile */
        box-shadow: none;
        background-color: #f9f9f9;
        width: 100%;
        padding-left: 20px;
    }

    .dropdown.active .dropdown-content {
        display: block;
    }
    

}

.btn-contact {
    background: #000000;
    color: var(--white) !important;
    padding: 10px 20px;
    border-radius: 5px;
}

.btn-contact:hover {
    background: #45b898;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--dark-color); /* Default dark */
    margin: 5px 0;
    transition: var(--transition);
}

.header.transparent-mode:not(.scrolled) .hamburger span {
    background: var(--white);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    font-family: var(--font-main);
    font-size: 1rem;
    line-height: 1.5;
    text-align: center;
}

.btn-primary {
    background-color: #000000;
    color: var(--white);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
    background-color: #45b898;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    color: var(--white);
}

/* Hero Section - Aggia Style */
.hero-aggia {
    min-height: 100vh;
    /* Background with Brand_1.jpg and a dark overlay gradient for readability */
    background: linear-gradient(135deg, rgba(0, 102, 110, 0.85) 0%, rgba(15, 46, 51, 0.9) 50%, rgba(28, 28, 28, 0.95) 100%), url('assets/Brand/Brand_1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    color: var(--white);
    padding-top: 120px;
    padding-bottom: 100px;
    overflow: hidden;
    display: flex;
    align-items: center;
}

/* Background Patterns */
.hero-aggia::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background-image: url('assets/decorations/slash-large.svg');
    background-repeat: no-repeat;
    background-position: right center;
    background-size: contain;
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
}

.hero-aggia::after {
    content: '';
    position: absolute;
    bottom: 100px;
    left: 50px;
    width: 300px;
    height: 300px;
    background-image: url('assets/decorations/dot-grid.svg');
    opacity: 0.1;
    z-index: 0;
    pointer-events: none;
}

.hero-aggia .container {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

.hero-layout {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 60px;
    margin-bottom: 60px;
}

.hero-text-content {
    flex: 1;
    max-width: 500px;
}

.hero-main-heading {
    flex: 1;
    text-align: right;
}

.hero-main-heading h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0;
    text-transform: uppercase;
    letter-spacing: -1px;
    color: var(--white);
}

.hero-description {
    font-size: 1.2rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
}

.hero-description p {
    margin-bottom: 15px;
}

.hero-footer-row {
    padding-top: 40px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

/* Responsive adjustments for footer row */
@media (max-width: 768px) {
    .hero-footer-row {
        flex-direction: column;
        gap: 30px;
        align-items: flex-start;
    }
}

.hero-scroll-down {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
}

.scroll-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: var(--white);
    transition: var(--transition);
    animation: bounce 2s infinite;
}

.scroll-circle:hover {
    border-color: var(--white);
    background: rgba(255, 255, 255, 0.1);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
    40% {transform: translateY(-10px);}
    60% {transform: translateY(-5px);}
}

/* Responsive Hero */
@media (max-width: 992px) {
    .hero-layout {
        flex-direction: column-reverse;
        align-items: flex-start;
        gap: 30px;
    }

    .hero-main-heading {
        text-align: left;
        width: 100%;
    }
    
    .hero-main-heading h1 {
        font-size: 3rem;
        margin-bottom: 20px;
    }
}

/* Partners Section */
.partners {
    padding: 80px 0;
    background: var(--white);
}

.partners h2 {
    text-align: center;
    /* Font size inherited from global h2 */
    margin-bottom: 60px;
}

.partners-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    flex-wrap: wrap;
}

.partner-logo {
    padding: 10px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px; /* Fixed height for container */
    width: 100%; /* Fluid width */
    max-width: 300px; /* Max width constraint */
    overflow: hidden; /* Crop excess whitespace from logos like Microsoft */
}

.partner-logo img {
    /* Default for well-behaved logos */
    height: 50px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: var(--transition);
}

/* Specific adjustment for Microsoft logo which has huge internal padding and is square */
.partner-logo img[alt="Microsoft"] {
    height: auto;
    width: 210px; /* Makes the content roughly 50px high */
    max-height: none; /* Override any global max-height */
    max-width: none;
}

/* Specific adjustment for DevExpress to ensure it appears */
.partner-logo img[alt="DevExpress"] {
    height: 50px;
    width: auto;
}

.partner-logo:hover img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

/* About Section */
.about {
    padding: 80px 0;
    text-align: center;
}

.about h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.about p {
    max-width: 800px;
    margin: 0 auto 20px;
    font-size: 1.1rem;
}

/* Page Hero */
.hero-page {
    height: 50vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    margin-bottom: 0;
}

.hero-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 102, 110, 0.9) 0%, rgba(28, 28, 28, 0.8) 100%);
}

.hero-page .container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.hero-page h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: -1px;
    color: var(--white);
}

.hero-page p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
    line-height: 1.6;
}

/* About Grid */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    margin-bottom: 80px;
}

.about-text h2 {
    margin-bottom: 30px;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: var(--sub-text-color);
}

.about-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

@media (max-width: 992px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .about-image {
        order: -1;
    }
}

/* Values Section */
.values-section {
    padding: 100px 0;
    background: var(--light-color);
    position: relative;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.value-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
    border: 1px solid #eee;
    position: relative;
    overflow: hidden;
}

.value-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: left;
}

.value-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.08);
}

.value-card:hover::before {
    transform: scaleX(1);
}

.value-icon-wrapper {
    width: 80px;
    height: 80px;
    background: rgba(0, 102, 110, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    transition: var(--transition);
}

.value-card:hover .value-icon-wrapper {
    background: var(--primary-color);
    color: var(--white);
}

.value-card i {
    font-size: 2rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.value-card:hover i {
    color: var(--white);
}

.value-card h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: var(--dark-color);
}

.value-card p {
    color: var(--sub-text-color);
    font-size: 0.95rem;
}

/* Stats Section */
.stats-bar {
    background: #ffffff;
    color: var(--dark-color);
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.stats-bar .stat-card {
    background: transparent;
    backdrop-filter: none;
    border: none;
    box-shadow: none;
    height: auto;
    padding: 0;
    align-items: center;
    flex-direction: column-reverse;
}

.stats-bar .stat-value {
    color: #45b898;
    align-self: center;
    margin-bottom: 10px;
}

.stats-bar .stat-card h3 {
    color: var(--dark-color);
    margin-bottom: 0;
}

.stats-bar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 100%;
    background-image: url('assets/decorations/dot-grid.svg');
    opacity: 0.05;
    pointer-events: none;
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 40px;
    position: relative;
    z-index: 2;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    display: block;
    color: var(--secondary-color);
    font-family: var(--font-heading);
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Services Section */
.services {
    padding: 100px 0;
    background: var(--light-color);
    position: relative;
    overflow: hidden;
}

.services h2 {
    text-align: center;
    /* Font size inherited */
    margin-bottom: 80px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid #eee;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    text-align: left;
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    transition: var(--transition);
    transform: scale(0.95);
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: transparent;
    box-shadow: 0 15px 40px rgba(0, 102, 110, 0.2);
}

.service-card:hover::after {
    opacity: 1;
    transform: scale(1);
}

.service-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 25px;
    background: rgba(0, 102, 110, 0.1);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    transition: var(--transition);
}

.service-card:hover i {
    background: rgba(255, 255, 255, 0.2);
    color: var(--white);
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--dark-color);
    transition: var(--transition);
}

.service-card:hover h3 {
    color: var(--white);
}

.service-card p {
    color: var(--sub-text-color);
    transition: var(--transition);
}

.service-card:hover p {
    color: rgba(255, 255, 255, 0.9);
}

/* Premium Services Grid */
.services-grid-premium {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 40px;
    padding-bottom: 60px;
}

.service-card-premium {
    background: var(--white);
    border-radius: 20px;
    padding: 50px 40px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%;
}

.service-card-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.service-card-premium:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.08);
}

.service-card-premium:hover::before {
    transform: scaleX(1);
}

.service-icon-box {
    width: 70px;
    height: 70px;
    background: rgba(0, 102, 110, 0.08);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    transition: var(--transition);
}

.service-card-premium:hover .service-icon-box {
    background: var(--primary-color);
    transform: rotate(5deg);
}

.service-icon-box i {
    font-size: 1.8rem;
    color: var(--primary-color);
    transition: var(--transition);
}

.service-card-premium:hover .service-icon-box i {
    color: var(--white);
}

.service-content h3 {
    font-size: 1.6rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.service-content p {
    color: var(--sub-text-color);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 0;
}

.service-bg-icon {
    position: absolute;
    bottom: -20px;
    right: -20px;
    font-size: 10rem;
    color: rgba(0,0,0,0.02);
    transform: rotate(-15deg);
    transition: var(--transition);
    pointer-events: none;
}

.service-card-premium:hover .service-bg-icon {
    color: rgba(0, 102, 110, 0.05);
    transform: rotate(0deg) scale(1.1);
}

@media (max-width: 768px) {
    .services-grid-premium {
        grid-template-columns: 1fr;
    }
    
    .service-card-premium {
        padding: 30px;
    }
}

/* Contact Section - Aggia Style */
.contact {
    padding: 100px 0;
    background: var(--light-color);
    color: var(--dark-color);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: start;
}

.contact-text h2 {
    /* Font size inherited */
    margin-bottom: 30px;
    text-align: left;
}

.contact-desc {
    font-size: 1.1rem;
    margin-bottom: 40px;
    color: var(--text-color);
    max-width: 500px;
}

.contact-details {
    margin-bottom: 40px;
}

.detail-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.detail-item i {
    color: var(--primary-color);
    width: 30px;
    font-size: 1.2rem;
}

.detail-item a, 
.detail-item span {
    color: var(--dark-color);
    font-weight: 500;
}

.detail-item a:hover {
    color: var(--primary-color);
}

.social-links-contact a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--white);
    color: var(--primary-color);
    border-radius: 50%;
    margin-right: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.social-links-contact a:hover {
    background: var(--primary-color);
    color: var(--white);
    transform: translateY(-3px);
}

.contact-form-aggia {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 20px;
}

.contact-form-aggia input,
.contact-form-aggia textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: #f9f9f9;
}

.contact-form-aggia input:focus,
.contact-form-aggia textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(0, 55, 59, 0.1);
}

.contact-form-aggia button {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    margin-top: 10px;
}

/* Responsive Contact */
@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .contact-text {
        text-align: center;
    }

    .contact-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .contact-details {
        display: inline-block;
        text-align: left;
    }
    
    .social-links-contact {
        justify-content: center;
        display: flex;
    }
}

/* Page Header & Content Section */
.page-header {
    padding: 140px 0 80px; /* Top padding accounts for fixed header */
    background-size: cover;
    background-position: center;
    color: var(--white);
    text-align: center;
    position: relative;
}

.page-header h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.page-header p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

.content-section {
    padding: 80px 0;
}

.text-block {
    max-width: 900px;
    margin: 0 auto;
}

.text-block h2 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.text-block p {
    font-size: 1.1rem;
    color: var(--text-color);
    line-height: 1.8;
}

/* Footer */
.footer {
    background: #222;
    color: #aaa;
    padding: 15px 0;
    margin-top: auto;
    font-size: 0.9rem;
}

.footer .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.footer p {
    margin: 0;
}

.footer a {
    color: #aaa;
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--white);
}

@media (max-width: 768px) {
    .footer .container {
        flex-direction: column;
        gap: 10px;
    }
}

/* Power Platform Section */
.power-platform {
    padding: 80px 0;
    background: var(--white);
}

.power-platform h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.section-desc {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 50px;
    font-size: 1.1rem;
    color: var(--text-color);
}

.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    justify-items: center;
}

.platform-item {
    text-align: center;
    padding: 40px;
    background: var(--white);
    border-radius: 20px;
    border: 1px solid #eee;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    transition: var(--transition);
    width: 100%;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.platform-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    transition: var(--transition);
    transform: scale(0.95);
}

.platform-item:hover {
    transform: translateY(-5px);
    border-color: transparent;
    box-shadow: 0 15px 40px rgba(0, 102, 110, 0.2);
}

.platform-item:hover::after {
    opacity: 1;
    transform: scale(1);
}

.platform-item:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.platform-item img {
    height: 80px;
    width: auto;
    margin-bottom: 20px;
    filter: grayscale(100%);
    opacity: 0.4;
    transition: var(--transition);
}

.platform-item h3 {
    margin-bottom: 10px;
    color: var(--dark-color);
    font-size: 1.2rem;
    transition: var(--transition);
}

.platform-item:hover h3 {
    color: var(--white);
}

.platform-item p {
    font-size: 0.9rem;
    color: var(--text-color);
    transition: var(--transition);
}

.platform-item:hover p {
    color: rgba(255, 255, 255, 0.9);
}

/* Process Section */
.process {
    padding: 100px 0;
    background: #0f1115; /* Dark background from image */
    color: var(--white);
}

.process-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
}

.process-header {
    flex: 1;
    min-width: 300px;
    position: sticky;
    top: 100px;
    height: fit-content;
    text-align: center;
}

.process-badge {
    background: var(--white);
    color: #00bfa5; /* Teal color from image */
    padding: 5px 15px;
    border-radius: 5px;
    font-weight: bold;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.process-header h2 {
    font-size: 3rem;
    line-height: 1.2;
    color: var(--white);
    text-align: left;
}

.process-timeline {
    flex: 1;
    min-width: 300px;
    position: relative;
    padding-left: 30px;
    border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.timeline-step {
    margin-bottom: 40px;
    position: relative;
}

.timeline-step:last-child {
    margin-bottom: 0;
}

.step-marker {
    position: absolute;
    left: -36px; /* Adjust based on padding-left of timeline and border width */
    top: 20px;
    width: 10px;
    height: 10px;
    background: #00bfa5;
    border-radius: 50%;
    box-shadow: 0 0 0 5px rgba(0, 191, 165, 0.2);
}

.step-content {
    background: var(--white);
    padding: 30px;
    border-radius: 15px;
    color: var(--dark-color);
    transition: var(--transition);
}

.step-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.step-content h3 {
    margin-bottom: 15px;
    font-size: 1.3rem;
    color: var(--dark-color);
}

.step-content p {
    color: var(--text-color);
    font-size: 1rem;
}

/* Process Section - Winding Road */
.process-section {
    padding: 40px 0 100px;
    background: #f9f9f9; /* Light background to make white cards pop */
    position: relative;
    overflow: hidden;
}

.process-section::before {
    content: '';
    position: absolute;
    top: 20%;
    right: -100px;
    width: 400px;
    height: 400px;
    background-image: url('assets/decorations/slash-large.svg');
    background-repeat: no-repeat;
    background-size: contain;
    opacity: 0.05;
    transform: rotate(180deg);
}

.process-header {
    text-align: center;
    margin-bottom: 120px;
}

.process-badge {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(0, 102, 110, 0.1);
    color: var(--primary-color);
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.process-header h2 {
    font-size: 3rem;
    color: var(--dark-color);
    font-weight: 400;
}

.winding-road-container {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
    padding: 50px 0;
}

.road-svg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.road-svg {
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.road-step {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    margin-bottom: 100px; /* Spacing between steps */
    min-height: 200px;
}

.road-step:last-child {
    margin-bottom: 0;
}

.step-left {
    justify-content: flex-start;
    padding-right: 50%; /* Leave space for right side */
}

.step-right {
    justify-content: flex-end;
    padding-left: 50%; /* Leave space for left side */
}

.step-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 40px;
    width: 90%; /* Relative to the half-width */
    max-width: 400px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.step-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.step-number {
    font-size: 4rem;
    font-weight: 700;
    color: rgba(0, 102, 110, 0.05); /* Very subtle primary color */
    position: absolute;
    top: 10px;
    right: 20px;
    line-height: 1;
    pointer-events: none;
}

.step-card h3 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: 15px;
    font-weight: 600;
    position: relative;
}

.step-card p {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

/* Connectors (Optional visual aid) */
.step-connector {
    display: none; /* Hidden for now, relying on the SVG path */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .road-svg-wrapper {
        display: none; /* Hide complex path on mobile */
    }
    
    .winding-road-container {
        padding: 0;
    }

    .road-step {
        margin-bottom: 40px;
        padding: 0 !important; /* Remove left/right padding */
        justify-content: center;
    }

    .step-card {
        width: 100%;
        max-width: 100%;
    }
    
    /* Add a simple vertical line for mobile */
    .winding-road-container::before {
        content: '';
        position: absolute;
        top: 0;
        left: 20px;
        width: 2px;
        height: 100%;
        background: var(--secondary-color);
        opacity: 0.3;
        display: block;
    }
    
    .step-card {
        margin-left: 50px; /* Make room for the line */
        width: calc(100% - 50px);
    }
    
    .step-number {
        font-size: 3rem;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .hamburger {
        display: block;
    }

    .nav-list {
        position: fixed;
        top: 80px;
        right: -100%;
        background: var(--white);
        flex-direction: column;
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: 0 5px 5px rgba(0,0,0,0.1);
        padding: 20px 0;
        height: calc(100vh - 80px);
        overflow-y: auto;
    }

    .nav-list.active {
        right: 0;
    }

    /* Force dark text on mobile menu even if header is transparent */
    .header.transparent-mode .nav-list a,
    .header.transparent-mode:not(.scrolled) .nav-list a {
        color: var(--dark-color);
    }

    .nav-list li {
        margin: 0;
        width: 100%;
    }

    .nav-list a {
        display: block;
        padding: 15px 0;
        font-size: 1.1rem;
    }

    .dropdown-category {
        text-align: center;
        background: #f0f0f0;
        margin-top: 10px;
    }

    .hero-content h1 {
        font-size: 2rem;
    }
}

/* Scale Courage Section */
.scale-courage-section {
    padding: 100px 0;
    background: var(--white);
    position: relative;
    overflow: hidden;
}

.scale-courage-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: rgba(69, 184, 152, 0.1); /* Light secondary color */
    z-index: 0;
    clip-path: polygon(20% 0, 100% 0, 100% 100%, 0% 100%);
}

.scale-courage-section .container {
    position: relative;
    z-index: 1;
}

.scale-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 60px;
    flex-wrap: wrap;
    gap: 20px;
}

.scale-header h2 {
    /* Font size inherited */
    font-weight: 400;
    color: var(--dark-color);
    margin-bottom: 0;
}

.scale-cta {
    display: flex;
    align-items: center;
    gap: 20px;
}

.scale-cta span {
    font-size: 1.1rem;
    color: var(--dark-color);
    font-weight: 500;
}

.btn-circle-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--dark-color);
    color: var(--white);
    border-radius: 50%;
    transition: var(--transition);
    font-size: 1.2rem;
}

.btn-circle-arrow:hover {
    background-color: var(--primary-color);
    transform: rotate(-45deg);
}

.scale-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.scale-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    display: block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.scale-text h3 {
    font-size: 2.2rem;
    margin-bottom: 30px;
    color: var(--dark-color);
    line-height: 1.3;
    font-weight: 400;
}

.scale-text p {
    font-size: 1.1rem;
    color: var(--sub-text-color);
    margin-bottom: 20px;
    line-height: 1.6;
}

@media (max-width: 992px) {
    .scale-header h2 {
        font-size: 2.5rem;
    }
    
    .scale-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .scale-image {
        order: 2;
    }
    
    .scale-text {
        order: 1;
    }
}

@media (max-width: 768px) {
    .scale-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .scale-cta {
        width: 100%;
        justify-content: space-between;
    }
}

/* Precision Section */
.precision-section {
    padding: 100px 0;
    background: #000000;
    color: var(--white);
    position: relative;
}

.precision-section::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-image: url('assets/decorations/dot-grid.svg');
    background-position: center right;
    opacity: 0.15;
    pointer-events: none;
}

.precision-section .container {
    position: relative;
    z-index: 1;
    max-width: 1200px;
}

.precision-section h2 {
    /* Font size inherited */
    margin-bottom: 60px;
    color: var(--white);
    font-weight: 400;
}

.precision-layout {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    align-items: end;
}

.precision-col {
    flex: unset;
    width: auto;
}

.precision-col:first-child {
    grid-column: 1;
    grid-row: 2;
    transform: translateY(-50%);
}

.precision-col:last-child {
    grid-column: 3;
    grid-row: 2;
    transform: translateY(-50%);
}

.center-col {
    display: contents;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 30px;
    width: 100%;
    height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--secondary-color);
}

.stat-card h3 {
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 0;
}

.stat-value {
    align-self: flex-end;
    font-size: 2.5rem;
    color: var(--white);
    display: flex;
    align-items: baseline;
    gap: 5px;
    font-weight: 500;
}

.stat-value .percent {
    color: var(--secondary-color);
}

.stat-value .small-text {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.7);
    margin-right: 5px;
    font-weight: 400;
}

.arrow-icon {
    font-size: 1.5rem;
    color: var(--secondary-color);
    margin-right: 10px;
    transform: translateY(-2px);
}

.image-row {
    grid-column: 2 / 4;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.image-row img {
    border-radius: 20px;
    width: 50%;
    flex: 0 0 auto;
    height: 250px;
    object-fit: cover;
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.image-row .caption {
    font-size: 1.8rem;
    font-weight: 400;
    color: var(--white);
    line-height: 1.2;
    opacity: 1;
    font-family: var(--font-heading);
    margin-top: 0;
    text-align: center;
}

/* Center col stat card positioning in grid */
.center-col .stat-card {
    grid-column: 2;
    grid-row: 2;
}

@media (max-width: 992px) {
    .precision-section {
        padding: 60px 20px;
    }
    
    .precision-section h2 {
        font-size: 2rem;
        margin-bottom: 40px;
    }
    
    .precision-layout {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .precision-col {
        width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .precision-col:first-child {
        grid-column: auto;
        grid-row: auto;
        transform: none;
    }
    
    .precision-col:last-child {
        grid-column: auto;
        grid-row: auto;
        transform: none;
    }
    
    .center-col {
        display: block;
    }
    
    .image-row {
        grid-column: auto;
        grid-row: auto;
        flex-direction: column;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .image-row img {
        width: 100%;
        height: auto;
        flex: none;
    }
    
    .stat-card {
        height: auto;
        min-height: 200px;
    }
}

@media (max-width: 768px) {
    .precision-section {
        padding: 50px 15px;
    }
    
    .precision-section h2 {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }
    
    .precision-layout {
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
        min-height: 180px;
    }
    
    .stat-card h3 {
        font-size: 1.3rem;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .image-row .caption {
        font-size: 1.3rem;
    }
}

@media (max-width: 768px) {
    .tech-desktop-notice {
        display: none !important;
    }
}

@media (max-width: 576px) {
    .precision-section {
        padding: 40px 15px;
    }
    
    .precision-section h2 {
        font-size: 1.25rem;
        margin-bottom: 25px;
    }
    
    .precision-section::after {
        display: none;
    }
    
    .stat-card {
        padding: 15px;
        min-height: 150px;
    }
    
    .stat-card h3 {
        font-size: 1.1rem;
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .stat-value .percent {
        font-size: 1.2rem;
    }
    
    .arrow-icon {
        font-size: 1.2rem;
    }
    
    .image-row .caption {
        font-size: 1rem;
    }
}

/* Code Window Component */
.code-window {
    background: #1e1e1e;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    overflow: hidden;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    transition: transform 0.3s ease;
    border: 1px solid #333;
}

.code-window:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 60px rgba(0,0,0,0.4);
}

@media (max-width: 768px) {
    .code-window {
        max-width: 90vw;
        font-size: 12px;
    }
    
    .window-header {
        padding: 8px 12px;
    }
    
    .window-content {
        padding: 16px;
        font-size: 12px;
    }
}

.window-header {
    background: #252526;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #333;
    position: relative;
}

.window-controls {
    display: flex;
    gap: 8px;
}

.control {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.control.red { background-color: #ff5f56; }
.control.yellow { background-color: #ffbd2e; }
.control.green { background-color: #27c93f; }

.window-title {
    color: #858585;
    font-size: 13px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-main);
}

.window-content {
    padding: 24px;
    color: #d4d4d4;
    font-size: 14px;
    line-height: 1.6;
    overflow-x: auto;
}

.code-line {
    white-space: pre;
}

/* Syntax Highlighting */
.kwd { color: #569cd6; } /* Keyword - Blue */
.cls { color: #4ec9b0; } /* Class - Teal */
.str { color: #ce9178; } /* String - Orange */
.func { color: #dcdcaa; } /* Function - Yellow */
.com { color: #6a9955; } /* Comment - Green */
.num { color: #b5cea8; } /* Number - Light Green */

/* FAQ Section */
.faq-section {
    margin-top: 40px;
    max-width: 900px; /* Slightly wider */
    margin-left: auto;
    margin-right: auto;
}

.faq-item {
    background: var(--white);
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    border-color: var(--secondary-color);
}

.faq-item summary {
    padding: 20px;
    cursor: pointer;
    font-weight: 600;
    color: var(--dark-color);
    list-style: none;
    position: relative;
    padding-right: 50px; /* Space for icon */
    font-family: var(--font-heading);
    font-size: 1.1rem;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.8rem;
    color: var(--primary-color);
    font-weight: 300;
    transition: transform 0.3s ease;
    line-height: 1;
}

.faq-item[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.faq-item[open] summary {
    border-bottom: 1px solid #f0f0f0;
    color: var(--primary-color);
    background-color: #fcfcfc;
}

.faq-content {
    padding: 25px;
    color: var(--text-color);
    background-color: var(--white);
    line-height: 1.7;
    border-top: 1px solid transparent; /* Fix for collapsing margins if needed */
}

.faq-content p {
    margin-bottom: 0;
}

/* Global Responsive Adjustments */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem; /* Smaller H1 on mobile */
    }

    h2 {
        font-size: 2rem; /* Smaller H2 on mobile */
        margin-bottom: 40px;
    }

    h3 {
        font-size: 1.5rem;
    }

    .container {
        padding: 0 15px; /* Slightly smaller padding on mobile */
    }
}

/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Products Section */
.products {
    padding: 100px 0;
    background: var(--white);
}

.products h2 {
    text-align: center;
    margin-bottom: 60px;
}

.products-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.product-item {
    background: var(--white);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid #eee;
    box-shadow: 0 5px 20px rgba(0,0,0,0.03);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none; /* Ensure links don't have underline */
}

.product-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    border-radius: 20px;
    z-index: -1;
    opacity: 0;
    transition: var(--transition);
    transform: scale(0.95);
}

.product-item:hover {
    transform: translateY(-5px);
    border-color: transparent;
    box-shadow: 0 15px 40px rgba(0, 102, 110, 0.2);
}

.product-item:hover::after {
    opacity: 1;
    transform: scale(1);
}

.product-item h3 {
    margin-bottom: 15px;
    color: var(--dark-color);
    font-size: 1.4rem;
    transition: var(--transition);
}

.product-item:hover h3 {
    color: var(--white);
}

.product-item p {
    color: var(--sub-text-color);
    font-size: 1rem;
    transition: var(--transition);
    margin-bottom: 0;
}

.product-item:hover p {
    color: rgba(255, 255, 255, 0.9);
}

/* Product Title Styles */
.product-title {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    color: var(--primary-color);
}

.product-title img {
    height: 60px;
    width: auto;
}

@media (max-width: 768px) {
    .product-title {
        flex-direction: column;
        text-align: center;
    }
    
    .product-title img {
        height: 50px;
        margin-bottom: 10px;
    }
}

/* SystemP Custom Styles */
        .algo-tree-panel {
            flex: 0 0 250px;
            background: #fff;
            border: 1px solid #8ba0bc;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
        }

        .algo-tree-list {
            list-style: none;
            padding: 0;
            margin: 0;
        }
        
        .algo-tree-list li {
            padding: 3px 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            border-bottom: 1px solid #f0f0f0;
        }
        
        .algo-tree-list li:hover {
            background: #eef3fa;
        }
        
        .algo-tree-list li.active {
            background: #dcecf9;
            border: 1px dotted #999;
        }

        .algo-grid-panel {
            flex: 1;
            background: #fff;
            border: 1px solid #8ba0bc;
            display: flex;
            flex-direction: column;
        }

        .algo-grid-header {
            background: #dcecf9;
            padding: 4px 8px;
            border-bottom: 1px solid #8ba0bc;
            font-size: 11px;
        }

        .algo-grid-row {
            display: flex;
            padding: 3px 8px;
            border-bottom: 1px solid #eee;
            cursor: pointer;
            align-items: center;
        }
        .algo-grid-row:hover {
            background: #eef3fa;
        }
        .algo-grid-row.active {
            background: #dcecf9;
        }
        .algo-grid-col-code { width: 80px; font-weight: 600; padding-right: 5px; border-right: 1px solid #eee; }
        .algo-grid-col-name { width: 180px; padding: 0 10px; border-right: 1px solid #eee; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .algo-grid-col-ver { width: 60px; padding: 0 10px; border-right: 1px solid #eee; }
        .algo-grid-col-desc { flex: 1; padding-left: 10px; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

        /* Technology Builder Styles */
        .tech-wrapper {
            margin-top: 30px;
            border: 1px solid #eee;
            border-radius: 4px;
            overflow: hidden;
        }

        .tech-window {
            background: #ffffff;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            font-size: 11px;
            overflow: hidden;
            height: 750px;
            display: flex;
            flex-direction: column;
            width: 100%;
        }

        @media (max-width: 768px) {
            .tech-window {
                display: none;
            }
        }

        .tech-toolbar-top {
            background: linear-gradient(to bottom, #eef2f6 0%, #d0d7e5 100%);
            padding: 4px 10px;
            border-bottom: 1px solid #8ba0bc;
            display: flex;
            gap: 5px;
            align-items: center;
        }

        .tech-tab {
            background: #fff;
            padding: 3px 10px;
            border-radius: 3px 3px 0 0;
            border: 1px solid #8ba0bc;
            border-bottom: none;
            font-weight: 600;
            color: #333;
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 11px;
            height: 24px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 300px;
        }

        .tech-body {
            display: flex;
            flex: 1;
            overflow: hidden;
            background: #f5f5f5;
        }

        /* Left Panel: Tree */
        .tech-panel-left {
            flex: 0 0 380px;
            border-right: 4px solid #d0d7e5;
            display: flex;
            flex-direction: column;
            background: #fff;
        }

        .tech-tree-header {
            padding: 4px;
            background: #dcecf9;
            border-bottom: 1px solid #8ba0bc;
            font-weight: 600;
            color: #333;
            display: flex;
            font-size: 11px;
        }

        .tech-tree-content {
            flex: 1;
            overflow-y: auto;
            padding: 0;
            background: #fff;
        }

        .tech-tree-row {
            display: flex;
            border-bottom: 1px solid #eee;
            cursor: pointer;
            height: 22px;
            align-items: center;
        }
        
        .tech-tree-row:hover {
            outline: 1px solid #666;
            z-index: 1;
        }

        .tech-tree-col-lp { 
            flex: 0 0 180px; 
            padding: 0 5px; 
            border-right: 1px solid #d0d7e5; 
            color: #000; 
            display: flex;
            align-items: center;
            white-space: nowrap;
            overflow: hidden;
        }
        
        .tech-tree-col-code { 
            flex: 0 0 90px; 
            padding: 0 5px; 
            border-right: 1px solid #d0d7e5; 
            font-weight: 600; 
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .tech-tree-col-name { 
            flex: 1; 
            padding: 0 5px; 
            white-space: nowrap; 
            overflow: hidden; 
            text-overflow: ellipsis; 
        }

        /* Tree Indentation & Lines */
        .tree-indent {
            display: inline-block;
            width: 14px;
            height: 100%;
            position: relative;
            flex-shrink: 0;
        }
        .tree-indent::before {
            content: '';
            position: absolute;
            left: 50%;
            top: 0;
            bottom: 0;
            border-left: 1px dotted #999;
        }
        .tree-indent.is-last::before {
            bottom: 50%;
        }
        .tree-indent.is-child::after {
            content: '';
            position: absolute;
            left: 50%;
            top: 50%;
            width: 50%;
            border-top: 1px dotted #999;
        }

        /* Colors from screenshot */
        .bg-red { background-color: #ffcccc; }
        .bg-green { background-color: #ccffcc; }
        .bg-yellow { background-color: #ffffcc; }
        .bg-white { background-color: #ffffff; }

        /* Center Panel: Details */
        .tech-panel-center {
            flex: 1;
            display: flex;
            flex-direction: column;
            background: #eef3fa;
            padding: 5px;
            overflow-y: auto;
            overflow-x: auto;
            min-width: 0;
        }

        /* Top Form Section */
        .tech-form-top {
            background: #eef3fa;
            padding: 5px;
            border-bottom: 1px solid #d0d7e5;
            display: flex;
            flex-direction: column;
            gap: 5px;
            margin-bottom: 5px;
        }

        .tech-form-row {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .tech-input-group {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .tech-label {
            font-size: 11px;
            color: #333;
            white-space: nowrap;
        }

        .tech-input {
            border: 1px solid #a0b0c0;
            padding: 2px 4px;
            font-size: 11px;
            height: 20px;
            background: #fff;
        }
        
        .tech-select {
            border: 1px solid #a0b0c0;
            padding: 1px 4px;
            font-size: 11px;
            height: 20px;
            background: #fff;
        }

        /* Tabs */
        .tech-detail-tabs {
            display: flex;
            gap: 2px;
            margin-bottom: 0;
            padding-left: 5px;
        }

        .tech-detail-tab {
            padding: 3px 15px;
            cursor: pointer;
            color: #333;
            background: linear-gradient(to bottom, #eef2f6 0%, #d0d7e5 100%);
            border: 1px solid #8ba0bc;
            border-bottom: none;
            border-radius: 3px 3px 0 0;
            font-size: 11px;
        }

        .tech-detail-tab.active {
            background: #fff;
            font-weight: 600;
            border-bottom: 1px solid #fff;
            position: relative;
            top: 1px;
            z-index: 2;
        }

        /* Grids Container */
        .tech-grids-container {
            background: #fff;
            border: 1px solid #8ba0bc;
            flex: 1;
            display: flex;
            flex-direction: column;
            padding: 5px;
            gap: 5px;
        }

        /* Grid Styles */
        .tech-grid {
            border: 1px solid #a0b0c0;
            background: #fff;
            display: flex;
            flex-direction: column;
            flex: 1;
            min-height: 150px;
        }

        .tech-grid-header-blue {
            background: linear-gradient(to bottom, #8ba0bc 0%, #6a809c 100%);
            color: #fff;
            padding: 3px 5px;
            font-size: 11px;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .tech-grid-table-header {
            display: flex;
            background: #eef2f6;
            border-bottom: 1px solid #a0b0c0;
        }

        .tech-grid-th {
            padding: 2px 5px;
            border-right: 1px solid #a0b0c0;
            font-size: 11px;
            font-weight: 600;
            color: #333;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            background: #eef2f6;
            position: relative;
        }
        
        .tech-grid-th i {
            color: #666;
            font-size: 10px;
            margin-right: 3px;
        }

        .tech-grid-row {
            display: flex;
            border-bottom: 1px solid #eee;
            background: #fff;
        }
        
        .tech-grid-row:hover {
            background: #f5f5f5;
        }

        .tech-grid-cell {
            padding: 2px 5px;
            border-right: 1px solid #eee;
            font-size: 11px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            color: #333;
        }
        
        .tech-grid-cell input[type="checkbox"] {
            margin: 0;
            vertical-align: middle;
        }

        /* Bottom Tabs */
        .tech-bottom-tabs {
            display: flex;
            gap: 2px;
            margin-top: 5px;
        }
        
        .tech-bottom-tab {
            padding: 3px 10px;
            background: #8ba0bc;
            color: #fff;
            font-size: 11px;
            cursor: pointer;
        }
        
        .tech-bottom-tab.active {
            background: #fff;
            color: #333;
            border: 1px solid #8ba0bc;
            border-bottom: none;
        }

        /* Right Panel: Tools */
        .tech-panel-right {
            flex: 0 0 32px;
            background: #dcecf9;
            border-left: 1px solid #8ba0bc;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding-top: 5px;
        }

        .tech-tools-header {
            padding: 10px 0;
            background: transparent;
            font-weight: 600;
            color: #444;
            border-bottom: none;
            font-size: 12px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
            writing-mode: vertical-rl;
            text-orientation: mixed;
            height: 100%;
        }

        .tech-tool-item {
            display: none;
        }

        /* Pricing Calculation Styles */
        .pricing-container {
            display: flex;
            border-top: 1px solid #d0d7e5;
            height: 350px;
            overflow: hidden;
        }
        
        .pricing-matrix {
            flex: 1;
            overflow: auto;
            background: #fff;
        }

        .pricing-calc {
            flex: 0 0 320px;
            background: #f8f9fa;
            padding: 20px;
            display: flex;
            flex-direction: column;
            box-shadow: -5px 0 15px rgba(0,0,0,0.02);
            z-index: 2;
        }

        .calc-header {
            font-weight: 600;
            color: #333;
            margin-bottom: 15px;
            padding-bottom: 10px;
            border-bottom: 2px solid #e1e1e1;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .calc-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 8px;
            font-size: 13px;
            align-items: center;
        }

        .calc-label {
            color: #555;
        }

        .calc-value {
            font-weight: 600;
            color: #333;
        }

        .calc-surcharge-box {
            background: #fff;
            border: 1px solid #d0d7e5;
            border-radius: 6px;
            padding: 12px;
            margin: 10px 0 20px 0;
        }

        .calc-surcharge-title {
            font-size: 11px;
            text-transform: uppercase;
            color: #888;
            font-weight: 700;
            margin-bottom: 8px;
            letter-spacing: 0.5px;
        }

        .surcharge-item {
            display: flex;
            justify-content: space-between;
            font-size: 12px;
            margin-bottom: 6px;
            padding-bottom: 6px;
            border-bottom: 1px dashed #eee;
        }
        
        .surcharge-item:last-child {
            border-bottom: none;
            margin-bottom: 0;
            padding-bottom: 0;
        }

        .surcharge-name {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .surcharge-name i {
            color: var(--secondary-color);
            font-size: 10px;
        }

        .calc-total {
            margin-top: auto;
            padding-top: 15px;
            border-top: 2px solid #d0d7e5;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .total-label {
            font-weight: 700;
            font-size: 14px;
            color: #333;
        }

        .total-value {
            font-weight: 700;
            font-size: 20px;
            color: var(--primary-color);
        }

        .matrix-highlight-indicator {
            display: inline-block;
            width: 8px;
            height: 8px;
            background: #217346;
            border-radius: 50%;
            margin-right: 5px;
        }

        /* Calculation Flow Styles */
        .calc-flow-container {
            display: flex;
            align-items: stretch;
            justify-content: center;
            gap: 15px;
            margin-top: 30px;
            flex-wrap: wrap;
        }

        .calc-flow-card {
            background: #fff;
            border: 1px solid #d0d7e5;
            border-radius: 8px;
            padding: 20px;
            flex: 1;
            min-width: 200px;
            max-width: 300px;
            text-align: center;
            box-shadow: 0 5px 15px rgba(0,0,0,0.05);
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .calc-flow-card.highlight {
            border: 2px solid var(--secondary-color);
            background: #fff;
        }

        .calc-icon {
            width: 50px;
            height: 50px;
            background: #eef3fa;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            color: var(--secondary-color);
            margin-bottom: 15px;
        }

        .calc-title {
            font-weight: 700;
            color: #333;
            margin-bottom: 10px;
            font-size: 16px;
        }

        .calc-desc {
            font-size: 13px;
            color: #666;
            margin-bottom: 20px;
            line-height: 1.5;
            flex: 1;
        }

        .calc-example {
            font-weight: 700;
            color: #333;
            background: #f5f5f5;
            padding: 8px 15px;
            border-radius: 20px;
            font-size: 14px;
            width: 100%;
        }

        .calc-example.big {
            font-size: 20px;
            color: #fff;
            background: var(--secondary-color);
            border: none;
        }

        .calc-example-list {
            text-align: left;
            font-size: 12px;
            background: #f8f9fa;
            padding: 10px;
            border-radius: 6px;
            color: #555;
            width: 100%;
            border: 1px dashed #d0d7e5;
        }
        
        .calc-list-item {
            display: flex;
            justify-content: space-between;
            margin-bottom: 4px;
        }

        .calc-operator {
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 24px;
            font-weight: 300;
            color: #aaa;
            padding: 0 10px;
        }

        /* Mobile: Stack calculation flow vertically */
        @media (max-width: 768px) {
            .calc-flow-container {
                display: grid !important;
                grid-template-columns: 1fr !important;
                gap: 0 !important;
                width: 100% !important;
            }

            .calc-flow-card {
                flex: unset !important;
                min-width: 0 !important;
                max-width: none !important;
                width: 100% !important;
                margin-bottom: 0;
            }

            .calc-operator {
                padding: 15px 0 !important;
                font-size: 20px !important;
                width: 100% !important;
                text-align: center !important;
                background: transparent !important;
                border: none !important;
                box-shadow: none !important;
                flex: unset !important;
                min-width: 0 !important;
                height: auto !important;
                visibility: visible !important;
                display: flex !important;
                align-items: center !important;
                justify-content: center !important;
                margin: 0 !important;
            }
        }

        /* Architecture Visualization Styles */
        .arch-viz-wrapper {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 100px;
            margin-top: 60px;
            padding: 40px 20px;
            position: relative;
        }

        .arch-column {
            display: flex;
            flex-direction: column;
            gap: 60px;
            align-items: center;
            position: relative;
            z-index: 2;
        }

        .arch-col-label {
            margin-top: 30px;
            font-weight: 700;
            color: #b0b0b0;
            text-transform: uppercase;
            font-size: 11px;
            letter-spacing: 1.5px;
        }

        .arch-node {
            width: 100px;
            height: 100px;
            background: #fff;
            border-radius: 50%;
            border: 2px solid #e1e1e1;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            box-shadow: 0 10px 25px rgba(0,0,0,0.05);
            transition: transform 0.3s ease;
        }

        .arch-node:hover {
            transform: translateY(-5px);
        }

        .arch-node img {
            max-width: 55%;
            max-height: 55%;
        }

        .arch-node.main {
            width: 150px;
            height: 150px;
            border: 4px solid var(--secondary-color);
            box-shadow: 0 0 40px rgba(0, 102, 110, 0.15);
            z-index: 10;
        }

        .arch-node.connected {
            border-color: var(--primary-color);
            background: #fcfcfc;
        }

        .arch-node.disconnected {
            border-style: dashed;
            border-color: #ccc;
            opacity: 0.7;
            background: #f9f9f9;
        }

        .arch-label {
            position: absolute;
            bottom: -35px;
            width: 180px;
            text-align: center;
            font-size: 12px;
            font-weight: 600;
            color: #555;
            line-height: 1.3;
        }

        /* Cables & Plugs */
        .cable-connector {
            position: absolute;
            height: 6px;
            top: 50%;
            transform: translateY(-50%);
            z-index: -1;
            transition: all 0.3s;
        }

        /* Left Side Cables */
        .arch-column:first-child .cable-connector {
            left: 100%;
            width: 100px; /* Distance to center */
            background: #ddd;
        }

        .arch-column:first-child .arch-node.connected .cable-connector {
            background: var(--primary-color);
            box-shadow: 0 0 10px rgba(0, 102, 110, 0.2);
        }

        .arch-column:first-child .arch-node.disconnected .cable-connector {
            width: 70px; /* Unplugged */
            background: repeating-linear-gradient(90deg, #ccc, #ccc 4px, #fff 4px, #fff 8px);
            opacity: 0.5;
        }

        /* Right Side Cables */
        .arch-column:last-child .cable-connector {
            right: 100%;
            width: 100px;
            background: var(--primary-color);
            box-shadow: 0 0 10px rgba(0, 102, 110, 0.2);
        }

        /* Plug Heads */
        .plug-head {
            position: absolute;
            width: 16px;
            height: 24px;
            background: #555;
            top: 50%;
            transform: translateY(-50%);
            border-radius: 3px;
            z-index: 5;
        }

        .arch-column:first-child .plug-head {
            right: -16px;
        }
        
        .arch-column:first-child .arch-node.disconnected .plug-head {
            right: -16px; /* Relative to the shorter cable */
            background: #999;
        }

        .arch-column:last-child .plug-head {
            left: -16px;
        }

        /* Socket on Main Node */
        .socket-point {
            position: absolute;
            width: 12px;
            height: 12px;
            background: #333;
            border-radius: 50%;
            z-index: 11;
        }
        
        /* Positioning sockets on the main circle */
        .socket-left-top { top: 30%; left: -6px; }
        .socket-left-bottom { bottom: 30%; left: -6px; }
        .socket-right { top: 50%; right: -6px; transform: translateY(-50%); }

        /* Architecture Status Indicator */
        .arch-status-container {
            text-align: center;
            margin-top: 30px;
            margin-bottom: 40px;
            padding: 15px;
            border-radius: 8px;
            background: #f8f9fa;
            border: 1px solid #e1e1e1;
            transition: all 0.3s ease;
            max-width: 700px;
            margin-left: auto;
            margin-right: auto;
        }

        .arch-status-container.success {
            background: #e6f2ea;
            border-color: #217346;
            color: #217346;
        }

        .arch-status-container.error {
            background: #fdedec;
            border-color: #e74c3c;
            color: #c0392b;
        }

        .arch-status-icon {
            font-size: 24px;
            margin-bottom: 10px;
            display: block;
        }

        .arch-status-text {
            font-weight: 600;
            font-size: 16px;
        }

        /* Interactive Cables */
        .cable-connector {
            cursor: pointer;
        }
        
        .cable-connector:hover .plug-head {
            background: var(--secondary-color);
            box-shadow: 0 0 8px rgba(0,0,0,0.3);
        }

        .arch-node.disconnected .cable-connector:hover .plug-head {
            background: #666;
        }

        /* SVG Cables */
        .arch-connections-svg {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 1;
            pointer-events: none;
            overflow: visible;
        }

        @media (max-width: 992px) {
            .arch-viz-wrapper {
                gap: 60px;
                padding: 30px 15px;
            }
            
            .arch-column {
                gap: 40px;
            }
            
            .arch-node {
                width: 80px;
                height: 80px;
            }
            
            .arch-node.main {
                width: 120px;
                height: 120px;
                border: 3px solid var(--secondary-color);
                box-shadow: 0 0 30px rgba(0, 102, 110, 0.12);
            }
            
            .arch-label {
                width: 150px;
                font-size: 11px;
                bottom: -30px;
            }
            
            .arch-column:first-child .cable-connector {
                width: 60px;
            }
        }

        @media (max-width: 768px) {
            .arch-viz-wrapper {
                gap: 40px;
                padding: 20px 10px;
            }
            
            .arch-column {
                gap: 30px;
            }
            
            .arch-node {
                width: 70px;
                height: 70px;
            }
            
            .arch-node.main {
                width: 100px;
                height: 100px;
                border: 2px solid var(--secondary-color);
                box-shadow: 0 0 25px rgba(0, 102, 110, 0.1);
            }
            
            .arch-label {
                width: 130px;
                font-size: 10px;
                bottom: -28px;
            }
            
            .arch-col-label {
                font-size: 10px;
                margin-top: 20px;
            }
            
            .arch-column:first-child .cable-connector {
                width: 40px;
            }
        }

        @media (max-width: 576px) {
            .arch-viz-wrapper {
                gap: 25px;
                padding: 15px 10px;
            }
            
            .arch-column {
                gap: 20px;
            }
            
            .arch-node {
                width: 60px;
                height: 60px;
                box-shadow: 0 5px 15px rgba(0,0,0,0.03);
            }
            
            .arch-node.main {
                width: 85px;
                height: 85px;
                border: 2px solid var(--secondary-color);
                box-shadow: 0 0 20px rgba(0, 102, 110, 0.08);
            }
            
            .arch-node img {
                max-width: 60%;
                max-height: 60%;
            }
            
            .arch-label {
                width: 110px;
                font-size: 9px;
                bottom: -25px;
            }
            
            .arch-col-label {
                font-size: 9px;
                margin-top: 15px;
                margin-bottom: 10px;
            }
            
            .arch-column:first-child .cable-connector {
                width: 30px;
            }
        }

        .cable-path {
            fill: none;
            stroke: #ddd;
            stroke-width: 4;
            stroke-linecap: round;
            transition: stroke 0.5s ease, stroke-dasharray 0.5s ease;
        }

        .cable-path.connected {
            stroke: var(--primary-color);
            filter: drop-shadow(0 0 3px rgba(0, 102, 110, 0.3));
        }

        .cable-path.disconnected {
            stroke: #ccc;
            stroke-dasharray: 10, 5;
            opacity: 0.6;
        }

        .cable-plug {
            fill: #555;
            transition: fill 0.3s ease;
        }

        .cable-plug.connected {
            fill: var(--secondary-color);
        }

        .cable-plug.disconnected {
            fill: #999;
        }

        @media (max-width: 768px) {
            .algo-window {
                height: auto;
                min-height: 800px; /* Increase height to accommodate stacked panels */
            }
            .algo-split-top, .algo-split-bottom {
                flex-direction: column;
                height: auto;
                gap: 10px;
            }
            .algo-panel {
                min-height: 250px;
                width: 100%;
            }
            .algo-content {
                overflow-y: auto;
            }

            /* Pricing Container Responsive */
            .pricing-container {
                flex-direction: column;
                height: auto;
            }
            .pricing-matrix {
                height: 300px;
                border-bottom: 1px solid #d0d7e5;
            }
            .pricing-calc {
                flex: none;
                width: 100%;
                box-shadow: 0 -5px 15px rgba(0,0,0,0.02);
            }
        }


/* Missing SystemP Styles (Restored) */
        .code-block {
            background: #1e1e1e;
            color: #d4d4d4;
            padding: 20px;
            border-radius: 10px;
            font-family: 'Consolas', 'Monaco', monospace;
            overflow-x: auto;
            margin-top: 20px;
            border-left: 4px solid var(--secondary-color);
        }
        
        .feature-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 40px;
            margin-top: 60px;
        }
        
        .feature-item {
            background: var(--white);
            padding: 40px;
            border-radius: 20px;
            box-shadow: 0 5px 20px rgba(0,0,0,0.05);
            transition: var(--transition);
            border: 1px solid #eee;
        }
        
        .feature-item:hover {
            transform: translateY(-5px);
            border-color: var(--secondary-color);
        }
        
        .feature-icon {
            font-size: 2.5rem;
            color: var(--primary-color);
            margin-bottom: 20px;
        }
        
        .tech-hierarchy {
            display: flex;
            align-items: center;
            justify-content: center;
            flex-wrap: wrap;
            gap: 20px;
            margin: 40px 0;
        }
        
        .tech-step {
            background: var(--light-color);
            padding: 15px 30px;
            border-radius: 50px;
            font-weight: 600;
            color: var(--dark-color);
            border: 1px solid #ddd;
        }
        
        .tech-arrow {
            color: var(--secondary-color);
            font-size: 1.2rem;
        }

        @media (max-width: 576px) {
            .tech-hierarchy {
                flex-direction: column;
                gap: 10px;
            }
            
            .tech-arrow {
                transform: rotate(90deg);
            }
        }

        /* Excel Grid Styles */
        .excel-wrapper {
            background: #fff;
            border: 1px solid #d0d7e5;
            border-radius: 4px;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            font-size: 13px;
            color: #333;
            overflow-x: auto;
            box-shadow: 0 10px 30px rgba(0,0,0,0.08);
            margin-top: 30px;
        }
        
        .excel-toolbar {
            background: #217346;
            color: white;
            padding: 8px 15px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
            border-radius: 4px 4px 0 0;
        }

        .excel-grid {
            display: table;
            width: 100%;
            border-collapse: collapse;
        }

        .excel-row {
            display: table-row;
        }

        .excel-cell, .excel-header-cell, .excel-row-num {
            display: table-cell;
            border: 1px solid #e1e1e1;
            padding: 6px 12px;
            white-space: nowrap;
        }

        .excel-header-cell {
            background: #f8f9fa;
            font-weight: 600;
            text-align: center;
            color: #666;
            border-bottom: 2px solid #d0d7e5;
        }

        .excel-row-num {
            background: #f8f9fa;
            font-weight: 600;
            text-align: center;
            color: #666;
            width: 40px;
            border-right: 2px solid #d0d7e5;
        }

        .excel-cell {
            background: #fff;
        }

        .excel-cell.highlight {
            background: #e6f2ea;
            color: #217346;
            font-weight: 600;
        }

        .excel-tabs {
            display: flex;
            background: #f0f2f5;
            border-top: 1px solid #d0d7e5;
            padding: 4px 10px 0;
            gap: 2px;
        }
        
        .excel-tab {
            padding: 5px 15px;
            background: #e9ecef;
            border: 1px solid #d0d7e5;
            border-bottom: none;
            border-radius: 4px 4px 0 0;
            font-size: 12px;
            cursor: pointer;
            color: #444;
            position: relative;
            top: 1px;
            transition: background 0.2s;
        }
        
        .excel-tab.active {
            background: #fff;
            font-weight: 600;
            color: #217346;
            border-bottom: 1px solid #fff;
            z-index: 2;
        }
        
        .excel-tab:hover:not(.active) {
            background: #dee2e6;
        }

        /* Algorithm Constructor Styles - Modern (Matched to Tech Builder) */
        .algo-window {
            background: #ffffff;
            border: 1px solid #8ba0bc;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            font-size: 11px;
            overflow: hidden;
            margin-top: 20px;
            display: flex;
            flex-direction: column;
            height: 600px;
        }

        .algo-header {
            background: linear-gradient(to bottom, #eef2f6 0%, #d0d7e5 100%);
            padding: 4px 10px;
            border-bottom: 1px solid #8ba0bc;
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: #444;
            height: 28px;
        }
        
        .algo-title {
            font-weight: 600;
            font-size: 11px;
        }

        .algo-toolbar {
            display: flex;
            gap: 5px;
            background: #eef3fa;
            padding: 4px 10px;
            border-bottom: 1px solid #8ba0bc;
            align-items: center;
        }

        .algo-btn {
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 11px;
            padding: 3px 8px;
            border: 1px solid #a0b0c0;
            background: #fff;
            color: #333;
            border-radius: 2px;
        }
        
        .algo-btn:hover {
            background: #dcecf9;
            border-color: #8ba0bc;
        }
        
        .algo-btn.primary-action {
            font-weight: 600;
        }

        .algo-content {
            padding: 10px;
            display: flex;
            flex-direction: column;
            gap: 10px;
            flex: 1;
            background: #f5f5f5;
            overflow: hidden;
        }

        .algo-split-top {
            display: flex;
            gap: 10px;
            height: 45%;
        }

        .algo-panel {
            flex: 1;
            background: #fff;
            border: 1px solid #8ba0bc;
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }

        .algo-panel-header {
            background: #dcecf9;
            padding: 4px 8px;
            border-bottom: 1px solid #8ba0bc;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 10px;
            color: #333;
            font-size: 11px;
        }

        .algo-editor {
            flex: 1;
            padding: 8px;
            font-family: 'Consolas', monospace;
            font-size: 12px;
            color: #000;
            border-bottom: 1px solid #eee;
            background: #fff;
            line-height: 1.4;
        }

        .algo-panel-footer {
            background: #eef3fa;
            padding: 4px 8px;
            text-align: center;
            color: #333;
            cursor: pointer;
            font-size: 11px;
            border-top: 1px solid #eee;
        }
        
        .algo-panel-footer:hover {
            background: #dcecf9;
        }

        .algo-split-bottom {
            display: flex;
            gap: 10px;
            height: 55%;
        }

