/* Apple-inspired hero section styles */
.hero-section {
    background-color: #000;
    color: #fff;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 30%, rgba(103, 58, 183, 0.05), transparent 50%),
                radial-gradient(circle at 30% 70%, rgba(25, 118, 210, 0.05), transparent 50%);
    z-index: 0;
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 1.5rem;
    font-size: 3.5rem;
    background: linear-gradient(90deg, #fff, #bbb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.1;
}

.hero-content .lead {
    color: #86868b;
    font-size: 1.25rem;
    font-weight: 400;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Trust badges */
.trust-badges-container {
    margin: 2.5rem 0;
}

.trust-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.trust-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
}

.trust-badge i {
    color: #0071e3;
    font-size: 1.2rem;
    margin-right: 0.5rem;
}

/* Key stats */
.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #fff, #bbb);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    color: #86868b;
    font-size: 0.9rem;
}

/* Apple-style flow diagram */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.hero-illustration {
    width: 100%;
    max-width: 800px; /* Increased from 700px for a larger diagram */
    margin: 0 auto;
    position: relative;
}

.apple-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    padding: 4rem 2.5rem 3rem; /* Increased padding for more space */
    border-radius: 24px;
    background: rgba(30, 30, 32, 0.7);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    box-shadow: 0 20px 80px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: visible;
    min-height: 500px; /* Increased from 450px for more vertical space */
}

.apple-diagram::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 50%);
    pointer-events: none;
}

.diagram-flow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 3rem; /* Increased from 2rem */
    position: relative;
    padding: 0 1.5rem; /* Added horizontal padding to bring nodes in slightly */
}

.diagram-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    z-index: 2;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.node-icon {
    width: 90px; /* Increased from 80px */
    height: 90px; /* Increased from 80px */
    border-radius: 22px; /* Increased from 20px */
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem; /* Increased from 1rem for more space before label */
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.node-icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 60%);
    border-radius: 20px;
    z-index: 0;
}

.node-icon i {
    font-size: 2rem; /* Increased from 1.8rem */
    color: #fff;
    position: relative;
    z-index: 1;
}

.node-label {
    font-size: 1.1rem; /* Increased from 1rem */
    color: #86868b;
    margin-top: 0.7rem; /* Increased from 0.5rem */
    font-weight: 500;
    min-width: 120px; /* Increased to prevent text wrapping */
    text-align: center; /* Ensure text is centered */
    white-space: nowrap; /* Prevent text wrapping */
}

.input-node .node-icon {
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
}

.cloud-node .node-icon {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    transform: scale(1.15);
    animation: pulse 3s infinite ease-in-out;
    position: relative;
    overflow: visible;
    box-shadow: 0 0 30px rgba(79, 172, 254, 0.3); /* Increased from 25px */
}

.srt-label {
    position: absolute;
    bottom: -8px;
    right: -12px;
    background: #0071e3;
    color: white;
    font-size: 0.7rem; /* Increased from 0.6rem */
    font-weight: bold;
    padding: 4px 8px; /* Increased from 3px 6px */
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    z-index: 2;
}

.output-node {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.outputs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem; /* Increased from 1.5rem */
    margin-top: 3.5rem; /* Increased from 3rem */
    width: 100%;
    padding: 0 2rem; /* Increased from 1rem */
    position: relative; /* Added for positioning the infinity symbol */
    place-items: center; /* Ensures all items are centered in their grid cells */
}

