/* ==========================================================================
   Platform Page Specific Styles
   ========================================================================== */

/* Platform Hero */
.platform-hero {
    position: relative;
    min-height: 80vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0F2D24 100%);
    color: var(--neutral-100);
    overflow: hidden;
    padding: var(--space-8) 0;
}

.platform-hero__content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    animation: fadeInLeft 1s ease-out;
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.platform-hero__badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: var(--accent);
    font-weight: 600;
    font-size: var(--font-size-sm);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius-full);
    margin-bottom: var(--space-3);
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.platform-hero__title {
    font-size: 3rem;
    line-height: 1.1;
    margin-bottom: var(--space-4);
    color: var(--neutral-100);
}

.platform-hero__title-line {
    display: block;
}

.platform-hero__title-line:first-child {
    font-weight: 400;
    opacity: 0.9;
}

.platform-hero__title-line:last-child {
    font-weight: 700;
    color: var(--accent);
}

.platform-hero__subtitle {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-4);
    opacity: 0.9;
    max-width: 600px;
}

.platform-hero__visual {
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    pointer-events: none;
}

.floating-elements {
    position: relative;
    width: 100%;
    height: 100%;
}

.floating-element {
    position: absolute;
    font-size: 4rem;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.2));
    animation: float 6s ease-in-out infinite;
    opacity: 0.15;
}

.floating-element--1 {
    top: 20%;
    right: 20%;
    animation-delay: 0s;
}

.floating-element--2 {
    top: 50%;
    right: 30%;
    animation-delay: 1s;
    font-size: 5rem;
}

.floating-element--3 {
    bottom: 20%;
    right: 15%;
    animation-delay: 2s;
}

.floating-element--4 {
    top: 30%;
    right: 40%;
    animation-delay: 3s;
}

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

/* Architecture Grid */
.architecture-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--grid-gap);
    margin-top: var(--space-6);
}

.architecture-card {
    background-color: var(--neutral-100);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid var(--neutral-200);
}

