/* ===== LAYOUT SYSTEM - FIREBASE STUDIO INSPIRED ===== */

/* Reset e Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: "Google Sans", system-ui, -apple-system, sans-serif;
    background-color: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Container System */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
}

/* Hero Section Layout */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(135deg, 
        var(--md-sys-color-surface) 0%, 
        var(--md-sys-color-surface-variant) 100%);
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top left, 
        rgba(66, 133, 244, 0.1) 0%, 
        rgba(52, 168, 83, 0.05) 50%, 
        transparent 100%);
}

.floating-elements {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
}

.floating-card {
    position: absolute;
    width: 200px;
    height: 120px;
    background: linear-gradient(135deg, 
        rgba(66, 133, 244, 0.1), 
        rgba(52, 168, 83, 0.1));
    border-radius: var(--md-sys-shape-corner-large);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: float 6s ease-in-out infinite;
}

.floating-card.card-1 {
    top: 10%;
    right: 10%;
    animation-delay: 0s;
}

.floating-card.card-2 {
    top: 60%;
    left: 5%;
    animation-delay: 2s;
}

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

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

.hero-container {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    min-height: 80vh;
}

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }
}

.hero-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (max-width: 1024px) {
    .hero-visual {
        order: -1;
    }
}

/* Section Layouts */
.partner-section,
.solutions-section,
.goals-section,
.success-section,
.cta-section {
    padding: 80px 0;
    position: relative;
}

.partner-section {
    background-color: var(--md-sys-color-surface-variant);
    border-top: 1px solid var(--md-sys-color-outline-variant);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
}

.solutions-section {
    background: linear-gradient(180deg, 
        var(--md-sys-color-surface) 0%, 
        var(--md-sys-color-surface-container-low) 100%);
}

.goals-section {
    background-color: var(--md-sys-color-surface-variant);
    position: relative;
}

.goals-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--md-sys-color-primary) 50%, 
        transparent 100%);
}

.success-section {
    background: linear-gradient(135deg, 
        var(--md-sys-color-surface) 0%, 
        var(--md-sys-color-surface-container-low) 100%);
    position: relative;
    overflow: hidden;
}

.success-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: radial-gradient(circle, 
        rgba(66, 133, 244, 0.05) 0%, 
        transparent 70%);
    animation: rotate 20s linear infinite;
}

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

.cta-section {
    background: linear-gradient(135deg, 
        var(--md-sys-color-primary-container) 0%, 
        var(--md-sys-color-surface-container-low) 100%);
    position: relative;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23e8f0fe' fill-opacity='0.3'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    opacity: 0.5;
}

/* Responsive Section Padding */
@media (max-width: 768px) {
    .partner-section,
    .solutions-section,
    .goals-section,
    .success-section,
    .cta-section {
        padding: 60px 0;
    }
}

/* Grid Systems */
.benefits-grid,
.goals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.success-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
}

@media (max-width: 768px) {
    .benefits-grid,
    .goals-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .success-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

/* Tab System Layout */
.solutions-tabs {
    position: relative;
    z-index: 1;
}

.tab-content-container {
    position: relative;
    min-height: 400px;
}

.tab-content {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.tab-content.active {
    opacity: 1;
    visibility: visible;
    position: relative;
}

/* Visual Elements Layout */
.dashboard-preview {
    max-width: 500px;
    width: 100%;
}

.hero-visual .dashboard-preview {
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: transform 0.3s ease;
}

.hero-visual .dashboard-preview:hover {
    transform: perspective(1000px) rotateY(-2deg) rotateX(2deg) scale(1.02);
}

/* Sticky Elements */
.pricing-card {
    position: sticky;
    top: 100px;
}

@media (max-width: 1024px) {
    .pricing-card {
        position: static;
    }
}

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.animate-on-scroll.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Interactive Elements */
.interactive-hover {
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.interactive-hover:hover {
    transform: translateY(-4px);
}

/* Glass Morphism Effects */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Gradient Text Effects */
.gradient-text {
    background: linear-gradient(135deg, 
        var(--md-sys-color-primary), 
        var(--md-sys-color-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Loading States */
.skeleton {
    background: linear-gradient(90deg, 
        var(--md-sys-color-surface-container) 25%, 
        var(--md-sys-color-surface-container-high) 50%, 
        var(--md-sys-color-surface-container) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Focus Management */
.focus-visible {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .hero-background,
    .floating-elements,
    .cta-section::before,
    .success-section::before {
        display: none;
    }
    
    .hero-section {
        min-height: auto;
        padding: 40px 0;
    }
    
    .partner-section,
    .solutions-section,
    .goals-section,
    .success-section,
    .cta-section {
        padding: 40px 0;
        break-inside: avoid;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .floating-card {
        border-width: 2px;
    }
    
    .gradient-overlay {
        opacity: 0.3;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .floating-card,
    .success-section::before {
        animation: none;
    }
    
    .hero-visual .dashboard-preview {
        transform: none;
    }
    
    .hero-visual .dashboard-preview:hover {
        transform: none;
    }
    
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .hero-section {
        background: linear-gradient(135deg, 
            #1a1a1a 0%, 
            #2d2d2d 100%);
    }
    
    .gradient-overlay {
        background: radial-gradient(ellipse at top left, 
            rgba(66, 133, 244, 0.15) 0%, 
            rgba(52, 168, 83, 0.08) 50%, 
            transparent 100%);
    }
    
    .floating-card {
        background: linear-gradient(135deg, 
            rgba(66, 133, 244, 0.2), 
            rgba(52, 168, 83, 0.2));
        border-color: rgba(255, 255, 255, 0.1);
    }
}

/* Ultra-wide Screen Support */
@media (min-width: 1600px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-container {
        gap: 120px;
    }
}

/* Mobile Landscape */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
    }
    
    .hero-container {
        min-height: 70vh;
    }
}

/* Tablet Specific */
@media (min-width: 768px) and (max-width: 1024px) {
    .hero-container {
        gap: 60px;
    }
    
    .benefits-grid,
    .goals-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