.output-box {
    width: 100px; /* Increased significantly for more text space */
    height: 85px; /* Slightly taller to accommodate two lines of text */
    border-radius: 18px;
    background: linear-gradient(135deg, #8e2de2, #4a00e0);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(15px);
    animation: pulse 3s infinite ease-in-out;
    padding: 0.6rem 0.4rem; /* Adjusted padding */
}

.output-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.output-box i {
    font-size: 1.7rem; /* Increased from 1.5rem */
    color: #fff;
    margin-bottom: 0.4rem; /* Increased from 0.3rem */
}

.output-box span {
    font-size: 0.85rem; /* Slightly larger */
    color: rgba(255, 255, 255, 0.95);
    margin-top: 0.4rem;
    text-align: center;
    width: 100%;
    padding: 0 2px;
    line-height: 1.2; /* Better line spacing */
    font-weight: 500;
    display: block;
    word-wrap: break-word; /* Allow text to break if needed */
    overflow-wrap: break-word; /* Modern property for word breaking */
    hyphens: auto; /* Allow hyphenation if supported */
}

.output-infinity {
    width: 100%; /* Changed to full width instead of fixed width */
    height: 60px; /* Reduced height for horizontal layout */
    border-radius: 18px; /* Increased from 15px */
    background: linear-gradient(135deg, #00c6fb, #005bea);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem; /* Increased from 2rem */
    font-weight: bold;
    color: #fff;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    grid-column: span 3;
    margin: 2rem auto 0; /* Reduced top margin since no lines */
    opacity: 0;
    transform: scale(0.8);
}

/* Connector lines */
.diagram-connector {
    position: absolute;
    top: 45px; /* Adjusted to match new icon size */
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1));
    z-index: 1;
}

.diagram-connector::before,
.diagram-connector::after {
    content: '';
    position: absolute;
    top: -4px;
    right: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
}

.diagram-connector::before {
    left: 25%;
}

.diagram-connector::after {
    left: 75%;
}

/* Remove the problematic output lines and replace with animated connection dots */
.diagram-output-connection {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    height: 60px;
    z-index: 1;
    margin-top: 60px; /* Position between output node and boxes */
}

.connection-dots {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    height: 100%;
    position: relative;
}

.connection-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.4);
    animation: pulse-dot 2s infinite ease-in-out;
}

.connection-dot:nth-child(1) {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
    animation-delay: 0s;
}

.connection-dot:nth-child(2) {
    background: linear-gradient(135deg, #4776e6, #8e54e9);
    animation-delay: 0.3s;
}

.connection-dot:nth-child(3) {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
    animation-delay: 0.6s;
}

@keyframes pulse-dot {
    0%, 100% {
        transform: scale(1);
        opacity: 0.6;
    }
    50% {
        transform: scale(1.3);
        opacity: 1;
    }
}

/* Apple-style button styles */
.hero-content .btn-primary {
    background: #0071e3;
    border-color: #0071e3;
    border-radius: 20px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 113, 227, 0.3);
}

.hero-content .btn-primary:hover {
    background: #0077ed;
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(0, 113, 227, 0.4);
}

.hero-content .btn-outline-primary {
    color: #0071e3;
    border-color: rgba(0, 113, 227, 0.5);
    border-radius: 20px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    background: rgba(0, 113, 227, 0.05);
}

.hero-content .btn-outline-primary:hover {
    background: rgba(0, 113, 227, 0.1);
    border-color: #0071e3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 113, 227, 0.15);
}

/* Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation delays for diagram nodes */
.input-node {
    animation: fadeInUp 0.8s 0.2s forwards;
}

.cloud-node {
    animation: fadeInUp 0.8s 0.4s forwards;
}

.output-node {
    animation: fadeInUp 0.8s 0.6s forwards;
}

/* Animation delays for output boxes */
.output-broadcaster {
    animation: fadeInUp 0.8s 0.8s forwards;
}

.output-teleport {
    animation: fadeInUp 0.8s 1s forwards;
}

.output-operator {
    animation: fadeInUp 0.8s 1.2s forwards;
}

.output-infinity {
    animation: fadeInScale 0.8s 1.6s forwards;
}

.cloud-node .node-icon {
    animation: pulse 3s infinite ease-in-out;
}

.output-box {
    animation: pulse 3s infinite ease-in-out;
}

.output-box:nth-child(1) { animation-delay: 0.2s; }
.output-box:nth-child(2) { animation-delay: 0.4s; }
.output-box:nth-child(3) { animation-delay: 0.6s; }

@media (max-width: 991px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content {
        text-align: center;
        margin-bottom: 3rem;
    }
    
    .node-icon {
        width: 80px; /* Slightly smaller on tablets but still larger than original */
        height: 80px;
    }
    
    .output-box {
        width: 90px; /* Adjusted for tablet */
        height: 80px;
    }
    
    .output-box span {
        font-size: 0.75rem; /* Adjusted for readability */
    }
    
    .output-infinity {
        height: 50px; /* Adjusted for tablet */
    }
    
    .outputs-grid {
        gap: 1.5rem; /* Reduced from desktop but still larger than original */
    }
    
    .diagram-output-connection {
        margin-top: 40px; /* Adjusted for tablet */
    }
}