.architecture-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.architecture-card__header {
    padding: var(--space-4);
    color: var(--neutral-100);
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.architecture-card--vision .architecture-card__header {
    background: linear-gradient(135deg, #2196F3, #1976D2);
}

.architecture-card--ai .architecture-card__header {
    background: linear-gradient(135deg, #9C27B0, #7B1FA2);
}

.architecture-card--ar .architecture-card__header {
    background: linear-gradient(135deg, #FF9800, #F57C00);
}

.architecture-card__icon {
    font-size: 2.5rem;
}

.architecture-card__title {
    color: var(--neutral-100);
    margin: 0;
    font-size: var(--font-size-xl);
}

.architecture-card__content {
    padding: var(--space-4);
}

.architecture-card__description {
    color: var(--neutral-700);
    margin-bottom: var(--space-3);
    line-height: 1.6;
}

.architecture-card__features {
    list-style: none;
    margin: 0;
}

.architecture-card__features li {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--neutral-200);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    color: var(--neutral-600);
}

.architecture-card__features li:last-child {
    border-bottom: none;
}

.architecture-card__features li::before {
    content: "→";
    color: var(--primary);
    font-weight: bold;
}

/* Database Section */
.database-section {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #0F2D24 100%);
    color: var(--neutral-100);
}

.database-section h2,
.database-section .lead {
    color: var(--neutral-100);
}

.database-section .lead {
    opacity: 0.9;
}

.database-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    margin: var(--space-6) 0;
}

.database-stat {
    text-align: center;
}

.database-stat__number {
    display: block;
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--accent);
    line-height: 1.2;
}

.database-stat__label {
    font-size: var(--font-size-xs);
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.database-features {
    margin: var(--space-6) 0;
}

.database-feature {
    display: flex;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.database-feature__check {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background-color: var(--accent);
    color: var(--primary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.database-feature strong {
    display: block;
    color: var(--neutral-100);
    margin-bottom: var(--space-1);
}

.database-feature p {
    color: var(--neutral-300);
    font-size: var(--font-size-sm);
    margin: 0;
}

/* Database Visualization */
.database-visualization {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.database-node {
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--accent);
    border-radius: 50%;
    filter: blur(2px);
    animation: pulse 2s ease-in-out infinite;
}

.database-node--center {
    width: 40px;
    height: 40px;
    background-color: var(--neutral-100);
    filter: blur(4px);
    animation: pulseCenter 2s ease-in-out infinite;
}

.database-node--1 { top: 20%; left: 20%; animation-delay: 0s; }
.database-node--2 { top: 30%; right: 20%; animation-delay: 0.5s; }
.database-node--3 { bottom: 20%; left: 30%; animation-delay: 1s; }
.database-node--4 { bottom: 30%; right: 30%; animation-delay: 1.5s; }
.database-node--5 { top: 50%; left: 50%; animation-delay: 2s; }

@keyframes pulse {
    0%, 100% {
        opacity: 0.5;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.5);
    }
}

@keyframes pulseCenter {
    0%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}

/* UX Flow */
.ux-flow {
    max-width: 800px;
    margin: var(--space-6) auto;
}

.ux-step {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    position: relative;
}

.ux-step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50px;
    left: 24px;
    width: 2px;
    height: calc(100% + var(--space-4));
    background: linear-gradient(to bottom, var(--primary-light), var(--primary));
    opacity: 0.3;
}

.ux-step__number {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--neutral-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: var(--font-size-xl);
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    box-shadow: var(--shadow-md);
}

.ux-step__title {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-1);
}

.ux-step__description {
    color: var(--neutral-600);
    line-height: 1.6;
}
/* ==========================================================================
   Cutting Edge Technologies Section - ISOLATED STYLES
   ========================================================================== */
   /* WARNING: Only styles within .tech-stack-section are modified */
   /* All other sections remain completely unchanged */

.tech-stack-section {
    background: linear-gradient(135deg, #0F2D24 0%, var(--primary-dark) 100%);
    position: relative;
    overflow: hidden;
    padding: var(--space-8) 0;
    width: 100%;
}

/* Section header - scoped to section only */
.tech-stack-section .section__header {
    margin-bottom: var(--space-6);
}

.tech-stack-section .section__subtitle {
    color: var(--neutral-300);
    font-size: var(--font-size-lg);
    max-width: 700px;
    margin: var(--space-2) auto 0;
    line-height: 1.6;
}

/* ==========================================================================
   Category Cards Container - ALL STYLES SCOPED
   ========================================================================== */

.tech-stack-section .tech-cards-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

.tech-stack-section .tech-cards-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-5);
    margin-bottom: var(--space-5);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tech-stack-section .tech-cards-row:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Main Category Card - SCOPED STYLES
   ========================================================================== */

.tech-stack-section .tech-category {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.tech-stack-section .tech-category:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--accent);
    transform: translateY(-4px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.3);
}

/* Category Header - SCOPED */
.tech-stack-section .tech-category__header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
}

.tech-stack-section .tech-category__icon {
    font-size: 2.2rem;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    line-height: 1;
}

.tech-stack-section .tech-category__title {
    color: var(--neutral-100);
    font-size: 1.5rem;
    margin: 0;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* ==========================================================================
   Mini Cards Grid - SCOPED INSIDE CATEGORY CARDS
   ========================================================================== */

.tech-stack-section .tech-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    flex: 1;
    width: 100%;
}

/* Mini Card Design - COMPLETELY SCOPED */
.tech-stack-section .tech-mini-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.3s ease;
    text-align: center;
    min-height: 90px;
    box-sizing: border-box;
}

.tech-stack-section .tech-mini-card:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.tech-stack-section .tech-mini-card__name {
    color: var(--neutral-100);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 6px;
    letter-spacing: 0.3px;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tech-stack-section .tech-mini-card__badge {
    background: rgba(255, 255, 255, 0.18);
    color: var(--neutral-200);
    font-size: 0.7rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 30px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: inline-block;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tech-stack-section .tech-mini-card:hover .tech-mini-card__badge {
    background: var(--accent);
    color: var(--primary-dark);
    border-color: var(--accent);
    font-weight: 600;
}

/* ==========================================================================
   Desktop Slider Controls - SCOPED
   ========================================================================== */

.tech-stack-section .slider-controls {
    display: none; /* Hidden by default, shown on desktop */
    align-items: center;
    justify-content: center;
    gap: 24px;
    margin-top: 40px;
}

.tech-stack-section .desktop-only {
    display: none;
}

.tech-stack-section .slider-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--neutral-100);
    padding: 10px 20px;
    border-radius: 40px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(8px);
}

