/* Tesla MedBed X - Main Stylesheet */
/* Optimized for GTmetrix A+ Performance */

/* CSS Variables */
:root {
    --primary-gold: #d4af37;
    --primary-gold-dark: #b8960c;
    --secondary-dark: #1a1a2e;
    --secondary-darker: #0f0f1a;
    --accent-red: #e63946;
    --text-light: #ffffff;
    --text-dark: #1a1a1a;
    --text-gray: #6c757d;
    --bg-light: #f8f9fa;
    --bg-gradient: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f0f1a 100%);
    --shadow-soft: 0 4px 15px rgba(0, 0, 0, 0.1);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.15);
    --shadow-gold: 0 4px 20px rgba(212, 175, 55, 0.3);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--text-light);
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-dark);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.5rem); }

p {
    color: var(--text-dark);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 0;
    box-shadow: var(--shadow-soft);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
}

.logo-tesla {
    color: var(--primary-gold);
}

.logo-medbed {
    color: var(--text-light);
    font-style: italic;
}

.logo-x {
    color: var(--accent-red);
    font-size: 1.8rem;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    color: var(--text-light);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
}

.nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-gold);
    transition: var(--transition);
}

.nav a:hover::after {
    width: 100%;
}

/* Hero Section */
.hero {
    background: var(--bg-gradient);
    min-height: 100vh;
    padding: 120px 0 80px;
    display: flex;
    align-items: center;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-tagline {
    color: var(--primary-gold);
    font-size: 0.9rem;
    letter-spacing: 3px;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    margin-bottom: 20px;
    line-height: 1.1;
}

.title-tesla {
    color: var(--primary-gold);
    display: block;
}

.title-medbed {
    color: var(--text-light);
    font-style: italic;
}

.title-x {
    color: var(--accent-red);
    font-size: 1.2em;
}

.hero-subtitle {
    color: var(--text-light);
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.hero-description {
    color: rgba(255, 255, 255, 0.85);
    font-size: 1.1rem;
    margin-bottom: 30px;
    max-width: 550px;
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 25px;
}

.trust-item {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 25px;
}

.hero-image {
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.4));
}

/* CTA Button */
.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: linear-gradient(135deg, var(--primary-gold) 0%, var(--primary-gold-dark) 100%);
    color: var(--secondary-dark);
    padding: 18px 35px;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-gold);
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.5);
}

.cta-button.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); }
    50% { box-shadow: 0 0 0 15px rgba(212, 175, 55, 0); }
}

.cta-button.large {
    padding: 22px 45px;
    font-size: 1.2rem;
}

/* Social Proof Banner */
.social-proof {
    background: var(--primary-gold);
    padding: 30px 0;
}

.proof-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary-dark);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--secondary-darker);
    font-weight: 500;
}

/* Section Header */
.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    margin-bottom: 15px;
}

.section-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-gold), var(--accent-red));
    margin: 0 auto;
    border-radius: 2px;
}

/* What Is Section */
.what-is {
    padding: 100px 0;
    background: var(--bg-light);
}

.what-is-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: center;
}

.what-is-image img {
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
}

.what-is-text p {
    color: var(--text-dark);
    margin-bottom: 20px;
    text-align: justify;
}

/* Benefits Section */
.benefits {
    padding: 100px 0;
    background: var(--text-light);
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.benefit-card {
    background: var(--bg-light);
    padding: 40px 30px;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-medium);
}

.benefit-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.benefit-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.benefit-card h3 {
    margin-bottom: 15px;
    color: var(--secondary-dark);
}

.benefit-card p {
    color: var(--text-gray);
    font-size: 1rem;
}

/* How It Works */
.how-it-works {
    padding: 100px 0;
    background: var(--bg-gradient);
}

.how-it-works .section-header h2 {
    color: var(--text-light);
}

.steps-container {
    max-width: 800px;
    margin: 0 auto;
}

.step {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    align-items: flex-start;
}

.step-number {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: var(--primary-gold);
    color: var(--secondary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 800;
}

.step-content h3 {
    color: var(--primary-gold);
    margin-bottom: 10px;
}

.step-content p {
    color: rgba(255, 255, 255, 0.85);
}

/* Gemstone Section */
.gemstone-section {
    padding: 100px 0;
    background: var(--bg-light);
}

.gemstone-intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    font-size: 1.15rem;
}