@media (max-width: 767px) {
    .hero-section {
        padding: 4rem 0;
    }
    
    .apple-diagram {
        padding: 2.5rem 1.5rem 1.5rem; /* Increased vertical padding */
        min-height: 480px; /* Adjusted for new layout */
    }
    
    .outputs-grid {
        margin-top: 2.5rem; /* Increased from 2rem */
        padding: 0 0.5rem; /* Added some horizontal padding */
        gap: 1rem; /* Reduced spacing on mobile */
    }
    
    .node-icon {
        width: 70px; /* Smaller on mobile but still larger than original */
        height: 70px;
    }
    
    .node-icon i {
        font-size: 1.7rem; /* Slightly smaller than desktop but still larger */
    }
    
    .output-box {
        width: 85px; /* Adjusted for mobile */
        height: 75px;
    }
    
    .output-box i {
        font-size: 1.3rem; /* Slightly smaller than desktop but still larger */
    }
    
    .output-box span {
        font-size: 0.7rem; /* Adjusted for better readability on mobile */
        line-height: 1.2;
    }
    
    .output-infinity {
        height: 45px; /* Adjusted for mobile */
        margin-top: 1.5rem; /* Adjusted for mobile */
        font-size: 1.8rem; /* Slightly smaller for mobile */
    }
    
    .diagram-connector {
        top: 35px; /* Adjust for smaller icons */
    }
    
    .diagram-output-connection {
        margin-top: 30px; /* Adjusted for mobile */
        height: 40px;
    }
    
    .connection-dot {
        width: 6px;
        height: 6px;
    }
}

/* Glassmorphism effect for the diagram */
.apple-diagram {
    position: relative;
    z-index: 1;
}

.apple-diagram::after {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(circle at center, rgba(79, 172, 254, 0.1), transparent 70%);
    filter: blur(30px);
    z-index: -1;
    pointer-events: none;
}

/* Subtle hover effects */
.node-icon:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

.input-node:hover .node-icon {
    background: linear-gradient(135deg, #3a7bd5, #00d2ff);
    box-shadow: 0 0 20px rgba(58, 123, 213, 0.5);
}

.cloud-node:hover .node-icon {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    box-shadow: 0 0 20px rgba(79, 172, 254, 0.5);
}

.output-node:hover .node-icon {
    background: linear-gradient(135deg, #8e2de2, #4a00e0);
    box-shadow: 0 0 20px rgba(142, 45, 226, 0.5);
}

.output-box:nth-child(1) {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
}

.output-box:nth-child(2) {
    background: linear-gradient(135deg, #4776e6, #8e54e9);
}

.output-box:nth-child(3) {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
}

/* Specific output box styles */
.output-broadcaster {
    background: linear-gradient(135deg, #ff416c, #ff4b2b);
}

.output-teleport {
    background: linear-gradient(135deg, #4776e6, #8e54e9);
}

.output-operator {
    background: linear-gradient(135deg, #00c6ff, #0072ff);
}

/* Adjust icon sizes and text for different devices */
.output-box span {
    font-size: 0.75rem; /* Increased for better readability */
    color: rgba(255, 255, 255, 0.9);
    margin-top: 0.3rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-align: center;
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden; /* Hide any overflow */
    text-overflow: ellipsis; /* Show ellipsis for overflow */
}

.output-box i {
    font-size: 1.5rem; /* Increased */
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.diagram-caption {
    margin-top: 2.5rem;
    color: #86868b;
    font-size: 0.9rem;
    text-align: center;
    font-weight: 400;
    padding: 0.75rem 1.25rem;
    border-radius: 12px;
    background: rgba(30, 30, 32, 0.7);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 2.5rem auto 1rem;
    width: auto;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.diagram-caption i {
    color: #2ecc71;
    margin-right: 0.75rem;
    font-size: 1.2rem;
    text-shadow: 0 0 8px rgba(46, 204, 113, 0.3);
}