.tech-stack-section .slider-btn:hover:not(:disabled) {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--primary-dark);
    transform: scale(1.05);
}

.tech-stack-section .slider-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    pointer-events: none;
}

.tech-stack-section .slider-btn svg {
    stroke: currentColor;
}

.tech-stack-section .slider-dots {
    display: flex;
    gap: 12px;
}

.tech-stack-section .slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.tech-stack-section .slider-dot:hover {
    background: rgba(255, 255, 255, 0.6);
}

.tech-stack-section .slider-dot--active {
    background: var(--accent);
    transform: scale(1.2);
}

/* Mobile Hint - SCOPED */
.tech-stack-section .mobile-hint {
    display: none;
    text-align: center;
    margin-top: 24px;
    color: var(--neutral-400);
    font-size: 0.9rem;
}

.tech-stack-section .mobile-hint span {
    background: rgba(255, 255, 255, 0.1);
    padding: 6px 16px;
    border-radius: 30px;
    backdrop-filter: blur(8px);
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS - ALL SCOPED TO .tech-stack-section
   ========================================================================== */

/* Mobile (up to 767px) - 1 column */
@media (max-width: 767px) {
    .tech-stack-section .tech-cards-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .tech-stack-section .tech-category {
        padding: 20px;
    }
    
    .tech-stack-section .tech-grid {
        gap: 10px;
    }
    
    .tech-stack-section .tech-mini-card {
        padding: 14px 6px;
        min-height: 80px;
    }
    
    .tech-stack-section .tech-mini-card__name {
        font-size: 0.9rem;
    }
    
    .tech-stack-section .tech-mini-card__badge {
        font-size: 0.65rem;
        padding: 3px 8px;
    }
    
    .tech-stack-section .mobile-hint {
        display: block;
    }
    
    .tech-stack-section .slider-controls {
        display: none !important;
    }
    
    .tech-stack-section .hidden-on-desktop {
        display: grid; /* Always show on mobile */
    }
}

/* Tablet (768px to 1023px) - 2 columns, all cards visible */
@media (min-width: 768px) and (max-width: 1023px) {
    .tech-stack-section .tech-cards-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .tech-stack-section .tech-category {
        padding: 20px;
    }
    
    .tech-stack-section .tech-grid {
        gap: 12px;
    }
    
    .tech-stack-section .tech-mini-card {
        min-height: 85px;
    }
    
    .tech-stack-section .tech-mini-card__name {
        font-size: 0.95rem;
    }
    
    .tech-stack-section .mobile-hint {
        display: block;
    }
    
    .tech-stack-section .slider-controls {
        display: none !important;
    }
    
    .tech-stack-section .hidden-on-desktop {
        display: grid; /* Always show on tablet */
    }
}

/* Desktop (1024px and up) - 2 columns with slider */
@media (min-width: 1024px) {
    .tech-stack-section .tech-cards-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .tech-stack-section .tech-category {
        padding: 28px;
    }
    
    .tech-stack-section .tech-grid {
        gap: 16px;
    }
    
    .tech-stack-section .tech-mini-card {
        min-height: 100px;
        padding: 18px 12px;
    }
    
    .tech-stack-section .tech-mini-card__name {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .tech-stack-section .tech-mini-card__badge {
        font-size: 0.7rem;
        padding: 5px 12px;
    }
    
    /* Slider controls visible only on desktop */
    .tech-stack-section .desktop-only {
        display: flex;
    }
    
    .tech-stack-section .slider-controls {
        display: flex;
    }
    
    .tech-stack-section .mobile-hint {
        display: none;
    }
    
    /* Initially hide second row on desktop */
    .tech-stack-section .hidden-on-desktop {
        display: none;
    }
    
    /* When active, show with animation */
    .tech-stack-section .hidden-on-desktop.active {
        display: grid;
        animation: techSlideDown 0.4s ease;
    }
}

/* Large Desktop (1280px and up) - Enhanced spacing */
@media (min-width: 1280px) {
    .tech-stack-section .tech-cards-row {
        gap: 30px;
    }
    
    .tech-stack-section .tech-category {
        padding: 32px;
    }
    
    .tech-stack-section .tech-grid {
        gap: 18px;
    }
    
    .tech-stack-section .slider-controls {
        margin-top: 48px;
    }
}

/* Animation - SCOPED with unique name to avoid conflicts */
@keyframes techSlideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ensure no overflow - SCOPED */
.tech-stack-section {
    overflow-x: hidden;
}

/* Container styles - ensure they don't leak */
.tech-stack-section .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Remove any old styles that might conflict - these classes are replaced by the new scoped classes above */
/* Integration Grid */
.integration-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    margin-top: var(--space-6);
}

.integration-card {
    background-color: var(--neutral-100);
    border-radius: var(--border-radius);
    padding: var(--space-4);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--neutral-200);
}

