/* Rotating Globe CTA Component - EXACT implementation from roatating-globe-cta.md */

/* Container */
.rotating-globe-cta-container {
    min-height: 100vh;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 2rem 0;
}

/* Featured Section - EXACT from spec */
.featured-section {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 12rem auto;
    overflow: hidden;
    border-radius: 1.5rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 4rem 6rem;
}

.featured-content {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: space-between;
    gap: 2.5rem;
}

@media (min-width: 768px) {
    .featured-content {
        flex-direction: row;
    }
    
    .featured-section {
        padding: 6rem 4rem;
    }
}

/* Featured Text */
.featured-text {
    z-index: 10;
    max-width: 36rem;
    text-align: left;
}

.featured-title {
    font-size: 1.875rem;
    font-weight: 400;
    color: #111827;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.text-primary {
    color: #3b82f6;
    font-weight: 600;
}

.featured-subtitle {
    color: #6b7280;
    font-weight: 400;
    display: block;
    margin-top: 0.5rem;
}

/* Featured Button - EXACT from spec */
.featured-button {
    margin-top: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 9999px;
    background: #111827;
    padding: 0.5rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #f9fafb;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.featured-button:hover {
    background: #000000;
    transform: translateY(-1px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.arrow-icon {
    width: 1rem;
    height: 1rem;
    transition: transform 0.3s ease;
}

.featured-button:hover .arrow-icon {
    transform: translateX(2px);
}

/* Featured Globe Container - EXACT positioning from spec */
.featured-globe-container {
    position: relative;
    height: 180px;
    width: 100%;
    max-width: 36rem;
}

.globe-wrapper {
    position: absolute;
    bottom: -80px;
    right: -160px;
    transform: scale(1.5);
    width: 600px;
    height: 600px;
    max-width: 600px;
    aspect-ratio: 1/1;
}

/* Rotating Globe Canvas */
.rotating-globe-canvas {
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease;
    contain: layout paint size;
    cursor: grab;
}

.rotating-globe-canvas:active {
    cursor: grabbing;
}

.rotating-globe-canvas.loaded {
    opacity: 1;
}

/* Demo Sections */
.demo-sections {
    max-width: 1200px;
    margin: 0 auto 4rem auto;
    padding: 0 2rem;
}

.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.demo-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
}

.demo-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
}

.demo-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.demo-card p {
    color: #6b7280;
    line-height: 1.6;
    margin: 0;
}

/* Globe Controls Section */
.globe-controls-section {
    max-width: 800px;
    margin: 0 auto 4rem auto;
    padding: 0 2rem;
}

.controls-container {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
}

.controls-container h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1.5rem;
    text-align: center;
}

.controls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    align-items: center;
}

.control-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.control-item label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
}

.control-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #3b82f6;
}

.control-item input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
}

.control-item input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(45deg, #3b82f6, #1d4ed8);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    transition: all 0.2s ease;
}

.control-item input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
}

.control-item span {
    color: #6b7280;
    font-weight: 600;
    font-size: 0.875rem;
    text-align: center;
    background: #f3f4f6;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    min-width: 60px;
}

/* CTA Statistics */
.cta-stats {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 3rem 2rem;
    color: white;
}

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

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 0.5rem;
    background: linear-gradient(45deg, #ffffff, #e5e7eb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.stat-label {
    font-size: 1rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .globe-wrapper {
        right: -120px;
        bottom: -60px;
        transform: scale(1.2);
    }
}

@media (max-width: 768px) {
    .featured-section {
        padding: 2rem 1.5rem;
        margin-bottom: 6rem;
    }
    
    .featured-title {
        font-size: 1.5rem;
    }
    
    .globe-wrapper {
        position: relative;
        right: 0;
        bottom: 0;
        transform: scale(1);
        width: 100%;
        height: 300px;
        margin-top: 2rem;
    }
    
    .featured-globe-container {
        height: 300px;
    }
    
    .demo-grid {
        grid-template-columns: 1fr;
    }
    
    .controls-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 2rem 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .rotating-globe-cta-container {
        padding: 1rem 0;
    }
    
    .featured-section {
        padding: 1.5rem 1rem;
        border-radius: 1rem;
    }
    
    .featured-title {
        font-size: 1.25rem;
    }
    
    .demo-sections,
    .globe-controls-section,
    .cta-stats {
        padding: 0 1rem;
    }
    
    .demo-card,
    .controls-container {
        padding: 1.5rem;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        padding: 1.5rem 1rem;
    }
}

/* Loading Animation */
.globe-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #6b7280;
    font-size: 0.875rem;
    z-index: 3;
}

.globe-loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
    margin-left: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .rotating-globe-cta-container {
        background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    }
    
    .featured-section {
        background: #1e293b;
        border-color: #334155;
    }
    
    .featured-title {
        color: #f8fafc;
    }
    
    .featured-subtitle {
        color: #94a3b8;
    }
    
    .demo-card,
    .controls-container {
        background: #1e293b;
        border-color: #334155;
    }
    
    .demo-card h3,
    .controls-container h3 {
        color: #f8fafc;
    }
    
    .demo-card p {
        color: #94a3b8;
    }
    
    .control-item label {
        color: #e2e8f0;
    }
    
    .control-item span {
        background: #334155;
        color: #e2e8f0;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .rotating-globe-canvas {
        transition: none;
    }
    
    .featured-button {
        transition: none;
    }
    
    .demo-card {
        transition: none;
    }
    
    .globe-loading::after {
        animation: none;
    }
}

/* Focus States */
.featured-button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.control-item input:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}
