/* Dynamic Page Aesthetics - UI/UX Pro Max rules applied */

/* Typography Rules */
.page-hero {
    position: relative;
    padding: 120px 5% 80px;
    background: var(--surface-color);
    min-height: 40vh;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--surface-border);
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(217, 119, 87, 0.04) 0%, rgba(106, 155, 204, 0.04) 100%);
    pointer-events: none;
}

/* Dynamic Hero Blurred Background */
.page-hero-bg {
    position: absolute;
    top: -5%; left: -5%; right: -5%; bottom: -5%;
    background-size: cover;
    background-position: center;
    filter: blur(20px) brightness(0.7);
    opacity: 0.3;
    z-index: 0;
    transition: var(--transition-fast);
}

[data-theme='dark'] .page-hero-bg {
    opacity: 0.15;
    filter: blur(20px) brightness(0.4);
}

.page-hero-content {
    position: relative;
    z-index: 1;
    margin: 0 auto;
    width: 100%;
    max-width: 1200px;
    text-align: center;
}

.page-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    margin-bottom: 1rem;
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.page-title .highlight {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* Breadcrumb Navigation */
.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    font-family: var(--font-heading);
    font-size: 0.85rem;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 500;
}

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

.breadcrumb i {
    color: var(--text-secondary);
    font-size: 0.7rem;
    opacity: 0.5;
}

.breadcrumb span {
    color: var(--text-primary);
    font-weight: 600;
}

/* Main Content Layout */
.page-content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 5%;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 60px;
}



/* Article Styling */
.page-article {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.page-article p {
    margin-bottom: 1.75rem;
}

.page-article p:first-of-type {
    font-size: 1.25rem;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.6;
}

.page-article h3 {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin: 2rem 0 1rem;
    font-weight: 700;
}

/* Formatted Lists heuristics */
.page-article ul {
    margin: 2rem 0;
    padding-left: 1.5rem;
}

.page-article li {
    margin-bottom: 0.75rem;
    position: relative;
    padding-left: 0.5rem;
}

/* Bento Grid Gallery */
.page-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 3rem;
}

.gallery-item {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    height: 180px;
    border: 1px solid var(--surface-border);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    cursor: pointer;
}

.gallery-item:first-child {
    grid-column: span 2;
    height: 240px;
}

.gallery-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.15);
    border-color: rgba(217, 119, 87, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Error/Empty states */
.page-not-found {
    text-align: center;
    padding: 120px 20px;
}

.page-not-found h1 {
    font-size: 4rem;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.page-not-found p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 32px;
}

/* Loading */
.page-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    color: var(--text-secondary);
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--surface-border);
    border-top-color: var(--accent-orange);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@media (max-width: 768px) {
    .page-hero {
        padding: 100px 5% 60px;
        min-height: 30vh;
    }

    .page-title {
        font-size: clamp(1.8rem, 5vw, 3rem);
    }

    .page-content-wrapper {
        padding: 40px 5%;
        gap: 40px;
    }

    .page-gallery {
        position: static;
        grid-template-columns: 1fr;
    }
    
    .gallery-item, .gallery-item:first-child {
        height: 220px;
        grid-column: span 1;
    }

    .breadcrumb {
        font-size: 0.78rem;
        gap: 8px;
    }
}

/* ============================================
   RENDERED SECTIONS – Intro, Features, Specs
   ============================================ */

/* Intro */
.pg-intro {
    margin-bottom: 2.5rem;
}

.pg-intro p:first-child {
    font-size: 1.2rem;
    color: var(--text-primary);
    font-weight: 500;
    line-height: 1.7;
}

.pg-intro p {
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.8;
}

/* Section blocks */
.pg-section {
    margin-bottom: 3rem;
}

.pg-section-title {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--surface-border);
}

.pg-section-title i {
    color: var(--accent-orange);
    font-size: 1.4rem;
}

/* Features List */
.pg-features-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.pg-features-list li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 12px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
    transition: all 0.25s ease;
}

.pg-features-list li:hover {
    border-color: rgba(217, 119, 87, 0.25);
    background: rgba(217, 119, 87, 0.04);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.pg-features-list li i {
    color: var(--accent-green);
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 2px;
}

/* Specifications Table */
.pg-spec-table-wrap {
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    overflow: hidden;
}

.pg-spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
}

.pg-spec-table tr {
    border-bottom: 1px solid var(--surface-border);
    transition: background 0.2s ease;
}

.pg-spec-table tr:last-child {
    border-bottom: none;
}

.pg-spec-table tr:hover {
    background: rgba(217, 119, 87, 0.03);
}

.pg-spec-table td {
    padding: 13px 20px;
    vertical-align: top;
    line-height: 1.5;
}

.pg-spec-table .spec-key {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
    width: 40%;
    white-space: nowrap;
}

.pg-spec-table .spec-val {
    color: var(--text-secondary);
}

.pg-spec-table tr:nth-child(even) {
    background: var(--surface-color);
}

/* Text block fallback */
.pg-text-block {
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    padding: 24px 28px;
    font-size: 0.95rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.pg-text-block p {
    margin-bottom: 1rem;
}

.pg-text-block p:last-child {
    margin-bottom: 0;
}

/* Solutions Grid */
.pg-solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.pg-solution-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 24px;
    background: var(--surface-color);
    border: 1px solid var(--surface-border);
    border-radius: 16px;
    color: var(--text-secondary);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

.pg-solution-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(217, 119, 87, 0.06), rgba(106, 155, 204, 0.06));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.pg-solution-card.interactive:hover {
    border-color: rgba(217, 119, 87, 0.3);
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.12);
    color: var(--text-primary);
}

.pg-solution-card.interactive:hover::before {
    opacity: 1;
}

.pg-solution-card.non-interactive {
    align-items: flex-start;
}

.pg-solution-card.non-interactive:hover {
    border-color: rgba(106, 155, 204, 0.3);
    background: rgba(106, 155, 204, 0.04);
}

.pg-solution-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.pg-solution-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.pg-solution-title i {
    color: var(--accent-orange);
    font-size: 1.15rem;
}

.pg-solution-desc {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pg-solution-arrow {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-color);
    border: 1px solid var(--surface-border);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.pg-solution-arrow i {
    font-size: 1.1rem;
    color: var(--text-primary);
    transition: transform 0.3s ease;
    margin-top: 0;
}

.pg-solution-card.interactive:hover .pg-solution-arrow {
    background: var(--text-primary);
    border-color: var(--text-primary);
}

.pg-solution-card.interactive:hover .pg-solution-arrow i {
    transform: translateX(3px);
    color: var(--bg-color);
}

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

.slide-up {
    opacity: 0;
    animation: slideUpFade 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* CTA Strip */
.pg-cta-strip {
    background: var(--surface-color);
    border-top: 1px solid var(--surface-border);
    padding: 60px 5%;
}

.pg-cta-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.pg-cta-text h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.pg-cta-text p {
    color: var(--text-secondary);
    font-size: 1rem;
}

.pg-cta-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .pg-features-list {
        grid-template-columns: 1fr;
    }

    .pg-solutions-grid {
        grid-template-columns: 1fr;
    }

    .pg-spec-table .spec-key {
        white-space: normal;
        width: 45%;
    }

    .pg-spec-table td {
        padding: 10px 14px;
        font-size: 0.85rem;
    }

    .pg-cta-inner {
        flex-direction: column;
        text-align: center;
    }

    .pg-cta-actions {
        justify-content: center;
    }

    .pg-cta-text h3 {
        font-size: 1.25rem;
    }
}