.gemstone-images {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.gemstone-images img {
    max-width: 45%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
}

.gemstone-benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.gem-benefit {
    background: var(--text-light);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    text-align: center;
}

.gem-benefit strong {
    color: var(--primary-gold-dark);
}

/* Testimonials */
.testimonials {
    padding: 100px 0;
    background: var(--text-light);
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.testimonial-card {
    background: var(--bg-light);
    padding: 35px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
}

.testimonial-stars {
    color: var(--primary-gold);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.testimonial-author {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.author-name {
    font-weight: 700;
    color: var(--secondary-dark);
}

.author-location {
    color: var(--text-gray);
    font-size: 0.9rem;
}

.verified {
    color: #28a745;
    font-size: 0.85rem;
}

/* Pricing Section */
.pricing {
    padding: 100px 0;
    background: var(--bg-gradient);
}

.pricing .section-header h2 {
    color: var(--text-light);
}

.pricing-subtitle {
    color: rgba(255, 255, 255, 0.8);
    margin-top: 15px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.price-card {
    background: var(--text-light);
    border-radius: var(--border-radius);
    padding: 30px;
    text-align: center;
    position: relative;
    transition: var(--transition);
}

.price-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.price-card.featured {
    transform: scale(1.05);
    border: 3px solid var(--primary-gold);
}

.price-card.featured:hover {
    transform: scale(1.05) translateY(-10px);
}

.popular-badge, .limited-badge {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
}

.popular-badge {
    background: var(--primary-gold);
    color: var(--secondary-dark);
}

.limited-badge {
    background: var(--accent-red);
    color: var(--text-light);
}

.price-card img {
    max-width: 250px;
    margin: 0 auto 20px;
    border-radius: 8px;
}

.price-card h3 {
    font-size: 1.8rem;
    color: var(--secondary-dark);
    margin-bottom: 10px;
}

.original-price {
    font-size: 1.2rem;
    color: var(--text-gray);
    text-decoration: line-through;
    margin-bottom: 5px;
}

.sale-price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--accent-red);
    margin-bottom: 5px;
}

.savings {
    color: #28a745;
    font-weight: 600;
    margin-bottom: 20px;
}

.features-list {
    list-style: none;
    text-align: left;
    margin-bottom: 25px;
}

.features-list li {
    padding: 8px 0;
    color: var(--text-dark);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.payment-methods {
    text-align: center;
}

.payment-methods p {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
}

.payment-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.payment-icon {
    background: var(--text-light);
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Final CTA */
.final-cta {
    padding: 100px 0;
    background: var(--bg-light);
    text-align: center;
}

.cta-content {
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    margin-bottom: 20px;
}

.cta-content > p {
    color: var(--text-gray);
    margin-bottom: 30px;
}

.guarantee-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-gold-dark));
    padding: 20px 40px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
}

.guarantee-text {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: var(--secondary-dark);
}

.guarantee-subtext {
    font-size: 0.9rem;
    color: var(--secondary-darker);
    font-weight: 600;
}

.cta-note {
    margin-top: 20px;
    color: var(--accent-red);
    font-weight: 600;
}

/* Footer */
.footer {
    background: var(--secondary-darker);
    padding: 60px 0 30px;
    color: var(--text-light);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.footer-column h4 {
    color: var(--primary-gold);
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-column a {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 10px;
    font-size: 0.95rem;
}

.footer-column a:hover {
    color: var(--primary-gold);
}

.footer-disclaimer {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
}

.footer-disclaimer p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    text-align: center;
    margin: 0;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.digistore-notice {
    font-size: 0.8rem !important;
}

.digistore-notice a {
    color: var(--primary-gold);
}

/* Purchase Popup */
.purchase-popup {
    position: fixed;
    bottom: 30px;
    left: 30px;
    z-index: 9999;
    opacity: 0;
    transform: translateX(-100%);
    transition: all 0.5s ease;
}

.purchase-popup.show {
    opacity: 1;
    transform: translateX(0);
}

.popup-content {
    background: var(--text-light);
    padding: 20px 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: 350px;
    position: relative;
}

.popup-close {
    position: absolute;
    top: 5px;
    right: 10px;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-gray);
}

.popup-icon {
    font-size: 2rem;
}

.popup-text {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin: 0;
}

.popup-time {
    font-size: 0.8rem;
    color: var(--text-gray);
}

/* Exit Intent Popup */
.exit-popup {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.exit-popup.show {
    display: flex;
}

.exit-popup-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.exit-popup-content {
    position: relative;
    background: var(--text-light);
    padding: 50px;
    border-radius: var(--border-radius);
    text-align: center;
    max-width: 500px;
    margin: 20px;
    animation: popupSlide 0.4s ease;
}

@keyframes popupSlide {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(-50px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.exit-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-gray);
}

.exit-popup-content h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--secondary-dark);
}

.exit-popup-content > p {
    margin-bottom: 25px;
}

.exit-popup-offer {
    background: var(--accent-red);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 25px;
}

.offer-text {
    color: var(--text-light);
    font-weight: 700;
    margin: 0;
}

.exit-popup-note {
    margin-top: 15px;
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* Mobile Responsive */
@media (max-width: 992px) {
    .hero .container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .hero-description {
        margin: 0 auto 30px;
    }
    
    .hero-trust {
        justify-content: center;
    }
    
    .what-is-content {
        grid-template-columns: 1fr;
    }
    
    .benefits-grid,
    .testimonials-grid,
    .pricing-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .gemstone-benefits {
        grid-template-columns: 1fr;
    }
    
    .proof-stats {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .price-card.featured {
        transform: scale(1);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
    
    .nav {
        display: none;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .benefits-grid,
    .testimonials-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .step {
        flex-direction: column;
        text-align: center;
    }
    
    .step-number {
        margin: 0 auto;
    }
    
    .gemstone-images img {
        max-width: 100%;
    }
    
    .purchase-popup {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    
    .popup-content {
        max-width: 100%;
    }
    
    .exit-popup-content {
        padding: 30px 20px;
    }
    
    .cta-button {
        padding: 15px 25px;
        font-size: 1rem;
    }
    
    .cta-button.large {
        padding: 18px 30px;
        font-size: 1.05rem;
    }
}

@media (max-width: 480px) {
    html {
        font-size: 14px;
    }
    
    .container {
        padding: 0 15px;
    }
    
    .proof-stats {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .price-card img {
        max-width: 200px;
    }
    
    .sale-price {
        font-size: 2rem;
    }
}

/* Print Styles */
@media print {
    .header, .purchase-popup, .exit-popup, .cta-button {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus States for Accessibility */
a:focus, button:focus {
    outline: 3px solid var(--primary-gold);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-gold: #ffd700;
        --text-gray: #333;
    }
}