.integration-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-light);
}

.integration-card__logo {
    max-width: 120px;
    height: auto;
    margin: 0 auto var(--space-3);
    filter: grayscale(100%);
    opacity: 0.7;
    transition: var(--transition);
}

.integration-card:hover .integration-card__logo {
    filter: grayscale(0);
    opacity: 1;
}

.integration-card__name {
    font-size: var(--font-size-sm);
    color: var(--neutral-700);
    margin: 0;
}

/* Responsive Breakpoints */
@media (min-width: 640px) {
    .tech-category .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .platform-hero__title {
        font-size: 4rem;
    }

    .architecture-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .integration-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .tech-slider__wrapper .tech-category {
        flex: 0 0 calc(50% - var(--space-3));
    }
}

@media (min-width: 1024px) {
    .platform-hero__title {
        font-size: 5rem;
    }

    .platform-hero__title-line:first-child {
        font-size: 3.5rem;
    }

    .tech-slider__wrapper .tech-category {
        padding: var(--space-6);
    }

    .database-stats {
        max-width: 80%;
    }

    .floating-element {
        opacity: 0.25;
        font-size: 6rem;
    }
}

@media (min-width: 1025px) {
    .tech-slider__wrapper .tech-category {
        flex: 0 0 calc(50% - var(--space-4));
        margin-right: var(--space-6);
    }
    
    .slider-arrow--prev {
        left: -24px;
    }
    
    .slider-arrow--next {
        right: -24px;
    }
}

@media (min-width: 1280px) {
    .tech-category .tech-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .slider-indicators {
        display: none;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .tech-slider {
        padding: 0 var(--space-2);
    }
    
    .slider-arrow {
        display: none;
    }
    
    .tech-slider__wrapper {
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        padding-bottom: var(--space-4);
    }
    
    .tech-slider__wrapper .tech-category {
        scroll-snap-align: start;
        flex: 0 0 calc(100% - var(--space-4));
        margin-right: var(--space-4);
    }
    
    .slider-indicators {
        display: flex;
    }
}

@media (max-width: 480px) {
    .tech-category__header {
        flex-direction: column;
        text-align: center;
        gap: var(--space-2);
    }
    
    .tech-category .tech-item {
        flex-direction: column;
        text-align: center;
        gap: var(--space-2);
    }
    
    .tech-item__badge {
        width: 100%;
        text-align: center;
    }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .architecture-card {
        background-color: var(--neutral-800);
    }

    .architecture-card__description {
        color: var(--neutral-300);
    }

    .integration-card {
        background-color: var(--neutral-800);
    }

    .integration-card__name {
        color: var(--neutral-300);
    }
    
    .tech-slider__wrapper .tech-category {
        background: rgba(0, 0, 0, 0.3);
    }
}

/* Print styles */
@media print {
    .platform-hero {
        min-height: auto;
        background: none;
        color: var(--neutral-900);
    }

    .platform-hero__badge {
        background: none;
        border: 1px solid var(--neutral-900);
        color: var(--primary-dark);
    }

    .platform-hero__title-line:last-child {
        color: var(--primary-dark);
    }

    .floating-elements,
    .database-visualization,
    .slider-arrow,
    .slider-indicators {
        display: none;
    }

    .architecture-card__header {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
    
    .tech-slider__wrapper .tech-category {
        background: none;
        border: 1px solid var(--neutral-300);
        break-inside: avoid;
        box-shadow: none;
    }
    
    .tech-category__title {
        color: var(--neutral-900);
    }
    
    .tech-item__name {
        color: var(--neutral-900);
    }
    
    .tech-item__badge {
        background: var(--neutral-200);
        color: var(--neutral-900);
        border: 1px solid var(--neutral-400);
    }
}